diff --git a/www/iridium/Makefile b/www/iridium/Makefile index d6f9c04396b6..965b8a055d2f 100644 --- a/www/iridium/Makefile +++ b/www/iridium/Makefile @@ -1,324 +1,324 @@ PORTNAME= iridium -PORTVERSION= 2022.11.107 +PORTVERSION= 2022.12.108.1 CATEGORIES= www wayland MASTER_SITES= https://downloads.iridiumbrowser.de/source/ PKGNAMESUFFIX= -browser DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION} MAINTAINER= chromium@FreeBSD.org COMMENT= Iridium browser WWW= https://iridiumbrowser.de/ LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi ONLY_FOR_ARCHS= aarch64 amd64 i386 PATCH_SITES= https://nerd.hu/distfiles/ -PATCHFILES+= disable-privacy-sandbox.patch:-p1 +PATCHFILES+= disable-privacy-sandbox-352a8844b01a05a786ba76da599d106487f1533f.patch:-p1 BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ gperf:devel/gperf \ flock:sysutils/flock \ node:www/node \ xcb-proto>0:x11/xcb-proto \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} \ ${LOCALBASE}/include/va/va.h:multimedia/libva \ ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri \ ${LOCALBASE}/libdata/pkgconfig/Qt5Core.pc:devel/qt5-core \ ${LOCALBASE}/libdata/pkgconfig/Qt5Widgets.pc:x11-toolkits/qt5-widgets LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libevent.so:devel/libevent \ 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 \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic USES= bison compiler:c++17-lang cpe desktop-file-utils gl gnome iconv jpeg \ localbase:ldflags ninja perl5 pkgconfig python:3.7+,build qt:5 shebangfix \ tar:xz xorg CPE_VENDOR= google CPE_PRODUCT= chrome USE_GL= gbm gl USE_GNOME= atk dconf gdkpixbuf2 glib20 gtk30 libxml2 libxslt USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xorgproto xrandr xrender xscrnsaver xtst USE_QT= buildtools:build SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format MAKE_ARGS= -C out/${BUILDTYPE} ALL_TARGET= chrome BINARY_ALIAS= python3=${PYTHON_CMD} \ moc=${PREFIX}/bin/moc-qt5 # TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) # # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= clang_use_chrome_plugins=false \ chrome_pgo_phase=0 \ enable_hangout_services_extension=true \ enable_js_type_check=false \ 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="none" \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=false \ use_gnome_keyring=false \ use_lld=true \ use_sysroot=false \ use_system_freetype=false \ use_system_harfbuzz=true \ use_system_libjpeg=true \ use_system_libwayland=true \ use_system_wayland_scanner=true \ use_system_libwayland_server=true \ use_udev=false \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" # 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 OPTIONS_DEFAULT= CODECS CUPS KERBEROS SNDIO OPTIONS_EXCLUDE_aarch64=LTO OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO OPTIONS_RADIO= KERBEROS OPTIONS_RADIO_KERBEROS= HEIMDAL HEIMDAL_BASE MIT OPTIONS_SUB= yes CODECS_DESC= Compile and enable patented codecs like H.264 HEIMDAL_BASE_DESC= Heimdal Kerberos (base) HEIMDAL_DESC= Heimdal Kerberos (security/heimdal) MIT_DESC= MIT Kerberos (security/krb5) ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ alsa-lib>=1.1.1_1:audio/alsa-lib ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CODECS_VARS= GN_ARGS+=ffmpeg_branding="Chrome" \ GN_ARGS+=proprietary_codecs=true CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \ GN_ARGS+=proprietary_codecs=false 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 PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false # With SNDIO=on we exclude audio_manager_linux from the build (see # media/audio/BUILD.gn) and use audio_manager_openbsd which does not # support falling back to ALSA or PulseAudio. SNDIO_PREVENTS= ALSA PULSEAUDIO SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false .include .include .if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base .endif .if ${COMPILER_VERSION} != 130 LLVM_DEFAULT= 13 BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} BINARY_ALIAS+= cpp=${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} \ cc=${LOCALBASE}/bin/clang${LLVM_DEFAULT} \ c++=${LOCALBASE}/bin/clang++${LLVM_DEFAULT} \ ar=${LOCALBASE}/bin/llvm-ar${LLVM_DEFAULT} \ nm=${LOCALBASE}/bin/llvm-nm${LLVM_DEFAULT} \ ld=${LOCALBASE}/bin/ld.lld${LLVM_DEFAULT} .else BINARY_ALIAS+= ar=/usr/bin/llvm-ar \ nm=/usr/bin/llvm-nm .endif # swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " .else PLIST_SUB+= NOT_AARCH64="" .endif # 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 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 \ flac fontconfig freetype harfbuzz-ng icu libdrm libevent libpng \ libusb libwebp libxml libxslt openh264 opus snappy || ${FALSE} # Iridium uses an unreleased version of FFmpeg, so configure it .for brand in Chrome Chromium ${CP} -R \ ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/linux/ \ ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/freebsd .endfor do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin/node # Setup buildtools/freebsd @${MKDIR} ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKSRC}/buildtools/freebsd ${LN} -sf /usr/bin/strip ${WRKSRC}/buildtools/freebsd/strip do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ ${STAGEDIR}${MANPREFIX}/man/man1/iridium.1 @${SED} -i "" -e 's,\@\@PACKAGE\@\@,chromium,g;s,\@\@MENUNAME\@\@,Iridium Web Browser,g' \ ${STAGEDIR}${MANPREFIX}/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} .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 38deeadbb2b2..42e8429c0b34 100644 --- a/www/iridium/distinfo +++ b/www/iridium/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1669891478 -SHA256 (iridium-browser-2022.11.107.tar.xz) = 7795b28672850fd4218138d6d9242fe246160065a474b26448733af08975e6ff -SIZE (iridium-browser-2022.11.107.tar.xz) = 1409151040 -SHA256 (disable-privacy-sandbox.patch) = 9797e71f4a6700d9a675ec90c9b03487532de68af568fd010eec3fc0cd97c4de -SIZE (disable-privacy-sandbox.patch) = 4772 +TIMESTAMP = 1670314377 +SHA256 (iridium-browser-2022.12.108.1.tar.xz) = bc8e923f3003a601a51daa0c5aa6d846742e000f86c7187c55369909bb7ce227 +SIZE (iridium-browser-2022.12.108.1.tar.xz) = 1641474124 +SHA256 (disable-privacy-sandbox-352a8844b01a05a786ba76da599d106487f1533f.patch) = 643103d1d8d8d57a0403a5f048cbbc15422e539f8334cde158e83530aa67257d +SIZE (disable-privacy-sandbox-352a8844b01a05a786ba76da599d106487f1533f.patch) = 4702 diff --git a/www/iridium/files/patch-BUILD.gn b/www/iridium/files/patch-BUILD.gn index 6e7fb90c2fc5..282d2e412a11 100644 --- a/www/iridium/files/patch-BUILD.gn +++ b/www/iridium/files/patch-BUILD.gn @@ -1,89 +1,89 @@ ---- BUILD.gn.orig 2022-12-01 10:35:46 UTC +--- BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ BUILD.gn @@ -59,7 +59,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) @@ -89,7 +89,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", -@@ -447,7 +446,7 @@ group("gn_all") { +@@ -430,7 +429,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", -@@ -648,6 +647,15 @@ group("gn_all") { +@@ -632,6 +631,15 @@ group("gn_all") { deps += [ "//gpu/tools/compositor_model_bench" ] } + if (is_bsd) { + deps -= [ + "//third_party/breakpad:dump_syms($host_toolchain)", + "//third_party/breakpad:microdump_stackwalk($host_toolchain)", + "//third_party/breakpad:minidump_dump($host_toolchain)", + "//third_party/breakpad:minidump_stackwalk($host_toolchain)", + ] + } + if (is_mac) { deps += [ "//third_party/breakpad:crash_inspector", -@@ -696,7 +704,7 @@ group("gn_all") { +@@ -680,7 +688,7 @@ group("gn_all") { host_os == "win") { deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] } - } else if (!is_android && !is_ios && !is_fuchsia) { + } else if (!is_android && !is_ios && !is_fuchsia && !is_bsd) { deps += [ "//third_party/breakpad:symupload($host_toolchain)" ] } -@@ -1123,7 +1131,7 @@ if (!is_ios) { +@@ -1107,7 +1115,7 @@ if (!is_ios) { ] } - if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) { + if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) { # WPT Webdriver tests runner # chrome/test/chromedriver/test/run_webdriver_tests.py script_test("webdriver_wpt_tests") { -@@ -1218,7 +1226,7 @@ if (!is_ios) { +@@ -1202,7 +1210,7 @@ if (!is_ios) { data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] } - if (!is_win && !is_android) { + if (!is_win && !is_android && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -1227,7 +1235,7 @@ if (!is_ios) { +@@ -1211,7 +1219,7 @@ if (!is_ios) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } - if (is_linux || is_chromeos) { + if ((is_linux && !is_bsd) || is_chromeos) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1668,7 +1676,7 @@ group("chromium_builder_perf") { +@@ -1655,7 +1663,7 @@ group("chromium_builder_perf") { data_deps += [ "//chrome/test:performance_browser_tests" ] } - if (!is_win) { + if (!is_win && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } diff --git a/www/iridium/files/patch-base_BUILD.gn b/www/iridium/files/patch-base_BUILD.gn index 17173f34fa30..7ea6428a19d0 100644 --- a/www/iridium/files/patch-base_BUILD.gn +++ b/www/iridium/files/patch-base_BUILD.gn @@ -1,166 +1,166 @@ ---- base/BUILD.gn.orig 2022-12-01 10:35:46 UTC +--- base/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ base/BUILD.gn -@@ -162,7 +162,7 @@ buildflag_header("ios_cronet_buildflags") { +@@ -163,7 +163,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" -@@ -1035,7 +1035,7 @@ mixed_component("base") { +@@ -1048,7 +1048,7 @@ mixed_component("base") { "timer/hi_res_timer_manager_posix.cc", ] - if (!is_nacl && !is_apple) { + if (!is_nacl && !is_apple && !is_bsd) { sources += [ "profiler/stack_base_address_posix.cc", "profiler/stack_base_address_posix.h", -@@ -1046,6 +1046,14 @@ mixed_component("base") { +@@ -1059,6 +1059,14 @@ mixed_component("base") { "profiler/thread_delegate_posix.h", ] } + + if (is_bsd) { + sources += [ + "profiler/stack_base_address_posix.cc", + "profiler/stack_base_address_posix.h", + "profiler/stack_sampler_posix.cc", + ] + } } if (is_win) { -@@ -1557,11 +1565,23 @@ mixed_component("base") { +@@ -1559,11 +1567,23 @@ mixed_component("base") { # Needed for if using newer C++ library than sysroot, except if # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. - if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && + if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos && !is_bsd)) && host_toolchain != "//build/toolchain/cros:host") { libs += [ "atomic" ] } + # *BSD needs libkvm + if (is_bsd) { + libs += [ "kvm" ] + } + + if (is_freebsd) { + libs += [ + "execinfo", + "util", + ] + } + if (use_allocator_shim) { sources += [ "allocator/partition_allocator/shim/allocator_shim.cc", -@@ -1589,7 +1609,7 @@ mixed_component("base") { +@@ -1591,7 +1611,7 @@ mixed_component("base") { ] configs += [ "//base/allocator:mac_no_default_new_delete_symbols" ] } - if (is_chromeos || is_linux) { + if (is_chromeos || (is_linux && !is_bsd)) { sources += [ "allocator/partition_allocator/shim/allocator_shim_override_cpp_symbols.h", "allocator/partition_allocator/shim/allocator_shim_override_glibc_weak_symbols.h", -@@ -1643,7 +1663,7 @@ mixed_component("base") { +@@ -1645,7 +1665,7 @@ mixed_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" ] } -@@ -2216,6 +2236,42 @@ mixed_component("base") { +@@ -2218,6 +2238,42 @@ mixed_component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/file_util_linux.cc", + "files/scoped_file_linux.cc", + "process/memory_linux.cc", + "process/process_linux.cc", + "system/sys_info_linux.cc", + "process/process_iterator_linux.cc", + "process/process_metrics_linux.cc", + "process/process_handle_linux.cc" + ] + sources += [ + "process/memory_stubs.cc", + "files/file_path_watcher_kqueue.cc", + "files/file_path_watcher_kqueue.h", + "files/file_path_watcher_bsd.cc", + ] + } + + if (is_openbsd) { + sources += [ + "process/process_handle_openbsd.cc", + "process/process_iterator_openbsd.cc", + "process/process_metrics_openbsd.cc", + "system/sys_info_openbsd.cc", + ] + } else if (is_freebsd) { + sources += [ + "process/process_handle_freebsd.cc", + "process/process_iterator_freebsd.cc", + "process/process_metrics_freebsd.cc", + "system/sys_info_freebsd.cc", + ] + } + # iOS if (is_ios) { sources -= [ -@@ -2313,7 +2369,7 @@ mixed_component("base") { +@@ -2315,7 +2371,7 @@ mixed_component("base") { } if (dep_libevent) { - deps += [ "//third_party/libevent" ] + public_deps += [ "//third_party/libevent" ] } if (use_libevent) { -@@ -3565,7 +3621,7 @@ test("base_unittests") { +@@ -3583,7 +3639,7 @@ test("base_unittests") { } } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "debug/proc_maps_linux_unittest.cc", "files/scoped_file_linux_unittest.cc", -@@ -3613,7 +3669,7 @@ test("base_unittests") { +@@ -3629,7 +3685,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", -@@ -3624,7 +3680,7 @@ test("base_unittests") { +@@ -3640,7 +3696,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" ] } -@@ -3812,7 +3868,7 @@ test("base_unittests") { +@@ -3832,7 +3888,7 @@ test("base_unittests") { } } - if (is_fuchsia || is_linux || is_chromeos) { + if ((is_fuchsia || is_linux || is_chromeos) && !is_bsd) { sources += [ "debug/elf_reader_unittest.cc", "debug/test_elf_image_builder.cc", diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator.h b/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator.h index 92e7ce5dca0a..5305a3c68753 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/page_allocator.h.orig 2022-10-05 07:34:01 UTC +--- base/allocator/partition_allocator/page_allocator.h.orig 2022-12-06 08:09:13 UTC +++ base/allocator/partition_allocator/page_allocator.h -@@ -206,7 +206,7 @@ void DecommitAndZeroSystemPages(void* address, size_t +@@ -231,7 +231,7 @@ void DecommitAndZeroSystemPages(void* address, size_t // recommitted. Do not assume that this will not change over time. constexpr PA_COMPONENT_EXPORT( PARTITION_ALLOC) bool DecommittedMemoryIsAlwaysZeroed() { -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) return false; #else return true; diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h b/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h index 7e2fb6dea88e..2ea09f1476ac 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h @@ -1,16 +1,16 @@ ---- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2022-10-05 07:34:01 UTC +--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2022-12-06 08:09:13 UTC +++ base/allocator/partition_allocator/page_allocator_internals_posix.h -@@ -347,8 +347,12 @@ bool TryRecommitSystemPagesInternal( +@@ -356,8 +356,12 @@ bool TryRecommitSystemPagesInternal( void DiscardSystemPagesInternal(uintptr_t address, size_t length) { void* ptr = reinterpret_cast(address); -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) +#if BUILDFLAG(IS_BSD) + int ret = madvise(ptr, length, MADV_FREE); +#else int ret = madvise(ptr, length, MADV_FREE_REUSABLE); +#endif if (ret) { // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED. ret = madvise(ptr, length, MADV_DONTNEED); diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_partition__address__space.cc b/www/iridium/files/patch-base_allocator_partition__allocator_partition__address__space.cc index bdbfdd035891..c2bc4d1b0e66 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_partition__address__space.cc +++ b/www/iridium/files/patch-base_allocator_partition__allocator_partition__address__space.cc @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/partition_address_space.cc.orig 2022-12-01 10:35:46 UTC +--- base/allocator/partition_allocator/partition_address_space.cc.orig 2022-12-06 08:09:13 UTC +++ base/allocator/partition_allocator/partition_address_space.cc -@@ -261,7 +261,7 @@ void PartitionAddressSpace::UninitConfigurablePoolForT - setup_.configurable_pool_ = 0; +@@ -294,7 +294,7 @@ void PartitionAddressSpace::UninitConfigurablePoolForT + setup_.configurable_pool_base_mask_ = 0; } -#if BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) PageCharacteristics page_characteristics; diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h index 460caf0032f1..1e0d5165916f 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2022-12-01 10:35:46 UTC +--- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2022-12-06 08:09:13 UTC +++ base/allocator/partition_allocator/partition_alloc_constants.h @@ -91,7 +91,7 @@ PartitionPageShift() { return 18; // 256 KiB } #elif (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ - (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t PartitionPageShift() { return PageAllocationGranularityShift() + 2; -@@ -272,7 +272,7 @@ constexpr size_t kNumPools = 3; +@@ -270,7 +270,7 @@ constexpr size_t kNumPools = 3; // Special-case Android and iOS, which incur test failures with larger - // GigaCage. Regardless, allocating >8GiB with malloc() on these platforms is + // pools. Regardless, allocating >8GiB with malloc() on these platforms is // unrealistic as of 2022. -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) constexpr size_t kPoolMaxSize = 8 * kGiB; #else constexpr size_t kPoolMaxSize = 16 * kGiB; diff --git a/www/iridium/files/patch-base_cpu.h b/www/iridium/files/patch-base_cpu.h index 66164b51097b..2a9efeb30eb6 100644 --- a/www/iridium/files/patch-base_cpu.h +++ b/www/iridium/files/patch-base_cpu.h @@ -1,11 +1,11 @@ ---- base/cpu.h.orig 2022-03-28 18:11:04 UTC +--- base/cpu.h.orig 2022-12-06 08:09:13 UTC +++ base/cpu.h -@@ -108,7 +108,7 @@ class BASE_EXPORT CPU final { +@@ -115,7 +115,7 @@ class BASE_EXPORT CPU final { const std::string& cpu_brand() const { return cpu_brand_; } #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) enum class CoreType { kUnknown = 0, kOther, diff --git a/www/iridium/files/patch-base_i18n_icu__util.cc b/www/iridium/files/patch-base_i18n_icu__util.cc index ca38b330732a..de9d5f533054 100644 --- a/www/iridium/files/patch-base_i18n_icu__util.cc +++ b/www/iridium/files/patch-base_i18n_icu__util.cc @@ -1,20 +1,20 @@ ---- base/i18n/icu_util.cc.orig 2022-12-01 10:35:46 UTC +--- base/i18n/icu_util.cc.orig 2022-12-06 08:09:13 UTC +++ base/i18n/icu_util.cc -@@ -53,7 +53,7 @@ +@@ -52,7 +52,7 @@ #include "third_party/icu/source/common/unicode/unistr.h" #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) #include "third_party/icu/source/i18n/unicode/timezone.h" #endif -@@ -344,7 +344,7 @@ void InitializeIcuTimeZone() { +@@ -343,7 +343,7 @@ void InitializeIcuTimeZone() { FuchsiaIntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization(); icu::TimeZone::adoptDefault( icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id))); -#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) +#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD) // To respond to the time zone change properly, the default time zone // cache in ICU has to be populated on starting up. // See TimeZoneMonitorLinux::NotifyClientsFromImpl(). diff --git a/www/iridium/files/patch-base_memory_discardable__memory.cc b/www/iridium/files/patch-base_memory_discardable__memory.cc index 6a302b8004a6..705a31d8a772 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-10-05 07:34:01 UTC +--- base/memory/discardable_memory.cc.orig 2022-12-06 08:09:13 UTC +++ base/memory/discardable_memory.cc -@@ -25,7 +25,7 @@ const base::Feature kMadvFreeDiscardableMemory{ - "MadvFreeDiscardableMemory", base::FEATURE_DISABLED_BY_DEFAULT}; +@@ -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) - const base::Feature kDiscardableMemoryBackingTrial{ - "DiscardableMemoryBackingTrial", base::FEATURE_DISABLED_BY_DEFAULT}; - -@@ -50,7 +50,7 @@ const base::FeatureParam + BASE_FEATURE(kDiscardableMemoryBackingTrial, + "DiscardableMemoryBackingTrial", + base::FEATURE_DISABLED_BY_DEFAULT); +@@ -52,7 +52,7 @@ const base::FeatureParam 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 = -@@ -69,7 +69,7 @@ DiscardableMemoryBacking GetBackingForFieldTrial() { +@@ -71,7 +71,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. -@@ -99,7 +99,7 @@ DiscardableMemory::DiscardableMemory() = default; +@@ -101,7 +101,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_process_process__metrics.h b/www/iridium/files/patch-base_process_process__metrics.h index e94ede6b9ee6..3afa15a7a9fb 100644 --- a/www/iridium/files/patch-base_process_process__metrics.h +++ b/www/iridium/files/patch-base_process_process__metrics.h @@ -1,129 +1,129 @@ ---- base/process/process_metrics.h.orig 2022-12-01 10:35:46 UTC +--- base/process/process_metrics.h.orig 2022-12-06 08:09:13 UTC +++ base/process/process_metrics.h @@ -36,7 +36,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) #include #include #include @@ -52,7 +52,7 @@ class Value; // Full declaration is in process_metrics_iocounters.h. struct IoCounters; -#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. // @@ -107,7 +107,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; @@ -165,7 +165,7 @@ class BASE_EXPORT ProcessMetrics { #endif // BUILDFLAG(IS_WIN) #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 @@ -248,7 +248,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; @@ -269,7 +269,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) @@ -280,7 +280,7 @@ class BASE_EXPORT ProcessMetrics { #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) CPU::CoreType GetCoreType(uint32_t core_index); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) @@ -294,9 +294,7 @@ 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_WIN) TimeTicks last_cpu_time_for_precise_cpu_usage_; @@ -304,7 +302,7 @@ class BASE_EXPORT ProcessMetrics { #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_; @@ -347,7 +345,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. // @@ -382,7 +380,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 @@ -397,7 +395,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; @@ -434,7 +432,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. -@@ -621,7 +619,7 @@ class BASE_EXPORT SystemMetrics { +@@ -622,7 +620,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_rand__util.h b/www/iridium/files/patch-base_rand__util.h index 7e9392dfa146..d353d8ebf91e 100644 --- a/www/iridium/files/patch-base_rand__util.h +++ b/www/iridium/files/patch-base_rand__util.h @@ -1,11 +1,11 @@ ---- base/rand_util.h.orig 2022-12-01 10:35:46 UTC +--- base/rand_util.h.orig 2022-12-06 08:09:13 UTC +++ base/rand_util.h -@@ -89,7 +89,7 @@ void RandomShuffle(Itr first, Itr last) { +@@ -117,7 +117,7 @@ void RandomShuffle(Itr first, Itr last) { std::shuffle(first, last, RandomBitGenerator()); } -#if BUILDFLAG(IS_POSIX) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_BSD) BASE_EXPORT int GetUrandomFD(); #endif diff --git a/www/iridium/files/patch-base_rand__util__posix.cc b/www/iridium/files/patch-base_rand__util__posix.cc index 898bd98ace02..c18905a1867b 100644 --- a/www/iridium/files/patch-base_rand__util__posix.cc +++ b/www/iridium/files/patch-base_rand__util__posix.cc @@ -1,57 +1,62 @@ ---- base/rand_util_posix.cc.orig 2022-12-01 10:35:46 UTC +--- base/rand_util_posix.cc.orig 2022-12-06 08:09:13 UTC +++ base/rand_util_posix.cc @@ -22,7 +22,7 @@ #include "base/time/time.h" #include "build/build_config.h" -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) #include "third_party/lss/linux_syscall_support.h" #elif BUILDFLAG(IS_MAC) // TODO(crbug.com/995996): Waiting for this header to appear in the iOS SDK. @@ -46,6 +46,7 @@ static constexpr int kOpenFlags = O_RDONLY; static constexpr int kOpenFlags = O_RDONLY | O_CLOEXEC; #endif +#if !BUILDFLAG(IS_BSD) // We keep the file descriptor for /dev/urandom around so we don't need to // reopen it (which is expensive), and since we may not even be able to reopen // it if we are later put in a sandbox. This class wraps the file descriptor so @@ -63,10 +64,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 -@@ -172,6 +174,7 @@ bool UseBoringSSLForRandBytes() { - } // namespace internal +@@ -176,6 +178,7 @@ bool UseBoringSSLForRandBytes() { + namespace { - void RandBytes(void* output, size_t output_length) { + void RandBytes(void* output, size_t output_length, bool avoid_allocation) { +#if !BUILDFLAG(IS_BSD) #if !BUILDFLAG(IS_NACL) // The BoringSSL experiment takes priority over everything else. - if (internal::UseBoringSSLForRandBytes()) { -@@ -210,11 +213,16 @@ void RandBytes(void* output, size_t output_length) { + if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) { +@@ -214,6 +217,9 @@ void RandBytes(void* output, size_t output_length, boo const bool success = ReadFromFD(urandom_fd, static_cast(output), output_length); CHECK(success); +#else + arc4random_buf(static_cast(output), output_length); +#endif } + } // namespace +@@ -233,9 +239,11 @@ void RandBytes(void* output, size_t output_length) { + RandBytes(output, output_length, /*avoid_allocation=*/false); + } + +#if !BUILDFLAG(IS_BSD) int GetUrandomFD() { static NoDestructor urandom_fd; return urandom_fd->fd(); } +#endif } // namespace base diff --git a/www/iridium/files/patch-base_strings_safe__sprintf__unittest.cc b/www/iridium/files/patch-base_strings_safe__sprintf__unittest.cc index c3eb254f5229..907acfbebc5b 100644 --- a/www/iridium/files/patch-base_strings_safe__sprintf__unittest.cc +++ b/www/iridium/files/patch-base_strings_safe__sprintf__unittest.cc @@ -1,18 +1,18 @@ ---- base/strings/safe_sprintf_unittest.cc.orig 2022-10-05 07:34:01 UTC +--- base/strings/safe_sprintf_unittest.cc.orig 2022-12-06 08:09:13 UTC +++ base/strings/safe_sprintf_unittest.cc -@@ -732,6 +732,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) { +@@ -740,6 +740,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) { #endif } +#if !BUILDFLAG(IS_BSD) TEST(SafeSPrintfTest, EmitNULL) { char buf[40]; #if defined(__GNUC__) -@@ -748,6 +749,7 @@ TEST(SafeSPrintfTest, EmitNULL) { +@@ -756,6 +757,7 @@ TEST(SafeSPrintfTest, EmitNULL) { #pragma GCC diagnostic pop #endif } +#endif TEST(SafeSPrintfTest, PointerSize) { // The internal data representation is a 64bit value, independent of the diff --git a/www/iridium/files/patch-base_system_sys__info.h b/www/iridium/files/patch-base_system_sys__info.h index bd0fd5af06cf..c3b7deac2789 100644 --- a/www/iridium/files/patch-base_system_sys__info.h +++ b/www/iridium/files/patch-base_system_sys__info.h @@ -1,20 +1,20 @@ ---- base/system/sys_info.h.orig 2022-10-05 07:34:01 UTC +--- base/system/sys_info.h.orig 2022-12-06 08:09:13 UTC +++ base/system/sys_info.h -@@ -211,6 +211,8 @@ class BASE_EXPORT SysInfo { - // On Desktop this returns true when memory <= 2GB. - static bool IsLowEndDevice(); +@@ -233,6 +233,8 @@ class BASE_EXPORT SysInfo { + static void SetIsCpuSecurityMitigationsEnabled(bool is_enabled); + #endif + static uint64_t MaxSharedMemorySize(); + private: FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory); FRIEND_TEST_ALL_PREFIXES(debug::SystemMetricsTest, ParseMeminfo); -@@ -221,7 +223,7 @@ class BASE_EXPORT SysInfo { +@@ -243,7 +245,7 @@ class BASE_EXPORT SysInfo { static HardwareInfo GetHardwareInfoSync(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) static uint64_t AmountOfAvailablePhysicalMemory( const SystemMemoryInfoKB& meminfo); #endif diff --git a/www/iridium/files/patch-base_system_sys__info__posix.cc b/www/iridium/files/patch-base_system_sys__info__posix.cc index 71fd898b27bb..a3ec2d7b5903 100644 --- a/www/iridium/files/patch-base_system_sys__info__posix.cc +++ b/www/iridium/files/patch-base_system_sys__info__posix.cc @@ -1,43 +1,33 @@ ---- base/system/sys_info_posix.cc.orig 2022-10-05 07:34:01 UTC +--- base/system/sys_info_posix.cc.orig 2022-12-06 08:09:13 UTC +++ base/system/sys_info_posix.cc -@@ -37,7 +37,7 @@ +@@ -182,12 +182,12 @@ absl::optional NumberOfPhysicalProcessors() { - namespace { - --#if !BUILDFLAG(IS_OPENBSD) -+#if !BUILDFLAG(IS_BSD) - int NumberOfProcessors() { - // sysconf returns the number of "logical" (not "physical") processors on both - // Mac and Linux. So we get the number of max available "logical" processors. -@@ -77,7 +77,7 @@ int NumberOfProcessors() { - - base::LazyInstance>:: - Leaky g_lazy_number_of_processors = LAZY_INSTANCE_INITIALIZER; --#endif // !BUILDFLAG(IS_OPENBSD) -+#endif // !BUILDFLAG(IS_BSD) - - uint64_t AmountOfVirtualMemory() { - struct rlimit limit; -@@ -144,11 +144,11 @@ bool GetDiskSpaceInfo(const base::FilePath& path, - - namespace base { + } // namespace internal -#if !BUILDFLAG(IS_OPENBSD) +#if !BUILDFLAG(IS_BSD) int SysInfo::NumberOfProcessors() { - return g_lazy_number_of_processors.Get().value(); + static int number_of_processors = internal::NumberOfProcessors(); + return number_of_processors; } -#endif // !BUILDFLAG(IS_OPENBSD) +#endif // !BUILDFLAG(IS_BSD) // static uint64_t SysInfo::AmountOfVirtualMemory() { -@@ -238,6 +238,8 @@ std::string SysInfo::OperatingSystemArchitecture() { +@@ -277,6 +277,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"; } +@@ -300,4 +302,4 @@ void SysInfo::SetIsCpuSecurityMitigationsEnabled(bool + + #endif // BUILDFLAG(IS_MAC) + +-} // namespace base +\ No newline at end of file ++} // namespace base diff --git a/www/iridium/files/patch-base_system_sys__info__unittest.cc b/www/iridium/files/patch-base_system_sys__info__unittest.cc index 04c9153a61aa..4ee50c0cbaa9 100644 --- a/www/iridium/files/patch-base_system_sys__info__unittest.cc +++ b/www/iridium/files/patch-base_system_sys__info__unittest.cc @@ -1,20 +1,20 @@ ---- base/system/sys_info_unittest.cc.orig 2022-10-05 07:34:01 UTC +--- base/system/sys_info_unittest.cc.orig 2022-12-06 08:09:13 UTC +++ base/system/sys_info_unittest.cc -@@ -234,12 +234,16 @@ TEST_F(SysInfoTest, GetHardwareInfo) { +@@ -255,12 +255,16 @@ TEST_F(SysInfoTest, GetHardwareInfo) { EXPECT_TRUE(IsStringUTF8(hardware_info->model)); bool empty_result_expected = #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) false; #else true; #endif EXPECT_EQ(hardware_info->manufacturer.empty(), empty_result_expected); +#if BUILDFLAG(IS_BSD) + empty_result_expected = true; +#endif EXPECT_EQ(hardware_info->model.empty(), empty_result_expected); } diff --git a/www/iridium/files/patch-base_threading_platform__thread__linux.cc b/www/iridium/files/patch-base_threading_platform__thread__linux.cc index cda41bdd934d..644c4786480e 100644 --- a/www/iridium/files/patch-base_threading_platform__thread__linux.cc +++ b/www/iridium/files/patch-base_threading_platform__thread__linux.cc @@ -1,77 +1,77 @@ ---- base/threading/platform_thread_linux.cc.orig 2022-10-05 07:34:01 UTC +--- base/threading/platform_thread_linux.cc.orig 2022-12-06 08:09:13 UTC +++ base/threading/platform_thread_linux.cc @@ -29,7 +29,9 @@ #if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) #include +#if !BUILDFLAG(IS_BSD) #include +#endif #include #include #include -@@ -132,7 +134,7 @@ long sched_setattr(pid_t pid, +@@ -134,7 +136,7 @@ long sched_setattr(pid_t pid, #endif // !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) #endif // BUILDFLAG(IS_CHROMEOS) -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) const FilePath::CharType kCgroupDirectory[] = FILE_PATH_LITERAL("/sys/fs/cgroup"); -@@ -304,7 +306,7 @@ void SetThreadCgroupsForThreadType(PlatformThreadId th +@@ -306,7 +308,7 @@ void SetThreadCgroupsForThreadType(PlatformThreadId th namespace internal { namespace { -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) const struct sched_param kRealTimePrio = {8}; #endif } // namespace -@@ -330,7 +332,7 @@ const ThreadTypeToNiceValuePair kThreadTypeToNiceValue +@@ -332,7 +334,7 @@ const ThreadTypeToNiceValuePair kThreadTypeToNiceValue }; bool CanSetThreadTypeToRealtimeAudio() { -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) // A non-zero soft-limit on RLIMIT_RTPRIO is required to be allowed to invoke // pthread_setschedparam in SetCurrentThreadTypeForPlatform(). struct rlimit rlim; -@@ -342,7 +344,7 @@ bool CanSetThreadTypeToRealtimeAudio() { +@@ -344,7 +346,7 @@ bool CanSetThreadTypeToRealtimeAudio() { bool SetCurrentThreadTypeForPlatform(ThreadType thread_type, MessagePumpType pump_type_hint) { -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) // For legacy schedtune interface SetThreadCgroupsForThreadType(PlatformThread::CurrentId(), thread_type); -@@ -361,7 +363,7 @@ bool SetCurrentThreadTypeForPlatform(ThreadType thread +@@ -363,7 +365,7 @@ bool SetCurrentThreadTypeForPlatform(ThreadType thread absl::optional GetCurrentThreadPriorityForPlatformForTest() { -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) int maybe_sched_rr = 0; struct sched_param maybe_realtime_prio = {0}; if (pthread_getschedparam(pthread_self(), &maybe_sched_rr, -@@ -380,7 +382,7 @@ GetCurrentThreadPriorityForPlatformForTest() { +@@ -382,7 +384,7 @@ GetCurrentThreadPriorityForPlatformForTest() { void PlatformThread::SetName(const std::string& name) { ThreadIdNameManager::GetInstance()->SetName(name); -#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) && !BUILDFLAG(IS_BSD) // On linux we can get the thread names to show up in the debugger by setting // the process name for the LWP. We don't want to do this for the main // thread because that would rename the process, causing tools like killall -@@ -410,8 +412,10 @@ void PlatformThread::SetThreadType(ProcessId process_i +@@ -412,8 +414,10 @@ void PlatformThread::SetThreadType(ProcessId process_i // priority. CHECK_NE(thread_id, process_id); +#if !BUILDFLAG(IS_BSD) // For legacy schedtune interface SetThreadCgroupsForThreadType(thread_id, thread_type); +#endif #if BUILDFLAG(IS_CHROMEOS) // For upstream uclamp interface. We try both legacy (schedtune, as done diff --git a/www/iridium/files/patch-base_threading_platform__thread__posix.cc b/www/iridium/files/patch-base_threading_platform__thread__posix.cc index bde1550ac046..7c0212726a98 100644 --- a/www/iridium/files/patch-base_threading_platform__thread__posix.cc +++ b/www/iridium/files/patch-base_threading_platform__thread__posix.cc @@ -1,21 +1,21 @@ ---- base/threading/platform_thread_posix.cc.orig 2022-12-01 10:35:46 UTC +--- base/threading/platform_thread_posix.cc.orig 2022-12-06 08:09:13 UTC +++ base/threading/platform_thread_posix.cc -@@ -77,7 +77,7 @@ void* ThreadFunc(void* params) { +@@ -78,7 +78,7 @@ void* ThreadFunc(void* params) { if (!thread_params->joinable) base::DisallowSingleton(); -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(STARSCAN) partition_alloc::internal::PCScan::NotifyThreadCreated( partition_alloc::internal::GetStackPointer()); -@@ -374,6 +374,9 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, +@@ -380,6 +380,9 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, MessagePumpType pump_type_hint) { #if BUILDFLAG(IS_NACL) NOTIMPLEMENTED(); +// avoid pledge(2) violation +#elif BUILDFLAG(IS_BSD) + NOTIMPLEMENTED(); #else if (internal::SetCurrentThreadTypeForPlatform(thread_type, pump_type_hint)) return; diff --git a/www/iridium/files/patch-build_config_compiler_BUILD.gn b/www/iridium/files/patch-build_config_compiler_BUILD.gn index afaa15c08f14..c29bd80d919b 100644 --- a/www/iridium/files/patch-build_config_compiler_BUILD.gn +++ b/www/iridium/files/patch-build_config_compiler_BUILD.gn @@ -1,213 +1,213 @@ ---- build/config/compiler/BUILD.gn.orig 2022-12-01 10:35:46 UTC +--- build/config/compiler/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ build/config/compiler/BUILD.gn -@@ -222,13 +222,16 @@ config("default_include_dirs") { +@@ -219,13 +219,16 @@ config("default_include_dirs") { # Compiler instrumentation can introduce dependencies in DSOs to symbols in # the executable they are loaded into, so they are unresolved at link-time. config("no_unresolved_symbols") { - if (!using_sanitizer && + if (!using_sanitizer && !is_bsd && (is_linux || is_chromeos || is_android || is_fuchsia)) { ldflags = [ "-Wl,-z,defs", "-Wl,--as-needed", ] } + if (current_cpu == "x86" && is_openbsd) { + ldflags = [ "-Wl,-z,notext" ] + } } # compiler --------------------------------------------------------------------- -@@ -274,7 +277,9 @@ config("compiler") { +@@ -271,7 +274,9 @@ config("compiler") { configs += [ # See the definitions below. + ":clang_revision", ":rustc_revision", + ":compiler_cpu_abi", ":compiler_codegen", ":compiler_deterministic", ] -@@ -450,6 +455,10 @@ config("compiler") { +@@ -447,6 +452,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_gold) { -@@ -879,7 +888,7 @@ config("compiler_cpu_abi") { +@@ -890,7 +899,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" ] -@@ -894,7 +903,7 @@ config("compiler_cpu_abi") { +@@ -905,7 +914,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" ] -@@ -1233,6 +1242,27 @@ config("compiler_deterministic") { +@@ -1254,6 +1263,27 @@ config("compiler_deterministic") { } } +config("clang_revision") { + if (is_clang && !is_bsd && clang_base_path == default_clang_base_path) { + update_args = [ + "--print-revision", + "--verify-version=$clang_version", + ] + if (llvm_force_head_revision) { + update_args += [ "--llvm-force-head-revision" ] + } + clang_revision = exec_script("//tools/clang/scripts/update.py", + update_args, + "trim string") + + # This is here so that all files get recompiled after a clang roll and + # when turning clang on or off. (defines are passed via the command line, + # and build system rebuild things when their commandline changes). Nothing + # should ever read this define. + defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ] + } +} + config("rustc_revision") { if (enable_rust && defined(rustc_version)) { # Similar to the above config, this is here so that all files get -@@ -1450,7 +1480,7 @@ config("default_warnings") { +@@ -1475,7 +1505,7 @@ config("default_warnings") { "-Wno-ignored-pragma-optimize", ] - if (!is_nacl) { + if (!is_nacl && !is_bsd) { cflags += [ # TODO(crbug.com/1343975) Evaluate and possibly enable. "-Wno-deprecated-builtins", -@@ -1619,7 +1649,7 @@ config("no_chromium_code") { +@@ -1640,7 +1670,7 @@ config("no_chromium_code") { # third-party libraries. "-Wno-c++11-narrowing", ] - if (!is_nacl) { + if (!is_nacl && !is_freebsd) { cflags += [ # Disabled for similar reasons as -Wunused-variable. "-Wno-unused-but-set-variable", -@@ -1931,8 +1961,7 @@ config("default_stack_frames") { +@@ -1952,8 +1982,7 @@ config("default_stack_frames") { } # Default "optimization on" config. -config("optimize") { } -config("xoptimize") { +config("optimize") { if (is_win) { if (chrome_pgo_phase != 2) { # Favor size over speed, /O1 must be before the common flags. -@@ -1977,8 +2006,7 @@ config("xoptimize") { +@@ -1998,8 +2027,7 @@ config("xoptimize") { } # Turn off optimizations. -config("no_optimize") { } -config("xno_optimize") { +config("no_optimize") { if (is_win) { cflags = [ "/Od", # Disable optimization. -@@ -2018,8 +2046,7 @@ config("xno_optimize") { +@@ -2039,8 +2067,7 @@ config("xno_optimize") { # Turns up the optimization level. On Windows, this implies whole program # optimization and link-time code generation which is very expensive and should # be used sparingly. -config("optimize_max") { } -config("xoptimize_max") { +config("optimize_max") { if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: -@@ -2052,8 +2079,7 @@ config("xoptimize_max") { +@@ -2073,8 +2100,7 @@ config("xoptimize_max") { # # TODO(crbug.com/621335) - rework how all of these configs are related # so that we don't need this disclaimer. -config("optimize_speed") { } -config("xoptimize_speed") { +config("optimize_speed") { if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: -@@ -2079,8 +2105,7 @@ config("xoptimize_speed") { +@@ -2100,8 +2126,7 @@ config("xoptimize_speed") { } } -config("optimize_fuzzing") { } -config("xoptimize_fuzzing") { +config("optimize_fuzzing") { cflags = [ "-O1" ] + common_optimize_on_cflags rustflags = [ "-Copt-level=1" ] ldflags = common_optimize_on_ldflags -@@ -2146,7 +2171,7 @@ config("afdo_optimize_size") { +@@ -2167,7 +2192,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. -@@ -2162,7 +2187,7 @@ config("afdo") { +@@ -2183,7 +2208,7 @@ config("afdo") { cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ] 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 ] } -@@ -2200,8 +2225,7 @@ config("win_pdbaltpath") { +@@ -2221,8 +2246,7 @@ config("win_pdbaltpath") { } # Full symbols. -config("symbols") { } -config("xsymbols") { +config("symbols") { if (is_win) { if (is_clang) { cflags = [ "/Z7" ] # Debug information in the .obj files. -@@ -2311,7 +2335,8 @@ config("xsymbols") { +@@ -2333,7 +2357,8 @@ config("xsymbols") { configs += [ "//build/config:compress_debug_sections" ] } - if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") { + if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos" && + !is_bsd) { if (is_apple) { # TODO(https://crbug.com/1050118): Investigate missing debug info on mac. # Make sure we don't use constructor homing on mac. -@@ -2334,8 +2359,7 @@ config("xsymbols") { +@@ -2356,8 +2381,7 @@ config("xsymbols") { # Minimal symbols. # This config guarantees to hold symbol for stack trace which are shown to user # when crash happens in unittests running on buildbot. -config("minimal_symbols") { } -config("xminimal_symbols") { +config("minimal_symbols") { if (is_win) { # Functions, files, and line tables only. cflags = [] -@@ -2407,8 +2431,7 @@ config("xminimal_symbols") { +@@ -2429,8 +2453,7 @@ config("xminimal_symbols") { # This configuration contains function names only. That is, the compiler is # told to not generate debug information and the linker then just puts function # names in the final debug information. -config("no_symbols") { } -config("xno_symbols") { +config("no_symbols") { if (is_win) { ldflags = [ "/DEBUG" ] diff --git a/www/iridium/files/patch-cc_BUILD.gn b/www/iridium/files/patch-cc_BUILD.gn index 95d8ceed4fda..ea223d4df9d0 100644 --- a/www/iridium/files/patch-cc_BUILD.gn +++ b/www/iridium/files/patch-cc_BUILD.gn @@ -1,19 +1,19 @@ ---- cc/BUILD.gn.orig 2022-12-01 10:35:46 UTC +--- cc/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ cc/BUILD.gn -@@ -664,7 +664,7 @@ cc_test_static_library("test_support") { +@@ -666,7 +666,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" ] } } -@@ -892,7 +892,6 @@ cc_test("cc_unittests") { +@@ -894,7 +894,6 @@ cc_test("cc_unittests") { data = [ "//components/viz/test/data/" ] 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-chrome_app_chrome__main__delegate.cc b/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc index 28d27f0ac8dc..389a15cd1667 100644 --- a/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc +++ b/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc @@ -1,121 +1,121 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/app/chrome_main_delegate.cc -@@ -128,7 +128,7 @@ +@@ -135,7 +135,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 -@@ -171,16 +171,16 @@ +@@ -179,16 +179,16 @@ #include "v8/include/v8.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/environment.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "base/message_loop/message_pump_libevent.h" #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/policy_path_parser.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -336,7 +336,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -344,7 +344,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 -@@ -422,7 +422,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -429,7 +429,7 @@ bool HandleVersionSwitches(const base::CommandLine& co // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Show the man page if --help or -h is on the command line. void HandleHelpSwitches(const base::CommandLine& command_line) { if (command_line.HasSwitch(switches::kHelp) || -@@ -513,7 +513,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -518,7 +518,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. -@@ -596,7 +596,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat +@@ -601,7 +601,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Record the startup process creation time on supported platforms. On Android // this is recorded in ChromeMainDelegateAndroid. startup_metric_utils::RecordStartupProcessCreationTime( -@@ -832,6 +832,8 @@ void ChromeMainDelegate::CommonEarlyInitialization() { - // not always enabled on Linux/ChromeOS. - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -848,6 +848,8 @@ void ChromeMainDelegate::CommonEarlyInitialization() { + // not always enabled on ChromeOS. + #if BUILDFLAG(IS_CHROMEOS) bool enable_gwp_asan = crash_reporter::IsCrashpadEnabled(); +#elif BUILDFLAG(IS_BSD) + bool enable_gwp_asan = false; #else bool enable_gwp_asan = true; #endif -@@ -892,7 +894,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { +@@ -908,7 +910,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { base::internal::TimerBase::InitializeFeatures(); base::InitializeCpuReductionExperiment(); base::sequence_manager::internal::SequenceManagerImpl::InitializeFeatures(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::MessagePumpLibevent::InitializeFeatures(); #elif BUILDFLAG(IS_MAC) - base::PlatformThread::InitializeOptimizedRealtimeThreadingFeature(); -@@ -982,7 +984,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo + base::PlatformThread::InitFeaturesPostFieldTrial(); +@@ -1017,7 +1019,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo // TODO(crbug.com/1052397): Revisit the macro expression once build flag // switch of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // This will directly exit if the user asked for help. HandleHelpSwitches(command_line); #endif -@@ -1012,7 +1014,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1047,7 +1049,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo #if BUILDFLAG(IS_CHROMEOS) chromeos::dbus_paths::RegisterPathProvider(); #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) nacl::RegisterPathProvider(); #endif -@@ -1402,7 +1404,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1437,7 +1439,7 @@ void ChromeMainDelegate::PreSandboxStartup() { CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; } -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess) { if (command_line.HasSwitch(switches::kPreCrashpadCrashTest)) { -@@ -1478,7 +1480,7 @@ absl::variant Chrome +@@ -1517,7 +1519,7 @@ absl::variant Chrome // This entry is not needed on Linux, where the NaCl loader // process is launched via nacl_helper instead. -#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) {switches::kNaClLoaderProcess, NaClMain}, #else {"", nullptr}, // To avoid constant array of size 0 diff --git a/www/iridium/files/patch-chrome_app_chromium__strings.grd b/www/iridium/files/patch-chrome_app_chromium__strings.grd index b090c666b5f9..7743aa635a41 100644 --- a/www/iridium/files/patch-chrome_app_chromium__strings.grd +++ b/www/iridium/files/patch-chrome_app_chromium__strings.grd @@ -1,20 +1,20 @@ ---- chrome/app/chromium_strings.grd.orig 2022-10-05 07:34:01 UTC +--- chrome/app/chromium_strings.grd.orig 2022-12-06 08:09:13 UTC +++ chrome/app/chromium_strings.grd @@ -296,7 +296,7 @@ If you update this file, be sure also to update google Welcome to Iridium; new browser window opened - + Welcome to Iridium -@@ -410,7 +410,7 @@ If you update this file, be sure also to update google - The browser may not function correctly because it is no longer supported on Windows XP or Windows Vista +@@ -425,7 +425,7 @@ If you update this file, be sure also to update google + To get future Chromium updates, you'll need Windows 10 or later. This computer is using Windows 8.1. - + The browser may not function correctly because it is no longer supported on this Linux distribution diff --git a/www/iridium/files/patch-chrome_app_generated__resources.grd b/www/iridium/files/patch-chrome_app_generated__resources.grd index 59967b08e089..532bc1c91b8e 100644 --- a/www/iridium/files/patch-chrome_app_generated__resources.grd +++ b/www/iridium/files/patch-chrome_app_generated__resources.grd @@ -1,74 +1,74 @@ ---- chrome/app/generated_resources.grd.orig 2022-12-01 10:35:46 UTC +--- chrome/app/generated_resources.grd.orig 2022-12-06 08:09:13 UTC +++ chrome/app/generated_resources.grd @@ -2,7 +2,7 @@ -@@ -3081,7 +3081,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -3090,7 +3090,7 @@ are declared in tools/grit/grit_rule.gni. - + Device Credentials -@@ -4811,7 +4811,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -4820,7 +4820,7 @@ are declared in tools/grit/grit_rule.gni. Read information about your browser, OS, device, installed software, registry values and files - + Read information about your browser, OS, device, installed software and files -@@ -5469,7 +5469,7 @@ Keep your key file in a safe place. You will need it t +@@ -5487,7 +5487,7 @@ Keep your key file in a safe place. You will need it t Old versions of Chrome Apps won't open on Windows devices after December 2022. Contact your administrator to update to a new version or remove this app. - + Old versions of Chrome Apps won't open on Linux devices after December 2022. Contact your administrator to update to a new version or remove this app. -@@ -5497,7 +5497,7 @@ Keep your key file in a safe place. You will need it t +@@ -5515,7 +5515,7 @@ Keep your key file in a safe place. You will need it t Old versions of Chrome apps won't open on Windows devices after December 2022. You can check if there's a new version available. - + Old versions of Chrome apps won't open on Linux devices after December 2022. You can check if there's a new version available. -@@ -8984,7 +8984,7 @@ Check your passwords anytime in - + Use system title bar and borders -@@ -10195,7 +10195,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -10404,7 +10404,7 @@ Please help our engineers fix this problem. Tell us wh Set as default - + Minimize -@@ -12285,7 +12285,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -12500,7 +12500,7 @@ Please help our engineers fix this problem. Tell us wh Open Anyway - + System Signals Utilities diff --git a/www/iridium/files/patch-chrome_app_google__chrome__strings.grd b/www/iridium/files/patch-chrome_app_google__chrome__strings.grd index 3895d1d1e29e..90c6310ead37 100644 --- a/www/iridium/files/patch-chrome_app_google__chrome__strings.grd +++ b/www/iridium/files/patch-chrome_app_google__chrome__strings.grd @@ -1,20 +1,20 @@ ---- chrome/app/google_chrome_strings.grd.orig 2022-10-05 07:34:01 UTC +--- chrome/app/google_chrome_strings.grd.orig 2022-12-06 08:09:13 UTC +++ chrome/app/google_chrome_strings.grd @@ -301,7 +301,7 @@ chromium_strings.grd. --> Welcome to Chrome; new browser window opened - + Welcome to Google Chrome -@@ -438,7 +438,7 @@ chromium_strings.grd. --> - This computer will no longer receive Google Chrome updates because Windows XP and Windows Vista are no longer supported +@@ -453,7 +453,7 @@ chromium_strings.grd. --> + To get future Google Chrome updates, you'll need Windows 10 or later. This computer is using Windows 8.1. - + Google Chrome may not function correctly because it is no longer supported on this Linux distribution diff --git a/www/iridium/files/patch-chrome_app_settings__strings.grdp b/www/iridium/files/patch-chrome_app_settings__strings.grdp index f8ba3c909ba7..4003d891af74 100644 --- a/www/iridium/files/patch-chrome_app_settings__strings.grdp +++ b/www/iridium/files/patch-chrome_app_settings__strings.grdp @@ -1,20 +1,20 @@ ---- chrome/app/settings_strings.grdp.orig 2022-12-01 10:35:46 UTC +--- chrome/app/settings_strings.grdp.orig 2022-12-06 08:09:13 UTC +++ chrome/app/settings_strings.grdp -@@ -137,7 +137,7 @@ +@@ -142,7 +142,7 @@ Theme - + GTK -@@ -157,7 +157,7 @@ +@@ -162,7 +162,7 @@ Use Classic - + Reset to default diff --git a/www/iridium/files/patch-chrome_app_theme_theme__resources.grd b/www/iridium/files/patch-chrome_app_theme_theme__resources.grd index 6b17ac5d3d4a..2210648ae6c1 100644 --- a/www/iridium/files/patch-chrome_app_theme_theme__resources.grd +++ b/www/iridium/files/patch-chrome_app_theme_theme__resources.grd @@ -1,47 +1,47 @@ ---- chrome/app/theme/theme_resources.grd.orig 2022-12-01 10:35:46 UTC +--- chrome/app/theme/theme_resources.grd.orig 2022-12-06 08:09:13 UTC +++ chrome/app/theme/theme_resources.grd -@@ -131,7 +131,7 @@ +@@ -135,7 +135,7 @@ - + -@@ -148,7 +148,7 @@ +@@ -152,7 +152,7 @@ - + -@@ -172,7 +172,7 @@ +@@ -176,7 +176,7 @@ - + -@@ -182,7 +182,7 @@ +@@ -186,7 +186,7 @@ - + -@@ -191,7 +191,7 @@ +@@ -195,7 +195,7 @@ - + diff --git a/www/iridium/files/patch-chrome_browser_about__flags.cc b/www/iridium/files/patch-chrome_browser_about__flags.cc index 8cd6a3c3438e..5f80058f2794 100644 --- a/www/iridium/files/patch-chrome_browser_about__flags.cc +++ b/www/iridium/files/patch-chrome_browser_about__flags.cc @@ -1,128 +1,128 @@ ---- chrome/browser/about_flags.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/about_flags.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/about_flags.cc -@@ -214,7 +214,7 @@ +@@ -215,7 +215,7 @@ #include "ui/native_theme/native_theme_features.h" #include "ui/ui_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 -@@ -289,7 +289,7 @@ +@@ -291,7 +291,7 @@ #include "chrome/browser/supervised_user/supervised_user_features/supervised_user_features.h" // nogncheck #endif // ENABLE_SUPERVISED_USERS -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "ui/ozone/buildflags.h" #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -@@ -394,7 +394,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap +@@ -398,7 +398,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, -@@ -1254,7 +1254,7 @@ const FeatureEntry::FeatureVariation +@@ -1322,7 +1322,7 @@ const FeatureEntry::FeatureVariation }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kOmniboxDocumentProviderServerScoring[] = { {"DocumentUseServerScore", "true"}, {"DocumentUseClientScore", "false"}, -@@ -4072,7 +4072,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4182,7 +4182,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(base::kOneGroupPerRenderer)}, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { "enable-accelerated-video-decode", flag_descriptions::kAcceleratedVideoDecodeName, -@@ -4660,7 +4660,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4784,7 +4784,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) {"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName, flag_descriptions::kOzonePlatformHintDescription, kOsLinux, MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, -@@ -4679,7 +4679,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4803,7 +4803,7 @@ const FeatureEntry kFeatureEntries[] = { password_manager::features::kForceInitialSyncWhenDecryptionFails)}, #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, -@@ -4939,7 +4939,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5063,7 +5063,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(feed::kDiscoFeedEndpoint)}, #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"following-feed-sidepanel", flag_descriptions::kFollowingFeedSidepanelName, flag_descriptions::kFollowingFeedSidepanelDescription, kOsDesktop, FEATURE_VALUE_TYPE(feed::kWebUiFeed)}, -@@ -5480,7 +5480,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5633,7 +5633,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"omnibox-experimental-keyword-mode", flag_descriptions::kOmniboxExperimentalKeywordModeName, flag_descriptions::kOmniboxExperimentalKeywordModeDescription, kOsDesktop, -@@ -6018,7 +6018,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6213,7 +6213,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kPointerLockOptionsDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kPointerLockOptions)}, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"enable-async-dns", flag_descriptions::kAsyncDnsName, flag_descriptions::kAsyncDnsDescription, kOsWin | kOsLinux, FEATURE_VALUE_TYPE(features::kAsyncDns)}, -@@ -6962,7 +6962,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7186,7 +7186,7 @@ const FeatureEntry kFeatureEntries[] = { #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"global-media-controls-modern-ui", flag_descriptions::kGlobalMediaControlsModernUIName, flag_descriptions::kGlobalMediaControlsModernUIDescription, -@@ -7832,7 +7832,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8059,7 +8059,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"quick-commands", flag_descriptions::kQuickCommandsName, flag_descriptions::kQuickCommandsDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kQuickCommands)}, -@@ -8147,7 +8147,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8350,7 +8350,7 @@ const FeatureEntry kFeatureEntries[] = { #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { "ui-debug-tools", flag_descriptions::kUIDebugToolsName, -@@ -8756,7 +8756,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8968,7 +8968,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) {"document-picture-in-picture-api", flag_descriptions::kDocumentPictureInPictureApiName, flag_descriptions::kDocumentPictureInPictureApiDescription, diff --git a/www/iridium/files/patch-chrome_browser_browser__features.cc b/www/iridium/files/patch-chrome_browser_browser__features.cc index 9f627c06d171..2996f717e48f 100644 --- a/www/iridium/files/patch-chrome_browser_browser__features.cc +++ b/www/iridium/files/patch-chrome_browser_browser__features.cc @@ -1,11 +1,11 @@ ---- chrome/browser/browser_features.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/browser_features.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/browser_features.cc -@@ -29,7 +29,7 @@ const base::Feature kColorProviderRedirectionForThemeP +@@ -30,7 +30,7 @@ BASE_FEATURE(kColorProviderRedirectionForThemeProvider // the browser exits. - const base::Feature kDestroyProfileOnBrowserClose { - "DestroyProfileOnBrowserClose", + BASE_FEATURE(kDestroyProfileOnBrowserClose, + "DestroyProfileOnBrowserClose", -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT - }; + base::FEATURE_ENABLED_BY_DEFAULT); #else + base::FEATURE_DISABLED_BY_DEFAULT); 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 928df95d45c0..ba8db2568e31 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,29 @@ ---- chrome/browser/browser_process_impl.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/browser_process_impl.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/browser_process_impl.cc -@@ -210,7 +210,7 @@ +@@ -211,7 +211,7 @@ #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/error_reporting/chrome_js_error_report_processor.h" // nogncheck #endif @@ -1160,7 +1160,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 -@@ -1416,7 +1416,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1420,7 +1420,7 @@ void BrowserProcessImpl::Unpin() { // Mac is currently not supported. // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) bool BrowserProcessImpl::IsRunningInBackground() const { // Check if browser is in the background. diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders.cc index 637a9db95101..e0c45b03fd21 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,71 +1,71 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -112,13 +112,13 @@ +@@ -114,13 +114,13 @@ #endif // BUILDFLAG(FULL_SAFE_BROWSING) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/connectors_internals/connectors_internals.mojom.h" #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/app_settings/web_app_settings_ui.h" #include "ui/webui/resources/cr_components/app_management/app_management.mojom.h" #endif -@@ -188,7 +188,7 @@ +@@ -190,7 +190,7 @@ #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/discards/discards.mojom.h" #include "chrome/browser/ui/webui/discards/discards_ui.h" #include "chrome/browser/ui/webui/discards/site_data.mojom.h" -@@ -799,7 +799,7 @@ void PopulateChromeFrameBinders( +@@ -807,7 +807,7 @@ void PopulateChromeFrameBinders( #endif // BUILDFLAG(ENABLE_SPEECH_SERVICE) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!render_frame_host->GetParent()) { map->Add( base::BindRepeating(&DraggableRegionsHostImpl::CreateIfAllowed)); -@@ -807,7 +807,7 @@ void PopulateChromeFrameBinders( +@@ -815,7 +815,7 @@ void PopulateChromeFrameBinders( #endif #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(blink::features::kDesktopPWAsSubApps) && !render_frame_host->GetParentOrOuterDocument()) { // The service binder will reject non-primary main frames, but we still need -@@ -872,14 +872,14 @@ void PopulateChromeWebUIFrameBinders( +@@ -880,14 +880,14 @@ void PopulateChromeWebUIFrameBinders( SegmentationInternalsUI>(map); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< connectors_internals::mojom::PageHandler, enterprise_connectors::ConnectorsInternalsUI>(map); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map); #endif -@@ -1270,7 +1270,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1271,7 +1271,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 a8bc3de82574..3f4c413df80e 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__main.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__main.cc @@ -1,52 +1,43 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/chrome_browser_main.cc @@ -239,11 +239,11 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/first_run/upgrade_util_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "components/crash/core/app/breakpad_linux.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -279,7 +279,7 @@ + +@@ -278,7 +278,7 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" #include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h" #include "chrome/browser/profiles/profile_activity_metrics_recorder.h" -@@ -1030,7 +1030,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1048,7 +1048,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 . -@@ -1043,7 +1043,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { - } - #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - // Set the product channel for crash reports. - if (!crash_reporter::IsCrashpadEnabled()) { - breakpad::SetChannelCrashKey( -@@ -1079,7 +1079,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1096,7 +1096,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::Initialize(); TouchModeStatsTracker::Initialize( diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__main__posix.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__main__posix.cc index aaeda2791562..bddab7662524 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__main__posix.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__main__posix.cc @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_browser_main_posix.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/chrome_browser_main_posix.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/chrome_browser_main_posix.cc -@@ -72,7 +72,7 @@ void ExitHandler::ExitWhenPossibleOnUIThread(int signa +@@ -73,7 +73,7 @@ void ExitHandler::ExitWhenPossibleOnUIThread(int signa } else { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) switch (signal) { case SIGINT: case SIGHUP: diff --git a/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc index f652a58cbefd..2c670f35fa06 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,160 +1,145 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -388,7 +388,7 @@ +@@ -393,7 +393,7 @@ #include "components/user_manager/user_manager.h" #include "services/service_manager/public/mojom/interface_provider_spec.mojom.h" #include "storage/browser/file_system/external_mount_points.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_linux.h" #elif BUILDFLAG(IS_ANDROID) #include "base/android/application_status_listener.h" -@@ -472,17 +472,17 @@ +@@ -478,12 +478,12 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/core/app/crash_switches.h" #include "components/crash/core/app/crashpad.h" #endif - --#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) - #if !BUILDFLAG(IS_ANDROID) - #include "base/debug/leak_annotations.h" - #include "components/crash/core/app/breakpad_linux.h" -@@ -490,13 +490,13 @@ +@@ -492,13 +492,13 @@ #include "components/crash/content/browser/crash_handler_host_linux.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.h" #include "chrome/browser/ui/webui/app_settings/web_app_settings_navigation_throttle.h" #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -525,11 +525,11 @@ +@@ -527,11 +527,11 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_extra_parts_linux.h" #elif defined(USE_OZONE) #include "chrome/browser/chrome_browser_main_extra_parts_ozone.h" -@@ -938,7 +938,7 @@ blink::mojom::AutoplayPolicy GetAutoplayPolicyForWebCo - int GetCrashSignalFD(const base::CommandLine& command_line) { - return crashpad::CrashHandlerHost::Get()->GetDeathSignalSocket(); - } --#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) -+#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) - breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( - const std::string& process_type) { - base::FilePath dumps_path; -@@ -1529,7 +1529,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1537,7 +1537,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) -@@ -1568,7 +1568,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1576,7 +1576,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo std::make_unique()); // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) main_parts->AddParts( std::make_unique()); #else -@@ -1589,7 +1589,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1597,7 +1597,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 defined(USE_OZONE) main_parts->AddParts(std::make_unique()); -@@ -1608,7 +1608,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1616,7 +1616,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>()); -@@ -2377,6 +2377,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2395,6 +2395,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin #elif BUILDFLAG(IS_POSIX) #if BUILDFLAG(IS_ANDROID) bool enable_crash_reporter = true; +#elif BUILDFLAG(IS_BSD) + bool enable_crash_reporter = false; - #else + #elif BUILDFLAG(IS_CHROMEOS) bool enable_crash_reporter = false; if (crash_reporter::IsCrashpadEnabled()) { -@@ -2730,7 +2732,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2759,7 +2761,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin ThreadProfilerConfiguration::Get()->AppendCommandLineSwitchForChildProcess( command_line); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) // Opt into a hardened stack canary mitigation if it hasn't already been // force-disabled. if (!browser_command_line.HasSwitch(switches::kChangeStackGuardOnFork)) { -@@ -4180,7 +4182,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4206,7 +4208,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, -@@ -4625,14 +4627,14 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4655,14 +4657,14 @@ 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); #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); -@@ -4669,7 +4671,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4697,7 +4699,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati + handle)); + } - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +-#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); diff --git a/www/iridium/files/patch-chrome_browser_content__settings_chrome__content__settings__utils.cc b/www/iridium/files/patch-chrome_browser_content__settings_chrome__content__settings__utils.cc new file mode 100644 index 000000000000..0a56fd449b0a --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_content__settings_chrome__content__settings__utils.cc @@ -0,0 +1,11 @@ +--- chrome/browser/content_settings/chrome_content_settings_utils.cc.orig 2022-12-06 08:09:13 UTC ++++ chrome/browser/content_settings/chrome_content_settings_utils.cc +@@ -44,7 +44,7 @@ void UpdateLocationBarUiForWebContents(content::WebCon + location_bar->UpdateContentSettingsIcons(); + + // TODO(https://crbug.com/1346734): Enable this on all platforms. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // The document PiP window does not have a location bar, but has some content + // setting views that need to be updated too. + if (browser->is_type_picture_in_picture()) { diff --git a/www/iridium/files/patch-chrome_browser_crash__upload__list_crash__upload__list.cc b/www/iridium/files/patch-chrome_browser_crash__upload__list_crash__upload__list.cc deleted file mode 100644 index dfd8e3465e24..000000000000 --- a/www/iridium/files/patch-chrome_browser_crash__upload__list_crash__upload__list.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/crash_upload_list/crash_upload_list.cc.orig 2022-10-05 07:34:01 UTC -+++ chrome/browser/crash_upload_list/crash_upload_list.cc -@@ -50,7 +50,7 @@ scoped_refptr CreateCrashUploadList() { - // which isn't compatible with CrashUploadListCrashpad. crash_sender continues - // to log uploads in CrashUploadList::kReporterLogFilename. - // Linux is handled below. --#if !(BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)) -+#if !(BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) - if (crash_reporter::IsCrashpadEnabled()) { - return new CrashUploadListCrashpad(); - } diff --git a/www/iridium/files/patch-chrome_browser_download_download__file__picker.cc b/www/iridium/files/patch-chrome_browser_download_download__file__picker.cc index 28f01c6016aa..d65eb7f2d2f9 100644 --- a/www/iridium/files/patch-chrome_browser_download_download__file__picker.cc +++ b/www/iridium/files/patch-chrome_browser_download_download__file__picker.cc @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_file_picker.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/download/download_file_picker.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/download/download_file_picker.cc @@ -16,7 +16,7 @@ #include "content/public/browser/download_manager.h" #include "content/public/browser/web_contents.h" -#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) #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_window.h" #include "ui/aura/window.h" -@@ -87,7 +87,7 @@ DownloadFilePicker::DownloadFilePicker(download::Downl +@@ -85,7 +85,7 @@ DownloadFilePicker::DownloadFilePicker(download::Downl // dialog in Linux (See SelectFileImpl() in select_file_dialog_linux_gtk.cc). // and windows.Here we make owning_window host to browser current active // window if it is null. https://crbug.com/1301898 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (!owning_window || !owning_window->GetHost()) { owning_window = BrowserList::GetInstance() ->GetLastActive() 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 5e1049a4854d..9bda6c983942 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 2022-12-01 10:35:46 UTC +--- chrome/browser/download/download_item_model.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/download/download_item_model.cc -@@ -738,7 +738,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -756,7 +756,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(); -@@ -780,7 +780,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand - DownloadCommands::ALWAYS_OPEN_TYPE); +@@ -799,7 +799,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand + base::UmaHistogramBoolean("Download.SetAlwaysOpenTo", !is_checked); DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile()); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (download_commands->CanOpenPdfInSystemViewer()) { prefs->SetShouldOpenPdfInSystemReader(!is_checked); SetShouldPreferOpeningInBrowser(is_checked); -@@ -1156,7 +1156,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1217,7 +1217,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 154af636edab..d4b1c4515ace 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 2022-10-05 07:34:01 UTC +--- chrome/browser/download/download_prefs.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/download/download_prefs.cc @@ -13,6 +13,7 @@ #include "base/callback_helpers.h" #include "base/check.h" #include "base/cxx17_backports.h" +#include "base/command_line.h" #include "base/feature_list.h" #include "base/files/file_util.h" #include "base/no_destructor.h" @@ -61,6 +62,10 @@ #include "chrome/browser/ui/pdf/adobe_reader_info_win.h" #endif +#if BUILDFLAG(IS_OPENBSD) +#include "sandbox/policy/openbsd/sandbox_openbsd.h" +#endif + using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; @@ -71,7 +76,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; @@ -182,7 +187,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 @@ -302,7 +307,7 @@ void DownloadPrefs::RegisterProfilePrefs( registry->RegisterTimePref(prefs::kDownloadLastCompleteTime, /*default_value=*/base::Time()); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false); #endif #if BUILDFLAG(IS_ANDROID) -@@ -483,7 +488,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens +@@ -475,7 +480,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; -@@ -515,7 +520,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons +@@ -507,7 +512,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons void DownloadPrefs::ResetAutoOpenByUser() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) SetShouldOpenPdfInSystemReader(false); #endif auto_open_by_user_.clear(); -@@ -546,7 +551,7 @@ void DownloadPrefs::SaveAutoOpenState() { +@@ -538,7 +543,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; -@@ -670,7 +675,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa +@@ -662,7 +667,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa #else // If the stored download directory is an absolute path, we presume it's // correct; there's not really much more validation we can do here. +#if BUILDFLAG(IS_OPENBSD) + // If unveil(2) is used, force the file dialog directory to something we + // know is available. + auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); + if (!sandbox->unveil_initialized() && path.IsAbsolute()) +#else if (path.IsAbsolute()) +#endif return path; // When the default download directory is *not* an absolute path, we use the diff --git a/www/iridium/files/patch-chrome_browser_download_download__prefs.h b/www/iridium/files/patch-chrome_browser_download_download__prefs.h index e920f9239b18..3eb76d9827e1 100644 --- a/www/iridium/files/patch-chrome_browser_download_download__prefs.h +++ b/www/iridium/files/patch-chrome_browser_download_download__prefs.h @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_prefs.h.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/download/download_prefs.h.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/download/download_prefs.h -@@ -125,7 +125,7 @@ class DownloadPrefs { +@@ -118,7 +118,7 @@ class DownloadPrefs { void DisableAutoOpenByUserBasedOnExtension(const base::FilePath& file_name); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Store the user preference to disk. If |should_open| is true, also disable // the built-in PDF plugin. If |should_open| is false, enable the PDF plugin. void SetShouldOpenPdfInSystemReader(bool should_open); -@@ -185,7 +185,7 @@ class DownloadPrefs { +@@ -178,7 +178,7 @@ class DownloadPrefs { std::unique_ptr auto_open_allowed_by_urls_; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) bool should_open_pdf_in_system_reader_; #endif diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc index 87b2783351f6..01550de60718 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc @@ -1,43 +1,43 @@ ---- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc @@ -11,11 +11,11 @@ #include "chrome/browser/profiles/profile.h" #include "components/keyed_service/core/keyed_service.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_process.h" #if BUILDFLAG(IS_MAC) #include "chrome/browser/enterprise/connectors/device_trust/browser/mac_device_trust_connector_service.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/browser/browser_device_trust_connector_service.h" #endif // BUILDFLAG(IS_MAC) #include "chrome/browser/policy/chrome_browser_policy_connector.h" -@@ -44,7 +44,7 @@ DeviceTrustConnectorService* DeviceTrustConnectorServi +@@ -45,7 +45,7 @@ DeviceTrustConnectorService* DeviceTrustConnectorServi bool DeviceTrustConnectorServiceFactory::ServiceIsCreatedWithBrowserContext() const { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return IsDeviceTrustConnectorFeatureEnabled(); #else return false; -@@ -75,7 +75,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil +@@ -81,7 +81,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil DeviceTrustConnectorService* service = nullptr; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (IsDeviceTrustConnectorFeatureEnabled()) { auto* key_manager = g_browser_process->browser_policy_connector() ->chrome_browser_cloud_management_controller() -@@ -83,7 +83,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil +@@ -89,7 +89,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil #if BUILDFLAG(IS_MAC) service = new MacDeviceTrustConnectorService( key_manager, profile->GetPrefs(), g_browser_process->local_state()); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) service = new BrowserDeviceTrustConnectorService(key_manager, profile->GetPrefs()); #endif // BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc index 4fc9d6baf8d2..7f6a63ffe689 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc @@ -1,11 +1,11 @@ ---- chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc -@@ -22,7 +22,7 @@ +@@ -21,7 +21,7 @@ #include "components/policy/core/common/management/management_service.h" #include "content/public/browser/browser_context.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_process.h" #include "chrome/browser/enterprise/connectors/device_trust/attestation/desktop/desktop_attestation_service.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h" diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc index 60b3857d4abd..50bca0d5d638 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc -@@ -15,7 +15,7 @@ +@@ -18,7 +18,7 @@ #include "chrome/browser/profiles/profile.h" #include "components/policy/core/common/management/management_service.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "base/check.h" #include "chrome/browser/enterprise/connectors/device_trust/signals/decorators/browser/browser_signals_decorator.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h" -@@ -52,7 +52,7 @@ std::unique_ptr CreateSignalsService( - decorators.push_back( - std::make_unique(policy_blocklist_service)); +@@ -54,7 +54,7 @@ std::unique_ptr CreateSignalsService(P + enterprise_signals::ContextInfoFetcher::CreateInstance( + profile, ConnectorsServiceFactory::GetForBrowserContext(profile)))); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) policy::CloudPolicyStore* store = nullptr; // Managed device. diff --git a/www/iridium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc b/www/iridium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc index 176d6975f7c2..b9a753f01233 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/signals/device_info_fetcher.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/enterprise/signals/device_info_fetcher.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/enterprise/signals/device_info_fetcher.cc @@ -10,7 +10,7 @@ #include "chrome/browser/enterprise/signals/device_info_fetcher_mac.h" #elif BUILDFLAG(IS_WIN) #include "chrome/browser/enterprise/signals/device_info_fetcher_win.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signals/device_info_fetcher_linux.h" #endif -@@ -70,7 +70,7 @@ std::unique_ptr DeviceInfoFetcher:: +@@ -71,7 +71,7 @@ std::unique_ptr DeviceInfoFetcher:: return std::make_unique(); #elif BUILDFLAG(IS_WIN) return std::make_unique(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return std::make_unique(); #else return std::make_unique(); diff --git a/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn b/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn index 3dfff81cf14e..aa7d0baecc4d 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 2022-12-01 10:35:46 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1331,6 +1331,10 @@ static_library("extensions") { +@@ -1328,6 +1328,10 @@ static_library("extensions") { deps += [ "//chrome/services/printing/public/mojom" ] } + if (is_bsd) { + sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ] + } + if (enable_service_discovery) { sources += [ "api/mdns/mdns_api.cc", diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc index d16ed579902c..2694389b8c25 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_conversion__utils.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.cc -@@ -6,7 +6,7 @@ +@@ -8,7 +8,7 @@ #include "build/build_config.h" -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #include diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc index b292df7ca83a..7237b36ac095 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 2022-12-01 10:35:46 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc @@ -32,7 +32,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 "base/strings/string_util.h" #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" #include "chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h" -@@ -151,7 +151,7 @@ api::enterprise_reporting_private::ContextInfo ToConte +@@ -149,7 +149,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( const std::string& user_id, -@@ -211,7 +211,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: +@@ -209,7 +209,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: // getPersistentSecret -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) EnterpriseReportingPrivateGetPersistentSecretFunction:: EnterpriseReportingPrivateGetPersistentSecretFunction() = default; -@@ -636,7 +636,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: +@@ -634,7 +634,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: } #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // getFileSystemInfo diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h index 459dd1553853..8e157fd62036 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h +++ b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h @@ -1,29 +1,29 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h @@ -19,7 +19,7 @@ #include "components/reporting/proto/synced/record.pb.h" #include "components/reporting/proto/synced/record_constants.pb.h" #include "components/reporting/util/statusor.h" -#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "base/time/time.h" #include "components/device_signals/core/browser/signals_types.h" #endif // BUILDFLAG(IS_CHROMEOS) - -@@ -54,7 +54,7 @@ class EnterpriseReportingPrivateGetDeviceIdFunction : +@@ -55,7 +55,7 @@ class EnterpriseReportingPrivateGetDeviceIdFunction : ~EnterpriseReportingPrivateGetDeviceIdFunction() override; }; -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) class EnterpriseReportingPrivateGetPersistentSecretFunction : public ExtensionFunction { -@@ -264,7 +264,7 @@ class EnterpriseReportingPrivateEnqueueRecordFunction +@@ -265,7 +265,7 @@ class EnterpriseReportingPrivateEnqueueRecordFunction #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class EnterpriseReportingPrivateGetFileSystemInfoFunction : public ExtensionFunction { diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc b/www/iridium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc index 252e80f03c67..9af4046f061a 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 2022-12-01 10:35:46 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -494,7 +494,7 @@ void PasswordsPrivateDelegateImpl::OsReauthCall( +@@ -508,7 +508,7 @@ void PasswordsPrivateDelegateImpl::OsReauthCall( } void PasswordsPrivateDelegateImpl::OsReauthTimeoutCall() { -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) PasswordsPrivateEventRouter* router = PasswordsPrivateEventRouterFactory::GetForProfile(profile_); if (router) diff --git a/www/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 d2bde42afb98..0ad7a7e49822 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,20 @@ ---- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -191,7 +191,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -190,7 +190,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::PREF_TYPE_BOOLEAN; #endif -@@ -203,7 +203,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -202,7 +202,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist settings_api::PrefType::PREF_TYPE_STRING; (*s_allowlist)[::prefs::kPolicyThemeColor] = settings_api::PrefType::PREF_TYPE_NUMBER; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUsesSystemThemeDeprecated] = settings_api::PrefType::PREF_TYPE_BOOLEAN; (*s_allowlist)[::prefs::kSystemTheme] = diff --git a/www/iridium/files/patch-chrome_browser_first__run_first__run__dialog.h b/www/iridium/files/patch-chrome_browser_first__run_first__run__dialog.h index 3989a9425192..f17c1c4867fd 100644 --- a/www/iridium/files/patch-chrome_browser_first__run_first__run__dialog.h +++ b/www/iridium/files/patch-chrome_browser_first__run_first__run__dialog.h @@ -1,11 +1,11 @@ ---- chrome/browser/first_run/first_run_dialog.h.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/first_run/first_run_dialog.h.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/first_run/first_run_dialog.h @@ -12,7 +12,7 @@ // Hide this function on platforms where the dialog does not exist. // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) - class Profile; + namespace first_run { diff --git a/www/iridium/files/patch-chrome_browser_first__run_first__run__internal.h b/www/iridium/files/patch-chrome_browser_first__run_first__run__internal.h index 3eb6923fa7a0..8446371f61b1 100644 --- a/www/iridium/files/patch-chrome_browser_first__run_first__run__internal.h +++ b/www/iridium/files/patch-chrome_browser_first__run_first__run__internal.h @@ -1,11 +1,11 @@ ---- chrome/browser/first_run/first_run_internal.h.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/first_run/first_run_internal.h.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/first_run/first_run_internal.h -@@ -56,7 +56,7 @@ FirstRunState DetermineFirstRunState(bool has_sentinel +@@ -54,7 +54,7 @@ FirstRunState DetermineFirstRunState(bool has_sentinel bool force_first_run, bool no_first_run); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // For testing, forces the first run dialog to either be shown or not. If not // called, the decision to show the dialog or not will be made by Chrome based // on a number of factors (such as install type, whether it's a Chrome-branded diff --git a/www/iridium/files/patch-chrome_browser_flag__descriptions.cc b/www/iridium/files/patch-chrome_browser_flag__descriptions.cc index 860c3f64fcbe..977e3a4da3ac 100644 --- a/www/iridium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/iridium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,65 +1,65 @@ ---- chrome/browser/flag_descriptions.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/flag_descriptions.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/flag_descriptions.cc -@@ -6383,7 +6383,7 @@ const char kSearchWebInSidePanelDescription[] = +@@ -6600,7 +6600,7 @@ const char kSearchWebInSidePanelDescription[] = // Random platform combinations ----------------------------------------------- #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kQuickCommandsName[] = "Quick Commands"; const char kQuickCommandsDescription[] = "Enable a text interface to browser features. Invoke with Ctrl-Space."; -@@ -6392,7 +6392,7 @@ const char kQuickCommandsDescription[] = +@@ -6609,7 +6609,7 @@ const char kQuickCommandsDescription[] = // BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kFollowingFeedSidepanelName[] = "Following feed in the sidepanel"; const char kFollowingFeedSidepanelDescription[] = "Enables the following feed in the sidepanel."; -@@ -6406,7 +6406,7 @@ const char kWebShareDescription[] = +@@ -6623,7 +6623,7 @@ const char kWebShareDescription[] = "platforms."; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) const char kOzonePlatformHintChoiceDefault[] = "Default"; const char kOzonePlatformHintChoiceAuto[] = "Auto"; const char kOzonePlatformHintChoiceX11[] = "X11"; -@@ -6426,7 +6426,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -6643,7 +6643,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti "Bluetooth"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kCleanUndecryptablePasswordsLinuxName[] = "Cleanup local undecryptable passwords during initial sync flow"; const char kCleanUndecryptablePasswordsLinuxDescription[] = -@@ -6439,7 +6439,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail +@@ -6656,7 +6656,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail "storage and requests initial sync."; #endif // 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."; -@@ -6448,7 +6448,7 @@ const char kSkipUndecryptablePasswordsDescription[] = +@@ -6665,7 +6665,7 @@ const char kSkipUndecryptablePasswordsDescription[] = "there are undecryptable ones."; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kAsyncDnsName[] = "Async DNS resolver"; const char kAsyncDnsDescription[] = "Enables the built-in DNS resolver."; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -@@ -6553,7 +6553,7 @@ const char kElasticOverscrollDescription[] = +@@ -6770,7 +6770,7 @@ const char kElasticOverscrollDescription[] = #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kUIDebugToolsName[] = "Debugging tools for UI"; const char kUIDebugToolsDescription[] = "Enables additional keyboard shortcuts to help debugging."; diff --git a/www/iridium/files/patch-chrome_browser_flag__descriptions.h b/www/iridium/files/patch-chrome_browser_flag__descriptions.h index f6f0f70da1cd..926c45007a1a 100644 --- a/www/iridium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/iridium/files/patch-chrome_browser_flag__descriptions.h @@ -1,51 +1,51 @@ ---- chrome/browser/flag_descriptions.h.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/flag_descriptions.h.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/flag_descriptions.h -@@ -3661,7 +3661,7 @@ extern const char kSearchWebInSidePanelDescription[]; +@@ -3779,7 +3779,7 @@ extern const char kSearchWebInSidePanelDescription[]; // Random platform combinations ----------------------------------------------- #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kQuickCommandsName[]; extern const char kQuickCommandsDescription[]; -@@ -3678,7 +3678,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa +@@ -3796,7 +3796,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa extern const char kWebBluetoothConfirmPairingSupportDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kOzonePlatformHintChoiceDefault[]; extern const char kOzonePlatformHintChoiceAuto[]; extern const char kOzonePlatformHintChoiceX11[]; -@@ -3694,18 +3694,18 @@ extern const char kForcePasswordInitialSyncWhenDecrypt +@@ -3812,18 +3812,18 @@ extern const char kForcePasswordInitialSyncWhenDecrypt extern const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[]; #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kSkipUndecryptablePasswordsName[]; extern const char kSkipUndecryptablePasswordsDescription[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kAsyncDnsName[]; extern const char kAsyncDnsDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kFollowingFeedSidepanelName[]; extern const char kFollowingFeedSidepanelDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -3782,7 +3782,7 @@ extern const char kElasticOverscrollDescription[]; +@@ -3900,7 +3900,7 @@ extern const char kElasticOverscrollDescription[]; #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kUIDebugToolsName[]; extern const char kUIDebugToolsDescription[]; diff --git a/www/iridium/files/patch-chrome_browser_headless_headless__mode__util.cc b/www/iridium/files/patch-chrome_browser_headless_headless__mode__util.cc index 44147d0b50b6..57ba54fe29de 100644 --- a/www/iridium/files/patch-chrome_browser_headless_headless__mode__util.cc +++ b/www/iridium/files/patch-chrome_browser_headless_headless__mode__util.cc @@ -1,29 +1,29 @@ ---- chrome/browser/headless/headless_mode_util.cc.orig 2022-04-01 07:48:30 UTC +--- chrome/browser/headless/headless_mode_util.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/headless/headless_mode_util.cc @@ -9,7 +9,7 @@ // Native headless is currently available on Linux, Windows and Mac platforms. // More platforms will be added later, so avoid function level clutter by // providing stub implementations at the end of the file. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include #include @@ -17,7 +17,7 @@ #include "base/base_switches.h" #include "ui/gfx/switches.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/gl/gl_switches.h" #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) - -@@ -51,7 +51,7 @@ void SetUpCommandLine(const base::CommandLine* command +@@ -52,7 +52,7 @@ void SetUpCommandLine(const base::CommandLine* command base::CommandLine::ForCurrentProcess()->AppendSwitch( ::switches::kNoErrorDialogs); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Native headless chrome on Linux relies on ozone/headless platform. base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( ::switches::kOzonePlatform, switches::kHeadless); 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 4ceeeab27b12..407a736655b8 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,23 +1,23 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -58,8 +58,10 @@ +@@ -61,8 +61,10 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) +#if !BUILDFLAG(IS_BSD) #include +#endif #include "base/linux_util.h" #include "base/strings/string_split.h" -@@ -491,7 +493,7 @@ void RecordStartupMetrics() { +@@ -494,7 +496,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, 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 e40dc692e189..3a312a433e6b 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,47 +1,47 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -175,7 +175,7 @@ +@@ -176,7 +176,7 @@ #include "chrome/notification_helper/notification_helper_constants.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/metrics/motherboard_metrics_provider.h" #endif -@@ -722,7 +722,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -731,7 +731,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 -@@ -799,7 +799,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -810,7 +810,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) metrics_service_->RegisterMetricsProvider( std::make_unique()); -@@ -894,7 +894,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -908,7 +908,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) -@@ -1077,7 +1077,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1093,7 +1093,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // This creates the DesktopProfileSessionDurationsServices if it didn't exist // already. diff --git a/www/iridium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc b/www/iridium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc index 5f9cbde1cde4..f1c7038fb97d 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc +++ b/www/iridium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc @@ -1,11 +1,11 @@ ---- chrome/browser/metrics/perf/cpu_identity.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/metrics/perf/cpu_identity.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/metrics/perf/cpu_identity.cc -@@ -106,7 +106,7 @@ CPUIdentity GetCPUIdentity() { +@@ -109,7 +109,7 @@ CPUIdentity GetCPUIdentity() { result.release = #if BUILDFLAG(IS_CHROMEOS_ASH) base::SysInfo::KernelVersion(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::SysInfo::OperatingSystemVersion(); #else #error "Unsupported configuration" diff --git a/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.cc b/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.cc index 05d2de1f79f1..08f0e42013e8 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.cc +++ b/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.cc @@ -1,29 +1,29 @@ ---- chrome/browser/metrics/power/process_monitor.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/metrics/power/process_monitor.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/metrics/power/process_monitor.cc @@ -64,7 +64,7 @@ ProcessMonitor::Metrics SampleMetrics(base::ProcessMet #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) metrics.idle_wakeups = process_metrics.GetIdleWakeupsPerSecond(); #endif #if BUILDFLAG(IS_MAC) @@ -81,7 +81,7 @@ void ScaleMetrics(ProcessMonitor::Metrics* metrics, do metrics->cpu_usage *= factor; #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) metrics->idle_wakeups *= factor; #endif -@@ -147,7 +147,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me +@@ -168,7 +168,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me lhs.cpu_usage += rhs.cpu_usage; #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) lhs.idle_wakeups += rhs.idle_wakeups; #endif diff --git a/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.h b/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.h index 2dcd6d5adfc2..b3b19d7ff967 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.h +++ b/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.h @@ -1,11 +1,11 @@ ---- chrome/browser/metrics/power/process_monitor.h.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/metrics/power/process_monitor.h.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/metrics/power/process_monitor.h -@@ -71,7 +71,7 @@ class ProcessMonitor : public content::BrowserChildPro +@@ -75,7 +75,7 @@ class ProcessMonitor : public content::BrowserChildPro double cpu_usage = 0.0; #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Returns the number of average idle cpu wakeups per second since the last // time the metric was sampled. int idle_wakeups = 0; diff --git a/www/iridium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc b/www/iridium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc index 6eaae53b7d68..c21fae233308 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,138 +1,11 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -192,12 +192,12 @@ - #include "components/spellcheck/browser/pref_names.h" - #endif // BUILDFLAG(ENABLE_SPELLCHECK) - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "components/device_signals/core/browser/pref_names.h" - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - #include "chrome/browser/web_applications/policy/web_app_settings_policy_handler.h" - #endif - -@@ -731,7 +731,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - prefs::kManagedDefaultGeolocationSetting, - base::Value::Type::INTEGER }, - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ -- || BUILDFLAG(IS_FUCHSIA) -+ || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - { key::kRequireOnlineRevocationChecksForLocalAnchors, - prefs::kCertRevocationCheckingRequiredLocalAnchors, - base::Value::Type::BOOLEAN }, -@@ -1339,7 +1339,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - base::Value::Type::STRING }, - #endif // BUILDFLAG(IS_CHROMEOS_ASH) - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - { key::kGSSAPILibraryName, - prefs::kGSSAPILibraryName, - base::Value::Type::STRING }, -@@ -1409,18 +1409,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - prefs::kTotalMemoryLimitMb, - base::Value::Type::INTEGER }, - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - { key::kBackgroundModeEnabled, - prefs::kBackgroundModeEnabled, - base::Value::Type::BOOLEAN }, - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - { key::kUnmanagedDeviceSignalsConsentFlowEnabled, - device_signals::prefs::kUnmanagedDeviceSignalsConsentFlowEnabled, - base::Value::Type::BOOLEAN }, - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ -- || BUILDFLAG(IS_FUCHSIA) -+ || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - { key::kDefaultBrowserSettingEnabled, - prefs::kDefaultBrowserSettingEnabled, - base::Value::Type::BOOLEAN }, -@@ -1433,7 +1433,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - // || BUILDFLAG(IS_FUCHSIA) - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ -- || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - { key::kAutoplayAllowed, - prefs::kAutoplayAllowed, - base::Value::Type::BOOLEAN }, -@@ -1621,7 +1621,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - base::Value::Type::BOOLEAN }, - #endif // BUILDFLAG(IS_CHROMEOS) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - { key::kAuthNegotiateDelegateByKdcPolicy, - prefs::kAuthNegotiateDelegateByKdcPolicy, - base::Value::Type::BOOLEAN }, -@@ -1674,7 +1674,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - #endif // BUILDFLAG(IS_CHROMEOS_ASH) - - #if BUILDFLAG(ENABLE_EXTENSIONS) && (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) \ -- || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)) -+ || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)) || BUILDFLAG(IS_BSD) - { key::kChromeAppsEnabled, - extensions::pref_names::kChromeAppsEnabled, - base::Value::Type::BOOLEAN }, -@@ -1731,7 +1731,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1747,7 +1747,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { key::kPrefixedStorageInfoEnabled, storage::kPrefixedStorageInfoEnabled, base::Value::Type::BOOLEAN }, --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_CHROMEOS_ASH) { key::kHighEfficiencyModeEnabled, performance_manager::user_tuning::prefs::kHighEfficiencyModeEnabled, base::Value::Type::BOOLEAN }, -@@ -2032,7 +2032,7 @@ std::unique_ptr BuildH - key::kBrowsingDataLifetime, browsing_data::prefs::kBrowsingDataLifetime, - chrome_schema)); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - handlers->AddHandler(std::make_unique()); - handlers->AddHandler(std::make_unique()); - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -2061,7 +2061,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)); -@@ -2394,7 +2394,7 @@ std::unique_ptr BuildH - chrome_schema)); - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - handlers->AddHandler( - std::make_unique(chrome_schema)); - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -2407,7 +2407,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( -@@ -2415,7 +2415,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)); 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 088513ca5c81..460668393c35 100644 --- a/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc +++ b/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -1,71 +1,69 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -441,14 +441,14 @@ +@@ -446,14 +446,14 @@ #include "components/os_crypt/os_crypt.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/url_handler_prefs.h" #include "components/device_signals/core/browser/pref_names.h" #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/browser_switcher/browser_switcher_prefs.h" #endif -@@ -476,7 +476,7 @@ +@@ -481,7 +481,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 -@@ -1010,7 +1010,7 @@ void RegisterProfilePrefsForMigration( +@@ -978,7 +978,7 @@ void RegisterProfilePrefsForMigration( registry->RegisterIntegerPref(kProfileAvatarTutorialShown, 0); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Deprecated 08/2022. registry->RegisterBooleanPref(prefs::kUsesSystemThemeDeprecated, false); #endif -@@ -1241,7 +1241,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) +@@ -1212,7 +1212,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #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) web_app::url_handler_prefs::RegisterLocalStatePrefs(registry); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -1561,13 +1561,13 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -1537,11 +1537,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync safe_browsing::PostCleanupSettingsResetter::RegisterProfilePrefs(registry); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) device_signals::RegisterProfilePrefs(registry); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); #endif -@@ -1981,7 +1981,7 @@ void MigrateObsoleteProfilePrefs(Profile* profile) { + +@@ -1938,7 +1938,7 @@ void MigrateObsoleteProfilePrefs(Profile* profile) { profile_prefs->ClearPref(kProfileAvatarTutorialShown); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Added 08/2022. if (profile_prefs->HasPrefPath(prefs::kUsesSystemThemeDeprecated)) { auto migrated_theme = diff --git a/www/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 3e429227ccaf..636645208e9c 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,25 +1,25 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -257,7 +257,7 @@ +@@ -258,7 +258,7 @@ #include "chrome/browser/ui/cocoa/screentime/screentime_features.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/idle/idle_service_factory.h" #endif -@@ -438,11 +438,11 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -439,11 +439,11 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_idle::IdleServiceFactory::GetInstance(); #endif ModelTypeStoreServiceFactory::GetInstance(); diff --git a/www/iridium/files/patch-chrome_browser_profiles_profile__impl.cc b/www/iridium/files/patch-chrome_browser_profiles_profile__impl.cc index e0e7fd0a47c3..8a3286b078a4 100644 --- a/www/iridium/files/patch-chrome_browser_profiles_profile__impl.cc +++ b/www/iridium/files/patch-chrome_browser_profiles_profile__impl.cc @@ -1,31 +1,31 @@ ---- chrome/browser/profiles/profile_impl.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -266,6 +266,10 @@ +@@ -258,6 +258,10 @@ #include "chrome/browser/spellchecker/spellcheck_service.h" #endif +#if BUILDFLAG(IS_OPENBSD) +#include "sandbox/policy/openbsd/sandbox_openbsd.h" +#endif + using bookmarks::BookmarkModel; using content::BrowserThread; using content::DownloadManagerDelegate; -@@ -864,7 +868,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -839,7 +843,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_resources_settings_route.ts b/www/iridium/files/patch-chrome_browser_resources_settings_route.ts index 0045ef03f107..3ea343ef2a84 100644 --- a/www/iridium/files/patch-chrome_browser_resources_settings_route.ts +++ b/www/iridium/files/patch-chrome_browser_resources_settings_route.ts @@ -1,11 +1,11 @@ ---- chrome/browser/resources/settings/route.ts.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/resources/settings/route.ts.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/resources/settings/route.ts -@@ -204,7 +204,7 @@ function createBrowserSettingsRoutes(): Partial + // r.CAPTIONS = r.ACCESSIBILITY.createChild('/captions'); // diff --git a/www/iridium/files/patch-chrome_browser_resources_signin_signin__shared.css b/www/iridium/files/patch-chrome_browser_resources_signin_signin__shared.css index 0f1cd32be241..677631dc2dc5 100644 --- a/www/iridium/files/patch-chrome_browser_resources_signin_signin__shared.css +++ b/www/iridium/files/patch-chrome_browser_resources_signin_signin__shared.css @@ -1,11 +1,11 @@ ---- chrome/browser/resources/signin/signin_shared.css.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/resources/signin/signin_shared.css.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/resources/signin/signin_shared.css -@@ -34,7 +34,7 @@ a { - padding: var(--action-container-padding); +@@ -54,7 +54,7 @@ a { + border-radius: var(--scrollbar-width); } - + .action-container { flex-flow: row-reverse; justify-content: flex-start; diff --git a/www/iridium/files/patch-chrome_browser_resources_signin_sync__confirmation_sync__confirmation__app.html b/www/iridium/files/patch-chrome_browser_resources_signin_sync__confirmation_sync__confirmation__app.html index 3c8ba869126e..3e5aa2db0b8e 100644 --- a/www/iridium/files/patch-chrome_browser_resources_signin_sync__confirmation_sync__confirmation__app.html +++ b/www/iridium/files/patch-chrome_browser_resources_signin_sync__confirmation_sync__confirmation__app.html @@ -1,38 +1,38 @@ ---- chrome/browser/resources/signin/sync_confirmation/sync_confirmation_app.html.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/resources/signin/sync_confirmation/sync_confirmation_app.html.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/resources/signin/sync_confirmation/sync_confirmation_app.html -@@ -334,7 +334,7 @@ +@@ -336,7 +336,7 @@ consent-confirmation autofocus> $i18n{syncConfirmationConfirmLabel} - + $i18n{syncConfirmationSettingsLabel} -@@ -344,7 +344,7 @@ +@@ -346,7 +346,7 @@ disabled="[[anyButtonClicked_]]"> $i18n{syncConfirmationUndoLabel} - + $i18n{syncConfirmationSettingsLabel} -@@ -387,7 +387,7 @@ +@@ -389,7 +389,7 @@ consent-confirmation> $i18n{syncConfirmationConfirmLabel} - + $i18n{syncConfirmationSettingsLabel} -@@ -397,7 +397,7 @@ +@@ -399,7 +399,7 @@ disabled="[[anyButtonClicked_]]"> $i18n{syncConfirmationUndoLabel} - + $i18n{syncConfirmationSettingsLabel} 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 840ec99b5865..a2259c77d5e4 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 2022-12-01 10:35:46 UTC +--- chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service.cc -@@ -17,7 +17,7 @@ +@@ -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 -@@ -297,7 +297,7 @@ BinaryUploadService* BinaryUploadService::GetForProfil +@@ -321,7 +321,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_download__protection_file__analyzer.cc b/www/iridium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc index d9405b1fbcda..68119015586f 100644 --- a/www/iridium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc +++ b/www/iridium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc @@ -1,29 +1,29 @@ ---- chrome/browser/safe_browsing/download_protection/file_analyzer.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/safe_browsing/download_protection/file_analyzer.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/safe_browsing/download_protection/file_analyzer.cc @@ -20,7 +20,7 @@ #include "content/public/browser/browser_thread.h" #include "url/gurl.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/safe_browsing/download_protection/document_analysis_service.h" #endif -@@ -102,7 +102,7 @@ void FileAnalyzer::Start(const base::FilePath& target_ +@@ -100,7 +100,7 @@ void FileAnalyzer::Start(const base::FilePath& target_ } else if (inspection_type == DownloadFileType::DMG) { StartExtractDmgFeatures(); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) } else if (inspection_type == DownloadFileType::OFFICE_DOCUMENT) { StartExtractDocumentFeatures(); #endif -@@ -325,7 +325,7 @@ void FileAnalyzer::OnDmgAnalysisFinished( +@@ -326,7 +326,7 @@ void FileAnalyzer::OnDmgAnalysisFinished( } #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) void FileAnalyzer::StartExtractDocumentFeatures() { DCHECK_CURRENTLY_ON(BrowserThread::UI); diff --git a/www/iridium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.h b/www/iridium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.h index d3d937b63a59..944075c8022f 100644 --- a/www/iridium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.h +++ b/www/iridium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.h @@ -1,29 +1,29 @@ ---- chrome/browser/safe_browsing/download_protection/file_analyzer.h.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/safe_browsing/download_protection/file_analyzer.h.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/safe_browsing/download_protection/file_analyzer.h -@@ -17,7 +17,7 @@ +@@ -18,7 +18,7 @@ #include "components/safe_browsing/core/common/proto/csd.pb.h" #include "third_party/protobuf/src/google/protobuf/repeated_field.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/services/file_util/public/cpp/sandboxed_document_analyzer.h" #endif -@@ -105,7 +105,7 @@ class FileAnalyzer { +@@ -106,7 +106,7 @@ class FileAnalyzer { const safe_browsing::ArchiveAnalyzerResults& archive_results); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) void StartExtractDocumentFeatures(); void OnDocumentAnalysisFinished( const DocumentAnalyzerResults& document_results); -@@ -128,7 +128,7 @@ class FileAnalyzer { +@@ -133,7 +133,7 @@ class FileAnalyzer { scoped_refptr dmg_analyzer_; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) scoped_refptr document_analyzer_; base::TimeTicks document_analysis_start_time_; #endif 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 index 078312b32dbd..86f6e43952b7 100644 --- a/www/iridium/files/patch-chrome_browser_sync_chrome__sync__client.cc +++ b/www/iridium/files/patch-chrome_browser_sync_chrome__sync__client.cc @@ -1,11 +1,11 @@ ---- chrome/browser/sync/chrome_sync_client.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/sync/chrome_sync_client.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/sync/chrome_sync_client.cc -@@ -440,7 +440,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy +@@ -445,7 +445,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy // Chrome prefers OS provided spell checkers where they exist. So only sync the // custom dictionary on platforms that typically don't provide one. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Dictionary sync is enabled by default. if (GetPrefService()->GetBoolean(spellcheck::prefs::kSpellCheckEnable)) { controllers.push_back( diff --git a/www/iridium/files/patch-chrome_browser_themes_theme__service__aura__linux.cc b/www/iridium/files/patch-chrome_browser_themes_theme__service__aura__linux.cc index 6c964a02b34c..71f448baec3a 100644 --- a/www/iridium/files/patch-chrome_browser_themes_theme__service__aura__linux.cc +++ b/www/iridium/files/patch-chrome_browser_themes_theme__service__aura__linux.cc @@ -1,11 +1,11 @@ ---- chrome/browser/themes/theme_service_aura_linux.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/themes/theme_service_aura_linux.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/themes/theme_service_aura_linux.cc -@@ -22,7 +22,7 @@ namespace { +@@ -24,7 +24,7 @@ namespace { ui::SystemTheme ValidateSystemTheme(ui::SystemTheme system_theme) { switch (system_theme) { case ui::SystemTheme::kDefault: -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) case ui::SystemTheme::kGtk: case ui::SystemTheme::kQt: #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_browser__command__controller.cc b/www/iridium/files/patch-chrome_browser_ui_browser__command__controller.cc index 140b86557cd8..e725d0f4dac5 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,38 +1,38 @@ ---- chrome/browser/ui/browser_command_controller.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/ui/browser_command_controller.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/ui/browser_command_controller.cc @@ -98,7 +98,7 @@ #include "components/user_manager/user_manager.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui.h" #endif @@ -287,7 +287,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(); @@ -532,7 +532,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) case IDC_MINIMIZE_WINDOW: browser_->window()->Minimize(); break; -@@ -1098,7 +1098,7 @@ void BrowserCommandController::InitCommandState() { +@@ -1099,7 +1099,7 @@ void BrowserCommandController::InitCommandState() { #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_MAXIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_RESTORE_WINDOW, true); diff --git a/www/iridium/files/patch-chrome_browser_ui_chrome__pages.cc b/www/iridium/files/patch-chrome_browser_ui_chrome__pages.cc index ea3be2b3c9eb..c44c4fc8d33a 100644 --- a/www/iridium/files/patch-chrome_browser_ui_chrome__pages.cc +++ b/www/iridium/files/patch-chrome_browser_ui_chrome__pages.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/chrome_pages.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/ui/chrome_pages.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/ui/chrome_pages.cc @@ -69,7 +69,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/web_app_utils.h" #endif -@@ -630,7 +630,7 @@ void ShowBrowserSigninOrSettings(Browser* browser, +@@ -629,7 +629,7 @@ void ShowBrowserSigninOrSettings(Browser* browser, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) void ShowWebAppSettings(Browser* browser, const std::string& app_id, web_app::AppSettingsPageEntryPoint entry_point) { diff --git a/www/iridium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc b/www/iridium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc index ae791150ee03..b123590d70c5 100644 --- a/www/iridium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc +++ b/www/iridium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/ui/startup/bad_flags_prompt.cc -@@ -91,7 +91,7 @@ static const char* kBadFlags[] = { +@@ -93,7 +93,7 @@ static const char* kBadFlags[] = { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Speech dispatcher is buggy, it can crash and it can make Chrome freeze. // http://crbug.com/327295 switches::kEnableSpeechDispatcher, diff --git a/www/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 d1d1aeca7b73..bb37ded0c1be 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,29 +1,29 @@ ---- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/ui/startup/startup_browser_creator.cc -@@ -128,7 +128,7 @@ +@@ -129,7 +129,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/ui/startup/web_app_info_recorder_utils.h" #endif -@@ -1006,7 +1006,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1007,7 +1007,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) && -@@ -1196,7 +1196,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1197,7 +1197,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_tab__helpers.cc b/www/iridium/files/patch-chrome_browser_ui_tab__helpers.cc index 8d92b56469b7..643f67b9d0b2 100644 --- a/www/iridium/files/patch-chrome_browser_ui_tab__helpers.cc +++ b/www/iridium/files/patch-chrome_browser_ui_tab__helpers.cc @@ -1,36 +1,36 @@ ---- chrome/browser/ui/tab_helpers.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/ui/tab_helpers.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/ui/tab_helpers.cc -@@ -211,7 +211,7 @@ +@@ -207,7 +207,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/autofill_assistant/common_dependencies_chrome.h" #include "chrome/browser/autofill_assistant/platform_dependencies_desktop.h" #include "chrome/browser/ui/blocked_content/framebust_block_tab_helper.h" -@@ -561,13 +561,13 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -551,13 +551,13 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( features::kHappinessTrackingSurveysForDesktopDemo) || base::FeatureList::IsEnabled(features::kTrustSafetySentimentSurvey) || -@@ -590,7 +590,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -580,7 +580,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( autofill_assistant::features::kAutofillAssistantDesktop)) { autofill_assistant::CreateForWebContents( 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 3c2ff9538d12..1c81b7eeead0 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 2022-10-05 07:34:01 UTC +--- chrome/browser/ui/task_manager/task_manager_table_model.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/ui/task_manager/task_manager_table_model.cc -@@ -454,7 +454,7 @@ std::u16string TaskManagerTableModel::GetText(size_t r +@@ -455,7 +455,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, +@@ -622,7 +622,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]); -@@ -795,7 +795,7 @@ void TaskManagerTableModel::UpdateRefreshTypes(int col +@@ -796,7 +796,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_views_bubble__anchor__util__views.cc b/www/iridium/files/patch-chrome_browser_ui_views_bubble__anchor__util__views.cc new file mode 100644 index 000000000000..1c021cc83920 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_ui_views_bubble__anchor__util__views.cc @@ -0,0 +1,11 @@ +--- chrome/browser/ui/views/bubble_anchor_util_views.cc.orig 2022-12-06 08:09:13 UTC ++++ chrome/browser/ui/views/bubble_anchor_util_views.cc +@@ -39,7 +39,7 @@ AnchorConfiguration GetPageInfoAnchorConfiguration(Bro + views::BubbleBorder::TOP_LEFT}; + + // TODO(https://crbug.com/1346734): Enable this on all platforms. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + if (anchor == kLocationBar && browser_view->GetIsPictureInPictureType()) { + auto* frame_view = static_cast( + browser_view->frame()->GetFrameView()); diff --git a/www/iridium/files/patch-chrome_browser_ui_views_download_download__item__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_download_download__item__view.cc index ab9cf6e370cc..3331f3f6728a 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_download_download__item__view.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_download_download__item__view.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/download/download_item_view.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/ui/views/download/download_item_view.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/ui/views/download/download_item_view.cc -@@ -188,7 +188,7 @@ bool UseNewWarnings() { +@@ -190,7 +190,7 @@ bool UseNewWarnings() { } int GetFilenameStyle(const views::Label& label) { -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) if (UseNewWarnings()) return views::style::STYLE_EMPHASIZED; #endif -@@ -196,7 +196,7 @@ int GetFilenameStyle(const views::Label& label) { +@@ -198,7 +198,7 @@ int GetFilenameStyle(const views::Label& label) { } int GetFilenameStyle(const views::StyledLabel& label) { -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) if (UseNewWarnings()) return views::style::STYLE_EMPHASIZED; #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_views_first__run__dialog.cc b/www/iridium/files/patch-chrome_browser_ui_views_first__run__dialog.cc deleted file mode 100644 index cd7cd56ee47d..000000000000 --- a/www/iridium/files/patch-chrome_browser_ui_views_first__run__dialog.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/ui/views/first_run_dialog.cc.orig 2022-12-01 10:35:46 UTC -+++ chrome/browser/ui/views/first_run_dialog.cc -@@ -35,7 +35,7 @@ - - namespace { - --#if !BUILDFLAG(IS_MAC) -+#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) - void InitCrashReporterIfEnabled(bool enabled) { - if (!crash_reporter::IsCrashpadEnabled() && enabled) - breakpad::InitCrashReporter(std::string()); -@@ -129,7 +129,7 @@ bool FirstRunDialog::Accept() { - - #if BUILDFLAG(IS_MAC) - ChangeMetricsReportingState(report_crashes_->GetChecked()); --#else -+#elif !BUILDFLAG(IS_BSD) - ChangeMetricsReportingStateWithReply( - report_crashes_->GetChecked(), - base::BindOnce(&InitCrashReporterIfEnabled)); 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 ee1b60fa0d71..d98f701c4406 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 2022-12-01 10:35:46 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -2037,7 +2037,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra +@@ -2069,7 +2069,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra // CrOS cleanup is done. // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) contents_web_view_->SetFastResize(is_dragging); if (!is_dragging) { // When tab dragging is ended, we need to make sure the web contents get diff --git a/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab.cc b/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab.cc index d4182711b91d..ae5a8e0b1e19 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 2022-10-05 07:34:01 UTC +--- chrome/browser/ui/views/tabs/tab.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/ui/views/tabs/tab.cc -@@ -582,7 +582,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& +@@ -581,7 +581,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& if (mouse_hovered_ || !GetWidget()->IsMouseEventsEnabled()) return; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Move the hit test area for hovering up so that it is not overlapped by tab // hover cards when they are shown. // TODO(crbug.com/978134): Once Linux/CrOS widget transparency is solved, diff --git a/www/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 d3e7a307352e..3c9c2b78002c 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,38 +1,38 @@ ---- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/ui/views/tabs/tab_drag_controller.cc -@@ -481,7 +481,7 @@ void TabDragController::Init(TabDragContext* source_co +@@ -487,7 +487,7 @@ void TabDragController::Init(TabDragContext* source_co // synchronous on desktop Linux, so use that. // - Chrome OS // Releasing capture on Ash cancels gestures so avoid it. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) can_release_capture_ = false; #endif start_point_in_screen_ = gfx::Point(source_view_offset, mouse_offset.y()); -@@ -1034,7 +1034,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon +@@ -1049,7 +1049,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) // EndMoveLoop is going to snap the window back to its original location. // Hide it so users don't see this. Hiding a window in Linux aura causes // it to lose capture so skip it. -@@ -1972,7 +1972,7 @@ void TabDragController::CompleteDrag() { +@@ -1987,7 +1987,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 -@@ -2362,7 +2362,7 @@ TabDragController::Liveness TabDragController::GetLoca +@@ -2378,7 +2378,7 @@ TabDragController::Liveness TabDragController::GetLoca } // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Exclude windows which are pending deletion via Browser::TabStripEmpty(). // These windows can be returned in the Linux Aura port because the browser // window which was used for dragging is not hidden once all of its tabs are diff --git a/www/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 947cb6431be0..69a65bbbaaf6 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,92 +1,92 @@ ---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -313,7 +313,7 @@ +@@ -317,7 +317,7 @@ #include "chrome/browser/ui/webui/app_launcher_page_ui.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/webui_js_error/webui_js_error_ui.h" #endif -@@ -339,17 +339,17 @@ +@@ -343,17 +343,17 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/discards/discards_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/sandbox/sandbox_internals_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" #endif -@@ -699,7 +699,7 @@ bool IsAboutUI(const GURL& url) { +@@ -710,7 +710,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) -@@ -1131,7 +1131,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -1147,7 +1147,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we #endif // !defined(USE_REAL_DBUS_CLIENTS) #endif // !defined(OFFICIAL_BUILD) #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 -@@ -1192,7 +1192,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -1208,7 +1208,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) -@@ -1252,27 +1252,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -1268,27 +1268,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUISandboxHost) { return &NewWebUI; } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIConnectorsInternalsHost) return &NewWebUI; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIDiscardsHost) return &NewWebUI; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIBrowserSwitchHost) return &NewWebUI; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIWebAppSettingsHost) return &NewWebUI; #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_connectors__internals_zero__trust__utils.cc b/www/iridium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc similarity index 73% rename from www/iridium/files/patch-chrome_browser_ui_webui_connectors__internals_zero__trust__utils.cc rename to www/iridium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc index 49fda2c04c05..1239c0da508a 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_connectors__internals_zero__trust__utils.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_connectors__internals_device__trust__utils.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/connectors_internals/zero_trust_utils.cc.orig 2022-10-05 07:34:01 UTC -+++ chrome/browser/ui/webui/connectors_internals/zero_trust_utils.cc +--- chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc.orig 2022-12-06 08:09:13 UTC ++++ chrome/browser/ui/webui/connectors_internals/device_trust_utils.cc @@ -6,7 +6,7 @@ #include "build/build_config.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + #include "base/base64url.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h" - #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" -@@ -22,7 +22,7 @@ namespace utils { +@@ -24,7 +24,7 @@ namespace utils { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) connectors_internals::mojom::KeyTrustLevel ParseTrustLevel( BPKUR::KeyTrustLevel trust_level) { -@@ -53,7 +53,7 @@ connectors_internals::mojom::KeyType AlgorithmToType( +@@ -63,7 +63,7 @@ std::string HashAndEncodeString(const std::string& spk } // namespace connectors_internals::mojom::KeyInfoPtr GetKeyInfo() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) auto* key_manager = g_browser_process->browser_policy_connector() ->chrome_browser_cloud_management_controller() ->GetDeviceTrustKeyManager(); diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc b/www/iridium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc index 64594f59ccf8..b436d9f93920 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 2022-12-01 10:35:46 UTC +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -117,7 +117,7 @@ +@@ -120,7 +120,7 @@ #include "chrome/browser/ui/webui/settings/chromeos/constants/routes.mojom.h" #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) #include "ui/display/screen.h" #endif -@@ -138,7 +138,7 @@ +@@ -141,7 +141,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 -@@ -224,7 +224,7 @@ void AddCommonStrings(content::WebUIDataSource* html_s +@@ -227,7 +227,7 @@ void AddCommonStrings(content::WebUIDataSource* html_s #endif html_source->AddBoolean("isChildAccount", profile->IsChild()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool allow_qt_theme = base::FeatureList::IsEnabled(ui::kAllowQt); #else bool allow_qt_theme = false; -@@ -370,7 +370,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -373,7 +373,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht {"huge", IDS_SETTINGS_HUGE_FONT_SIZE}, {"sidePanelAlignLeft", IDS_SETTINGS_SIDE_PANEL_ALIGN_LEFT}, {"sidePanelAlignRight", IDS_SETTINGS_SIDE_PANEL_ALIGN_RIGHT}, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"gtkTheme", IDS_SETTINGS_GTK_THEME}, {"useGtkTheme", IDS_SETTINGS_USE_GTK_THEME}, {"qtTheme", IDS_SETTINGS_QT_THEME}, -@@ -380,7 +380,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -383,7 +383,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht #else {"resetToDefaultTheme", IDS_SETTINGS_RESET_TO_DEFAULT_THEME}, #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, #endif #if BUILDFLAG(IS_MAC) -@@ -404,7 +404,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -407,7 +407,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) bool show_custom_chrome_frame = ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_server_side_window_decorations; diff --git a/www/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 51b1421be509..f4df8b66db0c 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 2022-10-05 07:34:01 UTC +--- chrome/browser/web_applications/extensions/extension_status_utils.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/web_applications/extensions/extension_status_utils.cc @@ -26,7 +26,7 @@ namespace { const char* g_preinstalled_app_for_testing = nullptr; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - base::Feature kChromeAppsDeprecationExcludeForceInstalls( - "ChromeAppsDeprecationExcludeForceInstalls", - base::FEATURE_DISABLED_BY_DEFAULT); -@@ -100,7 +100,7 @@ bool IsExternalExtensionUninstalled(content::BrowserCo + const char kMobilityPrintExtensionId[] = "alhngdkjgnedakdlnamimgfihgkmenbh"; + + BASE_FEATURE(kChromeAppsDeprecationExcludeForceInstalls, +@@ -102,7 +102,7 @@ bool IsExternalExtensionUninstalled(content::BrowserCo } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) bool IsExtensionUnsupportedDeprecatedApp(content::BrowserContext* context, const std::string& extension_id) { if (!base::FeatureList::IsEnabled(features::kChromeAppsDeprecation)) diff --git a/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h index 52f936df9806..f6cd021e2799 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h +++ b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h.orig 2022-04-01 07:48:30 UTC +--- chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h -@@ -44,7 +44,7 @@ void UnregisterFileHandlersWithOs(const AppId& app_id, +@@ -45,7 +45,7 @@ void UnregisterFileHandlersWithOs(const AppId& app_id, Profile* profile, ResultCallback callback); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Exposed for testing purposes. Register the set of // MIME-type-to-file-extensions mappings corresponding to |file_handlers|. File // I/O and a a callout to the Linux shell are performed asynchronously. diff --git a/www/iridium/files/patch-chrome_browser_web__applications_web__app__provider.cc b/www/iridium/files/patch-chrome_browser_web__applications_web__app__provider.cc index 4acb99c0ca5c..22508469a342 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_web__app__provider.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_web__app__provider.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/web_app_provider.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/web_applications/web_app_provider.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/browser/web_applications/web_app_provider.cc -@@ -271,7 +271,7 @@ void WebAppProvider::CreateSubsystems(Profile* profile +@@ -277,7 +277,7 @@ void WebAppProvider::CreateSubsystems(Profile* profile protocol_handler_manager.get()); std::unique_ptr url_handler_manager; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) url_handler_manager = std::make_unique(profile); #endif diff --git a/www/iridium/files/patch-chrome_common_chrome__features.cc b/www/iridium/files/patch-chrome_common_chrome__features.cc index 58be5022d0df..263974dbc356 100644 --- a/www/iridium/files/patch-chrome_common_chrome__features.cc +++ b/www/iridium/files/patch-chrome_common_chrome__features.cc @@ -1,74 +1,74 @@ ---- chrome/common/chrome_features.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/common/chrome_features.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/common/chrome_features.cc -@@ -95,7 +95,7 @@ const base::Feature kAsyncDns { - }; +@@ -107,7 +107,7 @@ BASE_FEATURE(kAsyncDns, + ); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Enables or disables the Autofill survey triggered by opening a prompt to // save address info. - const base::Feature kAutofillAddressSurvey{"AutofillAddressSurvey", -@@ -110,7 +110,7 @@ const base::Feature kAutofillPasswordSurvey{"AutofillP - base::FEATURE_DISABLED_BY_DEFAULT}; + BASE_FEATURE(kAutofillAddressSurvey, +@@ -125,7 +125,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. -@@ -268,7 +268,7 @@ const base::Feature kDesktopPWAsEnforceWebAppSettingsP +@@ -304,7 +304,7 @@ BASE_FEATURE(kDesktopPWAsEnforceWebAppSettingsPolicy, // Enables or disables Desktop PWAs to be auto-started on OS login. - const base::Feature kDesktopPWAsRunOnOsLogin { - "DesktopPWAsRunOnOsLogin", + BASE_FEATURE(kDesktopPWAsRunOnOsLogin, + "DesktopPWAsRunOnOsLogin", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT + base::FEATURE_ENABLED_BY_DEFAULT #else - base::FEATURE_DISABLED_BY_DEFAULT -@@ -289,7 +289,7 @@ const base::Feature kDesktopPWAsWebBundles{"DesktopPWA - base::FEATURE_DISABLED_BY_DEFAULT}; + base::FEATURE_DISABLED_BY_DEFAULT +@@ -328,7 +328,7 @@ BASE_FEATURE(kDesktopPWAsWebBundles, + base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Controls whether Chrome Apps are supported. See https://crbug.com/1221251. // If the feature is disabled, Chrome Apps continue to work. If enabled, Chrome // Apps will not launch and will be marked in the UI as deprecated. -@@ -311,7 +311,7 @@ const base::Feature kDisruptiveNotificationPermissionR - const base::Feature kDnsOverHttps { - "DnsOverHttps", +@@ -352,7 +352,7 @@ BASE_FEATURE(kDisruptiveNotificationPermissionRevocati + BASE_FEATURE(kDnsOverHttps, + "DnsOverHttps", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT + base::FEATURE_ENABLED_BY_DEFAULT #else - base::FEATURE_DISABLED_BY_DEFAULT -@@ -327,7 +327,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa + base::FEATURE_DISABLED_BY_DEFAULT +@@ -368,7 +368,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa const base::FeatureParam kDnsOverHttpsShowUiParam { &kDnsOverHttps, "ShowUi", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) true #else false -@@ -627,7 +627,7 @@ const base::Feature kKAnonymityServiceOHTTPRequests{ - const base::Feature kUpdateHistoryEntryPointsInIncognito{ - "UpdateHistoryEntryPointsInIncognito", base::FEATURE_ENABLED_BY_DEFAULT}; +@@ -744,7 +744,7 @@ BASE_FEATURE(kUpdateHistoryEntryPointsInIncognito, + "UpdateHistoryEntryPointsInIncognito", + base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) - COMPONENT_EXPORT(CHROME_FEATURES) - const base::Feature kLinuxLowMemoryMonitor{"LinuxLowMemoryMonitor", - base::FEATURE_DISABLED_BY_DEFAULT}; -@@ -640,7 +640,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit + BASE_FEATURE(kLinuxLowMemoryMonitor, + "LinuxLowMemoryMonitor", + base::FEATURE_DISABLED_BY_DEFAULT); +@@ -757,7 +757,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) - const base::Feature kListWebAppsSwitch{"ListWebAppsSwitch", - base::FEATURE_DISABLED_BY_DEFAULT}; - #endif + 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 1278124414b5..b63585d38391 100644 --- a/www/iridium/files/patch-chrome_common_chrome__features.h +++ b/www/iridium/files/patch-chrome_common_chrome__features.h @@ -1,47 +1,45 @@ ---- chrome/common/chrome_features.h.orig 2022-12-01 10:35:46 UTC +--- chrome/common/chrome_features.h.orig 2022-12-06 08:09:13 UTC +++ chrome/common/chrome_features.h -@@ -86,7 +86,7 @@ extern const base::Feature kAppShimNewCloseBehavior; - COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kAsyncDns; +@@ -81,13 +81,13 @@ BASE_DECLARE_FEATURE(kAppShimNewCloseBehavior); + COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAsyncDns); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - COMPONENT_EXPORT(CHROME_FEATURES) - extern const base::Feature kAutofillAddressSurvey; - COMPONENT_EXPORT(CHROME_FEATURES) -@@ -95,7 +95,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) - extern const base::Feature kAutofillPasswordSurvey; + 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) - extern const base::Feature kBackgroundModeAllowRestart; + BASE_DECLARE_FEATURE(kBackgroundModeAllowRestart); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -207,7 +207,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) - extern const base::Feature kDesktopPWAsWebBundles; +@@ -189,7 +189,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); + COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kDesktopPWAsWebBundles); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kChromeAppsDeprecation); COMPONENT_EXPORT(CHROME_FEATURES) - extern const base::Feature kChromeAppsDeprecation; - COMPONENT_EXPORT(CHROME_FEATURES) -@@ -440,7 +440,7 @@ extern const base::Feature kKAnonymityServiceOHTTPRequ + BASE_DECLARE_FEATURE(kKeepForceInstalledPreinstalledApps); +@@ -432,7 +432,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceOHTTPRequests); COMPONENT_EXPORT(CHROME_FEATURES) - extern const base::Feature kUpdateHistoryEntryPointsInIncognito; + BASE_DECLARE_FEATURE(kUpdateHistoryEntryPointsInIncognito); -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !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::Feature kLinuxLowMemoryMonitor; - COMPONENT_EXPORT(CHROME_FEATURES) -@@ -449,7 +449,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) + extern const base::FeatureParam kLinuxLowMemoryMonitorModerateLevel; +@@ -440,7 +440,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) - extern const base::Feature kListWebAppsSwitch; + 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 2ead537c0089..b4f2c6acda3d 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 2022-10-05 07:34:01 UTC +--- chrome/common/chrome_switches.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/common/chrome_switches.cc -@@ -814,14 +814,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- +@@ -831,14 +831,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon"; // Causes the browser to launch directly in guest mode. const char kGuest[] = "guest"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Writes open and installed web apps for each profile to the specified file // without launching a new browser window or tab. Pass a absolute file path to // specify where to output the information. Can be used together with optional diff --git a/www/iridium/files/patch-chrome_common_chrome__switches.h b/www/iridium/files/patch-chrome_common_chrome__switches.h index d26403ec0c96..795f625c904d 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 2022-10-05 07:34:01 UTC +--- chrome/common/chrome_switches.h.orig 2022-12-06 08:09:13 UTC +++ chrome/common/chrome_switches.h -@@ -257,12 +257,12 @@ extern const char kAllowNaClSocketAPI[]; +@@ -260,12 +260,12 @@ extern const char kAllowNaClSocketAPI[]; #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kEnableNewAppMenuIcon[]; extern const char kGuest[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kListApps[]; extern const char kProfileBaseName[]; #endif diff --git a/www/iridium/files/patch-chrome_common_extensions_permissions_chrome__permission__message__rules.cc b/www/iridium/files/patch-chrome_common_extensions_permissions_chrome__permission__message__rules.cc index 4fd6e1acc98e..1c491d279579 100644 --- a/www/iridium/files/patch-chrome_common_extensions_permissions_chrome__permission__message__rules.cc +++ b/www/iridium/files/patch-chrome_common_extensions_permissions_chrome__permission__message__rules.cc @@ -1,11 +1,11 @@ ---- chrome/common/extensions/permissions/chrome_permission_message_rules.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/common/extensions/permissions/chrome_permission_message_rules.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/common/extensions/permissions/chrome_permission_message_rules.cc -@@ -284,7 +284,7 @@ int GetEnterpriseReportingPrivatePermissionMessageId() +@@ -285,7 +285,7 @@ int GetEnterpriseReportingPrivatePermissionMessageId() } #if BUILDFLAG(IS_WIN) return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE_ENABLED_WIN; -#elif BUILDFLAG(IS_LINUX) or BUILDFLAG(IS_MAC) +#elif BUILDFLAG(IS_LINUX) or BUILDFLAG(IS_MAC) or BUILDFLAG(IS_BSD) return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE_ENABLED_LINUX_AND_MACOS; #else return IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE; diff --git a/www/iridium/files/patch-chrome_common_pref__names.cc b/www/iridium/files/patch-chrome_common_pref__names.cc index df20b3b69b0b..7edbecbf3dbf 100644 --- a/www/iridium/files/patch-chrome_common_pref__names.cc +++ b/www/iridium/files/patch-chrome_common_pref__names.cc @@ -1,56 +1,56 @@ ---- chrome/common/pref_names.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/common/pref_names.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/common/pref_names.cc -@@ -1249,7 +1249,7 @@ const char kUseAshProxy[] = "lacros.proxy.use_ash_prox +@@ -1267,7 +1267,7 @@ const char kUseAshProxy[] = "lacros.proxy.use_ash_prox // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Linux specific preference on whether we should match the system theme. const char kUsesSystemThemeDeprecated[] = "extensions.theme.use_system"; const char kSystemTheme[] = "extensions.theme.system_theme"; -@@ -1363,7 +1363,7 @@ const char kShowUpdatePromotionInfoBar[] = +@@ -1381,7 +1381,7 @@ const char kShowUpdatePromotionInfoBar[] = // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Boolean that is false if we should show window manager decorations. If // true, we draw a custom chrome frame (thicker title bar and blue border). const char kUseCustomChromeFrame[] = "browser.custom_chrome_frame"; -@@ -1866,7 +1866,7 @@ const char kDownloadDirUpgraded[] = "download.director +@@ -1886,7 +1886,7 @@ const char kDownloadDirUpgraded[] = "download.director const char kDownloadLastCompleteTime[] = "download.last_complete_time"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kOpenPdfDownloadInSystemReader[] = "download.open_pdf_in_system_reader"; #endif -@@ -2163,7 +2163,7 @@ const char kWebAppsPreferences[] = "web_apps.web_app_i +@@ -2190,7 +2190,7 @@ const char kWebAppsPreferences[] = "web_apps.web_app_i // its isolation requirements. const char kWebAppsIsolationState[] = "web_apps.isolation_state"; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) // Dictionary that maps origins to web apps that can act as URL handlers. const char kWebAppsUrlHandlerInfo[] = "web_apps.url_handler_info"; -@@ -2263,7 +2263,7 @@ const char kAmbientAuthenticationInPrivateModesEnabled +@@ -2290,7 +2290,7 @@ const char kAmbientAuthenticationInPrivateModesEnabled // requests. const char kBasicAuthOverHttpEnabled[] = "auth.basic_over_http_enabled"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Boolean that specifies whether OK-AS-DELEGATE flag from KDC is respected // along with kAuthNegotiateDelegateAllowlist. const char kAuthNegotiateDelegateByKdcPolicy[] = -@@ -3286,7 +3286,7 @@ const char kBlockAutoplayEnabled[] = "media.block_auto +@@ -3307,7 +3307,7 @@ const char kBlockAutoplayEnabled[] = "media.block_auto const char kSandboxExternalProtocolBlocked[] = "profile.sandbox_external_protocol_blocked"; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Boolean that indicates if system notifications are allowed to be used in // place of Chrome notifications. const char kAllowSystemNotifications[] = "system_notifications.allowed"; diff --git a/www/iridium/files/patch-chrome_common_pref__names.h b/www/iridium/files/patch-chrome_common_pref__names.h index 6814a248c144..650b08dc64c7 100644 --- a/www/iridium/files/patch-chrome_common_pref__names.h +++ b/www/iridium/files/patch-chrome_common_pref__names.h @@ -1,56 +1,56 @@ ---- chrome/common/pref_names.h.orig 2022-12-01 10:35:46 UTC +--- chrome/common/pref_names.h.orig 2022-12-06 08:09:13 UTC +++ chrome/common/pref_names.h -@@ -393,7 +393,7 @@ extern const char kUseAshProxy[]; +@@ -397,7 +397,7 @@ extern const char kUseAshProxy[]; #endif // BUILDFLAG(IS_CHROMEOS_LACROS) // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // TODO(https://crbug.com/1317782): Remove in M110. extern const char kUsesSystemThemeDeprecated[]; extern const char kSystemTheme[]; -@@ -420,7 +420,7 @@ extern const char kShowUpdatePromotionInfoBar[]; +@@ -424,7 +424,7 @@ extern const char kShowUpdatePromotionInfoBar[]; #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) extern const char kUseCustomChromeFrame[]; #endif #if BUILDFLAG(ENABLE_PLUGINS) -@@ -607,7 +607,7 @@ extern const char kDownloadAllowedURLsForOpenByPolicy[ +@@ -611,7 +611,7 @@ extern const char kDownloadAllowedURLsForOpenByPolicy[ extern const char kDownloadDirUpgraded[]; extern const char kDownloadLastCompleteTime[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kOpenPdfDownloadInSystemReader[]; #endif #if BUILDFLAG(IS_ANDROID) -@@ -717,7 +717,7 @@ extern const char kWebAppsUninstalledDefaultChromeApps +@@ -723,7 +723,7 @@ extern const char kWebAppsUninstalledDefaultChromeApps extern const char kWebAppsPreferences[]; extern const char kWebAppsIsolationState[]; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) extern const char kWebAppsUrlHandlerInfo[]; #endif -@@ -848,7 +848,7 @@ extern const char kGloballyScopeHTTPAuthCacheEnabled[] +@@ -854,7 +854,7 @@ extern const char kGloballyScopeHTTPAuthCacheEnabled[] extern const char kAmbientAuthenticationInPrivateModesEnabled[]; extern const char kBasicAuthOverHttpEnabled[]; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kAuthNegotiateDelegateByKdcPolicy[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -1118,7 +1118,7 @@ extern const char kBlockAutoplayEnabled[]; +@@ -1123,7 +1123,7 @@ extern const char kBlockAutoplayEnabled[]; #endif extern const char kSandboxExternalProtocolBlocked[]; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kAllowSystemNotifications[]; #endif diff --git a/www/iridium/files/patch-chrome_common_url__constants.cc b/www/iridium/files/patch-chrome_common_url__constants.cc index bddc66fb75d7..00a9a035d4e0 100644 --- a/www/iridium/files/patch-chrome_common_url__constants.cc +++ b/www/iridium/files/patch-chrome_common_url__constants.cc @@ -1,11 +1,11 @@ ---- chrome/common/url_constants.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/common/url_constants.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/common/url_constants.cc -@@ -492,7 +492,7 @@ const char kPhoneHubPermissionLearnMoreURL[] = +@@ -498,7 +498,7 @@ const char kPhoneHubPermissionLearnMoreURL[] = "https://support.google.com/chromebook/?p=multidevice"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kChromeAppsDeprecationLearnMoreURL[] = "https://support.google.com/chrome/?p=chrome_app_deprecation"; #endif diff --git a/www/iridium/files/patch-chrome_common_url__constants.h b/www/iridium/files/patch-chrome_common_url__constants.h index bf3dc04803bf..47ccfef9bdd9 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 2022-12-01 10:35:46 UTC +--- chrome/common/url_constants.h.orig 2022-12-06 08:09:13 UTC +++ chrome/common/url_constants.h -@@ -465,7 +465,7 @@ extern const char kOutdatedPluginLearnMoreURL[]; +@@ -471,7 +471,7 @@ extern const char kOutdatedPluginLearnMoreURL[]; extern const char kPhoneHubPermissionLearnMoreURL[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // "Learn more" URL for the chrome apps deprecation dialog. extern const char kChromeAppsDeprecationLearnMoreURL[]; diff --git a/www/iridium/files/patch-chrome_services_printing_print__backend__service__impl.cc b/www/iridium/files/patch-chrome_services_printing_print__backend__service__impl.cc index 800575c55c20..4d48e78c0281 100644 --- a/www/iridium/files/patch-chrome_services_printing_print__backend__service__impl.cc +++ b/www/iridium/files/patch-chrome_services_printing_print__backend__service__impl.cc @@ -1,11 +1,38 @@ ---- chrome/services/printing/print_backend_service_impl.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/services/printing/print_backend_service_impl.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/services/printing/print_backend_service_impl.cc -@@ -606,7 +606,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( +@@ -41,7 +41,7 @@ + #include "printing/backend/cups_connection_pool.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "base/no_destructor.h" + #include "ui/linux/linux_ui.h" + #include "ui/linux/linux_ui_delegate_stub.h" +@@ -62,7 +62,7 @@ namespace printing { + + namespace { + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void InstantiateLinuxUiDelegate() { + // TODO(crbug.com/809738) Until a real UI can be used in a utility process, + // need to use the stub version. +@@ -429,7 +429,7 @@ void PrintBackendServiceImpl::Init(const std::string& + // `InitCommon()`. + InitializeProcessForPrinting(); + print_backend_ = PrintBackend::CreateInstance(locale); +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Test framework already initializes the UI, so this should not go in + // `InitCommon()`. Additionally, low-level Linux UI is not needed when tests + // are using `TestPrintingContext`. +@@ -598,7 +598,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( crash_keys_ = std::make_unique( print_backend_->GetPrinterDriverInfo(*printer_name)); -#if BUILDFLAG(IS_LINUX) && defined(USE_CUPS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(USE_CUPS) // Try to fill in advanced settings based upon basic info options. PrinterBasicInfo basic_info; if (print_backend_->GetPrinterBasicInfo(*printer_name, &basic_info) == diff --git a/www/iridium/files/patch-chrome_test_BUILD.gn b/www/iridium/files/patch-chrome_test_BUILD.gn index 9dba379eb3bc..da496a52befc 100644 --- a/www/iridium/files/patch-chrome_test_BUILD.gn +++ b/www/iridium/files/patch-chrome_test_BUILD.gn @@ -1,11 +1,11 @@ ---- chrome/test/BUILD.gn.orig 2022-12-01 10:35:46 UTC +--- chrome/test/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ chrome/test/BUILD.gn -@@ -9994,7 +9994,7 @@ test("chrome_app_unittests") { +@@ -10087,7 +10087,7 @@ test("chrome_app_unittests") { "//components/heap_profiling/in_process", "//components/safe_browsing:buildflags", ] - if (!is_fuchsia) { + if (!is_fuchsia && !is_bsd) { deps += [ "//third_party/breakpad:client" ] } if (enable_gwp_asan) { diff --git a/www/iridium/files/patch-chrome_updater_device__management_dm__storage.cc b/www/iridium/files/patch-chrome_updater_device__management_dm__storage.cc deleted file mode 100644 index 24f3b5a6b605..000000000000 --- a/www/iridium/files/patch-chrome_updater_device__management_dm__storage.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/updater/device_management/dm_storage.cc.orig 2022-10-05 07:34:01 UTC -+++ chrome/updater/device_management/dm_storage.cc -@@ -70,7 +70,7 @@ bool DeleteObsoletePolicies(const base::FilePath& cach - - } // namespace - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/1276162) - implement. - DMStorage::DMStorage(const base::FilePath& policy_cache_root) - : policy_cache_root_(policy_cache_root), -@@ -215,7 +215,7 @@ DMStorage::GetOmahaPolicySettings() const { - return omaha_settings; - } - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/1276162) - implement. - scoped_refptr GetDefaultDMStorage() { - NOTIMPLEMENTED(); diff --git a/www/iridium/files/patch-chrome_updater_installer.cc b/www/iridium/files/patch-chrome_updater_installer.cc index 34be41eebb6f..b669c06085a6 100644 --- a/www/iridium/files/patch-chrome_updater_installer.cc +++ b/www/iridium/files/patch-chrome_updater_installer.cc @@ -1,11 +1,11 @@ ---- chrome/updater/installer.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/updater/installer.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/updater/installer.cc -@@ -242,7 +242,7 @@ absl::optional Installer::GetCurrentIn +@@ -250,7 +250,7 @@ absl::optional Installer::GetCurrentIn return path->AppendASCII(pv_.GetString()); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) AppInstallerResult RunApplicationInstaller( const AppInfo& /*app_info*/, diff --git a/www/iridium/files/patch-chrome_updater_util.cc b/www/iridium/files/patch-chrome_updater_util.cc index 77343a0d88d7..8feded08e87d 100644 --- a/www/iridium/files/patch-chrome_updater_util.cc +++ b/www/iridium/files/patch-chrome_updater_util.cc @@ -1,11 +1,20 @@ ---- chrome/updater/util.cc.orig 2022-12-01 10:35:46 UTC +--- chrome/updater/util.cc.orig 2022-12-06 08:09:13 UTC +++ chrome/updater/util.cc -@@ -264,7 +264,7 @@ GURL AppendQueryParameter(const GURL& url, - return url.ReplaceComponents(replacements); - } +@@ -37,7 +37,7 @@ + #include "third_party/abseil-cpp/absl/types/optional.h" + #include "url/gurl.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - - // TODO(crbug.com/1276188) - implement the functions below. - absl::optional GetBaseInstallDirectory(UpdaterScope scope) { + #include "chrome/updater/linux/linux_util.h" + #elif BUILDFLAG(IS_MAC) + #import "chrome/updater/mac/mac_util.h" +@@ -118,7 +118,7 @@ absl::optional GetBaseDataDirectory(Up + app_data_dir = GetApplicationDataDirectory(scope); + #elif BUILDFLAG(IS_MAC) + app_data_dir = GetApplicationSupportDirectory(scope); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + app_data_dir = GetApplicationDataDirectory(scope); + #endif + if (!app_data_dir) { diff --git a/www/iridium/files/patch-components_autofill__assistant_browser_autofill__assistant__impl.cc b/www/iridium/files/patch-components_autofill__assistant_browser_autofill__assistant__impl.cc index f3c2b9abe89d..26ab0d395490 100644 --- a/www/iridium/files/patch-components_autofill__assistant_browser_autofill__assistant__impl.cc +++ b/www/iridium/files/patch-components_autofill__assistant_browser_autofill__assistant__impl.cc @@ -1,11 +1,11 @@ ---- components/autofill_assistant/browser/autofill_assistant_impl.cc.orig 2022-10-05 07:34:01 UTC +--- components/autofill_assistant/browser/autofill_assistant_impl.cc.orig 2022-12-06 08:09:13 UTC +++ components/autofill_assistant/browser/autofill_assistant_impl.cc -@@ -150,7 +150,7 @@ void AutofillAssistantImpl::GetCapabilitiesByHashPrefi +@@ -161,7 +161,7 @@ void AutofillAssistantImpl::GetCapabilitiesByHashPrefi client_context.set_platform_type(ClientContextProto::PLATFORM_TYPE_ANDROID); #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) client_context.set_platform_type(ClientContextProto::PLATFORM_TYPE_DESKTOP); #endif diff --git a/www/iridium/files/patch-components_autofill_core_browser_personal__data__manager.cc b/www/iridium/files/patch-components_autofill_core_browser_personal__data__manager.cc index 692a0409c9bf..4fc05e7dbb99 100644 --- a/www/iridium/files/patch-components_autofill_core_browser_personal__data__manager.cc +++ b/www/iridium/files/patch-components_autofill_core_browser_personal__data__manager.cc @@ -1,12 +1,12 @@ ---- components/autofill/core/browser/personal_data_manager.cc.orig 2022-12-01 10:35:46 UTC +--- components/autofill/core/browser/personal_data_manager.cc.orig 2022-12-06 08:09:13 UTC +++ components/autofill/core/browser/personal_data_manager.cc -@@ -2056,7 +2056,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp +@@ -2053,7 +2053,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) // This option should only be shown for users that have not enabled the Sync // Feature and that have server credit cards available. if (!sync_service_ || sync_service_->IsSyncFeatureEnabled() || diff --git a/www/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 ac01b304581b..9c7d425280c1 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,11 +1,11 @@ ---- components/autofill/core/common/autofill_payments_features.cc.orig 2022-12-01 10:35:46 UTC +--- components/autofill/core/common/autofill_payments_features.cc.orig 2022-12-06 08:09:13 UTC +++ components/autofill/core/common/autofill_payments_features.cc -@@ -239,7 +239,7 @@ const base::FeatureParam +@@ -267,7 +267,7 @@ const base::FeatureParam bool ShouldShowImprovedUserConsentForCreditCardSave() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // The new user consent UI is fully launched on MacOS, Windows and Linux. return true; diff --git a/www/iridium/files/patch-components_crash_content_browser_BUILD.gn b/www/iridium/files/patch-components_crash_content_browser_BUILD.gn deleted file mode 100644 index 33d749a0e24b..000000000000 --- a/www/iridium/files/patch-components_crash_content_browser_BUILD.gn +++ /dev/null @@ -1,29 +0,0 @@ ---- components/crash/content/browser/BUILD.gn.orig 2022-03-28 18:11:04 UTC -+++ components/crash/content/browser/BUILD.gn -@@ -21,7 +21,7 @@ source_set("browser") { - "//content/public/common", - ] - -- if (is_linux || is_chromeos || is_android) { -+ if ((is_linux && !is_bsd) || is_chromeos || is_android) { - # Want this file on both Linux and Android. - sources += [ - "crash_handler_host_linux.cc", -@@ -37,7 +37,7 @@ source_set("browser") { - - # This is not in the GYP build but this target includes breakpad client - # headers, so add the dependency here. -- if ((is_posix && !is_ios) || is_fuchsia) { -+ if ((is_posix && !is_ios && !is_bsd) || is_fuchsia) { - configs += [ "//third_party/breakpad:client_config" ] - public_configs = [ "//third_party/breakpad:client_config" ] - } -@@ -59,7 +59,7 @@ source_set("browser") { - "//components/crash/android:jni_headers", - "//mojo/public/cpp/bindings", - ] -- } else { -+ } else if (!is_bsd) { - deps += [ "//third_party/breakpad:client" ] - } - } 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 30b2d2e796cc..06715e82407e 100644 --- a/www/iridium/files/patch-components_crash_core_app_BUILD.gn +++ b/www/iridium/files/patch-components_crash_core_app_BUILD.gn @@ -1,52 +1,43 @@ ---- components/crash/core/app/BUILD.gn.orig 2022-10-05 07:34:01 UTC +--- components/crash/core/app/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ components/crash/core/app/BUILD.gn @@ -52,7 +52,7 @@ static_library("app") { "crashpad.h", ] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { - sources += [ - "breakpad_linux.cc", - "breakpad_linux.h", -@@ -62,6 +62,10 @@ static_library("app") { + sources += [ "crashpad_linux.cc" ] + } + +@@ -65,6 +65,10 @@ static_library("app") { ] } + if (is_bsd) { + sources -= [ "crashpad.cc" ] + } + defines = [ "CRASH_IMPLEMENTATION" ] public_deps = [ ":lib" ] -@@ -93,7 +97,7 @@ static_library("app") { +@@ -96,7 +100,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", -@@ -101,7 +105,7 @@ static_library("app") { - ] - } - -- if (is_linux || is_chromeos) { -+ if ((is_linux || is_chromeos) && !is_bsd) { - deps += [ "//third_party/breakpad:client" ] - } - -@@ -221,11 +225,6 @@ if (is_mac || is_android || is_linux || is_chromeos) { +@@ -224,11 +228,6 @@ if (is_mac || is_android || is_linux || is_chromeos) { # define custom UserStreamDataSources. executable("chrome_crashpad_handler") { sources = [ "chrome_crashpad_handler.cc" ] - - deps = [ - ":crashpad_handler_main", - "//third_party/crashpad/crashpad/handler", - ] if (is_mac && (is_component_build || is_asan)) { ldflags = [ diff --git a/www/iridium/files/patch-components_crash_core_browser_crash__upload__list__crashpad.cc b/www/iridium/files/patch-components_crash_core_browser_crash__upload__list__crashpad.cc index 9be24c69ca1f..94b9507866d6 100644 --- a/www/iridium/files/patch-components_crash_core_browser_crash__upload__list__crashpad.cc +++ b/www/iridium/files/patch-components_crash_core_browser_crash__upload__list__crashpad.cc @@ -1,16 +1,26 @@ ---- components/crash/core/browser/crash_upload_list_crashpad.cc.orig 2022-03-28 18:11:04 UTC +--- components/crash/core/browser/crash_upload_list_crashpad.cc.orig 2022-12-06 08:09:13 UTC +++ components/crash/core/browser/crash_upload_list_crashpad.cc -@@ -51,9 +51,13 @@ std::vector CrashUploadListCra +@@ -37,7 +37,9 @@ CrashUploadListCrashpad::~CrashUploadListCrashpad() = + + std::vector CrashUploadListCrashpad::LoadUploadList() { + std::vector reports; ++#if !defined(OS_BSD) + crash_reporter::GetReports(&reports); ++#endif + + std::vector uploads; + for (const crash_reporter::Report& report : reports) { +@@ -51,9 +53,13 @@ std::vector CrashUploadListCra void CrashUploadListCrashpad::ClearUploadList(const base::Time& begin, const base::Time& end) { +#if !defined(OS_BSD) crash_reporter::ClearReportsBetween(begin, end); +#endif } void CrashUploadListCrashpad::RequestSingleUpload(const std::string& local_id) { +#if !defined(OS_BSD) crash_reporter::RequestSingleCrashUpload(local_id); +#endif } diff --git a/www/iridium/files/patch-components_crash_core_common_BUILD.gn b/www/iridium/files/patch-components_crash_core_common_BUILD.gn index c25c184bc44c..9d4dbecfe375 100644 --- a/www/iridium/files/patch-components_crash_core_common_BUILD.gn +++ b/www/iridium/files/patch-components_crash_core_common_BUILD.gn @@ -1,20 +1,11 @@ ---- components/crash/core/common/BUILD.gn.orig 2022-03-28 18:11:04 UTC +--- components/crash/core/common/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ components/crash/core/common/BUILD.gn @@ -8,7 +8,7 @@ import("//components/gwp_asan/buildflags/buildflags.gn declare_args() { # If set to true, this will stub out and disable the entire crash key system. - use_crash_key_stubs = is_fuchsia + use_crash_key_stubs = is_fuchsia || is_bsd } group("common") { -@@ -190,7 +190,7 @@ source_set("unit_tests") { - sources += [ "crash_key_breakpad_ios_unittest.cc" ] - deps += [ "//third_party/breakpad:client" ] - include_dirs = [ "//third_party/breakpad/breakpad/src/" ] -- } else if (!is_mac && !is_win && !is_fuchsia && !is_android) { -+ } else if (!is_mac && !is_win && !is_fuchsia && !is_android && !is_bsd) { - include_dirs = [ "//third_party/breakpad/breakpad/src/" ] - sources += [ "crash_key_breakpad_unittest.cc" ] - } diff --git a/www/iridium/files/patch-components_device__signals_core_common_signals__features.cc b/www/iridium/files/patch-components_device__signals_core_common_signals__features.cc index fb734422cea5..f8062668e365 100644 --- a/www/iridium/files/patch-components_device__signals_core_common_signals__features.cc +++ b/www/iridium/files/patch-components_device__signals_core_common_signals__features.cc @@ -1,11 +1,11 @@ ---- components/device_signals/core/common/signals_features.cc.orig 2022-10-05 07:34:01 UTC +--- components/device_signals/core/common/signals_features.cc.orig 2022-12-06 08:09:13 UTC +++ components/device_signals/core/common/signals_features.cc -@@ -18,7 +18,7 @@ const base::FeatureParam kDisableAntiVirus{&kNew +@@ -19,7 +19,7 @@ const base::FeatureParam kDisableAntiVirus{&kNew const base::FeatureParam kDisableHotfix{&kNewEvSignalsEnabled, "DisableHotfix", false}; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Enables the consent promo for sharing device signal when a managed user // signs in on an unmanaged device. This occurs after the sign-in intercept // and before the sync promo (if enabled) diff --git a/www/iridium/files/patch-components_device__signals_core_common_signals__features.h b/www/iridium/files/patch-components_device__signals_core_common_signals__features.h index d90d0f10c358..77f52909eaf4 100644 --- a/www/iridium/files/patch-components_device__signals_core_common_signals__features.h +++ b/www/iridium/files/patch-components_device__signals_core_common_signals__features.h @@ -1,11 +1,11 @@ ---- components/device_signals/core/common/signals_features.h.orig 2022-10-05 07:34:01 UTC +--- components/device_signals/core/common/signals_features.h.orig 2022-12-06 08:09:13 UTC +++ components/device_signals/core/common/signals_features.h @@ -20,7 +20,7 @@ extern const base::FeatureParam kDisableSettings extern const base::FeatureParam kDisableAntiVirus; extern const base::FeatureParam kDisableHotfix; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - extern const base::Feature kDeviceSignalsPromoAfterSigninIntercept; + BASE_DECLARE_FEATURE(kDeviceSignalsPromoAfterSigninIntercept); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-components_device__signals_test_signals__contract.cc b/www/iridium/files/patch-components_device__signals_test_signals__contract.cc new file mode 100644 index 000000000000..509c3baf2bd3 --- /dev/null +++ b/www/iridium/files/patch-components_device__signals_test_signals__contract.cc @@ -0,0 +1,11 @@ +--- components/device_signals/test/signals_contract.cc.orig 2022-12-06 08:09:13 UTC ++++ components/device_signals/test/signals_contract.cc +@@ -164,7 +164,7 @@ GetSignalsContract() { + base::BindRepeating(VerifyUnset, names::kSecureBootEnabled); + #endif + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUIDLFLAG(IS_BSD) + contract[names::kAllowScreenLock] = + base::BindRepeating(VerifyUnset, names::kAllowScreenLock); + contract[names::kImei] = base::BindRepeating(VerifyUnset, names::kImei); diff --git a/www/iridium/files/patch-components_feature__engagement_public_feature__configurations.cc b/www/iridium/files/patch-components_feature__engagement_public_feature__configurations.cc index 173ad3f587db..982fc8ec5bef 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,21 +1,21 @@ ---- components/feature_engagement/public/feature_configurations.cc.orig 2022-12-01 10:35:46 UTC +--- components/feature_engagement/public/feature_configurations.cc.orig 2022-12-06 08:09:13 UTC +++ components/feature_engagement/public/feature_configurations.cc @@ -35,7 +35,7 @@ FeatureConfig CreateAlwaysTriggerConfig(const base::Fe absl::optional GetClientSideFeatureConfig( const base::Feature* feature) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (kIPHPasswordsAccountStorageFeature.name == feature->name) { absl::optional config = FeatureConfig(); config->valid = true; -@@ -917,7 +917,8 @@ absl::optional GetClientSideFeatureConf +@@ -988,7 +988,8 @@ absl::optional GetClientSideFeatureConf #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) if (kIPHAutofillVirtualCardSuggestionFeature.name == feature->name) { // A config that allows the virtual card credit card suggestion IPH to be // shown when: 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 b509d47f59ef..2aeb53269498 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,21 +1,21 @@ ---- components/feature_engagement/public/feature_constants.cc.orig 2022-12-01 10:35:46 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2022-12-06 08:09:13 UTC +++ components/feature_engagement/public/feature_constants.cc -@@ -24,7 +24,7 @@ const base::Feature kIPHDummyFeature{"IPH_Dummy", - base::FEATURE_DISABLED_BY_DEFAULT}; +@@ -24,7 +24,7 @@ BASE_FEATURE(kUseClientConfigIPH, + BASE_FEATURE(kIPHDummyFeature, "IPH_Dummy", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - const base::Feature kIPHBatterySaverModeFeature{ - "IPH_BatterySaverMode", base::FEATURE_DISABLED_BY_DEFAULT}; - const base::Feature kIPHDesktopSharedHighlightingFeature{ -@@ -301,7 +301,8 @@ const base::Feature kIPHOverflowMenuTipFeature{ + BASE_FEATURE(kIPHBatterySaverModeFeature, + "IPH_BatterySaverMode", + base::FEATURE_DISABLED_BY_DEFAULT); +@@ -418,7 +418,8 @@ BASE_FEATURE(kIPHOverflowMenuTipFeature, #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) - const base::Feature kIPHAutofillVirtualCardSuggestionFeature{ - "IPH_AutofillVirtualCardSuggestion", base::FEATURE_ENABLED_BY_DEFAULT}; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || + BASE_FEATURE(kIPHAutofillVirtualCardSuggestionFeature, + "IPH_AutofillVirtualCardSuggestion", + base::FEATURE_ENABLED_BY_DEFAULT); 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 4c55054377ae..e8254649ba4a 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,21 +1,21 @@ ---- components/feature_engagement/public/feature_constants.h.orig 2022-12-01 10:35:46 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2022-12-06 08:09:13 UTC +++ components/feature_engagement/public/feature_constants.h -@@ -32,7 +32,7 @@ extern const base::Feature kIPHDummyFeature; - extern const base::Feature kEnableIPH; +@@ -32,7 +32,7 @@ BASE_DECLARE_FEATURE(kIPHDummyFeature); + BASE_DECLARE_FEATURE(kEnableIPH); #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) - extern const base::Feature kIPHBatterySaverModeFeature; - extern const base::Feature kIPHDesktopSharedHighlightingFeature; - extern const base::Feature kIPHDesktopTabGroupsNewGroupFeature; -@@ -182,7 +182,8 @@ extern const base::Feature kIPHOverflowMenuTipFeature; + BASE_DECLARE_FEATURE(kIPHBatterySaverModeFeature); + BASE_DECLARE_FEATURE(kIPHDesktopSharedHighlightingFeature); + BASE_DECLARE_FEATURE(kIPHDesktopTabGroupsNewGroupFeature); +@@ -183,7 +183,8 @@ BASE_DECLARE_FEATURE(kIPHOverflowMenuTipFeature); #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) - extern const base::Feature kIPHAutofillVirtualCardSuggestionFeature; + BASE_DECLARE_FEATURE(kIPHAutofillVirtualCardSuggestionFeature); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || 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 1ce40eef0a39..5be580dd7edc 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,21 +1,21 @@ ---- components/feature_engagement/public/feature_list.cc.orig 2022-12-01 10:35:46 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2022-12-06 08:09:13 UTC +++ components/feature_engagement/public/feature_list.cc -@@ -118,7 +118,7 @@ const base::Feature* const kAllFeatures[] = { +@@ -120,7 +120,7 @@ const base::Feature* const kAllFeatures[] = { &kIPHOverflowMenuTipFeature, #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) &kIPHBatterySaverModeFeature, &kIPHDesktopTabGroupsNewGroupFeature, &kIPHExtensionsMenuFeature, -@@ -145,7 +145,8 @@ const base::Feature* const kAllFeatures[] = { +@@ -152,7 +152,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) &kIPHAutofillVirtualCardSuggestionFeature, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || 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 244b2fff7992..7021a2785e5b 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,40 +1,40 @@ ---- components/feature_engagement/public/feature_list.h.orig 2022-12-01 10:35:46 UTC +--- components/feature_engagement/public/feature_list.h.orig 2022-12-06 08:09:13 UTC +++ components/feature_engagement/public/feature_list.h -@@ -216,7 +216,7 @@ DEFINE_VARIATION_PARAM(kIPHOverflowMenuTipFeature, "IP +@@ -218,7 +218,7 @@ DEFINE_VARIATION_PARAM(kIPHOverflowMenuTipFeature, "IP #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode"); DEFINE_VARIATION_PARAM(kIPHDesktopTabGroupsNewGroupFeature, "IPH_DesktopTabGroupsNewGroup"); -@@ -253,7 +253,8 @@ DEFINE_VARIATION_PARAM(kIPHWebUiHelpBubbleTestFeature, +@@ -264,7 +264,8 @@ DEFINE_VARIATION_PARAM(kIPHPriceTrackingInSidePanelFea // 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(kIPHAutofillVirtualCardSuggestionFeature, "IPH_AutofillVirtualCardSuggestion"); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || -@@ -355,7 +356,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -369,7 +370,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation VARIATION_ENTRY(kIPHFollowWhileBrowsingFeature), VARIATION_ENTRY(kIPHOverflowMenuTipFeature), #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(kIPHDesktopTabGroupsNewGroupFeature), VARIATION_ENTRY(kIPHExtensionsMenuFeature), -@@ -383,7 +384,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -402,7 +403,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(kIPHAutofillVirtualCardSuggestionFeature), #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || diff --git a/www/iridium/files/patch-components_gwp__asan_BUILD.gn b/www/iridium/files/patch-components_gwp__asan_BUILD.gn index 93e3ea4b379b..460737d2bc59 100644 --- a/www/iridium/files/patch-components_gwp__asan_BUILD.gn +++ b/www/iridium/files/patch-components_gwp__asan_BUILD.gn @@ -1,11 +1,11 @@ ---- components/gwp_asan/BUILD.gn.orig 2022-03-28 18:11:04 UTC +--- components/gwp_asan/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ components/gwp_asan/BUILD.gn -@@ -14,7 +14,7 @@ test("gwp_asan_unittests") { - "//components/gwp_asan/common:unit_tests", +@@ -15,7 +15,7 @@ test("gwp_asan_unittests") { "//testing/gtest", + "//third_party/boringssl", ] - if (is_win || is_mac || is_linux || is_chromeos || is_android) { + if ((is_win || is_mac || is_linux || is_chromeos || is_android) && !is_bsd) { deps += [ "//components/gwp_asan/client:unit_tests", "//components/gwp_asan/crash_handler:unit_tests", diff --git a/www/iridium/files/patch-components_invalidation_impl_invalidation__switches.cc b/www/iridium/files/patch-components_invalidation_impl_invalidation__switches.cc index aa4d63ea894b..30a359970e2a 100644 --- a/www/iridium/files/patch-components_invalidation_impl_invalidation__switches.cc +++ b/www/iridium/files/patch-components_invalidation_impl_invalidation__switches.cc @@ -1,11 +1,11 @@ ---- components/invalidation/impl/invalidation_switches.cc.orig 2022-03-28 18:11:04 UTC +--- components/invalidation/impl/invalidation_switches.cc.orig 2022-12-06 08:09:13 UTC +++ components/invalidation/impl/invalidation_switches.cc @@ -21,7 +21,7 @@ const int kDefaultInstanceIDTokenTTLSeconds = 14 * 24 - const base::Feature kSyncInstanceIDTokenTTL { - "SyncInstanceIDTokenTTL", + BASE_FEATURE(kSyncInstanceIDTokenTTL, + "SyncInstanceIDTokenTTL", #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 + base::FEATURE_ENABLED_BY_DEFAULT #else - base::FEATURE_DISABLED_BY_DEFAULT + base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-components_cast__channel_cast__message__util.cc b/www/iridium/files/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc similarity index 61% rename from www/iridium/files/patch-components_cast__channel_cast__message__util.cc rename to www/iridium/files/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc index fdfdea8dfc0f..23aefc4bfb92 100644 --- a/www/iridium/files/patch-components_cast__channel_cast__message__util.cc +++ b/www/iridium/files/patch-components_media__router_common_providers_cast_channel_cast__message__util.cc @@ -1,11 +1,11 @@ ---- components/cast_channel/cast_message_util.cc.orig 2022-12-01 10:35:46 UTC -+++ components/cast_channel/cast_message_util.cc +--- components/media_router/common/providers/cast/channel/cast_message_util.cc.orig 2022-12-06 08:09:13 UTC ++++ components/media_router/common/providers/cast/channel/cast_message_util.cc @@ -170,7 +170,7 @@ int GetVirtualConnectPlatformValue() { return 4; #elif BUILDFLAG(IS_CHROMEOS_ASH) return 5; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) return 6; #else return 0; diff --git a/www/iridium/files/patch-components_metrics_metrics__log.cc b/www/iridium/files/patch-components_metrics_metrics__log.cc new file mode 100644 index 000000000000..2c46ab9cdd30 --- /dev/null +++ b/www/iridium/files/patch-components_metrics_metrics__log.cc @@ -0,0 +1,38 @@ +--- components/metrics/metrics_log.cc.orig 2022-12-06 08:09:13 UTC ++++ components/metrics/metrics_log.cc +@@ -54,7 +54,7 @@ + #include "base/win/current_module.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "base/environment.h" + #include "base/nix/xdg_util.h" + #endif +@@ -144,7 +144,7 @@ void RecordCurrentTime( + } + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + metrics::SystemProfileProto::OS::XdgSessionType ToProtoSessionType( + base::nix::SessionType session_type) { + switch (session_type) { +@@ -415,7 +415,7 @@ void MetricsLog::RecordCoreSystemProfile( + // OperatingSystemVersion refers to the ChromeOS release version. + #if BUILDFLAG(IS_CHROMEOS_ASH) + os->set_kernel_version(base::SysInfo::KernelVersion()); +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) + // Linux operating system version is copied over into kernel version to be + // consistent. + os->set_kernel_version(base::SysInfo::OperatingSystemVersion()); +@@ -432,7 +432,7 @@ void MetricsLog::RecordCoreSystemProfile( + os->set_build_number(base::SysInfo::GetIOSBuildNumber()); + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + std::unique_ptr env = base::Environment::Create(); + os->set_xdg_session_type(ToProtoSessionType(base::nix::GetSessionType(*env))); + os->set_xdg_current_desktop( diff --git a/www/iridium/files/patch-components_password__manager_core_browser_login__database.cc b/www/iridium/files/patch-components_password__manager_core_browser_login__database.cc index cf9a22c3ed5e..272eaf439f1a 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_login__database.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_login__database.cc @@ -1,29 +1,29 @@ ---- components/password_manager/core/browser/login_database.cc.orig 2022-10-05 07:34:01 UTC +--- components/password_manager/core/browser/login_database.cc.orig 2022-12-06 08:09:13 UTC +++ components/password_manager/core/browser/login_database.cc -@@ -731,7 +731,7 @@ std::string GeneratePlaceholders(size_t count) { +@@ -732,7 +732,7 @@ std::string GeneratePlaceholders(size_t count) { return result; } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Fills |form| with necessary data required to be removed from the database // and returns it. PasswordForm GetFormForRemoval(sql::Statement& statement) { -@@ -748,7 +748,7 @@ PasswordForm GetFormForRemoval(sql::Statement& stateme +@@ -749,7 +749,7 @@ PasswordForm GetFormForRemoval(sql::Statement& stateme // Whether we should try to return the decryptable passwords while the // encryption service fails for some passwords. bool ShouldReturnPartialPasswords() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(features::kSkipUndecryptablePasswords); #else return false; -@@ -1577,7 +1577,7 @@ bool LoginDatabase::DeleteAndRecreateDatabaseFile() { +@@ -1578,7 +1578,7 @@ bool LoginDatabase::DeleteAndRecreateDatabaseFile() { } DatabaseCleanupResult LoginDatabase::DeleteUndecryptableLogins() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) TRACE_EVENT0("passwords", "LoginDatabase::DeleteUndecryptableLogins"); // If the Keychain in MacOS or the real secret key in Linux is unavailable, // don't delete any logins. diff --git a/www/iridium/files/patch-components_password__manager_core_browser_login__database__unittest.cc b/www/iridium/files/patch-components_password__manager_core_browser_login__database__unittest.cc index 1520263f3d3c..cc48acb32ac8 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_login__database__unittest.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_login__database__unittest.cc @@ -1,29 +1,29 @@ ---- components/password_manager/core/browser/login_database_unittest.cc.orig 2022-10-05 07:34:01 UTC +--- components/password_manager/core/browser/login_database_unittest.cc.orig 2022-12-06 08:09:13 UTC +++ components/password_manager/core/browser/login_database_unittest.cc -@@ -2092,7 +2092,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, DeleteUnd +@@ -2093,7 +2093,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, DeleteUnd base::HistogramTester histogram_tester; ASSERT_TRUE(db.Init()); -#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) +#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD) // Make sure that we can't get any logins when database is corrupted. // Disabling the checks in chromecast because encryption is unavailable. std::vector> result; -@@ -2118,7 +2118,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, DeleteUnd +@@ -2119,7 +2119,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, DeleteUnd #endif // Check histograms. -#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) +#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD) histogram_tester.ExpectUniqueSample("PasswordManager.CleanedUpPasswords", 2, 1); histogram_tester.ExpectUniqueSample( -@@ -2170,7 +2170,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, KeychainL +@@ -2171,7 +2171,7 @@ TEST_F(LoginDatabaseUndecryptableLoginsTest, KeychainL } #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Test getting auto sign in logins when there are undecryptable ones TEST_F(LoginDatabaseUndecryptableLoginsTest, GetAutoSignInLogins) { PrimaryKeyToFormMap key_to_form_map; diff --git a/www/iridium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc b/www/iridium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc index b3ce77b43180..a5441b4e905a 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc @@ -1,20 +1,20 @@ ---- components/password_manager/core/browser/sync/password_sync_bridge.cc.orig 2022-12-01 10:35:46 UTC +--- components/password_manager/core/browser/sync/password_sync_bridge.cc.orig 2022-12-06 08:09:13 UTC +++ components/password_manager/core/browser/sync/password_sync_bridge.cc -@@ -178,7 +178,7 @@ bool ShouldRecoverPasswordsDuringMerge() { +@@ -187,7 +187,7 @@ bool ShouldRecoverPasswordsDuringMerge() { // Delete the local undecryptable copy when this is MacOS only. #if BUILDFLAG(IS_MAC) return true; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled( features::kSyncUndecryptablePasswordsLinux); #else -@@ -187,7 +187,7 @@ bool ShouldRecoverPasswordsDuringMerge() { +@@ -196,7 +196,7 @@ bool ShouldRecoverPasswordsDuringMerge() { } bool ShouldCleanSyncMetadataDuringStartupWhenDecryptionFails() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return ShouldRecoverPasswordsDuringMerge() && base::FeatureList::IsEnabled( features::kForceInitialSyncWhenDecryptionFails); diff --git a/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.cc b/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.cc index 54c986450433..5e7543666717 100644 --- a/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.cc +++ b/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.cc @@ -1,28 +1,29 @@ ---- components/password_manager/core/common/password_manager_features.cc.orig 2022-12-01 10:35:46 UTC +--- components/password_manager/core/common/password_manager_features.cc.orig 2022-12-06 08:09:13 UTC +++ components/password_manager/core/common/password_manager_features.cc -@@ -83,7 +83,7 @@ const base::Feature kFillingAcrossAffiliatedWebsites{ - const base::Feature kFillOnAccountSelect = {"fill-on-account-select", - base::FEATURE_DISABLED_BY_DEFAULT}; +@@ -91,7 +91,7 @@ BASE_FEATURE(kFillOnAccountSelect, + "fill-on-account-select", + base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // When enabled, initial sync will be forced during startup if the password // store has encryption service failures. - const base::Feature kForceInitialSyncWhenDecryptionFails = { -@@ -200,14 +200,14 @@ const base::Feature kRecoverFromNeverSaveAndroid = { - const base::Feature kPasswordStrengthIndicator = { - "PasswordStrengthIndicator", base::FEATURE_DISABLED_BY_DEFAULT}; + BASE_FEATURE(kForceInitialSyncWhenDecryptionFails, +@@ -222,7 +222,7 @@ BASE_FEATURE(kPasswordStrengthIndicator, + "PasswordStrengthIndicator", + base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Displays at least the decryptable and never saved logins in the password // manager - const base::Feature kSkipUndecryptablePasswords = { - "SkipUndecryptablePasswords", base::FEATURE_DISABLED_BY_DEFAULT}; + BASE_FEATURE(kSkipUndecryptablePasswords, +@@ -230,7 +230,7 @@ BASE_FEATURE(kSkipUndecryptablePasswords, + base::FEATURE_DISABLED_BY_DEFAULT); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // When enabled, all undecryptable passwords are deleted from the local database // during initial sync flow. - const base::Feature kSyncUndecryptablePasswordsLinux = { + BASE_FEATURE(kSyncUndecryptablePasswordsLinux, diff --git a/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.h b/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.h index 8495c10313f8..cc5165f87d3d 100644 --- a/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.h +++ b/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.h @@ -1,24 +1,24 @@ ---- components/password_manager/core/common/password_manager_features.h.orig 2022-12-01 10:35:46 UTC +--- components/password_manager/core/common/password_manager_features.h.orig 2022-12-06 08:09:13 UTC +++ components/password_manager/core/common/password_manager_features.h -@@ -38,7 +38,7 @@ extern const base::Feature KEnablePasswordGenerationFo - extern const base::Feature kEnablePasswordManagerWithinFencedFrame; - extern const base::Feature kFillingAcrossAffiliatedWebsites; - extern const base::Feature kFillOnAccountSelect; +@@ -38,7 +38,7 @@ BASE_DECLARE_FEATURE(kEnablePasswordGenerationForClear + BASE_DECLARE_FEATURE(kEnablePasswordManagerWithinFencedFrame); + BASE_DECLARE_FEATURE(kFillingAcrossAffiliatedWebsites); + BASE_DECLARE_FEATURE(kFillOnAccountSelect); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - extern const base::Feature kForceInitialSyncWhenDecryptionFails; + BASE_DECLARE_FEATURE(kForceInitialSyncWhenDecryptionFails); #endif - extern const base::Feature kInferConfirmationPasswordField; -@@ -68,10 +68,10 @@ extern const base::Feature kPasswordScriptsFetching; - extern const base::Feature kPasswordsGrouping; - extern const base::Feature kPasswordStrengthIndicator; - extern const base::Feature kRecoverFromNeverSaveAndroid; + BASE_DECLARE_FEATURE(kInferConfirmationPasswordField); +@@ -65,10 +65,10 @@ BASE_DECLARE_FEATURE(kPasswordScriptsFetching); + BASE_DECLARE_FEATURE(kPasswordsGrouping); + BASE_DECLARE_FEATURE(kPasswordStrengthIndicator); + BASE_DECLARE_FEATURE(kRecoverFromNeverSaveAndroid); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - extern const base::Feature kSkipUndecryptablePasswords; + BASE_DECLARE_FEATURE(kSkipUndecryptablePasswords); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - extern const base::Feature kSyncUndecryptablePasswordsLinux; + BASE_DECLARE_FEATURE(kSyncUndecryptablePasswordsLinux); #endif #if BUILDFLAG(IS_ANDROID) diff --git a/www/iridium/files/patch-components_performance__manager_public_features.h b/www/iridium/files/patch-components_performance__manager_public_features.h index 5fc14cb6261c..b6c56fa9c683 100644 --- a/www/iridium/files/patch-components_performance__manager_public_features.h +++ b/www/iridium/files/patch-components_performance__manager_public_features.h @@ -1,11 +1,11 @@ ---- components/performance_manager/public/features.h.orig 2022-10-05 07:34:01 UTC +--- components/performance_manager/public/features.h.orig 2022-12-06 08:09:13 UTC +++ components/performance_manager/public/features.h -@@ -20,7 +20,7 @@ extern const base::Feature kRunOnMainThread; +@@ -20,7 +20,7 @@ BASE_DECLARE_FEATURE(kRunOnMainThread); #if !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define URGENT_DISCARDING_FROM_PERFORMANCE_MANAGER() false #else #define URGENT_DISCARDING_FROM_PERFORMANCE_MANAGER() true diff --git a/www/iridium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc b/www/iridium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc index 91a844077388..5681314256ba 100644 --- a/www/iridium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc +++ b/www/iridium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc @@ -1,11 +1,11 @@ ---- components/policy/core/browser/policy_pref_mapping_test.cc.orig 2022-10-05 07:34:01 UTC +--- components/policy/core/browser/policy_pref_mapping_test.cc.orig 2022-12-06 08:09:13 UTC +++ components/policy/core/browser/policy_pref_mapping_test.cc -@@ -338,7 +338,7 @@ class PolicyTestCase { +@@ -337,7 +337,7 @@ class PolicyTestCase { const std::string os("chromeos_lacros"); #elif BUILDFLAG(IS_IOS) const std::string os("ios"); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const std::string os("linux"); #elif BUILDFLAG(IS_MAC) const std::string os("mac"); diff --git a/www/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 065abd98a0fe..30dd43ef70ba 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 2022-10-05 07:34:01 UTC +--- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2022-12-06 08:09:13 UTC +++ components/policy/core/common/cloud/cloud_policy_client.cc -@@ -447,7 +447,7 @@ void CloudPolicyClient::FetchPolicy() { +@@ -448,7 +448,7 @@ void CloudPolicyClient::FetchPolicy() { fetch_request->set_invalidation_payload(invalidation_payload_); } } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Only set browser device identifier for CBCM Chrome cloud policy on // desktop. if (type_to_fetch.first == diff --git a/www/iridium/files/patch-components_policy_resources_policy__templates.json b/www/iridium/files/patch-components_policy_resources_policy__templates.json index dbae79da800e..656e065f9535 100644 --- a/www/iridium/files/patch-components_policy_resources_policy__templates.json +++ b/www/iridium/files/patch-components_policy_resources_policy__templates.json @@ -1,200 +1,200 @@ ---- components/policy/resources/policy_templates.json.orig 2022-12-01 10:35:46 UTC +--- components/policy/resources/policy_templates.json.orig 2022-12-06 08:09:13 UTC +++ components/policy/resources/policy_templates.json -@@ -1450,7 +1450,7 @@ +@@ -1454,7 +1454,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pastarmovj@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win7:11-', 'chrome.mac:11-', 'chrome.linux:11-'], + 'supported_on': ['chrome.win7:11-', 'chrome.mac:11-', 'chrome.linux:11-', 'chrome.openbsd:11-', 'chrome.freebsd:11-'], 'future_on': ['fuchsia'], 'features': { 'dynamic_refresh': True, -@@ -2600,7 +2600,7 @@ +@@ -2604,7 +2604,7 @@ 'owners': ['file://remoting/OWNERS', 'jamiewalch@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:25-', 'chrome.mac:25-'], + 'supported_on': ['chrome.linux:25-', 'chrome.mac:25-', 'chrome.openbsd:25-', 'chrome.freebsd:25-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -4420,7 +4420,7 @@ +@@ -4455,7 +4455,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pastarmovj@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:57-', 'chrome.mac:88-', 'chrome.linux:88-'], + 'supported_on': ['chrome.win:57-', 'chrome.mac:88-', 'chrome.linux:88-', 'chrome.openbsd:88-', 'chrome.freebsd:88-'], 'future_on': ['fuchsia'], 'features': { 'dynamic_refresh': False, -@@ -4450,7 +4450,7 @@ +@@ -4485,7 +4485,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pastarmovj@chromium.org'], 'type': 'string', 'schema': { 'type': 'string' }, - 'supported_on': ['chrome.win:57-', 'chrome.mac:88-', 'chrome.linux:88-'], + 'supported_on': ['chrome.win:57-', 'chrome.mac:88-', 'chrome.linux:88-', 'chrome.openbsd:88-', 'chrome.freebsd:88-'], 'features': { 'dynamic_refresh': False, 'per_profile': False, -@@ -5434,7 +5434,7 @@ +@@ -5469,7 +5469,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'rsorokin@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:74-','chrome.mac:74-','chrome_os:74-'], + 'supported_on': ['chrome.linux:74-','chrome.mac:74-','chrome_os:74-','chrome.openbsd:74-','chrome.freebsd:74-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -5496,7 +5496,7 @@ +@@ -5531,7 +5531,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'rsorokin@chromium.org'], 'type': 'string', 'schema': { 'type': 'string' }, - 'supported_on': ['chrome.linux:9-'], + 'supported_on': ['chrome.linux:9-','chrome.openbsd:9-','chrome.freebsd:9-'], 'features': { 'dynamic_refresh': False, 'per_profile': False, -@@ -5563,7 +5563,7 @@ +@@ -5598,7 +5598,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'rsorokin@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:63-','chrome.mac:63-','chrome_os:63-','android:63-','webview_android:63-'], + 'supported_on': ['chrome.linux:63-','chrome.mac:63-','chrome_os:63-','android:63-','webview_android:63-','chrome.openbsd:63-','chrome.freebsd:63-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -11183,7 +11183,7 @@ +@@ -11250,7 +11250,7 @@ 'owners': ['file://net/cert/OWNERS', 'rsleevi@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome_os:30-', 'chrome.linux:30-', 'chrome.win:30-'], + 'supported_on': ['chrome_os:30-', 'chrome.linux:30-', 'chrome.win:30-', 'chrome.openbsd:30-', 'chrome.freebsd:30-'], 'future_on': ['fuchsia'], 'features': { 'dynamic_refresh': True, -@@ -11308,7 +11308,7 @@ +@@ -11375,7 +11375,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pmarko@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome_os:77-83', 'chrome.linux:79-83', 'chrome.mac:83-106'], + 'supported_on': ['chrome_os:77-83', 'chrome.linux:79-83', 'chrome.mac:83-106', 'chrome.openbsd:79-83', 'chrome.freebsd:79-83'], 'deprecated': True, 'features': { 'dynamic_refresh': False, -@@ -13738,7 +13738,7 @@ +@@ -13901,7 +13901,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pmarko@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:19-', 'chrome.linux:19-'], + 'supported_on': ['chrome.win:19-', 'chrome.linux:19-', 'chrome.openbsd:19-', 'chrome.freebsd:19-'], 'features': { 'can_be_recommended': True, 'dynamic_refresh': True, -@@ -14608,7 +14608,7 @@ +@@ -14970,7 +14970,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'bartfab@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:31-', 'chrome.linux:31-', 'chrome_os:31-'], + 'supported_on': ['chrome.win:31-', 'chrome.linux:31-', 'chrome_os:31-', 'chrome.openbsd:31-', 'chrome.freebsd:31-'], 'future_on': ['fuchsia'], 'features': { 'dynamic_refresh': True, -@@ -17483,7 +17483,7 @@ +@@ -18548,7 +18548,7 @@ 'deprecated': True, 'schema': { 'type': 'boolean' }, 'supported_on': ['chrome.win:64-', 'chrome.mac:66-', 'android:65-'], - 'future_on': ['chrome.linux'], + 'future_on': ['chrome.linux','chrome.openbsd','chrome.freebsd'], 'features': { 'dynamic_refresh': False, 'per_profile': False, -@@ -21716,7 +21716,7 @@ +@@ -23132,7 +23132,7 @@ 'items': { 'type': 'string' } }, # Spell checking is provided by macOS, so can't be controlled on Mac. - 'supported_on': ['chrome.win:65-', 'chrome.linux:65-', 'chrome_os:65-'], + 'supported_on': ['chrome.win:65-', 'chrome.linux:65-', 'chrome_os:65-', 'chrome.openbsd:65-', 'chrome.freebsd:65-'], 'features': { 'can_be_recommended': False, 'dynamic_refresh': True, -@@ -21747,7 +21747,7 @@ +@@ -23163,7 +23163,7 @@ 'items': { 'type': 'string' } }, # Spell checking is provided by macOS, so can't be controlled on Mac. - 'supported_on': ['chrome.win:75-100', 'chrome.linux:75-100', 'chrome_os:75-100'], + 'supported_on': ['chrome.win:75-100', 'chrome.linux:75-100', 'chrome_os:75-100', 'chrome.openbsd:75-100', 'chrome.freebsd:75-100'], 'deprecated': True, 'features': { 'can_be_recommended': False, -@@ -21781,7 +21781,7 @@ +@@ -23197,7 +23197,7 @@ 'items': { 'type': 'string' } }, # Spell checking is provided by macOS, so can't be controlled on Mac. - 'supported_on': ['chrome.win:86-', 'chrome.linux:86-', 'chrome_os:86-'], + 'supported_on': ['chrome.win:86-', 'chrome.linux:86-', 'chrome_os:86-', 'chrome.openbsd:86-', 'chrome.freebsd:86-'], 'features': { 'can_be_recommended': False, 'dynamic_refresh': True, -@@ -22565,7 +22565,7 @@ +@@ -24076,7 +24076,7 @@ 'owners': ['fbeaufort@chromium.org', 'beccahughes@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:66-', 'chrome.linux:66-', 'chrome.mac:66-', 'chrome_os:66-'], + 'supported_on': ['chrome.win:66-', 'chrome.linux:66-', 'chrome.mac:66-', 'chrome_os:66-', 'chrome.openbsd:66-', 'chrome.freebsd:66-'], 'future_on': ['fuchsia'], 'features': { 'dynamic_refresh': True, -@@ -27314,7 +27314,7 @@ +@@ -29297,7 +29297,7 @@ 'owners': ['file://services/audio/OWNERS', 'dalecurtis@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:79-', 'chrome.linux:79-', 'chrome.mac:79-'], + 'supported_on': ['chrome.win:79-', 'chrome.linux:79-', 'chrome.mac:79-', 'chrome.openbsd:79-', 'chrome.freebsd:79-'], 'features': { 'dynamic_refresh': False, 'per_profile': False, -@@ -28714,7 +28714,7 @@ If this policy is left unset, privacy screen is disabl +@@ -30795,7 +30795,7 @@ If this policy is left unset, privacy screen is disabl 'owners': ['file://chrome/browser/notifications/OWNERS', 'knollr@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:83-100'], + 'supported_on': ['chrome.linux:83-100','chrome.openbsd:83-100','chrome.freebsd:83-100'], 'features': { 'dynamic_refresh': True, 'per_profile': True, -@@ -28738,7 +28738,7 @@ If set to False, $1Google +@@ -30819,7 +30819,7 @@ If set to False, $1Google 'owners': ['file://chrome/browser/notifications/OWNERS'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:90-'], + 'supported_on': ['chrome.linux:90-','chrome.openbsd:90-','chrome.freebsd:90-'], 'features': { 'dynamic_refresh': True, 'per_profile': True, -@@ -29848,7 +29848,7 @@ If you disable this policy, web page scrolling to spec +@@ -32044,7 +32044,7 @@ If you disable this policy, web page scrolling to spec 'owners': ['asumaneev@google.com'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:91-92', 'chrome_os:91-'], + 'supported_on': ['chrome.linux:91-92', 'chrome_os:91-', 'chrome.openbsd:91-', 'chrome.freebsd:91-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -31206,7 +31206,7 @@ This is the same behavior as GetDeviceQueue() ->GetVulkanPhysicalDevice(), VK_IMAGE_TILING_OPTIMAL, ycbcr_info); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Textures that were allocated _on linux_ with ycbcr info came from // VaapiVideoDecoder, which exports using DRM format modifiers. return GrBackendFormat::MakeVk(gr_ycbcr_info, +@@ -1180,7 +1180,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor + return GrBackendFormat::MakeMtl(ToMTLPixelFormat(resource_format)); + #endif + } else { +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + // Skip the check as ycbcr info is always set by `VaapiVideoDecoder` on + // Linux. + DCHECK(!ycbcr_info); 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 7aac703770e0..7235267a4025 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 2022-12-01 10:35:46 UTC +--- components/viz/service/display/skia_renderer.cc.orig 2022-12-06 08:09:13 UTC +++ components/viz/service/display/skia_renderer.cc -@@ -1135,7 +1135,7 @@ void SkiaRenderer::ClearFramebuffer() { +@@ -1129,7 +1129,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 72e4e756e592..6fa3dc90f1dc 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 2022-10-05 07:34:01 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2022-12-06 08:09:13 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -@@ -97,7 +97,7 @@ RootCompositorFrameSinkImpl::Create( +@@ -98,7 +98,7 @@ RootCompositorFrameSinkImpl::Create( // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // For X11, we need notify client about swap completion after resizing, so the // client can use it for synchronize with X11 WM. output_surface->SetNeedsSwapSizeNotifications(true); -@@ -576,7 +576,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw +@@ -577,7 +577,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw display_client_->DidCompleteSwapWithSize(pixel_size); // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (display_client_ && pixel_size != last_swap_pixel_size_) { last_swap_pixel_size_ = pixel_size; display_client_->DidCompleteSwapWithNewSize(last_swap_pixel_size_); diff --git a/www/iridium/files/patch-content_app_content__main__runner__impl.cc b/www/iridium/files/patch-content_app_content__main__runner__impl.cc index 73db1536fbb1..c461e0776968 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,120 +1,120 @@ ---- content/app/content_main_runner_impl.cc.orig 2022-12-01 10:35:46 UTC +--- content/app/content_main_runner_impl.cc.orig 2022-12-06 08:09:13 UTC +++ content/app/content_main_runner_impl.cc -@@ -133,13 +133,13 @@ +@@ -135,13 +135,13 @@ #include "base/posix/global_descriptors.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/native_library.h" #include "base/rand_util.h" #include "content/public/common/zygote/sandbox_support_linux.h" -@@ -178,6 +178,10 @@ +@@ -180,6 +180,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" -@@ -375,7 +379,7 @@ void InitializeZygoteSandboxForBrowserProcess( +@@ -382,7 +386,7 @@ void InitializeZygoteSandboxForBrowserProcess( } #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) -#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 -@@ -411,7 +415,7 @@ void PreloadLibraryCdms() { +@@ -418,7 +422,7 @@ void PreloadLibraryCdms() { } #endif // BUILDFLAG(ENABLE_LIBRARY_CDMS) -#if BUILDFLAG(USE_ZYGOTE_HANDLE) +#if BUILDFLAG(USE_ZYGOTE_HANDLE) || BUILDFLAG(IS_BSD) void PreSandboxInit() { // Pre-acquire resources needed by BoringSSL. See // https://boringssl.googlesource.com/boringssl/+/HEAD/SANDBOXING.md -@@ -427,6 +431,11 @@ void PreSandboxInit() { +@@ -441,6 +445,11 @@ void PreSandboxInit() { + } #endif - InitializeWebRtcModule(); +#if BUILDFLAG(IS_BSD) + // "cache" the amount of physical memory before pledge(2) + base::SysInfo::AmountOfPhysicalMemoryMB(); +#endif + // Set the android SkFontMgr for blink. We need to ensure this is done // before the sandbox is initialized to allow the font manager to access // font configuration files on disk. -@@ -609,7 +618,7 @@ int NO_STACK_PROTECTOR RunZygote(ContentMainDelegate* +@@ -623,7 +632,7 @@ int NO_STACK_PROTECTOR RunZygote(ContentMainDelegate* delegate->ZygoteStarting(&zygote_fork_delegates); media::InitializeMediaLibrary(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) PreSandboxInit(); #endif -@@ -803,11 +812,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -817,11 +826,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam kFieldTrialDescriptor + base::GlobalDescriptors::kBaseDescriptor); #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) g_fds->Set(kCrashDumpSignal, kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); -#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || - // BUILDFLAG(IS_OPENBSD) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #endif // !BUILDFLAG(IS_WIN) -@@ -990,6 +998,16 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -1007,6 +1015,16 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam } #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_HANDLE) -@@ -1053,7 +1071,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1070,7 +1088,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { 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 -@@ -1086,6 +1104,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1103,6 +1121,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { content_main_params_.reset(); RegisterMainThreadFactories(); + +#if BUILDFLAG(IS_BSD) + if (!process_type.empty()) + PreSandboxInit(); +#endif if (process_type.empty()) return RunBrowser(std::move(main_params), start_minimal_browser); diff --git a/www/iridium/files/patch-content_browser_BUILD.gn b/www/iridium/files/patch-content_browser_BUILD.gn index b1fca970b069..fd803112bdb9 100644 --- a/www/iridium/files/patch-content_browser_BUILD.gn +++ b/www/iridium/files/patch-content_browser_BUILD.gn @@ -1,16 +1,16 @@ ---- content/browser/BUILD.gn.orig 2022-12-01 10:35:46 UTC +--- content/browser/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ content/browser/BUILD.gn -@@ -2484,6 +2484,13 @@ source_set("browser") { +@@ -2491,6 +2491,13 @@ source_set("browser") { ] } + if (is_bsd) { + sources -= [ + "sandbox_ipc_linux.cc", + "sandbox_ipc_linux.h", + ] + } + if (is_chromeos) { deps += [ "//components/value_store:value_store" ] sources += [ 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 598383584dd8..99ee6d13915b 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,11 +1,11 @@ ---- content/browser/browser_child_process_host_impl.cc.orig 2022-10-05 07:34:01 UTC +--- content/browser/browser_child_process_host_impl.cc.orig 2022-12-06 08:09:13 UTC +++ content/browser/browser_child_process_host_impl.cc -@@ -307,6 +307,8 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo +@@ -316,6 +316,8 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo switches::kDisableBestEffortTasks, switches::kDisableLogging, switches::kEnableLogging, + switches::kDisableUnveil, + switches::kTrk, switches::kIPCConnectionTimeout, switches::kLogBestEffortTasks, switches::kLogFile, 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 b638886bcb20..8bd9a9b7ae5b 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 2022-12-01 10:35:46 UTC +--- content/browser/browser_main_loop.cc.orig 2022-12-06 08:09:13 UTC +++ content/browser/browser_main_loop.cc -@@ -241,6 +241,12 @@ +@@ -242,6 +242,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 -@@ -524,6 +530,12 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -526,6 +532,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 -@@ -555,7 +567,7 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -557,7 +569,7 @@ int BrowserMainLoop::EarlyInitialization() { base::PlatformThread::SetCurrentThreadType(base::ThreadType::kCompositing); #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // We use quite a few file descriptors for our IPC as well as disk the disk // cache,and the default limit on the Mac is low (256), so bump it up. diff --git a/www/iridium/files/patch-content_browser_compositor_viz__process__transport__factory.cc b/www/iridium/files/patch-content_browser_compositor_viz__process__transport__factory.cc index 0789cc6a1dd4..05c74fd91983 100644 --- a/www/iridium/files/patch-content_browser_compositor_viz__process__transport__factory.cc +++ b/www/iridium/files/patch-content_browser_compositor_viz__process__transport__factory.cc @@ -1,11 +1,11 @@ ---- content/browser/compositor/viz_process_transport_factory.cc.orig 2022-12-01 10:35:46 UTC +--- content/browser/compositor/viz_process_transport_factory.cc.orig 2022-12-06 08:09:13 UTC +++ content/browser/compositor/viz_process_transport_factory.cc -@@ -115,7 +115,7 @@ class HostDisplayClient : public viz::HostDisplayClien +@@ -118,7 +118,7 @@ class HostDisplayClient : public viz::HostDisplayClien // viz::HostDisplayClient: // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) void DidCompleteSwapWithNewSize(const gfx::Size& size) override { compositor_->OnCompleteSwapWithNewSize(size); } 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 f5a380d70d65..76a66502446b 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 2022-12-01 10:35:46 UTC +--- content/browser/gpu/gpu_process_host.cc.orig 2022-12-06 08:09:13 UTC +++ content/browser/gpu/gpu_process_host.cc -@@ -249,6 +249,7 @@ static const char* const kSwitchNames[] = { +@@ -255,6 +255,7 @@ static const char* const kSwitchNames[] = { switches::kEnableBackgroundThreadPool, switches::kEnableGpuRasterization, switches::kEnableLogging, + switches::kDisableUnveil, switches::kEnableDeJelly, switches::kDeJellyScreenWidth, switches::kDoubleBufferCompositing, -@@ -282,7 +283,7 @@ static const char* const kSwitchNames[] = { +@@ -288,7 +289,7 @@ static const char* const kSwitchNames[] = { switches::kOzoneDumpFile, switches::kDisableBufferBWCompression, #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_renderer__host_render__message__filter.cc b/www/iridium/files/patch-content_browser_renderer__host_render__message__filter.cc index 96df4aa1da41..7dff6c05f29b 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_render__message__filter.cc +++ b/www/iridium/files/patch-content_browser_renderer__host_render__message__filter.cc @@ -1,29 +1,29 @@ ---- content/browser/renderer_host/render_message_filter.cc.orig 2022-10-05 07:34:01 UTC +--- content/browser/renderer_host/render_message_filter.cc.orig 2022-12-06 08:09:13 UTC +++ content/browser/renderer_host/render_message_filter.cc @@ -66,7 +66,7 @@ #if BUILDFLAG(IS_MAC) #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/linux_util.h" #include "base/threading/platform_thread.h" #endif -@@ -128,7 +128,7 @@ void RenderMessageFilter::GenerateFrameRoutingID( - std::move(callback).Run(routing_id, frame_token, devtools_frame_token); +@@ -130,7 +130,7 @@ void RenderMessageFilter::GenerateFrameRoutingID( + document_token); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void RenderMessageFilter::SetThreadTypeOnWorkerThread( base::PlatformThreadId ns_tid, base::ThreadType thread_type) { -@@ -149,7 +149,7 @@ void RenderMessageFilter::SetThreadTypeOnWorkerThread( +@@ -151,7 +151,7 @@ void RenderMessageFilter::SetThreadTypeOnWorkerThread( } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void RenderMessageFilter::SetThreadType(int32_t ns_tid, base::ThreadType thread_type) { constexpr base::TaskTraits kTraits = { 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 1848006a9a0f..95da62772bfd 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.cc +++ b/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.cc @@ -1,56 +1,56 @@ ---- content/browser/renderer_host/render_process_host_impl.cc.orig 2022-12-01 10:35:46 UTC +--- content/browser/renderer_host/render_process_host_impl.cc.orig 2022-12-06 08:09:13 UTC +++ content/browser/renderer_host/render_process_host_impl.cc -@@ -212,7 +212,7 @@ +@@ -213,7 +213,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 -@@ -1136,7 +1136,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = +@@ -1137,7 +1137,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; -@@ -1223,7 +1223,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1224,7 +1224,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (auto font_receiver = receiver.As()) { ConnectToFontService(std::move(font_receiver)); return; -@@ -2118,7 +2118,7 @@ void RenderProcessHostImpl::ReinitializeLogging( +@@ -2119,7 +2119,7 @@ void RenderProcessHostImpl::ReinitializeLogging( } #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void RenderProcessHostImpl::CreateStableVideoDecoder( mojo::PendingReceiver receiver) { if (!stable_video_decoder_factory_remote_.is_bound()) { -@@ -3258,6 +3258,8 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin +@@ -3269,6 +3269,8 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, switches::kDisableTouchDragDrop, + switches::kDisableUnveil, + switches::kTrk, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, switches::kDisableWebGLImageChromium, -@@ -4732,7 +4734,7 @@ void RenderProcessHostImpl::ResetIPC() { +@@ -4742,7 +4744,7 @@ void RenderProcessHostImpl::ResetIPC() { coordinator_connector_receiver_.reset(); tracing_registration_.reset(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) stable_video_decoder_factory_remote_.reset(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/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 da37a7d7fb1c..d8358dd695ea 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,38 +1,38 @@ ---- content/browser/renderer_host/render_process_host_impl.h.orig 2022-12-01 10:35:46 UTC +--- content/browser/renderer_host/render_process_host_impl.h.orig 2022-12-06 08:09:13 UTC +++ content/browser/renderer_host/render_process_host_impl.h @@ -83,7 +83,7 @@ #include "content/public/browser/android/child_process_importance.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "media/mojo/mojom/stable/stable_video_decoder.mojom.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -479,7 +479,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -480,7 +480,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) -@@ -678,7 +678,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -679,7 +679,7 @@ class CONTENT_EXPORT RenderProcessHostImpl mojo::PendingReceiver receiver) override; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void CreateStableVideoDecoder( mojo::PendingReceiver receiver) override; -@@ -1133,7 +1133,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -1134,7 +1134,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // RenderProcessHost. This is destroyed early in ResetIPC() method. std::unique_ptr permission_service_context_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Connection to the StableVideoDecoderFactory that lives in a utility // process. This is only used for out-of-process video decoding. mojo::Remote diff --git a/www/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 ab8a119c9d45..ebfaa69f4eec 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 2022-12-01 10:35:46 UTC +--- content/browser/renderer_host/render_view_host_impl.cc.orig 2022-12-06 08:09:13 UTC +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -254,7 +254,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( +@@ -253,7 +253,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( display::win::ScreenWin::GetSystemMetricsInDIP(SM_CYVSCROLL); prefs->arrow_bitmap_width_horizontal_scroll_bar_in_dips = display::win::ScreenWin::GetSystemMetricsInDIP(SM_CXHSCROLL); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) prefs->system_font_family_name = gfx::Font().GetFontName(); #elif BUILDFLAG(IS_FUCHSIA) // Make Blink's "focus ring" invisible. The focus ring is a hairline border diff --git a/www/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 0979fafa0a3a..17bf6d66bc26 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 2022-12-01 10:35:46 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2022-12-06 08:09:13 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -116,7 +116,7 @@ +@@ -118,7 +118,7 @@ #include "ui/gfx/gdi_util.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/browser/accessibility/browser_accessibility_auralinux.h" #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/linux/linux_ui.h" -@@ -449,7 +449,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge +@@ -451,7 +451,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge return ToBrowserAccessibilityWin(manager->GetBrowserAccessibilityRoot()) ->GetCOM(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BrowserAccessibilityManager* manager = host()->GetOrCreateRootBrowserAccessibilityManager(); if (manager && manager->GetBrowserAccessibilityRoot()) -@@ -1587,7 +1587,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { +@@ -1589,7 +1589,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { return GetTextInputManager() && GetTextInputManager()->should_do_learning(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool RenderWidgetHostViewAura::SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) { -@@ -2407,7 +2407,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -2415,7 +2415,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; -@@ -2584,7 +2584,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -2592,7 +2592,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit if (!target_host) return; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* linux_ui = ui::LinuxUi::instance(); std::vector commands; if (!event.skip_in_browser && linux_ui && event.os_event && diff --git a/www/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 8038dcf3c9df..c3a1a56046f0 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,70 +1,81 @@ ---- content/browser/zygote_host/zygote_host_impl_linux.cc.orig 2022-03-28 18:11:04 UTC +--- content/browser/zygote_host/zygote_host_impl_linux.cc.orig 2022-12-06 08:09:13 UTC +++ content/browser/zygote_host/zygote_host_impl_linux.cc -@@ -28,6 +28,7 @@ namespace content { +@@ -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" +@@ -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, -@@ -49,6 +50,7 @@ bool ReceiveFixedMessage(int fd, +@@ -59,6 +62,7 @@ bool ReceiveFixedMessage(int fd, return false; return true; } +#endif } // namespace -@@ -58,9 +60,13 @@ ZygoteHost* ZygoteHost::GetInstance() { +@@ -68,9 +72,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_() {} -@@ -73,6 +79,7 @@ ZygoteHostImpl* ZygoteHostImpl::GetInstance() { +@@ -83,6 +91,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; } -@@ -123,6 +130,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& com +@@ -133,6 +142,7 @@ void ZygoteHostImpl::Init(const base::CommandLine& com "you can try using --" << sandbox::policy::switches::kNoSandbox << "."; } +#endif } void ZygoteHostImpl::AddZygotePid(pid_t pid) { -@@ -147,6 +155,7 @@ pid_t ZygoteHostImpl::LaunchZygote( +@@ -157,6 +167,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, 0, fds)); CHECK(base::UnixDomainSocket::EnableReceiveProcessId(fds[0])); -@@ -214,9 +223,12 @@ pid_t ZygoteHostImpl::LaunchZygote( +@@ -224,9 +235,12 @@ pid_t ZygoteHostImpl::LaunchZygote( AddZygotePid(pid); return pid; +#else + return 0; +#endif } -#if !BUILDFLAG(IS_OPENBSD) +#if !BUILDFLAG(IS_BSD) void ZygoteHostImpl::AdjustRendererOOMScore(base::ProcessHandle pid, int score) { // 1) You can't change the oom_score_adj of a non-dumpable process diff --git a/www/iridium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.h b/www/iridium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.h index 986f903f60cf..5648a37f553e 100644 --- a/www/iridium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.h +++ b/www/iridium/files/patch-content_browser_zygote__host_zygote__host__impl__linux.h @@ -1,25 +1,29 @@ ---- content/browser/zygote_host/zygote_host_impl_linux.h.orig 2022-03-28 18:11:04 UTC +--- content/browser/zygote_host/zygote_host_impl_linux.h.orig 2022-12-06 08:09:13 UTC +++ content/browser/zygote_host/zygote_host_impl_linux.h -@@ -42,8 +42,10 @@ class CONTENT_EXPORT ZygoteHostImpl : public ZygoteHos +@@ -47,12 +47,14 @@ class CONTENT_EXPORT ZygoteHostImpl : public ZygoteHos base::ScopedFD* control_fd, base::FileHandleMappingVector additional_remapped_fds); -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) void AdjustRendererOOMScore(base::ProcessHandle process_handle, int score) override; + #if BUILDFLAG(IS_CHROMEOS_ASH) + void ReinitializeLogging(uint32_t logging_dest, + base::PlatformFile log_file_fd) override; + #endif +#endif + bool HasZygote() { return !zygote_pids_.empty(); } - private: -@@ -57,9 +59,11 @@ class CONTENT_EXPORT ZygoteHostImpl : public ZygoteHos +@@ -67,9 +69,11 @@ class CONTENT_EXPORT ZygoteHostImpl : public ZygoteHos int renderer_sandbox_status_; -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) bool use_namespace_sandbox_; bool use_suid_sandbox_; bool use_suid_sandbox_for_adj_oom_score_; +#endif std::string sandbox_binary_; // This lock protects the |zygote_pids_| set. diff --git a/www/iridium/files/patch-content_gpu_gpu__main.cc b/www/iridium/files/patch-content_gpu_gpu__main.cc index b9292f510dff..61f2a9752e19 100644 --- a/www/iridium/files/patch-content_gpu_gpu__main.cc +++ b/www/iridium/files/patch-content_gpu_gpu__main.cc @@ -1,47 +1,47 @@ ---- content/gpu/gpu_main.cc.orig 2022-10-05 07:34:01 UTC +--- content/gpu/gpu_main.cc.orig 2022-12-06 08:09:13 UTC +++ content/gpu/gpu_main.cc -@@ -86,7 +86,7 @@ +@@ -87,7 +87,7 @@ #include "sandbox/win/src/sandbox.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/gpu/gpu_sandbox_hook_linux.h" #include "sandbox/policy/linux/sandbox_linux.h" #include "sandbox/policy/sandbox_type.h" -@@ -108,7 +108,7 @@ namespace content { +@@ -109,7 +109,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&); -@@ -170,7 +170,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel +@@ -171,7 +171,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_); -@@ -266,7 +266,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -268,7 +268,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 -@@ -401,7 +401,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -403,7 +403,7 @@ int GpuMain(MainFunctionParams parameters) { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) { diff --git a/www/iridium/files/patch-content_gpu_gpu__sandbox__hook__linux.cc b/www/iridium/files/patch-content_gpu_gpu__sandbox__hook__linux.cc index 204b36e6b6cc..90ff8bc2a152 100644 --- a/www/iridium/files/patch-content_gpu_gpu__sandbox__hook__linux.cc +++ b/www/iridium/files/patch-content_gpu_gpu__sandbox__hook__linux.cc @@ -1,70 +1,70 @@ ---- content/gpu/gpu_sandbox_hook_linux.cc.orig 2022-12-01 10:35:46 UTC +--- content/gpu/gpu_sandbox_hook_linux.cc.orig 2022-12-06 08:09:13 UTC +++ content/gpu/gpu_sandbox_hook_linux.cc -@@ -121,6 +121,7 @@ void AddStandardChromeOsPermissions( +@@ -126,6 +126,7 @@ void AddStandardChromeOsPermissions( permissions->push_back(BrokerFilePermission::ReadOnly(kAngleGlesPath)); } +#if !defined(OS_BSD) void AddV4L2GpuPermissions( std::vector* permissions, const sandbox::policy::SandboxSeccompBPF::Options& options) { -@@ -440,8 +441,10 @@ std::vector FilePermissionsForGp +@@ -445,8 +446,10 @@ std::vector FilePermissionsForGp AddStandardGpuPermissions(&permissions); return permissions; } +#endif void LoadArmGpuLibraries() { +#if !defined(OS_BSD) // Preload the Mali library. if (UseChromecastSandboxAllowlist()) { for (const char* path : kAllowedChromecastPaths) { -@@ -483,6 +486,7 @@ void LoadArmGpuLibraries() { +@@ -488,6 +491,7 @@ void LoadArmGpuLibraries() { dlopen(driver_paths[i], dlopen_flag); } } +#endif } bool LoadAmdGpuLibraries() { -@@ -550,12 +554,14 @@ void LoadV4L2Libraries( +@@ -555,12 +559,14 @@ void LoadV4L2Libraries( } void LoadChromecastV4L2Libraries() { +#if !defined(OS_BSD) for (const char* path : kAllowedChromecastPaths) { const std::string library_path(std::string(path) + std::string("libvpcodec.so")); if (dlopen(library_path.c_str(), dlopen_flag)) break; } +#endif } bool LoadLibrariesForGpu( -@@ -583,6 +589,7 @@ bool LoadLibrariesForGpu( +@@ -588,6 +594,7 @@ bool LoadLibrariesForGpu( return true; } +#if !defined(OS_BSD) sandbox::syscall_broker::BrokerCommandSet CommandSetForGPU( const sandbox::policy::SandboxLinux::Options& options) { sandbox::syscall_broker::BrokerCommandSet command_set; -@@ -605,13 +612,17 @@ bool BrokerProcessPreSandboxHook( +@@ -610,13 +617,17 @@ bool BrokerProcessPreSandboxHook( SetProcessTitleFromCommandLine(nullptr); return true; } +#endif } // namespace bool GpuProcessPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { + NOTIMPLEMENTED(); +#if !defined(OS_BSD) sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess( CommandSetForGPU(options), FilePermissionsForGpu(options), base::BindOnce(BrokerProcessPreSandboxHook), options); +#endif if (!LoadLibrariesForGpu(options)) return false; diff --git a/www/iridium/files/patch-content_ppapi__plugin_ppapi__plugin__main.cc b/www/iridium/files/patch-content_ppapi__plugin_ppapi__plugin__main.cc index 23637ff48f08..e7a1bb7ff4fb 100644 --- a/www/iridium/files/patch-content_ppapi__plugin_ppapi__plugin__main.cc +++ b/www/iridium/files/patch-content_ppapi__plugin_ppapi__plugin__main.cc @@ -1,23 +1,23 @@ ---- content/ppapi_plugin/ppapi_plugin_main.cc.orig 2022-03-28 18:11:04 UTC +--- content/ppapi_plugin/ppapi_plugin_main.cc.orig 2022-12-06 08:09:13 UTC +++ content/ppapi_plugin/ppapi_plugin_main.cc @@ -53,6 +53,11 @@ #include "gin/v8_initializer.h" #endif +#if BUILDFLAG(IS_OPENBSD) +#include "sandbox/policy/openbsd/sandbox_openbsd.h" +#include "sandbox/policy/sandbox_type.h" +#endif + #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) #include #endif -@@ -136,7 +141,7 @@ int PpapiPluginMain(MainFunctionParams parameters) { +@@ -146,7 +151,7 @@ int PpapiPluginMain(MainFunctionParams parameters) { gin::V8Initializer::LoadV8Snapshot(); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox( sandbox::policy::SandboxTypeFromCommandLine(command_line), sandbox::policy::SandboxLinux::PreSandboxHook(), diff --git a/www/iridium/files/patch-content_public_browser_render__process__host.h b/www/iridium/files/patch-content_public_browser_render__process__host.h index 20ff7fbb12ce..afd1b63ed24a 100644 --- a/www/iridium/files/patch-content_public_browser_render__process__host.h +++ b/www/iridium/files/patch-content_public_browser_render__process__host.h @@ -1,20 +1,20 @@ ---- content/public/browser/render_process_host.h.orig 2022-12-01 10:35:46 UTC +--- content/public/browser/render_process_host.h.orig 2022-12-06 08:09:13 UTC +++ content/public/browser/render_process_host.h @@ -53,7 +53,7 @@ #include "content/public/browser/android/child_process_importance.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "media/mojo/mojom/stable/stable_video_decoder.mojom-forward.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -614,7 +614,7 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::S +@@ -618,7 +618,7 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::S const blink::StorageKey& storage_key, mojo::PendingReceiver receiver) = 0; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) virtual void CreateStableVideoDecoder( mojo::PendingReceiver receiver) = 0; diff --git a/www/iridium/files/patch-content_public_browser_zygote__host_zygote__host__linux.h b/www/iridium/files/patch-content_public_browser_zygote__host_zygote__host__linux.h index df3d6725f3f7..d1d494756fea 100644 --- a/www/iridium/files/patch-content_public_browser_zygote__host_zygote__host__linux.h +++ b/www/iridium/files/patch-content_public_browser_zygote__host_zygote__host__linux.h @@ -1,16 +1,16 @@ ---- content/public/browser/zygote_host/zygote_host_linux.h.orig 2022-03-28 18:11:04 UTC +--- content/public/browser/zygote_host/zygote_host_linux.h.orig 2022-12-06 08:09:13 UTC +++ content/public/browser/zygote_host/zygote_host_linux.h -@@ -30,11 +30,13 @@ class ZygoteHost { +@@ -35,11 +35,13 @@ class ZygoteHost { // after the first render has been forked. virtual int GetRendererSandboxStatus() = 0; -+#if !defined(OS_BSD) ++#if !BUILDFLAG(IS_BSD) // Adjust the OOM score of the given renderer's PID. The allowed // range for the score is [0, 1000], where higher values are more // likely to be killed by the OOM killer. virtual void AdjustRendererOOMScore(base::ProcessHandle process_handle, int score) = 0; +#endif - }; - } // namespace content + #if BUILDFLAG(IS_CHROMEOS_ASH) + // Reinitialize logging for the Zygote processes. Needed on ChromeOS, which diff --git a/www/iridium/files/patch-content_public_common_content__features.cc b/www/iridium/files/patch-content_public_common_content__features.cc index dd7d0ef61178..6189a7951cd0 100644 --- a/www/iridium/files/patch-content_public_common_content__features.cc +++ b/www/iridium/files/patch-content_public_common_content__features.cc @@ -1,50 +1,50 @@ ---- content/public/common/content_features.cc.orig 2022-12-01 10:35:46 UTC +--- content/public/common/content_features.cc.orig 2022-12-06 08:09:13 UTC +++ content/public/common/content_features.cc -@@ -43,7 +43,7 @@ const base::Feature kAudioServiceOutOfProcess { - "AudioServiceOutOfProcess", +@@ -46,7 +46,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, + "AudioServiceOutOfProcess", // TODO(crbug.com/1052397): Remove !IS_CHROMEOS_LACROS once lacros starts being // built with OS_CHROMEOS instead of OS_LINUX. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) - base::FEATURE_ENABLED_BY_DEFAULT + base::FEATURE_ENABLED_BY_DEFAULT #else -@@ -55,7 +55,7 @@ const base::Feature kAudioServiceOutOfProcess { +@@ -58,7 +58,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, // kAudioServiceOutOfProcess feature is enabled. - const base::Feature kAudioServiceSandbox { - "AudioServiceSandbox", + BASE_FEATURE(kAudioServiceSandbox, + "AudioServiceSandbox", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT + base::FEATURE_ENABLED_BY_DEFAULT #else - base::FEATURE_DISABLED_BY_DEFAULT -@@ -1102,7 +1102,7 @@ const base::Feature kWebAssemblyBaseline{"WebAssemblyB - const base::Feature kWebAssemblyCodeProtection{ - "WebAssemblyCodeProtection", base::FEATURE_ENABLED_BY_DEFAULT}; + base::FEATURE_DISABLED_BY_DEFAULT +@@ -1228,7 +1228,7 @@ BASE_FEATURE(kWebAssemblyCodeProtection, + "WebAssemblyCodeProtection", + base::FEATURE_DISABLED_BY_DEFAULT); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) // Use memory protection keys in userspace (PKU) (if available) to protect code // JITed for WebAssembly. Fall back to traditional memory protection if // WebAssemblyCodeProtection is also enabled. -@@ -1138,7 +1138,7 @@ const base::Feature kWebAssemblyTiering{"WebAssemblyTi - const base::Feature kWebAssemblyTrapHandler { - "WebAssemblyTrapHandler", +@@ -1270,7 +1270,7 @@ BASE_FEATURE(kWebAssemblyTiering, + BASE_FEATURE(kWebAssemblyTrapHandler, + "WebAssemblyTrapHandler", #if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC)) && \ + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) && \ defined(ARCH_CPU_X86_64)) || \ (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) - base::FEATURE_ENABLED_BY_DEFAULT -@@ -1208,7 +1208,11 @@ const base::Feature kWebUIReportOnlyTrustedTypes{ + base::FEATURE_ENABLED_BY_DEFAULT +@@ -1345,7 +1345,11 @@ BASE_FEATURE(kWebUIReportOnlyTrustedTypes, // Controls whether the WebUSB API is enabled: // https://wicg.github.io/webusb +#if BUILDFLAG(IS_BSD) -+const base::Feature kWebUsb{"WebUSB", base::FEATURE_DISABLED_BY_DEFAULT}; ++BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_DISABLED_BY_DEFAULT); +#else - const base::Feature kWebUsb{"WebUSB", base::FEATURE_ENABLED_BY_DEFAULT}; + BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_ENABLED_BY_DEFAULT); +#endif // Controls whether the WebXR Device API is enabled. - const base::Feature kWebXr{"WebXR", base::FEATURE_ENABLED_BY_DEFAULT}; + BASE_FEATURE(kWebXr, "WebXR", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/iridium/files/patch-content_public_common_content__features.h b/www/iridium/files/patch-content_public_common_content__features.h index 79a68eddbf36..dccfae4ce712 100644 --- a/www/iridium/files/patch-content_public_common_content__features.h +++ b/www/iridium/files/patch-content_public_common_content__features.h @@ -1,11 +1,11 @@ ---- content/public/common/content_features.h.orig 2022-12-01 10:35:46 UTC +--- content/public/common/content_features.h.orig 2022-12-06 08:09:13 UTC +++ content/public/common/content_features.h -@@ -284,7 +284,7 @@ CONTENT_EXPORT extern const base::Feature kJavaScriptE - CONTENT_EXPORT extern const base::Feature kWebAppWindowControlsOverlay; - CONTENT_EXPORT extern const base::Feature kWebAssemblyBaseline; - CONTENT_EXPORT extern const base::Feature kWebAssemblyCodeProtection; +@@ -272,7 +272,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kV8VmFuture); + CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebAppWindowControlsOverlay); + CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyBaseline); + CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyCodeProtection); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) - CONTENT_EXPORT extern const base::Feature kWebAssemblyCodeProtectionPku; + CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyCodeProtectionPku); #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && // defined(ARCH_CPU_X86_64) 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 307fe7afd820..e454425a19da 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 2022-12-01 10:35:46 UTC +--- content/public/common/content_switches.cc.orig 2022-12-06 08:09:13 UTC +++ content/public/common/content_switches.cc -@@ -374,6 +374,10 @@ const char kEnableGpuMemoryBufferVideoFrames[] = +@@ -367,6 +367,10 @@ const char kEnableGpuMemoryBufferVideoFrames[] = // builds. const char kEnableLogging[] = "enable-logging"; +const char kDisableUnveil[] = "disable-unveil"; + +const char kTrk[] = "trk"; + // Enables the type, downlinkMax attributes of the NetInfo API. Also, enables // triggering of change attribute of the NetInfo API when there is a change in // the connection type. -@@ -988,7 +992,7 @@ const char kEnableAutomation[] = "enable-automation"; +@@ -994,7 +998,7 @@ const char kEnableAutomation[] = "enable-automation"; // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Allows sending text-to-speech requests to speech-dispatcher, a common // Linux speech service. Because it's buggy, the user must explicitly // enable it so that visiting a random webpage can't cause instability. diff --git a/www/iridium/files/patch-content_public_common_content__switches.h b/www/iridium/files/patch-content_public_common_content__switches.h index a9b2317d0b9e..937fe323fcae 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 2022-12-01 10:35:46 UTC +--- content/public/common/content_switches.h.orig 2022-12-06 08:09:13 UTC +++ content/public/common/content_switches.h -@@ -119,6 +119,8 @@ CONTENT_EXPORT extern const char kEnableBlinkTestFeatu +@@ -118,6 +118,8 @@ CONTENT_EXPORT extern const char kEnableBlinkTestFeatu CONTENT_EXPORT extern const char kEnableGpuMemoryBufferVideoFrames[]; 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[]; -@@ -266,7 +268,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD +@@ -269,7 +271,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT extern const char kEnableSpeechDispatcher[]; #endif diff --git a/www/iridium/files/patch-content_public_test_mock__render__thread.cc b/www/iridium/files/patch-content_public_test_mock__render__thread.cc index 9e0c96d7bfc1..a71433ef0a25 100644 --- a/www/iridium/files/patch-content_public_test_mock__render__thread.cc +++ b/www/iridium/files/patch-content_public_test_mock__render__thread.cc @@ -1,11 +1,11 @@ ---- content/public/test/mock_render_thread.cc.orig 2022-10-05 07:34:01 UTC +--- content/public/test/mock_render_thread.cc.orig 2022-12-06 08:09:13 UTC +++ content/public/test/mock_render_thread.cc -@@ -62,7 +62,7 @@ class MockRenderMessageFilterImpl : public mojom::Rend +@@ -64,7 +64,7 @@ class MockRenderMessageFilterImpl : public mojom::Rend std::move(callback).Run(false); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void SetThreadType(int32_t platform_thread_id, base::ThreadType thread_type) override {} #endif diff --git a/www/iridium/files/patch-content_renderer_render__process__impl.cc b/www/iridium/files/patch-content_renderer_render__process__impl.cc index 9744cc38d4f7..8ba7c92b3c5d 100644 --- a/www/iridium/files/patch-content_renderer_render__process__impl.cc +++ b/www/iridium/files/patch-content_renderer_render__process__impl.cc @@ -1,29 +1,29 @@ ---- content/renderer/render_process_impl.cc.orig 2022-12-01 10:35:46 UTC +--- content/renderer/render_process_impl.cc.orig 2022-12-06 08:09:13 UTC +++ content/renderer/render_process_impl.cc @@ -46,7 +46,7 @@ #if BUILDFLAG(IS_WIN) #include "base/win/win_util.h" #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) #include "v8/include/v8-wasm-trap-handler-posix.h" #endif -@@ -141,7 +141,7 @@ RenderProcessImpl::RenderProcessImpl() +@@ -154,7 +154,7 @@ RenderProcessImpl::RenderProcessImpl() SetV8FlagIfNotFeature(features::kWebAssemblyCodeProtection, "--no-wasm-write-protect-code-memory"); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) SetV8FlagIfFeature(features::kWebAssemblyCodeProtectionPku, "--wasm-memory-protection-keys"); SetV8FlagIfNotFeature(features::kWebAssemblyCodeProtectionPku, -@@ -226,7 +226,7 @@ RenderProcessImpl::RenderProcessImpl() +@@ -228,7 +228,7 @@ RenderProcessImpl::RenderProcessImpl() SetV8FlagIfNotFeature(features::kWebAssemblyDynamicTiering, "--no-wasm-dynamic-tiering"); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) if (base::FeatureList::IsEnabled(features::kWebAssemblyTrapHandler)) { - if (command_line->HasSwitch(switches::kEnableCrashpad) || - command_line->HasSwitch(switches::kEnableCrashReporter) || + base::CommandLine* const command_line = + base::CommandLine::ForCurrentProcess(); 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 34ba0c47e285..75d9d5af0902 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 2022-12-01 10:35:46 UTC +--- content/renderer/render_thread_impl.cc.orig 2022-12-06 08:09:13 UTC +++ content/renderer/render_thread_impl.cc -@@ -190,7 +190,7 @@ +@@ -193,7 +193,7 @@ #if BUILDFLAG(IS_MAC) #include -#else +#elif !BUILDFLAG(IS_OPENBSD) #include #endif -@@ -655,7 +655,7 @@ void RenderThreadImpl::Init() { +@@ -658,7 +658,7 @@ void RenderThreadImpl::Init() { base::DiscardableMemoryAllocator::SetInstance( discardable_memory_allocator_.get()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) render_message_filter()->SetThreadType( ChildProcess::current()->io_thread_id(), base::ThreadType::kCompositing); #endif -@@ -1025,7 +1025,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1029,7 +1029,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: const bool enable_video_decode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) && #else !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) && -@@ -1036,7 +1036,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1040,7 +1040,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: 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) && diff --git a/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.cc b/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.cc index 14c0f154c13a..c11efcc4a32f 100644 --- a/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.cc +++ b/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.cc @@ -1,47 +1,47 @@ ---- content/renderer/renderer_blink_platform_impl.cc.orig 2022-12-01 10:35:46 UTC +--- content/renderer/renderer_blink_platform_impl.cc.orig 2022-12-06 08:09:13 UTC +++ content/renderer/renderer_blink_platform_impl.cc -@@ -108,7 +108,7 @@ +@@ -110,7 +110,7 @@ #if BUILDFLAG(IS_MAC) #include "content/child/child_process_sandbox_support_impl_mac.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/child_process_sandbox_support_impl_linux.h" #endif -@@ -177,7 +177,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -180,7 +180,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( main_thread_scheduler_(main_thread_scheduler) { // RenderThread may not exist in some tests. if (RenderThreadImpl::current()) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::PendingRemote font_service; RenderThreadImpl::current()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -187,7 +187,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -190,7 +190,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( #endif } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (sandboxEnabled()) { #if BUILDFLAG(IS_MAC) sandbox_support_ = std::make_unique(); -@@ -258,7 +258,7 @@ RendererBlinkPlatformImpl::WrapURLLoaderFactory( +@@ -261,7 +261,7 @@ RendererBlinkPlatformImpl::WrapURLLoaderFactory( /*terminate_sync_load_event=*/nullptr); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void RendererBlinkPlatformImpl::SetThreadType(base::PlatformThreadId thread_id, base::ThreadType thread_type) { if (RenderThreadImpl* render_thread = RenderThreadImpl::current()) { -@@ -269,7 +269,7 @@ void RendererBlinkPlatformImpl::SetThreadType(base::Pl +@@ -272,7 +272,7 @@ void RendererBlinkPlatformImpl::SetThreadType(base::Pl #endif blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return sandbox_support_.get(); #else // These platforms do not require sandbox support. diff --git a/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.h b/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.h index b460bccb9ee5..0e9b98592181 100644 --- a/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.h +++ b/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.h @@ -1,38 +1,38 @@ ---- content/renderer/renderer_blink_platform_impl.h.orig 2022-10-05 07:34:01 UTC +--- content/renderer/renderer_blink_platform_impl.h.orig 2022-12-06 08:09:13 UTC +++ content/renderer/renderer_blink_platform_impl.h @@ -29,7 +29,7 @@ #include "third_party/blink/public/common/user_agent/user_agent_metadata.h" #include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/services/font/public/cpp/font_loader.h" // nogncheck #include "third_party/skia/include/core/SkRefCnt.h" // nogncheck #endif -@@ -169,7 +169,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -171,7 +171,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi const blink::WebURL& top_document_web_url) override; gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; blink::WebString ConvertIDNToUnicode(const blink::WebString& host) override; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void SetThreadType(base::PlatformThreadId thread_id, base::ThreadType) override; #endif -@@ -235,7 +235,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -237,7 +237,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi void Collect3DContextInformation(blink::Platform::GraphicsInfo* gl_info, const gpu::GPUInfo& gpu_info) const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) std::unique_ptr sandbox_support_; #endif -@@ -255,7 +255,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -257,7 +257,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi mutable base::WaitableEvent io_thread_id_ready_event_; base::PlatformThreadId io_thread_id_ = base::kInvalidThreadId; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sk_sp font_loader_; #endif diff --git a/www/iridium/files/patch-content_shell_BUILD.gn b/www/iridium/files/patch-content_shell_BUILD.gn index 3eb7aa26a376..0c661e1be353 100644 --- a/www/iridium/files/patch-content_shell_BUILD.gn +++ b/www/iridium/files/patch-content_shell_BUILD.gn @@ -1,11 +1,11 @@ ---- content/shell/BUILD.gn.orig 2022-12-01 10:35:46 UTC +--- content/shell/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ content/shell/BUILD.gn -@@ -897,7 +897,7 @@ group("content_shell_crash_test") { +@@ -903,7 +903,7 @@ group("content_shell_crash_test") { if (is_win) { data_deps += [ "//build/win:copy_cdb_to_output" ] } - if (is_posix) { + if (is_posix && !is_bsd) { data_deps += [ "//third_party/breakpad:dump_syms", "//third_party/breakpad:minidump_stackwalk", diff --git a/www/iridium/files/patch-content_test_BUILD.gn b/www/iridium/files/patch-content_test_BUILD.gn index f5d514b9d2d0..f640b46bc235 100644 --- a/www/iridium/files/patch-content_test_BUILD.gn +++ b/www/iridium/files/patch-content_test_BUILD.gn @@ -1,20 +1,20 @@ ---- content/test/BUILD.gn.orig 2022-12-01 10:35:46 UTC +--- content/test/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ content/test/BUILD.gn -@@ -2076,7 +2076,7 @@ static_library("run_all_unittests") { +@@ -2089,7 +2089,7 @@ static_library("run_all_unittests") { ":test_support", "//base/test:test_support", ] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { deps += [ "//content/common:set_process_title_linux" ] } } -@@ -3053,7 +3053,7 @@ test("content_unittests") { +@@ -3071,7 +3071,7 @@ test("content_unittests") { deps += [ "//third_party/boringssl" ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "../common/set_process_title_linux_unittest.cc" ] deps += [ "//content/common:set_process_title_linux" ] } diff --git a/www/iridium/files/patch-content_utility_services.cc b/www/iridium/files/patch-content_utility_services.cc index 2495a7f79de6..39156fa5e694 100644 --- a/www/iridium/files/patch-content_utility_services.cc +++ b/www/iridium/files/patch-content_utility_services.cc @@ -1,47 +1,47 @@ ---- content/utility/services.cc.orig 2022-10-05 07:34:01 UTC +--- content/utility/services.cc.orig 2022-12-06 08:09:13 UTC +++ content/utility/services.cc -@@ -63,7 +63,7 @@ +@@ -66,7 +66,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 "sandbox/linux/services/libc_interceptor.h" #include "sandbox/policy/mojom/sandbox.mojom.h" #include "sandbox/policy/sandbox_type.h" -@@ -85,7 +85,7 @@ extern sandbox::TargetServices* g_utility_target_servi +@@ -88,7 +88,7 @@ extern sandbox::TargetServices* g_utility_target_servi #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) #include "media/mojo/services/stable_video_decoder_factory_service.h" // nogncheck #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && -@@ -198,7 +198,7 @@ auto RunAudio(mojo::PendingReceiver -@@ -342,7 +342,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -380,7 +380,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)) services.Add(RunStableVideoDecoderFactoryService); #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && diff --git a/www/iridium/files/patch-content_utility_utility__main.cc b/www/iridium/files/patch-content_utility_utility__main.cc index 4b8ed261f006..b35764c6058c 100644 --- a/www/iridium/files/patch-content_utility_utility__main.cc +++ b/www/iridium/files/patch-content_utility_utility__main.cc @@ -1,78 +1,78 @@ ---- content/utility/utility_main.cc.orig 2022-10-05 07:34:01 UTC +--- content/utility/utility_main.cc.orig 2022-12-06 08:09:13 UTC +++ content/utility/utility_main.cc @@ -31,17 +31,19 @@ #include "third_party/icu/source/common/unicode/unistr.h" #include "third_party/icu/source/i18n/unicode/timezone.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/utility/speech/speech_recognition_sandbox_hook_linux.h" #if BUILDFLAG(ENABLE_PRINTING) #include "printing/sandbox/print_backend_sandbox_hook_linux.h" #endif +#if !BUILDFLAG(IS_BSD) #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "services/audio/audio_sandbox_hook_linux.h" #include "services/network/network_sandbox_hook_linux.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "gpu/config/gpu_info_collector.h" #include "media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h" @@ -50,6 +52,10 @@ #include "third_party/angle/src/gpu_info_util/SystemInfo.h" // nogncheck #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/openbsd/sandbox_openbsd.h" +#endif + #if BUILDFLAG(IS_CHROMEOS_ASH) #include "ash/services/ime/ime_sandbox_hook.h" #include "chromeos/ash/components/assistant/buildflags.h" -@@ -129,7 +135,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -130,7 +136,7 @@ int UtilityMain(MainFunctionParams parameters) { } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Initializes the sandbox before any threads are created. // TODO(jorgelo): move this after GTK initialization when we enable a strict // Seccomp-BPF policy. -@@ -157,7 +163,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -158,7 +164,7 @@ int UtilityMain(MainFunctionParams parameters) { pre_sandbox_hook = base::BindOnce(&screen_ai::ScreenAIPreSandboxHook); break; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case sandbox::mojom::Sandbox::kHardwareVideoDecoding: pre_sandbox_hook = base::BindOnce(&media::HardwareVideoDecodingPreSandboxHook); -@@ -180,10 +186,11 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -181,10 +187,11 @@ int UtilityMain(MainFunctionParams parameters) { default: break; } +#if !BUILDFLAG(IS_BSD) if (!sandbox::policy::IsUnsandboxedSandboxType(sandbox_type) && (parameters.zygote_child || !pre_sandbox_hook.is_null())) { sandbox::policy::SandboxLinux::Options sandbox_options; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) if (sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoDecoding) { // The kHardwareVideoDecoding sandbox needs to know the GPU type in order // to select the right policy. -@@ -196,6 +203,11 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -197,6 +204,11 @@ int UtilityMain(MainFunctionParams parameters) { sandbox::policy::Sandbox::Initialize( sandbox_type, std::move(pre_sandbox_hook), sandbox_options); } +#else + sandbox::policy::Sandbox::Initialize( + sandbox_type, std::move(pre_sandbox_hook), + sandbox::policy::SandboxLinux::Options()); +#endif #elif BUILDFLAG(IS_WIN) g_utility_target_services = parameters.sandbox_info->target_services; #endif diff --git a/www/iridium/files/patch-content_zygote_zygote__linux.cc b/www/iridium/files/patch-content_zygote_zygote__linux.cc index cdb64a0ae036..680aa076f02c 100644 --- a/www/iridium/files/patch-content_zygote_zygote__linux.cc +++ b/www/iridium/files/patch-content_zygote_zygote__linux.cc @@ -1,15 +1,15 @@ ---- content/zygote/zygote_linux.cc.orig 2022-12-01 10:35:46 UTC +--- content/zygote/zygote_linux.cc.orig 2022-12-06 08:09:13 UTC +++ content/zygote/zygote_linux.cc @@ -1,6 +1,7 @@ // Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#if 0 #include "content/zygote/zygote_linux.h" -@@ -653,3 +654,4 @@ bool Zygote::HandleGetSandboxStatus(int fd, base::Pick +@@ -696,3 +697,4 @@ void Zygote::HandleReinitializeLoggingRequest(base::Pi } } // namespace content +#endif diff --git a/www/iridium/files/patch-extensions_browser_api_messaging_message__service.cc b/www/iridium/files/patch-extensions_browser_api_messaging_message__service.cc index eb2c873da0f7..e46b7f3cae72 100644 --- a/www/iridium/files/patch-extensions_browser_api_messaging_message__service.cc +++ b/www/iridium/files/patch-extensions_browser_api_messaging_message__service.cc @@ -1,20 +1,20 @@ ---- extensions/browser/api/messaging/message_service.cc.orig 2022-10-05 07:34:01 UTC +--- extensions/browser/api/messaging/message_service.cc.orig 2022-12-06 08:09:13 UTC +++ extensions/browser/api/messaging/message_service.cc @@ -74,7 +74,7 @@ namespace { const char kReceivingEndDoesntExistError[] = "Could not establish connection. Receiving end does not exist."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kMissingPermissionError[] = "Access to native messaging requires nativeMessaging permission."; const char kProhibitedByPoliciesError[] = -@@ -437,7 +437,7 @@ void MessageService::OpenChannelToNativeApp( +@@ -438,7 +438,7 @@ void MessageService::OpenChannelToNativeApp( return; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool has_permission = extension->permissions_data()->HasAPIPermission( mojom::APIPermissionID::kNativeMessaging); if (!has_permission) { diff --git a/www/iridium/files/patch-extensions_browser_extension__prefs.cc b/www/iridium/files/patch-extensions_browser_extension__prefs.cc index 4bf2a96c134a..b67d7b1e21df 100644 --- a/www/iridium/files/patch-extensions_browser_extension__prefs.cc +++ b/www/iridium/files/patch-extensions_browser_extension__prefs.cc @@ -1,11 +1,11 @@ ---- extensions/browser/extension_prefs.cc.orig 2022-12-01 10:35:46 UTC +--- extensions/browser/extension_prefs.cc.orig 2022-12-06 08:09:13 UTC +++ extensions/browser/extension_prefs.cc -@@ -2286,7 +2286,7 @@ void ExtensionPrefs::RegisterProfilePrefs( +@@ -2287,7 +2287,7 @@ void ExtensionPrefs::RegisterProfilePrefs( registry->RegisterDictionaryPref(kInstallSignature); registry->RegisterListPref(kExternalUninstalls); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(pref_names::kChromeAppsEnabled, false); #endif registry->RegisterBooleanPref(pref_names::kU2fSecurityKeyApiEnabled, false); diff --git a/www/iridium/files/patch-extensions_common_command.cc b/www/iridium/files/patch-extensions_common_command.cc index 753901efdde9..821e6ccaeadc 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 2022-10-05 07:34:01 UTC +--- extensions/common/command.cc.orig 2022-12-06 08:09:13 UTC +++ extensions/common/command.cc -@@ -288,7 +288,7 @@ std::string Command::CommandPlatform() { +@@ -280,7 +280,7 @@ std::string Command::CommandPlatform() { return values::kKeybindingPlatformMac; #elif BUILDFLAG(IS_CHROMEOS) return values::kKeybindingPlatformChromeOs; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return values::kKeybindingPlatformLinux; #elif BUILDFLAG(IS_FUCHSIA) // TODO(crbug.com/1312215): Change this once we decide what string should be diff --git a/www/iridium/files/patch-extensions_renderer_bindings_argument__spec.cc b/www/iridium/files/patch-extensions_renderer_bindings_argument__spec.cc index 771ab11f8a23..111cb54e06e4 100644 --- a/www/iridium/files/patch-extensions_renderer_bindings_argument__spec.cc +++ b/www/iridium/files/patch-extensions_renderer_bindings_argument__spec.cc @@ -1,11 +1,11 @@ ---- extensions/renderer/bindings/argument_spec.cc.orig 2022-10-05 07:34:01 UTC +--- extensions/renderer/bindings/argument_spec.cc.orig 2022-12-06 08:09:13 UTC +++ extensions/renderer/bindings/argument_spec.cc -@@ -16,6 +16,8 @@ +@@ -18,6 +18,8 @@ #include "gin/data_object_builder.h" #include "gin/dictionary.h" +#include + namespace extensions { namespace { diff --git a/www/iridium/files/patch-gpu_command__buffer_common_gpu__memory__buffer__support.cc b/www/iridium/files/patch-gpu_command__buffer_common_gpu__memory__buffer__support.cc index ae928a4ab8f2..90e956bceb12 100644 --- a/www/iridium/files/patch-gpu_command__buffer_common_gpu__memory__buffer__support.cc +++ b/www/iridium/files/patch-gpu_command__buffer_common_gpu__memory__buffer__support.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/common/gpu_memory_buffer_support.cc.orig 2022-03-28 18:11:04 UTC +--- gpu/command_buffer/common/gpu_memory_buffer_support.cc.orig 2022-12-06 08:09:13 UTC +++ gpu/command_buffer/common/gpu_memory_buffer_support.cc -@@ -134,7 +134,7 @@ uint32_t GetPlatformSpecificTextureTarget() { +@@ -144,7 +144,7 @@ uint32_t GetPlatformSpecificTextureTarget() { #if BUILDFLAG(IS_MAC) return macos_specific_texture_target; #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return GL_TEXTURE_EXTERNAL_OES; #elif BUILDFLAG(IS_FUCHSIA) return GL_TEXTURE_2D; -@@ -166,7 +166,7 @@ GPU_EXPORT bool NativeBufferNeedsPlatformSpecificTextu +@@ -176,7 +176,7 @@ GPU_EXPORT bool NativeBufferNeedsPlatformSpecificTextu gfx::BufferFormat format, gfx::BufferPlane plane) { #if defined(USE_OZONE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Always use GL_TEXTURE_2D as the target for RGB textures. // https://crbug.com/916728 if (format == gfx::BufferFormat::R_8 || format == gfx::BufferFormat::RG_88 || diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc index 00331064fd9e..d278fc884fbb 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_angle__vulkan__image__backing__factory.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc.orig 2022-12-01 10:35:46 UTC +--- gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc.orig 2022-12-06 08:09:13 UTC +++ gpu/command_buffer/service/shared_image/angle_vulkan_image_backing_factory.cc -@@ -600,7 +600,7 @@ bool AngleVulkanImageBackingFactory::CanUseAngleVulkan +@@ -94,7 +94,7 @@ bool AngleVulkanImageBackingFactory::CanUseAngleVulkan // TODO(penghuang): verify the scanout is the right usage for video playback. // crbug.com/1280798 constexpr auto kSupportedUsages = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SHARED_IMAGE_USAGE_SCANOUT | #endif SHARED_IMAGE_USAGE_GLES2 | SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT | 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 13be4f44d0e0..3a82007317cb 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 2022-12-01 10:35:46 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2022-12-06 08:09:13 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing.cc -@@ -31,7 +31,7 @@ +@@ -32,7 +32,7 @@ #include "ui/gl/gl_version_info.h" #include "ui/gl/scoped_binders.h" -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) #include "gpu/command_buffer/service/shared_image/external_vk_image_dawn_representation.h" #endif -@@ -568,7 +568,7 @@ std::unique_ptr ExternalVkIma +@@ -570,7 +570,7 @@ std::unique_ptr ExternalVkIma MemoryTypeTracker* tracker, WGPUDevice wgpuDevice, WGPUBackendType backend_type) { -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) auto wgpu_format = viz::ToWGPUFormat(format()); if (wgpu_format == WGPUTextureFormat_Undefined) { diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing.cc index 554adcc648c9..a470da7e0591 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/gl_texture_image_backing.cc.orig 2022-12-01 10:35:46 UTC +--- gpu/command_buffer/service/shared_image/gl_texture_image_backing.cc.orig 2022-12-06 08:09:13 UTC +++ gpu/command_buffer/service/shared_image/gl_texture_image_backing.cc -@@ -246,7 +246,7 @@ void GLTextureImageBacking::InitializeGLTexture( +@@ -345,7 +345,7 @@ void GLTextureImageBacking::InitializeGLTexture( } void GLTextureImageBacking::CreateEGLImage() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || defined(USE_OZONE) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || defined(USE_OZONE) || BUILDFLAG(IS_BSD) SharedContextState* shared_context_state = factory()->GetSharedContextState(); ui::ScopedMakeCurrent smc(shared_context_state->context(), shared_context_state->surface()); diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing__factory.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing__factory.cc index 726da5cb9552..a5552a77af73 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing__factory.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_gl__texture__image__backing__factory.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.cc.orig 2022-10-05 07:34:01 UTC +--- gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.cc.orig 2022-12-06 08:09:13 UTC +++ gpu/command_buffer/service/shared_image/gl_texture_image_backing_factory.cc -@@ -152,7 +152,7 @@ bool GLTextureImageBackingFactory::IsSupported( +@@ -164,7 +164,7 @@ bool GLTextureImageBackingFactory::IsSupported( // Linux and ChromeOS support WebGPU/Compat on GL. All other platforms // do not support WebGPU on GL. if (usage & SHARED_IMAGE_USAGE_WEBGPU) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || defined(USE_OZONE) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || defined(USE_OZONE) || BUILDFLAG(IS_BSD) if (use_webgpu_adapter_ != WebGPUAdapterName::kCompat) { return false; } 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 deleted file mode 100644 index f5b1494e48a1..000000000000 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- gpu/command_buffer/service/shared_image/shared_image_factory.cc.orig 2022-12-01 10:35:46 UTC -+++ gpu/command_buffer/service/shared_image/shared_image_factory.cc -@@ -51,7 +51,7 @@ - #include "ui/ozone/public/surface_factory_ozone.h" - #endif - --#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN)) && \ -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) && \ - BUILDFLAG(ENABLE_VULKAN) - #include "gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.h" - #include "gpu/command_buffer/service/shared_image/ozone_image_backing_factory.h" -@@ -86,7 +86,7 @@ namespace gpu { - - namespace { - --#if defined(USE_OZONE) && BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS) -+#if defined(USE_OZONE) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CASTOS) - - bool ShouldUseExternalVulkanImageFactory() { - #if BUILDFLAG(ENABLE_VULKAN) -@@ -394,7 +394,7 @@ SharedImageFactory::SharedImageFactory( - factories_.push_back(std::move(external_vk_image_factory)); - } - #elif defined(USE_OZONE) --#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CASTOS) - // Desktop Linux, not ChromeOS. - if (ShouldUseOzoneImageBackingFactory()) { - auto ozone_factory = std::make_unique( diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing__factory.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing__factory.cc index 24907bf6568a..2c0b5c6f38f8 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing__factory.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing__factory.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/wrapped_sk_image_backing_factory.cc.orig 2022-12-01 10:35:46 UTC +--- gpu/command_buffer/service/shared_image/wrapped_sk_image_backing_factory.cc.orig 2022-12-06 08:09:13 UTC +++ gpu/command_buffer/service/shared_image/wrapped_sk_image_backing_factory.cc -@@ -244,7 +244,7 @@ class WrappedSkImage : public ClearTrackingSharedImage +@@ -238,7 +238,7 @@ class WrappedSkImage : public ClearTrackingSharedImage : GrMipMapped::kNo; const std::string label = "WrappedSkImageBackingFactory_Initialize" + CreateLabelForSharedImageUsage(usage()); -#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) +#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // Initializing to bright green makes it obvious if the pixels are not // properly set before they are displayed (e.g. https://crbug.com/956555). // We don't do this on release builds because there is a slight overhead. 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 089a5e470628..0c522ab85e38 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,11 +1,11 @@ ---- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2022-12-01 10:35:46 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2022-12-06 08:09:13 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1099,7 +1099,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( +@@ -1208,7 +1208,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( if (gr_context_type_ != GrContextType::kVulkan && use_webgpu_adapter_ != WebGPUAdapterName::kCompat) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) callback(WGPURequestAdapterStatus_Unavailable, nullptr, "WebGPU on Linux requires command-line flag " "--enable-features=Vulkan", diff --git a/www/iridium/files/patch-gpu_ipc_service_gpu__init.cc b/www/iridium/files/patch-gpu_ipc_service_gpu__init.cc index 6544025545a2..fffd520546f9 100644 --- a/www/iridium/files/patch-gpu_ipc_service_gpu__init.cc +++ b/www/iridium/files/patch-gpu_ipc_service_gpu__init.cc @@ -1,83 +1,83 @@ ---- gpu/ipc/service/gpu_init.cc.orig 2022-12-01 10:35:46 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2022-12-06 08:09:13 UTC +++ gpu/ipc/service/gpu_init.cc @@ -351,7 +351,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 -@@ -401,7 +401,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -387,7 +387,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. -@@ -450,7 +450,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -436,7 +436,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL if (gl_initialized && gl_use_swiftshader_ && !gl::IsSoftwareGLImplementation(gl::GetGLImplementationParts())) { -#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; -@@ -501,7 +501,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -487,7 +487,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The ContentSandboxHelper is currently the only one implementation of // GpuSandboxHelper and it has no dependency. Except on Linux where // VaapiWrapper checks the GL implementation to determine which display -@@ -561,7 +561,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -547,7 +547,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; -@@ -689,7 +689,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -675,7 +675,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. -@@ -741,7 +741,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -727,7 +727,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL gl_use_swiftshader_ = true; } } -#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 -@@ -883,7 +883,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -869,7 +869,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 -@@ -946,7 +946,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -932,7 +932,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c 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. 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 35bcd0e5eb5b..c8978c1e09f5 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 2022-10-05 07:34:01 UTC +--- gpu/vulkan/vulkan_device_queue.cc.orig 2022-12-06 08:09:13 UTC +++ gpu/vulkan/vulkan_device_queue.cc -@@ -88,7 +88,7 @@ bool VulkanDeviceQueue::Initialize( +@@ -89,7 +89,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)) { -@@ -232,7 +232,7 @@ bool VulkanDeviceQueue::Initialize( +@@ -229,7 +229,7 @@ bool VulkanDeviceQueue::Initialize( enabled_device_features_2_ = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2}; // Android, Fuchsia, and Linux(VaapiVideoDecoder) need YCbCr sampler support. -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || 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-headless_lib_headless__content__main__delegate.cc b/www/iridium/files/patch-headless_lib_headless__content__main__delegate.cc index b8c168df0fdc..77a407bedcf3 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 2022-10-05 07:34:01 UTC +--- headless/lib/headless_content_main_delegate.cc.orig 2022-12-06 08:09:13 UTC +++ headless/lib/headless_content_main_delegate.cc -@@ -337,7 +337,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( +@@ -336,7 +336,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( if (process_type != switches::kZygoteProcess) { g_headless_crash_client.Pointer()->set_crash_dumps_dir( options()->crash_dumps_dir); -#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_audio_BUILD.gn b/www/iridium/files/patch-media_audio_BUILD.gn index 40909bc7c973..d05bf7fd6ce3 100644 --- a/www/iridium/files/patch-media_audio_BUILD.gn +++ b/www/iridium/files/patch-media_audio_BUILD.gn @@ -1,24 +1,24 @@ ---- media/audio/BUILD.gn.orig 2022-12-01 10:35:46 UTC +--- media/audio/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ media/audio/BUILD.gn -@@ -250,9 +250,20 @@ source_set("audio") { +@@ -259,9 +259,20 @@ source_set("audio") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !use_sndio) { sources += [ "linux/audio_manager_linux.cc" ] } + + if (use_sndio) { + libs += [ "sndio" ] + sources += [ + "sndio/audio_manager_sndio.cc", + "sndio/sndio_input.cc", + "sndio/sndio_input.h", + "sndio/sndio_output.cc", + "sndio/sndio_output.h" + ] + } if (use_alsa) { libs += [ "asound" ] diff --git a/www/iridium/files/patch-media_base_audio__latency.cc b/www/iridium/files/patch-media_base_audio__latency.cc index 50ab41332f7b..8ae161aea0bd 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 2022-10-05 07:34:01 UTC +--- media/base/audio_latency.cc.orig 2022-12-06 08:09:13 UTC +++ media/base/audio_latency.cc -@@ -137,7 +137,7 @@ int AudioLatency::GetRtcBufferSize(int sample_rate, in +@@ -147,7 +147,7 @@ int AudioLatency::GetRtcBufferSize(int sample_rate, in } #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - 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 0e062b25c411..2d2fcee9135c 100644 --- a/www/iridium/files/patch-media_base_media__switches.cc +++ b/www/iridium/files/patch-media_base_media__switches.cc @@ -1,47 +1,55 @@ ---- media/base/media_switches.cc.orig 2022-12-01 10:35:46 UTC +--- media/base/media_switches.cc.orig 2022-12-06 08:09:13 UTC +++ media/base/media_switches.cc @@ -10,7 +10,7 @@ #include "components/system_media_controls/linux/buildflags/buildflags.h" #include "media/media_buildflags.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/cpu.h" #endif -@@ -448,7 +448,7 @@ const base::Feature kGav1VideoDecoder{"Gav1VideoDecode +@@ -485,7 +485,7 @@ BASE_FEATURE(kGav1VideoDecoder, // Show toolbar button that opens dialog for controlling media sessions. - const base::Feature kGlobalMediaControls { - "GlobalMediaControls", + 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 + base::FEATURE_ENABLED_BY_DEFAULT #else - base::FEATURE_DISABLED_BY_DEFAULT -@@ -486,7 +486,7 @@ constexpr base::FeatureParam GetDefaultLayo +@@ -285,7 +285,7 @@ static absl::optional GetDefaultLayo return VideoFrameLayout::CreateWithPlanes(format, coded_size, planes); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This class allows us to embed a vector into a scoped_refptr, and // thus to have several VideoFrames share the same set of DMABUF FDs. class VideoFrame::DmabufHolder -@@ -621,7 +621,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM +@@ -625,7 +625,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM for (size_t i = 0; i < num_planes; ++i) planes[i].stride = gpu_memory_buffer->stride(i); uint64_t modifier = gfx::NativePixmapHandle::kNoModifier; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (gpu_memory_buffer->GetType() == gfx::NATIVE_PIXMAP) { const auto gmb_handle = gpu_memory_buffer->CloneHandle(); if (gmb_handle.is_null() || -@@ -667,7 +667,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM +@@ -671,7 +671,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, -@@ -884,7 +884,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( +@@ -888,7 +888,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) DCHECK(frame->dmabuf_fds_); // If there are any |dmabuf_fds_| plugged in, we should refer them too. wrapping_frame->dmabuf_fds_ = frame->dmabuf_fds_; -@@ -1259,7 +1259,7 @@ const gpu::MailboxHolder& VideoFrame::mailbox_holder( +@@ -1275,7 +1275,7 @@ const gpu::MailboxHolder& VideoFrame::mailbox_holder( : mailbox_holders_[texture_index]; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const std::vector& VideoFrame::DmabufFds() const { DCHECK_EQ(storage_type_, STORAGE_DMABUFS); -@@ -1371,7 +1371,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, +@@ -1387,7 +1387,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, storage_type_(storage_type), visible_rect_(Intersection(visible_rect, gfx::Rect(layout.coded_size()))), natural_size_(natural_size), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) dmabuf_fds_(base::MakeRefCounted()), #endif timestamp_(timestamp), diff --git a/www/iridium/files/patch-media_base_video__frame.h b/www/iridium/files/patch-media_base_video__frame.h index 5d91caf3bfb6..dc1425bbdb7b 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 2022-12-01 10:35:46 UTC +--- media/base/video_frame.h.orig 2022-12-06 08:09:13 UTC +++ media/base/video_frame.h @@ -41,7 +41,7 @@ #include "base/mac/scoped_cftyperef.h" #endif // BUILDFLAG(IS_MAC) -#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) @@ -84,7 +84,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 @@ -279,7 +279,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 -@@ -538,7 +538,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -548,7 +548,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // mailbox, the caller must wait for the included sync point. const gpu::MailboxHolder& mailbox_holder(size_t texture_index) const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Returns a vector containing the backing DmaBufs for this frame. The number // of returned DmaBufs will be equal or less than the number of planes of // the frame. If there are less, this means that the last FD contains the -@@ -745,7 +745,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -755,7 +755,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte // GPU memory buffer, if this frame is STORAGE_GPU_MEMORY_BUFFER. std::unique_ptr gpu_memory_buffer_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) class DmabufHolder; // Dmabufs for the frame, used when storage is STORAGE_DMABUFS. Size is either diff --git a/www/iridium/files/patch-media_capture_video_linux_fake__v4l2__impl.cc b/www/iridium/files/patch-media_capture_video_linux_fake__v4l2__impl.cc index f2e17f5e8d4e..ea5ae99be395 100644 --- a/www/iridium/files/patch-media_capture_video_linux_fake__v4l2__impl.cc +++ b/www/iridium/files/patch-media_capture_video_linux_fake__v4l2__impl.cc @@ -1,11 +1,11 @@ ---- media/capture/video/linux/fake_v4l2_impl.cc.orig 2022-10-05 07:34:01 UTC +--- media/capture/video/linux/fake_v4l2_impl.cc.orig 2022-12-06 08:09:13 UTC +++ media/capture/video/linux/fake_v4l2_impl.cc -@@ -427,7 +427,7 @@ int FakeV4L2Impl::close(int fd) { +@@ -426,7 +426,7 @@ int FakeV4L2Impl::close(int fd) { return kSuccessReturnValue; } -int FakeV4L2Impl::ioctl(int fd, int request, void* argp) { +int FakeV4L2Impl::ioctl(int fd, unsigned long request, void* argp) { base::AutoLock lock(lock_); auto device_iter = opened_devices_.find(fd); if (device_iter == opened_devices_.end()) diff --git a/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc b/www/iridium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc index eb3c161f1ba0..0b229e09e9b2 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,44 +1,44 @@ ---- media/capture/video/linux/v4l2_capture_delegate.cc.orig 2022-10-05 07:34:01 UTC +--- media/capture/video/linux/v4l2_capture_delegate.cc.orig 2022-12-06 08:09:13 UTC +++ media/capture/video/linux/v4l2_capture_delegate.cc @@ -4,8 +4,10 @@ #include "media/capture/video/linux/v4l2_capture_delegate.h" +#if !defined(OS_BSD) #include #include +#endif #include #include #include -@@ -27,10 +29,10 @@ +@@ -28,10 +30,10 @@ using media::mojom::MeteringMode; -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) +// #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. -@@ -666,7 +668,7 @@ base::WeakPtr V4L2CaptureDelegate +@@ -667,7 +669,7 @@ base::WeakPtr V4L2CaptureDelegate V4L2CaptureDelegate::~V4L2CaptureDelegate() = default; -bool V4L2CaptureDelegate::RunIoctl(int request, void* argp) { +bool V4L2CaptureDelegate::RunIoctl(unsigned int request, void* argp) { int num_retries = 0; for (; DoIoctl(request, argp) < 0 && num_retries < kMaxIOCtrlRetries; ++num_retries) { -@@ -676,7 +678,7 @@ bool V4L2CaptureDelegate::RunIoctl(int request, void* +@@ -677,7 +679,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)); } diff --git a/www/iridium/files/patch-media_capture_video_video__capture__buffer__pool__impl.cc b/www/iridium/files/patch-media_capture_video_video__capture__buffer__pool__impl.cc deleted file mode 100644 index ef65d3f0c74a..000000000000 --- a/www/iridium/files/patch-media_capture_video_video__capture__buffer__pool__impl.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- media/capture/video/video_capture_buffer_pool_impl.cc.orig 2022-03-28 18:11:04 UTC -+++ media/capture/video/video_capture_buffer_pool_impl.cc -@@ -74,7 +74,7 @@ VideoCaptureBufferPoolImpl::CreateSharedMemoryViaRawFi - int buffer_id) { - // This requires platforms where base::SharedMemoryHandle is backed by a - // file descriptor. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - base::AutoLock lock(lock_); - - VideoCaptureBufferTracker* tracker = GetTracker(buffer_id); diff --git a/www/iridium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc b/www/iridium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc index 6e84fcc8239d..e210d5b562ab 100644 --- a/www/iridium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc +++ b/www/iridium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc @@ -1,20 +1,20 @@ ---- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2022-12-01 10:35:46 UTC +--- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2022-12-06 08:09:13 UTC +++ media/gpu/chromeos/video_decoder_pipeline.cc -@@ -748,7 +748,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -767,7 +767,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux should always use a custom allocator (to allocate buffers using // libva) and a PlatformVideoFramePool. CHECK(allocator.has_value()); -@@ -770,7 +770,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -789,7 +789,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( #error "Unsupported platform" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // viable_candidate should always be set unless using L1 protected content, // which isn't an option on linux. CHECK(viable_candidate); 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 37cc6135e1fd..a9d584cd6a5e 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 2022-10-05 07:34:01 UTC +--- media/gpu/vaapi/vaapi_wrapper.cc.orig 2022-12-06 08:09:13 UTC +++ media/gpu/vaapi/vaapi_wrapper.cc -@@ -742,7 +742,7 @@ VADisplayState::VADisplayState() +@@ -740,7 +740,7 @@ VADisplayState::VADisplayState() bool VADisplayState::Initialize() { base::AutoLock auto_lock(va_lock_); -#if defined(USE_OZONE) && BUILDFLAG(IS_LINUX) +#if defined(USE_OZONE) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) // TODO(crbug.com/1116701): add vaapi support for other Ozone platforms on // Linux. See comment in OzonePlatform::PlatformProperties::supports_vaapi // for more details. This will also require revisiting everything that's diff --git a/www/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 571c5f76ebe1..c1c2051965e9 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,29 +1,29 @@ ---- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc.orig 2022-10-05 07:34:01 UTC +--- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc.orig 2022-12-06 08:09:13 UTC +++ media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.cc @@ -42,7 +42,7 @@ media::stable::mojom::VideoFrameDataPtr MakeVideoFrame gfx::GpuMemoryBufferHandle gpu_memory_buffer_handle = input->GetGpuMemoryBuffer()->CloneHandle(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CHECK_EQ(gpu_memory_buffer_handle.type, gfx::NATIVE_PIXMAP); CHECK(!gpu_memory_buffer_handle.native_pixmap_handle.planes.empty()); #else -@@ -749,7 +749,7 @@ const gfx::GpuMemoryBufferId& StructTraits< +@@ -747,7 +747,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, -@@ -770,7 +770,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_video_gpu__memory__buffer__video__frame__pool.cc b/www/iridium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc index 6043b8697710..06c869b17ac0 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 2022-12-01 10:35:46 UTC +--- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2022-12-06 08:09:13 UTC +++ media/video/gpu_memory_buffer_video_frame_pool.cc -@@ -729,7 +729,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa +@@ -732,7 +732,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 -@@ -1158,7 +1158,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1160,7 +1160,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo is_webgpu_compatible = (gpu_memory_buffer != nullptr); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) is_webgpu_compatible = (gpu_memory_buffer != nullptr); if (is_webgpu_compatible) { is_webgpu_compatible &= -@@ -1176,7 +1176,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo - gpu::SHARED_IMAGE_USAGE_GLES2 | gpu::SHARED_IMAGE_USAGE_RASTER | - gpu::SHARED_IMAGE_USAGE_DISPLAY | gpu::SHARED_IMAGE_USAGE_SCANOUT; +@@ -1179,7 +1179,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo + gpu::SHARED_IMAGE_USAGE_DISPLAY_READ | + gpu::SHARED_IMAGE_USAGE_SCANOUT; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1241537): Always add the flag once the // OzoneImageBacking is by default turned on. if (base::CommandLine::ForCurrentProcess()->HasSwitch( diff --git a/www/iridium/files/patch-media_webrtc_audio__processor.cc b/www/iridium/files/patch-media_webrtc_audio__processor.cc index 78dc81a24c59..a7508abd3d05 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 2022-10-05 07:34:01 UTC +--- media/webrtc/audio_processor.cc.orig 2022-12-06 08:09:13 UTC +++ media/webrtc/audio_processor.cc -@@ -473,7 +473,7 @@ absl::optional AudioProcessor::ProcessData( +@@ -487,7 +487,7 @@ absl::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 35479a212d11..0f5a2612b8cc 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 2022-12-01 10:35:46 UTC +--- mojo/core/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ mojo/core/BUILD.gn -@@ -159,7 +159,7 @@ template("core_impl_source_set") { +@@ -163,7 +163,7 @@ template("core_impl_source_set") { ] } - 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_embedder_features.h b/www/iridium/files/patch-mojo_core_embedder_features.h index 9a1e9fca7ab3..36dec2fd3010 100644 --- a/www/iridium/files/patch-mojo_core_embedder_features.h +++ b/www/iridium/files/patch-mojo_core_embedder_features.h @@ -1,11 +1,11 @@ ---- mojo/core/embedder/features.h.orig 2022-03-28 18:11:04 UTC +--- mojo/core/embedder/features.h.orig 2022-12-06 08:09:13 UTC +++ mojo/core/embedder/features.h @@ -14,7 +14,7 @@ namespace mojo { namespace core { #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(MOJO_CORE_EMBEDDER_FEATURES) - extern const base::Feature kMojoLinuxChannelSharedMem; + BASE_DECLARE_FEATURE(kMojoLinuxChannelSharedMem); diff --git a/www/iridium/files/patch-mojo_public_c_system_thunks.cc b/www/iridium/files/patch-mojo_public_c_system_thunks.cc index 134c8a1a8d8f..73b823265371 100644 --- a/www/iridium/files/patch-mojo_public_c_system_thunks.cc +++ b/www/iridium/files/patch-mojo_public_c_system_thunks.cc @@ -1,38 +1,38 @@ ---- mojo/public/c/system/thunks.cc.orig 2022-10-05 07:34:01 UTC +--- mojo/public/c/system/thunks.cc.orig 2022-12-06 08:09:13 UTC +++ mojo/public/c/system/thunks.cc -@@ -24,7 +24,7 @@ +@@ -23,7 +23,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" -@@ -73,7 +73,7 @@ class CoreLibraryInitializer { +@@ -72,7 +72,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; -@@ -87,7 +87,7 @@ class CoreLibraryInitializer { +@@ -86,7 +86,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) -@@ -143,7 +143,7 @@ class CoreLibraryInitializer { +@@ -142,7 +142,7 @@ class CoreLibraryInitializer { private: #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) absl::optional library_; #endif }; diff --git a/www/iridium/files/patch-net_BUILD.gn b/www/iridium/files/patch-net_BUILD.gn index 5448e4b5e610..9ac317b81a23 100644 --- a/www/iridium/files/patch-net_BUILD.gn +++ b/www/iridium/files/patch-net_BUILD.gn @@ -1,83 +1,83 @@ ---- net/BUILD.gn.orig 2022-12-01 10:35:46 UTC +--- net/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ net/BUILD.gn -@@ -104,7 +104,7 @@ net_configs = [ +@@ -103,7 +103,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" ] } -@@ -1202,6 +1202,15 @@ component("net") { +@@ -1207,6 +1207,15 @@ component("net") { deps += [ "//third_party/xdg_shared_mime_info" ] } + if (is_bsd) { + sources -= [ + "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", -@@ -1334,7 +1343,7 @@ component("net") { +@@ -1341,7 +1350,7 @@ component("net") { } } - if (is_android || is_chromeos) { + if (is_android || is_chromeos || is_bsd) { sources += [ "base/network_change_notifier_posix.cc", "base/network_change_notifier_posix.h", -@@ -1367,7 +1376,7 @@ component("net") { +@@ -1374,7 +1383,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", -@@ -4374,7 +4383,7 @@ test("net_unittests") { +@@ -4386,7 +4395,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "base/address_tracker_linux_unittest.cc", "base/network_interfaces_linux_unittest.cc", -@@ -4449,6 +4458,10 @@ test("net_unittests") { +@@ -4462,6 +4471,10 @@ test("net_unittests") { "//url:buildflags", ] + if (is_bsd) { + deps += [ "//sandbox/policy" ] + } + if (enable_websockets) { deps += [ "//net/server:tests" ] } -@@ -4516,7 +4529,7 @@ test("net_unittests") { +@@ -4529,7 +4542,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "tools/quic/quic_simple_server_test.cc" ] } -@@ -4657,7 +4670,7 @@ test("net_unittests") { +@@ -4669,7 +4682,7 @@ test("net_unittests") { } # Use getifaddrs() on POSIX platforms, except Linux. - if (is_posix && !is_linux && !is_chromeos) { + if (is_posix && !is_linux && !is_chromeos && !is_bsd) { sources += [ "base/network_interfaces_getifaddrs_unittest.cc" ] } diff --git a/www/iridium/files/patch-net_base_network__change__notifier.cc b/www/iridium/files/patch-net_base_network__change__notifier.cc index d0811bfc6771..23e9bf273ff5 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 2022-10-05 07:34:01 UTC +--- net/base/network_change_notifier.cc.orig 2022-12-06 08:09:13 UTC +++ net/base/network_change_notifier.cc @@ -37,7 +37,7 @@ #include "net/base/network_change_notifier_linux.h" #elif BUILDFLAG(IS_APPLE) #include "net/base/network_change_notifier_mac.h" -#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "net/base/network_change_notifier_posix.h" #elif BUILDFLAG(IS_FUCHSIA) #include "net/base/network_change_notifier_fuchsia.h" -@@ -326,6 +326,9 @@ std::unique_ptr NetworkChangeNo +@@ -321,6 +321,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__verifier.cc b/www/iridium/files/patch-net_cert_cert__verifier.cc index 9899ac06882f..9bf266da41ca 100644 --- a/www/iridium/files/patch-net_cert_cert__verifier.cc +++ b/www/iridium/files/patch-net_cert_cert__verifier.cc @@ -1,11 +1,11 @@ ---- net/cert/cert_verifier.cc.orig 2022-03-28 18:11:04 UTC +--- net/cert/cert_verifier.cc.orig 2022-12-06 08:09:13 UTC +++ net/cert/cert_verifier.cc -@@ -78,7 +78,7 @@ bool CertVerifier::RequestParams::operator<( - std::unique_ptr CertVerifier::CreateDefaultWithoutCaching( - scoped_refptr cert_net_fetcher) { - scoped_refptr verify_proc; +@@ -87,7 +87,7 @@ std::unique_ptr CertVerifier::CreateDefa + } + #endif + if (!verify_proc) { -#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - verify_proc = - CertVerifyProc::CreateBuiltinVerifyProc(std::move(cert_net_fetcher)); - #elif BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) + verify_proc = + CertVerifyProc::CreateBuiltinVerifyProc(std::move(cert_net_fetcher)); + #else diff --git a/www/iridium/files/patch-net_cert_cert__verify__proc.cc b/www/iridium/files/patch-net_cert_cert__verify__proc.cc index fcf08c7f4308..3b7c1214d755 100644 --- a/www/iridium/files/patch-net_cert_cert__verify__proc.cc +++ b/www/iridium/files/patch-net_cert_cert__verify__proc.cc @@ -1,11 +1,11 @@ ---- net/cert/cert_verify_proc.cc.orig 2022-10-05 07:34:01 UTC +--- net/cert/cert_verify_proc.cc.orig 2022-12-06 08:09:13 UTC +++ net/cert/cert_verify_proc.cc -@@ -510,7 +510,7 @@ base::Value CertVerifyParams(X509Certificate* cert, +@@ -506,7 +506,7 @@ base::Value CertVerifyParams(X509Certificate* cert, } // namespace -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // static scoped_refptr CertVerifyProc::CreateSystemVerifyProc( scoped_refptr cert_net_fetcher) { 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 f76b15670227..acd58db280eb 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 2022-10-05 07:34:01 UTC +--- net/cert/cert_verify_proc.h.orig 2022-12-06 08:09:13 UTC +++ net/cert/cert_verify_proc.h -@@ -80,7 +80,7 @@ class NET_EXPORT CertVerifyProc +@@ -81,7 +81,7 @@ class NET_EXPORT CertVerifyProc kMaxValue = kOther }; -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // Creates and returns a CertVerifyProc that uses the system verifier. // |cert_net_fetcher| may not be used, depending on the implementation. static scoped_refptr CreateSystemVerifyProc( diff --git a/www/iridium/files/patch-net_cert_cert__verify__proc__unittest.cc b/www/iridium/files/patch-net_cert_cert__verify__proc__unittest.cc index 6ca6af8f3342..1951e8559ded 100644 --- a/www/iridium/files/patch-net_cert_cert__verify__proc__unittest.cc +++ b/www/iridium/files/patch-net_cert_cert__verify__proc__unittest.cc @@ -1,11 +1,11 @@ ---- net/cert/cert_verify_proc_unittest.cc.orig 2022-10-05 07:34:01 UTC +--- net/cert/cert_verify_proc_unittest.cc.orig 2022-12-06 08:09:13 UTC +++ net/cert/cert_verify_proc_unittest.cc -@@ -239,7 +239,7 @@ const std::vector kAllCertVerifier +@@ -242,7 +242,7 @@ const std::vector kAllCertVerifier #if BUILDFLAG(CHROME_ROOT_STORE_SUPPORTED) CERT_VERIFY_PROC_BUILTIN_CHROME_ROOTS #endif -#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CERT_VERIFY_PROC_BUILTIN #else #error Unsupported platform diff --git a/www/iridium/files/patch-net_cert_test__root__certs__unittest.cc b/www/iridium/files/patch-net_cert_test__root__certs__unittest.cc index 12ccb95ec7a7..c46a0fd9902e 100644 --- a/www/iridium/files/patch-net_cert_test__root__certs__unittest.cc +++ b/www/iridium/files/patch-net_cert_test__root__certs__unittest.cc @@ -1,11 +1,11 @@ ---- net/cert/test_root_certs_unittest.cc.orig 2022-03-28 18:11:04 UTC +--- net/cert/test_root_certs_unittest.cc.orig 2022-12-06 08:09:13 UTC +++ net/cert/test_root_certs_unittest.cc -@@ -33,7 +33,7 @@ const char kRootCertificateFile[] = "root_ca_cert.pem" - const char kGoodCertificateFile[] = "ok_cert.pem"; - - scoped_refptr CreateCertVerifyProc() { +@@ -39,7 +39,7 @@ scoped_refptr CreateCertVerifyProc() { + /*cert_net_fetcher=*/nullptr); + } + #endif -#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return CertVerifyProc::CreateBuiltinVerifyProc(/*cert_net_fetcher=*/nullptr); - #elif BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) - if (base::FeatureList::IsEnabled(features::kCertVerifierBuiltinFeature)) { + #else + return CertVerifyProc::CreateSystemVerifyProc(/*cert_net_fetcher=*/nullptr); diff --git a/www/iridium/files/patch-net_dns_BUILD.gn b/www/iridium/files/patch-net_dns_BUILD.gn index 31e31a8cb87e..bf2638a706d4 100644 --- a/www/iridium/files/patch-net_dns_BUILD.gn +++ b/www/iridium/files/patch-net_dns_BUILD.gn @@ -1,31 +1,31 @@ ---- net/dns/BUILD.gn.orig 2022-12-01 10:35:46 UTC +--- net/dns/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ net/dns/BUILD.gn -@@ -112,7 +112,7 @@ source_set("dns") { +@@ -116,7 +116,7 @@ source_set("dns") { "dns_config_service_android.cc", "dns_config_service_android.h", ] - } else if (is_linux) { + } else if (is_linux && !is_bsd) { sources += [ "dns_config_service_linux.cc", "dns_config_service_linux.h", -@@ -153,6 +153,7 @@ source_set("dns") { +@@ -157,6 +157,7 @@ source_set("dns") { ":host_resolver_manager", ":mdns_client", "//net:net_public_deps", + "//printing/buildflags", ] allow_circular_includes_from = [ -@@ -414,9 +415,9 @@ source_set("tests") { +@@ -418,9 +419,9 @@ source_set("tests") { if (is_android) { sources += [ "dns_config_service_android_unittest.cc" ] - } else if (is_linux) { + } else if (is_linux && !is_bsd) { sources += [ "dns_config_service_linux_unittest.cc" ] - } else if (is_posix) { + } else if (is_posix && !is_bsd) { sources += [ "dns_config_service_posix_unittest.cc" ] } diff --git a/www/iridium/files/patch-net_dns_dns__reloader.h b/www/iridium/files/patch-net_dns_dns__reloader.h index 7bd41345e2d5..ff4d08948291 100644 --- a/www/iridium/files/patch-net_dns_dns__reloader.h +++ b/www/iridium/files/patch-net_dns_dns__reloader.h @@ -1,11 +1,19 @@ ---- net/dns/dns_reloader.h.orig 2022-03-28 18:11:04 UTC +--- net/dns/dns_reloader.h.orig 2022-12-06 08:09:13 UTC +++ net/dns/dns_reloader.h @@ -7,7 +7,7 @@ #include "build/build_config.h" -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) namespace net { // Call on the network thread before calling DnsReloaderMaybeReload() anywhere. +@@ -18,6 +18,6 @@ void EnsureDnsReloaderInit(); + void DnsReloaderMaybeReload(); + + } // namespace net +-#endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) ++#endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) + + #endif // NET_DNS_DNS_RELOADER_H_ diff --git a/www/iridium/files/patch-net_dns_host__resolver__manager.cc b/www/iridium/files/patch-net_dns_host__resolver__manager.cc deleted file mode 100644 index 6bace3b1aed0..000000000000 --- a/www/iridium/files/patch-net_dns_host__resolver__manager.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- net/dns/host_resolver_manager.cc.orig 2022-12-01 10:35:46 UTC -+++ net/dns/host_resolver_manager.cc -@@ -3132,7 +3132,7 @@ HostResolverManager::HostResolverManager( - } - if (system_dns_config_notifier_) - system_dns_config_notifier_->AddObserver(this); --#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \ -+#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) && \ - !BUILDFLAG(IS_ANDROID) - EnsureDnsReloaderInit(); - #endif diff --git a/www/iridium/files/patch-net_dns_host__resolver__proc.cc b/www/iridium/files/patch-net_dns_host__resolver__proc.cc index 883e777a496c..4fdd727daede 100644 --- a/www/iridium/files/patch-net_dns_host__resolver__proc.cc +++ b/www/iridium/files/patch-net_dns_host__resolver__proc.cc @@ -1,22 +1,13 @@ ---- net/dns/host_resolver_proc.cc.orig 2022-10-05 07:34:01 UTC +--- net/dns/host_resolver_proc.cc.orig 2022-12-06 08:09:13 UTC +++ net/dns/host_resolver_proc.cc -@@ -19,10 +19,6 @@ - #include "net/dns/dns_util.h" - #include "net/dns/host_resolver.h" +@@ -15,10 +15,6 @@ + #include "net/base/net_errors.h" + #include "net/dns/host_resolver_system_task.h" -#if BUILDFLAG(IS_OPENBSD) -#define AI_ADDRCONFIG 0 -#endif - namespace net { HostResolverProc* HostResolverProc::default_proc_ = nullptr; -@@ -193,7 +189,7 @@ int SystemHostResolverCall(const std::string& host, - base::BlockingType::WILL_BLOCK); - - #if BUILDFLAG(IS_POSIX) && \ -- !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_ANDROID)) -+ !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_ANDROID)) - DnsReloaderMaybeReload(); - #endif - auto [ai, err, os_error] = AddressInfo::Get(host, hints, nullptr, network); diff --git a/www/iridium/files/patch-net_dns_host__resolver__system__task.cc b/www/iridium/files/patch-net_dns_host__resolver__system__task.cc new file mode 100644 index 000000000000..5ee5735ae545 --- /dev/null +++ b/www/iridium/files/patch-net_dns_host__resolver__system__task.cc @@ -0,0 +1,22 @@ +--- net/dns/host_resolver_system_task.cc.orig 2022-12-06 08:09:13 UTC ++++ net/dns/host_resolver_system_task.cc +@@ -310,8 +310,8 @@ void HostResolverSystemTask::OnLookupComplete(const ui + } + + void EnsureSystemHostResolverCallReady() { +-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \ +- !BUILDFLAG(IS_ANDROID) ++#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && \ ++ !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) + EnsureDnsReloaderInit(); + #elif BUILDFLAG(IS_WIN) + EnsureWinsockInit(); +@@ -397,7 +397,7 @@ int SystemHostResolverCall(const std::string& host, + base::BlockingType::WILL_BLOCK); + + #if BUILDFLAG(IS_POSIX) && \ +- !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_ANDROID)) ++ !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) + DnsReloaderMaybeReload(); + #endif + auto [ai, err, os_error] = AddressInfo::Get(host, hints, nullptr, network); 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 863cf706af30..02e8b127d50a 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 2022-10-05 07:34:01 UTC +--- net/socket/udp_socket_unittest.cc.orig 2022-12-06 08:09:13 UTC +++ net/socket/udp_socket_unittest.cc -@@ -328,7 +328,7 @@ TEST_F(UDPSocketTest, PartialRecv) { +@@ -342,7 +342,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). -@@ -588,7 +588,7 @@ TEST_F(UDPSocketTest, ClientSetDoNotFragment) { +@@ -602,7 +602,7 @@ TEST_F(UDPSocketTest, ClientSetDoNotFragment) { EXPECT_THAT(rv, IsOk()); rv = client.SetDoNotFragment(); -#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // TODO(crbug.com/945590): IP_MTU_DISCOVER is not implemented on Fuchsia. EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED)); #elif BUILDFLAG(IS_MAC) -@@ -616,7 +616,7 @@ TEST_F(UDPSocketTest, ServerSetDoNotFragment) { +@@ -630,7 +630,7 @@ TEST_F(UDPSocketTest, ServerSetDoNotFragment) { EXPECT_THAT(rv, IsOk()); rv = server.SetDoNotFragment(); -#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // TODO(crbug.com/945590): IP_MTU_DISCOVER is not implemented on Fuchsia. EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED)); #elif BUILDFLAG(IS_MAC) -@@ -681,7 +681,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup) { +@@ -695,7 +695,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup) { // TODO(https://crbug.com/947115): failing on device on iOS 12.2. // TODO(https://crbug.com/1227554): flaky on Mac 11. -#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 -@@ -735,7 +735,7 @@ TEST_F(UDPSocketTest, MAYBE_SharedMulticastAddress) { +@@ -749,7 +749,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_third__party_quiche_BUILD.gn b/www/iridium/files/patch-net_third__party_quiche_BUILD.gn index 679d6b967435..533d0ef9d782 100644 --- a/www/iridium/files/patch-net_third__party_quiche_BUILD.gn +++ b/www/iridium/files/patch-net_third__party_quiche_BUILD.gn @@ -1,11 +1,11 @@ ---- net/third_party/quiche/BUILD.gn.orig 2022-12-01 10:35:46 UTC +--- net/third_party/quiche/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ net/third_party/quiche/BUILD.gn @@ -28,7 +28,7 @@ import("//build/config/chromeos/ui_mode.gni") import("//testing/libfuzzer/fuzzer_test.gni") import("//third_party/protobuf/proto_library.gni") -build_epoll_based_tools = is_linux || is_chromeos +build_epoll_based_tools = (is_linux && !is_bsd) || is_chromeos - # TODO(crbug.com/1344231): Set this to always true. At which point, this - # variable can go away and the conditionals below that depends on it can be + config("quiche_internal_config") { + cflags = [] diff --git a/www/iridium/files/patch-pdf_pdfium_pdfium__engine.cc b/www/iridium/files/patch-pdf_pdfium_pdfium__engine.cc index 03779d760003..ee68f4c651c5 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 2022-12-01 10:35:46 UTC +--- pdf/pdfium/pdfium_engine.cc.orig 2022-12-06 08:09:13 UTC +++ pdf/pdfium/pdfium_engine.cc -@@ -81,7 +81,7 @@ +@@ -82,7 +82,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 -@@ -520,7 +520,7 @@ void InitializeSDK(bool enable_v8, FontMappingMode fon +@@ -521,7 +521,7 @@ void InitializeSDK(bool enable_v8, FontMappingMode fon 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-remoting_base_chromoting__event.cc b/www/iridium/files/patch-remoting_base_chromoting__event.cc index 1b605adcf0b5..6e0b74c56308 100644 --- a/www/iridium/files/patch-remoting_base_chromoting__event.cc +++ b/www/iridium/files/patch-remoting_base_chromoting__event.cc @@ -1,11 +1,11 @@ ---- remoting/base/chromoting_event.cc.orig 2022-03-28 18:11:04 UTC +--- remoting/base/chromoting_event.cc.orig 2022-12-06 08:09:13 UTC +++ remoting/base/chromoting_event.cc -@@ -190,7 +190,7 @@ void ChromotingEvent::AddSystemInfo() { +@@ -192,7 +192,7 @@ void ChromotingEvent::AddSystemInfo() { SetString(kCpuKey, base::SysInfo::OperatingSystemArchitecture()); SetString(kOsVersionKey, base::SysInfo::OperatingSystemVersion()); SetString(kWebAppVersionKey, STRINGIZE(VERSION)); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) Os os = Os::CHROMOTING_LINUX; #elif BUILDFLAG(IS_CHROMEOS_ASH) Os os = Os::CHROMOTING_CHROMEOS; diff --git a/www/iridium/files/patch-remoting_host_basic__desktop__environment.cc b/www/iridium/files/patch-remoting_host_basic__desktop__environment.cc index 7ad8adb1275a..29f7bcad0b49 100644 --- a/www/iridium/files/patch-remoting_host_basic__desktop__environment.cc +++ b/www/iridium/files/patch-remoting_host_basic__desktop__environment.cc @@ -1,11 +1,11 @@ ---- remoting/host/basic_desktop_environment.cc.orig 2022-12-01 10:35:46 UTC +--- remoting/host/basic_desktop_environment.cc.orig 2022-12-06 08:09:13 UTC +++ remoting/host/basic_desktop_environment.cc -@@ -190,7 +190,7 @@ BasicDesktopEnvironment::CreateVideoCapturer() { +@@ -179,7 +179,7 @@ BasicDesktopEnvironment::CreateVideoCapturer() { scoped_refptr capture_task_runner; #if BUILDFLAG(IS_CHROMEOS_ASH) capture_task_runner = ui_task_runner_; --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +-#elif BUILDFLAG(IS_LINUX) && defined(REMOTING_USE_WAYLAND) ++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_WAYLAND) // Each capturer instance should get its own thread so the capturers don't // compete with each other in multistream mode. capture_task_runner = base::ThreadPool::CreateSingleThreadTaskRunner( diff --git a/www/iridium/files/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc b/www/iridium/files/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc index 56d6413e4346..ad110758e34e 100644 --- a/www/iridium/files/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc +++ b/www/iridium/files/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc @@ -1,47 +1,47 @@ ---- remoting/host/it2me/it2me_native_messaging_host_main.cc.orig 2022-10-05 07:34:01 UTC +--- remoting/host/it2me/it2me_native_messaging_host_main.cc.orig 2022-12-06 08:09:13 UTC +++ remoting/host/it2me/it2me_native_messaging_host_main.cc @@ -30,7 +30,7 @@ #include "remoting/host/resources.h" #include "remoting/host/usage_stats_consent.h" --#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) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #if defined(REMOTING_USE_X11) || defined(REMOTING_USE_WAYLAND) #include - #include "base/linux_util.h" -@@ -77,7 +77,7 @@ bool CurrentProcessHasUiAccess() { +@@ -80,7 +80,7 @@ bool CurrentProcessHasUiAccess() { // Creates a It2MeNativeMessagingHost instance, attaches it to stdin/stdout and // runs the task executor until It2MeNativeMessagingHost signals shutdown. int It2MeNativeMessagingHostMain(int argc, char** argv) { -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) // Initialize Xlib for multi-threaded use, allowing non-Chromium code to // use X11 safely (such as the WebRTC capturer, GTK ...) x11::InitXlib(); -@@ -123,7 +123,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv +@@ -126,7 +126,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv remoting::LoadResources(""); --#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) +-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ + (defined(REMOTING_USE_X11) || defined(REMOTING_USE_WAYLAND)) // Required for any calls into GTK functions, such as the Disconnect and // Continue windows. Calling with nullptr arguments because we don't have - // any command line arguments for gtk to consume. -@@ -257,7 +257,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv +@@ -261,7 +261,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv PolicyWatcher::CreateWithTaskRunner(context->file_task_runner(), context->management_service()); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) // Create an X11EventSource on all UI threads, so the global X11 connection // (x11::Connection::Get()) can dispatch X events. auto event_source = -@@ -280,7 +280,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv +@@ -284,7 +284,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv // Run the loop until channel is alive. run_loop.Run(); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) input_task_runner->PostTask(FROM_HERE, base::BindOnce([]() { delete ui::X11EventSource::GetInstance(); })); diff --git a/www/iridium/files/patch-remoting_host_me2me__desktop__environment.cc b/www/iridium/files/patch-remoting_host_me2me__desktop__environment.cc index 3635b0152b03..b6d8ad6a5cc9 100644 --- a/www/iridium/files/patch-remoting_host_me2me__desktop__environment.cc +++ b/www/iridium/files/patch-remoting_host_me2me__desktop__environment.cc @@ -1,29 +1,20 @@ ---- remoting/host/me2me_desktop_environment.cc.orig 2022-12-01 10:35:46 UTC +--- remoting/host/me2me_desktop_environment.cc.orig 2022-12-06 08:09:13 UTC +++ remoting/host/me2me_desktop_environment.cc -@@ -41,7 +41,7 @@ namespace remoting { - - namespace { - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - - constexpr char kUseXvfbEnvVar[] = "CHROME_REMOTE_DESKTOP_USE_XVFB"; - -@@ -114,7 +114,7 @@ std::string Me2MeDesktopEnvironment::GetCapabilities() +@@ -124,7 +124,7 @@ std::string Me2MeDesktopEnvironment::GetCapabilities() capabilities += protocol::kRemoteWebAuthnCapability; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Multi-stream and client-controlled layout are only supported with - // Xorg+Dummy. - // TODO(crbug.com/1366595): Either just remove this check if the dependency -@@ -175,7 +175,7 @@ bool Me2MeDesktopEnvironment::InitializeSecurity( + capabilities += " "; + capabilities += protocol::kMultiStreamCapability; + +@@ -183,7 +183,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 a671b82e54de..e060305b3bc5 100644 --- a/www/iridium/files/patch-remoting_host_remoting__me2me__host.cc +++ b/www/iridium/files/patch-remoting_host_remoting__me2me__host.cc @@ -1,144 +1,144 @@ ---- remoting/host/remoting_me2me_host.cc.orig 2022-12-01 10:35:46 UTC +--- remoting/host/remoting_me2me_host.cc.orig 2022-12-06 08:09:13 UTC +++ remoting/host/remoting_me2me_host.cc @@ -125,7 +125,7 @@ #include "remoting/host/mac/permission_utils.h" #endif // BUILDFLAG(IS_APPLE) --#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) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #if defined(REMOTING_USE_X11) || defined(REMOTING_USE_WAYLAND) #include - - #include "ui/events/platform/x11/x11_event_source.h" -@@ -133,13 +133,13 @@ - #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && - // defined(REMOTING_USE_X11) + #endif // defined(REMOTING_USE_X11) || defined(REMOTING_USE_WAYLAND) +@@ -136,13 +136,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 -@@ -181,7 +181,7 @@ const char kApplicationName[] = "chromoting"; +@@ -184,7 +184,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"; -@@ -389,7 +389,7 @@ class HostProcess : public ConfigWatcher::Delegate, +@@ -392,7 +392,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) -@@ -455,7 +455,7 @@ class HostProcess : public ConfigWatcher::Delegate, +@@ -458,7 +458,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_; -@@ -763,7 +763,7 @@ void HostProcess::StartOnNetworkThread() { +@@ -767,7 +767,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) } -@@ -822,7 +822,7 @@ void HostProcess::CreateAuthenticatorFactory() { +@@ -826,7 +826,7 @@ void HostProcess::CreateAuthenticatorFactory() { DCHECK(third_party_auth_config_.token_url.is_valid()); DCHECK(third_party_auth_config_.token_validation_url.is_valid()); -#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, -@@ -945,7 +945,7 @@ void HostProcess::StartOnUiThread() { +@@ -949,7 +949,7 @@ void HostProcess::StartOnUiThread() { WaylandManager::Get()->Init(context_->ui_task_runner()); #endif // defined(REMOTING_USE_WAYLAND -#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 = base::CommandLine::ForCurrentProcess()-> -@@ -1016,7 +1016,7 @@ void HostProcess::ShutdownOnUiThread() { +@@ -1020,7 +1020,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. -@@ -1024,7 +1024,7 @@ void HostProcess::ShutdownOnUiThread() { +@@ -1028,7 +1028,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(); })); -@@ -1351,7 +1351,7 @@ bool HostProcess::OnUsernamePolicyUpdate(const base::V +@@ -1355,7 +1355,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) absl::optional host_username_match_required = policies.FindBool(policy::key::kRemoteAccessHostMatchUsername); if (!host_username_match_required.has_value()) -@@ -1737,7 +1737,7 @@ void HostProcess::StartHost() { +@@ -1741,7 +1741,7 @@ void HostProcess::StartHost() { // The feature is enabled for all Googlers using a supported platform. desktop_environment_options_.set_enable_remote_open_url(is_googler_); -#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_); #endif -@@ -1770,7 +1770,7 @@ void HostProcess::StartHost() { +@@ -1774,7 +1774,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_ = -@@ -1939,7 +1939,7 @@ int HostProcessMain() { +@@ -1943,7 +1943,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 ...) -@@ -1985,7 +1985,7 @@ int HostProcessMain() { +@@ -1991,7 +1991,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_protocol_webrtc__video__stream.cc b/www/iridium/files/patch-remoting_protocol_webrtc__video__stream.cc new file mode 100644 index 000000000000..d644fb20662a --- /dev/null +++ b/www/iridium/files/patch-remoting_protocol_webrtc__video__stream.cc @@ -0,0 +1,11 @@ +--- remoting/protocol/webrtc_video_stream.cc.orig 2022-12-06 08:09:13 UTC ++++ remoting/protocol/webrtc_video_stream.cc +@@ -219,7 +219,7 @@ WebrtcVideoStream::WebrtcVideoStream(const std::string + : stream_name_(stream_name), session_options_(session_options) { + // TODO(joedow): Dig into the threading model on other platforms to see if they + // can also be updated to run on a dedicated thread. +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + core_task_runner_ = base::ThreadPool::CreateSingleThreadTaskRunner( + {base::TaskPriority::HIGHEST}, + base::SingleThreadTaskRunnerThreadMode::DEDICATED); diff --git a/www/iridium/files/patch-sandbox_linux_services_libc__interceptor.cc b/www/iridium/files/patch-sandbox_linux_services_libc__interceptor.cc index d2e631356a45..30a421a3bf96 100644 --- a/www/iridium/files/patch-sandbox_linux_services_libc__interceptor.cc +++ b/www/iridium/files/patch-sandbox_linux_services_libc__interceptor.cc @@ -1,21 +1,21 @@ ---- sandbox/linux/services/libc_interceptor.cc.orig 2022-03-28 18:11:04 UTC +--- sandbox/linux/services/libc_interceptor.cc.orig 2022-12-06 08:09:13 UTC +++ sandbox/linux/services/libc_interceptor.cc -@@ -11,7 +11,9 @@ +@@ -12,7 +12,9 @@ #include #include #include +#if !defined(OS_BSD) #include +#endif #include #include #include -@@ -94,7 +96,7 @@ bool ReadTimeStruct(base::PickleIterator* iter, +@@ -161,7 +163,7 @@ bool ReadTimeStruct(base::PickleIterator* iter, } else { base::AutoLock lock(g_timezones_lock.Get()); auto ret_pair = g_timezones.Get().insert(timezone); - output->tm_zone = ret_pair.first->c_str(); + output->tm_zone = (char *)ret_pair.first->c_str(); } return true; diff --git a/www/iridium/files/patch-sandbox_policy_BUILD.gn b/www/iridium/files/patch-sandbox_policy_BUILD.gn index 07da53d91662..6d5fff575b4f 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 2022-10-05 07:34:01 UTC +--- sandbox/policy/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ sandbox/policy/BUILD.gn -@@ -36,7 +36,7 @@ component("policy") { +@@ -35,7 +35,7 @@ component("policy") { "//sandbox/policy/mojom", ] public_deps = [ "//sandbox:common" ] - 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", -@@ -95,6 +95,27 @@ component("policy") { +@@ -94,6 +94,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 87f3ff7eb452..600c63d80cab 100644 --- a/www/iridium/files/patch-sandbox_policy_features.cc +++ b/www/iridium/files/patch-sandbox_policy_features.cc @@ -1,14 +1,14 @@ ---- sandbox/policy/features.cc.orig 2022-10-05 07:34:01 UTC +--- sandbox/policy/features.cc.orig 2022-12-06 08:09:13 UTC +++ sandbox/policy/features.cc -@@ -14,7 +14,11 @@ namespace sandbox::policy::features { - // Enables network service sandbox. +@@ -15,7 +15,11 @@ namespace sandbox::policy::features { // (Only causes an effect when feature kNetworkService is enabled.) - const base::Feature kNetworkServiceSandbox{"NetworkServiceSandbox", + BASE_FEATURE(kNetworkServiceSandbox, + "NetworkServiceSandbox", +#if BUILDFLAG(IS_BSD) -+ base::FEATURE_ENABLED_BY_DEFAULT}; ++ base::FEATURE_ENABLED_BY_DEFAULT); +#else - base::FEATURE_DISABLED_BY_DEFAULT}; + base::FEATURE_DISABLED_BY_DEFAULT); +#endif #endif // !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) diff --git a/www/iridium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.h b/www/iridium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.h index 526a74a2bf5b..673e6b222748 100644 --- a/www/iridium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.h +++ b/www/iridium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.h @@ -1,281 +1,281 @@ ---- sandbox/policy/freebsd/sandbox_freebsd.h.orig 2022-03-28 18:11:04 UTC +--- sandbox/policy/freebsd/sandbox_freebsd.h.orig 2022-12-06 08:09:13 UTC +++ sandbox/policy/freebsd/sandbox_freebsd.h @@ -0,0 +1,278 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +#ifndef SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ +#define SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ + +#include +#include +#include + +#include "base/logging.h" +#include "base/posix/global_descriptors.h" +#include "sandbox/policy/export.h" +#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h" +#include "sandbox/policy/mojom/sandbox.mojom.h" -+#include "sandbox/policy/sanitizer_buildflags.h" ++#include "base/sanitizer_buildflags.h" + +#if BUILDFLAG(USING_SANITIZER) +#include +#endif + +namespace base { +template +struct DefaultSingletonTraits; +class Thread; +} // namespace base + +namespace sandbox { +namespace syscall_broker { +class BrokerProcess; +} // namespace syscall_broker +} // namespace sandbox + +namespace sandbox { +namespace policy { + +// A singleton class to represent and change our sandboxing state for the +// three main Linux sandboxes. +// The sandboxing model allows using two layers of sandboxing. The first layer +// can be implemented either with unprivileged namespaces or with the setuid +// sandbox. This class provides a way to engage the namespace sandbox, but does +// not deal with the legacy setuid sandbox directly. +// The second layer is mainly based on seccomp-bpf and is engaged with +// InitializeSandbox(). InitializeSandbox() is also responsible for "sealing" +// the first layer of sandboxing. That is, InitializeSandbox must always be +// called to have any meaningful sandboxing at all. +class SANDBOX_POLICY_EXPORT SandboxLinux { + public: + // This is a list of sandbox IPC methods which the renderer may send to the + // sandbox host. See + // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandbox_ipc.md + // This isn't the full list, values < 32 are reserved for methods called from + // Skia, and values < 64 are reserved for libc_interceptor.cc. + enum LinuxSandboxIPCMethods { + DEPRECATED_METHOD_GET_FALLBACK_FONT_FOR_CHAR = 64, + DEPRECATED_METHOD_GET_CHILD_WITH_INODE, + DEPRECATED_METHOD_GET_STYLE_FOR_STRIKE, + METHOD_MAKE_SHARED_MEMORY_SEGMENT, + DEPRECATED_METHOD_MATCH_WITH_FALLBACK, + }; + + // These form a bitmask which describes the conditions of the Linux sandbox. + // Note: this doesn't strictly give you the current status, it states + // what will be enabled when the relevant processes are initialized. + enum Status { + // SUID sandbox active. + kSUID = 1 << 0, + + // Sandbox is using a new PID namespace. + kPIDNS = 1 << 1, + + // Sandbox is using a new network namespace. + kNetNS = 1 << 2, + + // seccomp-bpf sandbox active. + kSeccompBPF = 1 << 3, + + // The Yama LSM module is present and enforcing. + kYama = 1 << 4, + + // seccomp-bpf sandbox is active and the kernel supports TSYNC. + kSeccompTSYNC = 1 << 5, + + // User namespace sandbox active. + kUserNS = 1 << 6, + + // A flag that denotes an invalid sandbox status. + kInvalid = 1 << 31, + }; + + // SandboxLinux Options are a superset of SandboxSecompBPF Options. + struct Options : public SandboxSeccompBPF::Options { + // When running with a zygote, the namespace sandbox will have already + // been engaged prior to initializing SandboxLinux itself, and need not + // be done so again. Set to true to indicate that there isn't a zygote + // for this process and the step is to be performed here explicitly. + bool engage_namespace_sandbox = false; + + // Allow starting the sandbox with multiple threads already running. This + // will enable TSYNC for seccomp-BPF, which syncs the seccomp-BPF policy + // across all running threads. + bool allow_threads_during_sandbox_init = false; + + // Enables the CHECK for open directories. The open directory check is only + // useful for the chroot jail (from the semantic layer of the sandbox), and + // can safely be disabled if we are only enabling the seccomp-BPF layer. + bool check_for_open_directories = true; + }; + + // Callers can provide this hook to run code right before the policy + // is passed to the BPF compiler and the sandbox is engaged. If + // pre_sandbox_hook() returns true, the sandbox will be engaged + // afterwards, otherwise the process is terminated. + using PreSandboxHook = base::OnceCallback; + + // Get our singleton instance. + static SandboxLinux* GetInstance(); + + SandboxLinux(const SandboxLinux&) = delete; + SandboxLinux& operator=(const SandboxLinux&) = delete; + + bool SetPledge(const char *pstring, const char *ppath); + bool SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type); + + // Do some initialization that can only be done before any of the sandboxes + // are enabled. If using the setuid sandbox, this should be called manually + // before the setuid sandbox is engaged. + // Security: When this runs, it is imperative that either InitializeSandbox() + // runs as well or that all file descriptors returned in + // GetFileDescriptorsToClose() get closed. + // Otherwise file descriptors that bypass the security of the setuid sandbox + // would be kept open. One must be particularly careful if a process performs + // a fork(). + void PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type); + + // Check that the current process is the init process of a new PID + // namespace and then proceed to drop access to the file system by using + // a new unprivileged namespace. This is a layer-1 sandbox. + // In order for this sandbox to be effective, it must be "sealed" by calling + // InitializeSandbox(). + void EngageNamespaceSandbox(bool from_zygote); + + // Return a list of file descriptors to close if PreinitializeSandbox() ran + // but InitializeSandbox() won't. Avoid using. + // TODO(jln): get rid of this hack. + std::vector GetFileDescriptorsToClose(); + + // Seal an eventual layer-1 sandbox and initialize the layer-2 sandbox with + // an adequate policy depending on the process type and command line + // arguments. + // Currently the layer-2 sandbox is composed of seccomp-bpf and address space + // limitations. + // This function should only be called without any thread running. + bool InitializeSandbox(sandbox::mojom::Sandbox sandbox_type, + PreSandboxHook hook, + const Options& options); + + // Stop |thread| in a way that can be trusted by the sandbox. + void StopThread(base::Thread* thread); + + // Returns the status of the renderer, worker and ppapi sandbox. Can only + // be queried after going through PreinitializeSandbox(). This is a bitmask + // and uses the constants defined in "enum Status" above. Since the + // status needs to be provided before the sandboxes are actually started, + // this returns what will actually happen once InitializeSandbox() + // is called from inside these processes. + int GetStatus(); + + static std::string GetSandboxTypeInEnglish(sandbox::mojom::Sandbox sandbox_type); + + // Returns true if the current process is single-threaded or if the number + // of threads cannot be determined. + bool IsSingleThreaded() const; + + // Returns true if we started Seccomp BPF. + bool seccomp_bpf_started() const; + + // Check the policy and eventually start the seccomp-bpf sandbox. This should + // never be called with threads started. If we detect that threads have + // started we will crash. + bool StartSeccompBPF(sandbox::mojom::Sandbox sandbox_type, + PreSandboxHook hook, + const Options& options); + + // Limit the address space of the current process (and its children) to make + // some vulnerabilities harder to exploit. Writes the errno due to setrlimit + // (including 0 if no error) into |error|. + bool LimitAddressSpace(int* error); + + // Returns a file descriptor to proc. The file descriptor is no longer valid + // after the sandbox has been sealed. + int proc_fd() const { + DCHECK_NE(-1, proc_fd_); + return proc_fd_; + } + +#if BUILDFLAG(USING_SANITIZER) + __sanitizer_sandbox_arguments* sanitizer_args() const { + return sanitizer_args_.get(); + }; +#endif + + // A BrokerProcess is a helper that is started before the sandbox is engaged, + // typically from a pre-sandbox hook, that will serve requests to access + // files over an IPC channel. The client of this runs from a SIGSYS handler + // triggered by the seccomp-bpf sandbox. + // |client_sandbox_policy| is the policy being run by the client, and is + // used to derive the equivalent broker-side policy. + // |broker_side_hook| is an alternate pre-sandbox hook to be run before the + // broker itself gets sandboxed, to which the broker side policy and + // |options| are passed. + // Crashes the process if the broker can not be started since continuation + // is impossible (and presumably unsafe). + // This should never be destroyed, as after the sandbox is started it is + // vital to the process. +#if 0 + void StartBrokerProcess( + const sandbox::syscall_broker::BrokerCommandSet& allowed_command_set, + std::vector permissions, + PreSandboxHook broker_side_hook, + const Options& options); + + sandbox::syscall_broker::BrokerProcess* broker_process() const { + return broker_process_; + } +#endif + + private: + friend struct base::DefaultSingletonTraits; + + SandboxLinux(); + ~SandboxLinux(); + + // We must have been pre_initialized_ before using these. + bool seccomp_bpf_supported() const; + bool seccomp_bpf_with_tsync_supported() const; + + // Returns true if it can be determined that the current process has open + // directories that are not managed by the SandboxLinux class. This would + // be a vulnerability as it would allow to bypass the setuid sandbox. + bool HasOpenDirectories() const; + + // The last part of the initialization is to make sure any temporary "hole" + // in the sandbox is closed. For now, this consists of closing proc_fd_. + void SealSandbox(); + + // GetStatus() makes promises as to how the sandbox will behave. This + // checks that no promises have been broken. + void CheckForBrokenPromises(sandbox::mojom::Sandbox sandbox_type); + + // Stop |thread| and make sure it does not appear in /proc/self/tasks/ + // anymore. + void StopThreadAndEnsureNotCounted(base::Thread* thread) const; + + // A file descriptor to /proc. It's dangerous to have it around as it could + // allow for sandbox bypasses. It needs to be closed before we consider + // ourselves sandboxed. + int proc_fd_; + + bool seccomp_bpf_started_; + // The value returned by GetStatus(). Gets computed once and then cached. + int sandbox_status_flags_; + // Did PreinitializeSandbox() run? + bool pre_initialized_; + bool seccomp_bpf_supported_; // Accurate if pre_initialized_. + bool seccomp_bpf_with_tsync_supported_; // Accurate if pre_initialized_. + bool yama_is_enforcing_; // Accurate if pre_initialized_. + bool initialize_sandbox_ran_; // InitializeSandbox() was called. +#if BUILDFLAG(USING_SANITIZER) + std::unique_ptr<__sanitizer_sandbox_arguments> sanitizer_args_; +#endif + sandbox::syscall_broker::BrokerProcess* broker_process_; // Leaked as global. +}; + +} // namespace policy +} // namespace sandbox + +#endif // SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ diff --git a/www/iridium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.h b/www/iridium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.h index 058b5c383406..4e87aba1fe55 100644 --- a/www/iridium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.h +++ b/www/iridium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.h @@ -1,285 +1,285 @@ ---- sandbox/policy/openbsd/sandbox_openbsd.h.orig 2022-03-28 18:11:04 UTC +--- sandbox/policy/openbsd/sandbox_openbsd.h.orig 2022-12-06 08:09:13 UTC +++ sandbox/policy/openbsd/sandbox_openbsd.h @@ -0,0 +1,282 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +#ifndef SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ +#define SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ + +#include +#include +#include + +#include "base/logging.h" +#include "base/posix/global_descriptors.h" +#include "sandbox/policy/export.h" +#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h" +#include "sandbox/policy/mojom/sandbox.mojom.h" -+#include "sandbox/policy/sanitizer_buildflags.h" ++#include "base/sanitizer_buildflags.h" + +#if BUILDFLAG(USING_SANITIZER) +#include +#endif + +namespace base { +template +struct DefaultSingletonTraits; +class Thread; +} // namespace base + +namespace sandbox { +namespace syscall_broker { +class BrokerProcess; +} // namespace syscall_broker +} // namespace sandbox + +namespace sandbox { +namespace policy { + +// A singleton class to represent and change our sandboxing state for the +// three main Linux sandboxes. +// The sandboxing model allows using two layers of sandboxing. The first layer +// can be implemented either with unprivileged namespaces or with the setuid +// sandbox. This class provides a way to engage the namespace sandbox, but does +// not deal with the legacy setuid sandbox directly. +// The second layer is mainly based on seccomp-bpf and is engaged with +// InitializeSandbox(). InitializeSandbox() is also responsible for "sealing" +// the first layer of sandboxing. That is, InitializeSandbox must always be +// called to have any meaningful sandboxing at all. +class SANDBOX_POLICY_EXPORT SandboxLinux { + public: + // This is a list of sandbox IPC methods which the renderer may send to the + // sandbox host. See + // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_sandbox_ipc.md + // This isn't the full list, values < 32 are reserved for methods called from + // Skia, and values < 64 are reserved for libc_interceptor.cc. + enum LinuxSandboxIPCMethods { + DEPRECATED_METHOD_GET_FALLBACK_FONT_FOR_CHAR = 64, + DEPRECATED_METHOD_GET_CHILD_WITH_INODE, + DEPRECATED_METHOD_GET_STYLE_FOR_STRIKE, + METHOD_MAKE_SHARED_MEMORY_SEGMENT, + DEPRECATED_METHOD_MATCH_WITH_FALLBACK, + }; + + // These form a bitmask which describes the conditions of the Linux sandbox. + // Note: this doesn't strictly give you the current status, it states + // what will be enabled when the relevant processes are initialized. + enum Status { + // SUID sandbox active. + kSUID = 1 << 0, + + // Sandbox is using a new PID namespace. + kPIDNS = 1 << 1, + + // Sandbox is using a new network namespace. + kNetNS = 1 << 2, + + // seccomp-bpf sandbox active. + kSeccompBPF = 1 << 3, + + // The Yama LSM module is present and enforcing. + kYama = 1 << 4, + + // seccomp-bpf sandbox is active and the kernel supports TSYNC. + kSeccompTSYNC = 1 << 5, + + // User namespace sandbox active. + kUserNS = 1 << 6, + + // A flag that denotes an invalid sandbox status. + kInvalid = 1 << 31, + }; + + // SandboxLinux Options are a superset of SandboxSecompBPF Options. + struct Options : public SandboxSeccompBPF::Options { + // When running with a zygote, the namespace sandbox will have already + // been engaged prior to initializing SandboxLinux itself, and need not + // be done so again. Set to true to indicate that there isn't a zygote + // for this process and the step is to be performed here explicitly. + bool engage_namespace_sandbox = false; + + // Allow starting the sandbox with multiple threads already running. This + // will enable TSYNC for seccomp-BPF, which syncs the seccomp-BPF policy + // across all running threads. + bool allow_threads_during_sandbox_init = false; + + // Enables the CHECK for open directories. The open directory check is only + // useful for the chroot jail (from the semantic layer of the sandbox), and + // can safely be disabled if we are only enabling the seccomp-BPF layer. + bool check_for_open_directories = true; + }; + + // Callers can provide this hook to run code right before the policy + // is passed to the BPF compiler and the sandbox is engaged. If + // pre_sandbox_hook() returns true, the sandbox will be engaged + // afterwards, otherwise the process is terminated. + using PreSandboxHook = base::OnceCallback; + + // Get our singleton instance. + static SandboxLinux* GetInstance(); + + SandboxLinux(const SandboxLinux&) = delete; + SandboxLinux& operator=(const SandboxLinux&) = delete; + + bool SetPledge(const char *pstring, const char *ppath); + bool SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type); + + // Do some initialization that can only be done before any of the sandboxes + // are enabled. If using the setuid sandbox, this should be called manually + // before the setuid sandbox is engaged. + // Security: When this runs, it is imperative that either InitializeSandbox() + // runs as well or that all file descriptors returned in + // GetFileDescriptorsToClose() get closed. + // Otherwise file descriptors that bypass the security of the setuid sandbox + // would be kept open. One must be particularly careful if a process performs + // a fork(). + void PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type); + + // Check that the current process is the init process of a new PID + // namespace and then proceed to drop access to the file system by using + // a new unprivileged namespace. This is a layer-1 sandbox. + // In order for this sandbox to be effective, it must be "sealed" by calling + // InitializeSandbox(). + void EngageNamespaceSandbox(bool from_zygote); + + // Return a list of file descriptors to close if PreinitializeSandbox() ran + // but InitializeSandbox() won't. Avoid using. + // TODO(jln): get rid of this hack. + std::vector GetFileDescriptorsToClose(); + + // Seal an eventual layer-1 sandbox and initialize the layer-2 sandbox with + // an adequate policy depending on the process type and command line + // arguments. + // Currently the layer-2 sandbox is composed of seccomp-bpf and address space + // limitations. + // This function should only be called without any thread running. + bool InitializeSandbox(sandbox::mojom::Sandbox sandbox_type, + PreSandboxHook hook, + const Options& options); + + // Stop |thread| in a way that can be trusted by the sandbox. + void StopThread(base::Thread* thread); + + // Returns the status of the renderer, worker and ppapi sandbox. Can only + // be queried after going through PreinitializeSandbox(). This is a bitmask + // and uses the constants defined in "enum Status" above. Since the + // status needs to be provided before the sandboxes are actually started, + // this returns what will actually happen once InitializeSandbox() + // is called from inside these processes. + int GetStatus(); + + static std::string GetSandboxTypeInEnglish(sandbox::mojom::Sandbox sandbox_type); + + // Returns true if the current process is single-threaded or if the number + // of threads cannot be determined. + bool IsSingleThreaded() const; + + // Returns true if we started Seccomp BPF. + bool seccomp_bpf_started() const; + + // Returns true if unveil(2) is used. + bool unveil_initialized() const; + + // Check the policy and eventually start the seccomp-bpf sandbox. This should + // never be called with threads started. If we detect that threads have + // started we will crash. + bool StartSeccompBPF(sandbox::mojom::Sandbox sandbox_type, + PreSandboxHook hook, + const Options& options); + + // Limit the address space of the current process (and its children) to make + // some vulnerabilities harder to exploit. Writes the errno due to setrlimit + // (including 0 if no error) into |error|. + bool LimitAddressSpace(int* error); + + // Returns a file descriptor to proc. The file descriptor is no longer valid + // after the sandbox has been sealed. + int proc_fd() const { + DCHECK_NE(-1, proc_fd_); + return proc_fd_; + } + +#if BUILDFLAG(USING_SANITIZER) + __sanitizer_sandbox_arguments* sanitizer_args() const { + return sanitizer_args_.get(); + }; +#endif + + // A BrokerProcess is a helper that is started before the sandbox is engaged, + // typically from a pre-sandbox hook, that will serve requests to access + // files over an IPC channel. The client of this runs from a SIGSYS handler + // triggered by the seccomp-bpf sandbox. + // |client_sandbox_policy| is the policy being run by the client, and is + // used to derive the equivalent broker-side policy. + // |broker_side_hook| is an alternate pre-sandbox hook to be run before the + // broker itself gets sandboxed, to which the broker side policy and + // |options| are passed. + // Crashes the process if the broker can not be started since continuation + // is impossible (and presumably unsafe). + // This should never be destroyed, as after the sandbox is started it is + // vital to the process. +#if 0 + void StartBrokerProcess( + const sandbox::syscall_broker::BrokerCommandSet& allowed_command_set, + std::vector permissions, + PreSandboxHook broker_side_hook, + const Options& options); + + sandbox::syscall_broker::BrokerProcess* broker_process() const { + return broker_process_; + } +#endif + + private: + friend struct base::DefaultSingletonTraits; + + SandboxLinux(); + ~SandboxLinux(); + + // We must have been pre_initialized_ before using these. + bool seccomp_bpf_supported() const; + bool seccomp_bpf_with_tsync_supported() const; + + // Returns true if it can be determined that the current process has open + // directories that are not managed by the SandboxLinux class. This would + // be a vulnerability as it would allow to bypass the setuid sandbox. + bool HasOpenDirectories() const; + + // The last part of the initialization is to make sure any temporary "hole" + // in the sandbox is closed. For now, this consists of closing proc_fd_. + void SealSandbox(); + + // GetStatus() makes promises as to how the sandbox will behave. This + // checks that no promises have been broken. + void CheckForBrokenPromises(sandbox::mojom::Sandbox sandbox_type); + + // Stop |thread| and make sure it does not appear in /proc/self/tasks/ + // anymore. + void StopThreadAndEnsureNotCounted(base::Thread* thread) const; + + // A file descriptor to /proc. It's dangerous to have it around as it could + // allow for sandbox bypasses. It needs to be closed before we consider + // ourselves sandboxed. + int proc_fd_; + + bool seccomp_bpf_started_; + bool unveil_initialized_; + // The value returned by GetStatus(). Gets computed once and then cached. + int sandbox_status_flags_; + // Did PreinitializeSandbox() run? + bool pre_initialized_; + bool seccomp_bpf_supported_; // Accurate if pre_initialized_. + bool seccomp_bpf_with_tsync_supported_; // Accurate if pre_initialized_. + bool yama_is_enforcing_; // Accurate if pre_initialized_. + bool initialize_sandbox_ran_; // InitializeSandbox() was called. +#if BUILDFLAG(USING_SANITIZER) + std::unique_ptr<__sanitizer_sandbox_arguments> sanitizer_args_; +#endif + sandbox::syscall_broker::BrokerProcess* broker_process_; // Leaked as global. +}; + +} // namespace policy +} // namespace sandbox + +#endif // SANDBOX_POLICY_LINUX_SANDBOX_OPENBSD_H_ diff --git a/www/iridium/files/patch-sandbox_policy_sandbox.cc b/www/iridium/files/patch-sandbox_policy_sandbox.cc index 93ca31b1e26f..a776021ae2de 100644 --- a/www/iridium/files/patch-sandbox_policy_sandbox.cc +++ b/www/iridium/files/patch-sandbox_policy_sandbox.cc @@ -1,22 +1,22 @@ ---- sandbox/policy/sandbox.cc.orig 2022-03-28 18:11:04 UTC +--- sandbox/policy/sandbox.cc.orig 2022-12-06 08:09:13 UTC +++ sandbox/policy/sandbox.cc -@@ -17,6 +17,10 @@ +@@ -18,6 +18,10 @@ #include "sandbox/policy/linux/sandbox_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/openbsd/sandbox_openbsd.h" +#endif // BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_MAC) #include "sandbox/mac/seatbelt.h" #endif // BUILDFLAG(IS_MAC) -@@ -30,7 +34,7 @@ +@@ -31,7 +35,7 @@ namespace sandbox { namespace policy { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool Sandbox::Initialize(sandbox::mojom::Sandbox sandbox_type, SandboxLinux::PreSandboxHook hook, const SandboxLinux::Options& options) { diff --git a/www/iridium/files/patch-sandbox_policy_sandbox__type.cc b/www/iridium/files/patch-sandbox_policy_sandbox__type.cc index dcd8ba9be830..7f078ceecb40 100644 --- a/www/iridium/files/patch-sandbox_policy_sandbox__type.cc +++ b/www/iridium/files/patch-sandbox_policy_sandbox__type.cc @@ -1,70 +1,70 @@ ---- sandbox/policy/sandbox_type.cc.orig 2022-10-05 07:34:01 UTC +--- sandbox/policy/sandbox_type.cc.orig 2022-12-06 08:09:13 UTC +++ sandbox/policy/sandbox_type.cc -@@ -39,7 +39,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { +@@ -38,7 +38,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { #endif case Sandbox::kAudio: return false; -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) case Sandbox::kVideoCapture: return false; #endif -@@ -62,7 +62,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { +@@ -61,7 +61,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { 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) -@@ -127,7 +127,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -126,7 +126,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) -@@ -138,7 +138,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -137,7 +137,7 @@ 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_CHROMEOS_ASH) -@@ -257,7 +257,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -256,7 +256,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 -@@ -287,7 +287,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -286,7 +286,7 @@ 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) -@@ -375,11 +375,11 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( +@@ -374,11 +374,11 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( if (sandbox_string == switches::kScreenAISandbox) return Sandbox::kScreenAI; #endif -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (sandbox_string == switches::kVideoCaptureSandbox) return Sandbox::kVideoCapture; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) if (sandbox_string == switches::kHardwareVideoDecodingSandbox) return Sandbox::kHardwareVideoDecoding; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/www/iridium/files/patch-services_cert__verifier_cert__verifier__creation.cc b/www/iridium/files/patch-services_cert__verifier_cert__verifier__creation.cc index ed18ad6676fc..1dd555c2b90d 100644 --- a/www/iridium/files/patch-services_cert__verifier_cert__verifier__creation.cc +++ b/www/iridium/files/patch-services_cert__verifier_cert__verifier__creation.cc @@ -1,28 +1,28 @@ ---- services/cert_verifier/cert_verifier_creation.cc.orig 2022-12-01 10:35:46 UTC +--- services/cert_verifier/cert_verifier_creation.cc.orig 2022-12-06 08:09:13 UTC +++ services/cert_verifier/cert_verifier_creation.cc @@ -12,7 +12,7 @@ #include "net/cert_net/cert_net_fetcher_url_request.h" #include "net/net_buildflags.h" --#if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) || \ -+#if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) || BUILDFLAG(IS_BSD) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +-#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "net/cert/cert_verify_proc_builtin.h" #include "net/cert/internal/system_trust_store.h" -@@ -90,7 +90,7 @@ class OldDefaultCertVerifyProcFactory : public net::Ce + #endif +@@ -89,7 +89,7 @@ class OldDefaultCertVerifyProcFactory : public net::Ce user_slot_restriction_ ? crypto::ScopedPK11Slot(PK11_ReferenceSlot( user_slot_restriction_.get())) : nullptr)); -#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) verify_proc = net::CreateCertVerifyProcBuiltin( std::move(cert_net_fetcher), net::CreateSslSystemTrustStore()); #else -@@ -242,6 +242,7 @@ std::unique_ptr Cr +@@ -212,6 +212,7 @@ std::unique_ptr Cr bool IsUsingCertNetFetcher() { #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || \ + BUILDFLAG(IS_BSD) || \ BUILDFLAG(TRIAL_COMPARISON_CERT_VERIFIER_SUPPORTED) || \ - BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) || \ BUILDFLAG(CHROME_ROOT_STORE_SUPPORTED) + return true; diff --git a/www/iridium/files/patch-services_device_compute__pressure_cpu__probe.cc b/www/iridium/files/patch-services_device_compute__pressure_cpu__probe.cc index f61493ec4929..294c56c9b941 100644 --- a/www/iridium/files/patch-services_device_compute__pressure_cpu__probe.cc +++ b/www/iridium/files/patch-services_device_compute__pressure_cpu__probe.cc @@ -1,10 +1,10 @@ ---- services/device/compute_pressure/cpu_probe.cc.orig 2022-10-05 07:34:01 UTC +--- services/device/compute_pressure/cpu_probe.cc.orig 2022-12-06 08:09:13 UTC +++ services/device/compute_pressure/cpu_probe.cc -@@ -63,6 +63,7 @@ std::unique_ptr CpuProbe::Create() { +@@ -29,6 +29,7 @@ std::unique_ptr CpuProbe::Create() { #elif BUILDFLAG(IS_MAC) return CpuProbeMac::Create(); #else + NOTIMPLEMENTED(); - return std::make_unique(); - #endif // BUILDFLAG(IS_ANDROID) + return nullptr; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } diff --git a/www/iridium/files/patch-services_device_hid_hid__service.cc b/www/iridium/files/patch-services_device_hid_hid__service.cc index 56fb69f66c17..17926cdf79f6 100644 --- a/www/iridium/files/patch-services_device_hid_hid__service.cc +++ b/www/iridium/files/patch-services_device_hid_hid__service.cc @@ -1,24 +1,24 @@ ---- services/device/hid/hid_service.cc.orig 2022-12-01 10:35:46 UTC +--- services/device/hid/hid_service.cc.orig 2022-12-06 08:09:13 UTC +++ services/device/hid/hid_service.cc -@@ -19,6 +19,10 @@ +@@ -20,6 +20,10 @@ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_UDEV) #include "services/device/hid/hid_service_linux.h" +#elif BUILDFLAG(IS_OPENBSD) +#include "services/device/hid/hid_service_fido.h" +#elif BUILDFLAG(IS_FREEBSD) +#include "services/device/hid/hid_service_freebsd.h" #elif BUILDFLAG(IS_MAC) #include "services/device/hid/hid_service_mac.h" #elif BUILDFLAG(IS_WIN) -@@ -64,6 +68,10 @@ constexpr base::TaskTraits HidService::kBlockingTaskTr +@@ -68,6 +72,10 @@ constexpr base::TaskTraits HidService::kBlockingTaskTr std::unique_ptr HidService::Create() { #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_UDEV) return std::make_unique(); +#elif BUILDFLAG(IS_OPENBSD) + return std::make_unique(); +#elif BUILDFLAG(IS_FREEBSD) + return std::make_unique(); #elif BUILDFLAG(IS_MAC) return std::make_unique(); #elif BUILDFLAG(IS_WIN) diff --git a/www/iridium/files/patch-services_device_public_mojom_BUILD.gn b/www/iridium/files/patch-services_device_public_mojom_BUILD.gn index c2ac73c1d72c..133508f685e4 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 2022-12-01 10:35:46 UTC +--- services/device/public/mojom/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ services/device/public/mojom/BUILD.gn -@@ -91,7 +91,7 @@ mojom("device_service") { +@@ -88,7 +88,7 @@ mojom("device_service") { disable_variants = true 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 3442187e5821..a781669b8ee9 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 2022-12-01 10:35:46 UTC +--- services/network/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ services/network/BUILD.gn -@@ -324,7 +324,6 @@ if (is_linux || is_chromeos) { +@@ -331,7 +331,6 @@ if (is_linux || is_chromeos) { ] deps = [ "//base:base", - "//sandbox/linux:sandbox_services", "//sandbox/policy:policy", ] } diff --git a/www/iridium/files/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc b/www/iridium/files/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc index 03b05ec02ba0..a388cbe2ebb0 100644 --- a/www/iridium/files/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc +++ b/www/iridium/files/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc @@ -1,65 +1,65 @@ ---- services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc.orig 2022-10-05 07:34:01 UTC +--- services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc.orig 2022-12-06 08:09:13 UTC +++ services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc -@@ -52,7 +52,7 @@ uint32_t CalculatePrivateFootprintKb(const mojom::RawO +@@ -54,7 +54,7 @@ uint32_t CalculatePrivateFootprintKb(const mojom::RawO uint32_t shared_resident_kb) { DCHECK(os_dump.platform_private_footprint); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) uint64_t rss_anon_bytes = os_dump.platform_private_footprint->rss_anon_bytes; uint64_t vm_swap_bytes = os_dump.platform_private_footprint->vm_swap_bytes; return (rss_anon_bytes + vm_swap_bytes) / 1024; -@@ -80,7 +80,7 @@ memory_instrumentation::mojom::OSMemDumpPtr CreatePubl +@@ -82,7 +82,7 @@ memory_instrumentation::mojom::OSMemDumpPtr CreatePubl os_dump->is_peak_rss_resettable = internal_os_dump.is_peak_rss_resettable; os_dump->private_footprint_kb = CalculatePrivateFootprintKb(internal_os_dump, shared_resident_kb); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) os_dump->private_footprint_swap_kb = internal_os_dump.platform_private_footprint->vm_swap_bytes / 1024; #endif -@@ -259,7 +259,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( +@@ -261,7 +261,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( // On most platforms each process can dump data about their own process // so ask each process to do so Linux is special see below. -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) request->pending_responses.insert({client_info.pid, ResponseType::kOSDump}); client->RequestOSMemoryDump(request->memory_map_option(), {base::kNullProcessId}, -@@ -274,7 +274,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( +@@ -276,7 +276,7 @@ void QueuedRequestDispatcher::SetUpAndDispatch( // In some cases, OS stats can only be dumped from a privileged process to // get around to sandboxing/selinux restrictions (see crbug.com/461788). -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::vector pids; mojom::ClientProcess* browser_client = nullptr; base::ProcessId browser_client_pid = base::kNullProcessId; -@@ -320,7 +320,7 @@ void QueuedRequestDispatcher::SetUpAndDispatchVmRegion +@@ -322,7 +322,7 @@ void QueuedRequestDispatcher::SetUpAndDispatchVmRegion const OsCallback& os_callback) { // On Linux, OS stats can only be dumped from a privileged process to // get around to sandboxing/selinux restrictions (see crbug.com/461788). -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojom::ClientProcess* browser_client = nullptr; base::ProcessId browser_client_pid = 0; for (const auto& client_info : clients) { -@@ -371,7 +371,7 @@ QueuedRequestDispatcher::FinalizeVmRegionRequest( +@@ -372,7 +372,7 @@ QueuedRequestDispatcher::FinalizeVmRegionRequest( // each client process provides 1 OS dump, % the case where the client is // disconnected mid dump. OSMemDumpMap& extra_os_dumps = response.second.os_dumps; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) for (auto& kv : extra_os_dumps) { auto pid = kv.first == base::kNullProcessId ? original_pid : kv.first; DCHECK(results.find(pid) == results.end()); -@@ -433,7 +433,7 @@ void QueuedRequestDispatcher::Finalize(QueuedRequest* +@@ -434,7 +434,7 @@ void QueuedRequestDispatcher::Finalize(QueuedRequest* // crash). In the latter case (OS_LINUX) we expect the full map to come // from the browser process response. OSMemDumpMap& extra_os_dumps = response.second.os_dumps; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) for (const auto& kv : extra_os_dumps) { auto pid = kv.first == base::kNullProcessId ? original_pid : kv.first; DCHECK_EQ(pid_to_os_dump[pid], nullptr); diff --git a/www/iridium/files/patch-services_video__capture_broadcasting__receiver.cc b/www/iridium/files/patch-services_video__capture_broadcasting__receiver.cc deleted file mode 100644 index 6fd8dd62b516..000000000000 --- a/www/iridium/files/patch-services_video__capture_broadcasting__receiver.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- services/video_capture/broadcasting_receiver.cc.orig 2022-10-05 07:34:01 UTC -+++ services/video_capture/broadcasting_receiver.cc -@@ -234,7 +234,7 @@ void BroadcastingReceiver::BufferContext:: - ConvertRawFileDescriptorToUnsafeShmemRegion() { - DCHECK(buffer_handle_->is_shared_memory_via_raw_file_descriptor()); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const size_t handle_size = - buffer_handle_->get_shared_memory_via_raw_file_descriptor() - ->shared_memory_size_in_bytes; diff --git a/www/iridium/files/patch-third__party_abseil-cpp_absl_base_config.h b/www/iridium/files/patch-third__party_abseil-cpp_absl_base_config.h index 9f25a897d00b..d8f5883b4488 100644 --- a/www/iridium/files/patch-third__party_abseil-cpp_absl_base_config.h +++ b/www/iridium/files/patch-third__party_abseil-cpp_absl_base_config.h @@ -1,21 +1,21 @@ ---- third_party/abseil-cpp/absl/base/config.h.orig 2022-10-05 07:34:01 UTC +--- third_party/abseil-cpp/absl/base/config.h.orig 2022-12-06 08:09:13 UTC +++ third_party/abseil-cpp/absl/base/config.h -@@ -458,7 +458,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != +@@ -460,7 +460,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != // POSIX.1-2001. #ifdef ABSL_HAVE_SCHED_YIELD #error ABSL_HAVE_SCHED_YIELD cannot be directly set -#elif defined(__linux__) || defined(__ros__) || defined(__native_client__) +#elif defined(__linux__) || defined(__ros__) || defined(__native_client__) || \ + defined(__OpenBSD__) || defined(__FreeBSD__) #define ABSL_HAVE_SCHED_YIELD 1 #endif -@@ -473,7 +474,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != +@@ -475,7 +476,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != // platforms. #ifdef ABSL_HAVE_SEMAPHORE_H #error ABSL_HAVE_SEMAPHORE_H cannot be directly set -#elif defined(__linux__) || defined(__ros__) +#elif defined(__linux__) || defined(__ros__) || defined(__OpenBSD__) || defined(__FreeBSD__) #define ABSL_HAVE_SEMAPHORE_H 1 #endif diff --git a/www/iridium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc b/www/iridium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc index b802a81f59f5..0af7b80ee066 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,23 +1,23 @@ ---- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig 2022-10-05 07:34:01 UTC +--- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig 2022-12-06 08:09:13 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 -@@ -307,9 +307,11 @@ static double GetNominalCPUFrequency() { +@@ -310,9 +310,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 diff --git a/www/iridium/files/patch-third__party_angle_BUILD.gn b/www/iridium/files/patch-third__party_angle_BUILD.gn index 32a0131c584c..7a2208c06e24 100644 --- a/www/iridium/files/patch-third__party_angle_BUILD.gn +++ b/www/iridium/files/patch-third__party_angle_BUILD.gn @@ -1,47 +1,47 @@ ---- third_party/angle/BUILD.gn.orig 2022-12-01 10:35:46 UTC +--- third_party/angle/BUILD.gn.orig 2022-12-06 08:09:13 UTC +++ third_party/angle/BUILD.gn @@ -265,7 +265,6 @@ config("extra_warnings") { "-Wtautological-type-limit-compare", "-Wundefined-reinterpret-cast", "-Wunneeded-internal-declaration", - "-Wunused-but-set-variable", "-Wsuggest-destructor-override", "-Wsuggest-override", @@ -443,7 +442,7 @@ angle_static_library("angle_common") { all_dependent_configs = [ ":angle_disable_pool_alloc" ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { libs = [ "dl" ] } -@@ -573,6 +572,9 @@ angle_static_library("angle_gpu_info_util") { +@@ -574,6 +573,9 @@ angle_static_library("angle_gpu_info_util") { "Xi", "Xext", ] + if (is_bsd) { + libs += [ "GL" ] + } } if (angle_use_wayland && angle_has_build) { -@@ -1093,12 +1095,12 @@ if (angle_use_wayland) { +@@ -1094,12 +1096,12 @@ if (angle_use_wayland) { "wayland-client", "wayland-egl", ] + } else { + include_dirs = [ + "$wayland_dir/egl", + "$wayland_dir/src", + ] } - - include_dirs = [ - "$wayland_dir/egl", - "$wayland_dir/src", - ] } group("angle_wayland") { diff --git a/www/iridium/files/patch-third__party_angle_src_libANGLE_formatutils.cpp b/www/iridium/files/patch-third__party_angle_src_libANGLE_formatutils.cpp index 14378d214c81..99cb00cb0ce5 100644 --- a/www/iridium/files/patch-third__party_angle_src_libANGLE_formatutils.cpp +++ b/www/iridium/files/patch-third__party_angle_src_libANGLE_formatutils.cpp @@ -1,11 +1,11 @@ ---- third_party/angle/src/libANGLE/formatutils.cpp.orig 2022-12-01 10:35:46 UTC +--- third_party/angle/src/libANGLE/formatutils.cpp.orig 2022-12-06 08:09:13 UTC +++ third_party/angle/src/libANGLE/formatutils.cpp -@@ -1413,7 +1413,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMa +@@ -1466,7 +1466,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMa AddYUVFormat(&map, GL_G8_B8R8_2PLANE_420_UNORM_ANGLE, true, 8, 8, 8, 0, 0, GL_G8_B8R8_2PLANE_420_UNORM_ANGLE, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, NeverSupported, NeverSupported); AddYUVFormat(&map, GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE, true, 8, 8, 8, 0, 0, GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, NeverSupported, NeverSupported); -#if defined(ANGLE_PLATFORM_LINUX) +#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) // From GL_OES_required_internalformat // The |shared| bit shouldn't be 2. But given this hits assertion when bits // are checked, it's fine to have this bit set as 2 as a workaround. diff --git a/www/iridium/files/patch-third__party_blink_public_platform_platform.h b/www/iridium/files/patch-third__party_blink_public_platform_platform.h index 566f763156d5..9997fa9daf48 100644 --- a/www/iridium/files/patch-third__party_blink_public_platform_platform.h +++ b/www/iridium/files/patch-third__party_blink_public_platform_platform.h @@ -1,11 +1,11 @@ ---- third_party/blink/public/platform/platform.h.orig 2022-12-01 10:35:46 UTC +--- third_party/blink/public/platform/platform.h.orig 2022-12-06 08:09:13 UTC +++ third_party/blink/public/platform/platform.h -@@ -341,7 +341,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -349,7 +349,7 @@ class BLINK_PLATFORM_EXPORT Platform { return nullptr; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This is called after the thread is created, so the embedder // can initiate an IPC to change its thread type (on Linux we can't // increase the nice value, so we need to ask the browser process). This diff --git a/www/iridium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc b/www/iridium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc index 5148eecc150b..7e56871e29c4 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc @@ -1,35 +1,35 @@ ---- third_party/blink/renderer/controller/blink_initializer.cc.orig 2022-10-05 07:34:01 UTC +--- third_party/blink/renderer/controller/blink_initializer.cc.orig 2022-12-06 08:09:13 UTC +++ third_party/blink/renderer/controller/blink_initializer.cc -@@ -74,12 +74,12 @@ +@@ -73,12 +73,12 @@ #include "third_party/blink/renderer/controller/oom_intervention_impl.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/controller/memory_usage_monitor_posix.h" #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/controller/highest_pmf_reporter.h" #include "third_party/blink/renderer/controller/user_level_memory_pressure_signal_generator.h" #endif -@@ -172,7 +172,7 @@ void InitializeCommon(Platform* platform, mojo::Binder +@@ -173,7 +173,7 @@ void InitializeCommon(Platform* platform, mojo::Binder #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Initialize UserLevelMemoryPressureSignalGenerator so it starts monitoring. if (UserLevelMemoryPressureSignalGenerator::Enabled()) UserLevelMemoryPressureSignalGenerator::Instance(); -@@ -253,7 +253,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder +@@ -244,7 +244,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder main_thread_task_runner); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) binders.Add( ConvertToBaseRepeatingCallback( CrossThreadBindRepeating(&MemoryUsageMonitorPosix::Bind)), 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 0a2bced163f2..b1ca8ab3b300 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 2022-12-01 10:35:46 UTC +--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2022-12-06 08:09:13 UTC +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -406,7 +406,7 @@ SkFontHinting RendererPreferencesToSkiaHinting( +@@ -408,7 +408,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' -@@ -3273,7 +3273,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3278,7 +3278,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 e49e5c3ac42b..875d04a69059 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 2022-12-01 10:35:46 UTC +--- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2022-12-06 08:09:13 UTC +++ third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -6410,7 +6410,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { +@@ -6414,7 +6414,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { MoveCaretStaysHorizontallyAlignedWhenMoved #endif // TODO(crbug.com/1317375): Build these tests on all platforms. -#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) TEST_F(WebFrameTest, MAYBE_SelectRangeStaysHorizontallyAlignedWhenMoved) { RegisterMockedHttpURLLoad("move_caret.html"); -@@ -6807,7 +6807,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc +@@ -6811,7 +6811,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 98a6cf3e4eff..e321695d28d4 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 2022-12-01 10:35:46 UTC +--- third_party/blink/renderer/core/layout/layout_view.cc.orig 2022-12-06 08:09:13 UTC +++ third_party/blink/renderer/core/layout/layout_view.cc -@@ -66,7 +66,7 @@ +@@ -68,7 +68,7 @@ #include "ui/display/screen_info.h" #include "ui/gfx/geometry/quad_f.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/platform/fonts/font_cache.h" #endif -@@ -365,7 +365,7 @@ void LayoutView::UpdateLayout() { +@@ -367,7 +367,7 @@ void LayoutView::UpdateLayout() { DCHECK(!layout_state_); LayoutState root_layout_state(*this); -#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_paint_paint__layer.cc b/www/iridium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc index baa90cc54bcb..c1780f8fa9b4 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/paint/paint_layer.cc.orig 2022-12-01 10:35:46 UTC +--- third_party/blink/renderer/core/paint/paint_layer.cc.orig 2022-12-06 08:09:13 UTC +++ third_party/blink/renderer/core/paint/paint_layer.cc -@@ -111,7 +111,7 @@ namespace blink { +@@ -112,7 +112,7 @@ namespace blink { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) struct SameSizeAsPaintLayer : GarbageCollected, DisplayItemClient { // The bit fields may fit into the machine word of DisplayItemClient which // has only 8-bit data. diff --git a/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__device__factory.cc b/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__device__factory.cc index b2308be6bd93..73c90aaa929f 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__device__factory.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__device__factory.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/media/audio/audio_device_factory.cc.orig 2022-10-05 07:34:01 UTC +--- third_party/blink/renderer/modules/media/audio/audio_device_factory.cc.orig 2022-12-06 08:09:13 UTC +++ third_party/blink/renderer/modules/media/audio/audio_device_factory.cc -@@ -34,7 +34,7 @@ namespace { +@@ -35,7 +35,7 @@ namespace { AudioDeviceFactory* g_factory_override = nullptr; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Due to driver deadlock issues on Windows (http://crbug/422522) there is a // chance device authorization response is never received from the browser side. // In this case we will time out, to avoid renderer hang forever waiting for diff --git a/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc b/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc index d78e484b742e..9f7d2ae4dcdd 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc.orig 2022-12-01 10:35:46 UTC +--- third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc.orig 2022-12-06 08:09:13 UTC +++ third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc -@@ -708,7 +708,7 @@ TEST_F(AudioRendererMixerManagerTest, MixerParamsLaten +@@ -722,7 +722,7 @@ TEST_F(AudioRendererMixerManagerTest, MixerParamsLaten mixer->get_output_params_for_testing().sample_rate()); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Use 10 ms buffer (441 frames per buffer). EXPECT_EQ(output_sample_rate / 100, mixer->get_output_params_for_testing().frames_per_buffer()); diff --git a/www/iridium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc b/www/iridium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc index 807b8f060e4d..e7bcc20ec33b 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 2022-12-01 10:35:46 UTC +--- third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc.orig 2022-12-06 08:09:13 UTC +++ third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc -@@ -277,7 +277,7 @@ TEST_F(WebRtcAudioRendererTest, DISABLED_VerifySinkPar +@@ -278,7 +278,7 @@ TEST_F(WebRtcAudioRendererTest, DISABLED_VerifySinkPar SetupRenderer(kDefaultOutputDeviceId); renderer_proxy_->Start(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - 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_webgl_webgl__rendering__context__base.cc b/www/iridium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc index f7ce9d4c6ab2..fa6b3dad58c3 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2022-12-01 10:35:46 UTC +--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2022-12-06 08:09:13 UTC +++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -6151,7 +6151,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid +@@ -6152,7 +6152,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid constexpr bool kAllowZeroCopyImages = true; #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1175907): Only TexImage2D seems to work with the GPU path on // Android M -- appears to work fine on R, but to avoid regressions in