diff --git a/www/iridium/Makefile b/www/iridium/Makefile index 77221474c30e..9e6393c63197 100644 --- a/www/iridium/Makefile +++ b/www/iridium/Makefile @@ -1,356 +1,356 @@ PORTNAME= iridium -PORTVERSION= 2024.08.128.3 +PORTVERSION= 2024.10.130.1 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 i386 BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ bindgen:devel/rust-bindgen-cli \ gperf:devel/gperf \ flock:sysutils/flock \ node:www/node \ rustc:lang/rust \ xcb-proto>0:x11/xcb-proto \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} \ ${LOCALBASE}/include/va/va.h:multimedia/libva \ ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri \ ${LOCALBASE}/libdata/pkgconfig/Qt5Core.pc:devel/qt5-core \ ${LOCALBASE}/libdata/pkgconfig/Qt5Widgets.pc:x11-toolkits/qt5-widgets LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libepoll-shim.so:devel/libepoll-shim \ libevent.so:devel/libevent \ libffi.so:devel/libffi \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libdav1d.so:multimedia/dav1d \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic USES= bison compiler:c++17-lang cpe desktop-file-utils gl gmake gnome \ iconv:wchar_t jpeg localbase:ldflags ninja perl5 pkgconfig \ python:build qt:5 shebangfix tar:xz xorg CPE_VENDOR= google CPE_PRODUCT= chrome USE_GL= gbm gl USE_GNOME= atk dconf gdkpixbuf2 glib20 gtk30 libxml2 libxslt USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xorgproto xrandr xrender xscrnsaver xtst USE_QT= buildtools:build SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format 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_log_error_not_reached=true \ enable_nacl=false \ 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} ${PINCLUDES}" \ + 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="21 GB" DEBUG_VARS_OFF= BUILDTYPE=Release \ GN_ARGS+=blink_symbol_level=0 \ GN_ARGS+=is_debug=false \ GN_ARGS+=is_official_build=true \ GN_ARGS+=symbol_level=0 \ WANTSPACE="14 GB" HEIMDAL_LIB_DEPENDS= libkrb.so.26:security/heimdal KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false LTO_VARS= GN_ARGS+=use_thin_lto=true \ GN_ARGS+=thin_lto_enable_optimizations=true \ WANTSPACE="14 GB" LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false MIT_LIB_DEPENDS= libkrb.so.3:security/krb5 PIPEWIRE_DESC= Screen capture via PipeWire PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire PIPEWIRE_VARS= GN_ARGS+=rtc_use_pipewire=true \ GN_ARGS+=rtc_link_pipewire=true PIPEWIRE_VARS_OFF= GN_ARGS+=rtc_use_pipewire=false \ GN_ARGS+=rtc_link_pipewire=false PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true \ PINCLUDES="-I${WRKDIR}/pulseaudio-${PULSEV}/src -DPA_MAJOR=${PULSEMV}" PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false .include .include # for COMPILER_VERSION .if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base .endif LLVM_DEFAULT= 18 BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} BINARY_ALIAS+= cpp=${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} \ cc=${LOCALBASE}/bin/clang${LLVM_DEFAULT} \ c++=${LOCALBASE}/bin/clang++${LLVM_DEFAULT} \ ar=${LOCALBASE}/bin/llvm-ar${LLVM_DEFAULT} \ nm=${LOCALBASE}/bin/llvm-nm${LLVM_DEFAULT} \ ld=${LOCALBASE}/bin/ld.lld${LLVM_DEFAULT} # - swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only # - map ffmpeg target to ${ARCH} .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " FFMPEG_TARGET= arm64 .elif ${ARCH} == amd64 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= x64 .elif ${ARCH} == i386 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= ia32 .endif FFMPEG_BDIR= ${WRKSRC}/third_party/ffmpeg/build.${FFMPEG_TARGET}.freebsd/${FFMPEG_BRAND} FFMPEG_CDIR= ${WRKSRC}/third_party/ffmpeg/chromium/config/${FFMPEG_BRAND}/freebsd/${FFMPEG_TARGET} # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include # rust RUSTC_VERSION!= rustc -V 2>/dev/null || true MAKE_ENV+= RUSTC_BOOTSTRAP=1 GN_ARGS+= enable_rust=true \ rust_sysroot_absolute="${LOCALBASE}" \ rustc_version="${RUSTC_VERSION}" pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "To build Iridium, you should have around 2GB of memory" @${ECHO_MSG} "and around ${WANTSPACE} of free disk space." @${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 freetype harfbuzz-ng icu libdrm libevent 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/rust/rust_bindgen.gni do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin/node # Setup buildtools/freebsd @${MKDIR} ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKSRC}/buildtools/freebsd ${LN} -sf /usr/bin/strip ${WRKSRC}/buildtools/freebsd/strip do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ ${STAGEDIR}${PREFIX}/share/man/man1/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 0091cffab377..ff36637437e0 100644 --- a/www/iridium/distinfo +++ b/www/iridium/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1726326860 -SHA256 (iridium-browser-2024.08.128.3.tar.xz) = 5fc5fbe370902f8df418ebb73e834707778a104e88dfdd255ac1999cee856739 -SIZE (iridium-browser-2024.08.128.3.tar.xz) = 2832976056 +TIMESTAMP = 1730709570 +SHA256 (iridium-browser-2024.10.130.1.tar.xz) = f501dc8891b3fdfce2def46e58c0f0f6cd49a02ba995491b5ec7b6de565274b9 +SIZE (iridium-browser-2024.10.130.1.tar.xz) = 2835876588 SHA256 (pulseaudio-16.1.tar.gz) = 027266c62f2a84422ac45fa721a649508f0f1628fb1fd9242315ac54ce2d7c92 SIZE (pulseaudio-16.1.tar.gz) = 2763111 diff --git a/www/iridium/files/patch-.gn b/www/iridium/files/patch-.gn new file mode 100644 index 000000000000..0689b202865a --- /dev/null +++ b/www/iridium/files/patch-.gn @@ -0,0 +1,9 @@ +--- .gn.orig 2024-11-04 17:00:34 UTC ++++ .gn +@@ -172,4 +172,6 @@ exec_script_whitelist = + + "//tools/grit/grit_rule.gni", + "//tools/gritsettings/BUILD.gn", ++ ++ "//third_party/icu/BUILD.gn", + ] diff --git a/www/iridium/files/patch-BUILD.gn b/www/iridium/files/patch-BUILD.gn index cd973a79a6b1..e7424e9b6f19 100644 --- a/www/iridium/files/patch-BUILD.gn +++ b/www/iridium/files/patch-BUILD.gn @@ -1,89 +1,89 @@ ---- BUILD.gn.orig 2024-08-27 06:28:16 UTC +--- BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ BUILD.gn @@ -66,7 +66,7 @@ declare_args() { root_extra_deps = [] } -if (is_official_build) { +if (is_official_build && !is_bsd) { # An official (maximally optimized!) component (optimized for build times) # build doesn't make sense and usually doesn't work. assert(!is_component_build) @@ -98,7 +98,6 @@ group("gn_all") { "//codelabs", "//components:components_unittests", "//components/gwp_asan:gwp_asan_unittests", - "//infra/orchestrator:orchestrator_all", "//net:net_unittests", "//sandbox:sandbox_unittests", "//services:services_unittests", -@@ -431,7 +430,7 @@ group("gn_all") { +@@ -437,7 +436,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", -@@ -626,6 +625,15 @@ group("gn_all") { +@@ -628,6 +627,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)", -@@ -674,7 +682,7 @@ group("gn_all") { +@@ -676,7 +684,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 -@@ -1124,7 +1132,7 @@ if (use_blink && !is_cronet_build) { +@@ -1158,7 +1166,7 @@ if (use_blink && !is_cronet_build) { ] } - if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) { + if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) { script_test("chrome_wpt_tests") { script = "//third_party/blink/tools/run_wpt_tests.py" - args = [ -@@ -1221,7 +1229,7 @@ if (use_blink && !is_cronet_build) { + args = _common_web_test_options + [ "--product=chrome" ] +@@ -1251,7 +1259,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. -@@ -1235,7 +1243,7 @@ if (use_blink && !is_cronet_build) { +@@ -1265,7 +1273,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. -@@ -1702,7 +1710,7 @@ group("chromium_builder_perf") { +@@ -1729,7 +1737,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-base_BUILD.gn b/www/iridium/files/patch-base_BUILD.gn index 38c8724d3a5d..c68c146a7332 100644 --- a/www/iridium/files/patch-base_BUILD.gn +++ b/www/iridium/files/patch-base_BUILD.gn @@ -1,156 +1,150 @@ ---- base/BUILD.gn.orig 2024-08-27 06:28:16 UTC +--- base/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ base/BUILD.gn -@@ -176,7 +176,7 @@ buildflag_header("ios_cronet_buildflags") { - flags = [ "CRONET_BUILD=$is_cronet_build" ] - } - --enable_message_pump_epoll = is_linux || is_chromeos || is_android -+enable_message_pump_epoll = (is_linux || is_chromeos || is_android) && !is_bsd - buildflag_header("message_pump_buildflags") { - header = "message_pump_buildflags.h" - header_dir = "base/message_loop" -@@ -1119,11 +1119,23 @@ component("base") { +@@ -1101,11 +1101,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" ] ++ libs += [ ++ "kvm", ++ "epoll-shim", ++ ] + } + + if (is_freebsd) { + libs += [ + "execinfo", + "util", + ] + } + if (use_allocator_shim) { if (is_apple) { sources += [ "allocator/early_zone_registration_apple.h" ] -@@ -1143,7 +1155,7 @@ component("base") { +@@ -1125,7 +1140,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" ] } -@@ -2121,6 +2133,22 @@ component("base") { +@@ -2102,6 +2117,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 += [ -@@ -2266,6 +2294,33 @@ component("base") { +@@ -2246,6 +2277,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", -@@ -2276,7 +2331,7 @@ component("base") { - } +@@ -2572,7 +2630,7 @@ buildflag_header("protected_memory_buildflags") { + header = "protected_memory_buildflags.h" + header_dir = "base/memory" - if (dep_libevent) { -- deps += [ "//third_party/libevent" ] -+ public_deps += [ "//third_party/libevent" ] - } +- 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) - if (use_libevent) { -@@ -3077,7 +3132,7 @@ if (is_apple) { + flags = [ "PROTECTED_MEMORY_ENABLED=$protected_memory_enabled" ] +@@ -3055,7 +3113,7 @@ if (is_apple) { } } -if (!is_nacl && (is_linux || is_chromeos)) { +if (!is_nacl && !is_bsd && (is_linux || is_chromeos)) { # This test must compile with -fstack-protector-all source_set("stack_canary_linux_unittests") { testonly = true -@@ -3730,7 +3785,7 @@ test("base_unittests") { +@@ -3717,7 +3775,7 @@ test("base_unittests") { ] } - if (is_linux || is_chromeos) { + if (!is_bsd && (is_linux || is_chromeos)) { sources += [ "debug/proc_maps_linux_unittest.cc", "files/scoped_file_linux_unittest.cc", -@@ -3757,7 +3812,7 @@ test("base_unittests") { +@@ -3744,7 +3802,7 @@ test("base_unittests") { "posix/file_descriptor_shuffle_unittest.cc", "posix/unix_domain_socket_unittest.cc", ] - if (!is_nacl && !is_apple) { + if (!is_nacl && !is_apple && !is_bsd) { sources += [ "profiler/stack_base_address_posix_unittest.cc", "profiler/stack_copier_signal_unittest.cc", -@@ -3768,7 +3823,7 @@ test("base_unittests") { +@@ -3755,7 +3813,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" ] } -@@ -3953,7 +4008,7 @@ test("base_unittests") { +@@ -3942,7 +4000,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_partition__allocator_partition__alloc.gni b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index eeb6ddececda..2f9ee80c02b1 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 2024-08-27 06:28:16 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2024-11-04 08:56:03 UTC +++ base/allocator/partition_allocator/partition_alloc.gni @@ -31,7 +31,7 @@ if (is_nacl) { use_large_empty_slot_span_ring = is_mac has_memory_tagging = - current_cpu == "arm64" && is_clang && !is_asan && (is_linux || is_android) + current_cpu == "arm64" && is_clang && !is_asan && !is_bsd && (is_linux || is_android) declare_args() { # Causes all the allocations to be routed via allocator_shim.cc. Usually, -@@ -361,7 +361,7 @@ assert(!use_asan_backup_ref_ptr || use_raw_ptr_hookabl +@@ -391,7 +391,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 5f5bf099a7b1..056a39de783d 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 2024-08-27 06:28:16 UTC +--- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ base/allocator/partition_allocator/src/partition_alloc/BUILD.gn -@@ -796,7 +796,7 @@ if (is_clang_or_gcc) { +@@ -858,7 +858,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_page__allocator__internals__posix.h b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h index e34d7de093dd..57e6863d3c94 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 2024-08-01 05:47:53 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h.orig 2024-11-04 08:56:03 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h -@@ -411,8 +411,12 @@ bool TryRecommitSystemPagesInternal( +@@ -412,8 +412,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__config.h b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h index e3b200e31806..142dc45176f6 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,20 +1,20 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2024-08-27 06:28:16 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2024-11-04 08:56:03 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h @@ -168,7 +168,7 @@ constexpr bool kUseLazyCommit = false; // This may be required on more platforms in the future. #define PA_CONFIG_HAS_ATFORK_HANDLER() \ (PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_LINUX) || \ - PA_BUILDFLAG(IS_CHROMEOS)) + PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD)) - // PartitionAlloc uses PartitionRootEnumerator to acquire all - // PartitionRoots at BeforeFork and to release at AfterFork. -@@ -216,7 +216,7 @@ constexpr bool kUseLazyCommit = false; + // Enable shadow metadata. + // +@@ -231,7 +231,7 @@ constexpr bool kUseLazyCommit = false; // Also enabled on ARM64 macOS and iOS, as the 16kiB pages on this platform lead // to larger slot spans. #if PA_BUILDFLAG(IS_LINUX) || \ - (PA_BUILDFLAG(IS_APPLE) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) + (PA_BUILDFLAG(IS_APPLE) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) || PA_BUILDFLAG(IS_BSD) #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 1 #else #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 0 diff --git a/www/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 ed66b278173d..df269bd41b40 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 2024-08-27 06:28:16 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig 2024-11-04 08:56:03 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h @@ -329,7 +329,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; -@@ -458,7 +458,7 @@ PA_ALWAYS_INLINE constexpr size_t MaxDirectMapped() { +@@ -446,7 +446,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__root.cc b/www/iridium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc index fcbb979511d0..0abda0325518 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 2024-08-27 06:28:16 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig 2024-11-04 08:56:03 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_root.cc -@@ -43,7 +43,7 @@ +@@ -44,7 +44,7 @@ #include "wow64apiset.h" #endif -#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) +#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD) #include #endif -@@ -277,7 +277,7 @@ void PartitionAllocMallocInitOnce() { +@@ -290,7 +290,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. -@@ -1074,7 +1074,7 @@ void PartitionRoot::Init(PartitionOptions opts) { +@@ -1110,7 +1110,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_base__paths__posix.cc b/www/iridium/files/patch-base_base__paths__posix.cc index bea076c47aa0..03ba237ba61e 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 2024-06-25 12:08:48 UTC +--- base/base_paths_posix.cc.orig 2024-11-04 08:56:03 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 -@@ -49,8 +54,7 @@ bool PathProviderPosix(int key, FilePath* result) { +@@ -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_IN_MIGRATION() << "Unable to resolve path."; - return false; -@@ -67,13 +71,65 @@ bool PathProviderPosix(int key, FilePath* result) { + NOTREACHED() << "Unable to resolve path."; + } +@@ -62,13 +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"); - return true; + char *cpath; +#if !BUILDFLAG(IS_AIX) + struct kinfo_file *files; + kvm_t *kd = NULL; + char errbuf[_POSIX2_LINE_MAX]; + static char retval[PATH_MAX]; + int cnt; + struct stat sb; + pid_t cpid = getpid(); + bool ret = false; + + const base::CommandLine* command_line = + base::CommandLine::ForCurrentProcess(); + + VLOG(1) << "PathProviderPosix argv: " << command_line->argv()[0]; + + if (realpath(command_line->argv()[0].c_str(), retval) == NULL) + goto out; + + if (stat(command_line->argv()[0].c_str(), &sb) < 0) + goto out; + + if (!command_line->HasSwitch("no-sandbox")) { + ret = true; + *result = FilePath(retval); + VLOG(1) << "PathProviderPosix (sandbox) result: " << retval; + goto out; + } + + if ((kd = kvm_openfiles(NULL, NULL, NULL, (int)KVM_NO_FILES, errbuf)) == NULL) + goto out; + + if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, cpid, + sizeof(struct kinfo_file), &cnt)) == NULL) + goto out; + + for (int i = 0; i < cnt; i++) { + if (files[i].fd_fd == KERN_FILE_TEXT && + files[i].va_fsid == static_cast(sb.st_dev) && + files[i].va_fileid == sb.st_ino) { + ret = true; + *result = FilePath(retval); + VLOG(1) << "PathProviderPosix result: " << retval; + } + } +out: + if (kd) + kvm_close(kd); + if (!ret) { +#endif + if ((cpath = getenv("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 50a2950426b5..91f9e7e5bf70 100644 --- a/www/iridium/files/patch-base_compiler__specific.h +++ b/www/iridium/files/patch-base_compiler__specific.h @@ -1,11 +1,20 @@ ---- base/compiler_specific.h.orig 2024-08-27 06:28:16 UTC +--- base/compiler_specific.h.orig 2024-11-04 08:56:03 UTC +++ base/compiler_specific.h -@@ -326,7 +326,7 @@ +@@ -257,7 +257,7 @@ // // In some cases it's desirable to remove this, e.g. on hot functions, or if // we have purposely changed the reference canary. -#if defined(COMPILER_GCC) || defined(__clang__) +#if (defined(COMPILER_GCC) || defined(__clang__)) && !defined(__OpenBSD__) && !defined(__FreeBSD__) #if HAS_ATTRIBUTE(__no_stack_protector__) #define NO_STACK_PROTECTOR __attribute__((__no_stack_protector__)) #else +@@ -388,7 +388,7 @@ inline constexpr bool AnalyzerAssumeTrue(bool arg) { + // See https://clang.llvm.org/docs/AttributeReference.html#preserve-most for + // more details. + #if (defined(ARCH_CPU_ARM64) || defined(ARCH_CPU_X86_64)) && \ +- !(BUILDFLAG(IS_WIN) && defined(ARCH_CPU_ARM64)) && \ ++ !((BUILDFLAG(IS_WIN) || BUILDFLAG(IS_OPENBSD)) && defined(ARCH_CPU_ARM64)) && \ + !defined(COMPONENT_BUILD) && defined(__clang__) && \ + __clang_major__ >= 17 && HAS_ATTRIBUTE(preserve_most) + #define PRESERVE_MOST __attribute__((preserve_most)) diff --git a/www/iridium/files/patch-base_debug_stack__trace.cc b/www/iridium/files/patch-base_debug_stack__trace.cc index 153b79d83393..a16d02798a21 100644 --- a/www/iridium/files/patch-base_debug_stack__trace.cc +++ b/www/iridium/files/patch-base_debug_stack__trace.cc @@ -1,29 +1,29 @@ ---- base/debug/stack_trace.cc.orig 2024-08-01 05:47:53 UTC +--- base/debug/stack_trace.cc.orig 2024-11-04 08:56:03 UTC +++ base/debug/stack_trace.cc -@@ -255,7 +255,7 @@ bool StackTrace::WillSymbolizeToStreamForTesting() { +@@ -258,7 +258,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; -@@ -317,7 +317,7 @@ std::string StackTrace::ToString() const { +@@ -320,7 +320,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(); -@@ -341,7 +341,7 @@ bool StackTrace::ShouldSuppressOutput() { +@@ -344,7 +344,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_features.cc b/www/iridium/files/patch-base_features.cc deleted file mode 100644 index 491652717d5d..000000000000 --- a/www/iridium/files/patch-base_features.cc +++ /dev/null @@ -1,27 +0,0 @@ ---- base/features.cc.orig 2024-08-27 06:28:16 UTC -+++ base/features.cc -@@ -9,8 +9,10 @@ - #include "base/threading/platform_thread.h" - #include "build/buildflag.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) -+#if !BUILDFLAG(IS_BSD) - #include "base/message_loop/message_pump_epoll.h" -+#endif - #include "base/message_loop/message_pump_libevent.h" - #endif - -@@ -116,9 +118,11 @@ void Init(EmitThreadControllerProfilerMetadata - sequence_manager::internal::ThreadController::InitializeFeatures( - emit_thread_controller_profiler_metadata); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - MessagePumpLibevent::InitializeFeatures(); -+#if !BUILDFLAG(IS_BSD) - MessagePumpEpoll::InitializeFeatures(); -+#endif - #endif - - #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_CHROMEOS) 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 e25c88be772d..84cef47ece0e 100644 --- a/www/iridium/files/patch-base_files_file__util__unittest.cc +++ b/www/iridium/files/patch-base_files_file__util__unittest.cc @@ -1,20 +1,20 @@ ---- base/files/file_util_unittest.cc.orig 2024-08-01 05:47:53 UTC +--- base/files/file_util_unittest.cc.orig 2024-11-04 08:56:03 UTC +++ base/files/file_util_unittest.cc -@@ -3903,7 +3903,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { +@@ -3886,7 +3886,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"; -@@ -4620,7 +4620,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles +@@ -4608,7 +4608,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_memory_discardable__memory.cc b/www/iridium/files/patch-base_memory_discardable__memory.cc index 705a31d8a772..4705d9f313a6 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 2022-12-06 08:09:13 UTC +--- base/memory/discardable_memory.cc.orig 2024-11-04 08:56:03 UTC +++ base/memory/discardable_memory.cc @@ -26,7 +26,7 @@ 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, "DiscardableMemoryBackingTrial", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -52,7 +52,7 @@ const base::FeatureParam +@@ -39,7 +39,7 @@ BASE_FEATURE(kDiscardableMemoryBackingTrial, 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 = -@@ -71,7 +71,7 @@ DiscardableMemoryBacking GetBackingForFieldTrial() { +@@ -58,7 +58,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. -@@ -101,7 +101,7 @@ DiscardableMemory::DiscardableMemory() = default; +@@ -88,7 +88,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 157c6d14f06e..2fd6ba8e0ec1 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 2022-03-28 18:11:04 UTC +--- base/memory/discardable_memory_internal.h.orig 2024-11-04 08:56:03 UTC +++ base/memory/discardable_memory_internal.h -@@ -10,7 +10,7 @@ +@@ -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 edf464acdcc7..c0097403e3f0 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 2024-06-25 12:08:48 UTC +--- base/memory/madv_free_discardable_memory_posix.cc.orig 2024-11-04 08:56:03 UTC +++ base/memory/madv_free_discardable_memory_posix.cc -@@ -311,6 +311,10 @@ void MadvFreeDiscardableMemoryPosix::SetKeepMemoryForT +@@ -310,6 +310,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 -@@ -326,6 +330,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons +@@ -325,6 +329,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons return false; } return true; +#endif } bool MadvFreeDiscardableMemoryPosix::IsDiscarded() const { diff --git a/www/iridium/files/patch-base_memory_protected__memory.h b/www/iridium/files/patch-base_memory_protected__memory.h new file mode 100644 index 000000000000..dce786fedae3 --- /dev/null +++ b/www/iridium/files/patch-base_memory_protected__memory.h @@ -0,0 +1,44 @@ +--- base/memory/protected_memory.h.orig 2024-11-04 08:56:03 UTC ++++ base/memory/protected_memory.h +@@ -119,12 +119,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; +@@ -339,7 +339,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 +@@ -353,7 +353,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 +@@ -411,7 +411,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 new file mode 100644 index 000000000000..0b84b00bd48d --- /dev/null +++ b/www/iridium/files/patch-base_memory_protected__memory__posix.cc @@ -0,0 +1,20 @@ +--- base/memory/protected_memory_posix.cc.orig 2024-11-04 08:56:03 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 new file mode 100644 index 000000000000..25797e23640b --- /dev/null +++ b/www/iridium/files/patch-base_message__loop_message__pump__epoll.cc @@ -0,0 +1,11 @@ +--- base/message_loop/message_pump_epoll.cc.orig 2024-11-04 08:56:03 UTC ++++ base/message_loop/message_pump_epoll.cc +@@ -42,7 +42,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 new file mode 100644 index 000000000000..68a9894c7a58 --- /dev/null +++ b/www/iridium/files/patch-base_message__loop_message__pump__epoll.h @@ -0,0 +1,14 @@ +--- base/message_loop/message_pump_epoll.h.orig 2024-11-04 08:56:03 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_native__library__unittest.cc b/www/iridium/files/patch-base_native__library__unittest.cc index daa7ef40af77..d06ad5f322cf 100644 --- a/www/iridium/files/patch-base_native__library__unittest.cc +++ b/www/iridium/files/patch-base_native__library__unittest.cc @@ -1,11 +1,11 @@ ---- base/native_library_unittest.cc.orig 2024-06-25 12:08:48 UTC +--- base/native_library_unittest.cc.orig 2024-11-04 08:56:03 UTC +++ base/native_library_unittest.cc -@@ -133,7 +133,7 @@ TEST(NativeLibraryTest, LoadLibrary) { +@@ -135,7 +135,7 @@ TEST(NativeLibraryTest, LoadLibrary) { // versions with respect to symbol resolution scope. // TSan and MSan error out on RTLD_DEEPBIND, https://crbug.com/705255 #if !BUILDFLAG(IS_ANDROID) && !defined(THREAD_SANITIZER) && \ - !defined(MEMORY_SANITIZER) + !defined(MEMORY_SANITIZER) && !BUILDFLAG(IS_BSD) // Verifies that the |prefer_own_symbols| option satisfies its guarantee that // a loaded library will always prefer local symbol resolution before diff --git a/www/iridium/files/patch-base_posix_file__descriptor__shuffle.h b/www/iridium/files/patch-base_posix_file__descriptor__shuffle.h new file mode 100644 index 000000000000..88bfe5c5da0d --- /dev/null +++ b/www/iridium/files/patch-base_posix_file__descriptor__shuffle.h @@ -0,0 +1,11 @@ +--- base/posix/file_descriptor_shuffle.h.orig 2024-11-04 08:56:03 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_process_launch.h b/www/iridium/files/patch-base_process_launch.h index 2e76ca672c5e..6b00f356551c 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 2024-08-27 06:28:16 UTC +--- base/process/launch.h.orig 2024-11-04 08:56:03 UTC +++ base/process/launch.h -@@ -211,7 +211,7 @@ struct BASE_EXPORT LaunchOptions { +@@ -237,7 +237,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_launch__posix.cc b/www/iridium/files/patch-base_process_launch__posix.cc index 3428f661d58d..71b5468fc783 100644 --- a/www/iridium/files/patch-base_process_launch__posix.cc +++ b/www/iridium/files/patch-base_process_launch__posix.cc @@ -1,12 +1,12 @@ ---- base/process/launch_posix.cc.orig 2024-06-25 12:08:48 UTC +--- base/process/launch_posix.cc.orig 2024-11-04 08:56:03 UTC +++ base/process/launch_posix.cc -@@ -66,6 +66,9 @@ +@@ -67,6 +67,9 @@ #error "macOS should use launch_mac.cc" #endif +#if defined(OS_FREEBSD) +#pragma weak environ +#endif extern char** environ; namespace base { diff --git a/www/iridium/files/patch-base_process_process__metrics.h b/www/iridium/files/patch-base_process_process__metrics.h index fe206988269f..abfb122391c9 100644 --- a/www/iridium/files/patch-base_process_process__metrics.h +++ b/www/iridium/files/patch-base_process_process__metrics.h @@ -1,115 +1,115 @@ ---- base/process/process_metrics.h.orig 2024-06-25 12:08:48 UTC +--- base/process/process_metrics.h.orig 2024-11-04 08:56:03 UTC +++ base/process/process_metrics.h @@ -38,7 +38,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) #include #include #include @@ -48,7 +48,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. // -@@ -116,7 +116,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -113,7 +113,7 @@ class BASE_EXPORT ProcessMetrics { // convenience wrapper for CreateProcessMetrics(). static std::unique_ptr CreateCurrentProcessMetrics(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Resident Set Size is a Linux/Android specific memory concept. Do not // attempt to extend this to other platforms. BASE_EXPORT size_t GetResidentSetSize() const; -@@ -150,7 +150,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -147,7 +147,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 -@@ -195,7 +195,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -192,7 +192,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) // Bytes of swap as reported by /proc/[pid]/status. uint64_t GetVmSwapBytes() const; -@@ -216,7 +216,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -213,7 +213,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) -@@ -238,12 +238,10 @@ class BASE_EXPORT ProcessMetrics { +@@ -235,12 +235,10 @@ 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) 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_; -@@ -284,7 +282,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de +@@ -281,7 +279,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. Values are in KB. Available on // Windows, Mac, Linux, Android and Chrome OS. // -@@ -319,7 +317,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -316,7 +314,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { #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 -@@ -334,7 +332,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -331,7 +329,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { #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) int buffers = 0; int cached = 0; int active_anon = 0; -@@ -371,7 +369,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK +@@ -368,7 +366,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK // 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. -@@ -566,7 +564,7 @@ class BASE_EXPORT SystemMetrics { +@@ -563,7 +561,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) SystemMemoryInfoKB 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 8f545ffededa..d441d5f56619 100644 --- a/www/iridium/files/patch-base_process_process__metrics__freebsd.cc +++ b/www/iridium/files/patch-base_process_process__metrics__freebsd.cc @@ -1,307 +1,306 @@ ---- base/process/process_metrics_freebsd.cc.orig 2024-06-25 12:08:48 UTC +--- base/process/process_metrics_freebsd.cc.orig 2024-11-04 08:56:03 UTC +++ base/process/process_metrics_freebsd.cc -@@ -3,44 +3,58 @@ +@@ -3,43 +3,58 @@ // found in the LICENSE file. #include "base/process/process_metrics.h" +#include "base/notreached.h" #include +#include #include #include #include +#include /* O_RDONLY */ +#include +#include + #include "base/memory/ptr_util.h" +#include "base/values.h" namespace base { +namespace { +int GetPageShift() { + int pagesize = getpagesize(); + int pageshift = 0; -ProcessMetrics::ProcessMetrics(ProcessHandle process) - : process_(process), - last_cpu_(0) {} + while (pagesize > 1) { + pageshift++; + pagesize >>= 1; + } + return pageshift; +} +} + +ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {} + // static std::unique_ptr ProcessMetrics::CreateProcessMetrics( ProcessHandle process) { return WrapUnique(new ProcessMetrics(process)); } -base::expected -ProcessMetrics::GetPlatformIndependentCPUUsage() { +base::expected +ProcessMetrics::GetCumulativeCPUUsage() { struct kinfo_proc info; - int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, process_}; - size_t length = sizeof(info); + size_t length = sizeof(struct kinfo_proc); + struct timeval tv; + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_ }; + if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) - return base::unexpected(ProcessCPUUsageError::kSystemError); + return base::ok(TimeDelta()); - return base::ok(double{info.ki_pctcpu} / FSCALE * 100.0); + return base::ok(Microseconds(info.ki_runtime)); } -base::expected -ProcessMetrics::GetCumulativeCPUUsage() { -- NOTREACHED_IN_MIGRATION(); -- return base::unexpected(ProcessCPUUsageError::kNotImplemented); +- NOTREACHED(); -} - size_t GetSystemCommitCharge() { int mib[2], pagesize; unsigned long mem_total, mem_free, mem_inactive; -@@ -62,6 +76,230 @@ size_t GetSystemCommitCharge() { +@@ -61,6 +76,230 @@ size_t GetSystemCommitCharge() { pagesize = getpagesize(); return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); +} + +int64_t GetNumberOfThreads(ProcessHandle process) { + // Taken from FreeBSD top (usr.bin/top/machine.c) + + kvm_t* kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "kvm_open"); + if (kd == NULL) + return 0; + + struct kinfo_proc* pbase; + int nproc; + pbase = kvm_getprocs(kd, KERN_PROC_PID, process, &nproc); + if (pbase == NULL) + return 0; + + if (kvm_close(kd) == -1) + return 0; + + return nproc; +} + +bool GetSystemMemoryInfo(SystemMemoryInfoKB *meminfo) { + unsigned int mem_total, mem_free, swap_total, swap_used; + size_t length; + int pagesizeKB; + + pagesizeKB = getpagesize() / 1024; + + length = sizeof(mem_total); + if (sysctlbyname("vm.stats.vm.v_page_count", &mem_total, + &length, NULL, 0) != 0 || length != sizeof(mem_total)) + return false; + + length = sizeof(mem_free); + if (sysctlbyname("vm.stats.vm.v_free_count", &mem_free, &length, NULL, 0) + != 0 || length != sizeof(mem_free)) + return false; + + length = sizeof(swap_total); + if (sysctlbyname("vm.swap_size", &swap_total, &length, NULL, 0) + != 0 || length != sizeof(swap_total)) + return false; + + length = sizeof(swap_used); + if (sysctlbyname("vm.swap_anon_use", &swap_used, &length, NULL, 0) + != 0 || length != sizeof(swap_used)) + return false; + + meminfo->total = mem_total * pagesizeKB; + meminfo->free = mem_free * pagesizeKB; + meminfo->swap_total = swap_total * pagesizeKB; + meminfo->swap_free = (swap_total - swap_used) * pagesizeKB; + + return true; +} + +int ProcessMetrics::GetOpenFdCount() const { + struct kinfo_file * kif; + int cnt; + + if ((kif = kinfo_getfile(process_, &cnt)) == NULL) + return -1; + + free(kif); + + return cnt; +} + +int ProcessMetrics::GetOpenFdSoftLimit() const { + size_t length; + int total_count = 0; + int mib[] = { CTL_KERN, KERN_MAXFILESPERPROC }; + + length = sizeof(total_count); + + if (sysctl(mib, std::size(mib), &total_count, &length, NULL, 0) < 0) { + total_count = -1; + } + + return total_count; +} + +size_t ProcessMetrics::GetResidentSetSize() const { + kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open"); + + if (kd == nullptr) + return 0; + + struct kinfo_proc *pp; + int nproc; + + if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) { + kvm_close(kd); + return 0; + } + + size_t rss; + + if (nproc > 0) { + rss = pp->ki_rssize << GetPageShift(); + } else { + rss = 0; + } + + kvm_close(kd); + return rss; +} + +uint64_t ProcessMetrics::GetVmSwapBytes() const { + kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open"); + + if (kd == nullptr) + return 0; + + struct kinfo_proc *pp; + int nproc; + + if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) { + kvm_close(kd); + return 0; + } + + size_t swrss; + + if (nproc > 0) { + swrss = pp->ki_swrss > pp->ki_rssize + ? (pp->ki_swrss - pp->ki_rssize) << GetPageShift() + : 0; + } else { + swrss = 0; + } + + kvm_close(kd); + return swrss; +} + +int ProcessMetrics::GetIdleWakeupsPerSecond() { + NOTIMPLEMENTED(); + return 0; +} + +bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) { + NOTIMPLEMENTED(); + return false; +} + +bool GetVmStatInfo(VmStatInfo* vmstat) { + NOTIMPLEMENTED(); + return false; +} + +SystemDiskInfo::SystemDiskInfo() { + reads = 0; + reads_merged = 0; + sectors_read = 0; + read_time = 0; + writes = 0; + writes_merged = 0; + sectors_written = 0; + write_time = 0; + io = 0; + io_time = 0; + weighted_io_time = 0; +} + +SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo& other) = default; + +SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default; + +Value::Dict SystemDiskInfo::ToDict() const { + Value::Dict res; + + // Write out uint64_t variables as doubles. + // Note: this may discard some precision, but for JS there's no other option. + res.Set("reads", static_cast(reads)); + res.Set("reads_merged", static_cast(reads_merged)); + res.Set("sectors_read", static_cast(sectors_read)); + res.Set("read_time", static_cast(read_time)); + res.Set("writes", static_cast(writes)); + res.Set("writes_merged", static_cast(writes_merged)); + res.Set("sectors_written", static_cast(sectors_written)); + res.Set("write_time", static_cast(write_time)); + res.Set("io", static_cast(io)); + res.Set("io_time", static_cast(io_time)); + res.Set("weighted_io_time", static_cast(weighted_io_time)); + + NOTIMPLEMENTED(); + + return res; +} + +Value::Dict SystemMemoryInfoKB::ToDict() const { + Value::Dict res; + res.Set("total", total); + res.Set("free", free); + res.Set("available", available); + res.Set("buffers", buffers); + res.Set("cached", cached); + res.Set("active_anon", active_anon); + res.Set("inactive_anon", inactive_anon); + res.Set("active_file", active_file); + res.Set("inactive_file", inactive_file); + res.Set("swap_total", swap_total); + res.Set("swap_free", swap_free); + res.Set("swap_used", swap_total - swap_free); + res.Set("dirty", dirty); + res.Set("reclaimable", reclaimable); + + NOTIMPLEMENTED(); + + return res; +} + +Value::Dict VmStatInfo::ToDict() const { + Value::Dict res; + // TODO(crbug.com/1334256): Make base::Value able to hold uint64_t and remove + // casts below. + res.Set("pswpin", static_cast(pswpin)); + res.Set("pswpout", static_cast(pswpout)); + res.Set("pgmajfault", static_cast(pgmajfault)); + + NOTIMPLEMENTED(); + + return res; } } // namespace base diff --git a/www/iridium/files/patch-base_process_process__metrics__openbsd.cc b/www/iridium/files/patch-base_process_process__metrics__openbsd.cc index f6c08ccecb9c..66c9ae0670df 100644 --- a/www/iridium/files/patch-base_process_process__metrics__openbsd.cc +++ b/www/iridium/files/patch-base_process_process__metrics__openbsd.cc @@ -1,234 +1,233 @@ ---- base/process/process_metrics_openbsd.cc.orig 2024-06-25 12:08:48 UTC +--- base/process/process_metrics_openbsd.cc.orig 2024-11-04 08:56:03 UTC +++ base/process/process_metrics_openbsd.cc -@@ -6,75 +6,50 @@ +@@ -6,74 +6,50 @@ #include #include +#include #include #include +#include +#include + #include "base/memory/ptr_util.h" #include "base/types/expected.h" +#include "base/values.h" +#include "base/notreached.h" namespace base { -namespace { +ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process) {} -base::expected GetProcessCPU(pid_t pid) { +base::expected +ProcessMetrics::GetCumulativeCPUUsage() { struct kinfo_proc info; - size_t length; - int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid, - sizeof(struct kinfo_proc), 0 }; + size_t length = sizeof(struct kinfo_proc); + struct timeval tv; - if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0) { - return base::unexpected(ProcessCPUUsageError::kSystemError); - } + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_, + sizeof(struct kinfo_proc), 1 }; - mib[5] = (length / sizeof(struct kinfo_proc)); - if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) { return base::unexpected(ProcessCPUUsageError::kSystemError); } - return base::ok(info.p_pctcpu); + tv.tv_sec = info.p_rtime_sec; + tv.tv_usec = info.p_rtime_usec; + + return base::ok(Microseconds(TimeValToMicroseconds(tv))); } -} // namespace - // static std::unique_ptr ProcessMetrics::CreateProcessMetrics( ProcessHandle process) { return WrapUnique(new ProcessMetrics(process)); } -base::expected -ProcessMetrics::GetPlatformIndependentCPUUsage() { - TimeTicks time = TimeTicks::Now(); - - if (last_cpu_time_.is_zero()) { - // First call, just set the last values. - last_cpu_time_ = time; - return base::ok(0.0); - } - - const base::expected cpu = GetProcessCPU(process_); - if (!cpu.has_value()) { - return base::unexpected(cpu.error()); - } - - last_cpu_time_ = time; - return base::ok(double{cpu.value()} / FSCALE * 100.0); -} - -base::expected -ProcessMetrics::GetCumulativeCPUUsage() { -- NOTREACHED_IN_MIGRATION(); -- return base::unexpected(ProcessCPUUsageError::kNotImplemented); +- NOTREACHED(); -} - -ProcessMetrics::ProcessMetrics(ProcessHandle process) - : process_(process), - last_cpu_(0) {} - size_t GetSystemCommitCharge() { int mib[] = { CTL_VM, VM_METER }; - int pagesize; + size_t pagesize; struct vmtotal vmtotal; unsigned long mem_total, mem_free, mem_inactive; size_t len = sizeof(vmtotal); -@@ -86,9 +61,136 @@ size_t GetSystemCommitCharge() { +@@ -85,9 +61,136 @@ size_t GetSystemCommitCharge() { mem_free = vmtotal.t_free; mem_inactive = vmtotal.t_vm - vmtotal.t_avm; - pagesize = getpagesize(); + pagesize = checked_cast(getpagesize()); return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); +} + +int ProcessMetrics::GetOpenFdCount() const { +#if 0 + struct kinfo_file *files; + kvm_t *kd = NULL; + int total_count = 0; + char errbuf[_POSIX2_LINE_MAX]; + + if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL) + goto out; + + if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process_, + sizeof(struct kinfo_file), &total_count)) == NULL) { + total_count = 0; + goto out; + } + + kvm_close(kd); + +out: + return total_count; +#endif + return getdtablecount(); +} + +int ProcessMetrics::GetOpenFdSoftLimit() const { + return getdtablesize(); +// return GetMaxFds(); +} + +uint64_t ProcessMetrics::GetVmSwapBytes() const { + NOTIMPLEMENTED(); + return 0; +} + +bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) { + NOTIMPLEMENTED_LOG_ONCE(); + return false; +} + +bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) { + NOTIMPLEMENTED(); + return false; +} + +bool GetVmStatInfo(VmStatInfo* vmstat) { + NOTIMPLEMENTED(); + return false; +} + +int ProcessMetrics::GetIdleWakeupsPerSecond() { + NOTIMPLEMENTED(); + return 0; +} + +Value::Dict SystemMemoryInfoKB::ToDict() const { + Value::Dict res; + res.Set("total", total); + res.Set("free", free); + res.Set("available", available); + res.Set("buffers", buffers); + res.Set("cached", cached); + res.Set("active_anon", active_anon); + res.Set("inactive_anon", inactive_anon); + res.Set("active_file", active_file); + res.Set("inactive_file", inactive_file); + res.Set("swap_total", swap_total); + res.Set("swap_free", swap_free); + res.Set("swap_used", swap_total - swap_free); + res.Set("dirty", dirty); + res.Set("reclaimable", reclaimable); + + NOTIMPLEMENTED(); + + return res; +} + +Value::Dict VmStatInfo::ToDict() const { + Value::Dict res; + res.Set("pswpin", static_cast(pswpin)); + res.Set("pswpout", static_cast(pswpout)); + res.Set("pgmajfault", static_cast(pgmajfault)); + + NOTIMPLEMENTED(); + + return res; +} + +SystemDiskInfo::SystemDiskInfo() { + reads = 0; + reads_merged = 0; + sectors_read = 0; + read_time = 0; + writes = 0; + writes_merged = 0; + sectors_written = 0; + write_time = 0; + io = 0; + io_time = 0; + weighted_io_time = 0; +} + +SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo&) = default; + +SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default; + +Value::Dict SystemDiskInfo::ToDict() const { + Value::Dict res; + + // Write out uint64_t variables as doubles. + // Note: this may discard some precision, but for JS there's no other option. + res.Set("reads", static_cast(reads)); + res.Set("reads_merged", static_cast(reads_merged)); + res.Set("sectors_read", static_cast(sectors_read)); + res.Set("read_time", static_cast(read_time)); + res.Set("writes", static_cast(writes)); + res.Set("writes_merged", static_cast(writes_merged)); + res.Set("sectors_written", static_cast(sectors_written)); + res.Set("write_time", static_cast(write_time)); + res.Set("io", static_cast(io)); + res.Set("io_time", static_cast(io_time)); + res.Set("weighted_io_time", static_cast(weighted_io_time)); + + NOTIMPLEMENTED(); + + return res; } } // namespace base diff --git a/www/iridium/files/patch-base_process_process__unittest.cc b/www/iridium/files/patch-base_process_process__unittest.cc index 4b4816992a8f..5aa682a621c2 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 2024-06-25 12:08:48 UTC +--- base/process/process_unittest.cc.orig 2024-11-04 08:56:03 UTC +++ base/process/process_unittest.cc -@@ -199,7 +199,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) { +@@ -203,7 +203,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_rand__util__posix.cc b/www/iridium/files/patch-base_rand__util__posix.cc index d401668d0d69..f5fb22be7d0f 100644 --- a/www/iridium/files/patch-base_rand__util__posix.cc +++ b/www/iridium/files/patch-base_rand__util__posix.cc @@ -1,62 +1,62 @@ ---- base/rand_util_posix.cc.orig 2024-08-27 06:28:16 UTC +--- base/rand_util_posix.cc.orig 2024-11-04 08:56:03 UTC +++ base/rand_util_posix.cc @@ -28,7 +28,7 @@ #include "base/time/time.h" #include "build/build_config.h" -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) #include "third_party/lss/linux_syscall_support.h" #elif BUILDFLAG(IS_MAC) // TODO(crbug.com/40641285): Waiting for this header to appear in the iOS SDK. @@ -44,6 +44,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; @@ -68,10 +69,11 @@ class URandomFd { private: const int fd_; }; +#endif #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ BUILDFLAG(IS_ANDROID)) && \ - !BUILDFLAG(IS_NACL) + !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) // TODO(pasko): Unify reading kernel version numbers in: // mojo/core/channel_linux.cc // chrome/browser/android/seccomp_support_detector.cc -@@ -181,6 +183,7 @@ bool UseBoringSSLForRandBytes() { +@@ -177,6 +179,7 @@ bool UseBoringSSLForRandBytes() { namespace { void RandBytesInternal(span output, bool avoid_allocation) { +#if !BUILDFLAG(IS_BSD) #if !BUILDFLAG(IS_NACL) // The BoringSSL experiment takes priority over everything else. if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) { -@@ -217,6 +220,9 @@ void RandBytesInternal(span output, bool avoi +@@ -213,6 +216,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 -@@ -236,9 +242,11 @@ void RandBytes(span output) { +@@ -232,9 +238,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_system_sys__info__freebsd.cc b/www/iridium/files/patch-base_system_sys__info__freebsd.cc index 3e21aa3f067f..8ce477422e93 100644 --- a/www/iridium/files/patch-base_system_sys__info__freebsd.cc +++ b/www/iridium/files/patch-base_system_sys__info__freebsd.cc @@ -1,115 +1,112 @@ ---- base/system/sys_info_freebsd.cc.orig 2024-06-25 12:08:48 UTC +--- base/system/sys_info_freebsd.cc.orig 2024-11-04 08:56:03 UTC +++ base/system/sys_info_freebsd.cc -@@ -9,30 +9,106 @@ +@@ -9,28 +9,103 @@ #include #include "base/notreached.h" +#include "base/process/process_metrics.h" +#include "base/strings/string_util.h" namespace base { -int64_t SysInfo::AmountOfPhysicalMemoryImpl() { - int pages, page_size; +int SysInfo::NumberOfProcessors() { + int mib[] = {CTL_HW, HW_NCPU}; + int ncpu; + size_t size = sizeof(ncpu); + if (sysctl(mib, std::size(mib), &ncpu, &size, NULL, 0) < 0) { + NOTREACHED(); + return 1; + } + return ncpu; +} -+ ++ +uint64_t SysInfo::AmountOfPhysicalMemoryImpl() { + int pages, page_size, r = 0; size_t size = sizeof(pages); - sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); - sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); - if (pages == -1 || page_size == -1) { + + if (r == 0) + r = sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); -+ if (r == 0) ++ if (r == 0) + r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); + + if (r == -1) { - NOTREACHED_IN_MIGRATION(); - return 0; + NOTREACHED(); } - return static_cast(pages) * page_size; + + return static_cast(pages) * page_size; } +uint64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { + int page_size, r = 0; + unsigned int pgfree, pginact, pgcache; + size_t size = sizeof(page_size); + size_t szpg = sizeof(pgfree); -+ ++ + if (r == 0) + r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); + if (r == 0) + r = sysctlbyname("vm.stats.vm.v_free_count", &pgfree, &szpg, NULL, 0); + if (r == 0) + r = sysctlbyname("vm.stats.vm.v_inactive_count", &pginact, &szpg, NULL, 0); + if (r == 0) + r = sysctlbyname("vm.stats.vm.v_cache_count", &pgcache, &szpg, NULL, 0); + + if (r == -1) { + NOTREACHED(); + return 0; + } + + return static_cast((pgfree + pginact + pgcache) * page_size); +} + // static +uint64_t SysInfo::AmountOfAvailablePhysicalMemory(const SystemMemoryInfoKB& info) { + uint64_t res_kb = info.available != 0 + ? info.available - info.active_file + : info.free + info.reclaimable + info.inactive_file; + return res_kb * 1024; +} + +// static +std::string SysInfo::CPUModelName() { + int mib[] = { CTL_HW, HW_MODEL }; + char name[256]; + size_t size = std::size(name); + + if (sysctl(mib, std::size(mib), &name, &size, NULL, 0) == 0) { + return name; + } + + return std::string(); +} + +// static uint64_t SysInfo::MaxSharedMemorySize() { size_t limit; size_t size = sizeof(limit); + if (sysctlbyname("kern.ipc.shmmax", &limit, &size, NULL, 0) < 0) { - NOTREACHED_IN_MIGRATION(); - return 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 baa3caf88e90..0414e7876333 100644 --- a/www/iridium/files/patch-base_system_sys__info__openbsd.cc +++ b/www/iridium/files/patch-base_system_sys__info__openbsd.cc @@ -1,94 +1,85 @@ ---- base/system/sys_info_openbsd.cc.orig 2024-06-25 12:08:48 UTC +--- base/system/sys_info_openbsd.cc.orig 2024-11-04 08:56:03 UTC +++ base/system/sys_info_openbsd.cc -@@ -3,7 +3,6 @@ - // found in the LICENSE file. - - #include "base/system/sys_info.h" -- - #include - #include - #include -@@ -12,6 +11,7 @@ +@@ -12,6 +12,7 @@ #include "base/notreached.h" #include "base/posix/sysctl.h" +#include "base/strings/string_util.h" namespace { -@@ -27,9 +27,14 @@ uint64_t AmountOfMemory(int pages_name) { +@@ -27,9 +28,14 @@ uint64_t AmountOfMemory(int pages_name) { namespace base { +// pledge(2) +uint64_t aofpmem = 0; +uint64_t shmmax = 0; +char cpumodel[256]; + // static int SysInfo::NumberOfProcessors() { - int mib[] = {CTL_HW, HW_NCPU}; + int mib[] = {CTL_HW, HW_NCPUONLINE}; int ncpu; size_t size = sizeof(ncpu); if (sysctl(mib, std::size(mib), &ncpu, &size, NULL, 0) < 0) { -@@ -41,10 +46,26 @@ int SysInfo::NumberOfProcessors() { +@@ -40,10 +46,26 @@ int SysInfo::NumberOfProcessors() { // static uint64_t SysInfo::AmountOfPhysicalMemoryImpl() { - return AmountOfMemory(_SC_PHYS_PAGES); + // pledge(2) + if (!aofpmem) + aofpmem = AmountOfMemory(_SC_PHYS_PAGES); + return aofpmem; } // static +std::string SysInfo::CPUModelName() { + int mib[] = {CTL_HW, HW_MODEL}; + size_t len = std::size(cpumodel); -+ ++ + if (cpumodel[0] == '\0') { + if (sysctl(mib, std::size(mib), cpumodel, &len, NULL, 0) < 0) + return std::string(); + } -+ ++ + return std::string(cpumodel, len - 1); +} + +// static uint64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { // We should add inactive file-backed memory also but there is no such // information from OpenBSD unfortunately. -@@ -56,16 +77,28 @@ uint64_t SysInfo::MaxSharedMemorySize() { +@@ -55,15 +77,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_IN_MIGRATION(); - return 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 9a1c52ee3931..97020c3f2cb4 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 2024-06-25 12:08:48 UTC +--- base/system/sys_info_posix.cc.orig 2024-11-04 08:56:03 UTC +++ base/system/sys_info_posix.cc -@@ -118,7 +118,7 @@ bool GetDiskSpaceInfo(const base::FilePath& path, +@@ -117,7 +117,7 @@ bool GetDiskSpaceInfo(const base::FilePath& path, namespace base { -#if !BUILDFLAG(IS_OPENBSD) +#if !BUILDFLAG(IS_BSD) // static int SysInfo::NumberOfProcessors() { #if BUILDFLAG(IS_MAC) -@@ -175,7 +175,7 @@ int SysInfo::NumberOfProcessors() { +@@ -173,7 +173,7 @@ int SysInfo::NumberOfProcessors() { return cached_num_cpus; } -#endif // !BUILDFLAG(IS_OPENBSD) +#endif // !BUILDFLAG(IS_BSD) // static uint64_t SysInfo::AmountOfVirtualMemory() { -@@ -265,6 +265,8 @@ std::string SysInfo::OperatingSystemArchitecture() { +@@ -256,6 +256,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_threading_platform__thread__internal__posix.cc b/www/iridium/files/patch-base_threading_platform__thread__internal__posix.cc index ed397d684cdd..97b5e71e3caa 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,11 +1,11 @@ ---- base/threading/platform_thread_internal_posix.cc.orig 2024-06-25 12:08:48 UTC +--- base/threading/platform_thread_internal_posix.cc.orig 2024-11-04 08:56:03 UTC +++ base/threading/platform_thread_internal_posix.cc -@@ -42,7 +42,7 @@ ThreadPriorityForTest NiceValueToThreadPriorityForTest +@@ -41,7 +41,7 @@ ThreadPriorityForTest NiceValueToThreadPriorityForTest } int GetCurrentThreadNiceValue() { -#if BUILDFLAG(IS_NACL) +#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD) NOTIMPLEMENTED(); return 0; #else 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 c625a895569e..4b91f6050e49 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 2024-06-25 12:08:48 UTC +--- base/threading/platform_thread_unittest.cc.orig 2024-11-04 08:56:03 UTC +++ base/threading/platform_thread_unittest.cc @@ -38,7 +38,7 @@ #include "base/time/time.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include #include -@@ -429,7 +429,7 @@ TEST(PlatformThreadTest, +@@ -362,7 +362,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; -@@ -713,12 +713,16 @@ INSTANTIATE_TEST_SUITE_P( +@@ -616,12 +616,16 @@ INSTANTIATE_TEST_SUITE_P( #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) namespace { bool IsTidCacheCorrect() { +#if BUILDFLAG(IS_BSD) + return PlatformThread::CurrentId() == reinterpret_cast(pthread_self()); +#else return PlatformThread::CurrentId() == syscall(__NR_gettid); +#endif } void* CheckTidCacheCorrectWrapper(void*) { diff --git a/www/iridium/files/patch-base_trace__event_memory__dump__manager.cc b/www/iridium/files/patch-base_trace__event_memory__dump__manager.cc index 4b000a79d34e..3fdcf38412e3 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 2024-06-25 12:08:48 UTC +--- base/trace_event/memory_dump_manager.cc.orig 2024-11-04 08:56:03 UTC +++ base/trace_event/memory_dump_manager.cc -@@ -87,7 +87,7 @@ const char* const MemoryDumpManager::kSystemAllocatorP +@@ -83,7 +83,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-build_config_clang_BUILD.gn b/www/iridium/files/patch-build_config_clang_BUILD.gn index 222c6e16ebf5..093f1d44e25d 100644 --- a/www/iridium/files/patch-build_config_clang_BUILD.gn +++ b/www/iridium/files/patch-build_config_clang_BUILD.gn @@ -1,11 +1,16 @@ ---- build/config/clang/BUILD.gn.orig 2024-08-27 06:28:16 UTC +--- build/config/clang/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ build/config/clang/BUILD.gn -@@ -237,7 +237,7 @@ template("clang_lib") { +@@ -236,7 +236,12 @@ template("clang_lib") { # Adds a dependency on the Clang runtime library clang_rt.builtins. clang_lib("compiler_builtins") { -- if (!toolchain_has_rust) { -+ if (!toolchain_has_rust || is_bsd) { - # Since there's no Rust in the toolchain, there's no concern that we'll use - # the Rust stdlib's intrinsics here. - # +- if (is_mac) { ++ if (is_bsd) { ++ # Since there's no Rust in the toolchain, there's no concern that we'll use ++ # the Rust stdlib's intrinsics here. ++ # ++ # Don't define libname which makes this target do nothing. ++ } else if (is_mac) { + libname = "osx" + } else if (is_ios) { + if (target_environment == "simulator") { diff --git a/www/iridium/files/patch-build_config_compiler_BUILD.gn b/www/iridium/files/patch-build_config_compiler_BUILD.gn index 2f8ce6192e50..16f167c536e6 100644 --- a/www/iridium/files/patch-build_config_compiler_BUILD.gn +++ b/www/iridium/files/patch-build_config_compiler_BUILD.gn @@ -1,138 +1,141 @@ ---- build/config/compiler/BUILD.gn.orig 2024-08-27 06:28:16 UTC +--- build/config/compiler/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ build/config/compiler/BUILD.gn @@ -199,7 +199,7 @@ declare_args() { # This greatly reduces the size of debug builds, at the cost of # debugging information which is required by some specialized # debugging tools. - simple_template_names = is_clang && !is_nacl && !is_win && !is_apple + simple_template_names = is_clang && !is_nacl && !is_win && !is_apple && !is_bsd } declare_args() { -@@ -251,13 +251,16 @@ config("default_include_dirs") { +@@ -256,13 +256,16 @@ config("default_include_dirs") { # Compiler instrumentation can introduce dependencies in DSOs to symbols in # the executable they are loaded into, so they are unresolved at link-time. config("no_unresolved_symbols") { - if (!using_sanitizer && + if (!using_sanitizer && !is_bsd && (is_linux || is_chromeos || is_android || is_fuchsia)) { ldflags = [ "-Wl,-z,defs", "-Wl,--as-needed", ] } + if (current_cpu == "x86" && is_openbsd) { + ldflags = [ "-Wl,-z,notext", "-Wl,--strip-all" ] + } } # compiler --------------------------------------------------------------------- -@@ -503,6 +506,10 @@ config("compiler") { +@@ -508,6 +511,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_icf && (!is_apple || use_lld)) { -@@ -556,7 +563,7 @@ config("compiler") { +@@ -561,7 +568,7 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } - if (is_clang && !is_nacl) { + if (is_clang && !is_nacl && !is_bsd) { cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] if (save_reproducers_on_lld_crash && use_lld) { ldflags += [ -@@ -1197,7 +1204,7 @@ config("compiler_cpu_abi") { +@@ -1217,7 +1224,7 @@ config("compiler_cpu_abi") { ] } } else if (current_cpu == "arm") { - if (is_clang && !is_android && !is_nacl && + if (is_clang && !is_android && !is_nacl && !is_bsd && !(is_chromeos_lacros && is_chromeos_device)) { cflags += [ "--target=arm-linux-gnueabihf" ] ldflags += [ "--target=arm-linux-gnueabihf" ] -@@ -1212,7 +1219,7 @@ config("compiler_cpu_abi") { +@@ -1232,7 +1239,7 @@ config("compiler_cpu_abi") { cflags += [ "-mtune=$arm_tune" ] } } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_nacl && !is_fuchsia && + if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd && !(is_chromeos_lacros && is_chromeos_device)) { cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] -@@ -1547,7 +1554,7 @@ config("compiler_deterministic") { +@@ -1567,7 +1574,7 @@ config("compiler_deterministic") { # different build directory like "out/feature_a" and "out/feature_b" if # we build same files with same compile flag. # Other paths are already given in relative, no need to normalize them. - if (is_nacl) { + if (is_nacl || is_bsd) { # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here. cflags += [ "-Xclang", -@@ -1605,7 +1612,7 @@ config("compiler_deterministic") { +@@ -1625,7 +1632,7 @@ config("compiler_deterministic") { } config("clang_revision") { - if (is_clang && clang_base_path == default_clang_base_path && + if (is_clang && !is_bsd && clang_base_path == default_clang_base_path && current_os != "zos") { update_args = [ "--print-revision", -@@ -1938,9 +1945,6 @@ config("default_warnings") { +@@ -1955,9 +1962,6 @@ config("default_warnings") { # TODO(crbug.com/40286317): Evaluate and possibly enable. "-Wno-vla-extension", - - # TODO(crbug.com/40284799): Fix and re-enable. - "-Wno-thread-safety-reference-return", ] cflags_cc += [ -@@ -1948,14 +1952,11 @@ config("default_warnings") { +@@ -1965,17 +1969,11 @@ config("default_warnings") { "-Wenum-compare-conditional", ] - if (!is_nacl) { + if (!is_nacl && !is_openbsd) { cflags_cc += [ # TODO(crbug.com/41486292): Fix and re-enable. "-Wno-c++11-narrowing-const-reference", ] - - # TODO(crbug.com/344680447): Fix and re-enable. - cflags_cc += [ "-Wno-missing-template-arg-list-after-template-kw" ] +- +- # TODO(crbug.com/356172342): Fix and re-enable. +- cflags_cc += [ "-Wno-dangling-assignment-gsl" ] } } -@@ -2676,7 +2677,7 @@ config("afdo_optimize_size") { +@@ -2709,7 +2707,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. -@@ -2703,7 +2704,7 @@ config("afdo") { +@@ -2736,7 +2734,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 ] } -@@ -2868,7 +2869,7 @@ config("symbols") { - configs += [ "//build/config:compress_debug_sections" ] +@@ -2913,7 +2911,7 @@ config("symbols") { + cflags += [ "-gomit-unreferenced-methods" ] } - if (is_clang && (!is_nacl || is_nacl_saigo)) { + if (is_clang && (!is_nacl || is_nacl_saigo) && !is_bsd) { if (is_apple) { # TODO(crbug.com/40117949): Investigate missing debug info on mac. # Make sure we don't use constructor homing on mac. diff --git a/www/iridium/files/patch-build_config_rust.gni b/www/iridium/files/patch-build_config_rust.gni index 21fcac5f6054..1c951f3ece76 100644 --- a/www/iridium/files/patch-build_config_rust.gni +++ b/www/iridium/files/patch-build_config_rust.gni @@ -1,13 +1,13 @@ ---- build/config/rust.gni.orig 2024-08-01 05:47:53 UTC +--- build/config/rust.gni.orig 2024-11-04 08:56:03 UTC +++ build/config/rust.gni -@@ -270,6 +270,10 @@ if (is_linux || is_chromeos) { +@@ -277,6 +277,10 @@ if (is_linux || is_chromeos) { } } +if (is_bsd) { + rust_abi_target = string_replace(rust_abi_target, "linux-gnu", current_os) +} + assert(!toolchain_has_rust || rust_abi_target != "") # This variable is passed to the Rust libstd build. diff --git a/www/iridium/files/patch-build_linux_unbundle_icu.gn b/www/iridium/files/patch-build_linux_unbundle_icu.gn index 9307fb9a9f25..583a0f4da885 100644 --- a/www/iridium/files/patch-build_linux_unbundle_icu.gn +++ b/www/iridium/files/patch-build_linux_unbundle_icu.gn @@ -1,18 +1,37 @@ ---- build/linux/unbundle/icu.gn.orig 2024-08-27 06:28:16 UTC +--- build/linux/unbundle/icu.gn.orig 2024-11-04 17:00:34 UTC +++ build/linux/unbundle/icu.gn @@ -17,6 +17,15 @@ config("icu_config") { "USING_SYSTEM_ICU=1", "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC", + # As of icu 73 C++ nullptr, char16_t, override, final and noexcept are used + # instead of defines. These definitions can be removed when the bundled icu + # gets updated to 73. For more details, see: + # https://unicode-org.atlassian.net/browse/ICU-21833 and + # https://github.com/unicode-org/icu/commit/28643799377ecf654564f6f31854b02788cebe33 + "U_FINAL=final", + "U_NOEXCEPT=noexcept", + "U_OVERRIDE=override", + # U_EXPORT (defined in unicode/platform.h) is used to set public visibility # on classes through the U_COMMON_API and U_I18N_API macros (among others). # When linking against the system ICU library, we want its symbols to have +@@ -35,6 +44,18 @@ config("icu_config") { + # please see: https://crbug.com/822820 + "U_IMPORT=U_EXPORT", + ] ++ ++ _icu_version = exec_script(pkg_config_script, ++ common_pkg_config_args + pkg_config_args + [ ++ "icu-i18n", ++ "--version-as-components", ++ ], ++ "value") ++ ++ # Unbreak with icu 76 where private symbols are picked up ++ if (_icu_version[0] >= 76) { ++ defines += [ "U_HIDE_DRAFT_API" ] ++ } + } + + pkg_config("system_icui18n") { diff --git a/www/iridium/files/patch-cc_BUILD.gn b/www/iridium/files/patch-cc_BUILD.gn deleted file mode 100644 index 98ba4c987373..000000000000 --- a/www/iridium/files/patch-cc_BUILD.gn +++ /dev/null @@ -1,19 +0,0 @@ ---- cc/BUILD.gn.orig 2024-08-27 06:28:16 UTC -+++ cc/BUILD.gn -@@ -685,7 +685,7 @@ cc_test_static_library("test_support") { - if (enable_vulkan) { - deps += [ "//gpu/vulkan/init" ] - } -- if (!is_android) { -+ if (!is_android && !is_bsd) { - data_deps = [ "//third_party/mesa_headers" ] - } - if (skia_use_dawn) { -@@ -944,7 +944,6 @@ cc_test("cc_unittests") { - data = [ "//components/test/data/viz/" ] - data_deps = [ - "//testing/buildbot/filters:cc_unittests_filters", -- "//third_party/mesa_headers", - ] - - if (is_android && enable_chrome_android_internal) { diff --git a/www/iridium/files/patch-cc_base_features.cc b/www/iridium/files/patch-cc_base_features.cc index 9b8f9e28ce4f..e359d56f112d 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 2024-08-27 06:28:16 UTC +--- cc/base/features.cc.orig 2024-11-04 08:56:03 UTC +++ cc/base/features.cc -@@ -85,7 +85,7 @@ const base::FeatureParam kDeferImplInvalidationFr +@@ -78,7 +78,7 @@ const base::FeatureParam kDeferImplInvalidationFr // be using a separate flag to control the launch on GL. BASE_FEATURE(kUseDMSAAForTiles, "UseDMSAAForTiles", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-chrome_app_chrome__main.cc b/www/iridium/files/patch-chrome_app_chrome__main.cc index fc4bb8a93a08..8c2d14e92283 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 2024-08-27 06:28:16 UTC +--- chrome/app/chrome_main.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/app/chrome_main.cc @@ -30,11 +30,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 @@ -55,7 +55,7 @@ #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #define ENABLE_OLD_HEADLESS #endif -@@ -119,7 +119,7 @@ int ChromeMain(int argc, const char** argv) { +@@ -120,7 +120,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 -@@ -185,7 +185,7 @@ int ChromeMain(int argc, const char** argv) { +@@ -186,7 +186,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 1ee11d974f3d..e8930c26b195 100644 --- a/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc +++ b/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc @@ -1,152 +1,147 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/app/chrome_main_delegate.cc -@@ -139,7 +139,7 @@ +@@ -145,7 +145,7 @@ #include "components/about_ui/credit_utils.h" #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) #include "components/nacl/common/nacl_paths.h" #include "components/nacl/zygote/nacl_fork_delegate_linux.h" #endif -@@ -183,21 +183,21 @@ +@@ -189,17 +189,17 @@ #include "v8/include/v8.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/environment.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/nix/scoped_xdg_activation_token_injector.h" #include "ui/linux/display_server_utils.h" #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - #include "base/message_loop/message_pump_libevent.h" - #endif - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/policy_path_parser.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -341,7 +341,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -343,7 +343,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty // and resources loaded. bool SubprocessNeedsResourceBundle(const std::string& process_type) { return -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The zygote process opens the resources for the renderers. process_type == switches::kZygoteProcess || #endif -@@ -426,7 +426,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -428,7 +428,7 @@ bool HandleVersionSwitches(const base::CommandLine& co // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Show the man page if --help or -h is on the command line. void HandleHelpSwitches(const base::CommandLine& command_line) { if (command_line.HasSwitch(switches::kHelp) || -@@ -472,7 +472,7 @@ void SetCrashpadUploadConsentPostLogin() { +@@ -474,7 +474,7 @@ void SetCrashpadUploadConsentPostLogin() { } #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) void SIGTERMProfilingShutdown(int signal) { content::Profiling::Stop(); struct sigaction sigact; -@@ -554,7 +554,7 @@ std::optional AcquireProcessSingleton( +@@ -556,7 +556,7 @@ std::optional AcquireProcessSingleton( // process can be exited. ChromeProcessSingleton::CreateInstance(user_data_dir); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Read the xdg-activation token and set it in the command line for the // duration of the notification in order to ensure this is propagated to an // already running browser process if it exists. -@@ -638,7 +638,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -640,7 +640,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. -@@ -768,7 +768,7 @@ void RecordMainStartupMetrics(const StartupTimestamps& +@@ -770,7 +770,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( -@@ -962,7 +962,7 @@ std::optional ChromeMainDelegate::PostEarlyInitia +@@ -964,7 +964,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(); -@@ -1160,7 +1160,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv +@@ -1168,7 +1168,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv const bool is_canary_dev = IsCanaryDev(); const bool emit_crashes = #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) is_canary_dev; #else false; -@@ -1315,7 +1315,7 @@ std::optional ChromeMainDelegate::BasicStartupCom +@@ -1318,7 +1318,7 @@ std::optional ChromeMainDelegate::BasicStartupCom // TODO(crbug.com/40118868): Revisit the macro expression once build flag // switch of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // This will directly exit if the user asked for help. HandleHelpSwitches(command_line); #endif -@@ -1345,7 +1345,7 @@ std::optional ChromeMainDelegate::BasicStartupCom +@@ -1348,7 +1348,7 @@ std::optional ChromeMainDelegate::BasicStartupCom #if BUILDFLAG(IS_CHROMEOS) chromeos::dbus_paths::RegisterPathProvider(); #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) nacl::RegisterPathProvider(); #endif -@@ -1732,7 +1732,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1725,7 +1725,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)) { -@@ -1828,13 +1828,13 @@ absl::variant Chrome +@@ -1821,13 +1821,13 @@ absl::variant Chrome #else #if BUILDFLAG(IS_MAC) || (BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && \ - !BUILDFLAG(IS_CHROMEOS)) + !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD)) static const MainFunction kMainFunctions[] = { #if BUILDFLAG(IS_MAC) {switches::kRelauncherProcess, mac_relauncher::internal::RelauncherMain}, {switches::kCodeSignCloneCleanupProcess, code_sign_clone_manager::internal::ChromeCodeSignCloneCleanupMain}, -#elif BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // This entry is not needed on Linux, where the NaCl loader // process is launched via nacl_helper instead. {switches::kNaClLoaderProcess, NaClMain}, diff --git a/www/iridium/files/patch-chrome_browser_BUILD.gn b/www/iridium/files/patch-chrome_browser_BUILD.gn index 701bfb4a2864..898320be553e 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 2024-08-27 06:28:16 UTC +--- chrome/browser/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/BUILD.gn -@@ -7013,6 +7013,13 @@ static_library("browser") { +@@ -6905,6 +6905,13 @@ static_library("browser") { } } + if (is_bsd) { + sources -= [ + "metrics/bluetooth_metrics_provider.cc", + "metrics/bluetooth_metrics_provider.h", + ] + } + if (is_linux && use_dbus) { sources += [ "dbus_memory_pressure_evaluator_linux.cc", diff --git a/www/iridium/files/patch-chrome_browser_about__flags.cc b/www/iridium/files/patch-chrome_browser_about__flags.cc index 72ead8f3df18..dd15d0793c33 100644 --- a/www/iridium/files/patch-chrome_browser_about__flags.cc +++ b/www/iridium/files/patch-chrome_browser_about__flags.cc @@ -1,293 +1,292 @@ ---- chrome/browser/about_flags.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/about_flags.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/about_flags.cc -@@ -238,7 +238,7 @@ +@@ -244,7 +244,7 @@ #include "ui/ui_features.h" #include "url/url_features.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/allocator/buildflags.h" #endif -@@ -332,7 +332,7 @@ +@@ -337,7 +337,7 @@ #include "device/vr/public/cpp/features.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -@@ -341,7 +341,7 @@ +@@ -346,7 +346,7 @@ #include "chrome/browser/win/mica_titlebar.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/profile_management/profile_management_features.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -351,7 +351,7 @@ +@@ -356,7 +356,7 @@ #include "components/user_education/common/user_education_features.h" // nogncheck #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/ui_features.h" #include "ui/base/ui_base_features.h" #endif -@@ -493,7 +493,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap +@@ -498,7 +498,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap {"Max 3 Frames", &kDXGIWaitableSwapChain3Frames, 1, nullptr}}; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const FeatureEntry::Choice kOzonePlatformHintRuntimeChoices[] = { {flag_descriptions::kOzonePlatformHintChoiceDefault, "", ""}, {flag_descriptions::kOzonePlatformHintChoiceAuto, -@@ -893,6 +893,26 @@ const FeatureEntry::FeatureVariation +@@ -775,6 +775,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[] = { -@@ -1306,7 +1326,7 @@ const FeatureEntry::FeatureVariation kPageContentAnnot +@@ -1188,7 +1208,7 @@ const FeatureEntry::FeatureVariation kPageContentAnnot }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kHistoryEmbeddingsAtKeywordAcceleration[]{ {"AtKeywordAcceleration", "true"}, }; -@@ -1350,7 +1370,7 @@ const FeatureEntry::FeatureVariation +@@ -1232,7 +1252,7 @@ const FeatureEntry::FeatureVariation }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kShortcutBoostSingleUrl[] = { {"ShortcutBoostSearchScore", "0"}, {"ShortcutBoostNonTopHitThreshold", "0"}, -@@ -3779,7 +3799,7 @@ const flags_ui::FeatureEntry::FeatureVariation +@@ -3678,7 +3698,7 @@ const flags_ui::FeatureEntry::FeatureVariation }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const flags_ui::FeatureEntry::FeatureParam - kDesktopPWAsLinkCapturingDefaultOn[] = { - {"link_capturing_state", "on_by_default"}}; -@@ -4858,7 +4878,7 @@ const FeatureEntry kFeatureEntries[] = { + const flags_ui::FeatureEntry::FeatureParam kPwaNavigationCapturingDefaultOn[] = + {{"link_capturing_state", "on_by_default"}}; + const flags_ui::FeatureEntry::FeatureParam kPwaNavigationCapturingDefaultOff[] = +@@ -4920,7 +4940,7 @@ const FeatureEntry kFeatureEntries[] = { }, - #endif // BUILDFLAG(IS_ANDROID) + #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, -@@ -5277,7 +5297,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5332,7 +5352,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kWebAppUniversalInstallDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kWebAppUniversalInstall)}, #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"shortcuts-not-apps", flag_descriptions::kShortcutsNotAppsName, flag_descriptions::kShortcutsNotAppsDescription, kOsMac | kOsWin | kOsLinux, -@@ -5413,7 +5433,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5487,7 +5507,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWebShare)}, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"pulseaudio-loopback-for-cast", flag_descriptions::kPulseaudioLoopbackForCastName, flag_descriptions::kPulseaudioLoopbackForCastDescription, kOsLinux, -@@ -5436,9 +5456,19 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kWaylandPerWindowScalingName, - flag_descriptions::kWaylandPerWindowScalingDescription, kOsLinux, - FEATURE_VALUE_TYPE(features::kWaylandPerSurfaceScale)}, -+ +@@ -5514,9 +5534,18 @@ const FeatureEntry kFeatureEntries[] = { + {"wayland-text-input-v3", flag_descriptions::kWaylandTextInputV3Name, + flag_descriptions::kWaylandTextInputV3Description, kOsLinux, + FEATURE_VALUE_TYPE(features::kWaylandTextInputV3)}, +#if BUILDFLAG(IS_BSD) + {"audio-backend", + flag_descriptions::kAudioBackendName, + flag_descriptions::kAudioBackendDescription, kOsLinux, + FEATURE_WITH_PARAMS_VALUE_TYPE( + media::kAudioBackend, + kAudioBackendVariations, + "AudioBackend")}, +#endif #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"skip-undecryptable-passwords", flag_descriptions::kSkipUndecryptablePasswordsName, flag_descriptions::kSkipUndecryptablePasswordsDescription, -@@ -6433,7 +6463,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6465,7 +6494,7 @@ const FeatureEntry kFeatureEntries[] = { "MlUrlScoring")}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"omnibox-domain-suggestions", flag_descriptions::kOmniboxDomainSuggestionsName, flag_descriptions::kOmniboxDomainSuggestionsDescription, kOsDesktop, -@@ -6728,7 +6758,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6752,7 +6781,7 @@ const FeatureEntry kFeatureEntries[] = { "OrganicRepeatableQueries")}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"history-embeddings", flag_descriptions::kHistoryEmbeddingsName, flag_descriptions::kHistoryEmbeddingsDescription, kOsDesktop, FEATURE_WITH_PARAMS_VALUE_TYPE(history_embeddings::kHistoryEmbeddings, -@@ -7397,7 +7427,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7341,7 +7370,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(printing::features::kAddPrinterViaPrintscanmgr)}, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"cups-ipp-printing-backend", flag_descriptions::kCupsIppPrintingBackendName, flag_descriptions::kCupsIppPrintingBackendDescription, kOsDesktop, -@@ -8417,7 +8447,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8326,7 +8355,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kCooperativeSchedulingDescription, kOsAll, FEATURE_VALUE_TYPE(features::kCooperativeScheduling)}, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"enable-network-service-sandbox", flag_descriptions::kEnableNetworkServiceSandboxName, flag_descriptions::kEnableNetworkServiceSandboxDescription, -@@ -8441,7 +8471,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8350,7 +8379,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(media::kV4L2FlatStatefulVideoDecoder)}, #endif -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"enable-family-link-extensions-permissions", flag_descriptions:: kEnableExtensionsPermissionsForSupervisedUsersOnDesktopName, -@@ -9292,7 +9322,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9184,7 +9213,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(ash::features::kWallpaperPerDesk)}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"enable-get-all-screens-media", flag_descriptions::kGetAllScreensMediaName, flag_descriptions::kGetAllScreensMediaDescription, kOsCrOS | kOsLacros | kOsLinux, -@@ -9331,7 +9361,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9217,7 +9246,7 @@ const FeatureEntry kFeatureEntries[] = { #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { "ui-debug-tools", flag_descriptions::kUIDebugToolsName, -@@ -9556,7 +9586,7 @@ const FeatureEntry kFeatureEntries[] = { - #endif - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - {"policy-indication-for-managed-default-search", - flag_descriptions::kPolicyIndicationForManagedDefaultSearchName, - flag_descriptions::kPolicyIndicationForManagedDefaultSearchDescription, -@@ -9896,7 +9926,7 @@ const FeatureEntry kFeatureEntries[] = { - #endif +@@ -9745,7 +9774,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(features::kRenderPassDrawnRect)}, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"media-session-enter-picture-in-picture", flag_descriptions::kMediaSessionEnterPictureInPictureName, flag_descriptions::kMediaSessionEnterPictureInPictureDescription, -@@ -10796,7 +10826,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10592,7 +10621,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), -@@ -10834,7 +10864,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10630,7 +10659,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kSiteInstanceGroupsForDataUrls)}, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"site-search-settings-policy", flag_descriptions::kSiteSearchSettingsPolicyName, flag_descriptions::kSiteSearchSettingsPolicyDescription, kOsAll, -@@ -10959,7 +10989,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10759,7 +10788,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kHideIncognitoMediaMetadataDescription, kOsAll, FEATURE_VALUE_TYPE(media::kHideIncognitoMediaMetadata)}, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"third-party-profile-management", flag_descriptions::kThirdPartyProfileManagementName, flag_descriptions::kThirdPartyProfileManagementDescription, -@@ -11002,7 +11032,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10801,7 +10830,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-link-capturing-pwa", - flag_descriptions::kDesktopPWAsUserLinkCapturingName, - flag_descriptions::kDesktopPWAsUserLinkCapturingDescription, -@@ -11318,7 +11348,7 @@ const FeatureEntry kFeatureEntries[] = { - trusted_vault::kTrustedVaultFrequentDegradedRecoverabilityPolling)}, - #endif - --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - {"restart-to-gain-access-to-keychain", - flag_descriptions::kRestartToGainAccessToKeychainName, - flag_descriptions::kRestartToGainAccessToKeychainDescription, -@@ -11981,7 +12011,7 @@ const FeatureEntry kFeatureEntries[] = { + {"enable-user-navigation-capturing-pwa", + flag_descriptions::kPwaNavigationCapturingName, + flag_descriptions::kPwaNavigationCapturingDescription, +@@ -11726,7 +11755,7 @@ const FeatureEntry kFeatureEntries[] = { kAuthenticateUsingUserConsentVerifierInteropApi)}, #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"sync-enable-bookmarks-in-transport-mode", flag_descriptions::kSyncEnableBookmarksInTransportModeName, flag_descriptions::kSyncEnableBookmarksInTransportModeDescription, -@@ -12007,7 +12037,7 @@ const FeatureEntry kFeatureEntries[] = { - "AutofillUploadCardRequestTimeout")}, +@@ -11816,7 +11845,7 @@ const FeatureEntry kFeatureEntries[] = { + #endif + + #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + {"classify-url-on-process-response-event", + flag_descriptions::kClassifyUrlOnProcessResponseEventName, + flag_descriptions::kClassifyUrlOnProcessResponseEventDescription, +@@ -11825,7 +11854,7 @@ const FeatureEntry kFeatureEntries[] = { + #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - {"autofill-enable-amount-extraction-desktop", - flag_descriptions::kAutofillEnableAmountExtractionDesktopName, - flag_descriptions::kAutofillEnableAmountExtractionDesktopDescription, + {"tab-organization", flag_descriptions::kTabOrganizationName, + flag_descriptions::kTabOrganizationDescription, kOsDesktop, + FEATURE_VALUE_TYPE(features::kTabOrganization)}, +@@ -11864,7 +11893,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kLanguageDetectionAPIDescription, kOsAll, + FEATURE_VALUE_TYPE(blink::features::kLanguageDetectionAPI)}, + +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + {"supervised-profile-hide-guest", + flag_descriptions::kSupervisedProfileHideGuestName, + flag_descriptions::kSupervisedProfileHideGuestDescription, diff --git a/www/iridium/files/patch-chrome_browser_browser__features.cc b/www/iridium/files/patch-chrome_browser_browser__features.cc index 2ac648b06eee..8148eb8796c8 100644 --- a/www/iridium/files/patch-chrome_browser_browser__features.cc +++ b/www/iridium/files/patch-chrome_browser_browser__features.cc @@ -1,20 +1,38 @@ ---- chrome/browser/browser_features.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/browser_features.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/browser_features.cc -@@ -69,7 +69,7 @@ BASE_FEATURE(kClosedTabCache, +@@ -71,7 +71,7 @@ BASE_FEATURE(kClosedTabCache, + "ClosedTabCache", + base::FEATURE_DISABLED_BY_DEFAULT); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Enables usage of os_crypt_async::SecretPortalKeyProvider. Once + // `kSecretPortalKeyProviderUseForEncryption` is enabled, this flag cannot be + // disabled without losing data. +@@ -87,7 +87,7 @@ BASE_FEATURE(kDbusSecretPortal, BASE_FEATURE(kDestroyProfileOnBrowserClose, "DestroyProfileOnBrowserClose", #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); -@@ -316,7 +316,7 @@ BASE_FEATURE(kSandboxExternalProtocolBlockedWarning, +@@ -347,7 +347,7 @@ BASE_FEATURE(kSandboxExternalProtocolBlockedWarning, + "SandboxExternalProtocolBlockedWarning", + base::FEATURE_ENABLED_BY_DEFAULT); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // If true, encrypt new data with the key provided by SecretPortalKeyProvider. + // Otherwise, it will only decrypt existing data. + BASE_FEATURE(kSecretPortalKeyProviderUseForEncryption, +@@ -360,7 +360,7 @@ BASE_FEATURE(kSecretPortalKeyProviderUseForEncryption, BASE_FEATURE(kSupportSearchSuggestionForPrerender2, "SupportSearchSuggestionForPrerender2", #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/www/iridium/files/patch-chrome_browser_browser__features.h b/www/iridium/files/patch-chrome_browser_browser__features.h new file mode 100644 index 000000000000..357561724b8f --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_browser__features.h @@ -0,0 +1,20 @@ +--- chrome/browser/browser_features.h.orig 2024-11-04 08:56:03 UTC ++++ chrome/browser/browser_features.h +@@ -29,7 +29,7 @@ BASE_DECLARE_FEATURE(kCertificateTransparencyAskBefore + BASE_DECLARE_FEATURE(kCertVerificationNetworkTime); + BASE_DECLARE_FEATURE(kClosedTabCache); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + BASE_DECLARE_FEATURE(kDbusSecretPortal); + #endif + +@@ -143,7 +143,7 @@ BASE_DECLARE_FEATURE(kRestartNetworkServiceUnsandboxed + BASE_DECLARE_FEATURE(kSandboxExternalProtocolBlocked); + BASE_DECLARE_FEATURE(kSandboxExternalProtocolBlockedWarning); + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + BASE_DECLARE_FEATURE(kSecretPortalKeyProviderUseForEncryption); + #endif + diff --git a/www/iridium/files/patch-chrome_browser_browser__process__impl.cc b/www/iridium/files/patch-chrome_browser_browser__process__impl.cc index 7b3c73b54863..6c05ec713f83 100644 --- a/www/iridium/files/patch-chrome_browser_browser__process__impl.cc +++ b/www/iridium/files/patch-chrome_browser_browser__process__impl.cc @@ -1,29 +1,56 @@ ---- chrome/browser/browser_process_impl.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/browser_process_impl.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/browser_process_impl.cc -@@ -227,7 +227,7 @@ +@@ -235,7 +235,7 @@ #include "chrome/browser/ui/profiles/profile_picker.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/error_reporting/chrome_js_error_report_processor.h" // nogncheck #endif -@@ -1277,7 +1277,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -256,7 +256,7 @@ + #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/browser_features.h" + #include "components/os_crypt/async/browser/secret_portal_key_provider.h" + #endif +@@ -1124,7 +1124,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 + } +@@ -1307,7 +1307,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { ApplyMetricsReportingPolicy(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ChromeJsErrorReportProcessor::Create(); #endif -@@ -1615,7 +1615,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1404,7 +1404,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { + } + #endif // BUILDFLAG(IS_WIN) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (base::FeatureList::IsEnabled(features::kDbusSecretPortal)) { + providers.emplace_back( + /*precedence=*/10u, +@@ -1655,7 +1655,7 @@ void BrowserProcessImpl::Unpin() { // Mac is currently not supported. // TODO(crbug.com/40118868): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) bool BrowserProcessImpl::IsRunningInBackground() const { // Check if browser is in the background. diff --git a/www/iridium/files/patch-chrome_browser_browser__process__impl.h b/www/iridium/files/patch-chrome_browser_browser__process__impl.h index af98f18c6d4f..c7b531a2703f 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 2024-06-25 12:08:48 UTC +--- chrome/browser/browser_process_impl.h.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/browser_process_impl.h -@@ -404,7 +404,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -405,7 +405,7 @@ class BrowserProcessImpl : public BrowserProcess, // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) base::RepeatingTimer autoupdate_timer_; // Gets called by autoupdate timer to see if browser needs restart and can be diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders.cc index 330993ff19ec..1bcd361c29b6 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,89 +1,97 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -133,12 +133,12 @@ +@@ -128,12 +128,12 @@ #endif // BUILDFLAG(FULL_SAFE_BROWSING) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/connectors_internals/connectors_internals.mojom.h" #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/app_settings/web_app_settings_ui.h" #include "ui/webui/resources/cr_components/app_management/app_management.mojom.h" #endif -@@ -226,7 +226,7 @@ +@@ -221,7 +221,7 @@ #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/companion/visual_query/visual_query_suggestions_service_factory.h" - #include "chrome/browser/ui/web_applications/sub_apps_service_impl.h" - #include "chrome/browser/ui/webui/discards/discards.mojom.h" -@@ -237,7 +237,7 @@ + #include "chrome/browser/screen_ai/screen_ai_service_router.h" + #include "chrome/browser/screen_ai/screen_ai_service_router_factory.h" +@@ -234,7 +234,7 @@ #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/whats_new/whats_new_ui.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -864,7 +864,7 @@ void BindScreen2xMainContentExtractor( - #endif +@@ -859,7 +859,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 BindVisualSuggestionsModelProvider( + void BindScreenAIAnnotator( content::RenderFrameHost* frame_host, - mojo::PendingReceiver< -@@ -1060,7 +1060,7 @@ void PopulateChromeFrameBinders( + mojo::PendingReceiver receiver) { +@@ -1083,7 +1083,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 -@@ -1158,7 +1158,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1179,7 +1179,7 @@ void PopulateChromeWebUIFrameBinders( DataSharingInternalsUI>(map); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< connectors_internals::mojom::PageHandler, enterprise_connectors::ConnectorsInternalsUI>(map); -@@ -1169,7 +1169,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1190,7 +1190,7 @@ void PopulateChromeWebUIFrameBinders( policy::DlpInternalsUI>(map); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map); #endif -@@ -1261,7 +1261,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1276,14 +1276,14 @@ void PopulateChromeWebUIFrameBinders( + page_image_service::mojom::PageImageServiceHandler, HistoryUI, + HistoryClustersSidePanelUI, NewTabPageUI, BookmarksSidePanelUI>(map); + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + RegisterWebUIControllerInterfaceBinder(map); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) RegisterWebUIControllerInterfaceBinder< browser_command::mojom::CommandHandlerFactory, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) WhatsNewUI, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) NewTabPageUI>(map); -@@ -1753,7 +1753,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1779,7 +1779,7 @@ void PopulateChromeWebUIFrameBinders( #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder(map); diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__main.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__main.cc index 2d93a7478abf..7e25621dfa2e 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__main.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__main.cc @@ -1,118 +1,118 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -251,15 +251,15 @@ +@@ -249,15 +249,15 @@ // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/first_run/upgrade_util_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/core/app/crashpad.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/nix/xdg_util.h" #endif -@@ -292,14 +292,14 @@ +@@ -290,14 +290,14 @@ // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" #include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h" #include "chrome/browser/profiles/profile_activity_metrics_recorder.h" #include "ui/base/pointer/touch_ui_controller.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/headless/headless_mode_metrics.h" // nogncheck #include "chrome/browser/headless/headless_mode_util.h" // nogncheck #include "components/headless/select_file_dialog/headless_select_file_dialog.h" -@@ -371,14 +371,14 @@ +@@ -369,14 +369,14 @@ #endif // BUILDFLAG(IS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER) #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "sql/database.h" #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) namespace { #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) constexpr base::FilePath::CharType kMediaHistoryDatabaseName[] = FILE_PATH_LITERAL("Media History"); -@@ -543,7 +543,7 @@ void ProcessSingletonNotificationCallbackImpl( +@@ -541,7 +541,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. -@@ -1109,7 +1109,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1118,7 +1118,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { browser_creator_->AddFirstRunTabs(master_prefs_->new_tabs); } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Create directory for user-level Native Messaging manifest files. This // makes it less likely that the directory will be created by third-party // software with incorrect owner or permission. See crbug.com/725513 . -@@ -1157,7 +1157,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1166,7 +1166,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::Initialize(); TouchModeStatsTracker::Initialize( -@@ -1344,7 +1344,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1362,7 +1362,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Delete the media history database if it still exists. // TODO(crbug.com/40177301): Remove this. base::ThreadPool::PostTask( -@@ -1393,7 +1393,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1411,7 +1411,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* *UrlLanguageHistogramFactory::GetForBrowserContext(profile)); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode()) { headless::ReportHeadlessActionMetrics(); } -@@ -1505,7 +1505,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( +@@ -1523,7 +1523,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( // In headless mode provide alternate SelectFileDialog factory overriding // any platform specific SelectFileDialog implementation that may have been // set. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode()) { headless::HeadlessSelectFileDialogFactory::SetUp(); } -@@ -2058,7 +2058,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat +@@ -2074,7 +2074,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat // Drop the request if headless mode is in effect or the request is from // a headless Chrome process. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode() || command_line.HasSwitch(switches::kHeadless)) { return false; diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__main__linux.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__main__linux.cc index d8e6001ed4d6..fd519c30e9f3 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,39 +1,39 @@ ---- chrome/browser/chrome_browser_main_linux.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/chrome_browser_main_linux.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/chrome_browser_main_linux.cc @@ -25,7 +25,7 @@ #include "device/bluetooth/dbus/bluez_dbus_thread_manager.h" #include "ui/base/l10n/l10n_util.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/ozone/public/ozone_platform.h" #endif @@ -84,7 +84,9 @@ void ChromeBrowserMainPartsLinux::PostCreateMainMessag #endif // BUILDFLAG(IS_CHROMEOS) #if !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_BSD) bluez::BluezDBusManager::Initialize(nullptr /* system_bus */); +#endif // Set up crypt config. This needs to be done before anything starts the // network service, as the raw encryption key needs to be shared with the @@ -110,7 +112,7 @@ void ChromeBrowserMainPartsLinux::PostCreateMainMessag ChromeBrowserMainPartsPosix::PostCreateMainMessageLoop(); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() { ChromeBrowserMainPartsPosix::PostMainMessageLoopRun(); ui::OzonePlatform::GetInstance()->PostMainMessageLoopRun(); -@@ -169,7 +171,7 @@ void ChromeBrowserMainPartsLinux::CheckIfSanitizeCompl +@@ -170,7 +172,7 @@ void ChromeBrowserMainPartsLinux::CheckIfSanitizeCompl #endif // BUILDFLAG(IS_CHROMEOS_ASH) 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__content__browser__client.cc b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc index 110cd159d7d0..eefb221f452c 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,161 +1,171 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -477,7 +477,7 @@ +@@ -491,7 +491,7 @@ #include "storage/browser/file_system/external_mount_points.h" // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_linux.h" #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" #elif BUILDFLAG(IS_ANDROID) -@@ -593,12 +593,12 @@ +@@ -608,12 +608,12 @@ // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/core/app/crash_switches.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -609,7 +609,7 @@ +@@ -624,7 +624,7 @@ #include "chrome/browser/apps/link_capturing/web_app_link_capturing_delegate.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.h" #include "chrome/browser/enterprise/profile_management/oidc_auth_response_capture_navigation_throttle.h" #include "chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.h" -@@ -617,7 +617,7 @@ +@@ -632,7 +632,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -632,7 +632,7 @@ +@@ -647,7 +647,7 @@ #include "chrome/browser/ui/views/lens/lens_side_panel_navigation_helper.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_extra_parts_linux.h" #elif BUILDFLAG(IS_OZONE) #include "chrome/browser/chrome_browser_main_extra_parts_ozone.h" -@@ -1572,7 +1572,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre +@@ -1603,7 +1603,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre #if BUILDFLAG(IS_CHROMEOS) registry->RegisterBooleanPref(prefs::kNativeClientForceAllowed, false); #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOutOfProcessSystemDnsResolutionEnabled, true); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) -@@ -1772,7 +1772,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1803,7 +1803,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo #elif BUILDFLAG(IS_CHROMEOS_LACROS) main_parts = std::make_unique( is_integration_test, &startup_data_); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) main_parts = std::make_unique( is_integration_test, &startup_data_); #elif BUILDFLAG(IS_ANDROID) -@@ -1806,7 +1806,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1837,7 +1837,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo std::make_unique()); // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) main_parts->AddParts( std::make_unique()); #else -@@ -1827,7 +1827,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1858,7 +1858,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()); -@@ -1846,7 +1846,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1877,7 +1877,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo chrome::AddMetricsExtraParts(main_parts.get()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) main_parts->AddParts( std::make_unique< - chrome::enterprise_util::ChromeBrowserMainExtraPartsEnterprise>()); -@@ -2708,7 +2708,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin + enterprise_util::ChromeBrowserMainExtraPartsEnterprise>()); +@@ -2749,7 +2749,9 @@ void MaybeAppendBlinkSettingsSwitchForFieldTrial( + void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( + base::CommandLine* command_line, + int child_process_id) { ++#ifdef notyet + crash_keys::AppendStringAnnotationsCommandLineSwitch(command_line); ++#endif + #if BUILDFLAG(IS_MAC) + std::unique_ptr client_info = + GoogleUpdateSettings::LoadMetricsClientInfo(); +@@ -2758,7 +2760,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( -@@ -3060,7 +3060,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -3117,7 +3119,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && !BUILDFLAG(IS_BSD) // Opt into a hardened stack canary mitigation if it hasn't already been // force-disabled. if (!browser_command_line.HasSwitch(switches::kChangeStackGuardOnFork)) { -@@ -4888,7 +4888,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4941,7 +4943,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, -@@ -5479,7 +5479,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5530,7 +5532,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati &throttles); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) MaybeAddThrottle( WebAppSettingsNavigationThrottle::MaybeCreateThrottleFor(handle), &throttles); -@@ -5493,7 +5493,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5544,7 +5546,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) MaybeAddThrottle(enterprise_connectors::DeviceTrustNavigationThrottle:: MaybeCreateThrottleFor(handle), &throttles); -@@ -5532,7 +5532,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5583,7 +5585,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati handle)); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MaybeAddThrottle(browser_switcher::BrowserSwitcherNavigationThrottle:: MaybeCreateThrottleFor(handle), &throttles); -@@ -7442,7 +7442,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS +@@ -7543,7 +7545,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS bool ChromeContentBrowserClient::ShouldRunOutOfProcessSystemDnsResolution() { // This enterprise policy is supported on Android, but the feature will not be // launched there. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // This is possibly called before `g_browser_process` is initialized. PrefService* local_state; if (g_browser_process) { diff --git a/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.h b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.h index 8faaa5c083c3..4917f6a15caf 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 2024-08-27 06:28:16 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -523,7 +523,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -525,7 +525,7 @@ class ChromeContentBrowserClient : public content::Con bool IsPluginAllowedToUseDevChannelAPIs( content::BrowserContext* browser_context, const GURL& url) override; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, diff --git a/www/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 d6457d35c931..7c50bf9323e9 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 2024-08-27 06:28:16 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1753,7 +1753,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1796,7 +1796,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(); } -@@ -1901,7 +1901,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -1942,7 +1942,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()) { -@@ -1979,7 +1979,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl +@@ -2020,7 +2020,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) std::optional settings = safe_browsing::DeepScanningRequest::ShouldUploadBinary(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 bd6d75568945..c93633280735 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 2024-06-25 12:08:48 UTC +--- chrome/browser/download/download_commands.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/download/download_commands.cc @@ -26,7 +26,7 @@ #include "ui/base/clipboard/scoped_clipboard_writer.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" -@@ -167,7 +167,7 @@ void DownloadCommands::ExecuteCommand(Command command) +@@ -166,7 +166,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__item__model.cc b/www/iridium/files/patch-chrome_browser_download_download__item__model.cc index f584e9a54681..d0573e7cd78a 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 2024-08-27 06:28:16 UTC +--- chrome/browser/download/download_item_model.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/download/download_item_model.cc -@@ -814,7 +814,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -790,7 +790,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(); -@@ -862,7 +862,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand +@@ -838,7 +838,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); -@@ -1260,7 +1260,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1227,7 +1227,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 8ee5b0411525..08ea27fbeb6d 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 2024-06-25 12:08:48 UTC +--- chrome/browser/download/download_prefs.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/download/download_prefs.cc @@ -11,6 +11,7 @@ #include #include "base/check.h" +#include "base/command_line.h" #include "base/feature_list.h" #include "base/files/file_util.h" #include "base/functional/bind.h" -@@ -64,6 +65,10 @@ +@@ -60,6 +61,10 @@ #include "chrome/browser/flags/android/chrome_feature_list.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; -@@ -74,7 +79,7 @@ namespace { +@@ -70,7 +75,7 @@ namespace { // Consider downloads 'dangerous' if they go to the home directory on Linux and // to the desktop on any platform. bool DownloadPathIsDangerous(const base::FilePath& download_path) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath home_dir = base::GetHomeDir(); if (download_path == home_dir) { return true; -@@ -180,7 +185,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi +@@ -176,7 +181,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) should_open_pdf_in_system_reader_ = prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader); #endif -@@ -304,7 +309,7 @@ void DownloadPrefs::RegisterProfilePrefs( +@@ -300,7 +305,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) -@@ -469,7 +474,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens +@@ -467,7 +472,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; -@@ -501,7 +506,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons +@@ -493,7 +498,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(); -@@ -538,7 +543,7 @@ void DownloadPrefs::SaveAutoOpenState() { +@@ -530,7 +535,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; -@@ -690,7 +695,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa +@@ -682,7 +687,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_enterprise_connectors_analysis_analysis__service__settings.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_analysis_analysis__service__settings.cc index 2cfe334ebcc2..6696a87c816c 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 2024-06-25 12:08:48 UTC +--- chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/enterprise/connectors/analysis/analysis_service_settings.cc -@@ -151,7 +151,7 @@ AnalysisServiceSettings::AnalysisServiceSettings( +@@ -150,7 +150,7 @@ AnalysisServiceSettings::AnalysisServiceSettings( const char* verification_key = kKeyWindowsVerification; #elif BUILDFLAG(IS_MAC) const char* verification_key = kKeyMacVerification; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char* verification_key = kKeyLinuxVerification; #endif diff --git a/www/iridium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_deep__scanning__utils.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_common.cc similarity index 62% rename from www/iridium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_deep__scanning__utils.cc rename to www/iridium/files/patch-chrome_browser_enterprise_connectors_common.cc index b4de97a9e007..4e05586b7cb8 100644 --- a/www/iridium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_deep__scanning__utils.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_common.cc @@ -1,20 +1,20 @@ ---- chrome/browser/safe_browsing/cloud_content_scanning/deep_scanning_utils.cc.orig 2024-08-01 05:47:53 UTC -+++ chrome/browser/safe_browsing/cloud_content_scanning/deep_scanning_utils.cc -@@ -16,7 +16,7 @@ - #include "components/crash/core/common/crash_key.h" - #include "components/signin/public/identity_manager/identity_manager.h" +--- chrome/browser/enterprise/connectors/common.cc.orig 2024-11-04 08:56:03 UTC ++++ chrome/browser/enterprise/connectors/common.cc +@@ -23,7 +23,7 @@ + #include "components/policy/core/common/policy_loader_lacros.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 -@@ -416,7 +416,7 @@ std::string GetProfileEmail(Profile* profile) { +@@ -266,7 +266,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 876fdd40f89c..0245a0fe718c 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 2024-08-27 06:28:16 UTC +--- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/enterprise/connectors/connectors_service.cc -@@ -570,7 +570,7 @@ bool ConnectorsService::ConnectorsEnabled() const { +@@ -528,7 +528,7 @@ bool ConnectorsService::ConnectorsEnabled() const { Profile* profile = Profile::FromBrowserContext(context_); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On desktop, the guest profile is actually the primary OTR profile of // the "regular" guest profile. The regular guest profile is never used // directly by users. Also, user are not able to create child OTR profiles diff --git a/www/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 d9f5008ada46..4f364b761eee 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 2024-06-25 12:08:48 UTC +--- chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc -@@ -14,7 +14,7 @@ +@@ -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" -@@ -47,7 +47,7 @@ std::unique_ptr KeyRotationCommand - scoped_refptr url_loader_factory) { +@@ -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) - return std::make_unique(url_loader_factory); + if (IsDTCKeyRotationUploadedBySharedAPI()) { 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 6bb791cd6db7..11d235c99317 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 2024-08-27 06:28:16 UTC +--- chrome/browser/enterprise/connectors/reporting/crash_reporting_context.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/enterprise/connectors/reporting/crash_reporting_context.cc -@@ -19,7 +19,7 @@ +@@ -20,7 +20,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 605783114780..81d0c1d82d09 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 2024-08-01 05:47:53 UTC +--- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc -@@ -58,7 +58,7 @@ +@@ -59,7 +59,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" -@@ -133,7 +133,7 @@ void UploadSecurityEventReport(base::Value::Dict event - std::move(upload_callback)); +@@ -144,7 +144,7 @@ void UploadSecurityEventReport(base::Value::Dict event + std::move(report), std::move(upload_callback)); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void PopulateSignals(base::Value::Dict event, policy::CloudPolicyClient* client, std::string name, @@ -421,7 +421,7 @@ void RealtimeReportingClient::ReportPastEvent(const st /*include_profile_user_name=*/false); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void AddCrowdstrikeSignalsToEvent( base::Value::Dict& event, @@ -480,7 +480,7 @@ void RealtimeReportingClient::ReportEventWithTimestamp if (include_profile_user_name) { event.Set(kKeyProfileUserName, GetProfileUserName()); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context_); device_signals::SignalsAggregator* signals_aggregator = enterprise_signals::SignalsAggregatorFactory::GetForProfile(profile); -@@ -505,7 +505,7 @@ std::string RealtimeReportingClient::GetProfileUserNam - ? safe_browsing::GetProfileEmail(identity_manager_) - : std::string(); +@@ -504,7 +504,7 @@ std::string RealtimeReportingClient::GetProfileUserNam + std::string 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); 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 b413ec5ff310..ff81fb15a772 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,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.h.orig 2023-10-21 11:51:27 UTC +--- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.h.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.h -@@ -16,7 +16,7 @@ +@@ -17,7 +17,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 -@@ -184,7 +184,7 @@ class RealtimeReportingClient : public KeyedService, +@@ -165,7 +165,7 @@ class RealtimeReportingClient : public KeyedService, 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_extensions_BUILD.gn b/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn index f0a452699919..3fe9de27de44 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 2024-08-27 06:28:16 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1513,6 +1513,10 @@ source_set("extensions") { +@@ -1499,6 +1499,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_service_discovery) { - sources += [ - "api/mdns/mdns_api.cc", + if (enable_pdf) { + deps += [ + "//chrome/browser/pdf", diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc b/www/iridium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc index 4703457c5243..30c6519d8d40 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2024-08-01 05:47:53 UTC +--- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc -@@ -44,7 +44,7 @@ +@@ -41,7 +41,7 @@ #include "pdf/buildflags.h" #include "printing/buildflags/buildflags.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h" #endif -@@ -120,7 +120,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt +@@ -117,7 +117,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt extensions::SettingsPrivateEventRouterFactory::GetInstance(); extensions::SettingsOverridesAPI::GetFactoryInstance(); extensions::SidePanelService::GetFactoryInstance(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extensions::SystemIndicatorManagerFactory::GetInstance(); #endif extensions::TabGroupsEventRouterFactory::GetInstance(); diff --git a/www/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 78ceec680d33..285aca4e82e3 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,38 +1,38 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2024-06-25 12:08:48 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc -@@ -33,7 +33,7 @@ +@@ -41,7 +41,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" -@@ -150,7 +150,7 @@ api::enterprise_reporting_private::ContextInfo ToConte +@@ -158,7 +158,7 @@ api::enterprise_reporting_private::ContextInfo ToConte return info; } -#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) { -@@ -211,7 +211,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: +@@ -220,7 +220,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: // getPersistentSecret -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) EnterpriseReportingPrivateGetPersistentSecretFunction:: EnterpriseReportingPrivateGetPersistentSecretFunction() = default; -@@ -637,7 +637,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: +@@ -646,7 +646,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_passwords__private_passwords__private__delegate__impl.cc b/www/iridium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc index 584d9f97073c..1605798abc32 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 2024-08-27 06:28:16 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -630,7 +630,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem +@@ -636,7 +636,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 51fa4b0c39ed..e0ce021ce089 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 2024-08-01 05:47:53 UTC +--- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc -@@ -284,7 +284,9 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor +@@ -288,7 +288,9 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor } else if (strcmp(os, "linux") == 0) { info->os = extensions::api::runtime::PlatformOs::kLinux; } else if (strcmp(os, "openbsd") == 0) { - info->os = extensions::api::runtime::PlatformOs::kOpenbsd; + info->os = extensions::api::runtime::PlatformOs::kLinux; + } else if (strcmp(os, "freebsd") == 0) { + info->os = extensions::api::runtime::PlatformOs::kLinux; } else { NOTREACHED_IN_MIGRATION() << "Platform not supported: " << os; return false; 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 53003711e37e..ea4a6d6ccdb1 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,20 +1,29 @@ ---- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -205,7 +205,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -193,7 +193,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist + (*s_allowlist)[autofill::prefs::kAutofillPaymentCardBenefits] = + settings_api::PrefType::kBoolean; + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + (*s_allowlist)[autofill::prefs::kAutofillPredictionImprovementsEnabled] = + settings_api::PrefType::kBoolean; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || +@@ -211,7 +211,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 -@@ -217,7 +217,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -223,7 +223,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist (*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString; (*s_allowlist)[::prefs::kPinnedActions] = settings_api::PrefType::kList; (*s_allowlist)[::prefs::kPolicyThemeColor] = settings_api::PrefType::kNumber; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kSystemTheme] = settings_api::PrefType::kNumber; #endif (*s_allowlist)[::prefs::kHomePage] = settings_api::PrefType::kUrl; diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc b/www/iridium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc index df42620f10fc..5ee22a6040e6 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/tabs/tabs_api.cc.orig 2024-08-01 05:47:53 UTC +--- chrome/browser/extensions/api/tabs/tabs_api.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/extensions/api/tabs/tabs_api.cc -@@ -892,7 +892,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio +@@ -886,7 +886,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio // minimized. // TODO(crbug.com/40254339): Remove this workaround when linux is fixed. // TODO(crbug.com/40254339): Find a fix for wayland as well. -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) if (new_window->initial_show_state() == ui::SHOW_STATE_MINIMIZED) { new_window->window()->Minimize(); } 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 19f2667e4568..dbb1c27bebf0 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 2024-08-27 06:28:16 UTC +--- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/extensions/api/webstore_private/webstore_private_api.cc -@@ -910,7 +910,7 @@ void WebstorePrivateBeginInstallWithManifest3Function: +@@ -915,7 +915,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_external__provider__impl.cc b/www/iridium/files/patch-chrome_browser_extensions_external__provider__impl.cc index 0f8ae58e2663..4ab355651b32 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 2024-08-01 05:47:53 UTC +--- chrome/browser/extensions/external_provider_impl.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/extensions/external_provider_impl.cc -@@ -834,7 +834,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -816,7 +816,7 @@ void ExternalProviderImpl::CreateExternalProviders( if (!profile->GetPrefs()->GetBoolean(pref_names::kBlockExternalExtensions)) { // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) provider_list->push_back(std::make_unique( service, base::MakeRefCounted( -@@ -862,7 +862,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -844,7 +844,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_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 c9c516d1fb69..db5dec7160c1 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 2024-08-01 05:47:53 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -318,7 +318,7 @@ const struct { +@@ -324,7 +324,7 @@ const struct { FILE_PATH_LITERAL("Library/Mobile Documents/com~apple~CloudDocs"), kDontBlockChildren}, #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // On Linux also block access to devices via /dev. {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren}, // And security sensitive data in /proc and /sys. diff --git a/www/iridium/files/patch-chrome_browser_flag__descriptions.cc b/www/iridium/files/patch-chrome_browser_flag__descriptions.cc index 7b9fe56fc3a3..fbab32134acd 100644 --- a/www/iridium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/iridium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,128 +1,129 @@ ---- chrome/browser/flag_descriptions.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/flag_descriptions.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/flag_descriptions.cc -@@ -419,7 +419,7 @@ const char kIsolatedSandboxedIframesDescription[] = +@@ -458,7 +458,7 @@ const char kIsolatedSandboxedIframesDescription[] = "grouping when enabled is per-site."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kAutofillEnableAmountExtractionDesktopName[] = "Enable checkout amount extraction on Chrome desktop"; const char kAutofillEnableAmountExtractionDesktopDescription[] = -@@ -856,7 +856,7 @@ const char kDevicePostureDescription[] = +@@ -939,7 +939,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[] = -@@ -3050,7 +3050,7 @@ const char kCbdTimeframeRequiredDescription[] = - "value to the list."; - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - const char kPolicyIndicationForManagedDefaultSearchName[] = - "Enable policy indication for managed Default Search provider"; - const char kPolicyIndicationForManagedDefaultSearchDescription[] = -@@ -3385,7 +3385,7 @@ const char kShowAutofillTypePredictionsDescription[] = +@@ -3519,7 +3519,7 @@ const char kShowAutofillTypePredictionsDescription[] = "text."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kShowFeaturedEnterpriseSiteSearchName[] = "Show featured Enterprise site search engines in Omnibox"; const char kShowFeaturedEnterpriseSiteSearchDescription[] = -@@ -3422,7 +3422,7 @@ const char kSiteInstanceGroupsForDataUrlsDescription[] +@@ -3551,7 +3551,7 @@ const char kSiteInstanceGroupsForDataUrlsDescription[] "but in the same SiteInstanceGroup, and thus the same process."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kSiteSearchSettingsPolicyName[] = "Enable SiteSearchSettings policy"; const char kSiteSearchSettingsPolicyDescription[] = "Allow site search engines to be defined by the SiteSearchSettings policy."; -@@ -7869,7 +7869,7 @@ const char kLacrosMergeIcuDataFileDescription[] = - "Enables sharing common areas of icudtl.dat between Ash and Lacros."; +@@ -7912,7 +7912,7 @@ const char kBlinkExtensionDiagnosticsDescription[] = + "Enable the experimental Diagnostics Blink Extension."; #endif // #if BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kGetAllScreensMediaName[] = "GetAllScreensMedia API"; const char kGetAllScreensMediaDescription[] = "When enabled, the getAllScreensMedia API for capturing multiple screens " -@@ -8126,7 +8126,7 @@ const char kV4L2FlatStatefulVideoDecoderDescription[] +@@ -8148,7 +8148,7 @@ const char kV4L2FlatStatefulVideoDecoderDescription[] // Linux ----------------------------------------------------------------------- -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kOzonePlatformHintChoiceDefault[] = "Default"; const char kOzonePlatformHintChoiceAuto[] = "Auto"; const char kOzonePlatformHintChoiceX11[] = "X11"; -@@ -8156,6 +8156,18 @@ const char kSimplifiedTabDragUIDescription[] = - const char kWaylandPerWindowScalingName[] = "Wayland per-window scaling"; - const char kWaylandPerWindowScalingDescription[] = - "Enable Wayland's per-window scaling experimental support."; +@@ -8181,6 +8181,18 @@ const char kWaylandPerWindowScalingDescription[] = + const char kWaylandTextInputV3Name[] = "Wayland text-input-v3"; + const char kWaylandTextInputV3Description[] = + "Enable Wayland's text-input-v3 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) // All views-based platforms -------------------------------------------------- -@@ -8182,14 +8194,14 @@ const char kZeroCopyVideoCaptureDescription[] = +@@ -8207,7 +8219,7 @@ const char kZeroCopyVideoCaptureDescription[] = #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kFollowingFeedSidepanelName[] = "Following feed in the sidepanel"; const char kFollowingFeedSidepanelDescription[] = "Enables the following feed in the sidepanel."; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - // BUILDFLAG(IS_CHROMEOS) +@@ -8220,7 +8232,7 @@ const char kTaskManagerDesktopRefreshDescription[] = + "Enables a refreshed design for the Task Manager on Desktop platforms."; + #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kEnableNetworkServiceSandboxName[] = "Enable the network service sandbox."; const char kEnableNetworkServiceSandboxDescription[] = -@@ -8221,7 +8233,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -8252,7 +8264,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti "Bluetooth"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kSkipUndecryptablePasswordsName[] = "Skip undecryptable passwords to use the available decryptable " "passwords."; -@@ -8375,7 +8387,7 @@ const char kElementCaptureDescription[] = +@@ -8398,7 +8410,7 @@ const char kElementCaptureDescription[] = #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kUIDebugToolsName[] = "Debugging tools for UI"; const char kUIDebugToolsDescription[] = "Enables additional keyboard shortcuts to help debugging."; -@@ -8449,7 +8461,7 @@ const char kAutofillCaretExtractionDescription[] = +@@ -8472,7 +8484,7 @@ const char kAutofillCaretExtractionDescription[] = "Enables passing caret position via Autofill"; #endif // BUILDFLAG(ENABLE_COMPOSE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const char kThirdPartyProfileManagementName[] = "Third party profile management"; const char kThirdPartyProfileManagementDescription[] = +@@ -8561,7 +8573,7 @@ const char kEnableCertManagementV2UIDescription[] = + "chrome://settings/certificates"; + #endif // BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + const char kSupervisedProfileHideGuestName[] = "Supervised Profile Hide Guest"; + const char kSupervisedProfileHideGuestDescription[] = + "Hides Guest Profile entry points for supervised users"; diff --git a/www/iridium/files/patch-chrome_browser_flag__descriptions.h b/www/iridium/files/patch-chrome_browser_flag__descriptions.h index d565fbdeb6b4..16fbaeea3ffd 100644 --- a/www/iridium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/iridium/files/patch-chrome_browser_flag__descriptions.h @@ -1,118 +1,120 @@ ---- chrome/browser/flag_descriptions.h.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/flag_descriptions.h.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/flag_descriptions.h -@@ -273,7 +273,7 @@ extern const char kImageDescriptionsAlternateRoutingNa - extern const char kImageDescriptionsAlternateRoutingDescription[]; +@@ -297,7 +297,7 @@ extern const char kImprovedSigninUIOnDesktopName[]; + extern const char kImprovedSigninUIOnDesktopDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kAutofillEnableAmountExtractionDesktopName[]; extern const char kAutofillEnableAmountExtractionDesktopDescription[]; #endif -@@ -660,7 +660,7 @@ extern const char kDevicePostureName[]; +@@ -715,7 +715,7 @@ extern const char kDevicePostureName[]; extern const char kDevicePostureDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kDocumentPictureInPictureAnimateResizeName[]; extern const char kDocumentPictureInPictureAnimateResizeDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || -@@ -1764,7 +1764,7 @@ extern const char kCbdTimeframeRequiredName[]; - extern const char kCbdTimeframeRequiredDescription[]; - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - extern const char kPolicyIndicationForManagedDefaultSearchName[]; - extern const char kPolicyIndicationForManagedDefaultSearchDescription[]; - #endif -@@ -1958,7 +1958,7 @@ extern const char kShowAutofillTypePredictionsName[]; +@@ -2022,7 +2022,7 @@ extern const char kShowAutofillTypePredictionsName[]; extern const char kShowAutofillTypePredictionsDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kShowFeaturedEnterpriseSiteSearchName[]; extern const char kShowFeaturedEnterpriseSiteSearchDescription[]; -@@ -1980,7 +1980,7 @@ extern const char kSiteInstanceGroupsForDataUrlsName[] +@@ -2044,7 +2044,7 @@ extern const char kSiteInstanceGroupsForDataUrlsName[] extern const char kSiteInstanceGroupsForDataUrlsDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kSiteSearchSettingsPolicyName[]; extern const char kSiteSearchSettingsPolicyDescription[]; -@@ -4557,7 +4557,7 @@ extern const char kLacrosMergeIcuDataFileName[]; - extern const char kLacrosMergeIcuDataFileDescription[]; +@@ -4576,7 +4576,7 @@ extern const char kBlinkExtensionDiagnosticsName[]; + extern const char kBlinkExtensionDiagnosticsDescription[]; #endif // #if BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kGetAllScreensMediaName[]; extern const char kGetAllScreensMediaDescription[]; #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -4705,7 +4705,7 @@ extern const char kV4L2FlatStatefulVideoDecoderDescrip +@@ -4713,7 +4713,7 @@ extern const char kV4L2FlatStatefulVideoDecoderDescrip // Linux --------------------------------------------------------------------- -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kOzonePlatformHintChoiceDefault[]; extern const char kOzonePlatformHintChoiceAuto[]; extern const char kOzonePlatformHintChoiceX11[]; -@@ -4724,6 +4724,9 @@ extern const char kSimplifiedTabDragUIDescription[]; +@@ -4735,6 +4735,9 @@ extern const char kWaylandPerWindowScalingDescription[ - extern const char kWaylandPerWindowScalingName[]; - extern const char kWaylandPerWindowScalingDescription[]; + extern const char kWaylandTextInputV3Name[]; + extern const char kWaylandTextInputV3Description[]; + +extern const char kAudioBackendName[]; +extern const char kAudioBackendDescription[]; #endif // BUILDFLAG(IS_LINUX) // All views-based platforms -------------------------------------------------- -@@ -4753,7 +4756,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa +@@ -4764,7 +4767,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa extern const char kWebBluetoothConfirmPairingSupportDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kSkipUndecryptablePasswordsName[]; extern const char kSkipUndecryptablePasswordsDescription[]; -@@ -4772,13 +4775,13 @@ extern const char kScreenlockReauthPromoCardDescriptio +@@ -4780,7 +4783,7 @@ extern const char kScreenlockReauthPromoCardDescriptio #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kFollowingFeedSidepanelName[]; extern const char kFollowingFeedSidepanelDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - // BUILDFLAG(IS_CHROMEOS) +@@ -4791,7 +4794,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[]; -@@ -4877,7 +4880,7 @@ extern const char kElementCaptureDescription[]; +@@ -4888,7 +4891,7 @@ extern const char kElementCaptureDescription[]; #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kUIDebugToolsName[]; extern const char kUIDebugToolsDescription[]; #endif -@@ -4931,7 +4934,7 @@ extern const char kAutofillCaretExtractionName[]; +@@ -4942,7 +4945,7 @@ extern const char kAutofillCaretExtractionName[]; extern const char kAutofillCaretExtractionDescription[]; #endif // BUILDFLAG(ENABLE_COMPOSE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kThirdPartyProfileManagementName[]; extern const char kThirdPartyProfileManagementDescription[]; +@@ -4998,7 +5001,7 @@ extern const char kEnableCertManagementV2UIName[]; + extern const char kEnableCertManagementV2UIDescription[]; + #endif // BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + extern const char kSupervisedProfileHideGuestName[]; + extern const char kSupervisedProfileHideGuestDescription[]; + diff --git a/www/iridium/files/patch-chrome_browser_global__desktop__features.cc b/www/iridium/files/patch-chrome_browser_global__desktop__features.cc deleted file mode 100644 index c7370087a499..000000000000 --- a/www/iridium/files/patch-chrome_browser_global__desktop__features.cc +++ /dev/null @@ -1,19 +0,0 @@ ---- chrome/browser/global_desktop_features.cc.orig 2024-08-27 06:28:16 UTC -+++ chrome/browser/global_desktop_features.cc -@@ -45,14 +45,14 @@ void GlobalDesktopFeatures::ReplaceGlobalDesktopFeatur - } - - void GlobalDesktopFeatures::Init() { --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (user_education::features::IsWhatsNewV2()) { - whats_new_registry_ = CreateWhatsNewRegistry(); - } - #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 - GlobalDesktopFeatures::CreateWhatsNewRegistry() { - return whats_new::CreateWhatsNewRegistry(); diff --git a/www/iridium/files/patch-chrome_browser_global__features.cc b/www/iridium/files/patch-chrome_browser_global__features.cc new file mode 100644 index 000000000000..3e627f80f09b --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_global__features.cc @@ -0,0 +1,29 @@ +--- chrome/browser/global_features.cc.orig 2024-11-04 08:56:03 UTC ++++ chrome/browser/global_features.cc +@@ -10,7 +10,7 @@ + #include "build/build_config.h" + #include "chrome/browser/permissions/system/platform_handle.h" + +-#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 "components/user_education/common/user_education_features.h" // nogncheck +@@ -49,7 +49,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) + if (user_education::features::IsWhatsNewV2()) { + whats_new_registry_ = CreateWhatsNewRegistry(); + } +@@ -61,7 +61,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__desktop__features.h b/www/iridium/files/patch-chrome_browser_global__features.h similarity index 59% rename from www/iridium/files/patch-chrome_browser_global__desktop__features.h rename to www/iridium/files/patch-chrome_browser_global__features.h index 3c7f53eae79f..8e5c757b08cf 100644 --- a/www/iridium/files/patch-chrome_browser_global__desktop__features.h +++ b/www/iridium/files/patch-chrome_browser_global__features.h @@ -1,38 +1,38 @@ ---- chrome/browser/global_desktop_features.h.orig 2024-08-27 06:28:16 UTC -+++ chrome/browser/global_desktop_features.h -@@ -9,7 +9,7 @@ - #include "build/build_config.h" - +--- chrome/browser/global_features.h.orig 2024-11-04 08:56:03 UTC ++++ chrome/browser/global_features.h +@@ -14,7 +14,7 @@ namespace system_permission_settings { + class PlatformHandle; + } // namespace system_permission_settings namespace whats_new { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class WhatsNewRegistry; #endif } // namespace whats_new -@@ -37,7 +37,7 @@ class GlobalDesktopFeatures { - // Public accessors for features, e.g. - // FooFeature* foo_feature() { return foo_feature_.get(); } - +@@ -45,7 +45,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(); } -@@ -50,7 +50,7 @@ class GlobalDesktopFeatures { - // testing. e.g. - // virtual std::unique_ptr CreateFooFeature(); +@@ -60,7 +60,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 -@@ -58,7 +58,7 @@ class GlobalDesktopFeatures { - // Features will each have a controller. e.g. - // std::unique_ptr foo_feature_; +@@ -70,7 +70,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_media_router_discovery_discovery__network__list__posix.cc b/www/iridium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc index ff6c68f9647e..d42036a810cd 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 2022-03-28 18:11:04 UTC +--- chrome/browser/media/router/discovery/discovery_network_list_posix.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/media/router/discovery/discovery_network_list_posix.cc -@@ -5,11 +5,12 @@ +@@ -10,11 +10,12 @@ #include "chrome/browser/media/router/discovery/discovery_network_list.h" #include +#include +#include +#include #include #include #include -#include -#include #include -@@ -18,7 +19,7 @@ +@@ -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 -@@ -27,7 +28,7 @@ +@@ -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) -@@ -38,6 +39,12 @@ using sll = struct sockaddr_dl; +@@ -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_webrtc_webrtc__log__uploader.cc b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc index 8b414ec1966a..88c4ad64644e 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 2024-06-25 12:08:48 UTC +--- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/media/webrtc/webrtc_log_uploader.cc -@@ -101,7 +101,7 @@ std::string GetLogUploadProduct() { +@@ -106,7 +106,7 @@ std::string GetLogUploadProduct() { const char product[] = "Chrome_Mac"; // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #if !defined(ADDRESS_SANITIZER) const char product[] = "Chrome_Linux"; #else diff --git a/www/iridium/files/patch-chrome_browser_memory__details.cc b/www/iridium/files/patch-chrome_browser_memory__details.cc index 4653778fce48..9bd94ca5db71 100644 --- a/www/iridium/files/patch-chrome_browser_memory__details.cc +++ b/www/iridium/files/patch-chrome_browser_memory__details.cc @@ -1,20 +1,20 @@ ---- chrome/browser/memory_details.cc.orig 2024-06-25 12:08:48 UTC +--- chrome/browser/memory_details.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/memory_details.cc @@ -38,7 +38,7 @@ #include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h" #include "ui/base/l10n/l10n_util.h" -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) #include "content/public/browser/zygote_host/zygote_host_linux.h" #endif -@@ -334,7 +334,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() { +@@ -335,7 +335,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 f2b8cd314752..e39682011d18 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,55 +1,55 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2024-08-01 05:47:53 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -83,8 +83,10 @@ +@@ -88,8 +88,10 @@ // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) +#if !BUILDFLAG(IS_BSD) #include +#endif #include "base/linux_util.h" #include "base/strings/string_split.h" -@@ -108,7 +110,7 @@ +@@ -113,7 +115,7 @@ #include "chromeos/crosapi/cpp/crosapi_constants.h" #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/pressure/pressure_metrics_reporter.h" #endif // BUILDFLAG(IS_LINUX) -@@ -117,7 +119,7 @@ +@@ -122,7 +124,7 @@ #include "components/user_manager/user_manager.h" #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/power_metrics/system_power_monitor.h" #endif -@@ -864,7 +866,7 @@ void RecordStartupMetrics() { +@@ -869,7 +871,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, -@@ -1163,11 +1165,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt +@@ -1177,11 +1179,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt } #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) pressure_metrics_reporter_ = std::make_unique(); #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::trace_event::TraceLog::GetInstance()->AddEnabledStateObserver( power_metrics::SystemPowerMonitor::GetInstance()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/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 9ef53b999958..83c7e97c4aff 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,88 +1,88 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -196,11 +196,11 @@ +@@ -195,11 +195,11 @@ #include "chrome/notification_helper/notification_helper_constants.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/metrics/motherboard_metrics_provider.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) #include "chrome/browser/metrics/chrome_metrics_service_crash_reporter.h" #endif @@ -213,7 +213,7 @@ #include "chrome/browser/metrics/power/power_metrics_provider_mac.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/bluetooth_metrics_provider.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -535,7 +535,7 @@ void ChromeMetricsServiceClient::RegisterPrefs(PrefReg #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) metrics::structured::StructuredMetricsService::RegisterPrefs(registry); #if !BUILDFLAG(IS_CHROMEOS_ASH) @@ -707,7 +707,7 @@ void ChromeMetricsServiceClient::Initialize() { RegisterUKMProviders(); } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) metrics::structured::Recorder::GetInstance()->SetUiTaskRunner( base::SequencedTaskRunner::GetCurrentDefault()); #endif @@ -758,7 +758,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic metrics_service_->RegisterMetricsProvider( std::make_unique()); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) metrics_service_->RegisterMetricsProvider( std::make_unique()); #endif @@ -843,7 +843,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) metrics_service_->RegisterMetricsProvider( std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || -@@ -950,7 +950,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -951,7 +951,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) -@@ -1137,7 +1137,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1138,7 +1138,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) // This creates the DesktopProfileSessionDurationsServices if it didn't exist // already. metrics::DesktopProfileSessionDurationsServiceFactory::GetForBrowserContext( -@@ -1471,7 +1471,7 @@ void ChromeMetricsServiceClient::CreateStructuredMetri +@@ -1472,7 +1472,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_net_profile__network__context__service.cc b/www/iridium/files/patch-chrome_browser_net_profile__network__context__service.cc index 6191fba82e92..3208c0b89eae 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 2024-08-27 06:28:16 UTC +--- chrome/browser/net/profile_network_context_service.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/net/profile_network_context_service.cc @@ -140,7 +140,7 @@ #include "chromeos/startup/browser_params_proxy.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h" #include "components/enterprise/client_certificates/core/certificate_provisioning_service.h" #include "components/enterprise/client_certificates/core/client_certificates_service.h" @@ -260,7 +260,7 @@ void UpdateCookieSettings(Profile* profile, ContentSet }); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr GetWrappedCertStore( Profile* profile, std::unique_ptr platform_store) { -@@ -939,7 +939,7 @@ ProfileNetworkContextService::CreateClientCertStore() +@@ -986,7 +986,7 @@ ProfileNetworkContextService::CreateClientCertStore() store = std::make_unique( std::move(certificate_provider), cert_db_initializer, std::move(store)); #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return GetWrappedCertStore(profile_, std::move(store)); #else return store; diff --git a/www/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 9e161b3f9227..ffa4205b9b30 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,147 +1,147 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/net/system_network_context_manager.cc -@@ -96,7 +96,7 @@ +@@ -102,7 +102,7 @@ // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/common/chrome_paths_internal.h" #include "chrome/grit/branded_strings.h" #include "ui/base/l10n/l10n_util.h" -@@ -140,7 +140,7 @@ SystemNetworkContextManager* g_system_network_context_ +@@ -146,7 +146,7 @@ SystemNetworkContextManager* g_system_network_context_ // received a failed launch for a sandboxed network service. bool g_previously_failed_to_launch_sandboxed_service = false; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Whether kerberos library loading will work in the network service due to the // sandbox. bool g_network_service_will_allow_gssapi_library_load = false; -@@ -148,7 +148,7 @@ bool g_network_service_will_allow_gssapi_library_load +@@ -154,7 +154,7 @@ bool g_network_service_will_allow_gssapi_library_load const char* kGssapiDesiredPref = #if BUILDFLAG(IS_CHROMEOS) prefs::kKerberosEnabled; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) prefs::kReceivedHttpAuthNegotiateHeader; #endif #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -194,7 +194,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut +@@ -200,7 +200,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut auth_dynamic_params->basic_over_http_enabled = local_state->GetBoolean(prefs::kBasicAuthOverHttpEnabled); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) auth_dynamic_params->delegate_by_kdc_policy = local_state->GetBoolean(prefs::kAuthNegotiateDelegateByKdcPolicy); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -209,7 +209,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut +@@ -215,7 +215,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut local_state->GetString(prefs::kAuthAndroidNegotiateAccountType); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auth_dynamic_params->allow_gssapi_library_load = local_state->GetBoolean(kGssapiDesiredPref); #endif // BUILDFLAG(IS_CHROMEOS) -@@ -219,7 +219,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut +@@ -225,7 +225,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut void OnNewHttpAuthDynamicParams( network::mojom::HttpAuthDynamicParamsPtr& params) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The kerberos library is incompatible with the network service sandbox, so // if library loading is now enabled, the network service needs to be // restarted. It will be restarted unsandboxed because is -@@ -261,11 +261,11 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() +@@ -267,11 +267,11 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() if (g_previously_failed_to_launch_sandboxed_service) { return NetworkSandboxState::kDisabledBecauseOfFailedLaunch; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* local_state = g_browser_process->local_state(); #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The network service sandbox and the kerberos library are incompatible. // If kerberos is enabled by policy, disable the network service sandbox. if (g_network_service_will_allow_gssapi_library_load || -@@ -281,7 +281,7 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() +@@ -287,7 +287,7 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() } #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (local_state && local_state->HasPrefPath(prefs::kNetworkServiceSandboxEnabled)) { return local_state->GetBoolean(prefs::kNetworkServiceSandboxEnabled) -@@ -511,7 +511,7 @@ void SystemNetworkContextManager::DeleteInstance() { +@@ -517,7 +517,7 @@ void SystemNetworkContextManager::DeleteInstance() { g_system_network_context_manager = nullptr; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SystemNetworkContextManager::GssapiLibraryLoadObserver:: GssapiLibraryLoadObserver(SystemNetworkContextManager* owner) : owner_(owner) {} -@@ -569,7 +569,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -575,7 +575,7 @@ SystemNetworkContextManager::SystemNetworkContextManag pref_change_registrar_.Add(prefs::kAllHttpAuthSchemesAllowedForOrigins, auth_pref_callback); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) pref_change_registrar_.Add(prefs::kAuthNegotiateDelegateByKdcPolicy, auth_pref_callback); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -583,7 +583,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -589,7 +589,7 @@ SystemNetworkContextManager::SystemNetworkContextManag auth_pref_callback); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) pref_change_registrar_.Add(kGssapiDesiredPref, auth_pref_callback); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -653,7 +653,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -660,7 +660,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterBooleanPref(prefs::kKerberosEnabled, false); #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kAuthNegotiateDelegateByKdcPolicy, false); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -678,11 +678,11 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -685,11 +685,11 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterListPref(prefs::kExplicitlyAllowedNetworkPorts); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kNetworkServiceSandboxEnabled, true); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kReceivedHttpAuthNegotiateHeader, false); #endif // BUILDFLAG(IS_LINUX) -@@ -735,7 +735,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea +@@ -742,7 +742,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea OnNewHttpAuthDynamicParams(http_auth_dynamic_params); network_service->ConfigureHttpAuthPrefs(std::move(http_auth_dynamic_params)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gssapi_library_loader_observer_.Install(network_service); #endif // BUILDFLAG(IS_LINUX) -@@ -950,7 +950,7 @@ bool SystemNetworkContextManager::IsNetworkSandboxEnab +@@ -969,7 +969,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 71c379be51cc..e9c3b73704e8 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 2024-08-27 06:28:16 UTC +--- chrome/browser/net/system_network_context_manager.h.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/net/system_network_context_manager.h -@@ -197,7 +197,7 @@ class SystemNetworkContextManager { +@@ -198,7 +198,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: -@@ -278,7 +278,7 @@ class SystemNetworkContextManager { +@@ -279,7 +279,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 055e1d1d5528..e0296e418187 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 2024-06-25 12:08:48 UTC +--- chrome/browser/new_tab_page/modules/file_suggestion/drive_service.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/new_tab_page/modules/file_suggestion/drive_service.cc -@@ -32,7 +32,7 @@ +@@ -34,7 +34,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 68e686687f69..dc22229305b9 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 2024-06-25 12:08:48 UTC +--- chrome/browser/new_tab_page/new_tab_page_util.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/new_tab_page/new_tab_page_util.cc -@@ -20,7 +20,7 @@ bool IsOsSupportedForCart() { +@@ -25,7 +25,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__platform__bridge__delegator.cc b/www/iridium/files/patch-chrome_browser_notifications_notification__platform__bridge__delegator.cc index 24c548a7011b..be3e77d58e3c 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 2022-03-28 18:11:04 UTC +--- chrome/browser/notifications/notification_platform_bridge_delegator.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/notifications/notification_platform_bridge_delegator.cc -@@ -57,7 +57,7 @@ bool SystemNotificationsEnabled(Profile* profile) { +@@ -56,7 +56,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_password__manager_chrome__password__manager__client.cc b/www/iridium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc index 71f7eba6aa7f..422409ca10de 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,20 +1,20 @@ ---- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/password_manager/chrome_password_manager_client.cc -@@ -560,7 +560,7 @@ void ChromePasswordManagerClient:: - +@@ -590,7 +590,7 @@ void ChromePasswordManagerClient:: bool ChromePasswordManagerClient::IsReauthBeforeFillingRequired( device_reauth::DeviceAuthenticator* authenticator) { --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!GetLocalStatePrefs() || !GetPrefs() || !authenticator) { return false; } -@@ -798,7 +798,7 @@ void ChromePasswordManagerClient::NotifyUserCredential +@@ -828,7 +828,7 @@ void ChromePasswordManagerClient::NotifyUserCredential } void ChromePasswordManagerClient::NotifyKeychainError() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) PasswordsClientUIDelegate* manage_passwords_ui_controller = PasswordsClientUIDelegateFromWebContents(web_contents()); manage_passwords_ui_controller->OnKeychainError(); diff --git a/www/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 9675e9f13446..38ee8fdf5e9a 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,38 +1,38 @@ ---- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig 2024-06-25 12:08:48 UTC +--- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc -@@ -50,7 +50,7 @@ +@@ -53,7 +53,7 @@ #include "chrome/browser/policy/browser_dm_token_storage_mac.h" #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/browser_dm_token_storage_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -59,7 +59,7 @@ +@@ -62,7 +62,7 @@ #include "chrome/install_static/install_util.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/device_trust_key_manager_impl.h" #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/key_rotation_launcher.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -@@ -87,7 +87,7 @@ void ChromeBrowserCloudManagementControllerDesktop:: +@@ -93,7 +93,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(); -@@ -255,7 +255,7 @@ ChromeBrowserCloudManagementControllerDesktop::CreateC +@@ -265,7 +265,7 @@ ChromeBrowserCloudManagementControllerDesktop::CreateC std::unique_ptr ChromeBrowserCloudManagementControllerDesktop::CreateDeviceTrustKeyManager() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) auto* browser_dm_token_storage = BrowserDMTokenStorage::Get(); auto* device_management_service = GetDeviceManagementService(); auto shared_url_loader_factory = GetSharedURLLoaderFactory(); diff --git a/www/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 0ab4b2560702..5e4b4645292f 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,254 +1,263 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -236,19 +236,19 @@ +@@ -247,19 +247,19 @@ #include "components/spellcheck/browser/pref_names.h" #endif // BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/action.h" #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "components/enterprise/idle/idle_timeout_policy_handler.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/privacy_sandbox/privacy_sandbox_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -@@ -262,13 +262,13 @@ +@@ -273,13 +273,13 @@ #endif // BUILDFLAG(ENTERPRISE_CLIENT_CERTIFICATES) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/battery_saver_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "components/search_engines/site_search_policy_handler.h" + #include "components/search_engines/enterprise/site_search_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -@@ -542,7 +542,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -559,7 +559,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { key::kDefaultDirectSocketsSetting, prefs::kManagedDefaultDirectSocketsSetting, base::Value::Type::INTEGER }, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kDeletingUndecryptablePasswordsEnabled, password_manager::prefs::kDeletingUndecryptablePasswordsEnabled, base::Value::Type::BOOLEAN }, -@@ -884,7 +884,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -901,7 +901,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kManagedDefaultGeolocationSetting, base::Value::Type::INTEGER }, #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_MAC) + || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { key::kRequireOnlineRevocationChecksForLocalAnchors, prefs::kCertRevocationCheckingRequiredLocalAnchors, base::Value::Type::BOOLEAN }, -@@ -893,7 +893,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -910,7 +910,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) // || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) { key::kFullscreenAllowed, prefs::kFullscreenAllowed, base::Value::Type::BOOLEAN }, -@@ -1721,7 +1721,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - base::Value::Type::LIST }, +@@ -1738,7 +1738,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + base::Value::Type::INTEGER}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGSSAPILibraryName, prefs::kGSSAPILibraryName, base::Value::Type::STRING }, -@@ -1778,7 +1778,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1797,7 +1797,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kNetworkServiceSandboxEnabled, prefs::kNetworkServiceSandboxEnabled, base::Value::Type::BOOLEAN }, -@@ -1804,12 +1804,12 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1823,12 +1823,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 }, -@@ -1817,7 +1817,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1836,7 +1836,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kProfileSeparationDomainExceptionList, base::Value::Type::LIST }, #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 }, -@@ -1829,7 +1829,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1848,7 +1848,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 }, -@@ -1930,7 +1930,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1949,7 +1949,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 }, -@@ -2041,7 +2041,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2066,7 +2066,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::LIST }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { key::kAuthNegotiateDelegateByKdcPolicy, prefs::kAuthNegotiateDelegateByKdcPolicy, base::Value::Type::BOOLEAN }, -@@ -2120,7 +2120,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2145,7 +2145,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = ash::prefs::kUrlParameterToAutofillSAMLUsername, base::Value::Type::STRING }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) { key::kTabDiscardingExceptions, performance_manager::user_tuning::prefs::kManagedTabDiscardingExceptions, base::Value::Type::LIST }, -@@ -2149,7 +2149,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2174,7 +2174,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kUiAutomationProviderEnabled, base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kOutOfProcessSystemDnsResolutionEnabled, prefs::kOutOfProcessSystemDnsResolutionEnabled, base::Value::Type::BOOLEAN }, -@@ -2192,7 +2192,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2217,7 +2217,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}, -@@ -2212,7 +2212,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - optimization_guide::model_execution::prefs::kHistorySearchEnterprisePolicyAllowed, +@@ -2240,7 +2240,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + { key::kTabCompareSettings, + optimization_guide::prefs::kProductSpecificationsEnterprisePolicyAllowed, base::Value::Type::INTEGER}, - #endif -#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 }, -@@ -2346,7 +2346,7 @@ std::unique_ptr BuildH +@@ -2378,7 +2378,7 @@ std::unique_ptr BuildH // Policies for all platforms - End #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique( key::kMemorySaverModeSavings, performance_manager::user_tuning::prefs::kMemorySaverModeAggressiveness, -@@ -2362,7 +2362,7 @@ std::unique_ptr BuildH +@@ -2394,7 +2394,7 @@ std::unique_ptr BuildH // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique(chrome_schema)); -@@ -2575,7 +2575,7 @@ std::unique_ptr BuildH +@@ -2607,7 +2607,7 @@ std::unique_ptr BuildH #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique()); handlers->AddHandler( -@@ -2627,7 +2627,7 @@ std::unique_ptr BuildH +@@ -2660,7 +2660,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( -@@ -2712,7 +2712,7 @@ std::unique_ptr BuildH +@@ -2745,7 +2745,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)); -@@ -3070,7 +3070,7 @@ std::unique_ptr BuildH +@@ -3116,7 +3116,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( -@@ -3078,7 +3078,7 @@ std::unique_ptr BuildH +@@ -3124,7 +3124,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)); -@@ -3096,7 +3096,7 @@ std::unique_ptr BuildH +@@ -3142,7 +3142,7 @@ std::unique_ptr BuildH first_party_sets::FirstPartySetsOverridesPolicyHandler>( key::kRelatedWebsiteSetsOverrides, chrome_schema))); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -@@ -3119,7 +3119,7 @@ std::unique_ptr BuildH +@@ -3165,7 +3165,7 @@ std::unique_ptr BuildH base::Value::Type::BOOLEAN))); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_ASH) +@@ -3189,7 +3189,7 @@ std::unique_ptr BuildH + std::vector + gen_ai_default_policies; + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + gen_ai_default_policies.emplace_back( + key::kHelpMeWriteSettings, + optimization_guide::prefs::kComposeEnterprisePolicyAllowed); 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 55893d98171b..60cc8579e1cb 100644 --- a/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc +++ b/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -1,75 +1,75 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -314,7 +314,7 @@ +@@ -313,7 +313,7 @@ #include "components/user_notes/user_notes_prefs.h" #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/whats_new/whats_new_ui.h" #endif -@@ -496,18 +496,18 @@ +@@ -491,18 +491,18 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #endif // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/browser_switcher/browser_switcher_prefs.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #endif -@@ -542,7 +542,7 @@ +@@ -537,7 +537,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 -@@ -1562,7 +1562,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) - registry->RegisterIntegerPref(prefs::kLastWhatsNewVersion, 0); +@@ -1678,7 +1678,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) + on_device_translation::RegisterLocalStatePrefs(registry); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) WhatsNewUI::RegisterLocalStatePrefs(registry); #endif -@@ -1735,7 +1735,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) +@@ -1854,7 +1854,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 -@@ -2094,12 +2094,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -2213,12 +2213,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) device_signals::RegisterProfilePrefs(registry); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); enterprise_signin::RegisterProfilePrefs(registry); #endif diff --git a/www/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 d0f4bad840a5..5e07c169444f 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 2024-08-27 06:28:16 UTC +--- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/prefs/pref_service_incognito_allowlist.cc -@@ -188,7 +188,7 @@ const char* const kPersistentPrefNames[] = { +@@ -198,7 +198,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_process__singleton__posix.cc b/www/iridium/files/patch-chrome_browser_process__singleton__posix.cc index dfccbf798de7..4116e95754db 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 2023-08-28 20:17:35 UTC +--- chrome/browser/process_singleton_posix.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/process_singleton_posix.cc -@@ -97,7 +97,7 @@ +@@ -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 -@@ -355,7 +355,7 @@ bool DisplayProfileInUseError(const base::FilePath& lo +@@ -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 58895ed20576..d62b452ed26a 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,118 +1,118 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -342,7 +342,7 @@ +@@ -347,7 +347,7 @@ #include "chromeos/constants/chromeos_features.h" #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/messaging_layer/util/manual_test_heartbeat_event_factory.h" #endif -@@ -428,18 +428,18 @@ +@@ -440,18 +440,18 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.h" #include "chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.h" #include "chrome/browser/enterprise/signals/user_permission_service_factory.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/idle_service_factory.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_switcher/browser_switcher_service_factory.h" #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h" #include "chrome/browser/enterprise/client_certificates/certificate_store_factory.h" -@@ -681,7 +681,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -706,7 +706,7 @@ void ChromeBrowserMainExtraPartsProfiles:: DiceBoundSessionCookieServiceFactory::GetInstance(); #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) #endif // BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherServiceFactory::GetInstance(); #endif browser_sync::UserEventServiceFactory::GetInstance(); -@@ -810,7 +810,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -839,7 +839,7 @@ void ChromeBrowserMainExtraPartsProfiles:: enterprise_connectors::ConnectorsServiceFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) enterprise_connectors::DeviceTrustConnectorServiceFactory::GetInstance(); enterprise_connectors::DeviceTrustServiceFactory::GetInstance(); #endif -@@ -818,25 +818,25 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -847,25 +847,25 @@ void ChromeBrowserMainExtraPartsProfiles:: enterprise_connectors::ExtensionInstallEventRouterFactory::GetInstance(); enterprise_connectors::ExtensionTelemetryEventRouterFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_connectors::LocalBinaryUploadServiceFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) enterprise_idle::IdleServiceFactory::GetInstance(); #endif #if !BUILDFLAG(IS_CHROMEOS_ASH) enterprise_reporting::CloudProfileReportingServiceFactory::GetInstance(); #endif enterprise_reporting::LegacyTechServiceFactory::GetInstance(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_signals::SignalsAggregatorFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) enterprise_signals::UserPermissionServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_signin::EnterpriseSigninServiceFactory::GetInstance(); #endif #if BUILDFLAG(ENABLE_SESSION_SERVICE) -@@ -969,7 +969,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -995,7 +995,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance(); #endif -@@ -1075,7 +1075,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1100,7 +1100,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if BUILDFLAG(IS_CHROMEOS) policy::PolicyCertServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) policy::ProfileTokenPolicyWebSigninServiceFactory::GetInstance(); policy::UserPolicyOidcSigninServiceFactory::GetInstance(); #endif -@@ -1119,7 +1119,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1149,7 +1149,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID) ProfileStatisticsFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileTokenWebSigninInterceptorFactory::GetInstance(); OidcAuthenticationSigninInterceptorFactory::GetInstance(); #endif -@@ -1135,7 +1135,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1168,7 +1168,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif ReduceAcceptLanguageFactory::GetInstance(); RendererUpdaterFactory::GetInstance(); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) reporting::ManualTestHeartbeatEventFactory::GetInstance(); #endif #if BUILDFLAG(IS_CHROMEOS_LACROS) diff --git a/www/iridium/files/patch-chrome_browser_profiles_profile__impl.cc b/www/iridium/files/patch-chrome_browser_profiles_profile__impl.cc index c4ecb292d107..cccdd84841f4 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 2024-08-27 06:28:16 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -266,6 +266,10 @@ +@@ -267,6 +267,10 @@ #include "chrome/browser/spellchecker/spellcheck_service.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using bookmarks::BookmarkModel; using content::BrowserThread; using content::DownloadManagerDelegate; -@@ -600,7 +604,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async +@@ -603,7 +607,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async #else { #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileManager* profile_manager = g_browser_process->profile_manager(); ProfileAttributesEntry* entry = profile_manager->GetProfileAttributesStorage() -@@ -901,7 +905,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -908,7 +912,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_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 d868027811a1..eea014b36055 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,20 +1,20 @@ ---- chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc.orig 2024-06-25 12:08:48 UTC +--- chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc @@ -18,7 +18,7 @@ #include "net/base/url_util.h" #include "third_party/abseil-cpp/absl/types/variant.h" -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_factory.h" #endif -@@ -434,7 +434,7 @@ BinaryUploadService* BinaryUploadService::GetForProfil +@@ -436,7 +436,7 @@ BinaryUploadService* BinaryUploadService::GetForProfil Profile* profile, const enterprise_connectors::AnalysisSettings& settings) { // Local content analysis is supported only on desktop platforms. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (settings.cloud_or_local_settings.is_cloud_analysis()) { return CloudBinaryUploadServiceFactory::GetForProfile(profile); } else { diff --git a/www/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 21df043999c1..f3556472b8fa 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 2024-08-27 06:28:16 UTC +--- chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc -@@ -698,7 +698,7 @@ void IncidentReportingService::OnEnvironmentDataCollec +@@ -699,7 +699,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_screen__ai_screen__ai__service__router.cc b/www/iridium/files/patch-chrome_browser_screen__ai_screen__ai__service__router.cc index 1f31adb45cb9..68eaa0f919f8 100644 --- a/www/iridium/files/patch-chrome_browser_screen__ai_screen__ai__service__router.cc +++ b/www/iridium/files/patch-chrome_browser_screen__ai_screen__ai__service__router.cc @@ -1,20 +1,20 @@ ---- chrome/browser/screen_ai/screen_ai_service_router.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/screen_ai/screen_ai_service_router.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/screen_ai/screen_ai_service_router.cc -@@ -293,7 +293,7 @@ void ScreenAIServiceRouter::LaunchIfNotRunning() { +@@ -324,7 +324,7 @@ void ScreenAIServiceRouter::LaunchIfNotRunning() { base::FilePath binary_path = state_instance->get_component_binary_path(); #if BUILDFLAG(IS_WIN) std::vector preload_libraries = {binary_path}; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::vector extra_switches = { base::StringPrintf("--%s=%s", screen_ai::GetBinaryPathSwitch(), binary_path.MaybeAsASCII().c_str())}; -@@ -307,7 +307,7 @@ void ScreenAIServiceRouter::LaunchIfNotRunning() { +@@ -338,7 +338,7 @@ void ScreenAIServiceRouter::LaunchIfNotRunning() { .WithPreloadedLibraries( preload_libraries, content::ServiceProcessHostPreloadLibraries::GetPassKey()) -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) .WithExtraCommandLineSwitches(extra_switches) #endif // BUILDFLAG(IS_WIN) .Pass()); diff --git a/www/iridium/files/patch-chrome_browser_sessions_session__restore.cc b/www/iridium/files/patch-chrome_browser_sessions_session__restore.cc index 768c8b279b93..75dcde686b7e 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 2024-08-27 06:28:16 UTC +--- chrome/browser/sessions/session_restore.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/sessions/session_restore.cc -@@ -99,7 +99,7 @@ +@@ -103,7 +103,7 @@ #include "chrome/browser/web_applications/web_app_registrar.h" #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/whats_new/whats_new_fetcher.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -1049,7 +1049,7 @@ class SessionRestoreImpl : public BrowserListObserver +@@ -1081,7 +1081,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__device__registration.cc b/www/iridium/files/patch-chrome_browser_sharing_sharing__device__registration.cc deleted file mode 100644 index 2d76d8fe080f..000000000000 --- a/www/iridium/files/patch-chrome_browser_sharing_sharing__device__registration.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/sharing/sharing_device_registration.cc.orig 2024-08-01 05:47:53 UTC -+++ chrome/browser/sharing/sharing_device_registration.cc -@@ -331,7 +331,7 @@ bool SharingDeviceRegistration::IsSmsFetcherSupported( - - bool SharingDeviceRegistration::IsRemoteCopySupported() const { - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - return true; - #else - return false; 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 new file mode 100644 index 000000000000..3b143cd5f59a --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.cc @@ -0,0 +1,20 @@ +--- chrome/browser/supervised_user/supervised_user_browser_utils.cc.orig 2024-11-04 08:56:03 UTC ++++ chrome/browser/supervised_user/supervised_user_browser_utils.cc +@@ -42,7 +42,7 @@ + #include "components/user_manager/user_type.h" + #elif BUILDFLAG(IS_CHROMEOS_LACROS) + #include "chromeos/startup/browser_params_proxy.h" +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "chrome/browser/supervised_user/supervised_user_verification_controller_client.h" + #include "chrome/browser/supervised_user/supervised_user_verification_page.h" + #endif +@@ -165,7 +165,7 @@ void AssertChildStatusOfTheUser(Profile* profile, bool + #endif + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + std::string CreateReauthenticationInterstitial( + content::NavigationHandle& navigation_handle, + SupervisedUserVerificationPage::VerificationPurpose verification_purpose) { 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 new file mode 100644 index 000000000000..1e9a7c9e13b8 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__browser__utils.h @@ -0,0 +1,20 @@ +--- chrome/browser/supervised_user/supervised_user_browser_utils.h.orig 2024-11-04 08:56:03 UTC ++++ chrome/browser/supervised_user/supervised_user_browser_utils.h +@@ -11,7 +11,7 @@ + #include "content/public/browser/web_contents.h" + #include "url/gurl.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "chrome/browser/supervised_user/supervised_user_verification_page.h" + #endif + +@@ -55,7 +55,7 @@ std::string GetAccountGivenName(Profile& profile); + // of the user. + void AssertChildStatusOfTheUser(Profile* profile, bool is_child); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // Returns the html content of the reauthentication interstitial for blocked + // sites. This interstitial is associated with the given NavigationHandle. + std::string CreateReauthenticationInterstitial( 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 fc1871b4292b..d61619236b54 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 2024-08-01 05:47:53 UTC +--- chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.cc -@@ -196,7 +196,7 @@ void SupervisedUserExtensionsDelegateImpl::RequestExte +@@ -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(); if (CanInstallExtensions()) { 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 54a886bd9855..00cedc15ebaf 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 2024-08-01 05:47:53 UTC +--- chrome/browser/supervised_user/supervised_user_extensions_manager.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/supervised_user/supervised_user_extensions_manager.cc @@ -359,7 +359,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) } -@@ -476,7 +476,7 @@ bool SupervisedUserExtensionsManager::ShouldBlockExten +@@ -477,7 +477,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__google__auth__navigation__throttle.cc b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__google__auth__navigation__throttle.cc index af2acde56e0a..058926aeabd3 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,20 +1,20 @@ ---- chrome/browser/supervised_user/supervised_user_google_auth_navigation_throttle.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/supervised_user/supervised_user_google_auth_navigation_throttle.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/supervised_user/supervised_user_google_auth_navigation_throttle.cc -@@ -25,7 +25,7 @@ +@@ -29,7 +29,7 @@ #if BUILDFLAG(IS_ANDROID) #include "chrome/browser/supervised_user/child_accounts/child_account_service_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 -@@ -139,7 +139,7 @@ SupervisedUserGoogleAuthNavigationThrottle::ShouldProc +@@ -145,7 +145,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 485f25ee986d..5314f300b12c 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 2024-08-27 06:28:16 UTC +--- chrome/browser/supervised_user/supervised_user_metrics_service_factory.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/supervised_user/supervised_user_metrics_service_factory.cc @@ -14,7 +14,7 @@ #include "components/supervised_user/core/browser/supervised_user_service.h" #include "content/public/browser/browser_context.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 @@ -61,7 +61,7 @@ KeyedService* SupervisedUserMetricsServiceFactory::Bui 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->GetPrefs()); + extensions::ExtensionRegistry::Get(profile), profile); diff --git a/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__throttle.cc b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__throttle.cc new file mode 100644 index 000000000000..2ff3d0040b03 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_supervised__user_supervised__user__navigation__throttle.cc @@ -0,0 +1,20 @@ +--- chrome/browser/supervised_user/supervised_user_navigation_throttle.cc.orig 2024-11-04 08:56:03 UTC ++++ chrome/browser/supervised_user/supervised_user_navigation_throttle.cc +@@ -201,7 +201,7 @@ void SupervisedUserNavigationThrottle::OnCheckDone( + } + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + SupervisedUserVerificationPage::VerificationPurpose + GetVerificationPurposeFromFilteringReason( + supervised_user::FilteringBehaviorReason reason) { +@@ -235,7 +235,7 @@ void SupervisedUserNavigationThrottle::OnInterstitialR + Profile* profile = Profile::FromBrowserContext( + navigation_handle()->GetWebContents()->GetBrowserContext()); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + supervised_user::ChildAccountService* child_account_service = + ChildAccountServiceFactory::GetForProfile(profile); + if (base::FeatureList::IsEnabled( diff --git a/www/iridium/files/patch-chrome_browser_sync_chrome__sync__client.cc b/www/iridium/files/patch-chrome_browser_sync_chrome__sync__client.cc deleted file mode 100644 index 9e2e5e6d1cc2..000000000000 --- a/www/iridium/files/patch-chrome_browser_sync_chrome__sync__client.cc +++ /dev/null @@ -1,47 +0,0 @@ ---- chrome/browser/sync/chrome_sync_client.cc.orig 2024-08-27 06:28:16 UTC -+++ chrome/browser/sync/chrome_sync_client.cc -@@ -119,7 +119,7 @@ - #endif // BUILDFLAG(ENABLE_SPELLCHECK) - - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service.h" - #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h" - #elif BUILDFLAG(IS_ANDROID) -@@ -233,7 +233,7 @@ bool ShouldSyncAppsTypesInTransportMode() { - syncer::ModelTypeControllerDelegate* GetSavedTabGroupControllerDelegate( - Profile* profile) { - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - auto* keyed_service = - tab_groups::SavedTabGroupServiceFactory::GetForProfile(profile); - CHECK(keyed_service); -@@ -251,7 +251,7 @@ syncer::ModelTypeControllerDelegate* GetSavedTabGroupC - syncer::ModelTypeControllerDelegate* GetSharedTabGroupControllerDelegate( - Profile* profile) { - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - tab_groups::SavedTabGroupKeyedService* keyed_service = - tab_groups::SavedTabGroupServiceFactory::GetForProfile(profile); - CHECK(keyed_service); -@@ -545,7 +545,7 @@ ChromeSyncClient::CreateModelTypeControllers( - // platforms. - bool enable_tab_group_sync = false; - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ -- BUILDFLAG(IS_WIN) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - enable_tab_group_sync = true; - #elif BUILDFLAG(IS_ANDROID) - enable_tab_group_sync = -@@ -586,7 +586,7 @@ ChromeSyncClient::CreateModelTypeControllers( - - // Chrome prefers OS provided spell checkers where they exist. So only sync the - // custom dictionary on platforms that typically don't provide one. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - // Dictionary sync is enabled by default. - if (GetPrefService()->GetBoolean(spellcheck::prefs::kSpellCheckEnable)) { - controllers.push_back( 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 new file mode 100644 index 000000000000..0e62fde86f15 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_sync_chrome__sync__controller__builder.cc @@ -0,0 +1,11 @@ +--- chrome/browser/sync/chrome_sync_controller_builder.cc.orig 2024-11-04 08:56:03 UTC ++++ chrome/browser/sync/chrome_sync_controller_builder.cc +@@ -324,7 +324,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_sync__service__factory.cc b/www/iridium/files/patch-chrome_browser_sync_sync__service__factory.cc index 0844a5f12d98..09da38d2958a 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,29 +1,38 @@ ---- chrome/browser/sync/sync_service_factory.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/sync/sync_service_factory.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/sync/sync_service_factory.cc -@@ -85,7 +85,7 @@ +@@ -105,7 +105,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service.h" #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h" - #elif BUILDFLAG(IS_ANDROID) - #include "chrome/browser/tab_group_sync/tab_group_sync_service_factory.h" -@@ -134,7 +134,7 @@ std::unique_ptr BuildSyncService( - // TODO(crbug.com/40118868): Reassess whether the following block needs to be - // included in lacros-chrome once build flag switch of lacros-chrome is - // complete. --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_utils.h" +@@ -153,7 +153,7 @@ syncer::DataTypeSet GetDisabledCommonDataTypes() { + tab_groups::TabGroupSyncService* GetTabGroupSyncService(Profile* profile) { + CHECK(profile); + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + tab_groups::TabGroupSyncService* service = + tab_groups::SavedTabGroupUtils::GetServiceForProfile(profile); + CHECK(service); +@@ -381,7 +381,7 @@ std::unique_ptr BuildSyncService( + // included in lacros-chrome once build flag switch of lacros-chrome is + // complete. + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) ++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) syncer::SyncPrefs prefs(profile->GetPrefs()); local_sync_backend_enabled = prefs.IsLocalSyncEnabled(); -@@ -271,7 +271,7 @@ SyncServiceFactory::SyncServiceFactory() + base::UmaHistogramBoolean("Sync.Local.Enabled2", local_sync_backend_enabled); +@@ -517,7 +517,7 @@ SyncServiceFactory::SyncServiceFactory() DependsOn(ProfilePasswordStoreFactory::GetInstance()); DependsOn(PowerBookmarkServiceFactory::GetInstance()); #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) DependsOn(tab_groups::SavedTabGroupServiceFactory::GetInstance()); #elif BUILDFLAG(IS_ANDROID) DependsOn(tab_groups::TabGroupSyncServiceFactory::GetInstance()); diff --git a/www/iridium/files/patch-chrome_browser_tab__group__sync_tab__group__sync__service__factory.cc b/www/iridium/files/patch-chrome_browser_tab__group__sync_tab__group__sync__service__factory.cc index f11913c2a1b4..7df7219a78f3 100644 --- a/www/iridium/files/patch-chrome_browser_tab__group__sync_tab__group__sync__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_tab__group__sync_tab__group__sync__service__factory.cc @@ -1,11 +1,20 @@ ---- chrome/browser/tab_group_sync/tab_group_sync_service_factory.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/tab_group_sync/tab_group_sync_service_factory.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/tab_group_sync/tab_group_sync_service_factory.cc +@@ -30,7 +30,7 @@ + #include "components/sync_device_info/device_info_sync_service.h" + + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/tabs/saved_tab_groups/tab_group_sync_delegate_desktop.h" + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || + // BUILDFLAG(IS_WIN) @@ -110,7 +110,7 @@ TabGroupSyncServiceFactory::BuildServiceInstanceForBro std::unique_ptr delegate; #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - delegate = - std::make_unique(service.get(), profile); - #else + if (tab_groups::IsTabGroupSyncServiceDesktopMigrationEnabled()) { + delegate = + std::make_unique(service.get(), profile); 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 057ac5957908..561a7395b432 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,38 +1,38 @@ ---- chrome/browser/task_manager/sampling/task_group.cc.orig 2023-01-17 19:19:00 UTC +--- chrome/browser/task_manager/sampling/task_group.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/task_manager/sampling/task_group.cc -@@ -38,7 +38,7 @@ const int kBackgroundRefreshTypesMask = +@@ -41,7 +41,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) #if BUILDFLAG(ENABLE_NACL) -@@ -123,7 +123,7 @@ TaskGroup::TaskGroup( +@@ -126,7 +126,7 @@ TaskGroup::TaskGroup( #if BUILDFLAG(ENABLE_NACL) nacl_debug_stub_port_(nacl::kGdbDebugStubPortUnknown), #endif // BUILDFLAG(ENABLE_NACL) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) open_fd_count_(-1), #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) idle_wakeups_per_second_(-1), -@@ -142,7 +142,7 @@ TaskGroup::TaskGroup( +@@ -145,7 +145,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) -@@ -322,7 +322,7 @@ void TaskGroup::OnRefreshNaClDebugStubPortDone(int nac +@@ -325,7 +325,7 @@ void TaskGroup::OnRefreshNaClDebugStubPortDone(int nac } #endif // BUILDFLAG(ENABLE_NACL) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) void TaskGroup::OnOpenFdCountRefreshDone(int open_fd_count) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 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 61e43426d651..73a5efce0540 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 2024-08-01 05:47:53 UTC +--- chrome/browser/themes/theme_service.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/themes/theme_service.cc @@ -70,7 +70,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 -@@ -326,7 +326,7 @@ CustomThemeSupplier* ThemeService::GetThemeSupplier() +@@ -328,7 +328,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_ui_actions_chrome__action__id.h b/www/iridium/files/patch-chrome_browser_ui_actions_chrome__action__id.h index 3b1b02180861..7b11e7f5a46f 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/actions/chrome_action_id.h.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/actions/chrome_action_id.h -@@ -510,7 +510,7 @@ +@@ -511,7 +511,7 @@ IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_ANSWER) \ E(kActionContentContextQuickAnswersInlineQuery, \ IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_QUERY) -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define CHROME_PLATFORM_SPECIFIC_ACTION_IDS \ E(kUseSystemTitleBar, IDC_USE_SYSTEM_TITLE_BAR) \ E(kRestoreWindow, IDC_RESTORE_WINDOW) diff --git a/www/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 a863252f9380..bb76eb051ba1 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 2024-08-01 05:47:53 UTC +--- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc -@@ -49,7 +49,7 @@ gfx::Rect GetPopupSizeForVcn3ds() { +@@ -48,7 +48,7 @@ gfx::Rect GetPopupSizeForVcn3ds() { DesktopPaymentsWindowManager::DesktopPaymentsWindowManager( ContentAutofillClient* client) : client_(CHECK_DEREF(client)) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) scoped_observation_.Observe(BrowserList::GetInstance()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) } -@@ -109,7 +109,7 @@ void DesktopPaymentsWindowManager::WebContentsDestroye +@@ -108,7 +108,7 @@ void DesktopPaymentsWindowManager::WebContentsDestroye } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) void DesktopPaymentsWindowManager::OnBrowserSetLastActive(Browser* browser) { // If there is an ongoing payments window manager pop-up flow, and the // original tab's WebContents become active, activate the pop-up's diff --git a/www/iridium/files/patch-chrome_browser_ui_browser.h b/www/iridium/files/patch-chrome_browser_ui_browser.h index 4426cf50cf41..4e1677f54968 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/browser.h.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/browser.h -@@ -338,7 +338,7 @@ class Browser : public TabStripModelObserver, +@@ -299,7 +299,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 2b6c6f99d9aa..d5c4a630121c 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,80 +1,80 @@ ---- chrome/browser/ui/browser_command_controller.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/browser_command_controller.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/browser_command_controller.cc @@ -129,7 +129,7 @@ #include "components/user_manager/user_manager.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/base/ime/text_input_flags.h" #include "ui/linux/linux_ui.h" #endif @@ -138,7 +138,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) -@@ -315,7 +315,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( +@@ -319,7 +319,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(); -@@ -567,7 +567,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -574,7 +574,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) case IDC_MINIMIZE_WINDOW: browser_->window()->Minimize(); break; -@@ -579,7 +579,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -586,7 +586,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo break; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) case IDC_USE_SYSTEM_TITLE_BAR: { PrefService* prefs = profile()->GetPrefs(); prefs->SetBoolean(prefs::kUseCustomChromeFrame, -@@ -773,7 +773,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -787,7 +787,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo break; case IDC_CREATE_SHORTCUT: base::RecordAction(base::UserMetricsAction("CreateShortcut")); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kShortcutsNotApps)) { chrome::CreateDesktopShortcutForActiveWebContents(browser_); } else { -@@ -1272,12 +1272,12 @@ void BrowserCommandController::InitCommandState() { +@@ -1265,12 +1265,12 @@ void BrowserCommandController::InitCommandState() { #endif // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_MAXIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_RESTORE_WINDOW, true); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool use_system_title_bar = true; #if BUILDFLAG(IS_OZONE) use_system_title_bar = ui::OzonePlatform::GetInstance() -@@ -1592,7 +1592,7 @@ void BrowserCommandController::UpdateCommandsForTabSta +@@ -1601,7 +1601,7 @@ void BrowserCommandController::UpdateCommandsForTabSta bool can_create_web_app = web_app::CanCreateWebApp(browser_); command_updater_.UpdateCommandEnabled(IDC_INSTALL_PWA, can_create_web_app); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kShortcutsNotApps)) { command_updater_.UpdateCommandEnabled( IDC_CREATE_SHORTCUT, shortcuts::CanCreateDesktopShortcut(browser_)); diff --git a/www/iridium/files/patch-chrome_browser_ui_browser__commands.cc b/www/iridium/files/patch-chrome_browser_ui_browser__commands.cc index f7f997cacea2..bd59d449ab83 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/browser_commands.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/browser_commands.cc -@@ -2005,7 +2005,7 @@ void OpenUpdateChromeDialog(Browser* browser) { +@@ -2036,7 +2036,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 6537894a5314..dc94ee4ac50f 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,20 +1,20 @@ ---- chrome/browser/ui/browser_ui_prefs.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/browser_ui_prefs.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/browser_ui_prefs.cc -@@ -72,7 +72,7 @@ void RegisterBrowserPrefs(PrefRegistrySimple* registry +@@ -74,7 +74,7 @@ void RegisterBrowserPrefs(PrefRegistrySimple* registry registry->RegisterIntegerPref(prefs::kDefaultBrowserDeclinedCount, 0); registry->RegisterTimePref(prefs::kDefaultBrowserFirstShownTime, base::Time()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) registry->RegisterStringPref(prefs::kEnterpriseCustomLabel, std::string()); registry->RegisterStringPref(prefs::kEnterpriseLogoUrl, std::string()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -179,7 +179,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistry +@@ -184,7 +184,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistry registry->RegisterDictionaryPref(prefs::kHttpsUpgradeFallbacks); registry->RegisterDictionaryPref(prefs::kHttpsUpgradeNavigations); registry->RegisterBooleanPref(prefs::kHttpsOnlyModeAutoEnabled, false); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) registry->RegisterStringPref(prefs::kEnterpriseLogoUrl, std::string()); registry->RegisterStringPref(prefs::kEnterpriseCustomLabel, std::string()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) 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 f57ae1750336..3d6b27aef8db 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 2024-06-25 12:08:48 UTC +--- chrome/browser/ui/chrome_pages.h.orig 2024-11-04 08:56:03 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 -@@ -196,7 +196,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -174,7 +174,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_managed__ui.cc b/www/iridium/files/patch-chrome_browser_ui_managed__ui.cc new file mode 100644 index 000000000000..88fcb0f8e767 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_ui_managed__ui.cc @@ -0,0 +1,20 @@ +--- chrome/browser/ui/managed_ui.cc.orig 2024-11-04 08:56:03 UTC ++++ chrome/browser/ui/managed_ui.cc +@@ -435,7 +435,7 @@ std::optional GetDeviceManagerIdentity() + g_browser_process->platform_part()->browser_policy_connector_ash(); + return connector->GetEnterpriseDomainManager(); + #else +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + std::string custom_management_label = + g_browser_process->local_state() + ? g_browser_process->local_state()->GetString( +@@ -469,7 +469,7 @@ std::optional GetAccountManagerIdentity(P + policy::EnterpriseManagementAuthority::CLOUD)) + return std::nullopt; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + std::string custom_management_label = + profile->GetPrefs()->GetString(prefs::kEnterpriseCustomLabel); + if (!custom_management_label.empty()) { 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 6053091f6001..3d129347aa8b 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/passwords/manage_passwords_ui_controller.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/passwords/manage_passwords_ui_controller.cc -@@ -97,7 +97,7 @@ namespace { +@@ -93,7 +93,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; -@@ -502,7 +502,7 @@ void ManagePasswordsUIController::OnBiometricAuthBefor +@@ -513,7 +513,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_startup_startup__browser__creator.cc b/www/iridium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc index 03b8385ee912..02b524da1b0b 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/startup/startup_browser_creator.cc @@ -138,7 +138,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" -@@ -967,7 +967,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -963,7 +963,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())) { -@@ -1084,7 +1084,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1080,7 +1080,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) && -@@ -1294,7 +1294,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1295,7 +1295,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 48a9442a06af..7d77294e140f 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 2024-08-01 05:47:53 UTC +--- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/startup/startup_browser_creator_impl.cc -@@ -86,7 +86,7 @@ +@@ -85,7 +85,7 @@ #include "chromeos/startup/browser_params_proxy.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/whats_new/whats_new_fetcher.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -237,7 +237,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser( +@@ -225,7 +225,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 -@@ -267,7 +267,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser( +@@ -255,7 +255,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_task__manager_task__manager__table__model.cc b/www/iridium/files/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc index f9893b21fbbb..04e7b34c65d6 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,29 +1,29 @@ ---- chrome/browser/ui/task_manager/task_manager_table_model.cc.orig 2024-06-25 12:08:48 UTC +--- chrome/browser/ui/task_manager/task_manager_table_model.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/task_manager/task_manager_table_model.cc -@@ -454,7 +454,7 @@ std::u16string TaskManagerTableModel::GetText(size_t r +@@ -459,7 +459,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) -@@ -621,7 +621,7 @@ int TaskManagerTableModel::CompareValues(size_t row1, +@@ -626,7 +626,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]); -@@ -806,7 +806,7 @@ void TaskManagerTableModel::UpdateRefreshTypes(int col +@@ -811,7 +811,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 9071934312c9..066ea30701f2 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 2024-06-25 12:08:48 UTC +--- chrome/browser/ui/test/popup_browsertest.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/test/popup_browsertest.cc -@@ -74,7 +74,7 @@ IN_PROC_BROWSER_TEST_F(PopupTest, OpenLeftAndTopZeroCo +@@ -75,7 +75,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())) -@@ -106,7 +106,7 @@ IN_PROC_BROWSER_TEST_F(PopupTest, OpenClampedToCurrent +@@ -107,7 +107,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_ui__features.cc b/www/iridium/files/patch-chrome_browser_ui_ui__features.cc index ff59b0fefd16..8bfaf61a261b 100644 --- a/www/iridium/files/patch-chrome_browser_ui_ui__features.cc +++ b/www/iridium/files/patch-chrome_browser_ui_ui__features.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/ui_features.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/ui_features.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/ui_features.cc -@@ -108,7 +108,7 @@ BASE_FEATURE(kEvDetailsInPageInfo, - "EvDetailsInPageInfo", +@@ -103,7 +103,7 @@ BASE_FEATURE(kAccessCodeCastUI, base::FEATURE_ENABLED_BY_DEFAULT); + #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables the feature to remove the last confirmation dialog when relaunching // to update Chrome. BASE_FEATURE(kFewerUpdateConfirmations, -@@ -381,7 +381,7 @@ BASE_FEATURE(kTopChromeWebUIUsesSpareRenderer, +@@ -402,7 +402,7 @@ BASE_FEATURE(kTopChromeWebUIUsesSpareRenderer, "TopChromeWebUIUsesSpareRenderer", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables alternate update-related text to be displayed in browser app menu // button, menu item and confirmation dialog. BASE_FEATURE(kUpdateTextOptions, -@@ -457,7 +457,7 @@ BASE_FEATURE(kStopLoadingAnimationForHiddenWindow, +@@ -474,7 +474,7 @@ BASE_FEATURE(kStopLoadingAnimationForHiddenWindow, "StopLoadingAnimationForHiddenWindow", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kUsePortalAccentColor, "UsePortalAccentColor", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/iridium/files/patch-chrome_browser_ui_ui__features.h b/www/iridium/files/patch-chrome_browser_ui_ui__features.h index 915effa614bd..4623b6a45c0f 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/ui_features.h.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/ui_features.h -@@ -80,7 +80,7 @@ BASE_DECLARE_FEATURE(kAccessCodeCastUI); - - BASE_DECLARE_FEATURE(kEvDetailsInPageInfo); +@@ -78,7 +78,7 @@ bool IsExtensionMenuInRootAppMenu(); + BASE_DECLARE_FEATURE(kAccessCodeCastUI); + #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kFewerUpdateConfirmations); #endif -@@ -239,7 +239,7 @@ bool IsToolbarPinningEnabled(); +@@ -266,7 +266,7 @@ bool IsToolbarPinningEnabled(); BASE_DECLARE_FEATURE(kTopChromeWebUIUsesSpareRenderer); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kUpdateTextOptions); extern const base::FeatureParam kUpdateTextOptionNumber; #endif -@@ -266,7 +266,7 @@ BASE_DECLARE_FEATURE(kViewsJSAppModalDialog); +@@ -291,7 +291,7 @@ BASE_DECLARE_FEATURE(kViewsJSAppModalDialog); BASE_DECLARE_FEATURE(kStopLoadingAnimationForHiddenWindow); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kUsePortalAccentColor); #endif diff --git a/www/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 7ee9f87e4ef2..18a566fc8f75 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 2024-06-25 12:08:48 UTC +--- chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc -@@ -38,7 +38,7 @@ +@@ -39,7 +39,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( +@@ -132,7 +132,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_frame_browser__frame.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc index 77d4989eec08..c859d32d6e4e 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc @@ -1,56 +1,56 @@ ---- chrome/browser/ui/views/frame/browser_frame.cc.orig 2024-06-25 12:08:48 UTC +--- chrome/browser/ui/views/frame/browser_frame.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/frame/browser_frame.cc @@ -54,7 +54,7 @@ #include "components/user_manager/user_manager.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/display/screen.h" #include "ui/linux/linux_ui.h" #endif @@ -89,7 +89,7 @@ class ThemeChangedObserver : public views::WidgetObser }; bool IsUsingLinuxSystemTheme(Profile* profile) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme(); #else return false; @@ -184,7 +184,7 @@ void BrowserFrame::InitBrowserFrame() { Init(std::move(params)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SelectNativeTheme(); #else SetNativeTheme(ui::NativeTheme::GetInstanceForNativeUi()); @@ -370,7 +370,7 @@ void BrowserFrame::OnNativeWidgetWorkspaceChanged() { 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() -@@ -563,7 +563,7 @@ void BrowserFrame::OnMenuClosed() { +@@ -564,7 +564,7 @@ void BrowserFrame::OnMenuClosed() { } void BrowserFrame::SelectNativeTheme() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Use the regular NativeTheme instance if running incognito mode, regardless // of system theme (gtk, qt etc). ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi(); -@@ -604,7 +604,7 @@ void BrowserFrame::OnTouchUiChanged() { +@@ -605,7 +605,7 @@ void BrowserFrame::OnTouchUiChanged() { bool BrowserFrame::RegenerateFrameOnThemeChange( BrowserThemeChangeType theme_change_type) { bool need_regenerate = false; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // System and user theme changes can both change frame buttons, so the frame // always needs to be regenerated on Linux. need_regenerate = true; diff --git a/www/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 8c1b162abf3d..52fe2542f64a 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 2024-06-25 12:08:48 UTC +--- chrome/browser/ui/views/frame/browser_frame_view_layout_linux.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/frame/browser_frame_view_layout_linux.cc -@@ -53,7 +53,7 @@ gfx::Insets BrowserFrameViewLayoutLinux::RestoredFrame +@@ -54,7 +54,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__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__view.cc index 466c2616e339..973352c480c2 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,11 +1,11 @@ ---- chrome/browser/ui/views/frame/browser_view.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -2258,7 +2258,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra +@@ -2346,7 +2346,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra // CrOS cleanup is done. // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) contents_web_view_->SetFastResize(is_dragging); if (!is_dragging) { // When tab dragging is ended, we need to make sure the web contents get diff --git a/www/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 6d158719d0a2..9ca3c23c0e5f 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 2024-08-01 05:47:53 UTC +--- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/frame/opaque_browser_frame_view.cc @@ -54,7 +54,7 @@ #include "ui/views/window/vector_icons/vector_icons.h" #include "ui/views/window/window_shape.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "ui/views/controls/menu/menu_runner.h" #endif -@@ -564,7 +564,7 @@ OpaqueBrowserFrameView::FrameButtonStyle +@@ -559,7 +559,7 @@ OpaqueBrowserFrameView::FrameButtonStyle OpaqueBrowserFrameView::GetFrameButtonStyle() const { // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) return FrameButtonStyle::kMdButton; #else return FrameButtonStyle::kImageButton; -@@ -583,7 +583,7 @@ bool OpaqueBrowserFrameView::ShouldDrawRestoredFrameSh +@@ -578,7 +578,7 @@ bool OpaqueBrowserFrameView::ShouldDrawRestoredFrameSh return false; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool OpaqueBrowserFrameView::IsTiled() const { return frame()->tiled(); } -@@ -782,7 +782,7 @@ gfx::Rect OpaqueBrowserFrameView::GetIconBounds() cons +@@ -777,7 +777,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 fe2358080aa5..badc704194dd 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/frame/opaque_browser_frame_view.h.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/frame/opaque_browser_frame_view.h -@@ -114,7 +114,7 @@ class OpaqueBrowserFrameView : public BrowserNonClient +@@ -111,7 +111,7 @@ class OpaqueBrowserFrameView : public BrowserNonClient 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; -@@ -231,7 +231,7 @@ class OpaqueBrowserFrameView : public BrowserNonClient +@@ -228,7 +228,7 @@ class OpaqueBrowserFrameView : public BrowserNonClient // 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_picture__in__picture__browser__frame__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc index e8b047d38478..6d6b14aa9730 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc @@ -1,92 +1,92 @@ ---- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc @@ -61,7 +61,7 @@ #include "ui/aura/window.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" #include "chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.h" @@ -93,7 +93,7 @@ constexpr int kContentSettingIconSize = 16; // The height of the controls bar at the top of the window. constexpr int kTopControlsHeight = 34; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Frame border when window shadow is not drawn. constexpr int kFrameBorderThickness = 4; #endif -@@ -185,7 +185,7 @@ class WindowEventObserver : public ui::EventObserver { +@@ -188,7 +188,7 @@ class WindowEventObserver : public ui::EventObserver { gfx::Rect input_bounds = pip_browser_frame_view_->GetLocalBounds(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Calculate input bounds for Linux. This is needed because the input bounds // is not necessary the same as the local bounds on Linux. if (pip_browser_frame_view_->ShouldDrawFrameShadow()) { -@@ -581,7 +581,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow +@@ -591,7 +591,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow AddChildView(std::move(auto_pip_setting_overlay)); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* profile = browser_view->browser()->profile(); auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile); auto* theme_service_factory = ThemeServiceFactory::GetForProfile(profile); -@@ -803,7 +803,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( +@@ -813,7 +813,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( for (ContentSettingImageView* view : content_setting_views_) view->SetIconColor(color_provider->GetColor(kColorPipWindowForeground)); -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // On Linux the top bar background will be drawn in OnPaint(). top_bar_container_view_->SetBackground(views::CreateSolidBackground( color_provider->GetColor(kColorPipWindowTopBarBackground))); -@@ -885,7 +885,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg +@@ -897,7 +897,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg BrowserNonClientFrameView::RemovedFromWidget(); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - gfx::Insets PictureInPictureBrowserFrameView::MirroredFrameBorderInsets() - const { + gfx::Insets + PictureInPictureBrowserFrameView::RestoredMirroredFrameBorderInsets() const { auto border = FrameBorderInsets(); -@@ -1153,7 +1153,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre +@@ -1189,7 +1189,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre // views::View implementations: void PictureInPictureBrowserFrameView::OnPaint(gfx::Canvas* canvas) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Draw the PiP window frame borders and shadows, including the top bar // background. if (window_frame_provider_) { -@@ -1287,7 +1287,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie +@@ -1344,7 +1344,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie } gfx::Insets PictureInPictureBrowserFrameView::FrameBorderInsets() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (window_frame_provider_) { const auto insets = window_frame_provider_->GetFrameThicknessDip(); const bool tiled = frame()->tiled(); -@@ -1305,7 +1305,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor +@@ -1362,7 +1362,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor } gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return FrameBorderInsets(); #elif !BUILDFLAG(IS_CHROMEOS_ASH) return gfx::Insets(kResizeBorder); -@@ -1326,7 +1326,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie +@@ -1383,7 +1383,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie top_height + border_thickness.bottom()); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool PictureInPictureBrowserFrameView::ShouldDrawFrameShadow() const { return static_cast( frame()->native_browser_frame()) diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h b/www/iridium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h index 0ce805c36a76..379a674e63fb 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h @@ -1,47 +1,47 @@ ---- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h @@ -27,7 +27,7 @@ #include "ui/views/layout/flex_layout_view.h" #include "ui/views/widget/widget_observer.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/window_frame_provider.h" #endif @@ -35,7 +35,7 @@ // parent window, so to prevent cutting off important dialogs we resize the // picture-in-picture window to fit them. While ChromeOS Ash also uses Aura, it // does not have this issue so we do not resize on ChromeOS Ash. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #define RESIZE_DOCUMENT_PICTURE_IN_PICTURE_TO_DIALOG 1 #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_LACROS) @@ -103,7 +103,7 @@ class PictureInPictureBrowserFrameView void Layout(PassKey) override; void AddedToWidget() override; void RemovedFromWidget() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - gfx::Insets MirroredFrameBorderInsets() const override; + gfx::Insets RestoredMirroredFrameBorderInsets() const override; gfx::Insets GetInputInsets() const override; SkRRect GetRestoredClipRegion() const override; @@ -195,7 +195,7 @@ class PictureInPictureBrowserFrameView // Returns true if there's an overlay view that's currently shown. bool IsOverlayViewVisible() const; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Returns whether a client-side shadow should be drawn for the window. bool ShouldDrawFrameShadow() const; -@@ -371,7 +371,7 @@ class PictureInPictureBrowserFrameView +@@ -376,7 +376,7 @@ class PictureInPictureBrowserFrameView // `top_bar_color_animation_`. std::optional current_foreground_color_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Used to draw window frame borders and shadow on Linux when GTK theme is // enabled. raw_ptr window_frame_provider_ = nullptr; diff --git a/www/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 f85dc9710875..e503d3f2c53b 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/frame/system_menu_model_builder.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/frame/system_menu_model_builder.cc -@@ -75,7 +75,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForBrowser +@@ -77,7 +77,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForBrowser ui::SimpleMenuModel* model) { // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) model->AddItemWithStringId(IDC_MINIMIZE_WINDOW, IDS_MINIMIZE_WINDOW_MENU); model->AddItemWithStringId(IDC_MAXIMIZE_WINDOW, IDS_MAXIMIZE_WINDOW_MENU); model->AddItemWithStringId(IDC_RESTORE_WINDOW, IDS_RESTORE_WINDOW_MENU); -@@ -91,7 +91,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForBrowser +@@ -97,7 +97,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForBrowser } // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) model->AddSeparator(ui::NORMAL_SEPARATOR); bool supports_server_side_decorations = true; #if BUILDFLAG(IS_OZONE) && !BUILDFLAG(IS_CHROMEOS) -@@ -155,7 +155,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForAppOrPo +@@ -171,7 +171,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_tab__strip__region__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_tab__strip__region__view.cc index 47bd3b2b75c7..688e7676b6c9 100644 --- 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 @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/frame/tab_strip_region_view.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/frame/tab_strip_region_view.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/frame/tab_strip_region_view.cc -@@ -201,7 +201,7 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr +@@ -205,7 +205,7 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr // TODO(crbug.com/40118868): Revisit the macro expression once build flag // switch of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // 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 172669e53bbf..f3c47fc767e4 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 2024-06-25 12:08:48 UTC +--- chrome/browser/ui/views/hung_renderer_view.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/hung_renderer_view.cc -@@ -406,7 +406,7 @@ void HungRendererDialogView::ForceCrashHungRenderer() +@@ -408,7 +408,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_omnibox_omnibox__view__views.cc b/www/iridium/files/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc index 236ad12c71b8..38f3f279b851 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/omnibox/omnibox_view_views.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/omnibox/omnibox_view_views.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/omnibox/omnibox_view_views.cc -@@ -1972,7 +1972,7 @@ void OmniboxViewViews::MaybeAddSendTabToSelfItem( +@@ -1992,7 +1992,7 @@ void OmniboxViewViews::MaybeAddSendTabToSelfItem( } void OmniboxViewViews::OnPopupOpened() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // It's not great for promos to overlap the omnibox if the user opens the // drop-down after showing the promo. This especially causes issues on Mac and // Linux due to z-order/rendering issues, see crbug.com/1225046 and diff --git a/www/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 88402f2522d9..73eb5d46947e 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/passwords/password_bubble_view_base.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/passwords/password_bubble_view_base.cc -@@ -37,7 +37,7 @@ +@@ -41,7 +41,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 -@@ -141,7 +141,7 @@ PasswordBubbleViewBase* PasswordBubbleViewBase::Create +@@ -156,7 +156,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_profile__menu__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc index 4452bb9cf3a9..a6ede4288e49 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/profiles/profile_menu_view.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/profiles/profile_menu_view.cc @@ -83,7 +83,7 @@ #include "ui/strings/grit/ui_strings.h" #include "ui/views/accessibility/view_accessibility.h" -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #endif -@@ -568,7 +568,7 @@ void ProfileMenuView::BuildIdentity() { +@@ -566,7 +566,7 @@ void ProfileMenuView::BuildIdentity() { badge_image_model, menu_title_, menu_subtitle_, management_label); } else { 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__menu__view__base.cc b/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc index ef6f2ec9bf77..d41d4a7390e0 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/profiles/profile_menu_view_base.cc.orig 2024-08-01 05:47:53 UTC +--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc -@@ -687,7 +687,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( +@@ -674,7 +674,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( // TODO(crbug.com/40118868): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // crbug.com/1161166: Orca does not read the accessible window title of the // bubble, so we duplicate it in the top-level menu item. To be revisited // after considering other options, including fixes on the AT side. diff --git a/www/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 41412a987f13..5519e31fdbaa 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/profiles/profile_picker_view.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/profiles/profile_picker_view.cc -@@ -87,7 +87,7 @@ +@@ -88,7 +88,7 @@ #include "chrome/browser/ui/views/profiles/first_run_flow_controller_lacros.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/shell_integration_linux.h" #endif -@@ -117,7 +117,7 @@ class ProfilePickerWidget : public views::Widget { +@@ -118,7 +118,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 5d27a1291f43..ae55c1d4cbfe 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,47 +1,47 @@ ---- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc -@@ -55,7 +55,7 @@ namespace { +@@ -57,7 +57,7 @@ namespace { const int kModalDialogWidth = 448; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) const int kManagedUserNoticeConfirmationDialogWidth = 512; const int kManagedUserNoticeConfirmationDialogHeight = 576; - const int kManagedUserNoticeConfirmationUpdatedDialogWidth = 900; -@@ -173,7 +173,7 @@ SigninViewControllerDelegateViews::CreateProfileCustom + const int kManagedUserNoticeConfirmationUpdatedDialogWidth = 780; +@@ -175,7 +175,7 @@ SigninViewControllerDelegateViews::CreateProfileCustom #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) || BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // static std::unique_ptr SigninViewControllerDelegateViews::CreateManagedUserNoticeConfirmationWebView( -@@ -335,7 +335,7 @@ SigninViewControllerDelegateViews::SigninViewControlle - SetButtons(ui::DIALOG_BUTTON_NONE); +@@ -338,7 +338,7 @@ SigninViewControllerDelegateViews::SigninViewControlle + SetButtons(static_cast(ui::mojom::DialogButton::kNone)); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // On the local profile creation dialog, cancelling the dialog (for instance // through the VKEY_ESCAPE accelerator) should delete the profile. if (delete_profile_on_cancel) { -@@ -425,7 +425,7 @@ void SigninViewControllerDelegateViews::DisplayModal() +@@ -427,7 +427,7 @@ void SigninViewControllerDelegateViews::DisplayModal() } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) void SigninViewControllerDelegateViews::DeleteProfileOnCancel() { ProfileAttributesEntry* entry = g_browser_process->profile_manager() -@@ -499,7 +499,7 @@ SigninViewControllerDelegate::CreateProfileCustomizati +@@ -502,7 +502,7 @@ SigninViewControllerDelegate::CreateProfileCustomizati #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) || BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // static SigninViewControllerDelegate* SigninViewControllerDelegate::CreateManagedUserNoticeDelegate( diff --git a/www/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 93b5bb65ffad..0de0622fa1e3 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,20 +1,20 @@ ---- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h.orig 2024-08-01 05:47:53 UTC +--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h -@@ -75,7 +75,7 @@ class SigninViewControllerDelegateViews +@@ -76,7 +76,7 @@ class SigninViewControllerDelegateViews #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) || BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) static std::unique_ptr CreateManagedUserNoticeConfirmationWebView( Browser* browser, -@@ -141,7 +141,7 @@ class SigninViewControllerDelegateViews +@@ -143,7 +143,7 @@ class SigninViewControllerDelegateViews InitializeSigninWebDialogUI initialize_signin_web_dialog_ui); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Deletes the ephemeral profile when cancelling the local profile creation // dialog. void DeleteProfileOnCancel(); diff --git a/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab.cc b/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab.cc index b1e4b7448df1..4a00c8854b29 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/tabs/tab.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/tabs/tab.cc -@@ -616,7 +616,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& +@@ -625,7 +625,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__drag__controller.cc b/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc index e0869c1f8e5e..6bd2814e7369 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc @@ -1,56 +1,47 @@ ---- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/tabs/tab_drag_controller.cc -@@ -98,7 +98,7 @@ - #include "components/remote_cocoa/browser/window.h" - #endif - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "ui/aura/client/drag_drop_client.h" - #endif - -@@ -218,7 +218,7 @@ bool IsWindowDragUsingSystemDragDropAllowed() { +@@ -214,7 +214,7 @@ bool IsWindowDragUsingSystemDragDropAllowed() { void UpdateSystemDnDDragImage(TabDragContext* attached_context, const gfx::ImageSkia& image) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) aura::Window* root_window = attached_context->GetWidget()->GetNativeWindow()->GetRootWindow(); if (aura::client::GetDragDropClient(root_window)) { -@@ -416,7 +416,7 @@ TabDragController::Liveness TabDragController::Init( +@@ -414,7 +414,7 @@ TabDragController::Liveness TabDragController::Init( // synchronous on desktop Linux, so use that. // - ChromeOS Ash // Releasing capture on Ash cancels gestures so avoid it. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) ref->can_release_capture_ = false; #endif ref->start_point_in_screen_ = -@@ -1065,7 +1065,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon +@@ -1020,7 +1020,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) // EndMoveLoop is going to snap the window back to its original location. // Hide it so users don't see this. Hiding a window in Linux aura causes // it to lose capture so skip it. -@@ -2151,7 +2151,7 @@ void TabDragController::CompleteDrag() { +@@ -2084,7 +2084,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 -@@ -2597,7 +2597,7 @@ TabDragController::Liveness TabDragController::GetLoca +@@ -2530,7 +2530,7 @@ TabDragController::Liveness TabDragController::GetLoca } // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Exclude windows which are pending deletion via Browser::TabStripEmpty(). // These windows can be returned in the Linux Aura port because the browser // window which was used for dragging is not hidden once all of its tabs are diff --git a/www/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 09b06f614337..26a837a7b5d0 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 2024-08-01 05:47:53 UTC +--- chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc -@@ -374,7 +374,7 @@ TabHoverCardBubbleView::TabHoverCardBubbleView(Tab* ta +@@ -375,7 +375,7 @@ TabHoverCardBubbleView::TabHoverCardBubbleView(Tab* ta // not become active. Setting this to false creates the need to explicitly // hide the hovercard on press, touch, and keyboard events. SetCanActivate(false); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) set_accept_events(false); #endif diff --git a/www/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 b0634cbed067..ff076a9d52d9 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,11 +1,20 @@ ---- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/user_education/browser_user_education_service.cc -@@ -1008,7 +1008,7 @@ void MaybeRegisterChromeFeaturePromos( +@@ -777,7 +777,7 @@ void MaybeRegisterChromeFeaturePromos( + "defaulted to saved for the first time."))); + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // kIPHSupervisedUserProfileSigninFeature + registry.RegisterFeature(std::move( + FeaturePromoSpecification::CreateForCustomAction( +@@ -1003,7 +1003,7 @@ void MaybeRegisterChromeFeaturePromos( FeaturePromoSpecification::AcceleratorInfo()) .SetBubbleArrow(HelpBubbleArrow::kTopLeft))); -#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 13b8a3d18132..d4158f06cda5 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc @@ -516,7 +516,7 @@ std::string GetFileExtension(FileExtension file_extens } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SiteConfig GetSiteConfigurationFromAppName(const std::string& app_name) { SiteConfig config; bool is_app_found = false; -@@ -2104,7 +2104,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc +@@ -2101,7 +2101,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( -@@ -3431,7 +3431,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna +@@ -3428,7 +3428,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 -@@ -3446,7 +3446,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3443,7 +3443,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 -@@ -3456,7 +3456,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3453,7 +3453,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; } -@@ -3472,7 +3472,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile +@@ -3469,7 +3469,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; } -@@ -4289,7 +4289,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu +@@ -4286,7 +4286,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 -@@ -4489,7 +4489,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre +@@ -4486,7 +4486,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); -@@ -4533,7 +4533,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr +@@ -4530,7 +4530,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_web__app__ui__manager__impl.cc b/www/iridium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc index 552ba41d9725..f74fddad0274 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 2024-08-01 05:47:53 UTC +--- chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc -@@ -577,7 +577,7 @@ void WebAppUiManagerImpl::MaybeShowIPHPromoForAppsLaun - content::WebContents* web_contents, +@@ -573,7 +573,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); -@@ -797,7 +797,7 @@ void WebAppUiManagerImpl::ClearWebAppSiteDataIfNeeded( +@@ -799,7 +799,7 @@ void WebAppUiManagerImpl::ClearWebAppSiteDataIfNeeded( } } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void WebAppUiManagerImpl::ShowIPHPromoForAppsLaunchedViaLinkCapturing( const Browser* browser, const webapps::AppId& app_id, diff --git a/www/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 cc17a0a6b21d..df6ee224b988 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,20 +1,29 @@ ---- chrome/browser/ui/webui/about/about_ui.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/webui/about/about_ui.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/webui/about/about_ui.cc @@ -596,7 +596,7 @@ std::string ChromeURLs(content::BrowserContext* browse return html; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::string AboutLinuxProxyConfig() { std::string data; AppendHeader(&data, -@@ -651,7 +651,7 @@ void AboutUIHTMLSource::StartDataRequest( +@@ -629,7 +629,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 +@@ -681,7 +681,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 new file mode 100644 index 000000000000..41e723ab0ead --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_ui_webui_about_about__ui.h @@ -0,0 +1,11 @@ +--- chrome/browser/ui/webui/about/about_ui.h.orig 2024-11-04 08:56:03 UTC ++++ chrome/browser/ui/webui/about/about_ui.h +@@ -50,7 +50,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 ccb583fdbda5..2ae70da32550 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 2024-08-01 05:47:53 UTC +--- chrome/browser/ui/webui/app_home/app_home_page_handler.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/webui/app_home/app_home_page_handler.cc -@@ -61,7 +61,7 @@ +@@ -62,7 +62,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_certificate__manager_certificate__manager__handler.cc b/www/iridium/files/patch-chrome_browser_ui_webui_certificate__manager_certificate__manager__handler.cc index 70a1ba9f502f..531b1662689a 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/webui/certificate_manager/certificate_manager_handler.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/webui/certificate_manager/certificate_manager_handler.cc -@@ -147,7 +147,7 @@ CertificateManagerPageHandler::GetCertSource( +@@ -154,7 +154,7 @@ CertificateManagerPageHandler::GetCertSource( "distrusted_certs", cert_verifier::mojom::CertificateTrust::kDistrusted); break; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) case certificate_manager_v2::mojom::CertificateSource:: kProvisionedClientCert: source_ptr = CreateProvisionedClientCertSource(profile_); diff --git a/www/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 d36b4891af17..b071ed284f44 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,29 +1,29 @@ ---- chrome/browser/ui/webui/certificate_manager/client_cert_sources.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/webui/certificate_manager/client_cert_sources.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/webui/certificate_manager/client_cert_sources.cc -@@ -36,7 +36,7 @@ +@@ -43,7 +43,7 @@ #include "net/ssl/client_cert_store_mac.h" #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h" #include "components/enterprise/client_certificates/core/certificate_provisioning_service.h" #include "components/enterprise/client_certificates/core/client_certificates_service.h" -@@ -98,7 +98,7 @@ std::unique_ptr CreatePlatformC +@@ -191,7 +191,7 @@ std::unique_ptr CreatePlatformC #endif } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // ClientCertStore implementation that always returns an empty list. The // CertificateProvisioningService implementation expects to wrap a platform // cert store, but here we only want to get results from the provisioning -@@ -373,7 +373,7 @@ CreatePlatformClientCertSource() { +@@ -673,7 +673,7 @@ CreatePlatformClientCertSource( #endif } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr CreateProvisionedClientCertSource(Profile* profile) { return std::make_unique( diff --git a/www/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 2f492d175e22..cb011886857f 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,11 +1,11 @@ ---- chrome/browser/ui/webui/certificate_manager/client_cert_sources.h.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/webui/certificate_manager/client_cert_sources.h.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/webui/certificate_manager/client_cert_sources.h -@@ -15,7 +15,7 @@ class Profile; - std::unique_ptr - CreatePlatformClientCertSource(); +@@ -18,7 +18,7 @@ CreatePlatformClientCertSource( + remote_client, + Profile* profile); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr CreateProvisionedClientCertSource(Profile* profile); #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_chrome__web__ui__configs.cc b/www/iridium/files/patch-chrome_browser_ui_webui_chrome__web__ui__configs.cc new file mode 100644 index 000000000000..f6e59ae50528 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_ui_webui_chrome__web__ui__configs.cc @@ -0,0 +1,33 @@ +--- chrome/browser/ui/webui/chrome_web_ui_configs.cc.orig 2024-11-04 08:56:03 UTC ++++ chrome/browser/ui/webui/chrome_web_ui_configs.cc +@@ -77,7 +77,7 @@ + #include "chrome/browser/ui/webui/certificate_manager/certificate_manager_ui.h" + #endif // BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI) + +-#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 + +@@ -148,10 +148,10 @@ void RegisterChromeWebUIConfigs() { + map.AddWebUIConfig(std::make_unique()); + #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) ++ // BUILDFLAG(IS_BSD) + + #if BUILDFLAG(ENABLE_EXTENSIONS) + map.AddWebUIConfig(std::make_unique()); +@@ -165,7 +165,7 @@ void RegisterChromeWebUIConfigs() { + map.AddWebUIConfig(std::make_unique()); + #endif // BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI) + +-#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()); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + 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 31011fed3ce0..0a0492396b59 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,114 +1,106 @@ ---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -189,7 +189,7 @@ +@@ -176,7 +176,7 @@ #include "chrome/browser/ui/webui/chromeos/chrome_url_disabled/chrome_url_disabled_ui.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/webui_js_error/webui_js_error_ui.h" #endif -@@ -214,21 +214,21 @@ +@@ -201,22 +201,22 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/webui/commerce/product_specifications_ui.h" #include "chrome/browser/ui/webui/discards/discards_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/sandbox/sandbox_internals_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/whats_new/whats_new_ui.h" - #include "chrome/browser/ui/webui/whats_new/whats_new_util.h" #endif -@@ -378,7 +378,7 @@ bool IsAboutUI(const GURL& url) { - #if !BUILDFLAG(IS_ANDROID) - || url.host_piece() == chrome::kChromeUITermsHost - #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - || url.host_piece() == chrome::kChromeUILinuxProxyConfigHost - #endif - #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -572,7 +572,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we + +@@ -506,7 +506,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we if (url.host_piece() == chrome::kChromeUIMobileSetupHost) return &NewWebUI; #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIWebUIJsErrorHost) return &NewWebUI; #endif -@@ -628,7 +628,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -558,7 +558,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we if (url.host_piece() == chrome::kChromeUINaClHost) return &NewWebUI; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) if (url.host_piece() == chrome::kChromeUITabModalConfirmDialogHost) -@@ -659,7 +659,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we - if (url.host_piece() == chrome::kChromeUIWebuiGalleryHost) { - return &NewWebUI; - } --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (url.host_piece() == chrome::kChromeUIWhatsNewHost && - whats_new::IsEnabled()) { - return &NewWebUI; -@@ -678,26 +678,26 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -599,26 +599,26 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUISandboxHost) { return &NewWebUI; } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIConnectorsInternalsHost) return &NewWebUI; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIDiscardsHost) return &NewWebUI; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIBrowserSwitchHost) return &NewWebUI; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIWebAppSettingsHost) return &NewWebUI; #endif -@@ -936,7 +936,7 @@ base::RefCountedMemory* ChromeWebUIControllerFactory:: +@@ -854,7 +854,7 @@ base::RefCountedMemory* ChromeWebUIControllerFactory:: if (page_url.host_piece() == chrome::kChromeUINewTabPageHost) return NewTabPageUI::GetFaviconResourceBytes(scale_factor); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (page_url.host_piece() == chrome::kChromeUIWhatsNewHost) return WhatsNewUI::GetFaviconResourceBytes(scale_factor); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +@@ -882,7 +882,7 @@ base::RefCountedMemory* ChromeWebUIControllerFactory:: + return ManagementUI::GetFaviconResourceBytes(scale_factor); + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + if (page_url.host_piece() == commerce::kChromeUICompareHost) { + return commerce::ProductSpecificationsUI::GetFaviconResourceBytes( + scale_factor); diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_internals_user__education_user__education__internals__page__handler__impl.cc b/www/iridium/files/patch-chrome_browser_ui_webui_internals_user__education_user__education__internals__page__handler__impl.cc new file mode 100644 index 000000000000..b17789032d90 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_ui_webui_internals_user__education_user__education__internals__page__handler__impl.cc @@ -0,0 +1,29 @@ +--- chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc.orig 2024-11-04 08:56:03 UTC ++++ chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc +@@ -41,7 +41,7 @@ + #include "ui/base/l10n/l10n_util.h" + #include "ui/base/webui/resource_path.h" + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/browser_navigator.h" + #include "chrome/browser/ui/browser_navigator_params.h" + #include "net/base/url_util.h" +@@ -81,7 +81,7 @@ user_education::NewBadgeRegistry* GetNewBadgeRegistry( + } + + whats_new::WhatsNewRegistry* GetWhatsNewRegistry() { +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return g_browser_process->GetFeatures()->whats_new_registry(); + #else + return nullptr; +@@ -765,7 +765,7 @@ void UserEducationInternalsPageHandlerImpl::ClearWhats + } + + 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_webui_interstitials_interstitial__ui.cc b/www/iridium/files/patch-chrome_browser_ui_webui_interstitials_interstitial__ui.cc index 7e9099bd2f51..7587842827eb 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/webui/interstitials/interstitial_ui.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/webui/interstitials/interstitial_ui.cc -@@ -70,7 +70,7 @@ +@@ -71,7 +71,7 @@ #include "components/security_interstitials/content/captive_portal_blocking_page.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/supervised_user/supervised_user_verification_controller_client.h" #include "chrome/browser/supervised_user/supervised_user_verification_page.h" #endif -@@ -376,7 +376,7 @@ std::unique_ptr CreateEnterpriseWa +@@ -378,7 +378,7 @@ std::unique_ptr CreateEnterpriseWa kRequestUrl)); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) std::unique_ptr - CreateSupervisedUserVerificationPage(content::WebContents* web_contents) { - const GURL kRequestUrl("https://supervised-user-verification.example.net"); -@@ -570,7 +570,7 @@ void InterstitialHTMLSource::StartDataRequest( + CreateSupervisedUserVerificationPage(content::WebContents* web_contents, + bool is_main_frame) { +@@ -594,7 +594,7 @@ void InterstitialHTMLSource::StartDataRequest( interstitial_delegate = CreateInsecureFormPage(web_contents); } else if (path_without_query == "/https_only") { interstitial_delegate = CreateHttpsOnlyModePage(web_contents); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) } else if (path_without_query == "/supervised-user-verify") { - interstitial_delegate = CreateSupervisedUserVerificationPage(web_contents); - #endif + interstitial_delegate = CreateSupervisedUserVerificationPage( + 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 de97e5cc9234..de4244ebc6d7 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 2024-08-01 05:47:53 UTC +--- chrome/browser/ui/webui/management/management_ui.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/webui/management/management_ui.cc -@@ -100,11 +100,11 @@ content::WebUIDataSource* CreateAndAddManagementUIHtml - {kManagementOnFileTransferVisibleData, +@@ -108,11 +108,11 @@ content::WebUIDataSource* CreateAndAddManagementUIHtml 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 55871295ca0f..247823238a2d 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/webui/management/management_ui_constants.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/webui/management/management_ui_constants.cc -@@ -82,12 +82,12 @@ const char kProfileReportingBrowser[] = "profileReport +@@ -88,12 +88,12 @@ const char kProfileReportingBrowser[] = "profileReport const char kProfileReportingExtension[] = "profileReportingExtension"; const char kProfileReportingPolicy[] = "profileReportingPolicy"; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kManagementScreenCaptureEvent[] = "managementScreenCaptureEvent"; const char kManagementScreenCaptureData[] = "managementScreenCaptureData"; #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kManagementDeviceSignalsDisclosure[] = "managementDeviceSignalsDisclosure"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/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 12a2e656ccaf..39be51b27f8f 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,29 +1,29 @@ ---- chrome/browser/ui/webui/management/management_ui_handler.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/webui/management/management_ui_handler.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/webui/management/management_ui_handler.cc @@ -58,7 +58,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) @@ -365,7 +365,7 @@ void ManagementUIHandler::AddReportingInfo(base::Value report_sources->Append(std::move(data)); } } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Insert the device signals consent disclosure at the end of browser // reporting section. auto* user_permission_service = GetUserPermissionService(); -@@ -543,7 +543,7 @@ policy::PolicyService* ManagementUIHandler::GetPolicyS +@@ -557,7 +557,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_searchbox_searchbox__handler.cc b/www/iridium/files/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc index 8db12ee36ae9..4ad3afd7a139 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 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/webui/searchbox/searchbox_handler.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/webui/searchbox/searchbox_handler.cc @@ -108,7 +108,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 @@ -168,7 +168,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 -@@ -675,7 +675,7 @@ std::string SearchboxHandler::ActionVectorIconToResour +@@ -645,7 +645,7 @@ std::string SearchboxHandler::ActionVectorIconToResour icon.name == omnibox::kShareWinChromeRefreshIcon.name) { return kWinShareIconResourceName; } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (icon.name == omnibox::kShareIcon.name || icon.name == omnibox::kShareLinuxChromeRefreshIcon.name) { return kLinuxShareIconResourceName; diff --git a/www/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 e0aa83f74cea..2df6715c5178 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,56 +1,56 @@ ---- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -141,7 +141,7 @@ +@@ -144,7 +144,7 @@ #include "chrome/browser/ui/chrome_pages.h" #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) #include "ui/display/screen.h" #endif -@@ -160,7 +160,7 @@ +@@ -163,7 +163,7 @@ #include "chrome/browser/ui/webui/certificate_manager_localized_strings_provider.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui_factory.h" #include "ui/ozone/public/ozone_platform.h" #endif -@@ -280,7 +280,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou +@@ -287,7 +287,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou {"focusHighlightLabel", IDS_SETTINGS_ACCESSIBILITY_FOCUS_HIGHLIGHT_DESCRIPTION}, #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"overscrollHistoryNavigationTitle", IDS_SETTINGS_OVERSCROLL_HISTORY_NAVIGATION_TITLE}, {"overscrollHistoryNavigationSubtitle", -@@ -405,7 +405,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -412,7 +412,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}, -@@ -413,7 +413,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -420,7 +420,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht {"classicTheme", IDS_SETTINGS_CLASSIC_THEME}, {"useClassicTheme", IDS_SETTINGS_USE_CLASSIC_THEME}, #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, #endif #if BUILDFLAG(IS_MAC) -@@ -441,7 +441,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -448,7 +448,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) bool show_custom_chrome_frame = ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_server_side_window_decorations; diff --git a/www/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 3f66f7587f14..bc57c47e2c58 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,20 @@ ---- chrome/browser/ui/webui/signin/profile_picker_handler.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/browser/ui/webui/signin/profile_picker_handler.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/webui/signin/profile_picker_handler.cc -@@ -203,7 +203,7 @@ base::Value::Dict CreateProfileEntry(const ProfileAttr +@@ -209,7 +209,7 @@ base::Value::Dict CreateProfileEntry(const ProfileAttr if (AccountInfo::IsManaged(entry->GetHostedDomain())) { profile_entry.Set("avatarBadge", "cr:domain"); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) } else if (base::FeatureList::IsEnabled( supervised_user::kShowKiteForSupervisedUsers) && entry->IsSupervised()) { +@@ -1224,7 +1224,7 @@ void ProfilePickerHandler::BeginFirstWebContentsProfil + } + + void ProfilePickerHandler::MaybeUpdateGuestMode() { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + if (!base::FeatureList::IsEnabled( + supervised_user::kHideGuestModeForSupervisedUsers)) { + return; diff --git a/www/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 25827a8ec42a..0f0395283fcb 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 2024-06-25 12:08:48 UTC +--- chrome/browser/ui/window_sizer/window_sizer.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/ui/window_sizer/window_sizer.cc -@@ -210,7 +210,7 @@ void WindowSizer::GetBrowserWindowBoundsAndShowState( +@@ -209,7 +209,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_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 ca787bb683c7..b1171e872198 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 2024-08-27 06:28:16 UTC +--- chrome/browser/visited_url_ranking/visited_url_ranking_service_factory.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/visited_url_ranking/visited_url_ranking_service_factory.cc -@@ -41,7 +41,7 @@ +@@ -44,7 +44,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" -@@ -114,7 +114,7 @@ VisitedURLRankingServiceFactory::BuildServiceInstanceF +@@ -118,7 +118,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_extension__status__utils.h b/www/iridium/files/patch-chrome_browser_web__applications_extension__status__utils.h index e04815e8e0d2..b706510c4783 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 2024-06-25 12:08:48 UTC +--- chrome/browser/web_applications/extension_status_utils.h.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/web_applications/extension_status_utils.h -@@ -55,7 +55,7 @@ bool IsExternalExtensionUninstalled(content::BrowserCo - bool ClearExternalExtensionUninstalled(content::BrowserContext* context, - const std::string& extension_id); +@@ -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 3887c1f2af1e..1e921900e07a 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,20 +1,20 @@ ---- chrome/browser/web_applications/extensions/extension_status_utils.cc.orig 2024-06-25 12:08:48 UTC +--- chrome/browser/web_applications/extensions/extension_status_utils.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/web_applications/extensions/extension_status_utils.cc @@ -25,7 +25,7 @@ namespace { const char* g_preinstalled_app_for_testing = nullptr; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(b/268221237): Remove this allow-list. const char kDefaultAllowedExtensionIds[] = "alhngdkjgnedakdlnamimgfihgkmenbh," -@@ -113,7 +113,7 @@ bool ClearExternalExtensionUninstalled(content::Browse - extension_id); +@@ -107,7 +107,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_os__integration_web__app__shortcut.cc b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc index 72745423b8fc..aa30cdd31b2f 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 2024-06-25 12:08:48 UTC +--- chrome/browser/web_applications/os_integration/web_app_shortcut.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/web_applications/os_integration/web_app_shortcut.cc -@@ -65,7 +65,7 @@ namespace { +@@ -71,7 +71,7 @@ namespace { #if BUILDFLAG(IS_MAC) const int kDesiredIconSizesForShortcut[] = {16, 32, 128, 256, 512}; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Linux supports icons of any size. FreeDesktop Icon Theme Specification states // that "Minimally you should install a 48x48 icon in the hicolor theme." const int kDesiredIconSizesForShortcut[] = {16, 32, 48, 128, 256, 512}; -@@ -227,7 +227,7 @@ std::unique_ptr BuildShortcutInfoWithout +@@ -251,7 +251,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_policy_web__app__policy__manager.cc b/www/iridium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc index 7bc396418d83..e3370e1f582f 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 2024-06-25 12:08:48 UTC +--- chrome/browser/web_applications/policy/web_app_policy_manager.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/web_applications/policy/web_app_policy_manager.cc -@@ -101,7 +101,7 @@ namespace web_app { +@@ -102,7 +102,7 @@ namespace web_app { BASE_FEATURE(kDesktopPWAsForceUnregisterOSIntegration, "DesktopPWAsForceUnregisterOSIntegration", -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/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 20cb91e33a69..fc9c2bbce747 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 2024-08-27 06:28:16 UTC +--- chrome/browser/web_applications/test/os_integration_test_override_impl.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/web_applications/test/os_integration_test_override_impl.cc -@@ -46,7 +46,7 @@ +@@ -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 -@@ -131,7 +131,7 @@ std::vector GetFileExtensionsForProgId( +@@ -130,7 +130,7 @@ std::vector GetFileExtensionsForProgId( } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Performs a blocking read of app icons from the disk. SkColor IconManagerReadIconTopLeftColorForSize(WebAppIconManager& icon_manager, const webapps::AppId& app_id, -@@ -266,7 +266,7 @@ bool OsIntegrationTestOverrideImpl::SimulateDeleteShor +@@ -265,7 +265,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; -@@ -314,7 +314,7 @@ bool OsIntegrationTestOverrideImpl::DeleteApplicationM +@@ -313,7 +313,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(); -@@ -328,7 +328,7 @@ bool OsIntegrationTestOverrideImpl::IsRunOnOsLoginEnab +@@ -327,7 +327,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)); -@@ -384,7 +384,7 @@ bool OsIntegrationTestOverrideImpl::IsFileExtensionHan +@@ -383,7 +383,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_) { -@@ -427,7 +427,7 @@ OsIntegrationTestOverrideImpl::GetShortcutIconTopLeftC +@@ -426,7 +426,7 @@ OsIntegrationTestOverrideImpl::GetShortcutIconTopLeftC return std::nullopt; } return GetIconTopLeftColorFromShortcutFile(shortcut_path); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) WebAppProvider* provider = WebAppProvider::GetForLocalAppsUnchecked(profile); if (!provider) { return std::nullopt; -@@ -477,7 +477,7 @@ base::FilePath OsIntegrationTestOverrideImpl::GetShort +@@ -476,7 +476,7 @@ base::FilePath OsIntegrationTestOverrideImpl::GetShort app_installed_profiles.end()) { return shortcut_path; } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string shortcut_filename = "chrome-" + app_id + "-" + profile->GetBaseName().value() + ".desktop"; base::FilePath shortcut_path = shortcut_dir.Append(shortcut_filename); -@@ -502,7 +502,7 @@ bool OsIntegrationTestOverrideImpl::IsShortcutCreated( +@@ -501,7 +501,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); -@@ -690,7 +690,7 @@ void OsIntegrationTestOverrideImpl::EnableOrDisablePat +@@ -694,7 +694,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(); } -@@ -741,7 +741,7 @@ OsIntegrationTestOverrideImpl::OsIntegrationTestOverri +@@ -745,7 +745,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()); -@@ -754,7 +754,7 @@ OsIntegrationTestOverrideImpl::OsIntegrationTestOverri +@@ -758,7 +758,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) { -@@ -826,7 +826,7 @@ OsIntegrationTestOverrideImpl::~OsIntegrationTestOverr +@@ -830,7 +830,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 fe45ac9c0766..169e95fcf3ec 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 2024-06-25 12:08:48 UTC +--- chrome/browser/web_applications/test/os_integration_test_override_impl.h.orig 2024-11-04 08:56:03 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) -@@ -242,7 +242,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra +@@ -241,7 +241,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(); -@@ -322,7 +322,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra +@@ -321,7 +321,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__install__info.h b/www/iridium/files/patch-chrome_browser_web__applications_web__app__install__info.h index 9bb0cf7b7e30..2c5f04b78a0b 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 2024-08-01 05:47:53 UTC +--- chrome/browser/web_applications/web_app_install_info.h.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/web_applications/web_app_install_info.h -@@ -38,7 +38,7 @@ +@@ -39,7 +39,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_webauthn_chrome__authenticator__request__delegate.cc b/www/iridium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc index 72c7f46ea975..e5c11d6ab702 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 2024-08-27 06:28:16 UTC +--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc -@@ -1095,7 +1095,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureDisc +@@ -1143,7 +1143,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 b0a0381acae9..900d3dcbb9f4 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 2024-08-27 06:28:16 UTC +--- chrome/browser/webauthn/enclave_manager.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/browser/webauthn/enclave_manager.cc -@@ -686,7 +686,7 @@ base::flat_set GetGaiaIDs( +@@ -693,7 +693,7 @@ base::flat_set GetGaiaIDs( std::string UserVerifyingLabelToString(crypto::UserVerifyingKeyLabel label) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) return label; #else return std::string("placeholder"); -@@ -696,7 +696,7 @@ std::string UserVerifyingLabelToString(crypto::UserVer +@@ -703,7 +703,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_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) return saved_label; #else return std::nullopt; 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 c11d5208163b..e8c0634c911d 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 2024-06-25 12:08:48 UTC +--- chrome/common/channel_info_posix.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/common/channel_info_posix.cc -@@ -93,7 +93,7 @@ std::string GetChannelSuffixForDataDir() { +@@ -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() +@@ -123,7 +123,7 @@ std::string GetChannelSuffixForExtraFlagsEnvVarName() // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) std::string GetDesktopName(base::Environment* env) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) // Google Chrome packaged as a snap is a special case: the application name diff --git a/www/iridium/files/patch-chrome_common_chrome__features.cc b/www/iridium/files/patch-chrome_common_chrome__features.cc index e1120facff78..3a26c3f5504c 100644 --- a/www/iridium/files/patch-chrome_common_chrome__features.cc +++ b/www/iridium/files/patch-chrome_common_chrome__features.cc @@ -1,56 +1,56 @@ ---- chrome/common/chrome_features.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/common/chrome_features.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/common/chrome_features.cc -@@ -75,7 +75,7 @@ BASE_FEATURE(kUseAdHocSigningForWebAppShims, +@@ -82,7 +82,7 @@ BASE_FEATURE(kUseAdHocSigningForWebAppShims, #endif // BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Enables or disables the Autofill survey triggered by opening a prompt to // save address info. BASE_FEATURE(kAutofillAddressSurvey, -@@ -93,7 +93,7 @@ BASE_FEATURE(kAutofillPasswordSurvey, +@@ -100,7 +100,7 @@ BASE_FEATURE(kAutofillPasswordSurvey, base::FEATURE_DISABLED_BY_DEFAULT); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Enables the Restart background mode optimization. When all Chrome UI is // closed and it goes in the background, allows to restart the browser to // discard memory. -@@ -260,7 +260,7 @@ BASE_FEATURE(kDesktopPWAsElidedExtensionsMenu, +@@ -267,7 +267,7 @@ BASE_FEATURE(kDesktopPWAsElidedExtensionsMenu, BASE_FEATURE(kDesktopPWAsRunOnOsLogin, "DesktopPWAsRunOnOsLogin", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -309,7 +309,7 @@ BASE_FEATURE(kDesktopPWAsTabStripSettings, +@@ -299,7 +299,7 @@ BASE_FEATURE(kDesktopPWAsTabStripSettings, "DesktopPWAsTabStripSettings", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Controls whether Chrome Apps are supported. See https://crbug.com/1221251. // If the feature is disabled, Chrome Apps continue to work. If enabled, Chrome // Apps will not launch and will be marked in the UI as deprecated. -@@ -897,7 +897,7 @@ BASE_FEATURE(kKAnonymityServiceStorage, +@@ -871,7 +871,7 @@ BASE_FEATURE(kKAnonymityServiceStorage, "KAnonymityServiceStorage", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) BASE_FEATURE(kLinuxLowMemoryMonitor, "LinuxLowMemoryMonitor", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -910,7 +910,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -884,7 +884,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit &kLinuxLowMemoryMonitor, "critical_level", 255}; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_FEATURE(kListWebAppsSwitch, "ListWebAppsSwitch", base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/www/iridium/files/patch-chrome_common_chrome__features.h b/www/iridium/files/patch-chrome_common_chrome__features.h index e55a205a9bee..bc58ee21d92d 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 2024-08-27 06:28:16 UTC +--- chrome/common/chrome_features.h.orig 2024-11-04 08:56:03 UTC +++ chrome/common/chrome_features.h -@@ -55,13 +55,13 @@ BASE_DECLARE_FEATURE(kUseAdHocSigningForWebAppShims); +@@ -60,13 +60,13 @@ BASE_DECLARE_FEATURE(kUseAdHocSigningForWebAppShims); #endif // BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillAddressSurvey); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillCardSurvey); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillPasswordSurvey); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kBackgroundModeAllowRestart); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -192,7 +192,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsPreventClose); +@@ -179,7 +179,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsPreventClose); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kChromeAppsDeprecation); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kShortcutsNotApps); -@@ -545,7 +545,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceOHTTPRequests); +@@ -512,7 +512,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; -@@ -553,7 +553,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -520,7 +520,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__switches.cc b/www/iridium/files/patch-chrome_common_chrome__switches.cc index 00ec8cf85a26..d7bfbe110b52 100644 --- a/www/iridium/files/patch-chrome_common_chrome__switches.cc +++ b/www/iridium/files/patch-chrome_common_chrome__switches.cc @@ -1,19 +1,19 @@ ---- chrome/common/chrome_switches.cc.orig 2024-08-27 06:28:16 UTC +--- chrome/common/chrome_switches.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/common/chrome_switches.cc -@@ -898,14 +898,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- +@@ -886,14 +886,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon"; // Causes the browser to launch directly in guest mode. const char kGuest[] = "guest"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Writes open and installed web apps for each profile to the specified file // without launching a new browser window or tab. Pass a absolute file path to // specify where to output the information. Can be used together with optional diff --git a/www/iridium/files/patch-chrome_common_chrome__switches.h b/www/iridium/files/patch-chrome_common_chrome__switches.h index b94d23d0c45a..661dcb4d1417 100644 --- a/www/iridium/files/patch-chrome_common_chrome__switches.h +++ b/www/iridium/files/patch-chrome_common_chrome__switches.h @@ -1,17 +1,17 @@ ---- chrome/common/chrome_switches.h.orig 2024-08-27 06:28:16 UTC +--- chrome/common/chrome_switches.h.orig 2024-11-04 08:56:03 UTC +++ chrome/common/chrome_switches.h -@@ -279,12 +279,12 @@ extern const char kAllowNaClSocketAPI[]; +@@ -275,12 +275,12 @@ extern const char kAllowNaClSocketAPI[]; #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kEnableNewAppMenuIcon[]; extern const char kGuest[]; #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_crash__keys.cc b/www/iridium/files/patch-chrome_common_crash__keys.cc new file mode 100644 index 000000000000..1d9cb58c5620 --- /dev/null +++ b/www/iridium/files/patch-chrome_common_crash__keys.cc @@ -0,0 +1,28 @@ +--- chrome/common/crash_keys.cc.orig 2024-11-04 08:56:03 UTC ++++ chrome/common/crash_keys.cc +@@ -56,7 +56,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); } + +@@ -201,6 +203,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()) { +@@ -212,6 +215,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_pref__names.h b/www/iridium/files/patch-chrome_common_pref__names.h index cded693960c4..f0aee031aa3d 100644 --- a/www/iridium/files/patch-chrome_common_pref__names.h +++ b/www/iridium/files/patch-chrome_common_pref__names.h @@ -1,91 +1,91 @@ ---- chrome/common/pref_names.h.orig 2024-08-27 06:28:16 UTC +--- chrome/common/pref_names.h.orig 2024-11-04 08:56:03 UTC +++ chrome/common/pref_names.h -@@ -1364,7 +1364,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u +@@ -1379,7 +1379,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Linux specific preference on whether we should match the system theme. inline constexpr char kSystemTheme[] = "extensions.theme.system_theme"; #endif -@@ -1507,7 +1507,7 @@ inline constexpr char kShowUpdatePromotionInfoBar[] = +@@ -1552,7 +1552,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"; -@@ -2112,7 +2112,7 @@ inline constexpr char kDownloadDefaultDirectory[] = +@@ -2159,7 +2159,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 -@@ -2549,14 +2549,14 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s +@@ -2602,14 +2602,14 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s inline constexpr char kMediaCdmOriginData[] = "media.cdm.origin_data"; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // A boolean pref to determine whether or not the network service is running // sandboxed. inline constexpr char kNetworkServiceSandboxEnabled[] = "net.network_service_sandbox"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Records whether the user has seen an HTTP auth "negotiate" header. inline constexpr char kReceivedHttpAuthNegotiateHeader[] = "net.received_http_auth_negotiate_headers"; -@@ -2634,7 +2634,7 @@ inline constexpr char kAmbientAuthenticationInPrivateM +@@ -2687,7 +2687,7 @@ inline constexpr char kAmbientAuthenticationInPrivateM inline constexpr char kBasicAuthOverHttpEnabled[] = "auth.basic_over_http_enabled"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Boolean that specifies whether OK-AS-DELEGATE flag from KDC is respected // along with kAuthNegotiateDelegateAllowlist. inline constexpr char kAuthNegotiateDelegateByKdcPolicy[] = -@@ -3164,7 +3164,7 @@ inline constexpr char kDeviceWeeklyScheduledSuspend[] +@@ -3228,7 +3228,7 @@ inline constexpr char kDeviceWeeklyScheduledSuspend[] #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Defines administrator-set availability of Chrome for Testing. inline constexpr char kChromeForTestingAllowed[] = "chrome_for_testing.allowed"; #endif -@@ -3760,7 +3760,7 @@ inline constexpr char kFileOrDirectoryPickerWithoutGes +@@ -3824,7 +3824,7 @@ inline constexpr char kFileOrDirectoryPickerWithoutGes inline constexpr char kSandboxExternalProtocolBlocked[] = "profile.sandbox_external_protocol_blocked"; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Boolean that indicates if system notifications are allowed to be used in // place of Chrome notifications. inline constexpr char kAllowSystemNotifications[] = -@@ -4034,7 +4034,7 @@ inline constexpr char kLensDesktopNTPSearchEnabled[] = +@@ -4094,7 +4094,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 -@@ -4128,7 +4128,7 @@ inline constexpr char kPrintingOAuth2AuthorizationServ +@@ -4188,7 +4188,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 87996b7e01ac..d92641ea27c8 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 2024-08-27 06:28:16 UTC +--- chrome/common/url_constants.h.orig 2024-11-04 08:56:03 UTC +++ chrome/common/url_constants.h -@@ -927,7 +927,7 @@ inline constexpr char kOutdatedPluginLearnMoreURL[] = +@@ -929,7 +929,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.h b/www/iridium/files/patch-chrome_common_webui__url__constants.h index 286c56511919..1dee38abe37d 100644 --- a/www/iridium/files/patch-chrome_common_webui__url__constants.h +++ b/www/iridium/files/patch-chrome_common_webui__url__constants.h @@ -1,56 +1,56 @@ ---- chrome/common/webui_url_constants.h.orig 2024-08-27 06:28:16 UTC +--- chrome/common/webui_url_constants.h.orig 2024-11-04 08:56:03 UTC +++ chrome/common/webui_url_constants.h -@@ -564,24 +564,24 @@ inline constexpr char16_t kOsUISystemURL[] = u"os://sy +@@ -581,24 +581,24 @@ inline constexpr char16_t kOsUISystemURL[] = u"os://sy inline constexpr char kOsUIVersionURL[] = "os://version"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) inline constexpr char kChromeUIWebUIJsErrorHost[] = "webuijserror"; inline constexpr char kChromeUIWebUIJsErrorURL[] = "chrome://webuijserror/"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) inline constexpr char kChromeUIConnectorsInternalsHost[] = "connectors-internals"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) inline constexpr char kChromeUIDiscardsHost[] = "discards"; inline constexpr char kChromeUIDiscardsURL[] = "chrome://discards/"; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) inline constexpr char kChromeUIWebAppSettingsHost[] = "app-settings"; inline constexpr char kChromeUIWebAppSettingsURL[] = "chrome://app-settings/"; inline constexpr char kChromeUIWhatsNewHost[] = "whats-new"; -@@ -593,13 +593,13 @@ inline constexpr char kChromeUILinuxProxyConfigHost[] +@@ -610,13 +610,13 @@ inline constexpr char kChromeUILinuxProxyConfigHost[] #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) inline constexpr char kChromeUISandboxHost[] = "sandbox"; #endif // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) inline constexpr char kChromeUIBrowserSwitchHost[] = "browser-switch"; inline constexpr char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/"; -@@ -621,7 +621,7 @@ inline constexpr char kChromeUIProfilePickerStartupQue +@@ -638,7 +638,7 @@ inline constexpr char kChromeUIProfilePickerStartupQue inline constexpr char kChromeUIProfilePickerUrl[] = "chrome://profile-picker/"; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) inline constexpr char kChromeUITabModalConfirmDialogHost[] = diff --git a/www/iridium/files/patch-chrome_enterprise__companion_enterprise__companion__client.cc b/www/iridium/files/patch-chrome_enterprise__companion_enterprise__companion__client.cc index 9018232f5994..51c86c486b16 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 2024-08-27 06:28:16 UTC +--- chrome/enterprise_companion/enterprise_companion_client.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/enterprise_companion/enterprise_companion_client.cc -@@ -33,7 +33,7 @@ namespace { +@@ -36,7 +36,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_test_chromedriver_key__converter__unittest.cc b/www/iridium/files/patch-chrome_test_chromedriver_key__converter__unittest.cc index 63508afbbf23..a97ec528e8b8 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 2022-04-01 07:48:30 UTC +--- chrome/test/chromedriver/key_converter_unittest.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/test/chromedriver/key_converter_unittest.cc -@@ -246,7 +246,7 @@ TEST(KeyConverter, ToggleModifiers) { +@@ -251,7 +251,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 -@@ -303,7 +303,7 @@ TEST(KeyConverter, AllEnglishKeyboardTextChars) { +@@ -308,7 +308,7 @@ TEST(KeyConverter, AllEnglishKeyboardTextChars) { TEST(KeyConverter, AllSpecialWebDriverKeysOnEnglishKeyboard) { ui::ScopedKeyboardLayout keyboard_layout(ui::KEYBOARD_LAYOUT_ENGLISH_US); const char kTextForKeys[] = { -#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_supervised__user_google__auth__state__waiter__mixin.cc b/www/iridium/files/patch-chrome_test_supervised__user_google__auth__state__waiter__mixin.cc new file mode 100644 index 000000000000..d2f2b0bb7fdc --- /dev/null +++ b/www/iridium/files/patch-chrome_test_supervised__user_google__auth__state__waiter__mixin.cc @@ -0,0 +1,11 @@ +--- chrome/test/supervised_user/google_auth_state_waiter_mixin.cc.orig 2024-11-04 08:56:03 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 new file mode 100644 index 000000000000..d59ffabde329 --- /dev/null +++ b/www/iridium/files/patch-chrome_updater_app_app__uninstall.cc @@ -0,0 +1,11 @@ +--- chrome/updater/app/app_uninstall.cc.orig 2024-11-04 08:56:03 UTC ++++ chrome/updater/app/app_uninstall.cc +@@ -161,7 +161,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 2760dd366860..6a501e5b7e8c 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 2024-06-25 12:08:48 UTC +--- chrome/updater/configurator.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/updater/configurator.cc -@@ -67,7 +67,7 @@ Configurator::Configurator(scoped_refptr +@@ -69,7 +69,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_utility_services.cc b/www/iridium/files/patch-chrome_utility_services.cc index 2c0328a17b36..78f6f6051cdb 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 2024-08-01 05:47:53 UTC +--- chrome/utility/services.cc.orig 2024-11-04 08:56:03 UTC +++ chrome/utility/services.cc -@@ -57,7 +57,7 @@ +@@ -51,7 +51,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) -@@ -214,7 +214,7 @@ auto RunMacNotificationService( +@@ -210,7 +210,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& +@@ -474,7 +474,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-chromecast_browser_cast__content__browser__client.cc b/www/iridium/files/patch-chromecast_browser_cast__content__browser__client.cc index d5a0e0ea63d4..730aa7b9fdee 100644 --- a/www/iridium/files/patch-chromecast_browser_cast__content__browser__client.cc +++ b/www/iridium/files/patch-chromecast_browser_cast__content__browser__client.cc @@ -1,11 +1,11 @@ ---- chromecast/browser/cast_content_browser_client.cc.orig 2024-06-25 12:08:48 UTC +--- chromecast/browser/cast_content_browser_client.cc.orig 2024-11-04 08:56:03 UTC +++ chromecast/browser/cast_content_browser_client.cc -@@ -431,7 +431,7 @@ void CastContentBrowserClient::AppendExtraCommandLineS +@@ -429,7 +429,7 @@ void CastContentBrowserClient::AppendExtraCommandLineS switches::kAudioOutputChannels)); } } else if (process_type == switches::kGpuProcess) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Necessary for accelerated 2d canvas. By default on Linux, Chromium // assumes GLES2 contexts can be lost to a power-save mode, which breaks GPU // canvas apps. diff --git a/www/iridium/files/patch-components_autofill_core_browser_autofill__optimization__guide.cc b/www/iridium/files/patch-components_autofill_core_browser_autofill__optimization__guide.cc new file mode 100644 index 000000000000..22c452fb20a7 --- /dev/null +++ b/www/iridium/files/patch-components_autofill_core_browser_autofill__optimization__guide.cc @@ -0,0 +1,11 @@ +--- components/autofill/core/browser/autofill_optimization_guide.cc.orig 2024-11-04 08:56:03 UTC ++++ components/autofill/core/browser/autofill_optimization_guide.cc +@@ -186,7 +186,7 @@ void AutofillOptimizationGuide::OnDidParseForm( + } + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + if (has_credit_card_field && + !personal_data_manager->payments_data_manager() + .GetServerCreditCards() diff --git a/www/iridium/files/patch-components_autofill_core_browser_payments__data__manager.cc b/www/iridium/files/patch-components_autofill_core_browser_payments__data__manager.cc index c67d45e242d3..0602d5994723 100644 --- a/www/iridium/files/patch-components_autofill_core_browser_payments__data__manager.cc +++ b/www/iridium/files/patch-components_autofill_core_browser_payments__data__manager.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/browser/payments_data_manager.cc.orig 2024-08-27 06:28:16 UTC +--- components/autofill/core/browser/payments_data_manager.cc.orig 2024-11-04 08:56:03 UTC +++ components/autofill/core/browser/payments_data_manager.cc -@@ -1055,7 +1055,7 @@ bool PaymentsDataManager::ShouldShowCardsFromAccountOp +@@ -1054,7 +1054,7 @@ bool PaymentsDataManager::ShouldShowCardsFromAccountOp // The feature is only for Linux, Windows, Mac, and Fuchsia. // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) // This option should only be shown for users that have not enabled the Sync // Feature and that have server credit cards available. diff --git a/www/iridium/files/patch-components_autofill_core_common_autofill__features.cc b/www/iridium/files/patch-components_autofill_core_common_autofill__features.cc deleted file mode 100644 index 742c49c1df70..000000000000 --- a/www/iridium/files/patch-components_autofill_core_common_autofill__features.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/autofill/core/common/autofill_features.cc.orig 2024-08-27 06:28:16 UTC -+++ components/autofill/core/common/autofill_features.cc -@@ -673,7 +673,7 @@ BASE_FEATURE(kAutofillSilentProfileUpdateForInsufficie - // Enabled by default for Mac and Windows platforms. - BASE_FEATURE(kAutofillContentEditableChangeEvents, - "AutofillContentEditableChangeEvents", --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT - #else - base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/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 e282dc85f91a..aa127c674e04 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,20 +1,20 @@ ---- components/autofill/core/common/autofill_payments_features.cc.orig 2024-08-27 06:28:16 UTC +--- components/autofill/core/common/autofill_payments_features.cc.orig 2024-11-04 08:56:03 UTC +++ components/autofill/core/common/autofill_payments_features.cc @@ -8,7 +8,7 @@ namespace autofill::features { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) // When enabled, Chrome will extract the checkout amount from the checkout page // of the allowlisted merchant websites. -@@ -272,7 +272,7 @@ BASE_FEATURE(kAutofillSyncEwalletAccounts, +@@ -320,7 +320,7 @@ BASE_FEATURE(kAutofillSyncEwalletAccounts, bool ShouldShowImprovedUserConsentForCreditCardSave() { // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // The new user consent UI is fully launched on MacOS, Windows and Linux. return true; diff --git a/www/iridium/files/patch-components_autofill_core_common_autofill__prefs.cc b/www/iridium/files/patch-components_autofill_core_common_autofill__prefs.cc new file mode 100644 index 000000000000..c121e072809f --- /dev/null +++ b/www/iridium/files/patch-components_autofill_core_common_autofill__prefs.cc @@ -0,0 +1,11 @@ +--- components/autofill/core/common/autofill_prefs.cc.orig 2024-11-04 08:56:03 UTC ++++ components/autofill/core/common/autofill_prefs.cc +@@ -118,7 +118,7 @@ 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) + registry->RegisterBooleanPref(prefs::kAutofillPredictionImprovementsEnabled, + false); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || 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 new file mode 100644 index 000000000000..6d5e59db929f --- /dev/null +++ b/www/iridium/files/patch-components_autofill_core_common_autofill__prefs.h @@ -0,0 +1,11 @@ +--- components/autofill/core/common/autofill_prefs.h.orig 2024-11-04 08:56:03 UTC ++++ components/autofill/core/common/autofill_prefs.h +@@ -73,7 +73,7 @@ inline constexpr char kAutofillPaymentCvcStorage[] = + inline constexpr char kAutofillPaymentCardBenefits[] = + "autofill.payment_card_benefits"; + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Boolean that controls improved autofill filling predictions. When enabled, + // the autofill functionality is enhanced with adopting user data to + // the form being filled in, which is triggered by the user via an extra 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 299cffacd351..6fef9d184057 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,29 @@ ---- components/commerce/core/commerce_feature_list.cc.orig 2024-08-27 06:28:16 UTC +--- components/commerce/core/commerce_feature_list.cc.orig 2024-11-04 08:56:03 UTC +++ components/commerce/core/commerce_feature_list.cc @@ -168,7 +168,7 @@ BASE_FEATURE(kPriceInsights, "PriceInsights", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kPriceInsightsRegionLaunched, "PriceInsightsRegionLaunched", base::FEATURE_ENABLED_BY_DEFAULT); -@@ -261,7 +261,7 @@ const base::FeatureParam kDeleteAllMerchantsOnCl +@@ -246,7 +246,7 @@ const base::FeatureParam kDiscountOnShoppyPage{ + &kEnableDiscountInfoApi, kDiscountOnShoppyPageParam, false}; + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + BASE_FEATURE(kEnableDiscountInfoApiRegionLaunched, + "EnableDiscountInfoApiRegionLaunched", + base::FEATURE_ENABLED_BY_DEFAULT); +@@ -281,7 +281,7 @@ const base::FeatureParam kDeleteAllMerchantsOnCl BASE_FEATURE(kShoppingList, "ShoppingList", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kShoppingListRegionLaunched, "ShoppingListRegionLaunched", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/iridium/files/patch-components_constrained__window_constrained__window__views.cc b/www/iridium/files/patch-components_constrained__window_constrained__window__views.cc index d9f96e6b1ab8..c14c944f68ca 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 2024-08-27 06:28:16 UTC +--- components/constrained_window/constrained_window_views.cc.orig 2024-11-04 08:56:03 UTC +++ components/constrained_window/constrained_window_views.cc -@@ -369,7 +369,7 @@ bool SupportsGlobalScreenCoordinates() { +@@ -372,7 +372,7 @@ bool SupportsGlobalScreenCoordinates() { } bool PlatformClipsChildrenToViewport() { -#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/iridium/files/patch-components_crash_core_app_BUILD.gn b/www/iridium/files/patch-components_crash_core_app_BUILD.gn index 65a005a77abe..21fd40bc94b0 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 2024-06-25 12:08:48 UTC +--- components/crash/core/app/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ components/crash/core/app/BUILD.gn -@@ -82,6 +82,10 @@ static_library("app") { +@@ -70,6 +70,10 @@ static_library("app") { ] } + if (is_bsd) { + sources -= [ "crashpad.cc" ] + } + defines = [ "CRASH_IMPLEMENTATION" ] public_deps = [ ":lib" ] -@@ -95,7 +99,7 @@ static_library("app") { +@@ -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" ] } -@@ -115,7 +119,7 @@ static_library("app") { +@@ -103,7 +107,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", -@@ -245,11 +249,6 @@ if (is_mac || is_android || is_linux || is_chromeos) { +@@ -233,11 +237,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)) { + if (is_mac && (is_component_build || is_asan || is_ubsan_any)) { ldflags = [ 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 660e12bef1b5..fc1ea1de7c3c 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 2024-06-25 12:08:48 UTC +--- components/discardable_memory/service/discardable_shared_memory_manager.cc.orig 2024-11-04 08:56:03 UTC +++ components/discardable_memory/service/discardable_shared_memory_manager.cc -@@ -176,7 +176,7 @@ uint64_t GetDefaultMemoryLimit() { +@@ -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_enterprise_watermarking_watermark.cc b/www/iridium/files/patch-components_enterprise_watermarking_watermark.cc index c50c4a9a40c2..8ef47843110e 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 2024-08-01 05:47:53 UTC +--- components/enterprise/watermarking/watermark.cc.orig 2024-11-04 08:56:03 UTC +++ components/enterprise/watermarking/watermark.cc -@@ -23,7 +23,7 @@ gfx::Font WatermarkFont() { +@@ -34,7 +34,7 @@ gfx::Font WatermarkFont() { "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", -@@ -34,7 +34,7 @@ gfx::Font WatermarkFont() { +@@ -45,7 +45,7 @@ gfx::Font WatermarkFont() { } 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_eye__dropper_eye__dropper__view.cc b/www/iridium/files/patch-components_eye__dropper_eye__dropper__view.cc index fdd56bfdc225..46285da41b32 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 2024-08-01 05:47:53 UTC +--- components/eye_dropper/eye_dropper_view.cc.orig 2024-11-04 08:56:03 UTC +++ components/eye_dropper/eye_dropper_view.cc -@@ -202,7 +202,7 @@ EyeDropperView::EyeDropperView(gfx::NativeView parent, +@@ -203,7 +203,7 @@ EyeDropperView::EyeDropperView(gfx::NativeView parent, // EyeDropper/WidgetDelegate. set_owned_by_client(); SetPreferredSize(GetSize()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Use TYPE_MENU for Linux to ensure that the eye dropper view is displayed // above the color picker. views::Widget::InitParams params( 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 de3c5908e45a..0e582af65d61 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 2024-08-27 06:28:16 UTC +--- components/feature_engagement/public/feature_configurations.cc.orig 2024-11-04 08:56:03 UTC +++ components/feature_engagement/public/feature_configurations.cc -@@ -99,7 +99,7 @@ std::optional CreateNewUserGestureInPro +@@ -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 -@@ -118,7 +118,7 @@ std::optional GetClientSideFeatureConfi +@@ -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) { std::optional config = FeatureConfig(); config->valid = true; -@@ -1599,7 +1599,8 @@ std::optional GetClientSideFeatureConfi +@@ -1641,7 +1641,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) { // Credit card benefit IPH is shown: 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 278f0f866afb..2e72c65118ea 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,30 +1,30 @@ ---- components/feature_engagement/public/feature_constants.cc.orig 2024-08-27 06:28:16 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2024-11-04 08:56:03 UTC +++ components/feature_engagement/public/feature_constants.cc @@ -18,7 +18,7 @@ BASE_FEATURE(kIPHDemoMode, "IPH_DemoMode", base::FEATU BASE_FEATURE(kIPHDummyFeature, "IPH_Dummy", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) BASE_FEATURE(kEsbDownloadRowPromoFeature, "EsbDownloadRowPromo", -@@ -637,7 +637,8 @@ BASE_FEATURE(kDefaultBrowserTriggerCriteriaExperiment, +@@ -639,7 +639,8 @@ BASE_FEATURE(kDefaultBrowserTriggerCriteriaExperiment, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) BASE_FEATURE(kIPHAutofillCreditCardBenefitFeature, "IPH_AutofillCreditCardBenefit", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -771,7 +772,7 @@ BASE_FEATURE(kIPHScalableIphGamingFeature, +@@ -776,7 +777,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 4be8a597f3c2..a0b2bfcfe320 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,30 +1,30 @@ ---- components/feature_engagement/public/feature_constants.h.orig 2024-08-27 06:28:16 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2024-11-04 08:56:03 UTC +++ components/feature_engagement/public/feature_constants.h @@ -20,7 +20,7 @@ BASE_DECLARE_FEATURE(kIPHDemoMode); BASE_DECLARE_FEATURE(kIPHDummyFeature); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) BASE_DECLARE_FEATURE(kEsbDownloadRowPromoFeature); #endif -@@ -264,7 +264,8 @@ BASE_DECLARE_FEATURE(kDefaultBrowserTriggerCriteriaExp +@@ -258,7 +258,8 @@ BASE_DECLARE_FEATURE(kDefaultBrowserTriggerCriteriaExp #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kIPHAutofillCreditCardBenefitFeature); + BASE_DECLARE_FEATURE(kIPHAutofillDisabledVirtualCardSuggestionFeature); BASE_DECLARE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature); - BASE_DECLARE_FEATURE(kIPHAutofillManualFallbackFeature); -@@ -314,7 +315,7 @@ BASE_DECLARE_FEATURE(kIPHScalableIphHelpAppBasedTenFea +@@ -309,7 +310,7 @@ BASE_DECLARE_FEATURE(kIPHScalableIphHelpAppBasedTenFea BASE_DECLARE_FEATURE(kIPHScalableIphGamingFeature); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kIPHDesktopPWAsLinkCapturingLaunch); + BASE_DECLARE_FEATURE(kIPHToolbarManagementButtonFeature); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - diff --git a/www/iridium/files/patch-components_feature__engagement_public_feature__list.cc b/www/iridium/files/patch-components_feature__engagement_public_feature__list.cc index 7764d9ba9628..472c1e8561f1 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,30 +1,30 @@ ---- components/feature_engagement/public/feature_list.cc.orig 2024-08-27 06:28:16 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2024-11-04 08:56:03 UTC +++ components/feature_engagement/public/feature_list.cc -@@ -155,7 +155,7 @@ const base::Feature* const kAllFeatures[] = { - &kIPHiOSContextualPanelPriceInsightsFeature, +@@ -165,7 +165,7 @@ const base::Feature* const kAllFeatures[] = { + &kIPHiOSLensOverlayEntrypointTipFeature, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) &kEsbDownloadRowPromoFeature, #endif -@@ -223,7 +223,8 @@ const base::Feature* const kAllFeatures[] = { +@@ -230,7 +230,8 @@ const base::Feature* const kAllFeatures[] = { // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) &kIPHAutofillCreditCardBenefitFeature, + &kIPHAutofillDisabledVirtualCardSuggestionFeature, &kIPHAutofillExternalAccountProfileSuggestionFeature, - &kIPHAutofillManualFallbackFeature, -@@ -273,7 +274,7 @@ const base::Feature* const kAllFeatures[] = { +@@ -281,7 +282,7 @@ const base::Feature* const kAllFeatures[] = { &kIPHScalableIphGamingFeature, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) &kIPHDesktopPWAsLinkCapturingLaunch, + &kIPHToolbarManagementButtonFeature, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - diff --git a/www/iridium/files/patch-components_feature__engagement_public_feature__list.h b/www/iridium/files/patch-components_feature__engagement_public_feature__list.h index 3f7357652108..5b28b8cc8a23 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 2024-08-27 06:28:16 UTC +--- components/feature_engagement/public/feature_list.h.orig 2024-11-04 08:56:03 UTC +++ components/feature_engagement/public/feature_list.h -@@ -278,7 +278,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSContextualPanelPriceInsi +@@ -288,7 +288,7 @@ DEFINE_VARIATION_PARAM(kIPHHomeCustomizationMenuFeatur #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) DEFINE_VARIATION_PARAM(kEsbDownloadRowPromoFeature, "EsbDownloadRowPromo"); #endif -@@ -385,7 +385,8 @@ DEFINE_VARIATION_PARAM(kIPHTabGroupsSaveV2CloseGroupFe +@@ -389,7 +389,8 @@ DEFINE_VARIATION_PARAM(kIPHTabGroupsSaveV2CloseGroupFe // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHAutofillCreditCardBenefitFeature, "IPH_AutofillCreditCardBenefit"); - DEFINE_VARIATION_PARAM(kIPHAutofillExternalAccountProfileSuggestionFeature, -@@ -474,7 +475,7 @@ DEFINE_VARIATION_PARAM(kIPHScalableIphHelpAppBasedTenF + +@@ -481,7 +482,7 @@ DEFINE_VARIATION_PARAM(kIPHScalableIphHelpAppBasedTenF DEFINE_VARIATION_PARAM(kIPHScalableIphGamingFeature, "IPH_ScalableIphGaming"); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHDesktopPWAsLinkCapturingLaunch, "IPH_DesktopPWAsLinkCapturingLaunch"); - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -632,7 +633,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation - VARIATION_ENTRY(kIPHiOSContextualPanelSampleModelFeature), - VARIATION_ENTRY(kIPHiOSContextualPanelPriceInsightsFeature), + DEFINE_VARIATION_PARAM(kIPHToolbarManagementButtonFeature, +@@ -646,7 +647,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation + VARIATION_ENTRY(kIPHHomeCustomizationMenuFeature), + VARIATION_ENTRY(kIPHiOSLensOverlayEntrypointTipFeature), #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHBatterySaverModeFeature), VARIATION_ENTRY(kIPHCompanionSidePanelFeature), VARIATION_ENTRY(kIPHCompanionSidePanelRegionSearchFeature), -@@ -690,7 +691,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -701,7 +702,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHAutofillCreditCardBenefitFeature), + VARIATION_ENTRY(kIPHAutofillDisabledVirtualCardSuggestionFeature), VARIATION_ENTRY(kIPHAutofillExternalAccountProfileSuggestionFeature), - VARIATION_ENTRY(kIPHAutofillManualFallbackFeature), -@@ -741,7 +743,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -753,7 +755,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation VARIATION_ENTRY(kIPHScalableIphGamingFeature), #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHDesktopPWAsLinkCapturingLaunch), + VARIATION_ENTRY(kIPHToolbarManagementButtonFeature), #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - diff --git a/www/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 5cd202f9deea..271da20725a2 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 2024-08-27 06:28:16 UTC +--- components/feed/core/v2/feed_network_impl_unittest.cc.orig 2024-11-04 08:56:03 UTC +++ components/feed/core/v2/feed_network_impl_unittest.cc -@@ -752,8 +752,8 @@ TEST_F(FeedNetworkTest, SendApiRequest_DecodesClientIn +@@ -747,8 +747,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_flags__ui_flags__state.cc b/www/iridium/files/patch-components_flags__ui_flags__state.cc index 781d3d5aa908..a79a68bb9330 100644 --- a/www/iridium/files/patch-components_flags__ui_flags__state.cc +++ b/www/iridium/files/patch-components_flags__ui_flags__state.cc @@ -1,11 +1,11 @@ ---- components/flags_ui/flags_state.cc.orig 2024-08-27 06:28:16 UTC +--- components/flags_ui/flags_state.cc.orig 2024-11-04 08:56:03 UTC +++ components/flags_ui/flags_state.cc -@@ -750,7 +750,7 @@ unsigned short FlagsState::GetCurrentPlatform() { +@@ -755,7 +755,7 @@ unsigned short FlagsState::GetCurrentPlatform() { return kOsCrOS; #elif BUILDFLAG(IS_CHROMEOS_LACROS) return kOsLacros; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kOsLinux; #elif BUILDFLAG(IS_ANDROID) return kOsAndroid; diff --git a/www/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 2033d1d170c0..cca3ec18e77f 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 2023-07-24 14:27:53 UTC +--- components/gwp_asan/crash_handler/crash_analyzer.cc.orig 2024-11-04 08:56:03 UTC +++ components/gwp_asan/crash_handler/crash_analyzer.cc -@@ -30,7 +30,7 @@ +@@ -35,7 +35,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 -@@ -90,7 +90,7 @@ bool CrashAnalyzer::GetExceptionInfo( +@@ -95,7 +95,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 6cc81ce2da11..9cdf2c730a79 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 2024-06-25 12:08:48 UTC +--- components/live_caption/caption_util.cc.orig 2024-11-04 08:56:03 UTC +++ components/live_caption/caption_util.cc -@@ -144,7 +144,7 @@ std::string GetCaptionSettingsUrl() { +@@ -139,7 +139,7 @@ std::string GetCaptionSettingsUrl() { return "chrome://os-settings/audioAndCaptions"; #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return "chrome://settings/captions"; #endif // BUILDFLAG(IS_LINUX) 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 new file mode 100644 index 000000000000..df8df8ac1294 --- /dev/null +++ b/www/iridium/files/patch-components_media__router_common_providers_cast_channel_enum__table.h @@ -0,0 +1,16 @@ +--- components/media_router/common/providers/cast/channel/enum_table.h.orig 2024-11-04 08:56:03 UTC ++++ components/media_router/common/providers/cast/channel/enum_table.h +@@ -368,7 +368,12 @@ class EnumTable { + + private: + #ifdef ARCH_CPU_64_BITS +- alignas(std::hardware_destructive_interference_size) ++#ifdef __cpp_lib_hardware_interference_size ++ using std::hardware_destructive_interference_size; ++#else ++ static constexpr std::size_t hardware_destructive_interference_size = 64; ++#endif ++ alignas(hardware_destructive_interference_size) + #endif + std::initializer_list data_; + bool is_sorted_; 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 a6a0f456f4dd..599783bd0537 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,20 +1,20 @@ ---- components/named_mojo_ipc_server/connection_info.h.orig 2024-06-25 12:08:48 UTC +--- components/named_mojo_ipc_server/connection_info.h.orig 2024-11-04 08:56:03 UTC +++ components/named_mojo_ipc_server/connection_info.h -@@ -14,7 +14,7 @@ +@@ -12,7 +12,7 @@ #include "base/win/scoped_handle.h" #elif BUILDFLAG(IS_MAC) #include -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #endif -@@ -33,7 +33,7 @@ struct ConnectionInfo { - std::optional impersonation_token{}; - #elif BUILDFLAG(IS_MAC) +@@ -29,7 +29,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_BSD) 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 d22c523f98f1..739288745792 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 2023-03-13 07:33:08 UTC +--- components/named_mojo_ipc_server/named_mojo_ipc_server_client_util.cc.orig 2024-11-04 08:56:03 UTC +++ components/named_mojo_ipc_server/named_mojo_ipc_server_client_util.cc -@@ -22,7 +22,7 @@ namespace named_mojo_ipc_server { +@@ -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_network__session__configurator_browser_network__session__configurator.cc b/www/iridium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc index 68c28c255f0a..836b6fa4f004 100644 --- a/www/iridium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc +++ b/www/iridium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc @@ -1,11 +1,11 @@ ---- components/network_session_configurator/browser/network_session_configurator.cc.orig 2024-06-25 12:08:48 UTC +--- components/network_session_configurator/browser/network_session_configurator.cc.orig 2024-11-04 08:56:03 UTC +++ components/network_session_configurator/browser/network_session_configurator.cc -@@ -825,7 +825,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C +@@ -849,7 +849,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C // backport, having it behave differently than in stable would be a bigger // problem. TODO: Does this work in later macOS releases? #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE; #else return net::URLRequestContextBuilder::HttpCacheParams::DISK_BLOCKFILE; diff --git a/www/iridium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc b/www/iridium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc index a5a8f298432d..ccc2699f8a80 100644 --- a/www/iridium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc +++ b/www/iridium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc @@ -1,11 +1,11 @@ ---- components/network_session_configurator/browser/network_session_configurator_unittest.cc.orig 2024-06-25 12:08:48 UTC +--- components/network_session_configurator/browser/network_session_configurator_unittest.cc.orig 2024-11-04 08:56:03 UTC +++ components/network_session_configurator/browser/network_session_configurator_unittest.cc -@@ -782,7 +782,7 @@ TEST_F(NetworkSessionConfiguratorTest, HostRules) { +@@ -855,7 +855,7 @@ TEST_F(NetworkSessionConfiguratorTest, HostRules) { TEST_F(NetworkSessionConfiguratorTest, DefaultCacheBackend) { #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) EXPECT_EQ(net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE, ChooseCacheType()); #else diff --git a/www/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 new file mode 100644 index 000000000000..a9cd5b015ede --- /dev/null +++ b/www/iridium/files/patch-components_os__crypt_async_browser_secret__portal__key__provider.cc @@ -0,0 +1,12 @@ +--- components/os_crypt/async/browser/secret_portal_key_provider.cc.orig 2024-11-04 08:56:03 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_async_common_encryptor.cc b/www/iridium/files/patch-components_os__crypt_async_common_encryptor.cc new file mode 100644 index 000000000000..176ba3391194 --- /dev/null +++ b/www/iridium/files/patch-components_os__crypt_async_common_encryptor.cc @@ -0,0 +1,11 @@ +--- components/os_crypt/async/common/encryptor.cc.orig 2024-11-04 08:56:03 UTC ++++ components/os_crypt/async/common/encryptor.cc +@@ -277,7 +277,7 @@ std::optional Encryptor::DecryptData( + // or not encryption worked or not, and certainly not advisable to recommend + // a re-encryption of this potentially invalid data. + // TODO(crbug.com/365712505): Remove this fallback. +-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && \ ++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) && \ + !(BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || \ + BUILDFLAG(IS_FUCHSIA) + if (plaintext == string_data) { 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 70659ab30214..49c1bbd29371 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 2024-08-29 12:17:06 UTC +--- components/os_crypt/sync/libsecret_util_linux.cc.orig 2024-11-04 08:56:03 UTC +++ components/os_crypt/sync/libsecret_util_linux.cc -@@ -176,16 +176,22 @@ bool LibsecretLoader::EnsureLibsecretLoaded() { +@@ -185,16 +185,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 521998c269b0..cdf9a753a19a 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,72 +1,72 @@ ---- components/os_crypt/sync/os_crypt.h.orig 2023-07-24 14:27:53 UTC +--- components/os_crypt/sync/os_crypt.h.orig 2024-11-04 08:56:03 UTC +++ components/os_crypt/sync/os_crypt.h @@ -14,7 +14,7 @@ #include "build/build_config.h" #include "build/chromecast_buildflags.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class KeyStorageLinux; #endif // BUILDFLAG(IS_LINUX) @@ -23,7 +23,7 @@ class PrefRegistrySimple; class PrefService; - #endif + #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) namespace crypto { class SymmetricKey; } @@ -36,7 +36,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) @@ -81,7 +81,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()> @@ -108,7 +108,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(). @@ -200,7 +200,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 @@ -225,13 +225,13 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCryptImpl { crypto::SymmetricKey* GetEncryptionKey(); #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) - // Create the KeyStorage. Will be null if no service is found. A Config must - // be set before every call to this method. - std::unique_ptr CreateKeyStorage(); + // Returns a cached string of "peanuts". Is thread-safe. + crypto::SymmetricKey* GetPasswordV10(); + 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 550676927bbb..345615cbcf3a 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 2024-06-25 12:08:48 UTC +--- components/paint_preview/browser/paint_preview_client.cc.orig 2024-11-04 08:56:03 UTC +++ components/paint_preview/browser/paint_preview_client.cc -@@ -313,8 +313,8 @@ void PaintPreviewClient::CapturePaintPreview( +@@ -326,8 +326,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 = std::move(callback); 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 00e28d750522..d30742cbfa74 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 2024-08-27 06:28:16 UTC +--- components/password_manager/core/browser/features/password_features.cc.orig 2024-11-04 08:56:03 UTC +++ components/password_manager/core/browser/features/password_features.cc @@ -41,7 +41,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 -@@ -90,7 +90,7 @@ BASE_FEATURE(kPasswordManualFallbackAvailable, +@@ -92,7 +92,7 @@ BASE_FEATURE(kPasswordManualFallbackAvailable, "PasswordManualFallbackAvailable", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_FEATURE(kRestartToGainAccessToKeychain, "RestartToGainAccessToKeychain", #if BUILDFLAG(IS_MAC) diff --git a/www/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 526c2fb9281c..1e48bf6c7b52 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 2024-08-27 06:28:16 UTC +--- components/password_manager/core/browser/features/password_features.h.orig 2024-11-04 08:56:03 UTC +++ components/password_manager/core/browser/features/password_features.h -@@ -90,7 +90,7 @@ BASE_DECLARE_FEATURE(kPasswordManagerLogToTerminal); +@@ -93,7 +93,7 @@ BASE_DECLARE_FEATURE(kPasswordManagerLogToTerminal); // Enables triggering password suggestions through the context menu. BASE_DECLARE_FEATURE(kPasswordManualFallbackAvailable); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables "Needs access to keychain, restart chrome" bubble and banner. BASE_DECLARE_FEATURE(kRestartToGainAccessToKeychain); #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/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 d67954d0fa80..066b218ab057 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,29 @@ ---- components/password_manager/core/browser/password_form_manager.cc.orig 2024-08-27 06:28:16 UTC +--- components/password_manager/core/browser/password_form_manager.cc.orig 2024-11-04 08:56:03 UTC +++ components/password_manager/core/browser/password_form_manager.cc -@@ -58,7 +58,7 @@ +@@ -61,7 +61,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 -@@ -228,7 +228,7 @@ bool ShouldUploadCrowdsourcingVotes(const FormOrDigest +@@ -231,7 +231,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()) { -@@ -885,7 +885,7 @@ void PasswordFormManager::OnFetchCompleted() { +@@ -888,7 +888,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 7b3bae913c99..e3b434812a78 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 2024-08-27 06:28:16 UTC +--- components/password_manager/core/browser/password_manager.cc.orig 2024-11-04 08:56:03 UTC +++ components/password_manager/core/browser/password_manager.cc -@@ -425,7 +425,7 @@ void PasswordManager::RegisterProfilePrefs( +@@ -414,7 +414,7 @@ void PasswordManager::RegisterProfilePrefs( prefs::kAutofillableCredentialsAccountStoreLoginDatabase, false); #endif // BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) registry->RegisterBooleanPref(prefs::kPasswordSharingEnabled, true); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterIntegerPref(prefs::kRelaunchChromeBubbleDismissedCounter, 0); #endif -@@ -438,7 +438,7 @@ void PasswordManager::RegisterProfilePrefs( +@@ -427,7 +427,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 7587533b6ed4..f2ad114128ab 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 2024-08-27 06:28:16 UTC +--- components/password_manager/core/browser/password_manager_client.h.orig 2024-11-04 08:56:03 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" -@@ -520,7 +520,7 @@ class PasswordManagerClient { - virtual void RefreshPasswordManagerSettingsIfNeeded() const; +@@ -545,7 +545,7 @@ class PasswordManagerClient { + CredentialsCallback callback); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Creates and show the cross domain confirmation popup. - virtual std::unique_ptr - ShowCrossDomainConfirmationPopup(const gfx::RectF& element_bounds, + + // Shows the bubble with the details of the `form`. + virtual void OpenPasswordDetailsBubble( 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 601d1e2c7b89..93429e7ac7e2 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,11 +1,29 @@ ---- components/password_manager/core/browser/password_manual_fallback_flow.cc.orig 2024-08-27 06:28:16 UTC +--- components/password_manager/core/browser/password_manual_fallback_flow.cc.orig 2024-11-04 08:56:03 UTC +++ components/password_manager/core/browser/password_manual_fallback_flow.cc -@@ -204,7 +204,7 @@ void PasswordManualFallbackFlow::DidAcceptSuggestion( - payload.password)); +@@ -43,7 +43,7 @@ std::u16string GetUsernameFromLabel(const std::u16stri + } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (payload.is_cross_domain) { - cross_domain_confirmation_popup_controller_ = - password_client_->ShowCrossDomainConfirmationPopup( + // Returns the password form corresponding to the `payload` data. In most + // cases there is only one such form stored, but having more than one or no + // forms is also possible. If there is more than one form, showing any of them +@@ -281,7 +281,7 @@ void PasswordManualFallbackFlow::DidAcceptSuggestion( + } + case autofill::SuggestionType::kViewPasswordDetails: { + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + std::optional credentials = + GetCorrespondingPasswordForm( + suggestion.GetPayload(), +@@ -413,7 +413,7 @@ void PasswordManualFallbackFlow::EnsureCrossDomainPass + const Suggestion::PasswordSuggestionDetails& payload, + base::OnceClosure on_allowed) { + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + if (payload.is_cross_domain) { + cross_domain_confirmation_popup_controller_ = + password_client_->ShowCrossDomainConfirmationPopup( diff --git a/www/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 a0f5192dd342..c0ac6c0bdc96 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 2024-08-27 06:28:16 UTC +--- components/password_manager/core/browser/password_manual_fallback_flow.h.orig 2024-11-04 08:56:03 UTC +++ components/password_manager/core/browser/password_manual_fallback_flow.h @@ -17,7 +17,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) -@@ -161,7 +161,7 @@ class PasswordManualFallbackFlow : public autofill::Au +@@ -178,7 +178,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 new file mode 100644 index 000000000000..55d75d797857 --- /dev/null +++ b/www/iridium/files/patch-components_password__manager_core_browser_password__store__factory__util.cc @@ -0,0 +1,11 @@ +--- components/password_manager/core/browser/password_store_factory_util.cc.orig 2024-11-04 08:56:03 UTC ++++ components/password_manager/core/browser/password_store_factory_util.cc +@@ -29,7 +29,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 2d7d49e85ef9..1653ed29700e 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 2024-08-27 06:28:16 UTC +--- components/password_manager/core/browser/password_store/login_database.cc.orig 2024-11-04 08:56:03 UTC +++ components/password_manager/core/browser/password_store/login_database.cc -@@ -1028,7 +1028,7 @@ bool ShouldDeleteUndecryptablePasswords( - clearing_undecryptable_passwords, +@@ -1030,7 +1030,7 @@ bool ShouldDeleteUndecryptablePasswords( bool is_user_data_dir_policy_set, - bool is_disabled_by_policy) { + bool is_enabled_by_policy, + IsAccountStore is_account_store) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string user_data_dir_string; std::unique_ptr environment(base::Environment::Create()); // On Linux user data directory ca be specified using an env variable. If it -@@ -1047,7 +1047,7 @@ bool ShouldDeleteUndecryptablePasswords( +@@ -1049,7 +1049,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 2f993cc26556..5f8e6a7f8abf 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 2024-08-27 06:28:16 UTC +--- components/password_manager/core/browser/password_store/login_database_async_helper.cc.orig 2024-11-04 08:56:03 UTC +++ components/password_manager/core/browser/password_store/login_database_async_helper.cc -@@ -152,7 +152,7 @@ LoginsResultOrError LoginDatabaseAsyncHelper::FillMatc +@@ -154,7 +154,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() ? 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 08637e7a957e..238199b78778 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 2024-08-27 06:28:16 UTC +--- components/password_manager/core/browser/password_store/login_database_unittest.cc.orig 2024-11-04 08:56:03 UTC +++ components/password_manager/core/browser/password_store/login_database_unittest.cc -@@ -2207,7 +2207,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, +@@ -2253,7 +2253,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, testing::Bool())); #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_password__store_password__store__built__in__backend.cc b/www/iridium/files/patch-components_password__manager_core_browser_password__store_password__store__built__in__backend.cc deleted file mode 100644 index 8f3317032629..000000000000 --- a/www/iridium/files/patch-components_password__manager_core_browser_password__store_password__store__built__in__backend.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/password_manager/core/browser/password_store/password_store_built_in_backend.cc.orig 2024-08-27 06:28:16 UTC -+++ components/password_manager/core/browser/password_store/password_store_built_in_backend.cc -@@ -211,7 +211,7 @@ void PasswordStoreBuiltInBackend::InitBackend( - std::move(clearing_undecryptable_passwords_cb))); - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_IOS) -+ BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) - background_task_runner_->PostTask( - FROM_HERE, - base::BindOnce(&LoginDatabaseAsyncHelper:: 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 8515d3de071c..b63c80c39225 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 2024-08-27 06:28:16 UTC +--- components/password_manager/core/browser/stub_password_manager_client.cc.orig 2024-11-04 08:56:03 UTC +++ components/password_manager/core/browser/stub_password_manager_client.cc -@@ -180,7 +180,7 @@ version_info::Channel StubPasswordManagerClient::GetCh +@@ -187,7 +187,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) - std::unique_ptr< - password_manager::PasswordCrossDomainConfirmationPopupController> - StubPasswordManagerClient::ShowCrossDomainConfirmationPopup( + void StubPasswordManagerClient::OpenPasswordDetailsBubble( + const password_manager::PasswordForm& form) {} + 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 9f6426dd5d24..21ecc5c79fd0 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 2024-08-27 06:28:16 UTC +--- components/password_manager/core/browser/stub_password_manager_client.h.orig 2024-11-04 08:56:03 UTC +++ components/password_manager/core/browser/stub_password_manager_client.h @@ -75,7 +75,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; std::unique_ptr< - password_manager::PasswordCrossDomainConfirmationPopupController> - ShowCrossDomainConfirmationPopup( 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 9a150236f401..d45721fcb96a 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 2024-08-27 06:28:16 UTC +--- components/password_manager/core/common/password_manager_pref_names.h.orig 2024-11-04 08:56:03 UTC +++ components/password_manager/core/common/password_manager_pref_names.h @@ -41,7 +41,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. -@@ -370,7 +370,7 @@ inline constexpr char kAutofillableCredentialsAccountS +@@ -334,7 +334,7 @@ inline constexpr char kAutofillableCredentialsAccountS 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_policy_core_common_cloud_cloud__policy__client.cc b/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc index 3edf70e988b7..5f4465fce772 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 2024-06-25 12:08:48 UTC +--- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2024-11-04 08:56:03 UTC +++ components/policy/core/common/cloud/cloud_policy_client.cc -@@ -647,7 +647,7 @@ void CloudPolicyClient::FetchPolicy(PolicyFetchReason +@@ -703,7 +703,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 new file mode 100644 index 000000000000..b9077c827e20 --- /dev/null +++ b/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__refresh__scheduler.cc @@ -0,0 +1,20 @@ +--- components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc.orig 2024-11-04 08:56:03 UTC ++++ components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc +@@ -25,7 +25,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, + "RetryWithKeyReset", + base::FEATURE_ENABLED_BY_DEFAULT); +@@ -220,7 +220,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_policy__utils.cc b/www/iridium/files/patch-components_policy_core_common_policy__utils.cc index e5b84aa4240f..fb3fdfe01b8c 100644 --- a/www/iridium/files/patch-components_policy_core_common_policy__utils.cc +++ b/www/iridium/files/patch-components_policy_core_common_policy__utils.cc @@ -1,11 +1,11 @@ ---- components/policy/core/common/policy_utils.cc.orig 2024-06-25 12:08:48 UTC +--- components/policy/core/common/policy_utils.cc.orig 2024-11-04 08:56:03 UTC +++ components/policy/core/common/policy_utils.cc -@@ -28,7 +28,7 @@ bool IsPolicyTestingEnabled(PrefService* pref_service, +@@ -22,7 +22,7 @@ bool IsPolicyTestingEnabled(PrefService* pref_service, return true; } --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) if (channel == version_info::Channel::DEV) { return true; } 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 41fbd306b293..919fbc0dd843 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 2024-06-25 12:08:48 UTC +--- components/safe_browsing/content/common/file_type_policies_unittest.cc.orig 2024-11-04 08:56:03 UTC +++ components/safe_browsing/content/common/file_type_policies_unittest.cc -@@ -139,7 +139,7 @@ TEST_F(FileTypePoliciesTest, UnpackResourceBundle) { +@@ -148,7 +148,7 @@ TEST_F(FileTypePoliciesTest, UnpackResourceBundle) { EXPECT_EQ(DownloadFileType::FULL_PING, file_type.ping_setting()); // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) EXPECT_EQ(DownloadFileType::ALLOW_ON_USER_GESTURE, file_type.platform_settings(0).danger_level()); EXPECT_EQ(DownloadFileType::DISALLOW_AUTO_OPEN, diff --git a/www/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 eb9eaeb448e1..8536e4240e43 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 2024-06-25 12:08:48 UTC +--- components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc.orig 2024-11-04 08:56:03 UTC +++ components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc -@@ -118,7 +118,7 @@ std::ostream& operator<<(std::ostream& os, const ListI +@@ -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 e934e8508aec..118a8db2fc3c 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 2024-08-27 06:28:16 UTC +--- components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc.orig 2024-11-04 08:56:03 UTC +++ components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc -@@ -107,7 +107,7 @@ RTLookupRequest::OSType GetRTLookupRequestOSType() { +@@ -110,7 +110,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_safe__browsing_core_common_features.cc b/www/iridium/files/patch-components_safe__browsing_core_common_features.cc index 35534c3f28f3..02a5cb4c001e 100644 --- a/www/iridium/files/patch-components_safe__browsing_core_common_features.cc +++ b/www/iridium/files/patch-components_safe__browsing_core_common_features.cc @@ -1,20 +1,11 @@ ---- components/safe_browsing/core/common/features.cc.orig 2024-08-27 06:28:16 UTC +--- components/safe_browsing/core/common/features.cc.orig 2024-11-04 08:56:03 UTC +++ components/safe_browsing/core/common/features.cc -@@ -186,7 +186,7 @@ BASE_FEATURE(kGooglePlayProtectInApkTelemetry, - BASE_FEATURE(kHashPrefixRealTimeLookups, - "SafeBrowsingHashPrefixRealTimeLookups", - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT - #else - base::FEATURE_DISABLED_BY_DEFAULT -@@ -267,7 +267,7 @@ constexpr base::FeatureParam kReferrerChainEventM +@@ -237,7 +237,7 @@ BASE_FEATURE(kRippleForEnhancedProtection, BASE_FEATURE(kSafeBrowsingAsyncRealTimeCheck, "SafeBrowsingAsyncRealTimeCheck", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc b/www/iridium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc index 5038de7eca00..73606c62d86a 100644 --- a/www/iridium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc +++ b/www/iridium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc @@ -1,11 +1,11 @@ ---- components/search_engines/search_engine_choice/search_engine_choice_service.cc.orig 2024-08-27 06:28:16 UTC +--- components/search_engines/search_engine_choice/search_engine_choice_service.cc.orig 2024-11-04 08:56:03 UTC +++ components/search_engines/search_engine_choice/search_engine_choice_service.cc -@@ -610,7 +610,7 @@ void SearchEngineChoiceService::ProcessPendingChoiceSc +@@ -594,7 +594,7 @@ void SearchEngineChoiceService::RegisterLocalStatePref int SearchEngineChoiceService::GetCountryIdInternal() { // `country_codes::kCountryIDAtInstall` may not be set yet. -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Android, ChromeOS and Linux, `country_codes::kCountryIDAtInstall` is // computed asynchronously using platform-specific signals, and may not be // available yet. diff --git a/www/iridium/files/patch-components_search__engines_template__url__service.cc b/www/iridium/files/patch-components_search__engines_template__url__service.cc index e1f61ccde1ab..2d970bef3daa 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 2024-08-27 06:28:16 UTC +--- components/search_engines/template_url_service.cc.orig 2024-11-04 08:56:03 UTC +++ components/search_engines/template_url_service.cc -@@ -3081,7 +3081,7 @@ bool TemplateURLService::MatchesDefaultSearchProvider( +@@ -3060,7 +3060,7 @@ bool TemplateURLService::MatchesDefaultSearchProvider( std::unique_ptr TemplateURLService::GetEnterpriseSiteSearchManager(PrefService* prefs) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(omnibox::kSiteSearchSettingsPolicy) ? std::make_unique( prefs, base::BindRepeating( diff --git a/www/iridium/files/patch-components_soda_soda__util.cc b/www/iridium/files/patch-components_soda_soda__util.cc index 1dde2e5be512..1dce99e0ba91 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 2024-06-25 12:08:48 UTC +--- components/soda/soda_util.cc.orig 2024-11-04 08:56:03 UTC +++ components/soda/soda_util.cc -@@ -20,7 +20,7 @@ +@@ -27,7 +27,7 @@ #include "base/win/windows_version.h" #endif -#if BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_X86_FAMILY) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_FAMILY) #include "base/cpu.h" #endif -@@ -45,7 +45,7 @@ bool IsSupportedChromeOS() { +@@ -52,7 +52,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 -@@ -76,7 +76,7 @@ bool IsSupportedWin() { +@@ -83,7 +83,7 @@ bool IsSupportedWin() { bool IsOnDeviceSpeechRecognitionSupported() { #if BUILDFLAG(IS_CHROMEOS) return IsSupportedChromeOS(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return IsSupportedLinux(); #elif BUILDFLAG(IS_WIN) return IsSupportedWin(); diff --git a/www/iridium/files/patch-components_storage__monitor_BUILD.gn b/www/iridium/files/patch-components_storage__monitor_BUILD.gn index b718e2977be6..acb8e7c20bfd 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 2023-11-22 14:00:11 UTC +--- components/storage_monitor/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ components/storage_monitor/BUILD.gn -@@ -77,7 +77,7 @@ static_library("storage_monitor") { +@@ -75,7 +75,7 @@ static_library("storage_monitor") { deps += [ "//services/device/public/mojom" ] } } else if (is_linux || is_chromeos_lacros) { - if (use_udev) { + if (use_udev && !is_bsd) { sources += [ "mtab_watcher_linux.cc", "mtab_watcher_linux.h", -@@ -184,7 +184,7 @@ source_set("unit_tests") { +@@ -180,7 +180,7 @@ source_set("unit_tests") { "storage_monitor_chromeos_unittest.cc", ] } - } else if (is_linux || is_chromeos_lacros) { + } else if ((is_linux || is_chromeos_lacros) && !is_bsd) { if (use_udev) { sources += [ "storage_monitor_linux_unittest.cc" ] } 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 3b557b4a5940..1c8ab63c8987 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 2024-08-27 06:28:16 UTC +--- components/supervised_user/core/browser/supervised_user_preferences.cc.orig 2024-11-04 08:56:03 UTC +++ components/supervised_user/core/browser/supervised_user_preferences.cc -@@ -154,7 +154,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry +@@ -147,7 +147,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_browser_supervised__user__service.cc b/www/iridium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc index 8de4682e0a6c..435656c28bed 100644 --- a/www/iridium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc +++ b/www/iridium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc @@ -1,11 +1,11 @@ ---- components/supervised_user/core/browser/supervised_user_service.cc.orig 2024-08-27 06:28:16 UTC +--- components/supervised_user/core/browser/supervised_user_service.cc.orig 2024-11-04 08:56:03 UTC +++ components/supervised_user/core/browser/supervised_user_service.cc -@@ -176,7 +176,7 @@ FirstTimeInterstitialBannerState SupervisedUserService +@@ -152,7 +152,7 @@ FirstTimeInterstitialBannerState SupervisedUserService const FirstTimeInterstitialBannerState original_state) { FirstTimeInterstitialBannerState target_state = original_state; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_IOS) + BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) if (original_state != FirstTimeInterstitialBannerState::kSetupComplete && can_show_first_time_interstitial_banner_) { target_state = FirstTimeInterstitialBannerState::kNeedToShow; 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 74f3fbf0c474..c694a70a8a88 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,45 +1,45 @@ ---- components/supervised_user/core/common/features.cc.orig 2024-08-27 06:28:16 UTC +--- components/supervised_user/core/common/features.cc.orig 2024-11-04 08:56:03 UTC +++ components/supervised_user/core/common/features.cc @@ -66,7 +66,7 @@ BASE_FEATURE(kUpdatedSupervisedUserExtensionApprovalSt "UpdatedSupervisedUserExtensionApprovalStrings", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_FEATURE(kEnableExtensionsPermissionsForSupervisedUsersOnDesktop, "EnableExtensionsPermissionsForSupervisedUsersOnDesktop", base::FEATURE_DISABLED_BY_DEFAULT); @@ -81,7 +81,7 @@ bool IsSupervisedUserSkipParentApprovalToInstallExtens #if BUILDFLAG(IS_CHROMEOS) return base::FeatureList::IsEnabled( kEnableSupervisedUserSkipParentApprovalToInstallExtensions); -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) bool skipParentApprovalEnabled = base::FeatureList::IsEnabled( kEnableSupervisedUserSkipParentApprovalToInstallExtensions); bool permissionExtensionsForSupervisedUsersEnabled = -@@ -106,13 +106,13 @@ BASE_FEATURE(kCustomWebSignInInterceptForSupervisedUse - "CustomWebSignInInterceptForSupervisedUsersUi", +@@ -106,13 +106,13 @@ BASE_FEATURE(kSupervisedUserProfileSigninIPH, + "SupervisedUserProfileSigninIPH", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_FEATURE(kShowKiteForSupervisedUsers, "ShowKiteForSupervisedUsers", base::FEATURE_DISABLED_BY_DEFAULT); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_FEATURE(kHideGuestModeForSupervisedUsers, "HideGuestModeForSupervisedUsers", base::FEATURE_DISABLED_BY_DEFAULT); @@ -122,7 +122,7 @@ BASE_FEATURE(kForceSafeSearchForUnauthenticatedSupervi "ForceSafeSearchForUnauthenticatedSupervisedUsers", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_FEATURE(kForceSupervisedUserReauthenticationForYouTube, "ForceSupervisedUserReauthenticationForYouTube", base::FEATURE_DISABLED_BY_DEFAULT); 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 2dff37ebcf80..1a85ae51c319 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,34 +1,34 @@ ---- components/supervised_user/core/common/features.h.orig 2024-08-27 06:28:16 UTC +--- components/supervised_user/core/common/features.h.orig 2024-11-04 08:56:03 UTC +++ components/supervised_user/core/common/features.h @@ -25,7 +25,7 @@ BASE_DECLARE_FEATURE( // Applies new informative strings during the parental extension approval flow. BASE_DECLARE_FEATURE(kUpdatedSupervisedUserExtensionApprovalStrings); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kEnableExtensionsPermissionsForSupervisedUsersOnDesktop); #endif -@@ -62,11 +62,11 @@ BASE_DECLARE_FEATURE(kCustomWebSignInInterceptForSuper +@@ -59,11 +59,11 @@ BASE_DECLARE_FEATURE(kSupervisedUserProfileSigninIPH); // Displays a Family Link kite badge on the supervised user avatar in various // surfaces. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kShowKiteForSupervisedUsers); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // This hides the following guest mode entry points for supervised users: // // * In the Profile menu for supervised profiles -@@ -78,7 +78,7 @@ BASE_DECLARE_FEATURE(kHideGuestModeForSupervisedUsers) +@@ -75,7 +75,7 @@ BASE_DECLARE_FEATURE(kHideGuestModeForSupervisedUsers) // unauthenticated (e.g. signed out of the content area) account. BASE_DECLARE_FEATURE(kForceSafeSearchForUnauthenticatedSupervisedUsers); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Force re-authentication when an unauthenticated supervised user tries to // access YouTube, so that content restrictions can be applied. BASE_DECLARE_FEATURE(kForceSupervisedUserReauthenticationForYouTube); 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 b47cb63318f7..457b48d34825 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,29 +1,29 @@ ---- components/sync_device_info/local_device_info_util.cc.orig 2024-06-25 12:08:48 UTC +--- components/sync_device_info/local_device_info_util.cc.orig 2024-11-04 08:56:03 UTC +++ components/sync_device_info/local_device_info_util.cc -@@ -84,7 +84,7 @@ void OnMachineStatisticsLoaded(LocalDeviceNameInfo* na +@@ -85,7 +85,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()) { -@@ -109,7 +109,7 @@ DeviceInfo::OsType GetLocalDeviceOSType() { +@@ -110,7 +110,7 @@ DeviceInfo::OsType GetLocalDeviceOSType() { return DeviceInfo::OsType::kChromeOsAsh; #elif BUILDFLAG(IS_CHROMEOS_LACROS) return DeviceInfo::OsType::kChromeOsLacros; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return DeviceInfo::OsType::kLinux; #elif BUILDFLAG(IS_ANDROID) return DeviceInfo::OsType::kAndroid; -@@ -128,7 +128,7 @@ DeviceInfo::OsType GetLocalDeviceOSType() { +@@ -129,7 +129,7 @@ DeviceInfo::OsType GetLocalDeviceOSType() { DeviceInfo::FormFactor GetLocalDeviceFormFactor() { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return DeviceInfo::FormFactor::kDesktop; #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) return ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET diff --git a/www/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 6970b07097a4..e03b87adc137 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 2024-08-27 06:28:16 UTC +--- components/trusted_vault/trusted_vault_connection_impl.cc.orig 2024-11-04 08:56:03 UTC +++ components/trusted_vault/trusted_vault_connection_impl.cc -@@ -101,7 +101,7 @@ GetLocalPhysicalDeviceType() { +@@ -102,7 +102,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 3bb3e6ce62e9..e341d50213be 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 2023-07-24 14:27:53 UTC +--- components/update_client/update_query_params.cc.orig 2024-11-04 08:56:03 UTC +++ components/update_client/update_query_params.cc -@@ -42,6 +42,8 @@ const char kOs[] = +@@ -40,6 +40,8 @@ const char 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_user__education_views_help__bubble__view.cc b/www/iridium/files/patch-components_user__education_views_help__bubble__view.cc index a01027de14f4..2fa1d0a053bb 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,11 +1,11 @@ ---- components/user_education/views/help_bubble_view.cc.orig 2024-08-27 06:28:16 UTC +--- components/user_education/views/help_bubble_view.cc.orig 2024-11-04 08:56:03 UTC +++ components/user_education/views/help_bubble_view.cc -@@ -856,7 +856,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect() const { +@@ -852,7 +852,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect() const { void HelpBubbleView::OnBeforeBubbleWidgetInit(views::Widget::InitParams* params, views::Widget* widget) const { BubbleDialogDelegateView::OnBeforeBubbleWidgetInit(params, widget); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Help bubbles anchored to menus may be clipped to their anchors' bounds, // resulting in visual errors, unless they use accelerated rendering. See // crbug.com/1445770 for details. This also applies to bubbles anchored to 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 495e3a8c4a42..4e451b9962ad 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 2024-08-01 05:47:53 UTC +--- components/variations/service/variations_service.cc.orig 2024-11-04 08:56:03 UTC +++ components/variations/service/variations_service.cc -@@ -101,7 +101,7 @@ std::string GetPlatformString() { +@@ -102,7 +102,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 a0a5e23c210b..f97f4a0ac07e 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 2024-08-27 06:28:16 UTC +--- components/visited_url_ranking/public/url_visit_util.cc.orig 2024-11-04 08:56:03 UTC +++ components/visited_url_ranking/public/url_visit_util.cc -@@ -62,7 +62,7 @@ PlatformType GetPlatformInput() { +@@ -66,7 +66,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_common_features.cc b/www/iridium/files/patch-components_viz_common_features.cc deleted file mode 100644 index 58675a9071a0..000000000000 --- a/www/iridium/files/patch-components_viz_common_features.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- components/viz/common/features.cc.orig 2024-08-27 06:28:16 UTC -+++ components/viz/common/features.cc -@@ -234,7 +234,7 @@ BASE_FEATURE(kAllowForceMergeRenderPassWithRequireOver - "AllowForceMergeRenderPassWithRequireOverlayQuads", - base::FEATURE_ENABLED_BY_DEFAULT); - --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // On platforms using SkiaOutputDeviceBufferQueue and not yet universally using - // SkiaRenderer-allocated images, when this is true SkiaRenderer will allocate - // and maintain a buffer queue of images for the root render pass, instead of -@@ -500,7 +500,7 @@ bool ShouldOnBeginFrameThrottleVideo() { - return base::FeatureList::IsEnabled(features::kOnBeginFrameThrottleVideo); - } - --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - bool ShouldRendererAllocateImages() { - return base::FeatureList::IsEnabled(kRendererAllocatesImages); - } diff --git a/www/iridium/files/patch-components_viz_common_features.h b/www/iridium/files/patch-components_viz_common_features.h deleted file mode 100644 index ce0ff8599519..000000000000 --- a/www/iridium/files/patch-components_viz_common_features.h +++ /dev/null @@ -1,20 +0,0 @@ ---- components/viz/common/features.h.orig 2024-08-27 06:28:16 UTC -+++ components/viz/common/features.h -@@ -72,7 +72,7 @@ VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kDrawPredictedI - VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kAllowUndamagedNonrootRenderPassToSkip); - VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE( - kAllowForceMergeRenderPassWithRequireOverlayQuads); --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kRendererAllocatesImages); - #endif - VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kOnBeginFrameAcks); -@@ -129,7 +129,7 @@ VIZ_COMMON_EXPORT bool UseWebViewNewInvalidateHeuristi - VIZ_COMMON_EXPORT bool UseSurfaceLayerForVideo(); - VIZ_COMMON_EXPORT int MaxOverlaysConsidered(); - VIZ_COMMON_EXPORT bool ShouldOnBeginFrameThrottleVideo(); --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - VIZ_COMMON_EXPORT bool ShouldRendererAllocateImages(); - #endif - VIZ_COMMON_EXPORT bool IsOnBeginFrameAcksEnabled(); diff --git a/www/iridium/files/patch-components_viz_service_display__embedder_skia__output__device__buffer__queue.cc b/www/iridium/files/patch-components_viz_service_display__embedder_skia__output__device__buffer__queue.cc deleted file mode 100644 index cb1fc05a8e0f..000000000000 --- a/www/iridium/files/patch-components_viz_service_display__embedder_skia__output__device__buffer__queue.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/viz/service/display_embedder/skia_output_device_buffer_queue.cc.orig 2024-08-27 06:28:16 UTC -+++ components/viz/service/display_embedder/skia_output_device_buffer_queue.cc -@@ -175,7 +175,7 @@ SkiaOutputDeviceBufferQueue::SkiaOutputDeviceBufferQue - capabilities_.only_invalidates_damage_rect = false; - capabilities_.number_of_buffers = 3; - --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - capabilities_.renderer_allocates_images = - ::features::ShouldRendererAllocateImages(); - #else diff --git a/www/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 1fa7ce261dab..76dd97b50b4a 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 2024-08-27 06:28:16 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2024-11-04 08:56:03 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl.cc -@@ -1663,7 +1663,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor +@@ -1498,7 +1498,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 4a220dcd9378..dbffb8071a59 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 2024-08-27 06:28:16 UTC +--- components/viz/service/display_embedder/software_output_surface.cc.orig 2024-11-04 08:56:03 UTC +++ components/viz/service/display_embedder/software_output_surface.cc -@@ -119,7 +119,7 @@ void SoftwareOutputSurface::SwapBuffersCallback(base:: +@@ -115,7 +115,7 @@ void SoftwareOutputSurface::SwapBuffersCallback(base:: now.SnappedToNextTick(refresh_timebase_, refresh_interval_) - now; // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (needs_swap_size_notifications_) client_->DidSwapWithSize(pixel_size); #endif -@@ -148,7 +148,7 @@ gfx::OverlayTransform SoftwareOutputSurface::GetDispla +@@ -144,7 +144,7 @@ gfx::OverlayTransform SoftwareOutputSurface::GetDispla // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) void SoftwareOutputSurface::SetNeedsSwapSizeNotifications( bool needs_swap_size_notifications) { needs_swap_size_notifications_ = needs_swap_size_notifications; diff --git a/www/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 982da3d27d15..00b6833f2487 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 2024-08-27 06:28:16 UTC +--- components/viz/service/display_embedder/software_output_surface.h.orig 2024-11-04 08:56:03 UTC +++ components/viz/service/display_embedder/software_output_surface.h -@@ -45,7 +45,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputSurface : publi +@@ -44,7 +44,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputSurface : publi gfx::OverlayTransform GetDisplayTransform() override; // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) void SetNeedsSwapSizeNotifications( bool needs_swap_size_notifications) override; #endif -@@ -65,7 +65,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputSurface : publi +@@ -64,7 +64,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputSurface : publi // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) bool needs_swap_size_notifications_ = false; #endif diff --git a/www/iridium/files/patch-components_viz_service_display_skia__renderer.cc b/www/iridium/files/patch-components_viz_service_display_skia__renderer.cc index 17c271124edd..4ea36c87861d 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 2024-08-27 06:28:16 UTC +--- components/viz/service/display/skia_renderer.cc.orig 2024-11-04 08:56:03 UTC +++ components/viz/service/display/skia_renderer.cc -@@ -1441,7 +1441,7 @@ void SkiaRenderer::ClearFramebuffer() { +@@ -1363,7 +1363,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 5b666392d3be..e9b676265f0b 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 2024-08-27 06:28:16 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2024-11-04 08:56:03 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -@@ -111,7 +111,7 @@ RootCompositorFrameSinkImpl::Create( +@@ -113,7 +113,7 @@ RootCompositorFrameSinkImpl::Create( output_surface->SetNeedsSwapSizeNotifications( params->send_swap_size_notifications); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) // For X11, we need notify client about swap completion after resizing, so the // client can use it for synchronize with X11 WM. output_surface->SetNeedsSwapSizeNotifications(true); -@@ -673,7 +673,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw +@@ -793,7 +793,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 c71cc2b7eb60..a1c351f80c82 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 2024-08-27 06:28:16 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig 2024-11-04 08:56:03 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h -@@ -214,7 +214,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl +@@ -231,7 +231,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl // See comments on `EvictionHandler`. EvictionHandler eviction_handler_; -#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_test_mock__display__client.h b/www/iridium/files/patch-components_viz_test_mock__display__client.h index abf2c97cee7c..c9f510aac736 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 2024-06-25 12:08:48 UTC +--- components/viz/test/mock_display_client.h.orig 2024-11-04 08:56:03 UTC +++ components/viz/test/mock_display_client.h -@@ -43,7 +43,7 @@ class MockDisplayClient : public mojom::DisplayClient - MOCK_METHOD1(SetWideColorEnabled, void(bool enabled)); +@@ -45,7 +45,7 @@ class MockDisplayClient : public mojom::DisplayClient + #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS_ASH) MOCK_METHOD1(SetPreferredRefreshRate, void(float refresh_rate)); - #endif + #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS_ASH) -#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_webapps_browser_features.cc b/www/iridium/files/patch-components_webapps_browser_features.cc deleted file mode 100644 index c933cadfa188..000000000000 --- a/www/iridium/files/patch-components_webapps_browser_features.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/webapps/browser/features.cc.orig 2024-08-27 06:28:16 UTC -+++ components/webapps/browser/features.cc -@@ -59,7 +59,7 @@ extern const base::FeatureParam kBannerParamsDays - BASE_FEATURE(kWebAppsEnableMLModelForPromotion, - "WebAppsEnableMLModelForPromotion", - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_ANDROID) -+ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT); - #else - base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/www/iridium/files/patch-content_app_content__main.cc b/www/iridium/files/patch-content_app_content__main.cc index a63d1ee2ce99..e4db379edecd 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 2024-08-27 06:28:16 UTC +--- content/app/content_main.cc.orig 2024-11-04 08:56:03 UTC +++ content/app/content_main.cc -@@ -207,7 +207,7 @@ RunContentProcess(ContentMainParams params, +@@ -227,7 +227,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 -@@ -293,7 +293,7 @@ RunContentProcess(ContentMainParams params, +@@ -313,7 +313,7 @@ NO_STACK_PROTECTOR int RunContentProcess( command_line->AppendSwitch(switches::kUseMobileUserAgent); #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 46d04630238c..5b92aa8a2f1e 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,129 +1,129 @@ ---- content/app/content_main_runner_impl.cc.orig 2024-08-27 06:28:16 UTC +--- content/app/content_main_runner_impl.cc.orig 2024-11-04 08:56:03 UTC +++ content/app/content_main_runner_impl.cc -@@ -149,18 +149,20 @@ +@@ -147,18 +147,20 @@ #include "content/browser/posix_file_descriptor_info_impl.h" #include "content/public/common/content_descriptors.h" -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) #include "content/public/common/zygote/zygote_fork_delegate_linux.h" #endif #endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/file_path_watcher_inotify.h" #include "base/native_library.h" #include "base/rand_util.h" #include "content/public/common/zygote/sandbox_support_linux.h" +#if !BUILDFLAG(IS_BSD) #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "third_party/boringssl/src/include/openssl/crypto.h" #include "third_party/webrtc_overrides/init_webrtc.h" // nogncheck -@@ -194,6 +196,10 @@ +@@ -192,6 +194,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" -@@ -403,7 +409,7 @@ void InitializeZygoteSandboxForBrowserProcess( +@@ -400,7 +406,7 @@ void InitializeZygoteSandboxForBrowserProcess( } #endif // BUILDFLAG(USE_ZYGOTE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if BUILDFLAG(ENABLE_PPAPI) // Loads the (native) libraries but does not initialize them (i.e., does not -@@ -441,7 +447,10 @@ void PreloadLibraryCdms() { +@@ -438,7 +444,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. -@@ -453,9 +462,16 @@ void PreSandboxInit() { +@@ -450,9 +459,16 @@ void PreSandboxInit() { // https://boringssl.googlesource.com/boringssl/+/HEAD/SANDBOXING.md CRYPTO_pre_sandbox_init(); +#if BUILDFLAG(IS_BSD) + // "cache" the amount of physical memory before pledge(2) + base::SysInfo::AmountOfPhysicalMemoryMB(); +#endif + +#if !BUILDFLAG(IS_BSD) // Pre-read /proc/sys/fs/inotify/max_user_watches so it doesn't have to be // allowed by the sandbox. base::GetMaxNumberOfInotifyWatches(); +#endif #if BUILDFLAG(ENABLE_PPAPI) // Ensure access to the Pepper plugins before the sandbox is turned on. -@@ -877,11 +893,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -764,7 +780,7 @@ NO_STACK_PROTECTOR int RunOtherNamedProcessTypeMain( + unregister_thread_closure = base::HangWatcher::RegisterThread( + base::HangWatcher::ThreadType::kMainThread); + bool start_hang_watcher_now; +-#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. +@@ -874,11 +890,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) -@@ -1058,8 +1073,20 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -1059,8 +1074,20 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam process_type == switches::kZygoteProcess) { PreSandboxInit(); } +#elif BUILDFLAG(IS_BSD) + PreSandboxInit(); #endif +#if BUILDFLAG(IS_BSD) + if (process_type.empty()) { + sandbox::policy::SandboxLinux::Options sandbox_options; + sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox( + sandbox::policy::SandboxTypeFromCommandLine( + *base::CommandLine::ForCurrentProcess()), + sandbox::policy::SandboxLinux::PreSandboxHook(), sandbox_options); + } +#endif + delegate_->SandboxInitialized(process_type); #if BUILDFLAG(USE_ZYGOTE) -@@ -1133,7 +1160,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { - ->ReconfigureAfterFeatureListInit(process_type); - } - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // If dynamic Mojo Core is being used, ensure that it's loaded very early in - // the child/zygote process, before any sandbox is initialized. The library - // is not fully initialized with IPC support until a ChildProcess is later -@@ -1168,6 +1195,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1157,6 +1184,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 0485fc483e0d..68717e9883b0 100644 --- a/www/iridium/files/patch-content_browser_BUILD.gn +++ b/www/iridium/files/patch-content_browser_BUILD.gn @@ -1,33 +1,33 @@ ---- content/browser/BUILD.gn.orig 2024-08-27 06:28:16 UTC +--- content/browser/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ content/browser/BUILD.gn -@@ -2396,6 +2396,14 @@ source_set("browser") { +@@ -2432,6 +2432,14 @@ source_set("browser") { ] } + if (is_bsd) { + sources += [ + "file_system_access/file_path_watcher/file_path_watcher_bsd.cc", + "file_system_access/file_path_watcher/file_path_watcher_kqueue.cc", + "file_system_access/file_path_watcher/file_path_watcher_kqueue.h", + ] + } + if (is_linux || is_chromeos) { sources += [ "child_process_launcher_helper_linux.cc", -@@ -2436,6 +2444,15 @@ source_set("browser") { +@@ -2475,6 +2483,15 @@ source_set("browser") { if (allow_oop_video_decoder) { sources += [ "media/stable_video_decoder_factory.cc" ] deps += [ "//media/mojo/mojom/stable:stable_video_decoder" ] + } + + if (is_bsd) { + sources -= [ + "file_system_access/file_path_watcher/file_path_watcher_inotify.cc", + "file_system_access/file_path_watcher/file_path_watcher_inotify.h", + "sandbox_ipc_linux.cc", + "sandbox_ipc_linux.h", + ] } if (is_chromeos) { diff --git a/www/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 b9ae3d8d0549..4cbe5f670e71 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 2024-08-27 06:28:16 UTC +--- content/browser/browser_child_process_host_impl.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/browser_child_process_host_impl.cc -@@ -324,6 +324,8 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo - switches::kMojoCoreLibraryPath, +@@ -328,6 +328,8 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo + switches::kLogBestEffortTasks, switches::kPerfettoDisableInterning, switches::kTraceToConsole, + switches::kDisableUnveil, + switches::kTrk, }; cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches); -@@ -655,7 +657,7 @@ void BrowserChildProcessHostImpl::OnProcessLaunched() +@@ -659,7 +661,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__main__loop.cc b/www/iridium/files/patch-content_browser_browser__main__loop.cc index 1d55d6c949af..faa50365a07e 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 2024-08-27 06:28:16 UTC +--- content/browser/browser_main_loop.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/browser_main_loop.cc -@@ -254,6 +254,12 @@ +@@ -250,6 +250,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 -@@ -549,6 +555,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 -@@ -586,7 +598,7 @@ int BrowserMainLoop::EarlyInitialization() { - base::PlatformThread::SetCurrentThreadType(base::ThreadType::kCompositing); +@@ -583,7 +595,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 116b48fb7c2b..7b3d65739dd9 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 2024-08-27 06:28:16 UTC +--- content/browser/browser_url_handler_impl.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/browser_url_handler_impl.cc -@@ -18,6 +18,7 @@ +@@ -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" -@@ -283,6 +284,10 @@ namespace iridium { +@@ -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.h b/www/iridium/files/patch-content_browser_child__process__launcher__helper.h index c62e591c8846..576dac701c0c 100644 --- a/www/iridium/files/patch-content_browser_child__process__launcher__helper.h +++ b/www/iridium/files/patch-content_browser_child__process__launcher__helper.h @@ -1,11 +1,11 @@ ---- content/browser/child_process_launcher_helper.h.orig 2024-08-27 06:28:16 UTC +--- content/browser/child_process_launcher_helper.h.orig 2024-11-04 08:56:03 UTC +++ content/browser/child_process_launcher_helper.h -@@ -299,7 +299,7 @@ class ChildProcessLauncherHelper +@@ -293,7 +293,7 @@ class ChildProcessLauncherHelper std::optional process_id_ = std::nullopt; #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The priority of the process. The state is stored to avoid changing the // setting repeatedly. std::optional priority_; diff --git a/www/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 7b62f69d3f63..ff99a36a1698 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,20 +1,20 @@ ---- content/browser/child_thread_type_switcher_linux.cc.orig 2024-06-25 12:08:48 UTC +--- content/browser/child_thread_type_switcher_linux.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/child_thread_type_switcher_linux.cc @@ -20,6 +20,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, &ns_pid_supported); if (peer_tid == -1) { -@@ -38,6 +41,7 @@ void SetThreadTypeOnLauncherThread(base::ProcessId pee +@@ -39,6 +42,7 @@ void SetThreadTypeOnLauncherThread(base::ProcessId pee base::PlatformThread::SetThreadType(peer_pid, peer_tid, thread_type, base::IsViaIPC(true)); +#endif } } // namespace 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 75dfe3838e3e..03e05b6fc8c4 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 2024-08-01 05:47:53 UTC +--- content/browser/file_system_access/file_path_watcher/file_path_watcher.h.orig 2024-11-04 08:56:03 UTC +++ content/browser/file_system_access/file_path_watcher/file_path_watcher.h @@ -125,7 +125,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_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) +- 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__system__access__local__path__watcher.cc b/www/iridium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc index 8a4ebfd0a8b8..f603b9b3f50c 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 2024-08-01 05:47:53 UTC +--- content/browser/file_system_access/file_system_access_local_path_watcher.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/file_system_access/file_system_access_local_path_watcher.cc -@@ -62,7 +62,7 @@ void FileSystemAccessLocalPathWatcher::Initialize( - FilePathWatcher::WatchOptions watch_options{ +@@ -63,7 +63,7 @@ void FileSystemAccessLocalPathWatcher::Initialize( .type = scope().IsRecursive() ? FilePathWatcher::Type::kRecursive : FilePathWatcher::Type::kNonRecursive, --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #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_gpu_gpu__data__manager__impl__private.cc b/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc index 1046c5806cec..8d2baa3c1231 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 2024-08-27 06:28:16 UTC +--- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1685,7 +1685,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( +@@ -1661,7 +1661,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( UMA_HISTOGRAM_ENUMERATION("GPU.CompositingMode", compositing_mode); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool GpuDataManagerImplPrivate::IsGpuMemoryBufferNV12Supported() { return is_gpu_memory_buffer_NV12_supported_; } diff --git a/www/iridium/files/patch-content_browser_gpu_gpu__memory__buffer__manager__singleton.cc b/www/iridium/files/patch-content_browser_gpu_gpu__memory__buffer__manager__singleton.cc index a544112fe0be..048ec083e0e3 100644 --- a/www/iridium/files/patch-content_browser_gpu_gpu__memory__buffer__manager__singleton.cc +++ b/www/iridium/files/patch-content_browser_gpu_gpu__memory__buffer__manager__singleton.cc @@ -1,20 +1,20 @@ ---- content/browser/gpu/gpu_memory_buffer_manager_singleton.cc.orig 2024-06-25 12:08:48 UTC +--- content/browser/gpu/gpu_memory_buffer_manager_singleton.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/gpu/gpu_memory_buffer_manager_singleton.cc -@@ -54,7 +54,7 @@ scoped_refptr GetTaskRun +@@ -46,7 +46,7 @@ scoped_refptr GetTaskRun #endif } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool IsGpuMemoryBufferNV12Supported() { static bool is_computed = false; static bool supported = false; -@@ -117,7 +117,7 @@ void GpuMemoryBufferManagerSingleton::OnGpuExtraInfoUp - SetNativeConfigurations(std::move(configs)); - } - #endif // BUILDFLAG(IS_OZONE_X11) +@@ -98,7 +98,7 @@ GpuMemoryBufferManagerSingleton::GetInstance() { + } + + void GpuMemoryBufferManagerSingleton::OnGpuExtraInfoUpdate() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Dynamic check whether the NV12 format is supported as it may be // inconsistent between the system GBM (Generic Buffer Management) and // chromium miniGBM. 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 7930270ee30b..396dc1c7c633 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 2024-08-01 05:47:53 UTC +--- content/browser/gpu/gpu_process_host.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/gpu/gpu_process_host.cc -@@ -273,6 +273,7 @@ static const char* const kSwitchNames[] = { +@@ -275,6 +275,7 @@ static const char* const kSwitchNames[] = { switches::kEnableLowEndDeviceMode, switches::kDisableSkiaGraphite, switches::kDisableLowEndDeviceMode, + switches::kDisableUnveil, switches::kProfilingAtStart, switches::kProfilingFile, switches::kProfilingFlush, -@@ -300,7 +301,7 @@ static const char* const kSwitchNames[] = { +@@ -302,7 +303,7 @@ static const char* const kSwitchNames[] = { switches::kOzoneDumpFile, switches::kEnableNativeGpuMemoryBuffers, #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) switches::kX11Display, switches::kNoXshm, #endif diff --git a/www/iridium/files/patch-content_browser_network__service__instance__impl.cc b/www/iridium/files/patch-content_browser_network__service__instance__impl.cc index 22223737d52e..c7f24f4422cb 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 2024-08-27 06:28:16 UTC +--- content/browser/network_service_instance_impl.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/network_service_instance_impl.cc @@ -85,7 +85,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 -@@ -363,7 +363,7 @@ void CreateInProcessNetworkService( +@@ -368,7 +368,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( -@@ -432,7 +432,7 @@ network::mojom::NetworkServiceParamsPtr CreateNetworkS +@@ -437,7 +437,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_render__process__host__impl.cc b/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.cc index e816b92608dd..e4193ce5c3e1 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,47 +1,56 @@ ---- content/browser/renderer_host/render_process_host_impl.cc.orig 2024-08-27 06:28:16 UTC +--- content/browser/renderer_host/render_process_host_impl.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/renderer_host/render_process_host_impl.cc -@@ -218,7 +218,7 @@ +@@ -220,7 +220,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 -@@ -948,7 +948,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = +@@ -1082,7 +1082,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; -@@ -1121,7 +1121,7 @@ RenderProcessHostImpl::IOThreadHostImpl::~IOThreadHost +@@ -1263,7 +1263,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) } -@@ -3131,7 +3131,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( +@@ -3286,7 +3286,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() && -@@ -3188,6 +3188,8 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin +@@ -3342,6 +3342,8 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, switches::kDisableTouchDragDrop, + switches::kDisableUnveil, + switches::kTrk, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, switches::kDisableWebGLImageChromium, +@@ -5112,7 +5114,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 4a35e4026fe5..b33a30b766ba 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 2024-08-27 06:28:16 UTC +--- content/browser/renderer_host/render_process_host_impl.h.orig 2024-11-04 08:56:03 UTC +++ content/browser/renderer_host/render_process_host_impl.h @@ -102,7 +102,7 @@ #include "media/fuchsia_media_codec_provider_impl.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/browser/child_thread_type_switcher_linux.h" #include "media/mojo/mojom/video_encode_accelerator.mojom.h" #endif -@@ -602,7 +602,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -612,7 +612,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // Sets this RenderProcessHost to be guest only. For Testing only. void SetForGuestsOnlyForTesting(); -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) // Launch the zygote early in the browser startup. static void EarlyZygoteLaunch(); #endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) -@@ -967,7 +967,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -977,7 +977,7 @@ class CONTENT_EXPORT RenderProcessHostImpl std::unique_ptr binders_; mojo::Receiver receiver_{this}; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::Remote video_encode_accelerator_factory_remote_; ChildThreadTypeSwitcher child_thread_type_switcher_; diff --git a/www/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 b9d43b0d1103..d4b29617e042 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 2024-08-27 06:28:16 UTC +--- content/browser/renderer_host/render_view_host_impl.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -274,7 +274,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( +@@ -275,7 +275,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( display::win::ScreenWin::GetSystemMetricsInDIP(SM_CYVSCROLL); prefs->arrow_bitmap_width_horizontal_scroll_bar_in_dips = display::win::ScreenWin::GetSystemMetricsInDIP(SM_CXHSCROLL); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kSystemFontFamily)) { prefs->system_font_family_name = diff --git a/www/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 0e7a59c879f9..7676fdb6db65 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 2024-09-14 15:19:53 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -120,7 +120,7 @@ +@@ -121,7 +121,7 @@ #include "ui/gfx/gdi_util.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "content/browser/accessibility/browser_accessibility_auralinux.h" + #include "ui/accessibility/platform/browser_accessibility_auralinux.h" #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/base/ime/text_input_flags.h" -@@ -479,7 +479,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge +@@ -484,7 +484,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge return ToBrowserAccessibilityWin(manager->GetBrowserAccessibilityRoot()) ->GetCOM(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - BrowserAccessibilityManager* manager = + ui::BrowserAccessibilityManager* manager = host()->GetOrCreateRootBrowserAccessibilityManager(); if (manager && manager->GetBrowserAccessibilityRoot()) -@@ -1736,7 +1736,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { +@@ -1745,7 +1745,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) { -@@ -2564,7 +2564,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -2654,7 +2654,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { } bool RenderWidgetHostViewAura::NeedsMouseCapture() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) return NeedsInputGrab(); #else return false; -@@ -2748,7 +2748,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -2838,7 +2838,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit if (!target_host) return; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* linux_ui = ui::LinuxUi::instance(); std::vector commands; if (!event.skip_if_unhandled && linux_ui && event.os_event && diff --git a/www/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 c8912d399df5..1a11b6c5b608 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 2024-08-27 06:28:16 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.h.orig 2024-11-04 08:56:03 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.h -@@ -260,7 +260,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura +@@ -267,7 +267,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_utility__process__host.cc b/www/iridium/files/patch-content_browser_utility__process__host.cc index d60c64e550bf..a099b5efaf89 100644 --- a/www/iridium/files/patch-content_browser_utility__process__host.cc +++ b/www/iridium/files/patch-content_browser_utility__process__host.cc @@ -1,72 +1,72 @@ ---- content/browser/utility_process_host.cc.orig 2024-08-27 06:28:16 UTC +--- content/browser/utility_process_host.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/utility_process_host.cc -@@ -61,7 +61,7 @@ +@@ -62,7 +62,7 @@ #include "content/browser/v8_snapshot_files.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/file_util.h" #include "base/files/scoped_file.h" #include "base/pickle.h" -@@ -74,7 +74,7 @@ +@@ -75,7 +75,7 @@ #include "services/network/public/mojom/network_service.mojom.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "base/task/sequenced_task_runner.h" #include "components/viz/host/gpu_client.h" #include "media/capture/capture_switches.h" -@@ -85,7 +85,7 @@ namespace content { +@@ -86,7 +86,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::ScopedFD PassNetworkContextParentDirs( std::vector network_context_parent_dirs) { base::Pickle pickle; -@@ -150,7 +150,7 @@ UtilityProcessHost::UtilityProcessHost(std::unique_ptr +@@ -151,7 +151,7 @@ UtilityProcessHost::UtilityProcessHost(std::unique_ptr started_(false), name_(u"utility process"), file_data_(std::make_unique()), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) allowed_gpu_(false), gpu_client_(nullptr, base::OnTaskRunnerDeleter(nullptr)), #endif -@@ -209,7 +209,7 @@ void UtilityProcessHost::SetPreloadLibraries( +@@ -210,7 +210,7 @@ void UtilityProcessHost::SetPreloadLibraries( #endif // BUILDFLAG(IS_WIN) void UtilityProcessHost::SetAllowGpuClient() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) allowed_gpu_ = true; #endif } -@@ -407,7 +407,7 @@ bool UtilityProcessHost::StartProcess() { +@@ -406,7 +406,7 @@ bool UtilityProcessHost::StartProcess() { file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload(*cmd_line)); #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The network service should have access to the parent directories // necessary for its usage. if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork) { -@@ -418,13 +418,13 @@ bool UtilityProcessHost::StartProcess() { +@@ -417,13 +417,13 @@ bool UtilityProcessHost::StartProcess() { } #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) // Pass `kVideoCaptureUseGpuMemoryBuffer` flag to video capture service only // when the video capture use GPU memory buffer enabled. if (metrics_name_ == video_capture::mojom::VideoCaptureService::Name_) { bool pass_gpu_buffer_flag = switches::IsVideoCaptureUseGpuMemoryBufferEnabled(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Check if NV12 GPU memory buffer supported at the same time. pass_gpu_buffer_flag = pass_gpu_buffer_flag && diff --git a/www/iridium/files/patch-content_browser_utility__sandbox__delegate.cc b/www/iridium/files/patch-content_browser_utility__sandbox__delegate.cc index c7788cd5bdf6..df2d087a2619 100644 --- a/www/iridium/files/patch-content_browser_utility__sandbox__delegate.cc +++ b/www/iridium/files/patch-content_browser_utility__sandbox__delegate.cc @@ -1,28 +1,28 @@ ---- content/browser/utility_sandbox_delegate.cc.orig 2024-08-27 06:28:16 UTC +--- content/browser/utility_sandbox_delegate.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/utility_sandbox_delegate.cc @@ -76,10 +76,10 @@ UtilitySandboxedProcessLauncherDelegate:: #if BUILDFLAG(IS_FUCHSIA) sandbox_type_ == sandbox::mojom::Sandbox::kVideoCapture || #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoDecoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoEncoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -136,10 +136,10 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe +@@ -137,10 +137,10 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe // process upon startup. if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork || sandbox_type_ == sandbox::mojom::Sandbox::kOnDeviceModelExecution || -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoDecoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoEncoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) 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 76611cc234a8..acaf94011321 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 2024-08-27 06:28:16 UTC +--- content/browser/web_contents/web_contents_view_aura.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/web_contents/web_contents_view_aura.cc @@ -174,7 +174,7 @@ class WebDragSourceAura : public content::WebContentsO raw_ptr window_; }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Fill out the OSExchangeData with a file contents, synthesizing a name if // necessary. void PrepareDragForFileContents(const DropData& drop_data, @@ -258,7 +258,7 @@ void PrepareDragData(const DropData& drop_data, if (!drop_data.download_metadata.empty()) PrepareDragForDownload(drop_data, provider, web_contents); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // We set the file contents before the URL because the URL also sets file // contents (to a .URL shortcut). We want to prefer file content data over // a shortcut so we add it first. -@@ -1319,7 +1319,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* +@@ -1324,7 +1324,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_zygote__host_zygote__host__impl__linux.cc b/www/iridium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.cc index 08719f607c02..3fb418f64536 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 2024-06-25 12:08:48 UTC +--- content/browser/zygote_host/zygote_host_impl_linux.cc.orig 2024-11-04 08:56:03 UTC +++ content/browser/zygote_host/zygote_host_impl_linux.cc -@@ -18,8 +18,10 @@ +@@ -19,8 +19,10 @@ #include "build/chromeos_buildflags.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" -@@ -37,6 +39,7 @@ namespace content { +@@ -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, -@@ -58,6 +61,7 @@ bool ReceiveFixedMessage(int fd, +@@ -60,6 +63,7 @@ bool ReceiveFixedMessage(int fd, return false; return true; } +#endif } // namespace -@@ -67,9 +71,13 @@ ZygoteHost* ZygoteHost::GetInstance() { +@@ -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_() {} -@@ -82,6 +90,7 @@ ZygoteHostImpl* ZygoteHostImpl::GetInstance() { +@@ -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; } -@@ -132,6 +141,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& com +@@ -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) { -@@ -156,6 +166,7 @@ pid_t ZygoteHostImpl::LaunchZygote( +@@ -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])); -@@ -224,9 +235,12 @@ pid_t ZygoteHostImpl::LaunchZygote( +@@ -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_child_child__process.cc b/www/iridium/files/patch-content_child_child__process.cc index 46d0d0ba2eae..f5dec9a792ce 100644 --- a/www/iridium/files/patch-content_child_child__process.cc +++ b/www/iridium/files/patch-content_child_child__process.cc @@ -1,29 +1,20 @@ ---- content/child/child_process.cc.orig 2024-08-01 05:47:53 UTC +--- content/child/child_process.cc.orig 2024-11-04 08:56:03 UTC +++ content/child/child_process.cc -@@ -35,7 +35,7 @@ +@@ -32,7 +32,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 -@@ -70,7 +70,7 @@ ChildProcess::ChildProcess(base::ThreadType io_thread_ - thread_pool_init_params) - : resetter_(&child_process, this, nullptr), - io_thread_(std::make_unique()) { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const base::CommandLine& command_line = - *base::CommandLine::ForCurrentProcess(); - const bool is_embedded_in_browser_process = -@@ -199,7 +199,7 @@ void ChildProcess::set_main_thread(ChildThreadImpl* th +@@ -179,7 +179,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_common_BUILD.gn b/www/iridium/files/patch-content_common_BUILD.gn index 04edc9cdc9ff..b64b1a783725 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 2024-08-27 06:28:16 UTC +--- content/common/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ content/common/BUILD.gn -@@ -388,19 +388,28 @@ source_set("common") { +@@ -386,19 +386,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 2c3fe5a36e73..d0288ab75adf 100644 --- a/www/iridium/files/patch-content_common_features.cc +++ b/www/iridium/files/patch-content_common_features.cc @@ -1,20 +1,20 @@ ---- content/common/features.cc.orig 2024-08-27 06:28:16 UTC +--- content/common/features.cc.orig 2024-11-04 08:56:03 UTC +++ content/common/features.cc -@@ -158,7 +158,7 @@ BASE_FEATURE(kEnableBackForwardCacheForOngoingSubframe +@@ -143,7 +143,7 @@ BASE_FEATURE(kEnableBackForwardCacheForOngoingSubframe base::FEATURE_ENABLED_BY_DEFAULT); // Enables error reporting for JS errors inside DevTools frontend host -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kEnableDevToolsJsErrorReporting, "EnableDevToolsJsErrorReporting", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -308,7 +308,7 @@ BASE_FEATURE(kGroupNIKByJoiningOrigin, +@@ -299,7 +299,7 @@ BASE_FEATURE(kGroupNIKByJoiningOrigin, // process and having browser process handle adjusting thread properties (nice // value, c-group, latency sensitivity...) for children which have sandbox // restrictions. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kHandleChildThreadTypeChangesInBrowser, "HandleChildThreadTypeChangesInBrowser", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/iridium/files/patch-content_common_features.h b/www/iridium/files/patch-content_common_features.h index 55126a8be673..98c7ca20af2b 100644 --- a/www/iridium/files/patch-content_common_features.h +++ b/www/iridium/files/patch-content_common_features.h @@ -1,20 +1,20 @@ ---- content/common/features.h.orig 2024-08-27 06:28:16 UTC +--- content/common/features.h.orig 2024-11-04 08:56:03 UTC +++ content/common/features.h -@@ -35,7 +35,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kDocumentPolicyNeg +@@ -34,7 +34,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kDocumentPolicyNeg CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableBackForwardCacheForScreenReader); CONTENT_EXPORT BASE_DECLARE_FEATURE( kEnableBackForwardCacheForOngoingSubframeNavigation); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableDevToolsJsErrorReporting); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) CONTENT_EXPORT BASE_DECLARE_FEATURE(kEmbeddingRequiresOptIn); @@ -76,7 +76,7 @@ CONTENT_EXPORT extern const base::FeatureParam CONTENT_EXPORT BASE_DECLARE_FEATURE(kGpuInfoCollectionSeparatePrefetch); #endif CONTENT_EXPORT BASE_DECLARE_FEATURE(kGroupNIKByJoiningOrigin); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT BASE_DECLARE_FEATURE(kHandleChildThreadTypeChangesInBrowser); #endif #if BUILDFLAG(IS_ANDROID) diff --git a/www/iridium/files/patch-content_common_mojo__core__library__support.cc b/www/iridium/files/patch-content_common_mojo__core__library__support.cc deleted file mode 100644 index 4411baf06427..000000000000 --- a/www/iridium/files/patch-content_common_mojo__core__library__support.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- content/common/mojo_core_library_support.cc.orig 2024-06-25 12:08:48 UTC -+++ content/common/mojo_core_library_support.cc -@@ -15,7 +15,7 @@ bool IsMojoCoreSharedLibraryEnabled() { - } - - std::optional GetMojoCoreSharedLibraryPath() { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const base::CommandLine& command_line = - *base::CommandLine::ForCurrentProcess(); - if (!command_line.HasSwitch(switches::kMojoCoreLibraryPath)) diff --git a/www/iridium/files/patch-content_gpu_gpu__main.cc b/www/iridium/files/patch-content_gpu_gpu__main.cc index 683d249edb0a..fe72fa5dbcc6 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 2024-08-27 06:28:16 UTC +--- content/gpu/gpu_main.cc.orig 2024-11-04 08:56:03 UTC +++ content/gpu/gpu_main.cc -@@ -94,10 +94,14 @@ +@@ -95,10 +95,14 @@ #include "sandbox/win/src/sandbox.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/sandboxed_process_thread_type_handler.h" #include "content/common/gpu_pre_sandbox_hook_linux.h" +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "sandbox/policy/sandbox_type.h" #endif -@@ -116,7 +120,7 @@ namespace content { +@@ -117,7 +121,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool StartSandboxLinux(gpu::GpuWatchdogThread*, const gpu::GPUInfo*, const gpu::GpuPreferences&); -@@ -174,7 +178,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel +@@ -175,7 +179,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel bool EnsureSandboxInitialized(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) override { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs); #elif BUILDFLAG(IS_WIN) return StartSandboxWindows(sandbox_info_); -@@ -284,7 +288,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -285,7 +289,7 @@ int GpuMain(MainFunctionParams parameters) { std::make_unique( gpu_preferences.message_pump_type); } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #error "Unsupported Linux platform." #elif BUILDFLAG(IS_MAC) // Cross-process CoreAnimation requires a CFRunLoop to function at all, and -@@ -306,7 +310,8 @@ int GpuMain(MainFunctionParams parameters) { - +@@ -308,7 +312,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. -@@ -436,7 +441,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -439,7 +444,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) { -@@ -476,7 +481,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo +@@ -479,7 +484,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo sandbox_options.accelerated_video_encode_enabled = !gpu_prefs.disable_accelerated_video_encode; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Video decoding of many video streams can use thousands of FDs as well as // Exo clients like Lacros. // See https://crbug.com/1417237 diff --git a/www/iridium/files/patch-content_public_browser_content__browser__client.cc b/www/iridium/files/patch-content_public_browser_content__browser__client.cc index 8d21a892e0fb..dfbcc298956c 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 2024-08-27 06:28:16 UTC +--- content/public/browser/content_browser_client.cc.orig 2024-11-04 08:56:03 UTC +++ content/public/browser/content_browser_client.cc -@@ -1325,7 +1325,7 @@ bool ContentBrowserClient::ShouldRunOutOfProcessSystem +@@ -1330,7 +1330,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_common_content__features.cc b/www/iridium/files/patch-content_public_common_content__features.cc index 20d51c774c42..37696056e9fc 100644 --- a/www/iridium/files/patch-content_public_common_content__features.cc +++ b/www/iridium/files/patch-content_public_common_content__features.cc @@ -1,35 +1,35 @@ ---- content/public/common/content_features.cc.orig 2024-08-27 06:28:16 UTC +--- content/public/common/content_features.cc.orig 2024-11-04 08:56:03 UTC +++ content/public/common/content_features.cc -@@ -36,7 +36,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, +@@ -65,7 +65,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, // TODO(crbug.com/40118868): Remove !IS_CHROMEOS_LACROS once lacros starts being // built with OS_CHROMEOS instead of OS_LINUX. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -1128,9 +1128,9 @@ BASE_FEATURE(kWebAssemblyTiering, +@@ -1206,9 +1206,9 @@ BASE_FEATURE(kWebAssemblyTiering, BASE_FEATURE(kWebAssemblyTrapHandler, "WebAssemblyTrapHandler", #if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC)) && \ + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) && \ defined(ARCH_CPU_X86_64)) || \ - ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)) && \ + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) && \ defined(ARCH_CPU_ARM64)) base::FEATURE_ENABLED_BY_DEFAULT #else -@@ -1167,7 +1167,11 @@ BASE_FEATURE(kWebUICodeCache, +@@ -1245,7 +1245,11 @@ BASE_FEATURE(kWebUICodeCache, // Controls whether the WebUSB API is enabled: // https://wicg.github.io/webusb +#if BUILDFLAG(IS_BSD) +BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_DISABLED_BY_DEFAULT); +#else BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_ENABLED_BY_DEFAULT); +#endif // Controls whether the WebXR Device API is enabled. BASE_FEATURE(kWebXr, "WebXR", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/iridium/files/patch-content_public_common_content__switches.cc b/www/iridium/files/patch-content_public_common_content__switches.cc index 140375441e42..8e2e647ecebe 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 2024-08-27 06:28:16 UTC +--- content/public/common/content_switches.cc.orig 2024-11-04 08:56:03 UTC +++ content/public/common/content_switches.cc -@@ -349,6 +349,10 @@ const char kEnableIsolatedWebAppsInRenderer[] = +@@ -350,6 +350,10 @@ const char kEnableIsolatedWebAppsInRenderer[] = // builds. const char kEnableLogging[] = "enable-logging"; +const char kDisableUnveil[] = "disable-unveil"; + -+const char kTrk[] = "trk"; ++const char kTrk[] = "disable-unveil"; + // Enables the type, downlinkMax attributes of the NetInfo API. Also, enables // triggering of change attribute of the NetInfo API when there is a change in // the connection type. -@@ -987,7 +991,7 @@ const char kPreventResizingContentsForTesting[] = +@@ -976,7 +980,7 @@ const char kPreventResizingContentsForTesting[] = // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Allows sending text-to-speech requests to speech-dispatcher, a common // Linux speech service. Because it's buggy, the user must explicitly // enable it so that visiting a random webpage can't cause instability. diff --git a/www/iridium/files/patch-content_public_common_content__switches.h b/www/iridium/files/patch-content_public_common_content__switches.h index 96d8f5f54510..42c7845f796b 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 2024-08-27 06:28:16 UTC +--- content/public/common/content_switches.h.orig 2024-11-04 08:56:03 UTC +++ content/public/common/content_switches.h @@ -110,6 +110,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[]; -@@ -268,7 +270,7 @@ CONTENT_EXPORT extern const char kPreventResizingConte +@@ -266,7 +268,7 @@ CONTENT_EXPORT extern const char kPreventResizingConte // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT extern const char kEnableSpeechDispatcher[]; CONTENT_EXPORT extern const char kLLVMProfileFile[]; #endif diff --git a/www/iridium/files/patch-content_renderer_render__thread__impl.cc b/www/iridium/files/patch-content_renderer_render__thread__impl.cc index 6b2f632c1192..c5c42cfd06d9 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 2024-08-27 06:28:16 UTC +--- content/renderer/render_thread_impl.cc.orig 2024-11-04 08:56:03 UTC +++ content/renderer/render_thread_impl.cc -@@ -214,6 +214,8 @@ +@@ -215,6 +215,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif -@@ -1017,7 +1019,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1022,7 +1024,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: kGpuStreamIdMedia, kGpuStreamPriorityMedia); const bool enable_video_decode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) && #endif // BUILDFLAG(IS_LINUX) !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) && -@@ -1026,7 +1028,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1031,7 +1033,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: gpu::kGpuFeatureStatusEnabled); const bool enable_video_encode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux) && #else !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoEncode) && -@@ -1801,7 +1803,7 @@ std::unique_ptr RenderThreadImpl::Create +@@ -1815,7 +1817,7 @@ std::unique_ptr RenderThreadImpl::Create bool enable_video_encode_accelerator) { mojo::PendingRemote vea_provider; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(media::kUseOutOfProcessVideoEncoding)) { BindHostReceiver(vea_provider.InitWithNewPipeAndPassReceiver()); } else { diff --git a/www/iridium/files/patch-content_utility_services.cc b/www/iridium/files/patch-content_utility_services.cc index 32ee417b0808..ece09d0bc120 100644 --- a/www/iridium/files/patch-content_utility_services.cc +++ b/www/iridium/files/patch-content_utility_services.cc @@ -1,99 +1,99 @@ ---- content/utility/services.cc.orig 2024-06-25 12:08:48 UTC +--- content/utility/services.cc.orig 2024-11-04 08:56:03 UTC +++ content/utility/services.cc @@ -74,7 +74,7 @@ extern sandbox::TargetServices* g_utility_target_services; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "media/mojo/services/mojo_video_encode_accelerator_provider_factory.h" #include "sandbox/linux/services/libc_interceptor.h" #include "sandbox/policy/mojom/sandbox.mojom.h" -@@ -97,7 +97,7 @@ extern sandbox::TargetServices* g_utility_target_servi +@@ -102,7 +102,7 @@ extern sandbox::TargetServices* g_utility_target_servi #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) #include "content/common/features.h" #include "media/mojo/services/stable_video_decoder_factory_process_service.h" // nogncheck -@@ -115,13 +115,13 @@ extern sandbox::TargetServices* g_utility_target_servi +@@ -120,13 +120,13 @@ extern sandbox::TargetServices* g_utility_target_servi #endif // BUILDFLAG(ENABLE_ACCESSIBILITY_SERVICE) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || \ - BUILDFLAG(ENABLE_VIDEO_EFFECTS) + BUILDFLAG(ENABLE_VIDEO_EFFECTS) || BUILDFLAG(IS_BSD) #include "services/viz/public/cpp/gpu/gpu.h" #include "services/viz/public/mojom/gpu.mojom.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(ENABLE_VIDEO_EFFECTS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "media/capture/capture_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -239,7 +239,7 @@ auto RunAudio(mojo::PendingReceiver( std::move(receiver), base::SingleThreadTaskRunner::GetCurrentDefault()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_CHROMEOS_ASH) { #else -@@ -384,7 +384,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( +@@ -395,7 +395,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) auto RunStableVideoDecoderFactoryProcessService( mojo::PendingReceiver< -@@ -395,7 +395,7 @@ auto RunStableVideoDecoderFactoryProcessService( +@@ -406,7 +406,7 @@ auto RunStableVideoDecoderFactoryProcessService( #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) auto RunVideoEncodeAcceleratorProviderFactory( mojo::PendingReceiver receiver) { -@@ -418,7 +418,7 @@ void RegisterIOThreadServices(mojo::ServiceFactory& se +@@ -429,7 +429,7 @@ void RegisterIOThreadServices(mojo::ServiceFactory& se // loop of type IO that can get notified when pipes have data. services.Add(RunNetworkService); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) if (base::FeatureList::IsEnabled( features::kRunStableVideoDecoderFactoryProcessServiceOnIOThread)) { -@@ -470,7 +470,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -485,7 +485,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) if (!base::FeatureList::IsEnabled( features::kRunStableVideoDecoderFactoryProcessServiceOnIOThread)) { -@@ -479,7 +479,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -494,7 +494,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) services.Add(RunVideoEncodeAcceleratorProviderFactory); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-content_utility_utility__main.cc b/www/iridium/files/patch-content_utility_utility__main.cc index 84dfd95fe743..670337fbca6e 100644 --- a/www/iridium/files/patch-content_utility_utility__main.cc +++ b/www/iridium/files/patch-content_utility_utility__main.cc @@ -1,128 +1,128 @@ ---- content/utility/utility_main.cc.orig 2024-08-27 06:28:16 UTC +--- content/utility/utility_main.cc.orig 2024-11-04 08:56:03 UTC +++ content/utility/utility_main.cc @@ -36,17 +36,21 @@ #include "services/screen_ai/buildflags/buildflags.h" #include "services/tracing/public/cpp/trace_startup.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/file_descriptor_store.h" #include "base/files/file_util.h" #include "base/pickle.h" #include "content/child/sandboxed_process_thread_type_handler.h" +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/common/gpu_pre_sandbox_hook_linux.h" +#endif #include "content/public/common/content_descriptor_keys.h" #include "content/utility/speech/speech_recognition_sandbox_hook_linux.h" #include "gpu/config/gpu_info_collector.h" #include "media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h" +#if !BUILDFLAG(IS_BSD) #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "services/audio/audio_sandbox_hook_linux.h" #include "services/network/network_sandbox_hook_linux.h" // gn check is not smart enough to realize that this include only applies to @@ -58,10 +62,15 @@ #endif #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#include "content/common/gpu_pre_sandbox_hook_bsd.h" +#endif + #if BUILDFLAG(IS_CHROMEOS_ASH) #include "chromeos/ash/components/assistant/buildflags.h" #include "chromeos/ash/services/ime/ime_sandbox_hook.h" @@ -73,7 +82,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if (BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))) #include "services/screen_ai/public/cpp/utilities.h" // nogncheck #include "services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h" // nogncheck #endif @@ -101,7 +110,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::vector GetNetworkContextsParentDirectories() { base::MemoryMappedFile::Region region; base::ScopedFD read_pipe_fd = base::FileDescriptorStore::GetInstance().TakeFD( @@ -128,9 +137,10 @@ std::vector GetNetworkContextsParentDirec return dirs; } +#if !BUILDFLAG(IS_BSD) bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox sandbox_type) { const bool obtain_gpu_info = -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoDecoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoEncoding; @@ -145,6 +155,7 @@ bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox san return false; } +#endif #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) @@ -242,7 +253,8 @@ int UtilityMain(MainFunctionParams parameters) { CHECK(on_device_model::OnDeviceModelService::PreSandboxInit()); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +// XXX BSD +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) // Thread type delegate of the process should be registered before first // thread type change in ChildProcess constructor. It also needs to be // registered before the process has multiple threads, which may race with @@ -254,7 +266,7 @@ int UtilityMain(MainFunctionParams parameters) { } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Initializes the sandbox before any threads are created. // TODO(jorgelo): move this after GTK initialization when we enable a strict // Seccomp-BPF policy. -@@ -292,7 +304,7 @@ int UtilityMain(MainFunctionParams parameters) { - screen_ai::GetBinaryPathSwitch())); - break; - #endif +@@ -295,7 +307,7 @@ int UtilityMain(MainFunctionParams parameters) { + case sandbox::mojom::Sandbox::kVideoEffects: + // TODO(crbug.com/361128453): Implement this. + NOTREACHED() << "kVideoEffects sandbox not implemented."; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case sandbox::mojom::Sandbox::kHardwareVideoDecoding: pre_sandbox_hook = base::BindOnce(&media::HardwareVideoDecodingPreSandboxHook); -@@ -319,6 +331,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -322,6 +334,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 = -@@ -326,6 +339,11 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -329,6 +342,11 @@ int UtilityMain(MainFunctionParams parameters) { sandbox::policy::Sandbox::Initialize( sandbox_type, std::move(pre_sandbox_hook), sandbox_options); } +#else + sandbox::policy::Sandbox::Initialize( + sandbox_type, std::move(pre_sandbox_hook), + sandbox::policy::SandboxLinux::Options()); +#endif // Start the HangWatcher now that the sandbox is engaged, if it hasn't // already been started. diff --git a/www/iridium/files/patch-device_fido_fido__discovery__factory.cc b/www/iridium/files/patch-device_fido_fido__discovery__factory.cc deleted file mode 100644 index 305e579ce50b..000000000000 --- a/www/iridium/files/patch-device_fido_fido__discovery__factory.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- device/fido/fido_discovery_factory.cc.orig 2024-06-25 12:08:48 UTC -+++ device/fido/fido_discovery_factory.cc -@@ -127,7 +127,7 @@ std::vector> FidoDi - - std::optional> - FidoDiscoveryFactory::MaybeCreateEnclaveDiscovery() { --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (!base::FeatureList::IsEnabled(kWebAuthnEnclaveAuthenticator) || - !enclave_ui_request_stream_ || !network_context_factory_) { - return std::nullopt; diff --git a/www/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 4e7d5f48473b..bbe99e390a1c 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 2024-06-25 12:08:48 UTC +--- extensions/browser/api/api_browser_context_keyed_service_factories.cc.orig 2024-11-04 08:56:03 UTC +++ extensions/browser/api/api_browser_context_keyed_service_factories.cc -@@ -102,7 +102,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt +@@ -114,7 +114,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt #endif MessageService::GetFactoryInstance(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) NetworkingPrivateEventRouterFactory::GetInstance(); #endif OffscreenDocumentManager::GetFactory(); diff --git a/www/iridium/files/patch-extensions_common_command.cc b/www/iridium/files/patch-extensions_common_command.cc index 1884677baab9..be1e8a20f271 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 2024-08-27 06:28:16 UTC +--- extensions/common/command.cc.orig 2024-11-04 08:56:03 UTC +++ extensions/common/command.cc -@@ -285,7 +285,7 @@ std::string Command::CommandPlatform() { +@@ -286,7 +286,7 @@ std::string Command::CommandPlatform() { return values::kKeybindingPlatformMac; #elif BUILDFLAG(IS_CHROMEOS) return values::kKeybindingPlatformChromeOs; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return values::kKeybindingPlatformLinux; #elif BUILDFLAG(IS_FUCHSIA) // TODO(crbug.com/40220501): Change this once we decide what string should be 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 e4dd82be6454..b9bd0e29066c 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 2022-03-28 18:11:04 UTC +--- extensions/renderer/bindings/api_binding_util.cc.orig 2024-11-04 08:56:03 UTC +++ extensions/renderer/bindings/api_binding_util.cc -@@ -132,7 +132,7 @@ std::string GetPlatformString() { +@@ -133,7 +133,7 @@ std::string GetPlatformString() { return "lacros"; #elif BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS) 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_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 1fd77de43428..345ec9d6c3b1 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 2023-07-24 14:27:53 UTC +--- extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc.orig 2024-11-04 08:56:03 UTC +++ extensions/shell/browser/api/runtime/shell_runtime_api_delegate.cc -@@ -44,7 +44,7 @@ void ShellRuntimeAPIDelegate::OpenURL(const GURL& unin +@@ -45,7 +45,7 @@ void ShellRuntimeAPIDelegate::OpenURL(const GURL& unin bool ShellRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) { #if BUILDFLAG(IS_CHROMEOS_ASH) info->os = api::runtime::PlatformOs::kCros; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) info->os = api::runtime::PlatformOs::kLinux; #endif return true; 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 cd5de46d73e6..a5bf8a0d842f 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 2024-08-27 06:28:16 UTC +--- gpu/command_buffer/service/dawn_context_provider.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/command_buffer/service/dawn_context_provider.cc -@@ -175,7 +175,7 @@ wgpu::BackendType DawnContextProvider::GetDefaultBacke +@@ -307,7 +307,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 d0c775f49155..1c6da250752e 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 2024-08-27 06:28:16 UTC +--- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/command_buffer/service/gles2_cmd_decoder.cc -@@ -2902,7 +2902,7 @@ GLES2Decoder* GLES2Decoder::Create( +@@ -2906,7 +2906,7 @@ GLES2Decoder* GLES2Decoder::Create( } // Allow linux to run fuzzers. -#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return new GLES2DecoderImpl(client, command_buffer_service, outputter, group); #else LOG(FATAL) << "Validating command decoder is not supported."; diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__context__state.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__context__state.cc new file mode 100644 index 000000000000..79c90282cbe1 --- /dev/null +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__context__state.cc @@ -0,0 +1,29 @@ +--- gpu/command_buffer/service/shared_context_state.cc.orig 2024-11-04 08:56:03 UTC ++++ gpu/command_buffer/service/shared_context_state.cc +@@ -56,7 +56,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 + +@@ -287,7 +287,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; +@@ -320,7 +320,7 @@ SharedContextState::~SharedContextState() { + transfer_cache_.reset(); + + #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 new file mode 100644 index 000000000000..b243987823d6 --- /dev/null +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__context__state.h @@ -0,0 +1,20 @@ +--- gpu/command_buffer/service/shared_context_state.h.orig 2024-11-04 08:56:03 UTC ++++ gpu/command_buffer/service/shared_context_state.h +@@ -222,7 +222,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(); + } +@@ -429,7 +429,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_external__vk__image__backing.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc index 6c2f2b5acf12..36b184aac56e 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 2024-08-27 06:28:16 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing.cc -@@ -54,7 +54,7 @@ +@@ -59,7 +59,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" -@@ -734,7 +734,7 @@ std::unique_ptr ExternalVkIma +@@ -727,7 +727,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 new file mode 100644 index 000000000000..cded5931fad0 --- /dev/null +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc @@ -0,0 +1,11 @@ +--- gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig 2024-11-04 08:56:03 UTC ++++ gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc +@@ -142,7 +142,7 @@ bool IsFormatSupported(viz::SharedImageFormat format, + } // namespace + + constexpr SharedImageUsageSet kSupportedUsage = +-#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_shared__image__factory.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc index 7e2f73e0a78b..f16ebc705ff8 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,11 +1,29 @@ ---- gpu/command_buffer/service/shared_image/shared_image_factory.cc.orig 2024-08-27 06:28:16 UTC +--- gpu/command_buffer/service/shared_image/shared_image_factory.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/command_buffer/service/shared_image/shared_image_factory.cc -@@ -148,7 +148,7 @@ gfx::GpuMemoryBufferType GetNativeBufferType() { +@@ -48,7 +48,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 @@ 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; +@@ -315,7 +315,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 7ed82696435d..05f6a3fe0e70 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 2024-08-27 06:28:16 UTC +--- gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/command_buffer/service/shared_image/shared_image_manager.cc -@@ -572,7 +572,7 @@ bool SharedImageManager::SupportsScanoutImages() { +@@ -603,7 +603,7 @@ bool SharedImageManager::SupportsScanoutImages() { return true; #elif BUILDFLAG(IS_ANDROID) return base::AndroidHardwareBufferCompat::IsSupportAvailable(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_native_pixmaps; diff --git a/www/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 0c3d3e8485fa..fdcef91c4b86 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 2024-08-27 06:28:16 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1303,7 +1303,7 @@ WGPUFuture WebGPUDecoderImpl::RequestAdapterImpl( +@@ -1309,7 +1309,7 @@ WGPUFuture WebGPUDecoderImpl::RequestAdapterImpl( force_fallback_adapter = true; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!shared_context_state_->GrContextIsVulkan() && !shared_context_state_->IsGraphiteDawnVulkan() && use_webgpu_adapter_ != WebGPUAdapterName::kOpenGLES) { -@@ -1972,7 +1972,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( +@@ -1978,7 +1978,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_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc b/www/iridium/files/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc index defced14644e..e8cac3ac7969 100644 --- a/www/iridium/files/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc +++ b/www/iridium/files/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc.orig 2023-07-24 14:27:53 UTC +--- gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc -@@ -27,7 +27,7 @@ +@@ -32,7 +32,7 @@ #include "ui/gfx/half_float.h" #include "ui/gl/test/gl_test_support.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h" #include "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h" #endif -@@ -70,7 +70,7 @@ class GpuMemoryBufferTest : public testing::TestWithPa +@@ -75,7 +75,7 @@ class GpuMemoryBufferTest : public testing::TestWithPa GLManager gl_; }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) class GpuMemoryBufferTestEGL : public testing::Test, public gpu::GpuCommandBufferTestEGL { public: 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 9ee8aa614d69..48c7429f0ef6 100644 --- a/www/iridium/files/patch-gpu_config_gpu__control__list.cc +++ b/www/iridium/files/patch-gpu_config_gpu__control__list.cc @@ -1,20 +1,20 @@ ---- gpu/config/gpu_control_list.cc.orig 2024-08-27 06:28:16 UTC +--- gpu/config/gpu_control_list.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/config/gpu_control_list.cc -@@ -277,7 +277,7 @@ bool GpuControlList::More::GLVersionInfoMismatch( +@@ -282,7 +282,7 @@ bool GpuControlList::More::GLVersionInfoMismatch( GpuControlList::GLType GpuControlList::More::GetDefaultGLType() { #if BUILDFLAG(IS_CHROMEOS) return kGLTypeGL; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kGLTypeGL; #elif BUILDFLAG(IS_MAC) return kGLTypeGL; -@@ -814,7 +814,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { +@@ -819,7 +819,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 fda3e2d4bae0..27a0bad6d1ed 100644 --- a/www/iridium/files/patch-gpu_config_gpu__finch__features.cc +++ b/www/iridium/files/patch-gpu_config_gpu__finch__features.cc @@ -1,20 +1,20 @@ ---- gpu/config/gpu_finch_features.cc.orig 2024-08-01 05:47:53 UTC +--- gpu/config/gpu_finch_features.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/config/gpu_finch_features.cc -@@ -157,7 +157,7 @@ const base::FeatureParam +@@ -150,7 +150,7 @@ const base::FeatureParam BASE_FEATURE(kDefaultEnableGpuRasterization, "DefaultEnableGpuRasterization", #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -170,7 +170,7 @@ BASE_FEATURE(kCanvasOopRasterization, +@@ -163,7 +163,7 @@ BASE_FEATURE(kCanvasOopRasterization, "CanvasOopRasterization", #if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) -+ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++ BUILDFLAG(IS_CHROMEOS) || 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 59b32a16a029..c3f93eb5f785 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 2024-06-25 12:08:48 UTC +--- gpu/config/gpu_info_collector.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/config/gpu_info_collector.cc -@@ -364,7 +364,7 @@ void ReportWebGPUAdapterMetrics(dawn::native::Instance +@@ -368,7 +368,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_ipc_common_gpu__memory__buffer__support.cc b/www/iridium/files/patch-gpu_ipc_common_gpu__memory__buffer__support.cc index fb7d2cecc0e8..99683556a785 100644 --- a/www/iridium/files/patch-gpu_ipc_common_gpu__memory__buffer__support.cc +++ b/www/iridium/files/patch-gpu_ipc_common_gpu__memory__buffer__support.cc @@ -1,20 +1,20 @@ ---- gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2023-08-28 20:17:35 UTC +--- gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/ipc/common/gpu_memory_buffer_support.cc @@ -26,7 +26,7 @@ #include "ui/ozone/public/ozone_platform.h" #endif -#if BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h" #endif -@@ -56,7 +56,7 @@ GpuMemoryBufferSupport::GetNativeGpuMemoryBufferType() +@@ -55,7 +55,7 @@ GpuMemoryBufferSupport::GetNativeGpuMemoryBufferType() return gfx::IO_SURFACE_BUFFER; #elif BUILDFLAG(IS_ANDROID) return gfx::ANDROID_HARDWARE_BUFFER; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD) return gfx::NATIVE_PIXMAP; #elif BUILDFLAG(IS_WIN) return gfx::DXGI_SHARED_HANDLE; 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 87e4f7b9ac6b..c34ecee341b5 100644 --- a/www/iridium/files/patch-gpu_ipc_service_gpu__init.cc +++ b/www/iridium/files/patch-gpu_ipc_service_gpu__init.cc @@ -1,74 +1,74 @@ ---- gpu/ipc/service/gpu_init.cc.orig 2024-08-27 06:28:16 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/ipc/service/gpu_init.cc -@@ -398,7 +398,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -387,7 +387,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL enable_watchdog = false; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool gpu_sandbox_start_early = gpu_preferences_.gpu_sandbox_start_early; #else // !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) // For some reasons MacOSX's VideoToolbox might crash when called after -@@ -435,7 +435,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -424,7 +424,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } bool attempted_startsandbox = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Chrome OS ARM Mali, GPU driver userspace creates threads when // initializing a GL context, so start the sandbox early. // TODO(zmo): Need to collect OS version before this. -@@ -544,7 +544,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -528,7 +528,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL gpu_preferences_.gr_context_type = GrContextType::kGL; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The ContentSandboxHelper is currently the only one implementation of // GpuSandboxHelper and it has no dependency. Except on Linux where // VaapiWrapper checks the GL implementation to determine which display -@@ -626,7 +626,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -610,7 +610,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL command_line, gpu_feature_info_, gpu_preferences_.disable_software_rasterizer, false); if (gl_use_swiftshader_) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly " << "on Linux"; return false; -@@ -777,7 +777,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -761,7 +761,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL InitializePlatformOverlaySettings(&gpu_info_, gpu_feature_info_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. -@@ -832,7 +832,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -816,7 +816,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 -@@ -1022,7 +1022,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -1001,7 +1001,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 -@@ -1077,7 +1077,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -1056,7 +1056,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_gpu__memory__buffer__factory.cc b/www/iridium/files/patch-gpu_ipc_service_gpu__memory__buffer__factory.cc index edfd487a6d47..292deb113cc6 100644 --- a/www/iridium/files/patch-gpu_ipc_service_gpu__memory__buffer__factory.cc +++ b/www/iridium/files/patch-gpu_ipc_service_gpu__memory__buffer__factory.cc @@ -1,20 +1,20 @@ ---- gpu/ipc/service/gpu_memory_buffer_factory.cc.orig 2024-08-27 06:28:16 UTC +--- gpu/ipc/service/gpu_memory_buffer_factory.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/ipc/service/gpu_memory_buffer_factory.cc @@ -14,7 +14,7 @@ #include "gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "gpu/ipc/service/gpu_memory_buffer_factory_native_pixmap.h" #endif -@@ -37,7 +37,7 @@ GpuMemoryBufferFactory::CreateNativeType( - return std::make_unique(); - #elif BUILDFLAG(IS_ANDROID) - return std::make_unique(); +@@ -71,7 +71,7 @@ GpuMemoryBufferFactory::CreateNativeType( + // to have a factory that vends invalid GMB handles rather than having no + // factory at all. + 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_vulkan_vulkan__device__queue.cc b/www/iridium/files/patch-gpu_vulkan_vulkan__device__queue.cc index 29ee748215e0..4679193d49fe 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 2024-08-01 05:47:53 UTC +--- gpu/vulkan/vulkan_device_queue.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/vulkan/vulkan_device_queue.cc -@@ -149,7 +149,7 @@ bool VulkanDeviceQueue::Initialize( +@@ -154,7 +154,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( +@@ -297,7 +297,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__util.cc b/www/iridium/files/patch-gpu_vulkan_vulkan__util.cc index 31c047bb2967..c10e7858786f 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 2024-06-25 12:08:48 UTC +--- gpu/vulkan/vulkan_util.cc.orig 2024-11-04 08:56:03 UTC +++ gpu/vulkan/vulkan_util.cc -@@ -468,7 +468,7 @@ bool CheckVulkanCompatibilities( +@@ -473,7 +473,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_lib_browser_headless__content__browser__client.cc b/www/iridium/files/patch-headless_lib_browser_headless__content__browser__client.cc new file mode 100644 index 000000000000..a06edb34cb33 --- /dev/null +++ b/www/iridium/files/patch-headless_lib_browser_headless__content__browser__client.cc @@ -0,0 +1,20 @@ +--- headless/lib/browser/headless_content_browser_client.cc.orig 2024-11-04 08:56:03 UTC ++++ headless/lib/browser/headless_content_browser_client.cc +@@ -56,7 +56,7 @@ + #include "content/public/common/content_descriptors.h" + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + +-#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)) && defined(HEADLESS_USE_PREFS) ++#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(HEADLESS_USE_PREFS) + #include "components/os_crypt/sync/os_crypt.h" // nogncheck + #include "content/public/browser/network_service_util.h" + #endif +@@ -478,7 +478,7 @@ void HeadlessContentBrowserClient::HandleExplicitlyAll + + 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__request__context__manager.cc b/www/iridium/files/patch-headless_lib_browser_headless__request__context__manager.cc deleted file mode 100644 index 9bccb7ea83ae..000000000000 --- a/www/iridium/files/patch-headless_lib_browser_headless__request__context__manager.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- headless/lib/browser/headless_request_context_manager.cc.orig 2024-06-25 12:08:48 UTC -+++ headless/lib/browser/headless_request_context_manager.cc -@@ -66,7 +66,7 @@ void SetCryptKeyOnce(const base::FilePath& user_data_p - return; - done_once = true; - --#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)) && defined(HEADLESS_USE_PREFS) -+#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(HEADLESS_USE_PREFS) - // The OSCrypt keys are process bound, so if network service is out of - // process, send it the required key if it is available. - if (content::IsOutOfProcessNetworkService() diff --git a/www/iridium/files/patch-headless_lib_headless__content__main__delegate.cc b/www/iridium/files/patch-headless_lib_headless__content__main__delegate.cc index 0675ec93be44..68d942bfdae2 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 2024-08-27 06:28:16 UTC +--- headless/lib/headless_content_main_delegate.cc.orig 2024-11-04 08:56:03 UTC +++ headless/lib/headless_content_main_delegate.cc -@@ -409,7 +409,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( +@@ -406,7 +406,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-media_BUILD.gn b/www/iridium/files/patch-media_BUILD.gn index 308729c15f21..0aeb7ebe93a4 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 2024-06-25 12:08:48 UTC +--- media/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ media/BUILD.gn -@@ -90,6 +90,9 @@ config("media_config") { +@@ -91,6 +91,9 @@ config("media_config") { defines += [ "DLOPEN_PULSEAUDIO" ] } } + if (use_sndio) { + defines += [ "USE_SNDIO" ] + } - if (use_cras) { - defines += [ "USE_CRAS" ] - } + } + + # 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 fe71e86e7828..8d11505e121f 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 2024-08-05 14:59:35 UTC +--- media/audio/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ media/audio/BUILD.gn -@@ -270,9 +270,23 @@ source_set("audio") { +@@ -268,9 +268,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 a1f077607458..1d08e000306b 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 2024-08-01 05:47:53 UTC +--- media/audio/alsa/audio_manager_alsa.cc.orig 2024-11-04 08:56:03 UTC +++ media/audio/alsa/audio_manager_alsa.cc -@@ -95,7 +95,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType +@@ -100,7 +100,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 = NULL; int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); if (!error) { -@@ -107,7 +109,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType +@@ -112,7 +114,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, -@@ -190,7 +194,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvailable( +@@ -195,7 +199,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvailable( // goes through software conversion if needed (e.g. incompatible // sample rate). // TODO(joi): Should we prefer "hw" instead? +#if BUILDFLAG(IS_BSD) + static const char kDeviceTypeDesired[] = "plug"; +#else static const char kDeviceTypeDesired[] = "plughw"; +#endif return strncmp(kDeviceTypeDesired, device_name, std::size(kDeviceTypeDesired) - 1) == 0; } -@@ -242,7 +250,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( +@@ -247,7 +255,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) { for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) { -@@ -266,7 +276,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( +@@ -271,7 +281,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 5f6330bea569..71be572574d9 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 2024-06-25 12:08:48 UTC +--- media/audio/audio_input_device.cc.orig 2024-11-04 08:56:03 UTC +++ media/audio/audio_input_device.cc -@@ -264,7 +264,7 @@ void AudioInputDevice::OnStreamCreated( +@@ -269,7 +269,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_pulse_pulse__util.cc b/www/iridium/files/patch-media_audio_pulse_pulse__util.cc index 38a438974423..0d37a7ae2e8e 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 2024-06-25 12:08:48 UTC +--- media/audio/pulse/pulse_util.cc.orig 2024-11-04 08:56:03 UTC +++ media/audio/pulse/pulse_util.cc -@@ -45,7 +45,11 @@ constexpr char kBrowserDisplayName[] = "chromium-brows +@@ -50,7 +50,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_base_audio__latency.cc b/www/iridium/files/patch-media_base_audio__latency.cc index 428296422d37..7da7a2731421 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 2023-04-22 17:45:15 UTC +--- media/base/audio_latency.cc.orig 2024-11-04 08:56:03 UTC +++ media/base/audio_latency.cc -@@ -147,7 +147,7 @@ int AudioLatency::GetRtcBufferSize(int sample_rate, in +@@ -148,7 +148,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_media__switches.cc b/www/iridium/files/patch-media_base_media__switches.cc index 33febe0d6b2e..1c0624524231 100644 --- a/www/iridium/files/patch-media_base_media__switches.cc +++ b/www/iridium/files/patch-media_base_media__switches.cc @@ -1,132 +1,114 @@ ---- media/base/media_switches.cc.orig 2024-08-27 06:28:16 UTC +--- media/base/media_switches.cc.orig 2024-11-04 08:56:03 UTC +++ media/base/media_switches.cc @@ -21,7 +21,7 @@ #include "ui/gl/gl_features.h" #include "ui/gl/gl_utils.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/cpu.h" #endif -@@ -368,8 +368,8 @@ BASE_FEATURE(kMacLoopbackAudioForScreenShare, - "MacLoopbackAudioForScreenShare", +@@ -375,8 +375,8 @@ BASE_FEATURE(kUseSCContentSharingPicker, + "UseSCContentSharingPicker", base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_MAC) - -#if BUILDFLAG(IS_LINUX) + +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables system audio mirroring using pulseaudio. BASE_FEATURE(kPulseaudioLoopbackForCast, "PulseaudioLoopbackForCast", -@@ -379,6 +379,28 @@ BASE_FEATURE(kPulseaudioLoopbackForCast, +@@ -386,6 +386,28 @@ BASE_FEATURE(kPulseaudioLoopbackForCast, BASE_FEATURE(kPulseaudioLoopbackForScreenShare, "PulseaudioLoopbackForScreenShare", base::FEATURE_DISABLED_BY_DEFAULT); + +BASE_FEATURE(kAudioBackend, + "AudioBackend", + base::FEATURE_ENABLED_BY_DEFAULT); + +constexpr base::FeatureParam::Option + kAudioBackendOptions[] = { + {AudioBackend::kAuto, + "auto"}, + {AudioBackend::kPulseAudio, "pulseaudio"}, + {AudioBackend::kSndio, "sndio"}, + {AudioBackend::kAlsa, "alsa"}}; + +const base::FeatureParam + kAudioBackendParam{ + &kAudioBackend, "audio-backend", +#if BUILDFLAG(IS_OPENBSD) + AudioBackend::kSndio, +#elif BUILDFLAG(IS_FREEBSD) + AudioBackend::kAuto, +#endif + &kAudioBackendOptions}; #endif // BUILDFLAG(IS_LINUX) // When enabled, MediaCapabilities will check with GPU Video Accelerator -@@ -676,7 +698,7 @@ BASE_FEATURE(kFeatureManagementLiveTranslateCrOS, +@@ -682,7 +704,7 @@ BASE_FEATURE(kFileDialogsBlockPictureInPicture, // Show toolbar button that opens dialog for controlling media sessions. BASE_FEATURE(kGlobalMediaControls, "GlobalMediaControls", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -704,7 +726,7 @@ BASE_FEATURE(kGlobalMediaControlsUpdatedUI, +@@ -705,7 +727,7 @@ BASE_FEATURE(kGlobalMediaControlsUpdatedUI, // If enabled, users can request Media Remoting without fullscreen-in-tab. BASE_FEATURE(kMediaRemotingWithoutFullscreen, "MediaRemotingWithoutFullscreen", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -716,7 +738,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, +@@ -717,7 +739,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, BASE_FEATURE(kGlobalMediaControlsPictureInPicture, "GlobalMediaControlsPictureInPicture", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -745,7 +767,7 @@ BASE_FEATURE(kUnifiedAutoplay, +@@ -746,7 +768,7 @@ BASE_FEATURE(kUnifiedAutoplay, "UnifiedAutoplay", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enable vaapi video decoding on linux. This is already enabled by default on // chromeos, but needs an experiment on linux. BASE_FEATURE(kVaapiVideoDecodeLinux, -@@ -836,7 +858,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, - "VaapiVp9SModeHWEncoding", - base::FEATURE_ENABLED_BY_DEFAULT); +@@ -846,7 +868,7 @@ BASE_FEATURE(kVSyncMjpegDecoding, + "VSyncMjpegDecoding", + base::FEATURE_DISABLED_BY_DEFAULT); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables the new V4L2StatefulVideoDecoder instead of V4L2VideoDecoder. // Owners: frkoenig@chromium.org, mcasas@chromium.org // Expiry: When the |V4L2FlatVideoDecoder| flag handles stateful decoding on -@@ -963,7 +985,7 @@ BASE_FEATURE(kLiveCaptionUseWaitK, - // Live Caption can be used in multiple languages, as opposed to just English. - BASE_FEATURE(kLiveCaptionMultiLanguage, - "LiveCaptionMultiLanguage", --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT - #else - base::FEATURE_DISABLED_BY_DEFAULT -@@ -993,7 +1015,7 @@ BASE_FEATURE(kLiveCaptionWebAudio, - // Live Translate translates captions generated by Live Caption. - BASE_FEATURE(kLiveTranslate, - "LiveTranslate", --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT - #else - base::FEATURE_DISABLED_BY_DEFAULT -@@ -1468,7 +1490,7 @@ BASE_FEATURE(kUseGTFOOutOfProcessVideoDecoding, +@@ -1479,7 +1501,7 @@ BASE_FEATURE(kUseGTFOOutOfProcessVideoDecoding, base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Spawn utility processes to perform hardware encode acceleration instead of // using the GPU process. BASE_FEATURE(kUseOutOfProcessVideoEncoding, -@@ -1548,7 +1570,7 @@ BASE_FEATURE(kRecordWebAudioEngagement, +@@ -1559,7 +1581,7 @@ BASE_FEATURE(kRecordWebAudioEngagement, "RecordWebAudioEngagement", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Reduces the number of buffers needed in the output video frame pool to // populate the Renderer pipeline for hardware accelerated VideoDecoder in // non-low latency scenarios. diff --git a/www/iridium/files/patch-media_base_media__switches.h b/www/iridium/files/patch-media_base_media__switches.h index d3c613935689..31355c1ad7d9 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 2024-08-27 06:28:16 UTC +--- media/base/media_switches.h.orig 2024-11-04 08:56:03 UTC +++ media/base/media_switches.h -@@ -325,13 +325,25 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlatformHEVCEncoder +@@ -331,13 +331,25 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlatformHEVCEncoder MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlaybackSpeedButton); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMediaEngagementData); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMetadataSuspend); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForCast); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForScreenShare); + +enum class AudioBackend { + kAuto, + kPulseAudio, + kSndio, + kAlsa +}; + +MEDIA_EXPORT BASE_DECLARE_FEATURE(kAudioBackend); +MEDIA_EXPORT extern const base::FeatureParam< + AudioBackend> + kAudioBackendParam; #endif // BUILDFLAG(IS_LINUX) MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordMediaEngagementScores); MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordWebAudioEngagement); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kReduceHardwareVideoDecoderBuffers); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) MEDIA_EXPORT BASE_DECLARE_FEATURE(kResumeBackgroundVideo); -@@ -346,7 +358,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay); +@@ -352,7 +364,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseAndroidOverlayForSecureOnly); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseDecoderStreamForWebRTC); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMediaStream); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinux); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinuxGL); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoEncodeLinux); -@@ -365,7 +377,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLa - MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLayerHWEncoding); +@@ -373,7 +385,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLay MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEncoding); + MEDIA_EXPORT BASE_DECLARE_FEATURE(kVSyncMjpegDecoding); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder); + MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2H264TemporalLayerHWEncoding); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) - MEDIA_EXPORT BASE_DECLARE_FEATURE(kVideoBlitColorAccuracy); -@@ -510,7 +522,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVide +@@ -513,7 +525,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVide MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseGTFOOutOfProcessVideoDecoding); #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoEncoding); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-media_base_video__frame.cc b/www/iridium/files/patch-media_base_video__frame.cc index 64739a7cddc6..2c9e9c66ac77 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 2024-08-27 06:28:16 UTC +--- media/base/video_frame.cc.orig 2024-11-04 08:56:03 UTC +++ media/base/video_frame.cc -@@ -83,7 +83,7 @@ std::string VideoFrame::StorageTypeToString( +@@ -88,7 +88,7 @@ std::string VideoFrame::StorageTypeToString( return "OWNED_MEMORY"; case VideoFrame::STORAGE_SHMEM: return "SHMEM"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case VideoFrame::STORAGE_DMABUFS: return "DMABUFS"; #endif -@@ -98,7 +98,7 @@ std::string VideoFrame::StorageTypeToString( +@@ -103,7 +103,7 @@ std::string VideoFrame::StorageTypeToString( // static bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) { return -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This is not strictly needed but makes explicit that, at VideoFrame // level, DmaBufs are not mappable from userspace. storage_type != VideoFrame::STORAGE_DMABUFS && -@@ -396,7 +396,7 @@ VideoFrame::CreateFrameForGpuMemoryBufferOrMappableSII +@@ -401,7 +401,7 @@ VideoFrame::CreateFrameForGpuMemoryBufferOrMappableSII : shared_image->GetStrideForVideoFrame(i); } uint64_t modifier = gfx::NativePixmapHandle::kNoModifier; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool is_native_buffer = gpu_memory_buffer ? (gpu_memory_buffer->GetType() != gfx::SHARED_MEMORY_BUFFER) -@@ -817,7 +817,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM +@@ -782,7 +782,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM return frame; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // static scoped_refptr VideoFrame::WrapExternalDmabufs( const VideoFrameLayout& layout, -@@ -1528,7 +1528,7 @@ scoped_refptr VideoFrame::shar - : shared_images_[texture_index]; +@@ -1489,7 +1489,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 b247df3053f5..766a59529606 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 2024-08-27 06:28:16 UTC +--- media/base/video_frame.h.orig 2024-11-04 08:56:03 UTC +++ media/base/video_frame.h -@@ -45,7 +45,7 @@ +@@ -50,7 +50,7 @@ #include "base/apple/scoped_cftyperef.h" #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/scoped_file.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -111,7 +111,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -116,7 +116,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte STORAGE_UNOWNED_MEMORY = 2, // External, non owned data pointers. STORAGE_OWNED_MEMORY = 3, // VideoFrame has allocated its own data buffer. STORAGE_SHMEM = 4, // Backed by read-only shared memory. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(mcasas): Consider turning this type into STORAGE_NATIVE // based on the idea of using this same enum value for both DMA // buffers on Linux and CVPixelBuffers on Mac (which currently use -@@ -402,7 +402,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -393,7 +393,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte ReleaseMailboxAndGpuMemoryBufferCB mailbox_holder_and_gmb_release_cb, base::TimeDelta timestamp); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Wraps provided dmabufs // (https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html) with a // VideoFrame. The frame will take ownership of |dmabuf_fds|, and will -@@ -721,7 +721,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte - scoped_refptr shared_image( - size_t texture_index) const; +@@ -711,7 +711,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. -@@ -963,7 +963,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -953,7 +953,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // GpuMemoryBuffers. Clients will set this flag while creating a VideoFrame. bool is_mappable_si_enabled_ = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Dmabufs for the frame, used when storage is STORAGE_DMABUFS. Size is either // equal or less than the number of planes of the frame. If it is less, then diff --git a/www/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 45683349dfa1..2fd834ed5f62 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 2024-08-01 05:47:53 UTC +--- media/capture/video/linux/v4l2_capture_delegate.cc.orig 2024-11-04 08:56:03 UTC +++ media/capture/video/linux/v4l2_capture_delegate.cc @@ -5,8 +5,10 @@ #include "media/capture/video/linux/v4l2_capture_delegate.h" #include +#if !BUILDFLAG(IS_BSD) #include #include +#endif #include #include #include -@@ -27,17 +29,19 @@ +@@ -29,17 +31,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. -@@ -47,6 +51,14 @@ using media::mojom::MeteringMode; +@@ -49,6 +53,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 { -@@ -264,7 +276,7 @@ bool V4L2CaptureDelegate::IsBlockedControl(int control +@@ -268,7 +280,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 -@@ -320,7 +332,7 @@ V4L2CaptureDelegate::V4L2CaptureDelegate( +@@ -324,7 +336,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) } -@@ -447,7 +459,7 @@ void V4L2CaptureDelegate::AllocateAndStart( +@@ -451,7 +463,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( std::move(gmb_support_test_)); -@@ -797,7 +809,7 @@ void V4L2CaptureDelegate::SetGPUEnvironmentForTesting( +@@ -801,7 +813,7 @@ void V4L2CaptureDelegate::SetGPUEnvironmentForTesting( 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) { -@@ -807,7 +819,7 @@ bool V4L2CaptureDelegate::RunIoctl(int request, void* +@@ -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)); } -@@ -818,6 +830,7 @@ bool V4L2CaptureDelegate::IsControllableControl(int co +@@ -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, -@@ -845,6 +858,7 @@ void V4L2CaptureDelegate::ReplaceControlEventSubscript +@@ -849,6 +862,7 @@ void V4L2CaptureDelegate::ReplaceControlEventSubscript << ", {type = V4L2_EVENT_CTRL, id = " << control_id << "}"; } } +#endif } mojom::RangePtr V4L2CaptureDelegate::RetrieveUserControlRange(int control_id) { -@@ -1025,7 +1039,11 @@ void V4L2CaptureDelegate::DoCapture() { +@@ -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)); -@@ -1063,6 +1081,7 @@ void V4L2CaptureDelegate::DoCapture() { +@@ -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; -@@ -1098,6 +1117,7 @@ void V4L2CaptureDelegate::DoCapture() { +@@ -1102,6 +1121,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) { -@@ -1151,7 +1171,7 @@ void V4L2CaptureDelegate::DoCapture() { +@@ -1155,7 +1175,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(), -@@ -1224,7 +1244,7 @@ void V4L2CaptureDelegate::SetErrorState(VideoCaptureEr +@@ -1228,7 +1248,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_video__capture__device__client.cc b/www/iridium/files/patch-media_capture_video_video__capture__device__client.cc index 54f83e2a97ba..3e6df775b64d 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 2024-06-25 12:08:48 UTC +--- media/capture/video/video_capture_device_client.cc.orig 2024-11-04 08:56:03 UTC +++ media/capture/video/video_capture_device_client.cc -@@ -164,7 +164,7 @@ FourccAndFlip GetFourccAndFlipFromPixelFormat( +@@ -169,7 +169,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_gpu_chromeos_libyuv__image__processor__backend.cc b/www/iridium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc index 7c10b8240d91..fb893a49e588 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 2024-06-25 12:08:48 UTC +--- media/gpu/chromeos/libyuv_image_processor_backend.cc.orig 2024-11-04 08:56:03 UTC +++ media/gpu/chromeos/libyuv_image_processor_backend.cc -@@ -48,7 +48,7 @@ static constexpr struct { +@@ -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), -@@ -415,7 +415,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr +@@ -420,7 +420,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) -@@ -577,7 +577,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr +@@ -582,7 +582,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 d05ddfa196e0..9afb7ea3dc29 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 2024-08-01 05:47:53 UTC +--- media/gpu/chromeos/mailbox_video_frame_converter.cc.orig 2024-11-04 08:56:03 UTC +++ media/gpu/chromeos/mailbox_video_frame_converter.cc @@ -67,7 +67,7 @@ viz::SharedImageFormat GetSharedImageFormat(gfx::Buffe << static_cast(buffer_format); - NOTREACHED_NORETURN(); + NOTREACHED(); } -#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 (format.is_multi_plane()) { 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 3ed4e07dce19..ffcc81720c2d 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 2024-08-27 06:28:16 UTC +--- media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc.orig 2024-11-04 08:56:03 UTC +++ media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc @@ -16,7 +16,9 @@ #include "media/gpu/vaapi/vaapi_wrapper.h" #endif +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; +#endif // TODO(b/195769334): the hardware video decoding sandbox is really only useful // when building with VA-API or V4L2 (otherwise, we're not really doing hardware @@ -32,6 +34,7 @@ using sandbox::syscall_broker::BrokerFilePermission; namespace media { namespace { +#if !BUILDFLAG(IS_BSD) void AllowAccessToRenderNodes(std::vector& permissions, bool include_sys_dev_char, bool read_write) { -@@ -176,6 +179,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( - NOTREACHED_NORETURN(); +@@ -188,6 +191,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( + NOTREACHED(); #endif // BUILDFLAG(USE_V4L2_CODEC) } +#endif } // namespace -@@ -191,6 +195,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( +@@ -203,6 +207,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( // (at least). bool HardwareVideoDecodingPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) using HardwareVideoDecodingProcessPolicy = sandbox::policy::HardwareVideoDecodingProcessPolicy; using PolicyType = -@@ -236,6 +241,7 @@ bool HardwareVideoDecodingPreSandboxHook( +@@ -248,6 +253,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__encoding__sandbox__hook__linux.cc b/www/iridium/files/patch-media_gpu_sandbox_hardware__video__encoding__sandbox__hook__linux.cc index 6d4154122145..7b6208e93c03 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 2024-06-25 12:08:48 UTC +--- media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.cc.orig 2024-11-04 08:56:03 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; -@@ -120,6 +123,7 @@ bool HardwareVideoEncodingPreSandboxHook( - return false; - } +@@ -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_test_raw__video.cc b/www/iridium/files/patch-media_gpu_test_raw__video.cc new file mode 100644 index 000000000000..79adbddeef64 --- /dev/null +++ b/www/iridium/files/patch-media_gpu_test_raw__video.cc @@ -0,0 +1,11 @@ +--- media/gpu/test/raw_video.cc.orig 2024-11-04 08:56:03 UTC ++++ media/gpu/test/raw_video.cc +@@ -60,7 +60,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 new file mode 100644 index 000000000000..b865ecf93f88 --- /dev/null +++ b/www/iridium/files/patch-media_gpu_test_video__frame__file__writer.cc @@ -0,0 +1,11 @@ +--- media/gpu/test/video_frame_file_writer.cc.orig 2024-11-04 08:56:03 UTC ++++ media/gpu/test/video_frame_file_writer.cc +@@ -26,7 +26,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 new file mode 100644 index 000000000000..58e803fcbc69 --- /dev/null +++ b/www/iridium/files/patch-media_gpu_test_video__frame__helpers.cc @@ -0,0 +1,11 @@ +--- media/gpu/test/video_frame_helpers.cc.orig 2024-11-04 08:56:03 UTC ++++ media/gpu/test/video_frame_helpers.cc +@@ -22,7 +22,7 @@ + #include "ui/gfx/buffer_format_util.h" + #include "ui/gfx/gpu_memory_buffer.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 new file mode 100644 index 000000000000..44447c36dc54 --- /dev/null +++ b/www/iridium/files/patch-media_gpu_test_video__frame__validator.cc @@ -0,0 +1,11 @@ +--- media/gpu/test/video_frame_validator.cc.orig 2024-11-04 08:56:03 UTC ++++ media/gpu/test/video_frame_validator.cc +@@ -33,7 +33,7 @@ + #include "testing/gtest/include/gtest/gtest.h" + #include "ui/gfx/gpu_memory_buffer.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_vaapi_vaapi__wrapper.cc b/www/iridium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc index 3bb782533467..96758a588140 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 2024-08-01 05:47:53 UTC +--- media/gpu/vaapi/vaapi_wrapper.cc.orig 2024-11-04 08:56:03 UTC +++ media/gpu/vaapi/vaapi_wrapper.cc -@@ -72,7 +72,7 @@ +@@ -77,7 +77,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_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc b/www/iridium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc index 6bd4bcb5e62b..2436e6e25c2c 100644 --- a/www/iridium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc +++ b/www/iridium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.cc @@ -1,20 +1,20 @@ ---- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc.orig 2023-10-21 11:51:27 UTC +--- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc.orig 2024-11-04 08:56:03 UTC +++ media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc -@@ -837,7 +837,7 @@ const gfx::GpuMemoryBufferId& StructTraits< +@@ -841,7 +841,7 @@ const gfx::GpuMemoryBufferId& StructTraits< return input.id; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // static gfx::NativePixmapHandle StructTraits< media::stable::mojom::NativeGpuMemoryBufferHandleDataView, -@@ -858,7 +858,7 @@ bool StructTraitstype = gfx::NATIVE_PIXMAP; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!data.ReadPlatformHandle(&output->native_pixmap_handle)) return false; return true; diff --git a/www/iridium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h b/www/iridium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h index 992b2e999bee..34f0fa92eac9 100644 --- a/www/iridium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h +++ b/www/iridium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h @@ -1,11 +1,11 @@ ---- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h.orig 2024-06-25 12:08:48 UTC +--- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h.orig 2024-11-04 08:56:03 UTC +++ media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h -@@ -690,7 +690,7 @@ struct StructTraits #include #include -@@ -52,7 +52,7 @@ class FakeGpuMemoryBufferImpl : public gpu::GpuMemoryB +@@ -57,7 +57,7 @@ class FakeGpuMemoryBufferImpl : public gpu::GpuMemoryB } // namespace -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::ScopedFD GetDummyFD() { base::ScopedFD fd(open("/dev/zero", O_RDWR)); DCHECK(fd.is_valid()); -@@ -82,7 +82,7 @@ FakeGpuMemoryBuffer::FakeGpuMemoryBuffer(const gfx::Si +@@ -87,7 +87,7 @@ FakeGpuMemoryBuffer::FakeGpuMemoryBuffer(const gfx::Si static base::AtomicSequenceNumber buffer_id_generator; handle_.id = gfx::GpuMemoryBufferId(buffer_id_generator.GetNext()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) for (size_t i = 0; i < VideoFrame::NumPlanes(video_pixel_format_); i++) { const gfx::Size plane_size_in_bytes = VideoFrame::PlaneSize(video_pixel_format_, i, size_); -@@ -144,7 +144,7 @@ gfx::GpuMemoryBufferHandle FakeGpuMemoryBuffer::CloneH +@@ -149,7 +149,7 @@ gfx::GpuMemoryBufferHandle FakeGpuMemoryBuffer::CloneH gfx::GpuMemoryBufferHandle handle; handle.type = gfx::NATIVE_PIXMAP; handle.id = handle_.id; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) handle.native_pixmap_handle = gfx::CloneHandleForIPC(handle_.native_pixmap_handle); #endif diff --git a/www/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 5ceac867e2a0..e8e076e65ffe 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 2024-08-27 06:28:16 UTC +--- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2024-11-04 08:56:03 UTC +++ media/video/gpu_memory_buffer_video_frame_pool.cc -@@ -106,7 +106,7 @@ class GpuMemoryBufferVideoFramePool::PoolImpl +@@ -98,7 +98,7 @@ class GpuMemoryBufferVideoFramePool::PoolImpl gpu::SHARED_IMAGE_USAGE_RASTER_READ | gpu::SHARED_IMAGE_USAGE_DISPLAY_READ | gpu::SHARED_IMAGE_USAGE_SCANOUT; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // TODO(crbug.com/40194712): Always add the flag once the // OzoneImageBacking is by default turned on. if (base::CommandLine::ForCurrentProcess()->HasSwitch( -@@ -795,7 +795,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa +@@ -695,7 +695,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa } bool is_software_backed_video_frame = !video_frame->HasTextures(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) is_software_backed_video_frame &= !video_frame->HasDmaBufs(); #endif -@@ -1340,7 +1340,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo - media::IOSurfaceIsWebGPUCompatible(handle.io_surface.get()); +@@ -1104,7 +1104,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo + media::IOSurfaceIsWebGPUCompatible(handle.io_surface.get()); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - is_webgpu_compatible = - handle.native_pixmap_handle.supports_zero_copy_webgpu_import; + is_webgpu_compatible = + handle.native_pixmap_handle.supports_zero_copy_webgpu_import; #endif 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 4bc63f6a80ef..582d22fc8ac6 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,20 +1,20 @@ ---- media/video/video_encode_accelerator_adapter.cc.orig 2024-08-27 06:28:16 UTC +--- media/video/video_encode_accelerator_adapter.cc.orig 2024-11-04 08:56:03 UTC +++ media/video/video_encode_accelerator_adapter.cc -@@ -158,7 +158,7 @@ VideoEncodeAccelerator::Config SetUpVeaConfig( +@@ -164,7 +164,7 @@ VideoEncodeAccelerator::Config SetUpVeaConfig( if (is_rgb) config.input_format = PIXEL_FORMAT_I420; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (format != PIXEL_FORMAT_I420 || !VideoFrame::IsStorageTypeMappable(storage_type)) { // ChromeOS/Linux hardware video encoders supports I420 on-memory -@@ -484,7 +484,7 @@ void VideoEncodeAcceleratorAdapter::InitializeInternal +@@ -550,7 +550,7 @@ void VideoEncodeAcceleratorAdapter::InitializeInternal SetUpVeaConfig(profile_, options_, format, first_frame->storage_type(), supported_rc_modes_, required_encoder_type_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Linux/ChromeOS require a special configuration to use dmabuf storage. // We need to keep sending frames the same way the first frame was sent. // Other platforms will happily mix GpuMemoryBuffer storage with regular diff --git a/www/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 4316945c6671..ac3135c15f00 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,11 +1,11 @@ ---- media/video/video_encode_accelerator_adapter_test.cc.orig 2024-08-27 06:28:16 UTC +--- media/video/video_encode_accelerator_adapter_test.cc.orig 2024-11-04 08:56:03 UTC +++ media/video/video_encode_accelerator_adapter_test.cc -@@ -457,7 +457,7 @@ TEST_P(VideoEncodeAcceleratorAdapterTest, TwoFramesRes +@@ -461,7 +461,7 @@ TEST_P(VideoEncodeAcceleratorAdapterTest, TwoFramesRes CreateGreenFrame(large_size, pixel_format, base::Milliseconds(2)); VideoPixelFormat expected_input_format = PIXEL_FORMAT_I420; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (pixel_format != PIXEL_FORMAT_I420 || !small_frame->IsMappable()) expected_input_format = PIXEL_FORMAT_NV12; #endif diff --git a/www/iridium/files/patch-media_webrtc_audio__processor.cc b/www/iridium/files/patch-media_webrtc_audio__processor.cc index fb567e7392b0..c5eb034556de 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 2024-06-25 12:08:48 UTC +--- media/webrtc/audio_processor.cc.orig 2024-11-04 08:56:03 UTC +++ media/webrtc/audio_processor.cc -@@ -513,7 +513,7 @@ std::optional AudioProcessor::ProcessData( +@@ -521,7 +521,7 @@ std::optional AudioProcessor::ProcessData( #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) DCHECK_LE(volume, 1.0); #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_OPENBSD) + 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-mojo_core_BUILD.gn b/www/iridium/files/patch-mojo_core_BUILD.gn index 59ff648b3685..c0e20d240ed5 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 2023-07-24 14:27:53 UTC +--- mojo/core/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ mojo/core/BUILD.gn -@@ -166,7 +166,7 @@ template("core_impl_source_set") { - ] - } +@@ -161,7 +161,7 @@ source_set("impl_for_embedder") { + ] + } -- if ((is_linux || is_chromeos || is_android) && !is_nacl) { -+ if ((is_linux || is_chromeos || is_android) && !is_nacl && !is_bsd) { - sources += [ - "channel_linux.cc", - "channel_linux.h", +- if ((is_linux || is_chromeos || is_android) && !is_nacl) { ++ if ((is_linux || is_chromeos || is_android) && !is_nacl && !is_bsd) { + sources += [ + "channel_linux.cc", + "channel_linux.h", diff --git a/www/iridium/files/patch-mojo_core_channel.cc b/www/iridium/files/patch-mojo_core_channel.cc index c095aecfda12..d062ceb977a1 100644 --- a/www/iridium/files/patch-mojo_core_channel.cc +++ b/www/iridium/files/patch-mojo_core_channel.cc @@ -1,14 +1,14 @@ ---- mojo/core/channel.cc.orig 2024-08-27 06:28:16 UTC +--- mojo/core/channel.cc.orig 2024-11-04 08:56:03 UTC +++ mojo/core/channel.cc -@@ -79,7 +79,11 @@ const size_t kMaxUnusedReadBufferCapacity = 4096; - // Fuchsia: The zx_channel_write() API supports up to 64 handles. - const size_t kMaxAttachedHandles = 64; +@@ -82,7 +82,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 diff --git a/www/iridium/files/patch-mojo_public_c_system_thunks.cc b/www/iridium/files/patch-mojo_public_c_system_thunks.cc deleted file mode 100644 index ba14f3c8f01d..000000000000 --- a/www/iridium/files/patch-mojo_public_c_system_thunks.cc +++ /dev/null @@ -1,38 +0,0 @@ ---- mojo/public/c/system/thunks.cc.orig 2024-08-27 06:28:16 UTC -+++ mojo/public/c/system/thunks.cc -@@ -30,7 +30,7 @@ - #include "mojo/public/c/system/message_pipe.h" - - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - #include "base/environment.h" - #include "base/files/file_path.h" - #include "base/scoped_native_library.h" -@@ -77,7 +77,7 @@ class CoreLibraryInitializer { - - MojoResult LoadLibrary(base::FilePath library_path) { - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - if (library_ && library_->is_valid()) - return MOJO_RESULT_OK; - -@@ -91,7 +91,7 @@ class CoreLibraryInitializer { - - if (library_path.empty()) { - // Default to looking for the library in the current working directory. --#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const base::FilePath::CharType kDefaultLibraryPathValue[] = - FILE_PATH_LITERAL("./libmojo_core.so"); - #elif BUILDFLAG(IS_FUCHSIA) -@@ -147,7 +147,7 @@ class CoreLibraryInitializer { - - private: - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - std::optional library_; - #endif - }; 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 eaf4c6ade11d..16652f86fa9b 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 2024-08-27 06:28:16 UTC +--- mojo/public/tools/bindings/mojom.gni.orig 2024-11-04 08:56:03 UTC +++ mojo/public/tools/bindings/mojom.gni -@@ -763,6 +763,16 @@ template("mojom") { +@@ -776,6 +776,16 @@ template("mojom") { enabled_features += [ "is_apple" ] } + if (is_openbsd) { + enabled_features += [ "is_openbsd" ] + enabled_features += [ "is_bsd" ] + } + + if (is_freebsd) { + enabled_features += [ "is_freebsd" ] + enabled_features += [ "is_bsd" ] + } + action(parser_target_name) { allow_remote = true diff --git a/www/iridium/files/patch-net_BUILD.gn b/www/iridium/files/patch-net_BUILD.gn index 577d668752f7..6abbdf1a37ad 100644 --- a/www/iridium/files/patch-net_BUILD.gn +++ b/www/iridium/files/patch-net_BUILD.gn @@ -1,78 +1,78 @@ ---- net/BUILD.gn.orig 2024-08-27 06:28:16 UTC +--- net/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ net/BUILD.gn -@@ -123,7 +123,7 @@ net_configs = [ +@@ -125,7 +125,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" ] } -@@ -1246,6 +1246,19 @@ component("net") { +@@ -1277,6 +1277,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", -@@ -1407,7 +1420,7 @@ component("net") { +@@ -1438,7 +1451,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", -@@ -2883,7 +2896,7 @@ test("net_unittests") { +@@ -2921,7 +2934,7 @@ target(_test_target_type, "net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "base/address_tracker_linux_unittest.cc", "base/network_interfaces_linux_unittest.cc", -@@ -2974,6 +2987,10 @@ test("net_unittests") { +@@ -3014,6 +3027,10 @@ target(_test_target_type, "net_unittests") { ] } + if (is_bsd) { + deps += [ "//sandbox/policy" ] + } + if (enable_websockets) { - deps += [ "//net/server:tests" ] - } -@@ -3034,7 +3051,7 @@ test("net_unittests") { + sources += [ + "server/http_connection_unittest.cc", +@@ -3080,7 +3097,7 @@ target(_test_target_type, "net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "tools/quic/quic_simple_server_test.cc" ] } -@@ -3173,7 +3190,7 @@ test("net_unittests") { +@@ -3219,7 +3236,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 ef540eb9b836..906c363ac192 100644 --- a/www/iridium/files/patch-net_base_features.cc +++ b/www/iridium/files/patch-net_base_features.cc @@ -1,24 +1,24 @@ ---- net/base/features.cc.orig 2024-08-27 06:28:16 UTC +--- net/base/features.cc.orig 2024-11-04 08:56:03 UTC +++ net/base/features.cc @@ -26,7 +26,7 @@ BASE_FEATURE(kCapReferrerToOriginOnCrossOrigin, BASE_FEATURE(kAsyncDns, "AsyncDns", #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -506,7 +506,12 @@ BASE_FEATURE(kSpdyHeadersToHttpResponseUseBuilder, +@@ -522,7 +522,12 @@ BASE_FEATURE(kSpdyHeadersToHttpResponseUseBuilder, "SpdyHeadersToHttpResponseUseBuilder", base::FEATURE_DISABLED_BY_DEFAULT); +#if BUILDFLAG(IS_OPENBSD) +// No IP_RECVTOS support BASE_FEATURE(kReportEcn, "ReportEcn", base::FEATURE_DISABLED_BY_DEFAULT); +#else +BASE_FEATURE(kReportEcn, "ReportEcn", base::FEATURE_DISABLED_BY_DEFAULT); +#endif BASE_FEATURE(kUseNewAlpsCodepointHttp2, "UseNewAlpsCodepointHttp2", 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 2ceab34bce40..15e64fe322f3 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 2024-08-27 06:28:16 UTC +--- net/base/network_change_notifier.cc.orig 2024-11-04 08:56:03 UTC +++ net/base/network_change_notifier.cc -@@ -42,7 +42,7 @@ +@@ -37,7 +37,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" -@@ -329,6 +329,9 @@ std::unique_ptr NetworkChangeNo +@@ -324,6 +324,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_cert_cert__verify__proc.h b/www/iridium/files/patch-net_cert_cert__verify__proc.h index 5e118353cdae..d40412b809aa 100644 --- a/www/iridium/files/patch-net_cert_cert__verify__proc.h +++ b/www/iridium/files/patch-net_cert_cert__verify__proc.h @@ -1,11 +1,11 @@ ---- net/cert/cert_verify_proc.h.orig 2024-06-25 12:08:48 UTC +--- net/cert/cert_verify_proc.h.orig 2024-11-04 08:56:03 UTC +++ net/cert/cert_verify_proc.h -@@ -176,7 +176,7 @@ class NET_EXPORT CertVerifyProc +@@ -178,7 +178,7 @@ class NET_EXPORT CertVerifyProc kMaxValue = kChainLengthOne }; -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) // Creates and returns a CertVerifyProc that uses the system verifier. // |cert_net_fetcher| may not be used, depending on the implementation. diff --git a/www/iridium/files/patch-net_http_http__network__session.cc b/www/iridium/files/patch-net_http_http__network__session.cc index 23efc33b4324..f0648d090cb5 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 2023-01-17 19:19:00 UTC +--- net/http/http_network_session.cc.orig 2024-11-04 08:56:03 UTC +++ net/http/http_network_session.cc -@@ -19,7 +19,9 @@ +@@ -20,7 +20,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/url_security_manager.h" + #include "net/http/http_stream_pool.h" 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 b438d79498aa..66981f3eb75f 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 2024-08-01 05:47:53 UTC +--- net/socket/tcp_socket_posix.cc.orig 2024-11-04 08:56:03 UTC +++ net/socket/tcp_socket_posix.cc -@@ -97,6 +97,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { +@@ -98,6 +98,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { PLOG(ERROR) << "Failed to set TCP_KEEPALIVE on fd: " << fd; return false; } +#elif BUILDFLAG(IS_FREEBSD) + // Set seconds until first TCP keep alive. + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &delay, sizeof(delay))) { + PLOG(ERROR) << "Failed to set TCP_KEEPIDLE on fd: " << fd; + return false; + } + // Set seconds between TCP keep alives. + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &delay, sizeof(delay))) { + PLOG(ERROR) << "Failed to set TCP_KEEPINTVL on fd: " << fd; + return false; + } #endif } diff --git a/www/iridium/files/patch-net_socket_udp__socket__posix.cc b/www/iridium/files/patch-net_socket_udp__socket__posix.cc index a0be9a1b71b8..f79612aaa227 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 2024-08-01 05:47:53 UTC +--- net/socket/udp_socket_posix.cc.orig 2024-11-04 08:56:03 UTC +++ net/socket/udp_socket_posix.cc -@@ -521,12 +521,17 @@ int UDPSocketPosix::SetRecvTos() { - } +@@ -522,12 +522,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 { -@@ -547,7 +552,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { +@@ -548,7 +553,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. -@@ -885,7 +890,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) +@@ -886,7 +891,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) #if BUILDFLAG(IS_CHROMEOS_ASH) if (last_error == EINVAL) return ERR_ADDRESS_IN_USE; -#elif BUILDFLAG(IS_APPLE) +#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) if (last_error == EADDRNOTAVAIL) return ERR_ADDRESS_IN_USE; #endif diff --git a/www/iridium/files/patch-net_socket_udp__socket__unittest.cc b/www/iridium/files/patch-net_socket_udp__socket__unittest.cc index 6ec79379aba3..afdbc21ccb4f 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 2024-06-25 12:08:48 UTC +--- net/socket/udp_socket_unittest.cc.orig 2024-11-04 08:56:03 UTC +++ net/socket/udp_socket_unittest.cc -@@ -358,7 +358,7 @@ TEST_F(UDPSocketTest, PartialRecv) { +@@ -372,7 +372,7 @@ TEST_F(UDPSocketTest, PartialRecv) { EXPECT_EQ(second_packet, received); } -#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // - MacOS: requires root permissions on OSX 10.7+. // - Android: devices attached to testbots don't have default network, so // broadcasting to 255.255.255.255 returns error -109 (Address not reachable). -@@ -669,7 +669,7 @@ TEST_F(UDPSocketTest, ClientSetDoNotFragment) { +@@ -683,7 +683,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)); - #elif BUILDFLAG(IS_MAC) -@@ -697,7 +697,7 @@ TEST_F(UDPSocketTest, ServerSetDoNotFragment) { + #else +@@ -705,7 +705,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)); - #elif BUILDFLAG(IS_MAC) -@@ -762,7 +762,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup) { + #else +@@ -764,7 +764,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 -@@ -816,7 +816,7 @@ TEST_F(UDPSocketTest, MAYBE_SharedMulticastAddress) { +@@ -818,7 +818,7 @@ TEST_F(UDPSocketTest, MAYBE_SharedMulticastAddress) { NetLogSource()); ASSERT_THAT(client_socket.Connect(send_address), IsOk()); -#if !BUILDFLAG(IS_CHROMEOS_ASH) +#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_BSD) // Send a message via the multicast group. That message is expected be be // received by both receving sockets. // diff --git a/www/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 07f2e0325d78..76d63a3eee13 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,29 +1,29 @@ ---- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2024-08-27 06:28:16 UTC +--- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2024-11-04 08:56:03 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. // -@@ -579,7 +579,7 @@ int main(int argc, char** argv) { +@@ -580,7 +580,7 @@ int main(int argc, char** argv) { std::string impls_str = command_line.GetSwitchValueASCII("impls"); if (impls_str.empty()) { // Default value. -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) impls_str = "platform,"; #endif diff --git a/www/iridium/files/patch-net_url__request_url__request.cc b/www/iridium/files/patch-net_url__request_url__request.cc index 39f0c716fdd2..909aa4d3dcf8 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 2024-08-27 06:28:16 UTC +--- net/url_request/url_request.cc.orig 2024-11-04 08:56:03 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" -@@ -22,6 +23,7 @@ - #include "base/task/single_thread_task_runner.h" +@@ -23,6 +24,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" -@@ -60,7 +62,10 @@ namespace iridium { +@@ -61,7 +63,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__builder.cc b/www/iridium/files/patch-net_url__request_url__request__context__builder.cc index 237d68114894..70faf80eac40 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 2024-08-27 06:28:16 UTC +--- net/url_request/url_request_context_builder.cc.orig 2024-11-04 08:56:03 UTC +++ net/url_request/url_request_context_builder.cc -@@ -441,7 +441,7 @@ std::unique_ptr URLRequestContextBu +@@ -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-pdf_pdfium_pdfium__engine.cc b/www/iridium/files/patch-pdf_pdfium_pdfium__engine.cc index eb4ec6d08e42..1e31f67ef45f 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 2024-08-27 06:28:16 UTC +--- pdf/pdfium/pdfium_engine.cc.orig 2024-11-04 08:56:03 UTC +++ pdf/pdfium/pdfium_engine.cc -@@ -93,7 +93,7 @@ +@@ -94,7 +94,7 @@ #include "gin/public/cppgc.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "pdf/pdfium/pdfium_font_linux.h" #endif -@@ -524,7 +524,7 @@ void InitializeSDK(bool enable_v8, +@@ -523,7 +523,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_print__backend__cups.cc b/www/iridium/files/patch-printing_backend_print__backend__cups.cc index 1203991cde95..a264b2efe46f 100644 --- a/www/iridium/files/patch-printing_backend_print__backend__cups.cc +++ b/www/iridium/files/patch-printing_backend_print__backend__cups.cc @@ -1,20 +1,29 @@ ---- printing/backend/print_backend_cups.cc.orig 2024-08-27 06:28:16 UTC +--- printing/backend/print_backend_cups.cc.orig 2024-11-04 08:56:03 UTC +++ printing/backend/print_backend_cups.cc -@@ -32,7 +32,7 @@ +@@ -33,7 +33,7 @@ #include "printing/mojom/print.mojom.h" #include "url/gurl.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "base/feature_list.h" #include "printing/backend/cups_connection.h" #include "printing/backend/print_backend_cups_ipp.h" -@@ -283,7 +283,7 @@ bool PrintBackendCUPS::IsValidPrinter(const std::strin +@@ -63,7 +63,7 @@ int CaptureCupsDestCallback(void* data, unsigned flags + return 1; // Keep going. + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + // This may be removed when Amazon Linux 2 reaches EOL (30 Jun 2025). + bool AreNewerCupsFunctionsAvailable() { + return cupsFindDestDefault && cupsFindDestSupported && ippValidateAttributes; +@@ -291,7 +291,7 @@ bool PrintBackendCUPS::IsValidPrinter(const std::strin #if !BUILDFLAG(IS_CHROMEOS) scoped_refptr PrintBackend::CreateInstanceImpl( const std::string& locale) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - if (base::FeatureList::IsEnabled(features::kCupsIppPrintingBackend)) { + if (AreNewerCupsFunctionsAvailable() && + base::FeatureList::IsEnabled(features::kCupsIppPrintingBackend)) { return base::MakeRefCounted(CupsConnection::Create()); - } diff --git a/www/iridium/files/patch-printing_print__settings.h b/www/iridium/files/patch-printing_print__settings.h index a92e1925cd19..7749226e0174 100644 --- a/www/iridium/files/patch-printing_print__settings.h +++ b/www/iridium/files/patch-printing_print__settings.h @@ -1,47 +1,47 @@ ---- printing/print_settings.h.orig 2023-10-21 11:51:27 UTC +--- printing/print_settings.h.orig 2024-11-04 08:56:03 UTC +++ printing/print_settings.h @@ -25,7 +25,7 @@ #include "base/values.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include "base/values.h" @@ -51,7 +51,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"; -@@ -101,7 +101,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { +@@ -101,7 +101,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) -@@ -276,7 +276,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { +@@ -276,7 +276,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_; -@@ -429,7 +429,7 @@ class COMPONENT_EXPORT(PRINTING) PrintSettings { +@@ -429,7 +429,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-remoting_codec_webrtc__video__encoder__vpx.cc b/www/iridium/files/patch-remoting_codec_webrtc__video__encoder__vpx.cc index 6511b8aa82c9..fb0419c41167 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 2023-07-24 14:27:53 UTC +--- remoting/codec/webrtc_video_encoder_vpx.cc.orig 2024-11-04 08:56:03 UTC +++ remoting/codec/webrtc_video_encoder_vpx.cc -@@ -88,7 +88,7 @@ void SetVp8CodecParameters(vpx_codec_enc_cfg_t* config +@@ -93,7 +93,7 @@ void SetVp8CodecParameters(vpx_codec_enc_cfg_t* config const webrtc::DesktopSize& size) { SetCommonCodecParameters(config, size); -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_BSD) || BUILDFLAG(IS_LINUX)) && !BUILDFLAG(IS_CHROMEOS_LACROS) // On Linux, using too many threads for VP8 encoding has been linked to high // CPU usage on machines that are under stress. See http://crbug.com/1151148. // 5/3/2022 update: Perf testing has shown that doubling the number of threads diff --git a/www/iridium/files/patch-remoting_host_base_desktop__environment__options.cc b/www/iridium/files/patch-remoting_host_base_desktop__environment__options.cc index cf7e5c550443..e78a7d9d2066 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 2024-06-25 12:08:48 UTC +--- remoting/host/base/desktop_environment_options.cc.orig 2024-11-04 08:56:03 UTC +++ remoting/host/base/desktop_environment_options.cc -@@ -124,7 +124,7 @@ bool DesktopEnvironmentOptions::capture_video_on_dedic +@@ -99,7 +99,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_chromoting__host.cc b/www/iridium/files/patch-remoting_host_chromoting__host.cc index 3a0ec6884e58..60bd52774603 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 2024-06-25 12:08:48 UTC +--- remoting/host/chromoting_host.cc.orig 2024-11-04 08:56:03 UTC +++ remoting/host/chromoting_host.cc -@@ -129,7 +129,7 @@ void ChromotingHost::Start(const std::string& host_own +@@ -132,7 +132,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 a78b6e4c3929..e1af56e9c2e6 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 2023-10-21 11:51:27 UTC +--- remoting/host/chromoting_host.h.orig 2024-11-04 08:56:03 UTC +++ remoting/host/chromoting_host.h -@@ -32,7 +32,7 @@ +@@ -33,7 +33,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 -@@ -97,7 +97,7 @@ class ChromotingHost : public ClientSession::EventHand +@@ -99,7 +99,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 -@@ -206,7 +206,7 @@ class ChromotingHost : public ClientSession::EventHand +@@ -203,7 +203,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_client__session.cc b/www/iridium/files/patch-remoting_host_client__session.cc index e1f03e31b304..d337091c05dd 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 2023-11-22 14:00:11 UTC +--- remoting/host/client_session.cc.orig 2024-11-04 08:56:03 UTC +++ remoting/host/client_session.cc -@@ -157,7 +157,7 @@ void ClientSession::NotifyClientResolution( +@@ -161,7 +161,7 @@ void ClientSession::NotifyClientResolution( if (desktop_environment_options_.enable_curtaining()) { 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_it2me_it2me__host.cc b/www/iridium/files/patch-remoting_host_it2me_it2me__host.cc index a73115e968ec..7c45f875e2e3 100644 --- a/www/iridium/files/patch-remoting_host_it2me_it2me__host.cc +++ b/www/iridium/files/patch-remoting_host_it2me_it2me__host.cc @@ -1,29 +1,29 @@ ---- remoting/host/it2me/it2me_host.cc.orig 2024-08-01 05:47:53 UTC +--- remoting/host/it2me/it2me_host.cc.orig 2024-11-04 08:56:03 UTC +++ remoting/host/it2me/it2me_host.cc -@@ -52,7 +52,7 @@ +@@ -57,7 +57,7 @@ #include "remoting/host/chromeos/features.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/linux/wayland_manager.h" #include "remoting/host/linux/wayland_utils.h" #endif // BUILDFLAG(IS_LINUX) -@@ -180,7 +180,7 @@ void It2MeHost::Connect( +@@ -185,7 +185,7 @@ void It2MeHost::Connect( OnPolicyUpdate(std::move(policies)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { WaylandManager::Get()->Init(host_context_->ui_task_runner()); } -@@ -340,7 +340,7 @@ void It2MeHost::ConnectOnNetworkThread( +@@ -318,7 +318,7 @@ void It2MeHost::ConnectOnNetworkThread( // Set up the desktop environment options. DesktopEnvironmentOptions options(DesktopEnvironmentOptions::CreateDefault()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { options.desktop_capture_options()->set_prefer_cursor_embedded(true); } diff --git a/www/iridium/files/patch-remoting_host_me2me__desktop__environment.cc b/www/iridium/files/patch-remoting_host_me2me__desktop__environment.cc index c8b048f2398c..d7d13f744151 100644 --- a/www/iridium/files/patch-remoting_host_me2me__desktop__environment.cc +++ b/www/iridium/files/patch-remoting_host_me2me__desktop__environment.cc @@ -1,38 +1,38 @@ ---- remoting/host/me2me_desktop_environment.cc.orig 2024-08-01 05:47:53 UTC +--- remoting/host/me2me_desktop_environment.cc.orig 2024-11-04 08:56:03 UTC +++ remoting/host/me2me_desktop_environment.cc -@@ -119,7 +119,7 @@ std::string Me2MeDesktopEnvironment::GetCapabilities() +@@ -108,7 +108,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) if (!IsRunningWayland()) { capabilities += " "; capabilities += protocol::kMultiStreamCapability; -@@ -161,7 +161,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( +@@ -150,7 +150,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 -@@ -170,7 +170,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( +@@ -159,7 +159,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( mutable_desktop_capture_options()->set_detect_updated_region(false); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { mutable_desktop_capture_options()->set_prefer_cursor_embedded(false); } -@@ -195,7 +195,7 @@ bool Me2MeDesktopEnvironment::InitializeSecurity( +@@ -184,7 +184,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_remoting__me2me__host.cc b/www/iridium/files/patch-remoting_host_remoting__me2me__host.cc index a1675109ff4f..bd3121d0ab23 100644 --- a/www/iridium/files/patch-remoting_host_remoting__me2me__host.cc +++ b/www/iridium/files/patch-remoting_host_remoting__me2me__host.cc @@ -1,169 +1,169 @@ ---- remoting/host/remoting_me2me_host.cc.orig 2024-08-27 06:28:16 UTC +--- remoting/host/remoting_me2me_host.cc.orig 2024-11-04 08:56:03 UTC +++ remoting/host/remoting_me2me_host.cc -@@ -129,7 +129,7 @@ +@@ -134,7 +134,7 @@ #include "remoting/host/mac/permission_utils.h" #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(REMOTING_USE_X11) #include #endif // defined(REMOTING_USE_X11) -@@ -140,13 +140,13 @@ +@@ -145,13 +145,13 @@ #endif // defined(REMOTING_USE_X11) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/linux_util.h" #include "remoting/host/audio_capturer_linux.h" #include "remoting/host/linux/certificate_watcher.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/host_utmp_logger.h" #endif -@@ -159,7 +159,7 @@ +@@ -164,7 +164,7 @@ #include "remoting/host/win/session_desktop_environment.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/linux/wayland_manager.h" #include "remoting/host/linux/wayland_utils.h" #endif // BUILDFLAG(IS_LINUX) -@@ -189,7 +189,7 @@ const char kApplicationName[] = "chromoting"; +@@ -193,7 +193,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"; -@@ -397,7 +397,7 @@ class HostProcess : public ConfigWatcher::Delegate, +@@ -412,7 +412,7 @@ class HostProcess : public ConfigWatcher::Delegate, std::unique_ptr context_; -#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) -@@ -466,7 +466,7 @@ class HostProcess : public ConfigWatcher::Delegate, +@@ -478,7 +478,7 @@ class HostProcess : public ConfigWatcher::Delegate, std::unique_ptr host_status_logger_; std::unique_ptr host_event_logger_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr host_utmp_logger_; #endif std::unique_ptr power_save_blocker_; -@@ -773,7 +773,7 @@ void HostProcess::StartOnNetworkThread() { +@@ -785,7 +785,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) } -@@ -808,7 +808,7 @@ void HostProcess::CreateAuthenticatorFactory() { - base::MakeRefCounted( +@@ -856,7 +856,7 @@ void HostProcess::CreateAuthenticatorFactory() { context_->url_loader_factory(), service_account_email_, oauth_refresh_token_)); + -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!cert_watcher_) { cert_watcher_ = std::make_unique( base::BindRepeating(&HostProcess::ShutdownHost, -@@ -953,13 +953,13 @@ void HostProcess::StartOnUiThread() { +@@ -1001,13 +1001,13 @@ void HostProcess::StartOnUiThread() { base::BindRepeating(&HostProcess::OnPolicyUpdate, base::Unretained(this)), base::BindRepeating(&HostProcess::OnPolicyError, base::Unretained(this))); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { WaylandManager::Get()->Init(context_->ui_task_runner()); } #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If an audio pipe is specific on the command-line then initialize // AudioCapturerLinux to capture from it. base::FilePath audio_pipe_name = -@@ -1036,7 +1036,7 @@ void HostProcess::ShutdownOnUiThread() { +@@ -1084,7 +1084,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. -@@ -1044,7 +1044,7 @@ void HostProcess::ShutdownOnUiThread() { +@@ -1092,7 +1092,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(); })); -@@ -1401,7 +1401,7 @@ bool HostProcess::OnUsernamePolicyUpdate(const base::V +@@ -1502,7 +1502,7 @@ bool HostProcess::OnUsernamePolicyUpdate(const base::V // Returns false: never restart the host after this policy update. DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) std::optional host_username_match_required = policies.FindBool(policy::key::kRemoteAccessHostMatchUsername); if (!host_username_match_required.has_value()) { -@@ -1849,7 +1849,7 @@ void HostProcess::StartHost() { +@@ -1778,7 +1778,7 @@ void HostProcess::StartHost() { corp_host_status_logger_->StartObserving(*session_manager); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - desktop_environment_options_.set_enable_remote_webauthn(is_googler_); + desktop_environment_options_.set_enable_remote_webauthn(is_corp_host_); #endif -@@ -1882,7 +1882,7 @@ void HostProcess::StartHost() { +@@ -1798,7 +1798,7 @@ void HostProcess::StartHost() { host_status_logger_ = std::make_unique( host_->status_monitor(), log_to_server_.get()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); if (cmd_line->HasSwitch(kEnableUtempter)) { host_utmp_logger_ = -@@ -1914,7 +1914,7 @@ void HostProcess::StartHost() { - - host_->Start(host_owner_); +@@ -1834,7 +1834,7 @@ void HostProcess::StartHost() { + // addresses. + host_->Start(*host_owner_emails_.begin()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // For Windows, ChromotingHostServices connections are handled by the daemon // process, then the message pipe is forwarded to the network process. host_->StartChromotingHostServices(); -@@ -2048,7 +2048,7 @@ int HostProcessMain() { +@@ -1968,7 +1968,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 ...) -@@ -2097,7 +2097,7 @@ int HostProcessMain() { +@@ -2017,7 +2017,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_setup_start__host__main.cc b/www/iridium/files/patch-remoting_host_setup_start__host__main.cc index 556178da33d9..ba9b2a4a65ce 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,29 +1,29 @@ ---- remoting/host/setup/start_host_main.cc.orig 2024-06-25 12:08:48 UTC +--- remoting/host/setup/start_host_main.cc.orig 2024-11-04 08:56:03 UTC +++ remoting/host/setup/start_host_main.cc -@@ -37,7 +37,7 @@ +@@ -38,7 +38,7 @@ #include #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/setup/daemon_controller_delegate_linux.h" #include "remoting/host/setup/start_host_as_root.h" #endif // BUILDFLAG(IS_LINUX) -@@ -339,7 +339,7 @@ bool InitializeCloudMachineParams(HostStarter::Params& +@@ -369,7 +369,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); -@@ -364,7 +364,7 @@ int StartHostMain(int argc, char** argv) { +@@ -394,7 +394,7 @@ int StartHostMain(int argc, char** argv) { mojo::core::Init(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (command_line->HasSwitch("no-start")) { // On Linux, registering the host with systemd and starting it is the only // reason start_host requires root. The --no-start options skips that final diff --git a/www/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 6323afbbf403..9d4ffe8072c7 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 2023-03-13 07:33:08 UTC +--- remoting/host/webauthn/remote_webauthn_extension_notifier.cc.orig 2024-11-04 08:56:03 UTC +++ remoting/host/webauthn/remote_webauthn_extension_notifier.cc -@@ -24,7 +24,7 @@ +@@ -30,7 +30,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" -@@ -69,14 +69,14 @@ static constexpr char kExtensionWakeupFileContent[] = +@@ -75,14 +75,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-sandbox_policy_BUILD.gn b/www/iridium/files/patch-sandbox_policy_BUILD.gn index 76f9766ab5f1..e3302a8e3bea 100644 --- a/www/iridium/files/patch-sandbox_policy_BUILD.gn +++ b/www/iridium/files/patch-sandbox_policy_BUILD.gn @@ -1,39 +1,39 @@ ---- sandbox/policy/BUILD.gn.orig 2024-08-27 06:28:16 UTC +--- sandbox/policy/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ sandbox/policy/BUILD.gn -@@ -49,7 +49,7 @@ component("policy") { +@@ -50,7 +50,7 @@ component("policy") { "//third_party/jni_zero", ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "linux/bpf_audio_policy_linux.cc", "linux/bpf_audio_policy_linux.h", -@@ -122,6 +122,27 @@ component("policy") { +@@ -125,6 +125,27 @@ component("policy") { "//sandbox/linux:sandbox_services", "//sandbox/linux:seccomp_bpf", "//sandbox/linux:suid_sandbox_client", + ] + } + if (is_openbsd) { + sources += [ + "openbsd/sandbox_openbsd.cc", + "openbsd/sandbox_openbsd.h", + ] + deps += [ + "//sandbox:sandbox_buildflags", + "//ui/gfx/x", + ] + libs = [ "util" ] + } + if (is_freebsd) { + sources += [ + "freebsd/sandbox_freebsd.cc", + "freebsd/sandbox_freebsd.h", + ] + deps += [ + "//sandbox:sandbox_buildflags", + "//ui/gfx/x", ] } if (is_chromeos_ash) { diff --git a/www/iridium/files/patch-sandbox_policy_features.cc b/www/iridium/files/patch-sandbox_policy_features.cc index 4af9e0215e71..99994a8d575e 100644 --- a/www/iridium/files/patch-sandbox_policy_features.cc +++ b/www/iridium/files/patch-sandbox_policy_features.cc @@ -1,23 +1,23 @@ ---- sandbox/policy/features.cc.orig 2024-08-27 06:28:16 UTC +--- sandbox/policy/features.cc.orig 2024-11-04 08:56:03 UTC +++ sandbox/policy/features.cc @@ -20,7 +20,11 @@ namespace sandbox::policy::features { // (Only causes an effect when feature kNetworkServiceInProcess is disabled.) BASE_FEATURE(kNetworkServiceSandbox, "NetworkServiceSandbox", +#if BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT); +#else base::FEATURE_DISABLED_BY_DEFAULT); +#endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) // Enables a fine-grained seccomp-BPF syscall filter for the network service. -@@ -147,7 +151,7 @@ BASE_FEATURE(kForceSpectreVariant2Mitigation, - base::FEATURE_DISABLED_BY_DEFAULT); +@@ -134,7 +138,7 @@ BASE_FEATURE(kSpectreVariant2Mitigation, + base::FEATURE_ENABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Enabling the kNetworkServiceSandbox feature automatically enables Spectre // variant 2 mitigations in the network service. This can lead to performance // regressions, so enabling this feature will turn off the Spectre Variant 2 diff --git a/www/iridium/files/patch-sandbox_policy_features.h b/www/iridium/files/patch-sandbox_policy_features.h index 1848711c2e7b..973ea2eee12e 100644 --- a/www/iridium/files/patch-sandbox_policy_features.h +++ b/www/iridium/files/patch-sandbox_policy_features.h @@ -1,11 +1,11 @@ ---- sandbox/policy/features.h.orig 2024-08-27 06:28:16 UTC +--- sandbox/policy/features.h.orig 2024-11-04 08:56:03 UTC +++ sandbox/policy/features.h -@@ -47,7 +47,7 @@ SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE(kSpectreVar - SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE(kForceSpectreVariant2Mitigation); +@@ -45,7 +45,7 @@ SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE( + SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE(kSpectreVariant2Mitigation); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE( kForceDisableSpectreVariant2MitigationInNetworkService); diff --git a/www/iridium/files/patch-sandbox_policy_mojom_sandbox.mojom b/www/iridium/files/patch-sandbox_policy_mojom_sandbox.mojom index cf537f2276e3..ce32c49d56ee 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 2024-02-04 14:46:08 UTC +--- sandbox/policy/mojom/sandbox.mojom.orig 2024-11-04 08:56:03 UTC +++ sandbox/policy/mojom/sandbox.mojom -@@ -77,6 +77,12 @@ enum Sandbox { +@@ -80,6 +80,12 @@ enum Sandbox { [EnableIf=is_fuchsia] kVideoCapture, + [EnableIf=is_openbsd] + kVideoCapture, + + [EnableIf=is_freebsd] + kVideoCapture, + // Allows access to file contents and Windows APIs for parsing icons from PE // files. [EnableIf=is_win] diff --git a/www/iridium/files/patch-sandbox_policy_sandbox__type.cc b/www/iridium/files/patch-sandbox_policy_sandbox__type.cc index 1a25524eab9c..9fa4f850d975 100644 --- a/www/iridium/files/patch-sandbox_policy_sandbox__type.cc +++ b/www/iridium/files/patch-sandbox_policy_sandbox__type.cc @@ -1,115 +1,120 @@ ---- sandbox/policy/sandbox_type.cc.orig 2024-08-01 05:47:53 UTC +--- sandbox/policy/sandbox_type.cc.orig 2024-11-04 08:56:03 UTC +++ sandbox/policy/sandbox_type.cc @@ -38,7 +38,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { #endif case Sandbox::kAudio: return false; -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) case Sandbox::kVideoCapture: return false; #endif -@@ -63,7 +63,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { +@@ -62,7 +62,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { + #if BUILDFLAG(IS_MAC) case Sandbox::kMirroring: - case Sandbox::kNaClLoader: #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case Sandbox::kHardwareVideoDecoding: #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -74,7 +74,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { +@@ -73,7 +73,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { case Sandbox::kLibassistant: #endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT) #endif // // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) | BUILDFLAG(IS_BSD) case Sandbox::kZygoteIntermediateSandbox: case Sandbox::kHardwareVideoEncoding: #endif @@ -131,7 +131,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi #endif case Sandbox::kPrintCompositor: case Sandbox::kAudio: -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) case Sandbox::kVideoCapture: #endif #if BUILDFLAG(IS_WIN) @@ -142,10 +142,10 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi case Sandbox::kMediaFoundationCdm: case Sandbox::kWindowsSystemProxyResolver: #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case Sandbox::kHardwareVideoDecoding: #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case Sandbox::kHardwareVideoEncoding: #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -174,7 +174,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi - case Sandbox::kNaClLoader: +@@ -171,7 +171,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi + switches::kServiceSandboxType, + StringFromUtilitySandboxType(sandbox_type)); break; - #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case Sandbox::kZygoteIntermediateSandbox: break; #endif -@@ -218,7 +218,7 @@ sandbox::mojom::Sandbox SandboxTypeFromCommandLine( - #endif +@@ -211,7 +211,7 @@ sandbox::mojom::Sandbox SandboxTypeFromCommandLine( + return Sandbox::kUtility; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Intermediate process gains a sandbox later. if (process_type == switches::kZygoteProcessType) return Sandbox::kZygoteIntermediateSandbox; -@@ -266,7 +266,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -259,7 +259,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb return switches::kUtilitySandbox; case Sandbox::kAudio: return switches::kAudioSandbox; -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) case Sandbox::kVideoCapture: return switches::kVideoCaptureSandbox; #endif -@@ -296,11 +296,11 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -291,11 +291,11 @@ std::string StringFromUtilitySandboxType(Sandbox sandb case Sandbox::kMirroring: return switches::kMirroringSandbox; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case Sandbox::kHardwareVideoDecoding: return switches::kHardwareVideoDecodingSandbox; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case Sandbox::kHardwareVideoEncoding: return switches::kHardwareVideoEncodingSandbox; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -322,7 +322,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb - #if BUILDFLAG(IS_MAC) - case Sandbox::kNaClLoader: - #endif // BUILDFLAG(IS_MAC) +@@ -314,7 +314,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb + // The following are not utility processes so should not occur. + case Sandbox::kRenderer: + case Sandbox::kGpu: -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case Sandbox::kZygoteIntermediateSandbox: #endif NOTREACHED_IN_MIGRATION(); -@@ -394,11 +394,11 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( - if (sandbox_string == switches::kScreenAISandbox) - return Sandbox::kScreenAI; - #endif +@@ -389,15 +389,15 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( + if (sandbox_string == switches::kVideoEffectsSandbox) { + return Sandbox::kVideoEffects; + } -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (sandbox_string == switches::kVideoCaptureSandbox) return Sandbox::kVideoCapture; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) if (sandbox_string == switches::kHardwareVideoDecodingSandbox) return Sandbox::kHardwareVideoDecoding; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + if (sandbox_string == switches::kHardwareVideoEncodingSandbox) + return Sandbox::kHardwareVideoEncoding; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-sandbox_policy_switches.cc b/www/iridium/files/patch-sandbox_policy_switches.cc index 00e23f8e43cb..ad0935b4d64f 100644 --- a/www/iridium/files/patch-sandbox_policy_switches.cc +++ b/www/iridium/files/patch-sandbox_policy_switches.cc @@ -1,26 +1,26 @@ ---- sandbox/policy/switches.cc.orig 2024-08-01 05:47:53 UTC +--- sandbox/policy/switches.cc.orig 2024-11-04 08:56:03 UTC +++ sandbox/policy/switches.cc -@@ -54,10 +54,10 @@ const char kWindowsSystemProxyResolverSandbox[] = "pro +@@ -55,10 +55,10 @@ const char kWindowsSystemProxyResolverSandbox[] = "pro const char kMirroringSandbox[] = "mirroring"; #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) const char kHardwareVideoDecodingSandbox[] = "hardware_video_decoding"; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kHardwareVideoEncodingSandbox[] = "hardware_video_encoding"; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -97,7 +97,9 @@ const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-f +@@ -98,7 +98,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 025acb75342e..93f850a9814f 100644 --- a/www/iridium/files/patch-sandbox_policy_switches.h +++ b/www/iridium/files/patch-sandbox_policy_switches.h @@ -1,25 +1,25 @@ ---- sandbox/policy/switches.h.orig 2024-08-01 05:47:53 UTC +--- sandbox/policy/switches.h.orig 2024-11-04 08:56:03 UTC +++ sandbox/policy/switches.h -@@ -57,10 +57,10 @@ SANDBOX_POLICY_EXPORT extern const char kWindowsSystem +@@ -58,10 +58,10 @@ SANDBOX_POLICY_EXPORT extern const char kWindowsSystem SANDBOX_POLICY_EXPORT extern const char kMirroringSandbox[]; #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) SANDBOX_POLICY_EXPORT extern const char kHardwareVideoDecodingSandbox[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SANDBOX_POLICY_EXPORT extern const char kHardwareVideoEncodingSandbox[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -82,7 +82,8 @@ SANDBOX_POLICY_EXPORT extern const char kDisableSetuid +@@ -83,7 +83,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_device_BUILD.gn b/www/iridium/files/patch-services_device_BUILD.gn index aaaa59e8f586..86b4179f8c12 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 2024-06-25 12:08:48 UTC +--- services/device/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ services/device/BUILD.gn -@@ -14,7 +14,7 @@ if (is_android) { +@@ -15,7 +15,7 @@ if (is_android) { } is_serial_enabled_platform = - is_win || ((is_linux || is_chromeos) && use_udev) || is_mac + is_win || ((!is_bsd && is_linux || is_chromeos) && use_udev) || is_mac source_set("lib") { # This should be visible only to embedders of the Device Service, and the diff --git a/www/iridium/files/patch-services_device_public_mojom_BUILD.gn b/www/iridium/files/patch-services_device_public_mojom_BUILD.gn index 9fe92adaf1cb..740bc613469f 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 2024-08-27 06:28:16 UTC +--- services/device/public/mojom/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ services/device/public/mojom/BUILD.gn -@@ -97,7 +97,7 @@ mojom("device_service") { +@@ -98,7 +98,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_network_BUILD.gn b/www/iridium/files/patch-services_network_BUILD.gn index 5f4fc19fe09e..70c7d6eb3268 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 2024-08-27 06:28:16 UTC +--- services/network/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ services/network/BUILD.gn -@@ -411,7 +411,6 @@ if (is_linux || is_chromeos) { +@@ -395,7 +395,6 @@ if (is_linux || is_chromeos) { ] deps = [ "//base:base", - "//sandbox/linux:sandbox_services", "//sandbox/policy:policy", ] configs += [ "//build/config/compiler:wexit_time_destructors" ] diff --git a/www/iridium/files/patch-services_network_network__context.cc b/www/iridium/files/patch-services_network_network__context.cc index a1e2c583393b..44c037956377 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 2024-08-27 06:28:16 UTC +--- services/network/network_context.cc.orig 2024-11-04 08:56:03 UTC +++ services/network/network_context.cc -@@ -589,7 +589,7 @@ NetworkContext::NetworkContextHttpAuthPreferences:: +@@ -588,7 +588,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_) { -@@ -2384,7 +2384,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( +@@ -2435,7 +2435,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 c015db2583c1..a8cf5eb66588 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 2024-08-27 06:28:16 UTC +--- services/network/network_context.h.orig 2024-11-04 08:56:03 UTC +++ services/network/network_context.h -@@ -692,7 +692,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -697,7 +697,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__service.cc b/www/iridium/files/patch-services_network_network__service.cc index 9fea9f36524d..784e86873687 100644 --- a/www/iridium/files/patch-services_network_network__service.cc +++ b/www/iridium/files/patch-services_network_network__service.cc @@ -1,29 +1,29 @@ ---- services/network/network_service.cc.orig 2024-08-27 06:28:16 UTC +--- services/network/network_service.cc.orig 2024-11-04 08:56:03 UTC +++ services/network/network_service.cc @@ -99,7 +99,7 @@ #include "third_party/boringssl/src/include/openssl/cpu.h" #endif -#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || \ +#if ((BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD)) || \ BUILDFLAG(IS_CHROMEOS_LACROS) #include "components/os_crypt/sync/key_storage_config_linux.h" -@@ -975,7 +975,7 @@ void NetworkService::SetExplicitlyAllowedPorts( +@@ -977,7 +977,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) { -@@ -1057,7 +1057,7 @@ NetworkService::CreateHttpAuthHandlerFactory(NetworkCo +@@ -1059,7 +1059,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 4e916540ec6d..963f68c9e2ce 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 2024-06-25 12:08:48 UTC +--- services/network/network_service.h.orig 2024-11-04 08:56:03 UTC +++ services/network/network_service.h @@ -238,7 +238,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; @@ -264,7 +264,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) -@@ -494,7 +494,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService +@@ -498,7 +498,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 dd1a55a95769..55cbf8f05533 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 2024-08-27 06:28:16 UTC +--- services/network/public/cpp/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ services/network/public/cpp/BUILD.gn -@@ -497,7 +497,7 @@ component("cpp_base") { +@@ -481,7 +481,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_on__device__model_on__device__model__service.h b/www/iridium/files/patch-services_on__device__model_on__device__model__service.h index 27d1cb7df05c..5c407ceca46c 100644 --- a/www/iridium/files/patch-services_on__device__model_on__device__model__service.h +++ b/www/iridium/files/patch-services_on__device__model_on__device__model__service.h @@ -1,22 +1,22 @@ ---- services/on_device_model/on_device_model_service.h.orig 2024-06-25 12:08:48 UTC +--- services/on_device_model/on_device_model_service.h.orig 2024-11-04 08:56:03 UTC +++ services/on_device_model/on_device_model_service.h -@@ -22,6 +22,10 @@ - #include "sandbox/policy/linux/sandbox_linux.h" - #endif +@@ -27,6 +27,10 @@ namespace ml { + class OnDeviceModelInternalImpl; + } +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + namespace on_device_model { class COMPONENT_EXPORT(ON_DEVICE_MODEL) OnDeviceModelService -@@ -35,7 +39,7 @@ class COMPONENT_EXPORT(ON_DEVICE_MODEL) OnDeviceModelS +@@ -40,7 +44,7 @@ class COMPONENT_EXPORT(ON_DEVICE_MODEL) OnDeviceModelS // Must be called in the service's process after the run loop finished. [[nodiscard]] static bool Shutdown(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) static void AddSandboxLinuxOptions( sandbox::policy::SandboxLinux::Options& options); #endif diff --git a/www/iridium/files/patch-services_video__capture_video__capture__service__impl.cc b/www/iridium/files/patch-services_video__capture_video__capture__service__impl.cc index 624695abd99e..dba1871c615d 100644 --- a/www/iridium/files/patch-services_video__capture_video__capture__service__impl.cc +++ b/www/iridium/files/patch-services_video__capture_video__capture__service__impl.cc @@ -1,38 +1,38 @@ ---- services/video_capture/video_capture_service_impl.cc.orig 2024-09-14 15:19:53 UTC +--- services/video_capture/video_capture_service_impl.cc.orig 2024-11-04 08:56:03 UTC +++ services/video_capture/video_capture_service_impl.cc @@ -42,7 +42,7 @@ #include "services/video_capture/lacros/device_factory_adapter_lacros.h" #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "media/capture/capture_switches.h" #include "media/capture/video/video_capture_gpu_channel_host.h" #include "services/viz/public/cpp/gpu/context_provider_command_buffer.h" @@ -110,7 +110,7 @@ class VideoCaptureServiceImpl::GpuDependenciesContext this}; }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) // Intended usage of this class is to create viz::Gpu in utility process and // connect to viz::GpuClient of browser process, which will call to Gpu service. // Also, this class holds the viz::ContextProvider to listen and monitor Gpu -@@ -331,7 +331,7 @@ void VideoCaptureServiceImpl::LazyInitializeGpuDepende +@@ -337,7 +337,7 @@ void VideoCaptureServiceImpl::LazyInitializeGpuDepende gpu_dependencies_context_ = std::make_unique(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) { #else if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) { -@@ -463,7 +463,7 @@ void VideoCaptureServiceImpl::OnGpuInfoUpdate(const CH +@@ -469,7 +469,7 @@ void VideoCaptureServiceImpl::OnGpuInfoUpdate(const CH } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) void VideoCaptureServiceImpl::SetVizGpu(std::unique_ptr viz_gpu) { viz_gpu_ = std::move(viz_gpu); } diff --git a/www/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 d35eb4c9759c..cd9ac0a969b8 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,65 +1,65 @@ ---- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig 2023-11-22 14:00:11 UTC +--- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig 2024-11-04 08:56:03 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 -@@ -194,6 +194,7 @@ static double GetNominalCPUFrequency() { +@@ -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) { -@@ -226,6 +227,7 @@ static bool ReadLongFromFile(const char *file, long *v +@@ -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) -@@ -325,9 +327,11 @@ static double GetNominalCPUFrequency() { +@@ -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 -@@ -346,10 +350,12 @@ static double GetNominalCPUFrequency() { +@@ -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 -@@ -459,6 +465,12 @@ pid_t GetTID() { +@@ -463,6 +469,12 @@ pid_t GetTID() { static_assert(sizeof(pid_t) == sizeof(thread), "In NaCL int expected to be the same size as a pointer"); return reinterpret_cast(thread); +} + +#elif defined(__OpenBSD__) + +pid_t GetTID() { + return getthrid(); } - #else + #elif defined(__Fuchsia__) diff --git a/www/iridium/files/patch-third__party_angle_BUILD.gn b/www/iridium/files/patch-third__party_angle_BUILD.gn index bbfff8a59ab4..f203e4305504 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 2024-08-01 05:47:53 UTC +--- third_party/angle/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ third_party/angle/BUILD.gn -@@ -347,7 +347,6 @@ config("extra_warnings") { +@@ -354,7 +354,6 @@ config("extra_warnings") { "-Wtautological-type-limit-compare", "-Wundefined-reinterpret-cast", "-Wunneeded-internal-declaration", - "-Wunused-but-set-variable", "-Wsuggest-destructor-override", "-Wsuggest-override", -@@ -524,7 +523,7 @@ template("angle_common_lib") { +@@ -531,7 +530,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" ] } -@@ -679,6 +678,9 @@ angle_static_library("angle_gpu_info_util") { +@@ -686,6 +685,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_blink_renderer_core_exported_web__view__impl.cc b/www/iridium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc index cfadb08f3fe6..655a2a40239d 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 2024-08-27 06:28:16 UTC +--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2024-11-04 08:56:03 UTC +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -427,7 +427,7 @@ SkFontHinting RendererPreferencesToSkiaHinting( +@@ -428,7 +428,7 @@ SkFontHinting RendererPreferencesToSkiaHinting( const blink::RendererPreferences& prefs) { // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (!prefs.should_antialias_text) { // When anti-aliasing is off, GTK maps all non-zero hinting settings to // 'Normal' hinting so we do the same. Otherwise, folks who have 'Slight' -@@ -3418,7 +3418,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3413,7 +3413,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs renderer_preferences_.use_subpixel_positioning); // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) && \ !BUILDFLAG(IS_ANDROID) if (!renderer_preferences_.system_font_family_name.empty()) { WebFontRenderStyle::SetSystemFontFamily(blink::WebString::FromUTF8( diff --git a/www/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 2ecfe199cdf5..acee19ca86fd 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 2024-08-27 06:28:16 UTC +--- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2024-11-04 08:56:03 UTC +++ third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -6477,7 +6477,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { +@@ -6478,7 +6478,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 \ -@@ -6886,7 +6886,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc +@@ -6887,7 +6887,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_layout_layout__view.cc b/www/iridium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc index 74f9ae641eac..82f118364647 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 2024-08-01 05:47:53 UTC +--- third_party/blink/renderer/core/layout/layout_view.cc.orig 2024-11-04 08:56:03 UTC +++ third_party/blink/renderer/core/layout/layout_view.cc -@@ -72,7 +72,7 @@ +@@ -73,7 +73,7 @@ #include "ui/display/screen_info.h" #include "ui/gfx/geometry/quad_f.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/platform/fonts/font_cache.h" #endif -@@ -775,7 +775,7 @@ void LayoutView::LayoutRoot() { +@@ -776,7 +776,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_scroll_scrollbar__theme__aura.cc b/www/iridium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc index 22a639d3180f..259063194446 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 2024-08-27 06:28:16 UTC +--- third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2024-11-04 08:56:03 UTC +++ third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc -@@ -149,7 +149,7 @@ bool ScrollbarThemeAura::SupportsDragSnapBack() const +@@ -148,7 +148,7 @@ bool ScrollbarThemeAura::SupportsDragSnapBack() const // is true for at least GTK and QT apps). // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) return false; #else return true; -@@ -372,7 +372,7 @@ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scr +@@ -418,7 +418,7 @@ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scr const WebMouseEvent& event) const { // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (event.button == WebPointerProperties::Button::kMiddle) return true; #endif 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 new file mode 100644 index 000000000000..f813b8953ae0 --- /dev/null +++ b/www/iridium/files/patch-third__party_blink_renderer_modules_peerconnection_rtc__data__channel.cc @@ -0,0 +1,10 @@ +--- third_party/blink/renderer/modules/peerconnection/rtc_data_channel.cc.orig 2024-11-04 08:56:03 UTC ++++ third_party/blink/renderer/modules/peerconnection/rtc_data_channel.cc +@@ -557,6 +557,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 07e40c6c520a..ad7ae9456418 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 2024-08-27 06:28:16 UTC +--- third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc.orig 2024-11-04 08:56:03 UTC +++ third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc -@@ -302,7 +302,7 @@ TEST_F(WebRtcAudioRendererTest, DISABLED_VerifySinkPar +@@ -304,7 +304,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 ecc46941cb0a..5047a160d0c2 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 2024-08-27 06:28:16 UTC +--- third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc.orig 2024-11-04 08:56:03 UTC +++ third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc -@@ -468,7 +468,7 @@ class AudioWorkletThreadPriorityTest +@@ -469,7 +469,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_platform_BUILD.gn b/www/iridium/files/patch-third__party_blink_renderer_platform_BUILD.gn index 21a823897014..bdbc52ebc8bf 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_platform_BUILD.gn +++ b/www/iridium/files/patch-third__party_blink_renderer_platform_BUILD.gn @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/platform/BUILD.gn.orig 2024-08-27 06:28:16 UTC +--- third_party/blink/renderer/platform/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ third_party/blink/renderer/platform/BUILD.gn -@@ -2003,7 +2003,7 @@ static_library("test_support") { +@@ -2015,7 +2015,7 @@ static_library("test_support") { ] # fuzzed_data_provider may not work with a custom toolchain. - if (custom_toolchain == "" && is_clang) { + if ((custom_toolchain == "" && is_clang) && !is_bsd) { sources += [ "testing/fuzzed_data_provider.cc", "testing/fuzzed_data_provider.h", diff --git a/www/iridium/files/patch-third__party_blink_renderer_platform_fonts_font__cache.cc b/www/iridium/files/patch-third__party_blink_renderer_platform_fonts_font__cache.cc index 034b9b28676a..0fa45a825904 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_platform_fonts_font__cache.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_platform_fonts_font__cache.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/platform/fonts/font_cache.cc.orig 2024-08-27 06:28:16 UTC +--- third_party/blink/renderer/platform/fonts/font_cache.cc.orig 2024-11-04 08:56:03 UTC +++ third_party/blink/renderer/platform/fonts/font_cache.cc -@@ -79,7 +79,7 @@ extern const char kNotoColorEmojiCompat[] = "Noto Colo +@@ -81,7 +81,7 @@ extern const char kNotoColorEmojiCompat[] = "Noto Colo SkFontMgr* FontCache::static_font_manager_ = nullptr; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) float FontCache::device_scale_factor_ = 1.0; #endif -@@ -130,7 +130,7 @@ const FontPlatformData* FontCache::SystemFontPlatformD +@@ -132,7 +132,7 @@ const FontPlatformData* FontCache::SystemFontPlatformD const FontDescription& font_description) { const AtomicString& family = FontCache::SystemFontFamily(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \ - BUILDFLAG(IS_IOS) + BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) if (family.empty() || family == font_family_names::kSystemUi) return nullptr; #else diff --git a/www/iridium/files/patch-third__party_blink_renderer_platform_fonts_font__cache.h b/www/iridium/files/patch-third__party_blink_renderer_platform_fonts_font__cache.h index 3f7878b2a7a7..6983f523b30a 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_platform_fonts_font__cache.h +++ b/www/iridium/files/patch-third__party_blink_renderer_platform_fonts_font__cache.h @@ -1,47 +1,47 @@ ---- third_party/blink/renderer/platform/fonts/font_cache.h.orig 2024-08-27 06:28:16 UTC +--- third_party/blink/renderer/platform/fonts/font_cache.h.orig 2024-11-04 08:56:03 UTC +++ third_party/blink/renderer/platform/fonts/font_cache.h @@ -55,7 +55,7 @@ #include "third_party/skia/include/core/SkFontMgr.h" #include "third_party/skia/include/core/SkRefCnt.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "ui/gfx/font_fallback_linux.h" #endif -@@ -165,7 +165,7 @@ class PLATFORM_EXPORT FontCache final { +@@ -167,7 +167,7 @@ class PLATFORM_EXPORT FontCache final { static void MaybePreloadSystemFonts(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // These are needed for calling QueryRenderStyleForStrike, since // gfx::GetFontRenderParams makes distinctions based on DSF. static float DeviceScaleFactor() { return device_scale_factor_; } -@@ -241,7 +241,7 @@ class PLATFORM_EXPORT FontCache final { +@@ -243,7 +243,7 @@ class PLATFORM_EXPORT FontCache final { const char* locale_family_name); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) static bool GetFontForCharacter(UChar32, const char* preferred_locale, gfx::FallbackFontData*); -@@ -314,7 +314,7 @@ class PLATFORM_EXPORT FontCache final { +@@ -316,7 +316,7 @@ class PLATFORM_EXPORT FontCache final { const FontFaceCreationParams&, std::string& name); -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) static AtomicString GetFamilyNameForCharacter(SkFontMgr*, UChar32, const FontDescription&, -@@ -351,7 +351,7 @@ class PLATFORM_EXPORT FontCache final { +@@ -353,7 +353,7 @@ class PLATFORM_EXPORT FontCache final { bool is_test_font_mgr_ = false; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) static float device_scale_factor_; #endif diff --git a/www/iridium/files/patch-third__party_blink_renderer_platform_graphics_gpu_image__layer__bridge.cc b/www/iridium/files/patch-third__party_blink_renderer_platform_graphics_gpu_image__layer__bridge.cc new file mode 100644 index 000000000000..ab4df2e0d422 --- /dev/null +++ b/www/iridium/files/patch-third__party_blink_renderer_platform_graphics_gpu_image__layer__bridge.cc @@ -0,0 +1,11 @@ +--- third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.cc.orig 2024-11-04 08:56:03 UTC ++++ third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.cc +@@ -49,7 +49,7 @@ scoped_refptr MakeAccelerated( + const auto paint_image = source->PaintImageForCurrentFrame(); + const auto image_info = paint_image.GetSkImageInfo().makeWH( + source->Size().width(), source->Size().height()); +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // TODO(b/330865436): On Linux, CanvasResourceProvider doesn't always check + // for SCANOUT support correctly on X11 and it's never supported in + // practice. Therefore, don't include it until this flow is reworked. diff --git a/www/iridium/files/patch-third__party_blink_renderer_platform_graphics_video__frame__submitter.cc b/www/iridium/files/patch-third__party_blink_renderer_platform_graphics_video__frame__submitter.cc index 00168a112982..9212602328ab 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_platform_graphics_video__frame__submitter.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_platform_graphics_video__frame__submitter.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/platform/graphics/video_frame_submitter.cc.orig 2024-08-27 06:28:16 UTC +--- third_party/blink/renderer/platform/graphics/video_frame_submitter.cc.orig 2024-11-04 08:56:03 UTC +++ third_party/blink/renderer/platform/graphics/video_frame_submitter.cc -@@ -418,7 +418,7 @@ void VideoFrameSubmitter::OnBeginFrame( - continue; - auto& feedback = - timing_details.find(frame_token)->value.presentation_feedback; +@@ -438,7 +438,7 @@ void VideoFrameSubmitter::OnBeginFrame( + auto& details = timing_details.find(frame_token)->value; + auto& feedback = details.presentation_feedback; + -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO: On Linux failure flag is unreliable, and perfectly rendered frames // are reported as failures all the time. bool presentation_failure = false; diff --git a/www/iridium/files/patch-third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc b/www/iridium/files/patch-third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc index fac4255e9f42..61a83f6de31e 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_platform_peerconnection_rtc__video__encoder__factory.cc @@ -1,17 +1,17 @@ ---- third_party/blink/renderer/platform/peerconnection/rtc_video_encoder_factory.cc.orig 2024-08-01 05:47:53 UTC +--- third_party/blink/renderer/platform/peerconnection/rtc_video_encoder_factory.cc.orig 2024-11-04 08:56:03 UTC +++ third_party/blink/renderer/platform/peerconnection/rtc_video_encoder_factory.cc -@@ -254,12 +254,12 @@ SupportedFormats GetSupportedFormatsInternal( +@@ -260,12 +260,12 @@ SupportedFormats GetSupportedFormatsInternal( supported_formats.scalability_modes.push_back(profile.scalability_modes); supported_formats.sdp_formats.push_back(std::move(*format)); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_WIN) const bool kShouldAddH264Cbp = base::FeatureList::IsEnabled(kMediaFoundationH264CbpEncoding) && profile.profile == media::VideoCodecProfile::H264PROFILE_BASELINE; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool kShouldAddH264Cbp = profile.profile == media::VideoCodecProfile::H264PROFILE_BASELINE; #endif diff --git a/www/iridium/files/patch-third__party_blink_renderer_platform_runtime__enabled__features.json5 b/www/iridium/files/patch-third__party_blink_renderer_platform_runtime__enabled__features.json5 index 5c576f430c14..ce7bd600157e 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_platform_runtime__enabled__features.json5 +++ b/www/iridium/files/patch-third__party_blink_renderer_platform_runtime__enabled__features.json5 @@ -1,65 +1,65 @@ ---- third_party/blink/renderer/platform/runtime_enabled_features.json5.orig 2024-08-27 06:28:16 UTC +--- third_party/blink/renderer/platform/runtime_enabled_features.json5.orig 2024-11-04 08:56:03 UTC +++ third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -344,7 +344,7 @@ +@@ -384,7 +384,7 @@ name: "AppTitle", status: "experimental", origin_trial_feature_name: "AppTitle", - origin_trial_os: ["win", "mac", "linux", "chromeos"], + origin_trial_os: ["win", "mac", "linux", "chromeos", "openbsd", "freebsd"], base_feature: "WebAppEnableAppTitle", }, { -@@ -1703,7 +1703,7 @@ +@@ -1840,7 +1840,7 @@ base_feature: "none", public: true, origin_trial_feature_name: "FedCmMultipleIdentityProviders", - origin_trial_os: ["win", "mac", "linux", "chromeos"], + origin_trial_os: ["win", "mac", "linux", "chromeos", "openbsd", "freebsd"], origin_trial_allows_third_party: true, }, { -@@ -3105,7 +3105,7 @@ +@@ -3208,7 +3208,7 @@ // Tracking bug for the implementation: https://crbug.com/1462930 name: "PermissionElement", origin_trial_feature_name: "PermissionElement", - origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos"], + origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos", "openbsd", "freebsd"], status: "experimental", public: true, base_feature_status: "enabled", -@@ -3232,7 +3232,7 @@ +@@ -3354,7 +3354,7 @@ { name: "PrivateNetworkAccessPermissionPrompt", origin_trial_feature_name: "PrivateNetworkAccessPermissionPrompt", - origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos"], + origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos", "openbsd", "freebsd"], status: "stable", public: true, base_feature: "none", -@@ -4195,7 +4195,7 @@ +@@ -4365,7 +4365,7 @@ name: "UnrestrictedSharedArrayBuffer", base_feature: "none", origin_trial_feature_name: "UnrestrictedSharedArrayBuffer", - origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos"], + origin_trial_os: ["win", "mac", "linux", "fuchsia", "chromeos", "openbsd", "freebsd"], }, // Enables using policy-controlled feature "usb-unrestricted" to allow // isolated context to access protected USB interface classes and to -@@ -4364,7 +4364,7 @@ +@@ -4515,7 +4515,7 @@ { name: "WebAppScopeExtensions", origin_trial_feature_name: "WebAppScopeExtensions", - origin_trial_os: ["win", "mac", "linux", "chromeos"], + origin_trial_os: ["win", "mac", "linux", "chromeos", "openbsd", "freebsd"], status: "experimental", base_feature: "none", }, -@@ -4407,7 +4407,7 @@ +@@ -4558,7 +4558,7 @@ status: "experimental", base_feature: "none", origin_trial_feature_name: "WebAppUrlHandling", - origin_trial_os: ["win", "mac", "linux"], + origin_trial_os: ["win", "mac", "linux", "openbsd", "freebsd"], }, { // WebAssembly JS Promise Integration, diff --git a/www/iridium/files/patch-third__party_blink_renderer_platform_scheduler_common_thread.cc b/www/iridium/files/patch-third__party_blink_renderer_platform_scheduler_common_thread.cc index 726c6f86401d..d1d96237800c 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_platform_scheduler_common_thread.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_platform_scheduler_common_thread.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/platform/scheduler/common/thread.cc.orig 2023-07-24 14:27:53 UTC +--- third_party/blink/renderer/platform/scheduler/common/thread.cc.orig 2024-11-04 08:56:03 UTC +++ third_party/blink/renderer/platform/scheduler/common/thread.cc -@@ -82,7 +82,7 @@ void Thread::CreateAndSetCompositorThread() { - std::make_unique(params); - compositor_thread->Init(); +@@ -88,7 +88,7 @@ void Thread::CreateAndSetCompositorThread() { + "Compositor"); + })); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_OPENBSD) compositor_thread->GetTaskRunner()->PostTaskAndReplyWithResult( FROM_HERE, base::BindOnce(&base::PlatformThread::CurrentId), base::BindOnce([](base::PlatformThreadId compositor_thread_id) { diff --git a/www/iridium/files/patch-third__party_ffmpeg_BUILD.gn b/www/iridium/files/patch-third__party_ffmpeg_BUILD.gn index 0064be5aa4b9..e4d4a17785d2 100644 --- a/www/iridium/files/patch-third__party_ffmpeg_BUILD.gn +++ b/www/iridium/files/patch-third__party_ffmpeg_BUILD.gn @@ -1,10 +1,10 @@ ---- third_party/ffmpeg/BUILD.gn.orig 2024-06-25 12:08:48 UTC +--- third_party/ffmpeg/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ third_party/ffmpeg/BUILD.gn -@@ -343,7 +343,6 @@ target(link_target_type, "ffmpeg_internal") { +@@ -350,7 +350,6 @@ target(link_target_type, "ffmpeg_internal") { libs += [ "m", "z", - "rt", ] } if (is_component_ffmpeg) { diff --git a/www/iridium/files/patch-third__party_leveldatabase_env__chromium.cc b/www/iridium/files/patch-third__party_leveldatabase_env__chromium.cc index d4c1aec7e90c..d51da51c3a0e 100644 --- a/www/iridium/files/patch-third__party_leveldatabase_env__chromium.cc +++ b/www/iridium/files/patch-third__party_leveldatabase_env__chromium.cc @@ -1,12 +1,12 @@ ---- third_party/leveldatabase/env_chromium.cc.orig 2024-06-25 12:08:48 UTC +--- third_party/leveldatabase/env_chromium.cc.orig 2024-11-04 08:56:03 UTC +++ third_party/leveldatabase/env_chromium.cc -@@ -326,7 +326,8 @@ ChromiumWritableFile::ChromiumWritableFile(const std:: +@@ -329,7 +329,8 @@ ChromiumWritableFile::ChromiumWritableFile(const std:: Status ChromiumWritableFile::SyncParent() { TRACE_EVENT0("leveldb", "SyncParent"); -#if defined(OS_POSIX) || defined(OS_FUCHSIA) +// pledge violation (directory passed as fd) +#if (defined(OS_POSIX) || defined(OS_FUCHSIA)) && !defined(OS_OPENBSD) FilePath path = FilePath::FromUTF8Unsafe(parent_dir_); FileErrorOr result = filesystem_->OpenFile( path, base::File::FLAG_OPEN | base::File::FLAG_READ); diff --git a/www/iridium/files/patch-third__party_libc++_src_src_chrono.cpp b/www/iridium/files/patch-third__party_libc++_src_src_chrono.cpp index c833a37ff9c0..1cd51a377cba 100644 --- a/www/iridium/files/patch-third__party_libc++_src_src_chrono.cpp +++ b/www/iridium/files/patch-third__party_libc++_src_src_chrono.cpp @@ -1,11 +1,11 @@ ---- third_party/libc++/src/src/chrono.cpp.orig 2024-08-27 06:28:16 UTC +--- third_party/libc++/src/src/chrono.cpp.orig 2024-11-04 08:56:03 UTC +++ third_party/libc++/src/src/chrono.cpp -@@ -33,7 +33,7 @@ - - // OpenBSD does not have a fully conformant suite of POSIX timers, but +@@ -34,7 +34,7 @@ + // OpenBSD and GPU do not have a fully conformant suite of POSIX timers, but // it does have clock_gettime and CLOCK_MONOTONIC which is all we need. --#if defined(__APPLE__) || defined(__gnu_hurd__) || defined(__OpenBSD__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) -+#if defined(__APPLE__) || defined(__gnu_hurd__) || defined(__OpenBSD__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) || defined(__FreeBSD__) + #if defined(__APPLE__) || defined(__gnu_hurd__) || defined(__OpenBSD__) || defined(__AMDGPU__) || \ +- defined(__NVPTX__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) ++ defined(__NVPTX__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) || defined(__FreeBSD__) # define _LIBCPP_HAS_CLOCK_GETTIME #endif diff --git a/www/iridium/files/patch-third__party_libc++_src_src_filesystem_filesystem__clock.cpp b/www/iridium/files/patch-third__party_libc++_src_src_filesystem_filesystem__clock.cpp index beb5d2e82aca..17d6f10a2c03 100644 --- a/www/iridium/files/patch-third__party_libc++_src_src_filesystem_filesystem__clock.cpp +++ b/www/iridium/files/patch-third__party_libc++_src_src_filesystem_filesystem__clock.cpp @@ -1,11 +1,11 @@ ---- third_party/libc++/src/src/filesystem/filesystem_clock.cpp.orig 2024-06-25 12:08:48 UTC +--- third_party/libc++/src/src/filesystem/filesystem_clock.cpp.orig 2024-11-04 08:56:03 UTC +++ third_party/libc++/src/src/filesystem/filesystem_clock.cpp -@@ -29,7 +29,7 @@ - # include // for gettimeofday and timeval +@@ -30,7 +30,7 @@ #endif --#if defined(__APPLE__) || defined(__gnu_hurd__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) -+#if defined(__APPLE__) || defined(__gnu_hurd__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) || defined(__OpenBSD__) || defined(__FreeBSD__) + #if defined(__APPLE__) || defined(__gnu_hurd__) || defined(__AMDGPU__) || defined(__NVPTX__) || \ +- (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) ++ (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0) || defined(__OpenBSD__) || defined(__FreeBSD__) # define _LIBCPP_HAS_CLOCK_GETTIME #endif diff --git a/www/iridium/files/patch-third__party_perfetto_src_base_utils.cc b/www/iridium/files/patch-third__party_perfetto_src_base_utils.cc index 615c81f015f5..c91d7525c3d7 100644 --- a/www/iridium/files/patch-third__party_perfetto_src_base_utils.cc +++ b/www/iridium/files/patch-third__party_perfetto_src_base_utils.cc @@ -1,26 +1,26 @@ ---- third_party/perfetto/src/base/utils.cc.orig 2024-08-27 06:28:16 UTC +--- third_party/perfetto/src/base/utils.cc.orig 2024-11-04 08:56:03 UTC +++ third_party/perfetto/src/base/utils.cc @@ -38,8 +38,9 @@ #include #endif -#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ - PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) +#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ -+ PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)) && \ ++ PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)) && \ + !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD) - #include #include -@@ -338,8 +339,9 @@ void AlignedFree(void* ptr) { + #ifndef PR_GET_TAGGED_ADDR_CTRL +@@ -337,8 +338,9 @@ void AlignedFree(void* ptr) { } bool IsSyncMemoryTaggingEnabled() { -#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ - PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) +#if (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ -+ PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)) && \ ++ PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)) && \ + !PERFETTO_BUILDFLAG(PERFETTO_OS_BSD) // Compute only once per lifetime of the process. static bool cached_value = [] { const int res = prctl(PR_GET_TAGGED_ADDR_CTRL, 0, 0, 0, 0); diff --git a/www/iridium/files/patch-third__party_speech-dispatcher_libspeechd__version.h b/www/iridium/files/patch-third__party_speech-dispatcher_libspeechd__version.h index 0c713a157c92..ed077a891c59 100644 --- a/www/iridium/files/patch-third__party_speech-dispatcher_libspeechd__version.h +++ b/www/iridium/files/patch-third__party_speech-dispatcher_libspeechd__version.h @@ -1,32 +1,32 @@ ---- third_party/speech-dispatcher/libspeechd_version.h.orig 2024-08-27 06:28:16 UTC +--- third_party/speech-dispatcher/libspeechd_version.h.orig 2024-11-04 08:56:03 UTC +++ third_party/speech-dispatcher/libspeechd_version.h @@ -0,0 +1,29 @@ +/* + * libspeechd_version.h - Shared library for easy access to Speech Dispatcher functions (header) + * + * Copyright (C) 2001, 2002, 2003, 2004 Brailcom, o.p.s. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1, or (at your option) + * any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * -+ * $Id: patch-third_party_speech-dispatcher_libspeechd_version_h,v 1.4 2024/08/27 05:53:03 robert Exp $ ++ * $Id: patch-third_party_speech-dispatcher_libspeechd_version_h,v 1.5 2024/10/28 20:51:39 robert Exp $ + */ + +#ifndef _LIBSPEECHD_VERSION_H +#define _LIBSPEECHD_VERSION_H + +#define LIBSPEECHD_MAJOR_VERSION 0 +#define LIBSPEECHD_MINOR_VERSION 11 +#define LIBSPEECHD_MICRO_VERSION 5 + +#endif /* ifndef _LIBSPEECHD_VERSION_H */ diff --git a/www/iridium/files/patch-third__party_sqlite_src_amalgamation_sqlite3.c b/www/iridium/files/patch-third__party_sqlite_src_amalgamation_sqlite3.c index afb782e209c1..9dff21769c8c 100644 --- a/www/iridium/files/patch-third__party_sqlite_src_amalgamation_sqlite3.c +++ b/www/iridium/files/patch-third__party_sqlite_src_amalgamation_sqlite3.c @@ -1,32 +1,32 @@ ---- third_party/sqlite/src/amalgamation/sqlite3.c.orig 2024-06-25 12:08:48 UTC +--- third_party/sqlite/src/amalgamation/sqlite3.c.orig 2024-11-04 08:56:03 UTC +++ third_party/sqlite/src/amalgamation/sqlite3.c -@@ -14119,7 +14119,7 @@ struct fts5_api { +@@ -14187,7 +14187,7 @@ struct fts5_api { ** But _XOPEN_SOURCE define causes problems for Mac OS X, so omit ** it. */ -#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) +#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && !defined(__FreeBSD__) # define _XOPEN_SOURCE 600 #endif -@@ -44777,7 +44777,12 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB +@@ -45183,7 +45183,12 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB memset(zBuf, 0, nBuf); randomnessPid = osGetpid(0); #if !defined(SQLITE_TEST) && !defined(SQLITE_OMIT_RANDOMNESS) +#if defined(__OpenBSD__) { + arc4random_buf(zBuf, nBuf); + } +#else + { int fd, got; fd = robust_open("/dev/urandom", O_RDONLY, 0); if( fd<0 ){ -@@ -44792,6 +44797,7 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB +@@ -45198,6 +45203,7 @@ static int unixRandomness(sqlite3_vfs *NotUsed, int nB robust_close(0, fd, __LINE__); } } +#endif #endif return nBuf; } diff --git a/www/iridium/files/patch-third__party_vulkan-loader_src_BUILD.gn b/www/iridium/files/patch-third__party_vulkan-loader_src_BUILD.gn index 891c5b12bf34..3085da4b83dc 100644 --- a/www/iridium/files/patch-third__party_vulkan-loader_src_BUILD.gn +++ b/www/iridium/files/patch-third__party_vulkan-loader_src_BUILD.gn @@ -1,11 +1,11 @@ ---- third_party/vulkan-loader/src/BUILD.gn.orig 2024-08-01 05:47:53 UTC +--- third_party/vulkan-loader/src/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ third_party/vulkan-loader/src/BUILD.gn -@@ -59,7 +59,7 @@ config("vulkan_internal_config") { +@@ -57,7 +57,7 @@ config("vulkan_internal_config") { defines += [ "SYSCONFDIR=\"/etc\"", "FALLBACK_CONFIG_DIRS=\"/etc/xdg\"", - "FALLBACK_DATA_DIRS=\"/usr/local/share:/usr/share\"", + "FALLBACK_DATA_DIRS=\"/usr/X11R6/share:/usr/local/share:/usr/share\"", ] } if (is_apple && !vulkan_loader_shared) { diff --git a/www/iridium/files/patch-third__party_webrtc_BUILD.gn b/www/iridium/files/patch-third__party_webrtc_BUILD.gn index 7592f7cfc976..5dbff5187369 100644 --- a/www/iridium/files/patch-third__party_webrtc_BUILD.gn +++ b/www/iridium/files/patch-third__party_webrtc_BUILD.gn @@ -1,12 +1,12 @@ ---- third_party/webrtc/BUILD.gn.orig 2024-08-27 06:28:16 UTC +--- third_party/webrtc/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ third_party/webrtc/BUILD.gn -@@ -215,6 +215,9 @@ config("common_inherited_config") { +@@ -218,6 +218,9 @@ config("common_inherited_config") { if (is_linux || is_chromeos) { defines += [ "WEBRTC_LINUX" ] } + if (is_bsd) { + defines += [ "WEBRTC_BSD" ] + } if (is_mac) { defines += [ "WEBRTC_MAC" ] } diff --git a/www/iridium/files/patch-third__party_webrtc_modules_audio__device_BUILD.gn b/www/iridium/files/patch-third__party_webrtc_modules_audio__device_BUILD.gn index 00339211b5d0..320ae262a526 100644 --- a/www/iridium/files/patch-third__party_webrtc_modules_audio__device_BUILD.gn +++ b/www/iridium/files/patch-third__party_webrtc_modules_audio__device_BUILD.gn @@ -1,11 +1,11 @@ ---- third_party/webrtc/modules/audio_device/BUILD.gn.orig 2024-08-01 05:47:53 UTC +--- third_party/webrtc/modules/audio_device/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ third_party/webrtc/modules/audio_device/BUILD.gn -@@ -333,7 +333,7 @@ rtc_library("audio_device_impl") { +@@ -330,7 +330,7 @@ rtc_library("audio_device_impl") { if (rtc_use_dummy_audio_file_devices) { defines += [ "WEBRTC_DUMMY_FILE_DEVICES" ] } else { - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "linux/alsasymboltable_linux.cc", "linux/alsasymboltable_linux.h", diff --git a/www/iridium/files/patch-third__party_webrtc_modules_video__coding_codecs_av1_libaom__av1__encoder.cc b/www/iridium/files/patch-third__party_webrtc_modules_video__coding_codecs_av1_libaom__av1__encoder.cc new file mode 100644 index 000000000000..f5bb0a43e87d --- /dev/null +++ b/www/iridium/files/patch-third__party_webrtc_modules_video__coding_codecs_av1_libaom__av1__encoder.cc @@ -0,0 +1,23 @@ +--- third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc.orig 2024-11-04 08:56:03 UTC ++++ third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc +@@ -299,7 +299,9 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* cod + SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_PALETTE, 0); + } + ++#ifdef notyet + SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_AUTO_TILES, 1); ++#endif + SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ROW_MT, 1); + SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_OBMC, 0); + SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_NOISE_SENSITIVITY, 0); +@@ -332,8 +334,10 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* cod + SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_MAX_REFERENCE_FRAMES, 3); + + if (adaptive_max_consec_drops_) { ++#ifdef notyet + SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR, + 250); ++#endif + } + + return WEBRTC_VIDEO_CODEC_OK; diff --git a/www/iridium/files/patch-third__party_webrtc_rtc__base_ip__address.cc b/www/iridium/files/patch-third__party_webrtc_rtc__base_ip__address.cc index e128bfaf73cb..787fe3236215 100644 --- a/www/iridium/files/patch-third__party_webrtc_rtc__base_ip__address.cc +++ b/www/iridium/files/patch-third__party_webrtc_rtc__base_ip__address.cc @@ -1,12 +1,12 @@ ---- third_party/webrtc/rtc_base/ip_address.cc.orig 2022-10-05 07:34:01 UTC +--- third_party/webrtc/rtc_base/ip_address.cc.orig 2024-11-04 08:56:03 UTC +++ third_party/webrtc/rtc_base/ip_address.cc -@@ -13,7 +13,8 @@ - #include - - #include "absl/strings/string_view.h" +@@ -14,7 +14,8 @@ + #include + #include + #if defined(WEBRTC_POSIX) -#ifdef OPENBSD +#if defined(WEBRTC_BSD) +#include #include #endif #ifndef __native_client__ diff --git a/www/iridium/files/patch-third__party_webrtc_system__wrappers_BUILD.gn b/www/iridium/files/patch-third__party_webrtc_system__wrappers_BUILD.gn index 39303cbb0895..16fbbb3674a9 100644 --- a/www/iridium/files/patch-third__party_webrtc_system__wrappers_BUILD.gn +++ b/www/iridium/files/patch-third__party_webrtc_system__wrappers_BUILD.gn @@ -1,11 +1,11 @@ ---- third_party/webrtc/system_wrappers/BUILD.gn.orig 2024-06-25 12:08:48 UTC +--- third_party/webrtc/system_wrappers/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ third_party/webrtc/system_wrappers/BUILD.gn -@@ -63,8 +63,6 @@ rtc_library("system_wrappers") { +@@ -62,8 +62,6 @@ rtc_library("system_wrappers") { if (!build_with_chromium) { sources += [ "source/cpu_features_linux.cc" ] } - - libs += [ "rt" ] } if (is_win) { diff --git a/www/iridium/files/patch-tools_gn_src_base_files_file__posix.cc b/www/iridium/files/patch-tools_gn_src_base_files_file__posix.cc index 462a915d650c..0364154ae574 100644 --- a/www/iridium/files/patch-tools_gn_src_base_files_file__posix.cc +++ b/www/iridium/files/patch-tools_gn_src_base_files_file__posix.cc @@ -1,11 +1,11 @@ ---- tools/gn/src/base/files/file_posix.cc.orig 2022-10-05 07:34:01 UTC +--- tools/gn/src/base/files/file_posix.cc.orig 2024-11-04 08:56:03 UTC +++ tools/gn/src/base/files/file_posix.cc -@@ -371,7 +371,7 @@ void File::DoInitialize(const FilePath& path, uint32_t +@@ -359,7 +359,7 @@ void File::DoInitialize(const FilePath& path, uint32_t bool File::Flush() { DCHECK(IsValid()); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) return !HANDLE_EINTR(fdatasync(file_.get())); #else return !HANDLE_EINTR(fsync(file_.get())); diff --git a/www/iridium/files/patch-tools_json__schema__compiler_cpp__bundle__generator.py b/www/iridium/files/patch-tools_json__schema__compiler_cpp__bundle__generator.py index c84ab6507111..4366617a42bc 100644 --- a/www/iridium/files/patch-tools_json__schema__compiler_cpp__bundle__generator.py +++ b/www/iridium/files/patch-tools_json__schema__compiler_cpp__bundle__generator.py @@ -1,11 +1,11 @@ ---- tools/json_schema_compiler/cpp_bundle_generator.py.orig 2023-03-13 07:33:08 UTC +--- tools/json_schema_compiler/cpp_bundle_generator.py.orig 2024-11-04 08:56:03 UTC +++ tools/json_schema_compiler/cpp_bundle_generator.py -@@ -149,7 +149,7 @@ class CppBundleGenerator(object): +@@ -145,7 +145,7 @@ class CppBundleGenerator(object): # BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(IS_CHROMEOS_LACROS). ifdefs.append('BUILDFLAG(IS_CHROMEOS_LACROS)') elif platform == Platforms.LINUX: - ifdefs.append('BUILDFLAG(IS_LINUX)') + ifdefs.append('BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)') elif platform == Platforms.MAC: ifdefs.append('BUILDFLAG(IS_MAC)') elif platform == Platforms.WIN: diff --git a/www/iridium/files/patch-tools_json__schema__compiler_feature__compiler.py b/www/iridium/files/patch-tools_json__schema__compiler_feature__compiler.py index 19ab8c2a868a..f04f766a7fe6 100644 --- a/www/iridium/files/patch-tools_json__schema__compiler_feature__compiler.py +++ b/www/iridium/files/patch-tools_json__schema__compiler_feature__compiler.py @@ -1,11 +1,11 @@ ---- tools/json_schema_compiler/feature_compiler.py.orig 2024-06-25 12:08:48 UTC +--- tools/json_schema_compiler/feature_compiler.py.orig 2024-11-04 08:56:03 UTC +++ tools/json_schema_compiler/feature_compiler.py -@@ -277,6 +277,8 @@ FEATURE_GRAMMAR = ({ +@@ -292,6 +292,8 @@ FEATURE_GRAMMAR = ({ 'linux': 'Feature::LINUX_PLATFORM', 'mac': 'Feature::MACOSX_PLATFORM', 'win': 'Feature::WIN_PLATFORM', + 'openbsd': 'Feature::LINUX_PLATFORM', + 'freebsd': 'Feature::LINUX_PLATFORM', } } }, diff --git a/www/iridium/files/patch-ui_base_ime_dummy__text__input__client.cc b/www/iridium/files/patch-ui_base_ime_dummy__text__input__client.cc index c11459b54b5f..71abd5a7b955 100644 --- a/www/iridium/files/patch-ui_base_ime_dummy__text__input__client.cc +++ b/www/iridium/files/patch-ui_base_ime_dummy__text__input__client.cc @@ -1,11 +1,11 @@ ---- ui/base/ime/dummy_text_input_client.cc.orig 2022-12-01 10:35:46 UTC +--- ui/base/ime/dummy_text_input_client.cc.orig 2024-11-04 08:56:03 UTC +++ ui/base/ime/dummy_text_input_client.cc -@@ -159,7 +159,7 @@ bool DummyTextInputClient::ShouldDoLearning() { +@@ -163,7 +163,7 @@ bool DummyTextInputClient::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 DummyTextInputClient::SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) { diff --git a/www/iridium/files/patch-ui_base_ime_dummy__text__input__client.h b/www/iridium/files/patch-ui_base_ime_dummy__text__input__client.h index deb3b2f260bb..3828695a111f 100644 --- a/www/iridium/files/patch-ui_base_ime_dummy__text__input__client.h +++ b/www/iridium/files/patch-ui_base_ime_dummy__text__input__client.h @@ -1,11 +1,11 @@ ---- ui/base/ime/dummy_text_input_client.h.orig 2022-10-05 07:34:01 UTC +--- ui/base/ime/dummy_text_input_client.h.orig 2024-11-04 08:56:03 UTC +++ ui/base/ime/dummy_text_input_client.h -@@ -65,7 +65,7 @@ class DummyTextInputClient : public TextInputClient { +@@ -67,7 +67,7 @@ class DummyTextInputClient : public TextInputClient { 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_base_ime_fake__text__input__client.cc b/www/iridium/files/patch-ui_base_ime_fake__text__input__client.cc index bd4a8bf13ed3..d840916fc3e4 100644 --- a/www/iridium/files/patch-ui_base_ime_fake__text__input__client.cc +++ b/www/iridium/files/patch-ui_base_ime_fake__text__input__client.cc @@ -1,11 +1,11 @@ ---- ui/base/ime/fake_text_input_client.cc.orig 2024-06-25 12:08:48 UTC +--- ui/base/ime/fake_text_input_client.cc.orig 2024-11-04 08:56:03 UTC +++ ui/base/ime/fake_text_input_client.cc -@@ -210,7 +210,7 @@ bool FakeTextInputClient::ShouldDoLearning() { - return false; +@@ -215,7 +215,7 @@ bool FakeTextInputClient::ShouldDoLearning() { + return should_do_learning_; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool FakeTextInputClient::SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) { diff --git a/www/iridium/files/patch-ui_base_ime_fake__text__input__client.h b/www/iridium/files/patch-ui_base_ime_fake__text__input__client.h index 6dbe266fc036..465e60007c10 100644 --- a/www/iridium/files/patch-ui_base_ime_fake__text__input__client.h +++ b/www/iridium/files/patch-ui_base_ime_fake__text__input__client.h @@ -1,11 +1,11 @@ ---- ui/base/ime/fake_text_input_client.h.orig 2024-06-25 12:08:48 UTC +--- ui/base/ime/fake_text_input_client.h.orig 2024-11-04 08:56:03 UTC +++ ui/base/ime/fake_text_input_client.h -@@ -98,7 +98,7 @@ class FakeTextInputClient : public TextInputClient { +@@ -101,7 +101,7 @@ class FakeTextInputClient : public TextInputClient { void SetTextEditCommandForNextKeyEvent(TextEditCommand command) override; 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_base_ime_text__input__client.h b/www/iridium/files/patch-ui_base_ime_text__input__client.h index 40d3c505d29d..f2b669522d85 100644 --- a/www/iridium/files/patch-ui_base_ime_text__input__client.h +++ b/www/iridium/files/patch-ui_base_ime_text__input__client.h @@ -1,11 +1,11 @@ ---- ui/base/ime/text_input_client.h.orig 2024-06-25 12:08:48 UTC +--- ui/base/ime/text_input_client.h.orig 2024-11-04 08:56:03 UTC +++ ui/base/ime/text_input_client.h -@@ -266,7 +266,7 @@ class COMPONENT_EXPORT(UI_BASE_IME) TextInputClient +@@ -268,7 +268,7 @@ class COMPONENT_EXPORT(UI_BASE_IME) TextInputClient { // fields that are considered 'private' (e.g. in incognito tabs). virtual bool ShouldDoLearning() = 0; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Start composition over a given UTF-16 code range from existing text. This // should only be used for composition scenario when IME wants to start // composition on existing text. Returns whether the operation was successful. diff --git a/www/iridium/files/patch-ui_base_resource_resource__bundle.cc b/www/iridium/files/patch-ui_base_resource_resource__bundle.cc index 13d372b0cde6..78daa4c04e9e 100644 --- a/www/iridium/files/patch-ui_base_resource_resource__bundle.cc +++ b/www/iridium/files/patch-ui_base_resource_resource__bundle.cc @@ -1,11 +1,11 @@ ---- ui/base/resource/resource_bundle.cc.orig 2024-06-25 12:08:48 UTC +--- ui/base/resource/resource_bundle.cc.orig 2024-11-04 08:56:03 UTC +++ ui/base/resource/resource_bundle.cc -@@ -926,7 +926,7 @@ void ResourceBundle::ReloadFonts() { +@@ -914,7 +914,7 @@ void ResourceBundle::ReloadFonts() { } ResourceScaleFactor ResourceBundle::GetMaxResourceScaleFactor() const { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return max_scale_factor_; #else return GetMaxSupportedResourceScaleFactor(); diff --git a/www/iridium/files/patch-ui_base_ui__base__features.cc b/www/iridium/files/patch-ui_base_ui__base__features.cc index 2fddeb457253..c5a1b83e1d77 100644 --- a/www/iridium/files/patch-ui_base_ui__base__features.cc +++ b/www/iridium/files/patch-ui_base_ui__base__features.cc @@ -1,29 +1,29 @@ ---- ui/base/ui_base_features.cc.orig 2024-08-27 06:28:16 UTC +--- ui/base/ui_base_features.cc.orig 2024-11-04 08:56:03 UTC +++ ui/base/ui_base_features.cc -@@ -157,7 +157,7 @@ BASE_FEATURE(kWaylandPerSurfaceScale, +@@ -162,7 +162,7 @@ BASE_FEATURE(kWaylandTextInputV3, base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_OZONE) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If this feature is enabled, users not specify --ozone-platform-hint switch // will get --ozone-platform-hint=auto treatment. https://crbug.com/40250220. COMPONENT_EXPORT(UI_BASE_FEATURES) -@@ -259,7 +259,7 @@ BASE_FEATURE(kExperimentalFlingAnimation, +@@ -264,7 +264,7 @@ BASE_FEATURE(kExperimentalFlingAnimation, "ExperimentalFlingAnimation", // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_ASH) && \ !BUILDFLAG(IS_CHROMEOS_LACROS)) base::FEATURE_ENABLED_BY_DEFAULT -@@ -363,7 +363,7 @@ bool IsForcedColorsEnabled() { +@@ -366,7 +366,7 @@ bool IsForcedColorsEnabled() { BASE_FEATURE(kEyeDropper, "EyeDropper", #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-ui_base_ui__base__features.h b/www/iridium/files/patch-ui_base_ui__base__features.h index 5fee49e7caf1..dcb882d2cef0 100644 --- a/www/iridium/files/patch-ui_base_ui__base__features.h +++ b/www/iridium/files/patch-ui_base_ui__base__features.h @@ -1,11 +1,11 @@ ---- ui/base/ui_base_features.h.orig 2024-08-27 06:28:16 UTC +--- ui/base/ui_base_features.h.orig 2024-11-04 08:56:03 UTC +++ ui/base/ui_base_features.h -@@ -138,7 +138,7 @@ COMPONENT_EXPORT(UI_BASE_FEATURES) - BASE_DECLARE_FEATURE(kWaylandPerSurfaceScale); +@@ -141,7 +141,7 @@ COMPONENT_EXPORT(UI_BASE_FEATURES) + BASE_DECLARE_FEATURE(kWaylandTextInputV3); #endif // BUILDFLAG(IS_OZONE) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(UI_BASE_FEATURES) BASE_DECLARE_FEATURE(kOverrideDefaultOzonePlatformHintToAuto); #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-ui_base_webui_web__ui__util.cc b/www/iridium/files/patch-ui_base_webui_web__ui__util.cc index 5da525ede289..39aa2041373f 100644 --- a/www/iridium/files/patch-ui_base_webui_web__ui__util.cc +++ b/www/iridium/files/patch-ui_base_webui_web__ui__util.cc @@ -1,20 +1,20 @@ ---- ui/base/webui/web_ui_util.cc.orig 2024-06-25 12:08:48 UTC +--- ui/base/webui/web_ui_util.cc.orig 2024-11-04 08:56:03 UTC +++ ui/base/webui/web_ui_util.cc -@@ -39,7 +39,7 @@ namespace { +@@ -44,7 +44,7 @@ namespace { constexpr float kMaxScaleFactor = 1000.0f; std::string GetFontFamilyMd() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return "Roboto, " + GetFontFamily(); #else return GetFontFamily(); -@@ -216,7 +216,7 @@ std::string GetFontFamily() { +@@ -221,7 +221,7 @@ std::string GetFontFamily() { // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) std::string font_name = ui::ResourceBundle::GetSharedInstance() .GetFont(ui::ResourceBundle::BaseFont) .GetFontName(); diff --git a/www/iridium/files/patch-ui_color_color__id.h b/www/iridium/files/patch-ui_color_color__id.h index 3075f2e2a59e..0ff5fedea62c 100644 --- a/www/iridium/files/patch-ui_color_color__id.h +++ b/www/iridium/files/patch-ui_color_color__id.h @@ -1,11 +1,11 @@ ---- ui/color/color_id.h.orig 2024-08-27 06:28:16 UTC +--- ui/color/color_id.h.orig 2024-11-04 08:56:03 UTC +++ ui/color/color_id.h -@@ -621,7 +621,7 @@ +@@ -622,7 +622,7 @@ \ E_CPONLY(kColorCrosSysPositive) \ E_CPONLY(kColorCrosSysComplementVariant) -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define PLATFORM_SPECIFIC_COLOR_IDS \ E_CPONLY(kColorNativeButtonBorder)\ E_CPONLY(kColorNativeHeaderButtonBorderActive) \ diff --git a/www/iridium/files/patch-ui_compositor_compositor.cc b/www/iridium/files/patch-ui_compositor_compositor.cc index a95b69049f61..c3b66b6e6b14 100644 --- a/www/iridium/files/patch-ui_compositor_compositor.cc +++ b/www/iridium/files/patch-ui_compositor_compositor.cc @@ -1,11 +1,11 @@ ---- ui/compositor/compositor.cc.orig 2024-08-27 06:28:16 UTC +--- ui/compositor/compositor.cc.orig 2024-11-04 08:56:03 UTC +++ ui/compositor/compositor.cc -@@ -923,7 +923,7 @@ void Compositor::OnResume() { +@@ -925,7 +925,7 @@ void Compositor::OnResume() { obs.ResetIfActive(); } -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) void Compositor::OnCompleteSwapWithNewSize(const gfx::Size& size) { for (auto& observer : observer_list_) observer.OnCompositingCompleteSwapWithNewSize(this, size); diff --git a/www/iridium/files/patch-ui_compositor_compositor.h b/www/iridium/files/patch-ui_compositor_compositor.h index f5ebe08087d4..38a0c9fcee5b 100644 --- a/www/iridium/files/patch-ui_compositor_compositor.h +++ b/www/iridium/files/patch-ui_compositor_compositor.h @@ -1,11 +1,11 @@ ---- ui/compositor/compositor.h.orig 2024-06-25 12:08:48 UTC +--- ui/compositor/compositor.h.orig 2024-11-04 08:56:03 UTC +++ ui/compositor/compositor.h -@@ -456,7 +456,7 @@ class COMPOSITOR_EXPORT Compositor : public base::Powe +@@ -457,7 +457,7 @@ class COMPOSITOR_EXPORT Compositor : public base::Powe // base::PowerSuspendObserver: void OnResume() override; -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) void OnCompleteSwapWithNewSize(const gfx::Size& size); #endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) diff --git a/www/iridium/files/patch-ui_events_devices_x11_device__data__manager__x11.cc b/www/iridium/files/patch-ui_events_devices_x11_device__data__manager__x11.cc index d3876d28ddd4..2f22656d8d1f 100644 --- a/www/iridium/files/patch-ui_events_devices_x11_device__data__manager__x11.cc +++ b/www/iridium/files/patch-ui_events_devices_x11_device__data__manager__x11.cc @@ -1,10 +1,10 @@ ---- ui/events/devices/x11/device_data_manager_x11.cc.orig 2024-06-25 12:08:48 UTC +--- ui/events/devices/x11/device_data_manager_x11.cc.orig 2024-11-04 08:56:03 UTC +++ ui/events/devices/x11/device_data_manager_x11.cc -@@ -844,6 +844,7 @@ void DeviceDataManagerX11::SetDisabledKeyboardAllowedK +@@ -849,6 +849,7 @@ void DeviceDataManagerX11::SetDisabledKeyboardAllowedK } void DeviceDataManagerX11::DisableDevice(x11::Input::DeviceId deviceid) { + NOTIMPLEMENTED(); blocked_devices_.set(static_cast(deviceid), true); // TODO(rsadam@): Support blocking touchscreen devices. std::vector keyboards = GetKeyboardDevices(); diff --git a/www/iridium/files/patch-ui_events_event.cc b/www/iridium/files/patch-ui_events_event.cc index 897849e829f9..d6276a708d7f 100644 --- a/www/iridium/files/patch-ui_events_event.cc +++ b/www/iridium/files/patch-ui_events_event.cc @@ -1,29 +1,29 @@ ---- ui/events/event.cc.orig 2024-08-27 06:28:16 UTC +--- ui/events/event.cc.orig 2024-11-04 08:56:03 UTC +++ ui/events/event.cc -@@ -365,7 +365,7 @@ std::string LocatedEvent::ToString() const { +@@ -366,7 +366,7 @@ std::string LocatedEvent::ToString() const { MouseEvent::MouseEvent(const PlatformEvent& native_event) : LocatedEvent(native_event), changed_button_flags_(GetChangedMouseButtonFlagsFromNative(native_event)), -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) movement_(GetMouseMovementFromNative(native_event)), #endif pointer_details_(GetMousePointerDetailsFromNative(native_event)) { -@@ -621,7 +621,7 @@ std::unique_ptr MouseWheelEvent::Clone() const +@@ -622,7 +622,7 @@ std::unique_ptr MouseWheelEvent::Clone() const return std::make_unique(*this); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // This value matches Windows, Fuchsia WHEEL_DELTA, and (roughly) Firefox on // Linux. // static -@@ -881,7 +881,7 @@ void KeyEvent::InitializeNative() { +@@ -882,7 +882,7 @@ void KeyEvent::InitializeNative() { if (synthesize_key_repeat_enabled_ && IsRepeated(GetLastKeyEvent())) SetFlags(flags() | EF_IS_REPEAT); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) NormalizeFlags(); #elif BUILDFLAG(IS_WIN) // Only Windows has native character events. diff --git a/www/iridium/files/patch-ui_events_keycodes_dom_keycode__converter.cc b/www/iridium/files/patch-ui_events_keycodes_dom_keycode__converter.cc index 696a9612991e..0e3ebb694fa2 100644 --- a/www/iridium/files/patch-ui_events_keycodes_dom_keycode__converter.cc +++ b/www/iridium/files/patch-ui_events_keycodes_dom_keycode__converter.cc @@ -1,38 +1,38 @@ ---- ui/events/keycodes/dom/keycode_converter.cc.orig 2024-06-25 12:08:48 UTC +--- ui/events/keycodes/dom/keycode_converter.cc.orig 2024-11-04 08:56:03 UTC +++ ui/events/keycodes/dom/keycode_converter.cc -@@ -13,7 +13,7 @@ +@@ -18,7 +18,7 @@ #include "ui/events/keycodes/dom/dom_code.h" #include "ui/events/keycodes/dom/dom_key.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) #include #endif -@@ -26,7 +26,7 @@ namespace { +@@ -31,7 +31,7 @@ namespace { #if BUILDFLAG(IS_WIN) #define DOM_CODE(usb, evdev, xkb, win, mac, code, id) \ { usb, win, code } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #define DOM_CODE(usb, evdev, xkb, win, mac, code, id) \ { usb, xkb, code } #elif BUILDFLAG(IS_APPLE) -@@ -65,7 +65,7 @@ struct DomKeyMapEntry { +@@ -70,7 +70,7 @@ struct DomKeyMapEntry { #undef DOM_KEY_UNI #undef DOM_KEY_MAP_DECLARATION_END -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) // The offset between XKB Keycode and evdev code. constexpr int kXkbKeycodeOffset = 8; -@@ -186,7 +186,7 @@ int KeycodeConverter::DomCodeToNativeKeycode(DomCode c +@@ -191,7 +191,7 @@ int KeycodeConverter::DomCodeToNativeKeycode(DomCode c return UsbKeycodeToNativeKeycode(static_cast(code)); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) // static DomCode KeycodeConverter::XkbKeycodeToDomCode(uint32_t xkb_keycode) { // Currently XKB keycode is the native keycode. diff --git a/www/iridium/files/patch-ui_gfx_font__fallback__linux.cc b/www/iridium/files/patch-ui_gfx_font__fallback__linux.cc index c74a052d2998..2e4028ad4ac1 100644 --- a/www/iridium/files/patch-ui_gfx_font__fallback__linux.cc +++ b/www/iridium/files/patch-ui_gfx_font__fallback__linux.cc @@ -1,11 +1,11 @@ ---- ui/gfx/font_fallback_linux.cc.orig 2024-06-25 12:08:48 UTC +--- ui/gfx/font_fallback_linux.cc.orig 2024-11-04 08:56:03 UTC +++ ui/gfx/font_fallback_linux.cc -@@ -27,6 +27,8 @@ +@@ -32,6 +32,8 @@ #include "ui/gfx/linux/fontconfig_util.h" #include "ui/gfx/platform_font.h" +#include + namespace gfx { namespace { diff --git a/www/iridium/files/patch-ui_gfx_linux_gbm__wrapper.cc b/www/iridium/files/patch-ui_gfx_linux_gbm__wrapper.cc index 726bf8ee4178..e0dc22878d3e 100644 --- a/www/iridium/files/patch-ui_gfx_linux_gbm__wrapper.cc +++ b/www/iridium/files/patch-ui_gfx_linux_gbm__wrapper.cc @@ -1,11 +1,11 @@ ---- ui/gfx/linux/gbm_wrapper.cc.orig 2024-06-25 12:08:48 UTC +--- ui/gfx/linux/gbm_wrapper.cc.orig 2024-11-04 08:56:03 UTC +++ ui/gfx/linux/gbm_wrapper.cc -@@ -314,7 +314,7 @@ class Device final : public ui::GbmDevice { +@@ -319,7 +319,7 @@ class Device final : public ui::GbmDevice { // of 1x1 BOs which are destroyed before creating the final BO creation used // to instantiate the returned GbmBuffer. gfx::Size size_for_verification = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::Size(1, 1); #else requested_size; diff --git a/www/iridium/files/patch-ui_gl_BUILD.gn b/www/iridium/files/patch-ui_gl_BUILD.gn index e35bbf8232e8..0ad324e9d6db 100644 --- a/www/iridium/files/patch-ui_gl_BUILD.gn +++ b/www/iridium/files/patch-ui_gl_BUILD.gn @@ -1,35 +1,26 @@ ---- ui/gl/BUILD.gn.orig 2024-08-27 06:28:16 UTC +--- ui/gl/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ ui/gl/BUILD.gn -@@ -149,8 +149,6 @@ component("gl") { - defines += [ "GPU_ENABLE_SERVICE_LOGGING" ] - } - -- include_dirs = [ "//third_party/mesa_headers" ] -- - public_configs = [ "//third_party/khronos:khronos_headers" ] - - deps = [ -@@ -165,7 +163,6 @@ component("gl") { - ] +@@ -168,7 +168,6 @@ component("gl") { public_deps = [ + ":gl_enums", "//base", - "//third_party/mesa_headers", "//ui/events/platform", "//ui/gfx", "//ui/gfx/geometry", -@@ -313,7 +310,6 @@ component("gl") { +@@ -316,7 +315,6 @@ component("gl") { data_deps += [ "//third_party/angle:libEGL", "//third_party/angle:libGLESv2", - "//third_party/mesa_headers", ] if (enable_swiftshader) { data_deps += [ -@@ -538,7 +534,6 @@ test("gl_unittests") { +@@ -538,7 +536,6 @@ test("gl_unittests") { data_deps = [ "//testing/buildbot/filters:gl_unittests_filters", - "//third_party/mesa_headers", ] if (is_win) { diff --git a/www/iridium/files/patch-ui_gl_gl__context.cc b/www/iridium/files/patch-ui_gl_gl__context.cc index 1112577b760d..ad0c7835fbfe 100644 --- a/www/iridium/files/patch-ui_gl_gl__context.cc +++ b/www/iridium/files/patch-ui_gl_gl__context.cc @@ -1,11 +1,11 @@ ---- ui/gl/gl_context.cc.orig 2024-08-27 06:28:16 UTC +--- ui/gl/gl_context.cc.orig 2024-11-04 08:56:03 UTC +++ ui/gl/gl_context.cc -@@ -509,7 +509,7 @@ bool GLContext::MakeVirtuallyCurrent( +@@ -522,7 +522,7 @@ bool GLContext::MakeVirtuallyCurrent( DCHECK(virtual_context->IsCurrent(surface)); if (switched_real_contexts || virtual_context != current_virtual_context_) { -#if DCHECK_IS_ON() +#if DCHECK_IS_ON() && !BUILDFLAG(IS_BSD) GLenum error = glGetError(); // Accepting a context loss error here enables using debug mode to work on // context loss handling in virtual context mode. diff --git a/www/iridium/files/patch-ui_gl_gl__implementation.cc b/www/iridium/files/patch-ui_gl_gl__implementation.cc index 46852ea74f29..dc19e015e38f 100644 --- a/www/iridium/files/patch-ui_gl_gl__implementation.cc +++ b/www/iridium/files/patch-ui_gl_gl__implementation.cc @@ -1,11 +1,11 @@ ---- ui/gl/gl_implementation.cc.orig 2024-08-27 06:28:16 UTC +--- ui/gl/gl_implementation.cc.orig 2024-11-04 08:56:03 UTC +++ ui/gl/gl_implementation.cc -@@ -254,7 +254,7 @@ GetRequestedGLImplementationFromCommandLine( - *fallback_to_software_gl = false; +@@ -253,7 +253,7 @@ GetRequestedGLImplementationFromCommandLine( + const base::CommandLine* command_line) { bool overrideUseSoftwareGL = command_line->HasSwitch(switches::kOverrideUseSoftwareGLForTests); -#if BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE)) if (std::getenv("RUNNING_UNDER_RR")) { // https://rr-project.org/ is a Linux-only record-and-replay debugger that diff --git a/www/iridium/files/patch-ui_gl_gl__switches.cc b/www/iridium/files/patch-ui_gl_gl__switches.cc index 9077bbabc105..74106b952bb3 100644 --- a/www/iridium/files/patch-ui_gl_gl__switches.cc +++ b/www/iridium/files/patch-ui_gl_gl__switches.cc @@ -1,29 +1,29 @@ ---- ui/gl/gl_switches.cc.orig 2024-06-25 12:08:48 UTC +--- ui/gl/gl_switches.cc.orig 2024-11-04 08:56:03 UTC +++ ui/gl/gl_switches.cc @@ -11,7 +11,7 @@ #include "base/android/build_info.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include "third_party/angle/src/gpu_info_util/SystemInfo.h" // nogncheck #endif -@@ -299,7 +299,7 @@ bool IsDefaultANGLEVulkan() { +@@ -288,7 +288,7 @@ bool IsDefaultANGLEVulkan() { base::android::SDK_VERSION_Q) return false; #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) angle::SystemInfo system_info; if (!angle::GetSystemInfoVulkan(&system_info)) return false; -@@ -311,7 +311,7 @@ bool IsDefaultANGLEVulkan() { +@@ -300,7 +300,7 @@ bool IsDefaultANGLEVulkan() { const auto& active_gpu = system_info.gpus[system_info.activeGPUIndex]; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Vulkan 1.1 is required. if (active_gpu.driverApiVersion < VK_VERSION_1_1) return false; diff --git a/www/iridium/files/patch-ui_gtk_printing_print__dialog__gtk.cc b/www/iridium/files/patch-ui_gtk_printing_print__dialog__gtk.cc index b5a840ad8ca4..a367fde34ff4 100644 --- a/www/iridium/files/patch-ui_gtk_printing_print__dialog__gtk.cc +++ b/www/iridium/files/patch-ui_gtk_printing_print__dialog__gtk.cc @@ -1,11 +1,11 @@ ---- ui/gtk/printing/print_dialog_gtk.cc.orig 2024-08-27 06:28:16 UTC +--- ui/gtk/printing/print_dialog_gtk.cc.orig 2024-11-04 08:56:03 UTC +++ ui/gtk/printing/print_dialog_gtk.cc -@@ -434,7 +434,7 @@ void PrintDialogGtk::ShowDialog( +@@ -439,7 +439,7 @@ void PrintDialogGtk::ShowDialog( GtkPrintCapabilities cap = static_cast( GTK_PRINT_CAPABILITY_GENERATE_PDF | GTK_PRINT_CAPABILITY_PAGE_SET | GTK_PRINT_CAPABILITY_COPIES | GTK_PRINT_CAPABILITY_COLLATE | - GTK_PRINT_CAPABILITY_REVERSE); + GTK_PRINT_CAPABILITY_REVERSE | GTK_PRINT_CAPABILITY_GENERATE_PS); gtk_print_unix_dialog_set_manual_capabilities( GTK_PRINT_UNIX_DIALOG(dialog_.get()), cap); gtk_print_unix_dialog_set_embed_page_setup( diff --git a/www/iridium/files/patch-ui_message__center_views_message__popup__view.cc b/www/iridium/files/patch-ui_message__center_views_message__popup__view.cc index 9581e0757815..c5a4cd177621 100644 --- a/www/iridium/files/patch-ui_message__center_views_message__popup__view.cc +++ b/www/iridium/files/patch-ui_message__center_views_message__popup__view.cc @@ -1,11 +1,11 @@ ---- ui/message_center/views/message_popup_view.cc.orig 2024-08-01 05:47:53 UTC +--- ui/message_center/views/message_popup_view.cc.orig 2024-11-04 08:56:03 UTC +++ ui/message_center/views/message_popup_view.cc -@@ -137,7 +137,7 @@ void MessagePopupView::Show() { +@@ -144,7 +144,7 @@ std::unique_ptr MessagePopupView::Show( params.z_order = ui::ZOrderLevel::kFloatingWindow; // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Make the widget explicitly activatable as TYPE_POPUP is not activatable by // default but we need focus for the inline reply textarea. params.activatable = views::Widget::InitParams::Activatable::kYes; diff --git a/www/iridium/files/patch-ui_native__theme_native__theme.h b/www/iridium/files/patch-ui_native__theme_native__theme.h index 57394314021c..291249c8b6ab 100644 --- a/www/iridium/files/patch-ui_native__theme_native__theme.h +++ b/www/iridium/files/patch-ui_native__theme_native__theme.h @@ -1,11 +1,11 @@ ---- ui/native_theme/native_theme.h.orig 2024-08-27 06:28:16 UTC +--- ui/native_theme/native_theme.h.orig 2024-11-04 08:56:03 UTC +++ ui/native_theme/native_theme.h -@@ -63,7 +63,7 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -64,7 +64,7 @@ class NATIVE_THEME_EXPORT NativeTheme { kCheckbox, // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) kFrameTopArea, #endif kInnerSpinButton, diff --git a/www/iridium/files/patch-ui_native__theme_native__theme__base.cc b/www/iridium/files/patch-ui_native__theme_native__theme__base.cc index bd56a0d7d825..0a25c987534a 100644 --- a/www/iridium/files/patch-ui_native__theme_native__theme__base.cc +++ b/www/iridium/files/patch-ui_native__theme_native__theme__base.cc @@ -1,11 +1,11 @@ ---- ui/native_theme/native_theme_base.cc.orig 2024-06-25 12:08:48 UTC +--- ui/native_theme/native_theme_base.cc.orig 2024-11-04 08:56:03 UTC +++ ui/native_theme/native_theme_base.cc -@@ -236,7 +236,7 @@ void NativeThemeBase::Paint(cc::PaintCanvas* canvas, +@@ -241,7 +241,7 @@ void NativeThemeBase::Paint(cc::PaintCanvas* canvas, break; // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) case kFrameTopArea: PaintFrameTopArea(canvas, state, rect, absl::get(extra), diff --git a/www/iridium/files/patch-ui_ozone_common_features.cc b/www/iridium/files/patch-ui_ozone_common_features.cc index 3968d60d1e4c..631ad8013b93 100644 --- a/www/iridium/files/patch-ui_ozone_common_features.cc +++ b/www/iridium/files/patch-ui_ozone_common_features.cc @@ -1,11 +1,20 @@ ---- ui/ozone/common/features.cc.orig 2023-07-24 14:27:53 UTC +--- ui/ozone/common/features.cc.orig 2024-11-04 08:56:03 UTC +++ ui/ozone/common/features.cc @@ -30,7 +30,7 @@ BASE_FEATURE(kWaylandSurfaceSubmissionInPixelCoordinat // enabled. BASE_FEATURE(kWaylandFractionalScaleV1, "WaylandFractionalScaleV1", -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT +@@ -42,7 +42,7 @@ BASE_FEATURE(kWaylandFractionalScaleV1, + // protocol is supported. + BASE_FEATURE(kWaylandXdgToplevelDrag, + "WaylandXdgToplevelDrag", +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + #else + base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-ui_ozone_platform_wayland_common_wayland__util.cc b/www/iridium/files/patch-ui_ozone_platform_wayland_common_wayland__util.cc index b05bf078921f..24c6a9871aaf 100644 --- a/www/iridium/files/patch-ui_ozone_platform_wayland_common_wayland__util.cc +++ b/www/iridium/files/patch-ui_ozone_platform_wayland_common_wayland__util.cc @@ -1,11 +1,20 @@ ---- ui/ozone/platform/wayland/common/wayland_util.cc.orig 2024-06-25 12:08:48 UTC +--- ui/ozone/platform/wayland/common/wayland_util.cc.orig 2024-11-04 08:56:03 UTC +++ ui/ozone/platform/wayland/common/wayland_util.cc -@@ -336,7 +336,7 @@ void TransformToWlArray( +@@ -347,7 +347,7 @@ void TransformToWlArray( } base::TimeTicks EventMillisecondsToTimeTicks(uint32_t milliseconds) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/40287874): `milliseconds` comes from Weston that // uses timestamp from libinput, which is different from TimeTicks. // Use EventTimeForNow(), for now. +@@ -389,7 +389,7 @@ bool MaybeHandlePlatformEventForDrag(const ui::Platfor + } + + void RecordConnectionMetrics(wl_display* display) { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + CHECK(display); + + // These values are logged to metrics so must not be changed. diff --git a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__connection.cc b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__connection.cc index 37540d119ad8..e7a50d7e2ec8 100644 --- a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__connection.cc +++ b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__connection.cc @@ -1,11 +1,11 @@ ---- ui/ozone/platform/wayland/host/wayland_connection.cc.orig 2024-06-25 12:08:48 UTC +--- ui/ozone/platform/wayland/host/wayland_connection.cc.orig 2024-11-04 08:56:03 UTC +++ ui/ozone/platform/wayland/host/wayland_connection.cc -@@ -532,7 +532,7 @@ bool WaylandConnection::ShouldUseOverlayDelegation() c +@@ -541,7 +541,7 @@ bool WaylandConnection::ShouldUseOverlayDelegation() c // isn't present on any non-exo Wayland compositors. bool should_use_overlay_delegation = IsWaylandOverlayDelegationEnabled() && !fractional_scale_manager_v1(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Overlay delegation also requires a single-pixel-buffer protocol, which // allows creation of non-backed solid color buffers. Even though only video // overlays can be supported on Linux, these color buffers are still needed diff --git a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__input__method__context.cc b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__input__method__context.cc index 658574002957..3542c2bcdcc0 100644 --- a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__input__method__context.cc +++ b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__input__method__context.cc @@ -1,11 +1,11 @@ ---- ui/ozone/platform/wayland/host/wayland_input_method_context.cc.orig 2024-06-25 12:08:48 UTC +--- ui/ozone/platform/wayland/host/wayland_input_method_context.cc.orig 2024-11-04 08:56:03 UTC +++ ui/ozone/platform/wayland/host/wayland_input_method_context.cc -@@ -55,7 +55,7 @@ namespace { +@@ -60,7 +60,7 @@ namespace { // Only enable the preedit string for sequence mode (i.e. when using dead keys // or the Compose key) on Linux ozone/wayland (see b/220370007). constexpr CharacterComposer::PreeditStringMode kPreeditStringMode = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) CharacterComposer::PreeditStringMode::kAlwaysEnabled; #else CharacterComposer::PreeditStringMode::kHexModeOnly; diff --git a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__screen.cc b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__screen.cc new file mode 100644 index 000000000000..211d63a97f43 --- /dev/null +++ b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__screen.cc @@ -0,0 +1,29 @@ +--- ui/ozone/platform/wayland/host/wayland_screen.cc.orig 2024-11-04 08:56:03 UTC ++++ ui/ozone/platform/wayland/host/wayland_screen.cc +@@ -46,7 +46,7 @@ + #include "ui/ozone/platform/wayland/host/org_gnome_mutter_idle_monitor.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/linux/linux_ui.h" + #endif + +@@ -133,7 +133,7 @@ WaylandScreen::WaylandScreen(WaylandConnection* connec + tablet_state_ = connection_->GetTabletState(); + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (auto* linux_ui = ui::LinuxUi::instance()) { + OnDeviceScaleFactorChanged(); + display_scale_factor_observer_.Observe(linux_ui); +@@ -606,7 +606,7 @@ bool WaylandScreen::VerifyOutputStateConsistentForTest + return true; + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void WaylandScreen::OnDeviceScaleFactorChanged() { + if (const auto* linux_ui = ui::LinuxUi::instance()) { + const float new_font_scale = linux_ui->display_config().font_scale; diff --git a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__screen.h b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__screen.h new file mode 100644 index 000000000000..714a8e8aa47b --- /dev/null +++ b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__screen.h @@ -0,0 +1,38 @@ +--- ui/ozone/platform/wayland/host/wayland_screen.h.orig 2024-11-04 08:56:03 UTC ++++ ui/ozone/platform/wayland/host/wayland_screen.h +@@ -24,7 +24,7 @@ + #include "ui/ozone/platform/wayland/host/wayland_output.h" + #include "ui/ozone/public/platform_screen.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "base/scoped_observation.h" + #include "ui/linux/device_scale_factor_observer.h" + #include "ui/linux/linux_ui.h" +@@ -44,7 +44,7 @@ class OrgGnomeMutterIdleMonitor; + + // A PlatformScreen implementation for Wayland. + class WaylandScreen : public PlatformScreen +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + , + public DeviceScaleFactorObserver + #endif +@@ -96,7 +96,7 @@ class WaylandScreen : public PlatformScreen + display::TabletState GetTabletState() const override; + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // DeviceScaleFactorObserver: + void OnDeviceScaleFactorChanged() override; + #endif +@@ -158,7 +158,7 @@ class WaylandScreen : public PlatformScreen + display::TabletState tablet_state_; + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + float font_scale_ = 1.0f; + + base::ScopedObservation diff --git a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__toplevel__window.cc b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__toplevel__window.cc index b37276afb4c8..8ece4976283b 100644 --- a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__toplevel__window.cc +++ b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__toplevel__window.cc @@ -1,11 +1,11 @@ ---- ui/ozone/platform/wayland/host/wayland_toplevel_window.cc.orig 2024-08-27 06:28:16 UTC +--- ui/ozone/platform/wayland/host/wayland_toplevel_window.cc.orig 2024-11-04 08:56:03 UTC +++ ui/ozone/platform/wayland/host/wayland_toplevel_window.cc -@@ -620,7 +620,7 @@ void WaylandToplevelWindow::HandleAuraToplevelConfigur +@@ -634,7 +634,7 @@ void WaylandToplevelWindow::HandleAuraToplevelConfigur const bool did_active_change = is_active_ != window_states.is_activated; is_active_ = window_states.is_activated; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The tiled state affects the window geometry, so apply it here. if (window_states.tiled_edges != tiled_state_) { // This configure changes the decoration insets. We should adjust the diff --git a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__toplevel__window.h b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__toplevel__window.h index 80553a7d1a2d..43fd5c2c61a0 100644 --- a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__toplevel__window.h +++ b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__toplevel__window.h @@ -1,11 +1,11 @@ ---- ui/ozone/platform/wayland/host/wayland_toplevel_window.h.orig 2024-08-27 06:28:16 UTC +--- ui/ozone/platform/wayland/host/wayland_toplevel_window.h.orig 2024-11-04 08:56:03 UTC +++ ui/ozone/platform/wayland/host/wayland_toplevel_window.h -@@ -259,7 +259,7 @@ class WaylandToplevelWindow : public WaylandWindow, +@@ -261,7 +261,7 @@ class WaylandToplevelWindow : public WaylandWindow, // The display ID to switch to in case the state is `kFullscreen`. int64_t fullscreen_display_id_ = display::kInvalidDisplayId; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Contains the current state of the tiled edges. WindowTiledEdges tiled_state_; #endif diff --git a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__window.cc b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__window.cc index 1571df74f5e6..6a79e774d424 100644 --- a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__window.cc +++ b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__window.cc @@ -1,44 +1,44 @@ ---- ui/ozone/platform/wayland/host/wayland_window.cc.orig 2024-08-27 06:28:16 UTC +--- ui/ozone/platform/wayland/host/wayland_window.cc.orig 2024-11-04 08:56:03 UTC +++ ui/ozone/platform/wayland/host/wayland_window.cc -@@ -317,7 +317,7 @@ void WaylandWindow::OnPointerFocusChanged(bool focused +@@ -318,7 +318,7 @@ void WaylandWindow::OnPointerFocusChanged(bool focused // Whenever the window gets the pointer focus back, the cursor shape must be // updated. Otherwise, it is invalidated upon wl_pointer::leave and is not // restored by the Wayland compositor. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (focused && async_cursor_) { async_cursor_->AddCursorLoadedCallback(base::BindOnce( &WaylandWindow::OnCursorLoaded, AsWeakPtr(), async_cursor_)); -@@ -575,7 +575,7 @@ bool WaylandWindow::ShouldUseNativeFrame() const { +@@ -584,7 +584,7 @@ bool WaylandWindow::ShouldUseNativeFrame() const { void WaylandWindow::SetCursor(scoped_refptr platform_cursor) { DCHECK(platform_cursor); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto async_cursor = WaylandAsyncCursor::FromPlatformCursor(platform_cursor); if (async_cursor_ == async_cursor) { -@@ -786,7 +786,7 @@ std::string WaylandWindow::WindowStates::ToString() co +@@ -795,7 +795,7 @@ std::string WaylandWindow::WindowStates::ToString() co } else { base::TrimString(states, " ", &states); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) states += "; tiled_edges: "; std::string tiled = ""; if (tiled_edges.left) { -@@ -1274,12 +1274,12 @@ void WaylandWindow::UpdateCursorShape(scoped_refptrbitmaps(), hotspot_in_dips, std::ceil(cursor->cursor_image_scale_factor())); } -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) cursor_ = cursor; #endif } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void WaylandWindow::OnCursorLoaded(scoped_refptr cursor, scoped_refptr bitmap_cursor) { if (HasPointerFocus() && async_cursor_ == cursor && bitmap_cursor) { diff --git a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__window.h b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__window.h index 2fe948aabd17..d03695104dc7 100644 --- a/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__window.h +++ b/www/iridium/files/patch-ui_ozone_platform_wayland_host_wayland__window.h @@ -1,38 +1,38 @@ ---- ui/ozone/platform/wayland/host/wayland_window.h.orig 2024-08-27 06:28:16 UTC +--- ui/ozone/platform/wayland/host/wayland_window.h.orig 2024-11-04 08:56:03 UTC +++ ui/ozone/platform/wayland/host/wayland_window.h @@ -41,7 +41,7 @@ #include "ui/platform_window/platform_window_init_properties.h" #include "ui/platform_window/wm/wm_drag_handler.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/ozone/platform/wayland/host/wayland_async_cursor.h" #endif -@@ -283,7 +283,7 @@ class WaylandWindow : public PlatformWindow, +@@ -285,7 +285,7 @@ class WaylandWindow : public PlatformWindow, bool is_snapped_secondary = false; bool is_floated = false; bool is_pip = false; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) WindowTiledEdges tiled_edges; #endif -@@ -561,7 +561,7 @@ class WaylandWindow : public PlatformWindow, +@@ -569,7 +569,7 @@ class WaylandWindow : public PlatformWindow, void UpdateCursorShape(scoped_refptr cursor); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void OnCursorLoaded(scoped_refptr cursor, scoped_refptr bitmap_cursor); #endif -@@ -630,7 +630,7 @@ class WaylandWindow : public PlatformWindow, +@@ -638,7 +638,7 @@ class WaylandWindow : public PlatformWindow, wl::Object aura_surface_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The current asynchronously loaded cursor (Linux specific). scoped_refptr async_cursor_; #else diff --git a/www/iridium/files/patch-ui_ozone_platform_wayland_host_xdg__toplevel__wrapper__impl.cc b/www/iridium/files/patch-ui_ozone_platform_wayland_host_xdg__toplevel__wrapper__impl.cc index 5f247fe382b0..a002be4124ff 100644 --- a/www/iridium/files/patch-ui_ozone_platform_wayland_host_xdg__toplevel__wrapper__impl.cc +++ b/www/iridium/files/patch-ui_ozone_platform_wayland_host_xdg__toplevel__wrapper__impl.cc @@ -1,11 +1,11 @@ ---- ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc.orig 2024-06-25 12:08:48 UTC +--- ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc.orig 2024-11-04 08:56:03 UTC +++ ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc -@@ -316,7 +316,7 @@ void XDGToplevelWrapperImpl::OnToplevelConfigure(void* +@@ -322,7 +322,7 @@ void XDGToplevelWrapperImpl::OnToplevelConfigure(void* window_states.is_activated = CheckIfWlArrayHasValue(states, XDG_TOPLEVEL_STATE_ACTIVATED); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (xdg_toplevel_get_version(toplevel) >= XDG_TOPLEVEL_STATE_TILED_LEFT_SINCE_VERSION) { // All four tiled states have the same since version, so it is enough to diff --git a/www/iridium/files/patch-ui_ozone_platform_wayland_ozone__platform__wayland.cc b/www/iridium/files/patch-ui_ozone_platform_wayland_ozone__platform__wayland.cc index 6e69d6682759..5d7a42655e92 100644 --- a/www/iridium/files/patch-ui_ozone_platform_wayland_ozone__platform__wayland.cc +++ b/www/iridium/files/patch-ui_ozone_platform_wayland_ozone__platform__wayland.cc @@ -1,54 +1,54 @@ ---- ui/ozone/platform/wayland/ozone_platform_wayland.cc.orig 2024-08-27 06:28:16 UTC +--- ui/ozone/platform/wayland/ozone_platform_wayland.cc.orig 2024-11-04 08:56:03 UTC +++ ui/ozone/platform/wayland/ozone_platform_wayland.cc @@ -66,13 +66,13 @@ #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/ozone/platform/wayland/host/wayland_cursor_factory.h" #else #include "ui/ozone/common/bitmap_cursor_factory.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/ozone/platform/wayland/host/linux_ui_delegate_wayland.h" #endif @@ -267,7 +267,7 @@ class OzonePlatformWayland : public OzonePlatform, buffer_manager_connector_ = std::make_unique( connection_->buffer_manager_host()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) cursor_factory_ = std::make_unique(connection_.get()); #else cursor_factory_ = std::make_unique(); @@ -277,7 +277,7 @@ class OzonePlatformWayland : public OzonePlatform, supported_buffer_formats_ = connection_->buffer_manager_host()->GetSupportedBufferFormats(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) linux_ui_delegate_ = std::make_unique(connection_.get()); #endif @@ -343,7 +343,7 @@ class OzonePlatformWayland : public OzonePlatform, properties->supports_global_screen_coordinates = kDefaultScreenCoordinateEnabled; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/40800718): Revisit (and maybe remove) once proper // support, probably backed by org.freedesktop.portal.Screenshot.PickColor // API is implemented. Note: this is restricted to Linux Desktop as Lacros -@@ -538,7 +538,7 @@ class OzonePlatformWayland : public OzonePlatform, +@@ -545,7 +545,7 @@ class OzonePlatformWayland : public OzonePlatform, DrmRenderNodePathFinder path_finder_; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr linux_ui_delegate_; #endif }; diff --git a/www/iridium/files/patch-ui_ozone_platform_x11_x11__window.cc b/www/iridium/files/patch-ui_ozone_platform_x11_x11__window.cc index 013390a14f85..c8a4eb5e457f 100644 --- a/www/iridium/files/patch-ui_ozone_platform_x11_x11__window.cc +++ b/www/iridium/files/patch-ui_ozone_platform_x11_x11__window.cc @@ -1,11 +1,11 @@ ---- ui/ozone/platform/x11/x11_window.cc.orig 2024-08-27 06:28:16 UTC +--- ui/ozone/platform/x11/x11_window.cc.orig 2024-11-04 08:56:03 UTC +++ ui/ozone/platform/x11/x11_window.cc -@@ -1499,7 +1499,7 @@ void X11Window::OnXWindowStateChanged() { +@@ -1504,7 +1504,7 @@ void X11Window::OnXWindowStateChanged() { WindowTiledEdges tiled_state = GetTiledState(); if (tiled_state != tiled_state_) { tiled_state_ = tiled_state; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) platform_window_delegate_->OnWindowTiledStateChanged(tiled_state); UpdateDecorationInsets(); #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 cb36ed1d7e85..4f4b324aadb7 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 2022-10-05 07:34:01 UTC +--- ui/views/controls/prefix_selector.cc.orig 2024-11-04 08:56:03 UTC +++ ui/views/controls/prefix_selector.cc -@@ -174,7 +174,7 @@ bool PrefixSelector::ShouldDoLearning() { +@@ -178,7 +178,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 2d3e4076d8dd..3921293eeec6 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 2022-10-05 07:34:01 UTC +--- ui/views/controls/prefix_selector.h.orig 2024-11-04 08:56:03 UTC +++ ui/views/controls/prefix_selector.h -@@ -83,7 +83,7 @@ class VIEWS_EXPORT PrefixSelector : public ui::TextInp +@@ -85,7 +85,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 26bb586a83b1..28c3ebd35143 100644 --- a/www/iridium/files/patch-ui_views_controls_textfield_textfield.cc +++ b/www/iridium/files/patch-ui_views_controls_textfield_textfield.cc @@ -1,64 +1,64 @@ ---- ui/views/controls/textfield/textfield.cc.orig 2024-08-27 06:28:16 UTC +--- ui/views/controls/textfield/textfield.cc.orig 2024-11-04 08:56:03 UTC +++ ui/views/controls/textfield/textfield.cc @@ -85,7 +85,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; -@@ -756,7 +756,7 @@ bool Textfield::OnKeyPressed(const ui::KeyEvent& event +@@ -761,7 +761,7 @@ bool Textfield::OnKeyPressed(const ui::KeyEvent& event if (!textfield) return handled; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* linux_ui = ui::LinuxUi::instance(); std::vector commands; if (!handled && linux_ui && -@@ -939,7 +939,7 @@ void Textfield::AboutToRequestFocusFromTabTraversal(bo +@@ -944,7 +944,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. auto* linux_ui = ui::LinuxUi::instance(); std::vector commands; -@@ -1999,7 +1999,7 @@ bool Textfield::ShouldDoLearning() { +@@ -1994,7 +1994,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( -@@ -2505,14 +2505,14 @@ ui::TextEditCommand Textfield::GetCommandForKeyEvent( +@@ -2500,14 +2500,14 @@ 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; #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 cae79768fb99..e507525c6ae2 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 2024-06-25 12:08:48 UTC +--- ui/views/controls/textfield/textfield.h.orig 2024-11-04 08:56:03 UTC +++ ui/views/controls/textfield/textfield.h @@ -47,7 +47,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 -@@ -462,7 +462,7 @@ class VIEWS_EXPORT Textfield : public View, +@@ -463,7 +463,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_corewm_tooltip__aura.cc b/www/iridium/files/patch-ui_views_corewm_tooltip__aura.cc index fefc5aeee6b6..2825c7543375 100644 --- a/www/iridium/files/patch-ui_views_corewm_tooltip__aura.cc +++ b/www/iridium/files/patch-ui_views_corewm_tooltip__aura.cc @@ -1,11 +1,11 @@ ---- ui/views/corewm/tooltip_aura.cc.orig 2024-06-25 12:08:48 UTC +--- ui/views/corewm/tooltip_aura.cc.orig 2024-11-04 08:56:03 UTC +++ ui/views/corewm/tooltip_aura.cc -@@ -36,7 +36,7 @@ namespace { +@@ -37,7 +37,7 @@ namespace { bool CanUseTranslucentTooltipWidget() { // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_WIN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return false; #else return true; 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 621606db9509..21367faf583f 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 2023-01-17 19:19:00 UTC +--- ui/views/examples/widget_example.cc.orig 2024-11-04 08:56:03 UTC +++ ui/views/examples/widget_example.cc -@@ -49,7 +49,7 @@ void WidgetExample::CreateExampleView(View* container) +@@ -50,7 +50,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_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 777f37bbfb7c..cb4e9dfb71c2 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 2024-08-27 06:28:16 UTC +--- ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc.orig 2024-11-04 08:56:03 UTC +++ ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.cc -@@ -197,7 +197,7 @@ DragOperation DesktopDragDropClientOzone::StartDragAnd +@@ -206,7 +206,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 8c40d2aefd56..8ea1786782e2 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 2024-06-25 12:08:48 UTC +--- ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.h.orig 2024-11-04 08:56:03 UTC +++ ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.h -@@ -65,7 +65,7 @@ class VIEWS_EXPORT DesktopDragDropClientOzone +@@ -66,7 +66,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() -@@ -86,7 +86,7 @@ class VIEWS_EXPORT DesktopDragDropClientOzone +@@ -87,7 +87,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 33d1cd6c34fc..5639d227cdfd 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 2024-08-27 06:28:16 UTC +--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc.orig 2024-11-04 08:56:03 UTC +++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc @@ -48,7 +48,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 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); -@@ -1174,7 +1174,7 @@ bool DesktopWindowTreeHostPlatform::RotateFocusForWidg +@@ -1175,7 +1175,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 b4202158c659..e3332d5f7899 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 2024-08-27 06:28:16 UTC +--- ui/views/widget/root_view.cc.orig 2024-11-04 08:56:03 UTC +++ ui/views/widget/root_view.cc -@@ -129,7 +129,7 @@ class AnnounceTextView : public View { +@@ -139,7 +139,7 @@ class AnnounceTextView : public View { #if BUILDFLAG(IS_CHROMEOS) // On ChromeOS, kAlert role can invoke an unnecessary event on reparenting. - node_data->role = ax::mojom::Role::kStaticText; + 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". - node_data->role = ax::mojom::Role::kAlert; + 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 b8726f098b42..9a4667cfa4d9 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 2024-08-27 06:28:16 UTC +--- ui/views/widget/widget.cc.orig 2024-11-04 08:56:03 UTC +++ ui/views/widget/widget.cc -@@ -57,7 +57,7 @@ +@@ -58,7 +58,7 @@ #include "ui/views/window/custom_frame_view.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 -@@ -2182,7 +2182,7 @@ const ui::NativeTheme* Widget::GetNativeTheme() const +@@ -2203,7 +2203,7 @@ const ui::NativeTheme* Widget::GetNativeTheme() const if (parent_) 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(); #endif 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 5fcd38a2ae88..3bde303f0720 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 2024-08-27 06:28:16 UTC +--- ui/views/window/dialog_delegate.cc.orig 2024-11-04 08:56:03 UTC +++ ui/views/window/dialog_delegate.cc -@@ -103,7 +103,7 @@ Widget* DialogDelegate::CreateDialogWidget( +@@ -105,7 +105,7 @@ Widget* DialogDelegate::CreateDialogWidget( // static bool DialogDelegate::CanSupportCustomFrame(gfx::NativeView parent) { -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ BUILDFLAG(ENABLE_DESKTOP_AURA) // The new style doesn't support unparented dialogs on Linux desktop. return parent != nullptr; diff --git a/www/iridium/files/patch-v8_BUILD.gn b/www/iridium/files/patch-v8_BUILD.gn index c622c2745bbf..2427df9bcf7c 100644 --- a/www/iridium/files/patch-v8_BUILD.gn +++ b/www/iridium/files/patch-v8_BUILD.gn @@ -1,65 +1,65 @@ ---- v8/BUILD.gn.orig 2024-08-27 06:28:16 UTC +--- v8/BUILD.gn.orig 2024-11-04 08:56:03 UTC +++ v8/BUILD.gn -@@ -896,6 +896,8 @@ external_v8_defines = [ +@@ -907,6 +907,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 = [ -@@ -972,6 +974,12 @@ if (target_os == "android") { +@@ -983,6 +985,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 -@@ -2477,6 +2485,12 @@ template("run_mksnapshot") { +@@ -2535,6 +2543,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 -@@ -6559,7 +6573,7 @@ v8_component("v8_libbase") { + if (v8_enable_turboshaft_csa) { +@@ -6625,7 +6639,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", -@@ -6570,6 +6584,18 @@ v8_component("v8_libbase") { +@@ -6636,6 +6650,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 62bb45a45141..4c68ff34c511 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 2024-08-01 05:47:53 UTC +--- v8/include/v8-internal.h.orig 2024-11-04 08:56:03 UTC +++ v8/include/v8-internal.h -@@ -213,7 +213,7 @@ using SandboxedPointer_t = Address; +@@ -229,7 +229,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_src_api_api.cc b/www/iridium/files/patch-v8_src_api_api.cc index 6954c7398538..cc6d117636e3 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 2024-08-27 06:28:16 UTC +--- v8/src/api/api.cc.orig 2024-11-04 08:56:03 UTC +++ v8/src/api/api.cc -@@ -148,7 +148,7 @@ +@@ -149,7 +149,7 @@ #include "src/wasm/wasm-serialization.h" #endif // V8_ENABLE_WEBASSEMBLY -#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 -@@ -6511,7 +6511,7 @@ bool v8::V8::Initialize(const int build_config) { +@@ -6525,7 +6525,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_platform_memory.h b/www/iridium/files/patch-v8_src_base_platform_memory.h index 2bdbf11b306a..f6538054b5b9 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 2024-08-27 06:28:16 UTC +--- v8/src/base/platform/memory.h.orig 2024-11-04 08:56:03 UTC +++ v8/src/base/platform/memory.h -@@ -19,13 +19,13 @@ - - #if V8_OS_DARWIN +@@ -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_WIN +-#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-posix.cc b/www/iridium/files/patch-v8_src_base_platform_platform-posix.cc index 782de1f065be..7e6655ddfe3f 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,62 +1,53 @@ ---- v8/src/base/platform/platform-posix.cc.orig 2024-08-27 06:28:16 UTC +--- v8/src/base/platform/platform-posix.cc.orig 2024-11-04 08:56:03 UTC +++ v8/src/base/platform/platform-posix.cc -@@ -54,7 +54,7 @@ - #if V8_OS_DARWIN - #include - #include --#elif !V8_OS_ZOS -+#elif !V8_OS_ZOS && !V8_OS_BSD - #include - #endif - -@@ -72,7 +72,7 @@ +@@ -75,7 +75,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 -@@ -311,8 +311,15 @@ void OS::SetRandomMmapSeed(int64_t seed) { +@@ -314,8 +314,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()); -@@ -407,6 +414,7 @@ void* OS::GetRandomMmapAddr() { +@@ -416,6 +423,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 -@@ -681,7 +689,7 @@ void OS::DestroySharedMemoryHandle(PlatformSharedMemor +@@ -704,7 +712,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. -@@ -1326,7 +1334,7 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* +@@ -1350,7 +1358,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 5c759dbdab79..c1b7f0612c6c 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 2022-03-28 18:11:04 UTC +--- v8/src/base/sys-info.cc.orig 2024-11-04 08:56:03 UTC +++ v8/src/base/sys-info.cc -@@ -38,7 +38,7 @@ namespace base { +@@ -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_builtins_x64_builtins-x64.cc b/www/iridium/files/patch-v8_src_builtins_x64_builtins-x64.cc new file mode 100644 index 000000000000..1d163d01d31c --- /dev/null +++ b/www/iridium/files/patch-v8_src_builtins_x64_builtins-x64.cc @@ -0,0 +1,14 @@ +--- v8/src/builtins/x64/builtins-x64.cc.orig 2024-11-04 08:56:03 UTC ++++ v8/src/builtins/x64/builtins-x64.cc +@@ -2838,7 +2838,11 @@ void Generate_OSREntry(MacroAssembler* masm, Register + // Drop the return address on the stack and jump to the OSR entry + // point of the function. + __ Drop(1); ++#ifdef V8_ENABLE_CET_IBT ++ __ jmp(entry_address, /*notrack=*/true); ++#else + __ jmp(entry_address); ++#endif + } + + enum class OsrSourceTier { diff --git a/www/iridium/files/patch-v8_src_execution_isolate.cc b/www/iridium/files/patch-v8_src_execution_isolate.cc index 8cb02b7084bb..3e594571c96e 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 2024-09-03 20:38:42 UTC +--- v8/src/execution/isolate.cc.orig 2024-11-04 08:56:03 UTC +++ v8/src/execution/isolate.cc -@@ -159,6 +159,10 @@ +@@ -168,6 +168,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_[]; -@@ -4803,6 +4807,13 @@ void Isolate::InitializeDefaultEmbeddedBlob() { +@@ -4971,6 +4975,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 46d2ef5620fb..b8813ac22e8c 100644 --- a/www/iridium/files/patch-v8_src_flags_flags.cc +++ b/www/iridium/files/patch-v8_src_flags_flags.cc @@ -1,36 +1,24 @@ ---- v8/src/flags/flags.cc.orig 2024-08-01 05:47:53 UTC +--- v8/src/flags/flags.cc.orig 2024-11-04 08:56:03 UTC +++ v8/src/flags/flags.cc -@@ -15,6 +15,10 @@ +@@ -16,6 +16,10 @@ #include #include +#if V8_OS_OPENBSD +#include +#endif + #include "src/base/functional.h" #include "src/base/lazy-instance.h" #include "src/base/platform/platform.h" -@@ -34,7 +38,11 @@ - namespace v8::internal { - - // Define {v8_flags}, declared in flags.h. -+#if V8_OS_OPENBSD -+FlagValues v8_flags __attribute__((section(".openbsd.mutable"))); -+#else - FlagValues v8_flags; -+#endif - - // {v8_flags} needs to be aligned to a memory page, and the size needs to be a - // multiple of a page size. This is required for memory-protection of the memory -@@ -806,6 +814,10 @@ void FlagList::FreezeFlags() { +@@ -807,6 +811,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_snapshot_embedded_platform-embedded-file-writer-base.h b/www/iridium/files/patch-v8_src_snapshot_embedded_platform-embedded-file-writer-base.h index eaec2d37abe8..2c5faab1b029 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 2024-08-27 06:28:16 UTC +--- v8/src/snapshot/embedded/platform-embedded-file-writer-base.h.orig 2024-11-04 08:56:03 UTC +++ v8/src/snapshot/embedded/platform-embedded-file-writer-base.h -@@ -32,6 +32,7 @@ enum class EmbeddedTargetOs { +@@ -36,6 +36,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_wasm_baseline_ia32_liftoff-assembler-ia32-inl.h b/www/iridium/files/patch-v8_src_wasm_baseline_ia32_liftoff-assembler-ia32-inl.h index 7547d3a65160..261de3258c6c 100644 --- a/www/iridium/files/patch-v8_src_wasm_baseline_ia32_liftoff-assembler-ia32-inl.h +++ b/www/iridium/files/patch-v8_src_wasm_baseline_ia32_liftoff-assembler-ia32-inl.h @@ -1,128 +1,128 @@ ---- v8/src/wasm/baseline/ia32/liftoff-assembler-ia32-inl.h.orig 2024-08-27 06:28:16 UTC +--- v8/src/wasm/baseline/ia32/liftoff-assembler-ia32-inl.h.orig 2024-11-04 08:56:03 UTC +++ v8/src/wasm/baseline/ia32/liftoff-assembler-ia32-inl.h -@@ -503,7 +503,7 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst +@@ -512,7 +512,7 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst } void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr, - Register offset_reg, uint32_t offset_imm, + Register offset_reg, uintptr_t offset_imm, LoadType type, uint32_t* protected_load_pc, bool /* is_load_mem */, bool /* i64_offset */, bool needs_shift) { -@@ -583,7 +583,7 @@ void LiftoffAssembler::Load(LiftoffRegister dst, Regis +@@ -592,7 +592,7 @@ void LiftoffAssembler::Load(LiftoffRegister dst, Regis } void LiftoffAssembler::Store(Register dst_addr, Register offset_reg, - uint32_t offset_imm, LiftoffRegister src, + uintptr_t offset_imm, LiftoffRegister src, StoreType type, LiftoffRegList pinned, uint32_t* protected_store_pc, bool /* is_store_mem */, bool /* i64_offset */) { -@@ -662,7 +662,7 @@ void LiftoffAssembler::Store(Register dst_addr, Regist +@@ -671,7 +671,7 @@ void LiftoffAssembler::Store(Register dst_addr, Regist } void LiftoffAssembler::AtomicLoad(LiftoffRegister dst, Register src_addr, - Register offset_reg, uint32_t offset_imm, + Register offset_reg, uintptr_t offset_imm, LoadType type, LiftoffRegList /* pinned */, bool /* i64_offset */) { if (type.value() != LoadType::kI64Load) { -@@ -680,7 +680,7 @@ void LiftoffAssembler::AtomicLoad(LiftoffRegister dst, +@@ -689,7 +689,7 @@ void LiftoffAssembler::AtomicLoad(LiftoffRegister dst, } void LiftoffAssembler::AtomicStore(Register dst_addr, Register offset_reg, - uint32_t offset_imm, LiftoffRegister src, + uintptr_t offset_imm, LiftoffRegister src, StoreType type, LiftoffRegList pinned, bool /* i64_offset */) { DCHECK_LE(offset_imm, std::numeric_limits::max()); -@@ -750,7 +750,7 @@ enum Binop { kAdd, kSub, kAnd, kOr, kXor, kExchange }; +@@ -759,7 +759,7 @@ enum Binop { kAdd, kSub, kAnd, kOr, kXor, kExchange }; inline void AtomicAddOrSubOrExchange32(LiftoffAssembler* lasm, Binop binop, Register dst_addr, Register offset_reg, - uint32_t offset_imm, + uintptr_t offset_imm, LiftoffRegister value, LiftoffRegister result, StoreType type) { DCHECK_EQ(value, result); -@@ -818,7 +818,7 @@ inline void AtomicAddOrSubOrExchange32(LiftoffAssemble +@@ -827,7 +827,7 @@ inline void AtomicAddOrSubOrExchange32(LiftoffAssemble } inline void AtomicBinop32(LiftoffAssembler* lasm, Binop op, Register dst_addr, - Register offset_reg, uint32_t offset_imm, + Register offset_reg, uintptr_t offset_imm, LiftoffRegister value, LiftoffRegister result, StoreType type) { DCHECK_EQ(value, result); -@@ -933,7 +933,7 @@ inline void AtomicBinop32(LiftoffAssembler* lasm, Bino +@@ -942,7 +942,7 @@ inline void AtomicBinop32(LiftoffAssembler* lasm, Bino } inline void AtomicBinop64(LiftoffAssembler* lasm, Binop op, Register dst_addr, - Register offset_reg, uint32_t offset_imm, + Register offset_reg, uintptr_t offset_imm, LiftoffRegister value, LiftoffRegister result) { // We need {ebx} here, which is the root register. As the root register it // needs special treatment. As we use {ebx} directly in the code below, we -@@ -1029,7 +1029,7 @@ inline void AtomicBinop64(LiftoffAssembler* lasm, Bino +@@ -1038,7 +1038,7 @@ inline void AtomicBinop64(LiftoffAssembler* lasm, Bino } // namespace liftoff void LiftoffAssembler::AtomicAdd(Register dst_addr, Register offset_reg, - uint32_t offset_imm, LiftoffRegister value, + uintptr_t offset_imm, LiftoffRegister value, LiftoffRegister result, StoreType type, bool /* i64_offset */) { if (type.value() == StoreType::kI64Store) { -@@ -1043,7 +1043,7 @@ void LiftoffAssembler::AtomicAdd(Register dst_addr, Re +@@ -1052,7 +1052,7 @@ void LiftoffAssembler::AtomicAdd(Register dst_addr, Re } void LiftoffAssembler::AtomicSub(Register dst_addr, Register offset_reg, - uint32_t offset_imm, LiftoffRegister value, + uintptr_t offset_imm, LiftoffRegister value, LiftoffRegister result, StoreType type, bool /* i64_offset */) { if (type.value() == StoreType::kI64Store) { -@@ -1056,7 +1056,7 @@ void LiftoffAssembler::AtomicSub(Register dst_addr, Re +@@ -1065,7 +1065,7 @@ void LiftoffAssembler::AtomicSub(Register dst_addr, Re } void LiftoffAssembler::AtomicAnd(Register dst_addr, Register offset_reg, - uint32_t offset_imm, LiftoffRegister value, + uintptr_t offset_imm, LiftoffRegister value, LiftoffRegister result, StoreType type, bool /* i64_offset */) { if (type.value() == StoreType::kI64Store) { -@@ -1070,7 +1070,7 @@ void LiftoffAssembler::AtomicAnd(Register dst_addr, Re +@@ -1079,7 +1079,7 @@ void LiftoffAssembler::AtomicAnd(Register dst_addr, Re } void LiftoffAssembler::AtomicOr(Register dst_addr, Register offset_reg, - uint32_t offset_imm, LiftoffRegister value, + uintptr_t offset_imm, LiftoffRegister value, LiftoffRegister result, StoreType type, bool /* i64_offset */) { if (type.value() == StoreType::kI64Store) { -@@ -1084,7 +1084,7 @@ void LiftoffAssembler::AtomicOr(Register dst_addr, Reg +@@ -1093,7 +1093,7 @@ void LiftoffAssembler::AtomicOr(Register dst_addr, Reg } void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg, - uint32_t offset_imm, LiftoffRegister value, + uintptr_t offset_imm, LiftoffRegister value, LiftoffRegister result, StoreType type, bool /* i64_offset */) { if (type.value() == StoreType::kI64Store) { -@@ -1098,7 +1098,7 @@ void LiftoffAssembler::AtomicXor(Register dst_addr, Re +@@ -1107,7 +1107,7 @@ void LiftoffAssembler::AtomicXor(Register dst_addr, Re } void LiftoffAssembler::AtomicExchange(Register dst_addr, Register offset_reg, - uint32_t offset_imm, + uintptr_t offset_imm, LiftoffRegister value, LiftoffRegister result, StoreType type, bool /* i64_offset */) { -@@ -1113,7 +1113,7 @@ void LiftoffAssembler::AtomicExchange(Register dst_add +@@ -1122,7 +1122,7 @@ void LiftoffAssembler::AtomicExchange(Register dst_add } void LiftoffAssembler::AtomicCompareExchange( - Register dst_addr, Register offset_reg, uint32_t offset_imm, + Register dst_addr, Register offset_reg, uintptr_t offset_imm, LiftoffRegister expected, LiftoffRegister new_value, LiftoffRegister result, StoreType type, bool /* i64_offset */) { // We expect that the offset has already been added to {dst_addr}, and no diff --git a/www/iridium/files/patch-v8_tools_run.py b/www/iridium/files/patch-v8_tools_run.py index ae5d2f657e6c..197acf6d1d60 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 2022-10-05 07:34:01 UTC +--- v8/tools/run.py.orig 2024-11-04 08:56:03 UTC +++ v8/tools/run.py -@@ -9,7 +9,7 @@ scripts.""" - import subprocess - import sys +@@ -21,7 +21,7 @@ if cmd and cmd[0] == '--redirect-stdout': + kwargs = dict(stdout=subprocess.PIPE) + cmd = cmd[2:] --result = subprocess.call(sys.argv[1:]) -+sys.exit(subprocess.call(sys.argv[1:], env={"LD_LIBRARY_PATH":"${WRKSRC}/out/Release"})) - if result != 0: - # Windows error codes such as 0xC0000005 and 0xC0000409 are much easier - # to recognize and differentiate in hex. +-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: