diff --git a/www/iridium/Makefile b/www/iridium/Makefile index afe6cb7b3570..d8a689a79fb8 100644 --- a/www/iridium/Makefile +++ b/www/iridium/Makefile @@ -1,325 +1,341 @@ PORTNAME= iridium -PORTVERSION= 2023.04.112.2 -PORTREVISION= 2 +PORTVERSION= 2023.07.115.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-ce036275d9d21a8408ef48ee9839b3c21b8448ca.patch:-p1 +PATCHFILES+= disable-privacy-sandbox-891b80bbfcdb15e8292143efd1715fa3f30662c4.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-core \ 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 \ libepoll-shim.so:devel/libepoll-shim \ libevent.so:devel/libevent \ libffi.so:devel/libffi \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ + libdav1d.so:multimedia/dav1d \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic -USES= bison compiler:c++17-lang cpe desktop-file-utils gl gnome iconv:wchar_t jpeg \ - localbase:ldflags ninja perl5 pkgconfig python:build qt:5 shebangfix \ - tar:xz xorg +USES= bison compiler:c++17-lang cpe desktop-file-utils gl gmake gnome \ + iconv:wchar_t jpeg localbase:ldflags ninja perl5 pkgconfig \ + python:build qt:5 shebangfix tar:xz xorg CPE_VENDOR= google CPE_PRODUCT= chrome USE_GL= gbm gl USE_GNOME= atk dconf gdkpixbuf2 glib20 gtk30 libxml2 libxslt USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xorgproto xrandr xrender xscrnsaver xtst USE_QT= buildtools:build SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format MAKE_ARGS= -C out/${BUILDTYPE} ALL_TARGET= chrome BINARY_ALIAS= python3=${PYTHON_CMD} \ moc=${PREFIX}/bin/moc-qt5 # TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) # # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= clang_use_chrome_plugins=false \ chrome_pgo_phase=0 \ enable_backup_ref_ptr_support=false \ enable_hangout_services_extension=true \ enable_nacl=false \ enable_remoting=false \ + enable_rust=false \ fatal_linker_warnings=false \ icu_use_data_file=false \ is_clang=true \ optimize_webui=true \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=false \ use_gnome_keyring=false \ use_lld=true \ use_partition_alloc=true \ use_partition_alloc_as_malloc=false \ use_sysroot=false \ use_system_freetype=false \ use_system_harfbuzz=true \ use_system_libjpeg=true \ use_udev=false \ extra_cxxflags="${CXXFLAGS}" \ - extra_ldflags="${LDFLAGS}" + extra_ldflags="${LDFLAGS}" \ + ffmpeg_branding="${FFMPEG_BRAND}" # TODO: investigate building with these options: # use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles SUB_FILES= iridium-browser.desktop iridium SUB_LIST+= COMMENT="${COMMENT}" OPTIONS_DEFINE= CODECS CUPS DEBUG KERBEROS LTO 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 +CODECS_VARS= GN_ARGS+=proprietary_codecs=true \ + FFMPEG_BRAND="Chrome" +CODECS_VARS_OFF= GN_ARGS+=proprietary_codecs=false \ + FFMPEG_BRAND="Chromium" CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_VARS= BUILDTYPE=Debug \ GN_ARGS+=is_debug=true \ GN_ARGS+=is_component_build=false \ GN_ARGS+=symbol_level=1 \ GN_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="21 GB" DEBUG_VARS_OFF= BUILDTYPE=Release \ GN_ARGS+=blink_symbol_level=0 \ GN_ARGS+=is_debug=false \ GN_ARGS+=is_official_build=true \ GN_ARGS+=symbol_level=0 \ WANTSPACE="14 GB" HEIMDAL_LIB_DEPENDS= libkrb.so.26:security/heimdal KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false LTO_VARS= GN_ARGS+=use_thin_lto=true \ GN_ARGS+=thin_lto_enable_optimizations=true \ WANTSPACE="14 GB" LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false MIT_LIB_DEPENDS= libkrb.so.3:security/krb5 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 # for COMPILER_VERSION .if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base .endif -.if ${COMPILER_VERSION} < 150 -LLVM_DEFAULT= 15 +.if ${COMPILER_VERSION} < 160 +LLVM_DEFAULT= 16 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 +# - swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only +# - map ffmpeg target to ${ARCH} .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " -.else +FFMPEG_TARGET= arm64 +.elif ${ARCH} == amd64 +BUILD_DEPENDS+= nasm:devel/nasm +PLIST_SUB+= NOT_AARCH64="" +FFMPEG_TARGET= x64 +.elif ${ARCH} == i386 +BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" +FFMPEG_TARGET= ia32 .endif +FFMPEG_BDIR= ${WRKSRC}/third_party/ffmpeg/build.${FFMPEG_TARGET}.freebsd/${FFMPEG_BRAND} +FFMPEG_CDIR= ${WRKSRC}/third_party/ffmpeg/chromium/config/${FFMPEG_BRAND}/freebsd/${FFMPEG_TARGET} + # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include 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} + dav1d flac fontconfig freetype harfbuzz-ng icu libdrm libevent libpng \ + 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 + cd ${WRKSRC}/third_party/ffmpeg && \ + ${PYTHON_CMD} chromium/scripts/build_ffmpeg.py freebsd ${FFMPEG_TARGET} \ + --config-only --branding=${FFMPEG_BRAND} + cd ${FFMPEG_BDIR} && ${GMAKE} ffversion.h + ${MKDIR} ${FFMPEG_CDIR} +.for _e in config.h config.asm config_components.h libavcodec libavformat libavutil + -${CP} -pR ${FFMPEG_BDIR}/${_e} ${FFMPEG_CDIR} .endfor 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 9416812ec993..15abff8120f3 100644 --- a/www/iridium/distinfo +++ b/www/iridium/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1682369682 -SHA256 (iridium-browser-2023.04.112.2.tar.xz) = 7d1baae65e0087045d3da89bd5e2e4967d733e202707b4abfdab02ad5f87c722 -SIZE (iridium-browser-2023.04.112.2.tar.xz) = 1427167196 -SHA256 (disable-privacy-sandbox-ce036275d9d21a8408ef48ee9839b3c21b8448ca.patch) = c8cc1c6a6f735adfe807da0109349ebab87e0eff77f593925757da34bb31f38c -SIZE (disable-privacy-sandbox-ce036275d9d21a8408ef48ee9839b3c21b8448ca.patch) = 4177 +TIMESTAMP = 1690214890 +SHA256 (iridium-browser-2023.07.115.1.tar.xz) = 3498f2018ad4d68ddce4f12224923b6eb5ae9b83fa4e912283c6e486b8a887d3 +SIZE (iridium-browser-2023.07.115.1.tar.xz) = 1416249736 +SHA256 (disable-privacy-sandbox-891b80bbfcdb15e8292143efd1715fa3f30662c4.patch) = ea4bfcac8636c65d8933236b89429699a51c77837fa04863cb40f8c7add833b4 +SIZE (disable-privacy-sandbox-891b80bbfcdb15e8292143efd1715fa3f30662c4.patch) = 3559 diff --git a/www/iridium/files/patch-BUILD.gn b/www/iridium/files/patch-BUILD.gn index a6ea8a6be61d..4cec7a58940d 100644 --- a/www/iridium/files/patch-BUILD.gn +++ b/www/iridium/files/patch-BUILD.gn @@ -1,89 +1,89 @@ ---- BUILD.gn.orig 2023-04-22 17:45:15 UTC +--- BUILD.gn.orig 2023-07-24 14:27:53 UTC +++ BUILD.gn -@@ -60,7 +60,7 @@ declare_args() { +@@ -61,7 +61,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) -@@ -90,7 +90,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", -@@ -423,7 +422,7 @@ group("gn_all") { +@@ -95,7 +95,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", +@@ -419,7 +418,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", -@@ -622,6 +621,15 @@ 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", +@@ -619,6 +618,15 @@ group("gn_all") { + } } - } -+ if (is_bsd) { -+ deps -= [ -+ "//third_party/breakpad:dump_syms($host_toolchain)", -+ "//third_party/breakpad:microdump_stackwalk($host_toolchain)", -+ "//third_party/breakpad:minidump_dump($host_toolchain)", -+ "//third_party/breakpad:minidump_stackwalk($host_toolchain)", -+ ] -+ } ++ if (is_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", -@@ -670,7 +678,7 @@ group("gn_all") { - host_os == "win") { - deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] + if (is_mac) { + deps += [ + "//third_party/breakpad:dump_syms", +@@ -665,7 +673,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)" ] } -- } 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)" ] - } -@@ -1093,7 +1101,7 @@ if (!is_ios) { +@@ -1094,7 +1102,7 @@ if (!is_ios && !is_cronet_build) { ] } - if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) { + if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) { # WPT Webdriver tests runner # chrome/test/chromedriver/test/run_webdriver_tests.py script_test("webdriver_wpt_tests") { -@@ -1193,7 +1201,7 @@ if (!is_ios) { +@@ -1194,7 +1202,7 @@ if (!is_ios && !is_cronet_build) { data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] } - if (!is_win && !is_android) { + if (!is_win && !is_android && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -1202,7 +1210,7 @@ if (!is_ios) { +@@ -1203,7 +1211,7 @@ if (!is_ios && !is_cronet_build) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } - if (is_linux || is_chromeos) { + if ((is_linux && !is_bsd) || is_chromeos) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1670,7 +1678,7 @@ group("chromium_builder_perf") { +@@ -1671,7 +1679,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-ash_display_mirror__window__controller.cc b/www/iridium/files/patch-ash_display_mirror__window__controller.cc index 2496639afee7..f02f867a39c6 100644 --- a/www/iridium/files/patch-ash_display_mirror__window__controller.cc +++ b/www/iridium/files/patch-ash_display_mirror__window__controller.cc @@ -1,14 +1,14 @@ ---- ash/display/mirror_window_controller.cc.orig 2022-12-01 10:35:46 UTC +--- ash/display/mirror_window_controller.cc.orig 2023-07-24 14:27:53 UTC +++ ash/display/mirror_window_controller.cc -@@ -295,7 +295,11 @@ void MirrorWindowController::UpdateWindow( +@@ -296,7 +296,11 @@ void MirrorWindowController::UpdateWindow( if (!base::Contains(display_info_list, iter->first, &display::ManagedDisplayInfo::id)) { CloseAndDeleteHost(iter->second, true); +#if defined(__llvm__) + mirroring_host_info_map_.erase(iter++); +#else iter = mirroring_host_info_map_.erase(iter); +#endif } else { ++iter; } diff --git a/www/iridium/files/patch-base_BUILD.gn b/www/iridium/files/patch-base_BUILD.gn index 2b260a2cac53..7499a556e825 100644 --- a/www/iridium/files/patch-base_BUILD.gn +++ b/www/iridium/files/patch-base_BUILD.gn @@ -1,143 +1,143 @@ ---- base/BUILD.gn.orig 2023-04-22 17:45:15 UTC +--- base/BUILD.gn.orig 2023-07-24 14:27:53 UTC +++ base/BUILD.gn -@@ -188,7 +188,7 @@ buildflag_header("ios_cronet_buildflags") { +@@ -198,7 +198,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" -@@ -1093,11 +1093,23 @@ component("base") { +@@ -1099,11 +1099,23 @@ component("base") { # Needed for if using newer C++ library than sysroot, except if # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. - if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && + if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos && !is_bsd)) && host_toolchain != "//build/toolchain/cros:host") { libs += [ "atomic" ] } + # *BSD needs libkvm + if (is_bsd) { + libs += [ "kvm" ] + } + + if (is_freebsd) { + libs += [ + "execinfo", + "util", + ] + } + if (use_allocator_shim) { sources += [ "allocator/partition_allocator/shim/allocator_shim.cc", -@@ -1125,7 +1137,7 @@ component("base") { +@@ -1131,7 +1143,7 @@ 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", -@@ -1166,7 +1178,7 @@ component("base") { +@@ -1172,7 +1184,7 @@ component("base") { # Allow more direct string conversions on platforms with native utf8 # strings - if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) { + if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia || is_bsd) { defines += [ "SYSTEM_NATIVE_UTF8" ] } -@@ -2107,6 +2119,43 @@ component("base") { +@@ -2130,6 +2142,43 @@ component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/scoped_file_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", + "profiler/stack_copier_signal.cc", + "profiler/stack_copier_signal.h", + "profiler/thread_delegate_posix.cc", + "profiler/thread_delegate_posix.h", + ] + sources += [ + "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 += [ -@@ -2202,7 +2251,7 @@ component("base") { +@@ -2238,7 +2287,7 @@ component("base") { } if (dep_libevent) { - deps += [ "//third_party/libevent" ] + public_deps += [ "//third_party/libevent" ] } if (use_libevent) { -@@ -3470,7 +3519,7 @@ test("base_unittests") { +@@ -3552,7 +3601,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", -@@ -3519,7 +3568,7 @@ test("base_unittests") { +@@ -3601,7 +3650,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", -@@ -3530,7 +3579,7 @@ test("base_unittests") { +@@ -3612,7 +3661,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" ] } -@@ -3751,7 +3800,7 @@ test("base_unittests") { +@@ -3837,7 +3886,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_dispatcher_tls.h b/www/iridium/files/patch-base_allocator_dispatcher_tls.h index f2d8b63ecc1a..9b04ab4b38ee 100644 --- a/www/iridium/files/patch-base_allocator_dispatcher_tls.h +++ b/www/iridium/files/patch-base_allocator_dispatcher_tls.h @@ -1,11 +1,11 @@ ---- base/allocator/dispatcher/tls.h.orig 2023-03-13 07:33:08 UTC +--- base/allocator/dispatcher/tls.h.orig 2023-07-24 14:27:53 UTC +++ base/allocator/dispatcher/tls.h -@@ -51,7 +51,7 @@ struct BASE_EXPORT MMapAllocator { +@@ -50,7 +50,7 @@ struct BASE_EXPORT MMapAllocator { partition_alloc::PartitionPageSize(); #elif BUILDFLAG(IS_APPLE) constexpr static size_t AllocationChunkSize = 16384; -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) constexpr static size_t AllocationChunkSize = 16384; #else constexpr static size_t AllocationChunkSize = 4096; diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator.h b/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator.h index 5305a3c68753..3f348d2d66b4 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-12-06 08:09:13 UTC +--- base/allocator/partition_allocator/page_allocator.h.orig 2023-07-24 14:27:53 UTC +++ base/allocator/partition_allocator/page_allocator.h -@@ -231,7 +231,7 @@ void DecommitAndZeroSystemPages(void* address, size_t +@@ -241,7 +241,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__constants.h b/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator__constants.h index 6b5bc2f5fecf..fd832373b052 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator__constants.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator__constants.h @@ -1,38 +1,38 @@ ---- base/allocator/partition_allocator/page_allocator_constants.h.orig 2022-10-05 07:34:01 UTC +--- base/allocator/partition_allocator/page_allocator_constants.h.orig 2023-07-24 14:27:53 UTC +++ base/allocator/partition_allocator/page_allocator_constants.h @@ -25,7 +25,7 @@ // elimination. #define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // This should work for all POSIX (if needed), but currently all other // supported OS/architecture combinations use either hard-coded values // (such as x86) or have means to determine these values without needing @@ -81,7 +81,7 @@ PageAllocationGranularityShift() { return 14; // 16kB #elif BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS) return static_cast(vm_page_shift); -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16) // page sizes. Retrieve from or initialize cache. size_t shift = page_characteristics.shift.load(std::memory_order_relaxed); @@ -102,7 +102,7 @@ PageAllocationGranularity() { // This is literally equivalent to |1 << PageAllocationGranularityShift()| // below, but was separated out for IS_APPLE to avoid << on a non-constexpr. return vm_page_size; -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // arm64 supports 4kb, 16kb, and 64kb page sizes. Retrieve from or // initialize cache. size_t size = page_characteristics.size.load(std::memory_order_relaxed); @@ -141,7 +141,7 @@ SystemPageShift() { - PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t + PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t SystemPageSize() { #if (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)) // This is literally equivalent to |1 << SystemPageShift()| below, but was // separated out for 64-bit IS_APPLE and arm64 on Linux to avoid << on a // non-constexpr. 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 705907f8087d..1bcf5be797cf 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 2023-04-22 17:45:15 UTC +--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2023-07-24 14:27:53 UTC +++ base/allocator/partition_allocator/page_allocator_internals_posix.h -@@ -380,8 +380,12 @@ bool TryRecommitSystemPagesInternal( +@@ -394,8 +394,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 dd6868bfbf8c..821948cf990a 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 2023-04-22 17:45:15 UTC +--- base/allocator/partition_allocator/partition_address_space.cc.orig 2023-07-24 14:27:53 UTC +++ base/allocator/partition_allocator/partition_address_space.cc -@@ -417,7 +417,7 @@ void PartitionAddressSpace::UninitPkeyPoolForTesting() +@@ -420,7 +420,7 @@ void PartitionAddressSpace::UninitThreadIsolatedPoolFo } #endif -#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.gni b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index dd6348188276..266b615ca92a 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.gni +++ b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.gni @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/partition_alloc.gni.orig 2023-04-22 17:45:15 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2023-07-24 14:27:53 UTC +++ base/allocator/partition_allocator/partition_alloc.gni -@@ -276,7 +276,7 @@ assert(!use_asan_backup_ref_ptr || use_hookable_raw_pt - "AsanBackupRefPtr requires RawPtrHookableImpl") - - declare_args() { -- enable_pkeys = is_linux && target_cpu == "x64" -+ enable_pkeys = (is_linux && !is_bsd) && target_cpu == "x64" +@@ -291,7 +291,7 @@ declare_args() { + # pkeys support is explicitly disabled in all Cronet builds, as some test dependencies that + # use partition_allocator are compiled in AOSP against a version of glibc that does not + # include pkeys syscall numbers. +- enable_pkeys = is_linux && target_cpu == "x64" && !is_cronet_build ++ enable_pkeys = (is_linux && !is_bsd) && target_cpu == "x64" && !is_cronet_build } assert(!enable_pkeys || (is_linux && target_cpu == "x64"), "Pkeys are only supported on x64 linux") diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__base_compiler__specific.h b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__base_compiler__specific.h new file mode 100644 index 000000000000..a3661cf83045 --- /dev/null +++ b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__base_compiler__specific.h @@ -0,0 +1,32 @@ +--- base/allocator/partition_allocator/partition_alloc_base/compiler_specific.h.orig 2023-07-24 14:27:53 UTC ++++ base/allocator/partition_allocator/partition_alloc_base/compiler_specific.h +@@ -24,9 +24,9 @@ + // Annotate a function indicating it should not be inlined. + // Use like: + // NOINLINE void DoStuff() { ... } +-#if defined(__clang__) && PA_HAS_ATTRIBUTE(noinline) ++#if defined(__clang__) && (__clang_major__ >= 15) && PA_HAS_ATTRIBUTE(noinline) + #define PA_NOINLINE [[clang::noinline]] +-#elif defined(COMPILER_GCC) && PA_HAS_ATTRIBUTE(noinline) ++#elif (defined(COMPILER_GCC) || defined(__clang__)) && PA_HAS_ATTRIBUTE(noinline) + #define PA_NOINLINE __attribute__((noinline)) + #elif defined(COMPILER_MSVC) + #define PA_NOINLINE __declspec(noinline) +@@ -34,7 +34,7 @@ + #define PA_NOINLINE + #endif + +-#if defined(__clang__) && defined(NDEBUG) && PA_HAS_ATTRIBUTE(always_inline) ++#if defined(__clang__) && (__clang_major__ >= 15) && defined(NDEBUG) && PA_HAS_ATTRIBUTE(always_inline) + #define PA_ALWAYS_INLINE [[clang::always_inline]] inline + #elif defined(COMPILER_GCC) && defined(NDEBUG) && \ + PA_HAS_ATTRIBUTE(always_inline) +@@ -53,7 +53,7 @@ + // prevent code folding, see NO_CODE_FOLDING() in base/debug/alias.h. + // Use like: + // void NOT_TAIL_CALLED FooBar(); +-#if defined(__clang__) && PA_HAS_ATTRIBUTE(not_tail_called) ++#if defined(__clang__) && (__clang_major__ >= 15) && PA_HAS_ATTRIBUTE(not_tail_called) + #define PA_NOT_TAIL_CALLED [[clang::not_tail_called]] + #else + #define PA_NOT_TAIL_CALLED diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h index d2ce29487c08..f170dbfdcacb 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h @@ -1,29 +1,29 @@ ---- base/allocator/partition_allocator/partition_alloc_config.h.orig 2023-04-22 17:45:15 UTC +--- base/allocator/partition_allocator/partition_alloc_config.h.orig 2023-07-24 14:27:53 UTC +++ base/allocator/partition_allocator/partition_alloc_config.h -@@ -104,7 +104,7 @@ static_assert(sizeof(void*) != 8, ""); +@@ -94,7 +94,7 @@ static_assert(sizeof(void*) != 8, ""); // POSIX is not only UNIX, e.g. macOS and other OSes. We do use Linux-specific // features such as futex(2). #define PA_CONFIG_HAS_LINUX_KERNEL() \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) // On some platforms, we implement locking by spinning in userspace, then going // into the kernel only if there is contention. This requires platform support, -@@ -251,7 +251,7 @@ constexpr bool kUseLazyCommit = false; +@@ -234,7 +234,7 @@ constexpr bool kUseLazyCommit = false; // On these platforms, lock all the partitions before fork(), and unlock after. // This may be required on more platforms in the future. #define PA_CONFIG_HAS_ATFORK_HANDLER() \ - (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // PartitionAlloc uses PartitionRootEnumerator to acquire all // PartitionRoots at BeforeFork and to release at AfterFork. -@@ -296,7 +296,7 @@ constexpr bool kUseLazyCommit = false; +@@ -279,7 +279,7 @@ constexpr bool kUseLazyCommit = false; // Also enabled on ARM64 macOS, as the 16kiB pages on this platform lead to // larger slot spans. #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() \ - (BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64))) + (BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD)) // Enable shadow metadata. // 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 539ee9c1bbf3..623533378829 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,21 @@ ---- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2023-04-22 17:45:15 UTC +--- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2023-07-24 14:27:53 UTC +++ base/allocator/partition_allocator/partition_alloc_constants.h @@ -92,7 +92,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 + PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t PartitionPageShift() { return PageAllocationGranularityShift() + 2; -@@ -296,7 +296,7 @@ constexpr size_t kNumPools = kMaxPoolHandle - 1; - // When pointer compression is enabled, we cannot use large pools (at most +@@ -294,7 +294,8 @@ constexpr size_t kNumPools = kMaxPoolHandle - 1; // 8GB for each of the glued pools). #if BUILDFLAG(HAS_64_BIT_POINTERS) --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || PA_CONFIG(POINTER_COMPRESSION) -+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || PA_CONFIG(POINTER_COMPRESSION) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || \ +- BUILDFLAG(ENABLE_POINTER_COMPRESSION) ++ BUILDFLAG(ENABLE_POINTER_COMPRESSION) || \ ++ BUILDFLAG(IS_BSD) constexpr size_t kPoolMaxSize = 8 * kGiB; #else constexpr size_t kPoolMaxSize = 16 * kGiB; diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_partition__page.h b/www/iridium/files/patch-base_allocator_partition__allocator_partition__page.h index eaa466cdc02a..03074ce2ddac 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_partition__page.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_partition__page.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/partition_page.h.orig 2023-04-22 17:45:15 UTC +--- base/allocator/partition_allocator/partition_page.h.orig 2023-07-24 14:27:53 UTC +++ base/allocator/partition_allocator/partition_page.h -@@ -143,7 +143,7 @@ struct SlotSpanMetadata { +@@ -141,7 +141,7 @@ struct SlotSpanMetadata { // PartitionPageSize() is 4 times the OS page size. static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 14) / kSmallestBucket; -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // System page size can be 4, 16, or 64 kiB on Linux on arm64. 64 kiB is // currently (kMaxSlotsPerSlotSpanBits == 13) not supported by the code, // so we use the 16 kiB maximum (64 kiB will crash). diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_partition__root.cc b/www/iridium/files/patch-base_allocator_partition__allocator_partition__root.cc index 1b80a63f732f..82be5654229a 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_partition__root.cc +++ b/www/iridium/files/patch-base_allocator_partition__allocator_partition__root.cc @@ -1,38 +1,38 @@ ---- base/allocator/partition_allocator/partition_root.cc.orig 2023-04-22 17:45:15 UTC +--- base/allocator/partition_allocator/partition_root.cc.orig 2023-07-24 14:27:53 UTC +++ base/allocator/partition_allocator/partition_root.cc -@@ -42,7 +42,7 @@ +@@ -46,7 +46,7 @@ #include "wow64apiset.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #endif -@@ -245,7 +245,7 @@ void PartitionAllocMallocInitOnce() { +@@ -286,7 +286,7 @@ void PartitionAllocMallocInitOnce() { return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // When fork() is called, only the current thread continues to execute in the // child process. If the lock is held, but *not* by this thread when fork() is // called, we have a deadlock. -@@ -339,7 +339,7 @@ static size_t PartitionPurgeSlotSpan( +@@ -380,7 +380,7 @@ static size_t PartitionPurgeSlotSpan( constexpr size_t kMaxSlotCount = (PartitionPageSize() * kMaxPartitionPagesPerRegularSlotSpan) / MinPurgeableSlotSize(); -#elif BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) +#elif BUILDFLAG(IS_APPLE) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) // It's better for slot_usage to be stack-allocated and fixed-size, which // demands that its size be constexpr. On IS_APPLE and Linux on arm64, // PartitionPageSize() is always SystemPageSize() << 2, so regardless of -@@ -811,7 +811,7 @@ void PartitionRoot::Init(PartitionOptions +@@ -880,7 +880,7 @@ void PartitionRoot::Init(PartitionOptions // apple OSes. PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) || (internal::SystemPageSize() == (size_t{1} << 14))); -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // Check runtime pagesize. Though the code is currently the same, it is // not merged with the IS_APPLE case above as a 1 << 16 case needs to be // added here in the future, to allow 64 kiB pagesize. That is only diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_spinning__mutex.cc b/www/iridium/files/patch-base_allocator_partition__allocator_spinning__mutex.cc index bc29b3eef37b..a3ee4925d919 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_spinning__mutex.cc +++ b/www/iridium/files/patch-base_allocator_partition__allocator_spinning__mutex.cc @@ -1,53 +1,53 @@ ---- base/allocator/partition_allocator/spinning_mutex.cc.orig 2023-03-13 07:33:08 UTC +--- base/allocator/partition_allocator/spinning_mutex.cc.orig 2023-07-24 14:27:53 UTC +++ base/allocator/partition_allocator/spinning_mutex.cc @@ -18,7 +18,16 @@ #if PA_CONFIG(HAS_LINUX_KERNEL) #include +#if defined(OS_OPENBSD) +#include +#include +#elif defined(OS_FREEBSD) +#include +#include +#include +#else #include +#endif #include #include #endif // PA_CONFIG(HAS_LINUX_KERNEL) -@@ -107,8 +116,16 @@ void SpinningMutex::FutexWait() { +@@ -108,8 +117,16 @@ void SpinningMutex::FutexWait() { // |kLockedContended| anymore. Note that even without spurious wakeups, the // value of |state_| is not guaranteed when this returns, as another thread // may get the lock before we get to run. +#if defined(OS_FREEBSD) + int err = _umtx_op(&state_, UMTX_OP_WAIT_UINT_PRIVATE, + kLockedContended, nullptr, nullptr); +#elif defined(OS_OPENBSD) + int err = futex(reinterpret_cast(&state_), FUTEX_WAIT | FUTEX_PRIVATE_FLAG, + kLockedContended, nullptr, nullptr); +#else int err = syscall(SYS_futex, &state_, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, kLockedContended, nullptr, nullptr, 0); +#endif if (err) { // These are programming error, check them. -@@ -120,8 +137,16 @@ void SpinningMutex::FutexWait() { +@@ -121,8 +138,16 @@ void SpinningMutex::FutexWait() { void SpinningMutex::FutexWake() { int saved_errno = errno; +#if defined(OS_FREEBSD) + long retval = _umtx_op(&state_, UMTX_OP_WAKE_PRIVATE, + 1 /* wake up a single waiter */, nullptr, nullptr); +#elif defined(OS_OPENBSD) + long retval = futex(reinterpret_cast(&state_), FUTEX_WAKE | FUTEX_PRIVATE_FLAG, + 1 /* wake up a single waiter */, nullptr, nullptr); +#else long retval = syscall(SYS_futex, &state_, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1 /* wake up a single waiter */, nullptr, nullptr, 0); +#endif PA_CHECK(retval != -1); errno = saved_errno; } diff --git a/www/iridium/files/patch-base_base__switches.cc b/www/iridium/files/patch-base_base__switches.cc index a1d655c5e642..8eda3e00bfa1 100644 --- a/www/iridium/files/patch-base_base__switches.cc +++ b/www/iridium/files/patch-base_base__switches.cc @@ -1,11 +1,11 @@ ---- base/base_switches.cc.orig 2022-10-05 07:34:01 UTC +--- base/base_switches.cc.orig 2023-07-24 14:27:53 UTC +++ base/base_switches.cc -@@ -170,7 +170,7 @@ const char kForceFieldTrialParams[] = "force-fieldtria +@@ -167,7 +167,7 @@ const char kForceFieldTrialParams[] = "force-fieldtria #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1176772): Remove kEnableCrashpad and IsCrashpadEnabled() when // Crashpad is fully enabled on Linux. Indicates that Crashpad should be // enabled. diff --git a/www/iridium/files/patch-base_base__switches.h b/www/iridium/files/patch-base_base__switches.h index 044813bf69bc..f92035ba7524 100644 --- a/www/iridium/files/patch-base_base__switches.h +++ b/www/iridium/files/patch-base_base__switches.h @@ -1,11 +1,11 @@ ---- base/base_switches.h.orig 2022-10-05 07:34:01 UTC +--- base/base_switches.h.orig 2023-07-24 14:27:53 UTC +++ base/base_switches.h -@@ -60,7 +60,7 @@ extern const char kEnableIdleTracing[]; +@@ -57,7 +57,7 @@ extern const char kEnableIdleTracing[]; extern const char kForceFieldTrialParams[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1176772): Remove kEnableCrashpad and IsCrashpadEnabled() when // Crashpad is fully enabled on Linux. extern const char kEnableCrashpad[]; diff --git a/www/iridium/files/patch-base_compiler__specific.h b/www/iridium/files/patch-base_compiler__specific.h new file mode 100644 index 000000000000..68ec17479a8a --- /dev/null +++ b/www/iridium/files/patch-base_compiler__specific.h @@ -0,0 +1,35 @@ +--- base/compiler_specific.h.orig 2023-07-24 14:27:53 UTC ++++ base/compiler_specific.h +@@ -41,9 +41,9 @@ + // Annotate a function indicating it should not be inlined. + // Use like: + // NOINLINE void DoStuff() { ... } +-#if defined(__clang__) && HAS_ATTRIBUTE(noinline) ++#if defined(__clang__) && (__clang_major__ >= 15) && HAS_ATTRIBUTE(noinline) + #define NOINLINE [[clang::noinline]] +-#elif defined(COMPILER_GCC) && HAS_ATTRIBUTE(noinline) ++#elif (defined(COMPILER_GCC) || defined(__clang__)) && HAS_ATTRIBUTE(noinline) + #define NOINLINE __attribute__((noinline)) + #elif defined(COMPILER_MSVC) + #define NOINLINE __declspec(noinline) +@@ -51,9 +51,9 @@ + #define NOINLINE + #endif + +-#if defined(__clang__) && defined(NDEBUG) && HAS_ATTRIBUTE(always_inline) ++#if defined(__clang__) && (__clang_major__ >= 15) && defined(NDEBUG) && HAS_ATTRIBUTE(always_inline) + #define ALWAYS_INLINE [[clang::always_inline]] inline +-#elif defined(COMPILER_GCC) && defined(NDEBUG) && HAS_ATTRIBUTE(always_inline) ++#elif (defined(COMPILER_GCC) || defined(__clang__)) && defined(NDEBUG) && HAS_ATTRIBUTE(always_inline) + #define ALWAYS_INLINE inline __attribute__((__always_inline__)) + #elif defined(COMPILER_MSVC) && defined(NDEBUG) + #define ALWAYS_INLINE __forceinline +@@ -69,7 +69,7 @@ + // prevent code folding, see NO_CODE_FOLDING() in base/debug/alias.h. + // Use like: + // NOT_TAIL_CALLED void FooBar(); +-#if defined(__clang__) && HAS_ATTRIBUTE(not_tail_called) ++#if defined(__clang__) && (__clang_major__ >= 15) && HAS_ATTRIBUTE(not_tail_called) + #define NOT_TAIL_CALLED [[clang::not_tail_called]] + #else + #define NOT_TAIL_CALLED diff --git a/www/iridium/files/patch-base_debug_stack__trace__posix.cc b/www/iridium/files/patch-base_debug_stack__trace__posix.cc index 1a737fb68af3..4ed4c935f2f5 100644 --- a/www/iridium/files/patch-base_debug_stack__trace__posix.cc +++ b/www/iridium/files/patch-base_debug_stack__trace__posix.cc @@ -1,38 +1,38 @@ ---- base/debug/stack_trace_posix.cc.orig 2023-04-22 17:45:15 UTC +--- base/debug/stack_trace_posix.cc.orig 2023-07-24 14:27:53 UTC +++ base/debug/stack_trace_posix.cc @@ -41,7 +41,7 @@ // execinfo.h and backtrace(3) are really only present in glibc and in macOS // libc. #if BUILDFLAG(IS_APPLE) || \ - (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX)) + (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX) && !BUILDFLAG(IS_BSD)) #define HAVE_BACKTRACE #include #endif @@ -59,7 +59,7 @@ #include #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/debug/proc_maps_linux.h" #endif -@@ -799,6 +799,9 @@ class SandboxSymbolizeHelper { +@@ -798,6 +798,9 @@ class SandboxSymbolizeHelper { // for the modules that are loaded in the current process. // Returns true on success. bool CacheMemoryRegions() { +#if BUILDFLAG(IS_BSD) + return false; +#else // Reads /proc/self/maps. std::string contents; if (!ReadProcMaps(&contents)) { -@@ -816,6 +819,7 @@ class SandboxSymbolizeHelper { +@@ -815,6 +818,7 @@ class SandboxSymbolizeHelper { is_initialized_ = true; return true; +#endif } // Opens all object files and caches their file descriptors. diff --git a/www/iridium/files/patch-base_files_file__path__watcher__unittest.cc b/www/iridium/files/patch-base_files_file__path__watcher__unittest.cc index 0b1ea63389a9..e83ece449b72 100644 --- a/www/iridium/files/patch-base_files_file__path__watcher__unittest.cc +++ b/www/iridium/files/patch-base_files_file__path__watcher__unittest.cc @@ -1,29 +1,29 @@ ---- base/files/file_path_watcher_unittest.cc.orig 2023-03-13 07:33:08 UTC +--- base/files/file_path_watcher_unittest.cc.orig 2023-07-24 14:27:53 UTC +++ base/files/file_path_watcher_unittest.cc -@@ -521,7 +521,7 @@ TEST_F(FilePathWatcherTest, MAYBE_WatchDirectory) { +@@ -479,7 +479,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { VLOG(1) << "Waiting for file1 creation"; ASSERT_TRUE(WaitForEvent()); -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) // Mac implementation does not detect files modified in a directory. ASSERT_TRUE(WriteFile(file1, "content v2")); VLOG(1) << "Waiting for file1 modification"; -@@ -1345,7 +1345,7 @@ enum Permission { +@@ -1281,7 +1281,7 @@ enum Permission { Execute }; -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) bool ChangeFilePermissions(const FilePath& path, Permission perm, bool allow) { struct stat stat_buf; -@@ -1376,7 +1376,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi +@@ -1312,7 +1312,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi } #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) // Linux implementation of FilePathWatcher doesn't catch attribute changes. // http://crbug.com/78043 // Windows implementation of FilePathWatcher catches attribute changes that diff --git a/www/iridium/files/patch-base_files_file__util__posix.cc b/www/iridium/files/patch-base_files_file__util__posix.cc index 45679a464d08..9ee141cee36e 100644 --- a/www/iridium/files/patch-base_files_file__util__posix.cc +++ b/www/iridium/files/patch-base_files_file__util__posix.cc @@ -1,52 +1,52 @@ ---- base/files/file_util_posix.cc.orig 2022-10-05 07:34:01 UTC +--- base/files/file_util_posix.cc.orig 2023-07-24 14:27:53 UTC +++ base/files/file_util_posix.cc -@@ -700,32 +700,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p +@@ -756,32 +756,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p File::Error* error) { ScopedBlockingCall scoped_blocking_call( FROM_HERE, BlockingType::MAY_BLOCK); // For call to mkdir(). + const FilePath kFileSystemRoot("/"); std::vector subpaths; // Collect a list of all parent directories. FilePath last_path = full_path; - subpaths.push_back(full_path); + if (full_path != kFileSystemRoot) + subpaths.push_back(full_path); for (FilePath path = full_path.DirName(); - path.value() != last_path.value(); path = path.DirName()) { + (path.value() != last_path.value() && + (path != kFileSystemRoot)); path = path.DirName()) { subpaths.push_back(path); last_path = path; } // Iterate through the parents and create the missing ones. for (const FilePath& subpath : base::Reversed(subpaths)) { - if (DirectoryExists(subpath)) - continue; - if (mkdir(subpath.value().c_str(), 0700) == 0) - continue; - // Mkdir failed, but it might have failed with EEXIST, or some other error - // due to the directory appearing out of thin air. This can occur if - // two processes are trying to create the same file system tree at the same - // time. Check to see if it exists and make sure it is a directory. - int saved_errno = errno; - if (!DirectoryExists(subpath)) { - if (error) - *error = File::OSErrorToFileError(saved_errno); - return false; + if (!PathExists(subpath)) { + if ((mkdir(subpath.value().c_str(), 0700) == -1) && + ((full_path != subpath) ? (errno != ENOENT) : (-1))) { + int saved_errno = errno; + if (error) + *error = File::OSErrorToFileError(saved_errno); + return false; + } + } else if (!DirectoryExists(subpath)) { + if (error) + *error = File::OSErrorToFileError(ENOTDIR); + return false; } } return true; diff --git a/www/iridium/files/patch-base_files_file__util__unittest.cc b/www/iridium/files/patch-base_files_file__util__unittest.cc index 36907a74a84a..bf6025128396 100644 --- a/www/iridium/files/patch-base_files_file__util__unittest.cc +++ b/www/iridium/files/patch-base_files_file__util__unittest.cc @@ -1,20 +1,20 @@ ---- base/files/file_util_unittest.cc.orig 2023-03-13 07:33:08 UTC +--- base/files/file_util_unittest.cc.orig 2023-07-24 14:27:53 UTC +++ base/files/file_util_unittest.cc -@@ -3749,7 +3749,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { +@@ -3871,7 +3871,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { } #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) TEST_F(FileUtilTest, ReadFileToStringWithProcFileSystem) { FilePath file_path("/proc/cpuinfo"); std::string data = "temp"; -@@ -4472,7 +4472,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles +@@ -4594,7 +4594,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles NULL); #else size_t bytes_written = - ::write(::fileno(output_file.get()), content.c_str(), content.length()); + ::write(fileno(output_file.get()), content.c_str(), content.length()); #endif EXPECT_EQ(content.length(), bytes_written); ::fflush(output_file.get()); diff --git a/www/iridium/files/patch-base_memory_madv__free__discardable__memory__posix.cc b/www/iridium/files/patch-base_memory_madv__free__discardable__memory__posix.cc index efa72b318679..a75f4adc4748 100644 --- a/www/iridium/files/patch-base_memory_madv__free__discardable__memory__posix.cc +++ b/www/iridium/files/patch-base_memory_madv__free__discardable__memory__posix.cc @@ -1,21 +1,21 @@ ---- base/memory/madv_free_discardable_memory_posix.cc.orig 2022-10-05 07:34:01 UTC +--- base/memory/madv_free_discardable_memory_posix.cc.orig 2023-07-24 14:27:53 UTC +++ base/memory/madv_free_discardable_memory_posix.cc -@@ -295,6 +295,10 @@ void MadvFreeDiscardableMemoryPosix::SetKeepMemoryForT +@@ -306,6 +306,10 @@ void MadvFreeDiscardableMemoryPosix::SetKeepMemoryForT bool MadvFreeDiscardableMemoryPosix::IsResident() const { DFAKE_SCOPED_RECURSIVE_LOCK(thread_collision_warner_); +// XXX mincore +#if BUILDFLAG(IS_BSD) + return false; +#else #if BUILDFLAG(IS_APPLE) std::vector vec(allocated_pages_); #else -@@ -310,6 +314,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons +@@ -321,6 +325,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons return false; } return true; +#endif } bool MadvFreeDiscardableMemoryPosix::IsDiscarded() const { diff --git a/www/iridium/files/patch-base_memory_platform__shared__memory__region.h b/www/iridium/files/patch-base_memory_platform__shared__memory__region.h index 5cfb8d4a0d78..653ffad33990 100644 --- a/www/iridium/files/patch-base_memory_platform__shared__memory__region.h +++ b/www/iridium/files/patch-base_memory_platform__shared__memory__region.h @@ -1,29 +1,29 @@ ---- base/memory/platform_shared_memory_region.h.orig 2022-10-05 07:34:01 UTC +--- base/memory/platform_shared_memory_region.h.orig 2023-07-24 14:27:53 UTC +++ base/memory/platform_shared_memory_region.h @@ -16,7 +16,7 @@ #include -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) namespace content { class SandboxIPCHandler; } @@ -83,7 +83,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { kMaxValue = GET_SHMEM_TEMP_DIR_FAILURE }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Structure to limit access to executable region creation. struct ExecutableRegion { private: -@@ -211,7 +211,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { +@@ -215,7 +215,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { CheckPlatformHandlePermissionsCorrespondToMode); static PlatformSharedMemoryRegion Create(Mode mode, size_t size -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) , bool executable = false #endif diff --git a/www/iridium/files/patch-base_process_launch.h b/www/iridium/files/patch-base_process_launch.h index 0edde543cab6..70155bd09fd9 100644 --- a/www/iridium/files/patch-base_process_launch.h +++ b/www/iridium/files/patch-base_process_launch.h @@ -1,11 +1,11 @@ ---- base/process/launch.h.orig 2022-10-05 07:34:01 UTC +--- base/process/launch.h.orig 2023-07-24 14:27:53 UTC +++ base/process/launch.h -@@ -198,7 +198,7 @@ struct BASE_EXPORT LaunchOptions { +@@ -200,7 +200,7 @@ struct BASE_EXPORT LaunchOptions { bool clear_environment = false; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If non-zero, start the process using clone(), using flags as provided. // Unlike in clone, clone_flags may not contain a custom termination signal // that is sent to the parent when the child dies. The termination signal will diff --git a/www/iridium/files/patch-base_process_process__metrics.cc b/www/iridium/files/patch-base_process_process__metrics.cc index 3f47355d36c8..e275cb8d7587 100644 --- a/www/iridium/files/patch-base_process_process__metrics.cc +++ b/www/iridium/files/patch-base_process_process__metrics.cc @@ -1,54 +1,54 @@ ---- base/process/process_metrics.cc.orig 2023-03-13 07:33:08 UTC +--- base/process/process_metrics.cc.orig 2023-07-24 14:27:53 UTC +++ base/process/process_metrics.cc @@ -17,7 +17,7 @@ namespace base { namespace { #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int CalculateEventsPerSecond(uint64_t event_count, uint64_t* last_event_count, base::TimeTicks* last_calculated) { @@ -54,7 +54,7 @@ SystemMetrics SystemMetrics::Sample() { SystemMetrics system_metrics; system_metrics.committed_memory_ = GetSystemCommitCharge(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) GetSystemMemoryInfo(&system_metrics.memory_info_); GetVmStatInfo(&system_metrics.vmstat_info_); GetSystemDiskInfo(&system_metrics.disk_info_); @@ -73,7 +73,7 @@ Value::Dict SystemMetrics::ToDict() const { Value::Dict res; res.Set("committed_memory", static_cast(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) Value::Dict meminfo = memory_info_.ToDict(); meminfo.Merge(vmstat_info_.ToDict()); res.Set("meminfo", std::move(meminfo)); -@@ -98,7 +98,6 @@ std::unique_ptr ProcessMetrics::Create +@@ -100,7 +100,6 @@ std::unique_ptr ProcessMetrics::Create #endif // !BUILDFLAG(IS_MAC) } -#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) double ProcessMetrics::GetPlatformIndependentCPUUsage( TimeDelta cumulative_cpu) { TimeTicks time = TimeTicks::Now(); -@@ -124,7 +123,6 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( +@@ -126,7 +125,6 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( double ProcessMetrics::GetPlatformIndependentCPUUsage() { return GetPlatformIndependentCPUUsage(GetCumulativeCPUUsage()); } -#endif #if BUILDFLAG(IS_WIN) double ProcessMetrics::GetPreciseCPUUsage(TimeDelta cumulative_cpu) { -@@ -155,7 +153,7 @@ double ProcessMetrics::GetPreciseCPUUsage() { +@@ -157,7 +155,7 @@ double ProcessMetrics::GetPreciseCPUUsage() { #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int ProcessMetrics::CalculateIdleWakeupsPerSecond( uint64_t absolute_idle_wakeups) { return CalculateEventsPerSecond(absolute_idle_wakeups, diff --git a/www/iridium/files/patch-base_process_process__metrics.h b/www/iridium/files/patch-base_process_process__metrics.h index a51ed2380534..258adb21a14d 100644 --- a/www/iridium/files/patch-base_process_process__metrics.h +++ b/www/iridium/files/patch-base_process_process__metrics.h @@ -1,120 +1,120 @@ ---- base/process/process_metrics.h.orig 2023-03-13 07:33:08 UTC +--- base/process/process_metrics.h.orig 2023-07-24 14:27:53 UTC +++ base/process/process_metrics.h -@@ -37,7 +37,7 @@ +@@ -38,7 +38,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) #include #include #include -@@ -50,7 +50,7 @@ namespace base { - // Full declaration is in process_metrics_iocounters.h. - struct IoCounters; +@@ -53,7 +53,7 @@ struct IoCounters; + + class ProcessMetricsAppleInternal; -#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. // -@@ -105,7 +105,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -108,7 +108,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; -@@ -163,7 +163,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -166,7 +166,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 -@@ -223,7 +223,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -226,7 +226,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; -@@ -244,7 +244,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -247,7 +247,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) -@@ -263,9 +263,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -266,9 +266,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_; -@@ -273,7 +271,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -276,7 +274,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_; -@@ -316,7 +314,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de +@@ -313,7 +311,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Data about system-wide memory consumption. Values are in KB. Available on // Windows, Mac, Linux, Android and Chrome OS. // -@@ -351,7 +349,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -348,7 +346,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 -@@ -366,7 +364,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -363,7 +361,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; -@@ -403,7 +401,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK +@@ -400,7 +398,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. -@@ -591,7 +589,7 @@ class BASE_EXPORT SystemMetrics { +@@ -588,7 +586,7 @@ class BASE_EXPORT SystemMetrics { FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics); size_t committed_memory_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) SystemMemoryInfoKB memory_info_; VmStatInfo vmstat_info_; SystemDiskInfo disk_info_; diff --git a/www/iridium/files/patch-base_process_process__metrics__posix.cc b/www/iridium/files/patch-base_process_process__metrics__posix.cc index 265511141d4e..e8d8812b6afd 100644 --- a/www/iridium/files/patch-base_process_process__metrics__posix.cc +++ b/www/iridium/files/patch-base_process_process__metrics__posix.cc @@ -1,20 +1,20 @@ ---- base/process/process_metrics_posix.cc.orig 2022-10-05 07:34:01 UTC +--- base/process/process_metrics_posix.cc.orig 2023-07-24 14:27:53 UTC +++ base/process/process_metrics_posix.cc -@@ -20,6 +20,8 @@ +@@ -21,6 +21,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_OPENBSD) +#include #else #include #endif -@@ -135,7 +137,7 @@ size_t ProcessMetrics::GetMallocUsage() { +@@ -134,7 +136,7 @@ size_t ProcessMetrics::GetMallocUsage() { return stats.size_in_use; #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) return GetMallocUsageMallinfo(); -#elif BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. return 0; #endif diff --git a/www/iridium/files/patch-base_process_process__unittest.cc b/www/iridium/files/patch-base_process_process__unittest.cc index 574488941ef8..1ae2a46d8e52 100644 --- a/www/iridium/files/patch-base_process_process__unittest.cc +++ b/www/iridium/files/patch-base_process_process__unittest.cc @@ -1,11 +1,11 @@ ---- base/process/process_unittest.cc.orig 2023-03-13 07:33:08 UTC +--- base/process/process_unittest.cc.orig 2023-07-24 14:27:53 UTC +++ base/process/process_unittest.cc -@@ -194,7 +194,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) { +@@ -195,7 +195,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) { // was spawned and a time recorded after it was spawned. However, since the // base::Time and process creation clocks don't match, tolerate some error. constexpr base::TimeDelta kTolerance = -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux, process creation time is relative to boot time which has a // 1-second resolution. Tolerate 1 second for the imprecise boot time and // 100 ms for the imprecise clock. diff --git a/www/iridium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc b/www/iridium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc index 5b67f7ff1684..569610282815 100644 --- a/www/iridium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc +++ b/www/iridium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc @@ -1,11 +1,11 @@ ---- base/profiler/stack_sampling_profiler_test_util.cc.orig 2023-03-13 07:33:08 UTC +--- base/profiler/stack_sampling_profiler_test_util.cc.orig 2023-07-24 14:27:53 UTC +++ base/profiler/stack_sampling_profiler_test_util.cc -@@ -33,7 +33,7 @@ +@@ -36,7 +36,7 @@ // Fortunately, it provides _alloca, which functions identically. #include #define alloca _alloca -#else +#elif !BUILDFLAG(IS_BSD) #include #endif diff --git a/www/iridium/files/patch-base_rand__util.h b/www/iridium/files/patch-base_rand__util.h index d353d8ebf91e..4f37e571a258 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-06 08:09:13 UTC +--- base/rand_util.h.orig 2023-07-24 14:27:53 UTC +++ base/rand_util.h -@@ -117,7 +117,7 @@ void RandomShuffle(Itr first, Itr last) { +@@ -121,7 +121,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_system_sys__info.cc b/www/iridium/files/patch-base_system_sys__info.cc index 3d3ab0ad35f6..30db53f9c282 100644 --- a/www/iridium/files/patch-base_system_sys__info.cc +++ b/www/iridium/files/patch-base_system_sys__info.cc @@ -1,11 +1,11 @@ ---- base/system/sys_info.cc.orig 2023-03-13 07:33:08 UTC +--- base/system/sys_info.cc.orig 2023-07-24 14:27:53 UTC +++ base/system/sys_info.cc -@@ -106,7 +106,7 @@ std::string SysInfo::HardwareModelName() { +@@ -155,7 +155,7 @@ std::string SysInfo::HardwareModelName() { #endif void SysInfo::GetHardwareInfo(base::OnceCallback callback) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) constexpr base::TaskTraits kTraits = {base::MayBlock()}; #else constexpr base::TaskTraits kTraits = {}; diff --git a/www/iridium/files/patch-base_system_sys__info.h b/www/iridium/files/patch-base_system_sys__info.h index 6227b678f526..419163c249ba 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 2023-03-13 07:33:08 UTC +--- base/system/sys_info.h.orig 2023-07-24 14:27:53 UTC +++ base/system/sys_info.h -@@ -246,6 +246,8 @@ class BASE_EXPORT SysInfo { +@@ -258,6 +258,8 @@ class BASE_EXPORT SysInfo { static void SetIsCpuSecurityMitigationsEnabled(bool is_enabled); #endif + static uint64_t MaxSharedMemorySize(); + private: + friend class test::ScopedAmountOfPhysicalMemoryOverride; FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory); - FRIEND_TEST_ALL_PREFIXES(debug::SystemMetricsTest, ParseMeminfo); -@@ -257,7 +259,7 @@ class BASE_EXPORT SysInfo { +@@ -270,7 +272,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_test_launcher_test__launcher.cc b/www/iridium/files/patch-base_test_launcher_test__launcher.cc index 044f50973517..b2d2aff2105a 100644 --- a/www/iridium/files/patch-base_test_launcher_test__launcher.cc +++ b/www/iridium/files/patch-base_test_launcher_test__launcher.cc @@ -1,10 +1,10 @@ ---- base/test/launcher/test_launcher.cc.orig 2023-01-17 19:19:00 UTC +--- base/test/launcher/test_launcher.cc.orig 2023-07-24 14:27:53 UTC +++ base/test/launcher/test_launcher.cc -@@ -67,6 +67,7 @@ +@@ -69,6 +69,7 @@ #include "third_party/libxml/chromium/libxml_utils.h" #if BUILDFLAG(IS_POSIX) +#include #include #include "base/files/file_descriptor_watcher_posix.h" diff --git a/www/iridium/files/patch-base_threading_platform__thread__unittest.cc b/www/iridium/files/patch-base_threading_platform__thread__unittest.cc index 65d98611cfea..259cd49512f0 100644 --- a/www/iridium/files/patch-base_threading_platform__thread__unittest.cc +++ b/www/iridium/files/patch-base_threading_platform__thread__unittest.cc @@ -1,38 +1,38 @@ ---- base/threading/platform_thread_unittest.cc.orig 2023-03-13 07:33:08 UTC +--- base/threading/platform_thread_unittest.cc.orig 2023-07-24 14:27:53 UTC +++ base/threading/platform_thread_unittest.cc -@@ -31,7 +31,7 @@ +@@ -32,7 +32,7 @@ #include "base/time/time.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include #include -@@ -422,7 +422,7 @@ TEST(PlatformThreadTest, +@@ -423,7 +423,7 @@ TEST(PlatformThreadTest, // and hardcodes what we know. Please inform scheduler-dev@chromium.org if this // proprerty changes for a given platform. TEST(PlatformThreadTest, CanChangeThreadType) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Ubuntu, RLIMIT_NICE and RLIMIT_RTPRIO are 0 by default, so we won't be // able to increase priority to any level. constexpr bool kCanIncreasePriority = false; -@@ -701,12 +701,16 @@ INSTANTIATE_TEST_SUITE_P( +@@ -698,12 +698,16 @@ INSTANTIATE_TEST_SUITE_P( #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) namespace { bool IsTidCacheCorrect() { +#if BUILDFLAG(IS_BSD) + return PlatformThread::CurrentId() == reinterpret_cast(pthread_self()); +#else return PlatformThread::CurrentId() == syscall(__NR_gettid); +#endif } void* CheckTidCacheCorrectWrapper(void*) { diff --git a/www/iridium/files/patch-build_config_compiler_BUILD.gn b/www/iridium/files/patch-build_config_compiler_BUILD.gn index 57a9745cac4b..1bf36cffe69b 100644 --- a/www/iridium/files/patch-build_config_compiler_BUILD.gn +++ b/www/iridium/files/patch-build_config_compiler_BUILD.gn @@ -1,213 +1,222 @@ ---- build/config/compiler/BUILD.gn.orig 2023-04-22 17:45:15 UTC +--- build/config/compiler/BUILD.gn.orig 2023-07-24 14:27:53 UTC +++ build/config/compiler/BUILD.gn -@@ -237,13 +237,16 @@ config("default_include_dirs") { +@@ -249,13 +249,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 --------------------------------------------------------------------- -@@ -289,7 +292,9 @@ config("compiler") { +@@ -302,7 +305,9 @@ config("compiler") { configs += [ # See the definitions below. + ":clang_revision", ":rustc_revision", + ":compiler_cpu_abi", ":compiler_codegen", ":compiler_deterministic", ] -@@ -465,6 +470,10 @@ config("compiler") { +@@ -495,6 +500,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_gold) { -@@ -964,7 +973,7 @@ config("compiler_cpu_abi") { +@@ -818,7 +827,7 @@ config("compiler") { + # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode + # lldb doesn't have the needed changes yet. + # TODO(crbug.com/1379070): Remove if the upstream default ever changes. +- if (is_clang && !is_nacl && !is_win && !is_apple) { ++ if (is_clang && !is_nacl && !is_win && !is_apple && !is_bsd) { + cflags_cc += [ "-gsimple-template-names" ] + } + +@@ -1053,7 +1062,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" ] -@@ -979,7 +988,7 @@ config("compiler_cpu_abi") { +@@ -1068,7 +1077,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" ] -@@ -1325,6 +1334,27 @@ config("compiler_deterministic") { +@@ -1414,6 +1423,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 (rustc_revision != "") { # Similar to the above config, this is here so that all files get recompiled -@@ -1543,7 +1573,7 @@ config("default_warnings") { +@@ -1632,7 +1662,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", -@@ -1711,7 +1741,7 @@ config("no_chromium_code") { +@@ -1809,7 +1839,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", -@@ -1995,8 +2025,7 @@ config("default_stack_frames") { +@@ -2093,8 +2123,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. -@@ -2055,8 +2084,7 @@ config("xoptimize") { +@@ -2153,8 +2182,7 @@ config("xoptimize") { } # Turn off optimizations. -config("no_optimize") { } -config("xno_optimize") { +config("no_optimize") { if (is_win) { cflags = [ "/Od", # Disable optimization. -@@ -2096,8 +2124,7 @@ config("xno_optimize") { +@@ -2194,8 +2222,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: -@@ -2130,8 +2157,7 @@ config("xoptimize_max") { +@@ -2228,8 +2255,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: -@@ -2157,8 +2183,7 @@ config("xoptimize_speed") { +@@ -2255,8 +2281,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 -@@ -2224,7 +2249,7 @@ config("afdo_optimize_size") { +@@ -2324,7 +2349,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. -@@ -2243,7 +2268,7 @@ config("afdo") { +@@ -2343,7 +2368,7 @@ config("afdo") { } 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 ] } -@@ -2281,8 +2306,7 @@ config("win_pdbaltpath") { +@@ -2381,8 +2406,7 @@ config("win_pdbaltpath") { } # Full symbols. -config("symbols") { } -config("xsymbols") { +config("symbols") { + rustflags = [] if (is_win) { if (is_clang) { - cflags = [ -@@ -2399,7 +2423,8 @@ config("xsymbols") { +@@ -2502,7 +2526,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. -@@ -2422,8 +2447,7 @@ config("xsymbols") { +@@ -2525,8 +2550,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") { + rustflags = [] if (is_win) { # Functions, files, and line tables only. - cflags = [] -@@ -2497,8 +2521,7 @@ config("xminimal_symbols") { +@@ -2611,8 +2635,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-build_config_compiler_pgo_BUILD.gn b/www/iridium/files/patch-build_config_compiler_pgo_BUILD.gn new file mode 100644 index 000000000000..e3b1f14fa1af --- /dev/null +++ b/www/iridium/files/patch-build_config_compiler_pgo_BUILD.gn @@ -0,0 +1,19 @@ +--- build/config/compiler/pgo/BUILD.gn.orig 2023-07-24 14:27:53 UTC ++++ build/config/compiler/pgo/BUILD.gn +@@ -121,13 +121,14 @@ config("pgo_optimization_flags") { + + # Enable basic block layout based on the extended TSP problem. This aims to + # improve icache utilization and reduce the binary size. +- if (use_thin_lto) { ++ # __clang_major__ >= 15 ++ if (use_thin_lto && !is_bsd) { + if (is_win) { + ldflags = [ "-mllvm:-enable-ext-tsp-block-placement=1" ] + } else { + ldflags = [ "-Wl,-mllvm,-enable-ext-tsp-block-placement=1" ] + } +- } else { ++ } else if (!is_bsd) { + cflags += [ + "-mllvm", + "-enable-ext-tsp-block-placement=1", diff --git a/www/iridium/files/patch-build_config_rust.gni b/www/iridium/files/patch-build_config_rust.gni deleted file mode 100644 index a76afb4b6e7d..000000000000 --- a/www/iridium/files/patch-build_config_rust.gni +++ /dev/null @@ -1,11 +0,0 @@ ---- build/config/rust.gni.orig 2023-04-22 17:45:15 UTC -+++ build/config/rust.gni -@@ -135,7 +135,7 @@ if (enable_rust) { - rust_sysroot = "//third_party/rust-toolchain" - use_unverified_rust_toolchain = false - } else { -- if (host_os != "linux") { -+ if (host_os != "linux" && host_os != "openbsd" && host_os != "freebsd") { - assert(false, - "Attempt to use Android Rust toolchain on an unsupported platform") - } diff --git a/www/iridium/files/patch-build_linux_unbundle_replace__gn__files.py b/www/iridium/files/patch-build_linux_unbundle_replace__gn__files.py new file mode 100644 index 000000000000..dbf7c40af099 --- /dev/null +++ b/www/iridium/files/patch-build_linux_unbundle_replace__gn__files.py @@ -0,0 +1,10 @@ +--- build/linux/unbundle/replace_gn_files.py.orig 2023-07-24 14:27:53 UTC ++++ build/linux/unbundle/replace_gn_files.py +@@ -54,7 +54,6 @@ REPLACEMENTS = { + 'libevent': 'third_party/libevent/BUILD.gn', + 'libjpeg': 'third_party/libjpeg.gni', + 'libpng': 'third_party/libpng/BUILD.gn', +- 'libusb': 'third_party/libusb/BUILD.gn', + 'libvpx': 'third_party/libvpx/BUILD.gn', + 'libwebp': 'third_party/libwebp/BUILD.gn', + 'libxml': 'third_party/libxml/BUILD.gn', diff --git a/www/iridium/files/patch-build_toolchain_gcc__toolchain.gni b/www/iridium/files/patch-build_toolchain_gcc__toolchain.gni index 7871cc34f0a0..d6bb2afa781b 100644 --- a/www/iridium/files/patch-build_toolchain_gcc__toolchain.gni +++ b/www/iridium/files/patch-build_toolchain_gcc__toolchain.gni @@ -1,44 +1,44 @@ ---- build/toolchain/gcc_toolchain.gni.orig 2023-04-22 17:45:15 UTC +--- build/toolchain/gcc_toolchain.gni.orig 2023-07-24 14:27:53 UTC +++ build/toolchain/gcc_toolchain.gni @@ -53,6 +53,13 @@ if (enable_resource_allowlist_generation) { "enable_resource_allowlist_generation=true does not work for target_os=$target_os") } +declare_args() { + extra_cflags = "" + extra_cppflags = "" + extra_cxxflags = "" + extra_ldflags = "" +} + # This template defines a toolchain for something that works like gcc # (including clang). # -@@ -825,22 +832,12 @@ template("gcc_toolchain") { +@@ -869,22 +876,12 @@ template("gcc_toolchain") { # use_gold too. template("clang_toolchain") { gcc_toolchain(target_name) { - _path = "$clang_base_path/bin" - _is_path_absolute = get_path_info(_path, "abspath") == _path - - # Preserve absolute paths for tools like distcc. - if (_is_path_absolute && filter_include([ _path ], [ "//*" ]) == []) { - prefix = _path - } else { - prefix = rebase_path(_path, root_build_dir) - } - - cc = "${prefix}/clang" - cxx = "${prefix}/clang++" + cc = "cc" + cxx = "c++" ld = cxx - readelf = "${prefix}/llvm-readelf" - ar = "${prefix}/llvm-ar" - nm = "${prefix}/llvm-nm" + readelf = "readelf" + ar = "ar" + nm = "nm" forward_variables_from(invoker, [ diff --git a/www/iridium/files/patch-cc_BUILD.gn b/www/iridium/files/patch-cc_BUILD.gn index f9b95555049a..9a6b9b44d41e 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 2023-04-22 17:45:15 UTC +--- cc/BUILD.gn.orig 2023-07-24 14:27:53 UTC +++ cc/BUILD.gn -@@ -668,7 +668,7 @@ cc_test_static_library("test_support") { +@@ -672,7 +672,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" ] } } -@@ -913,7 +913,6 @@ cc_test("cc_unittests") { - data = [ "//components/viz/test/data/" ] +@@ -922,7 +922,6 @@ cc_test("cc_unittests") { + data = [ "//components/test/data/viz/" ] data_deps = [ "//testing/buildbot/filters:cc_unittests_filters", - "//third_party/mesa_headers", ] if (is_android && enable_chrome_android_internal) { diff --git a/www/iridium/files/patch-chrome_app_app__management__strings.grdp b/www/iridium/files/patch-chrome_app_app__management__strings.grdp index c2eda39438ec..dcebba600041 100644 --- a/www/iridium/files/patch-chrome_app_app__management__strings.grdp +++ b/www/iridium/files/patch-chrome_app_app__management__strings.grdp @@ -1,11 +1,11 @@ ---- chrome/app/app_management_strings.grdp.orig 2022-10-05 07:34:01 UTC +--- chrome/app/app_management_strings.grdp.orig 2023-07-24 14:27:53 UTC +++ chrome/app/app_management_strings.grdp -@@ -173,7 +173,7 @@ +@@ -188,7 +188,7 @@ You can open and edit supported files with this app from Finder or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. - + You can open and edit supported files with this app from your file browser or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. diff --git a/www/iridium/files/patch-chrome_app_chrome__command__ids.h b/www/iridium/files/patch-chrome_app_chrome__command__ids.h index 5476da3aa0d2..e43ae7a1fa6f 100644 --- a/www/iridium/files/patch-chrome_app_chrome__command__ids.h +++ b/www/iridium/files/patch-chrome_app_chrome__command__ids.h @@ -1,11 +1,17 @@ ---- chrome/app/chrome_command_ids.h.orig 2023-03-13 07:33:08 UTC +--- chrome/app/chrome_command_ids.h.orig 2023-07-24 14:27:53 UTC +++ chrome/app/chrome_command_ids.h -@@ -70,7 +70,7 @@ +@@ -70,12 +70,12 @@ + #define IDC_TOGGLE_MULTITASK_MENU 34050 + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #define IDC_USE_SYSTEM_TITLE_BAR 34051 #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - #define IDC_USE_SYSTEM_TITLE_BAR 34051 #define IDC_RESTORE_WINDOW 34052 #endif + diff --git a/www/iridium/files/patch-chrome_app_chrome__main.cc b/www/iridium/files/patch-chrome_app_chrome__main.cc index fa4f5f70f8e4..7356c70dafb2 100644 --- a/www/iridium/files/patch-chrome_app_chrome__main.cc +++ b/www/iridium/files/patch-chrome_app_chrome__main.cc @@ -1,20 +1,34 @@ ---- chrome/app/chrome_main.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/app/chrome_main.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/app/chrome_main.cc -@@ -28,7 +28,7 @@ +@@ -27,11 +27,11 @@ #include "chrome/app/notification_metrics.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/base_switches.h" #endif -@@ -167,7 +167,7 @@ int ChromeMain(int argc, const char** argv) { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/app/chrome_main_linux.h" + #endif + +@@ -136,7 +136,7 @@ int ChromeMain(int argc, const char** argv) { + SetUpBundleOverrides(); + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + AppendExtraArgumentsToCommandLine(command_line); + #endif + +@@ -164,7 +164,7 @@ int ChromeMain(int argc, const char** argv) { headless::SetUpCommandLine(command_line); } else { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (headless::IsOldHeadlessMode()) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) command_line->AppendSwitch(::headless::switches::kEnableCrashReporter); 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 378be698e378..9ebeac602c6e 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,112 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/app/chrome_main_delegate.cc -@@ -136,7 +136,7 @@ +@@ -138,7 +138,7 @@ #include "components/about_ui/credit_utils.h" #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) #include "components/nacl/common/nacl_paths.h" #include "components/nacl/zygote/nacl_fork_delegate_linux.h" #endif -@@ -180,16 +180,16 @@ +@@ -183,16 +183,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 @@ -328,7 +328,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 @@ -413,7 +413,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) || @@ -527,7 +527,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. @@ -616,7 +616,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( -@@ -915,6 +915,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 -@@ -970,7 +972,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { - base::internal::TimerBase::InitializeFeatures(); +@@ -958,7 +958,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { base::InitializeCpuReductionExperiment(); base::sequence_manager::internal::SequenceManagerImpl::InitializeFeatures(); + base::sequence_manager::internal::ThreadController::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::InitFeaturesPostFieldTrial(); -@@ -1102,7 +1104,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1096,7 +1096,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 -@@ -1132,7 +1134,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1126,7 +1126,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 -@@ -1514,7 +1516,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1500,7 +1500,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)) { -@@ -1616,7 +1618,7 @@ absl::variant Chrome +@@ -1602,7 +1602,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 7743aa635a41..674569f6f632 100644 --- a/www/iridium/files/patch-chrome_app_chromium__strings.grd +++ b/www/iridium/files/patch-chrome_app_chromium__strings.grd @@ -1,20 +1,38 @@ ---- chrome/app/chromium_strings.grd.orig 2022-12-06 08:09:13 UTC +--- chrome/app/chromium_strings.grd.orig 2023-07-24 14:27:53 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 -@@ -425,7 +425,7 @@ If you update this file, be sure also to update google +@@ -437,7 +437,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 +@@ -812,7 +812,7 @@ Permissions you've already given to websites and apps + + + +- ++ + + Not used in Chromium. Placeholder to keep resource maps in sync. + +@@ -1162,7 +1162,7 @@ Permissions you've already given to websites and apps + + + +- ++ + + Not used in Chromium. Placeholder to keep resource maps in sync. + diff --git a/www/iridium/files/patch-chrome_app_generated__resources.grd b/www/iridium/files/patch-chrome_app_generated__resources.grd index ff7baf628a08..db310ca94d20 100644 --- a/www/iridium/files/patch-chrome_app_generated__resources.grd +++ b/www/iridium/files/patch-chrome_app_generated__resources.grd @@ -1,74 +1,92 @@ ---- chrome/app/generated_resources.grd.orig 2023-04-22 17:45:15 UTC +--- chrome/app/generated_resources.grd.orig 2023-07-24 14:27:53 UTC +++ chrome/app/generated_resources.grd @@ -2,7 +2,7 @@ -@@ -3187,7 +3187,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -3304,7 +3304,7 @@ You can send it to Google to check if it's unsafe. Sca - + Device Credentials -@@ -4942,7 +4942,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -5036,7 +5036,7 @@ You can send it to Google to check if it's unsafe. Sca Read information about your browser, OS, device, installed software, registry values and files - + Read information about your browser, OS, device, installed software and files -@@ -5612,7 +5612,7 @@ Keep your key file in a safe place. You will need it t +@@ -5691,7 +5691,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. -@@ -5658,7 +5658,7 @@ Keep your key file in a safe place. You will need it t +@@ -5737,7 +5737,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. -@@ -9551,7 +9551,7 @@ Check your passwords anytime in + Update + +- ++ + + Finish update + +@@ -9891,7 +9891,7 @@ Check your passwords anytime in + Use system title bar and borders -@@ -10892,7 +10892,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -10856,7 +10856,7 @@ Check your passwords anytime in ++ + + Share device signals? + +@@ -11246,7 +11246,7 @@ Please help our engineers fix this problem. Tell us wh Set as default - + Minimize -@@ -13004,7 +13004,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -13426,7 +13426,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 90c6310ead37..13f802e72360 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,38 @@ ---- chrome/app/google_chrome_strings.grd.orig 2022-12-06 08:09:13 UTC +--- chrome/app/google_chrome_strings.grd.orig 2023-07-24 14:27:53 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 @@ -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 +@@ -844,7 +844,7 @@ Permissions you've already given to websites and apps + + + +- ++ + + + Relaunch to Update - Your tabs will reopen +@@ -1249,7 +1249,7 @@ Permissions you've already given to websites and apps + + + +- ++ + + Relaunch to finish Chrome update + diff --git a/www/iridium/files/patch-chrome_app_profiles__strings.grdp b/www/iridium/files/patch-chrome_app_profiles__strings.grdp index 2533bd0f79b4..b03c8287ed14 100644 --- a/www/iridium/files/patch-chrome_app_profiles__strings.grdp +++ b/www/iridium/files/patch-chrome_app_profiles__strings.grdp @@ -1,11 +1,11 @@ ---- chrome/app/profiles_strings.grdp.orig 2022-03-28 18:11:04 UTC +--- chrome/app/profiles_strings.grdp.orig 2023-07-24 14:27:53 UTC +++ chrome/app/profiles_strings.grdp -@@ -66,7 +66,7 @@ +@@ -60,7 +60,7 @@ Add Profile... - + Add profile... diff --git a/www/iridium/files/patch-chrome_app_settings__strings.grdp b/www/iridium/files/patch-chrome_app_settings__strings.grdp index a73b2b497947..471cdde34d3a 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 2023-04-22 17:45:15 UTC +--- chrome/app/settings_strings.grdp.orig 2023-07-24 14:27:53 UTC +++ chrome/app/settings_strings.grdp -@@ -166,7 +166,7 @@ +@@ -202,7 +202,7 @@ Theme - + GTK -@@ -186,7 +186,7 @@ +@@ -222,7 +222,7 @@ Use Classic - + Reset to default diff --git a/www/iridium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd b/www/iridium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd index bd1b0aaff3c6..4b386be46f69 100644 --- a/www/iridium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd +++ b/www/iridium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd @@ -1,29 +1,29 @@ ---- chrome/app/theme/chrome_unscaled_resources.grd.orig 2023-04-22 17:45:15 UTC +--- chrome/app/theme/chrome_unscaled_resources.grd.orig 2023-07-24 14:27:53 UTC +++ chrome/app/theme/chrome_unscaled_resources.grd @@ -16,7 +16,7 @@ - + -@@ -63,7 +63,7 @@ +@@ -61,7 +61,7 @@ - + -@@ -77,7 +77,7 @@ +@@ -75,7 +75,7 @@ - + diff --git a/www/iridium/files/patch-chrome_browser_about__flags.cc b/www/iridium/files/patch-chrome_browser_about__flags.cc index 9f8e5f22cc6b..e67ada6dd15d 100644 --- a/www/iridium/files/patch-chrome_browser_about__flags.cc +++ b/www/iridium/files/patch-chrome_browser_about__flags.cc @@ -1,126 +1,144 @@ ---- chrome/browser/about_flags.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/about_flags.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/about_flags.cc -@@ -216,7 +216,7 @@ +@@ -222,7 +222,7 @@ #include "ui/ui_features.h" #include "url/url_features.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/allocator/buildflags.h" #endif -@@ -303,7 +303,7 @@ +@@ -316,7 +316,7 @@ #include "device/vr/public/cpp/features.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "ui/ozone/buildflags.h" #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -@@ -409,7 +409,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap +@@ -422,7 +422,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, -@@ -1350,7 +1350,7 @@ const FeatureEntry::FeatureVariation kLocalWebApproval - #endif +@@ -1478,7 +1478,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 + std::size(kChromeRefresh2023Level1), nullptr}}; #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 - kOmniboxDocumentProviderCapLowQualitySuggestionsTo1[] = { - {"DocumentProviderMaxLowQualitySuggestions", "1"}, -@@ -4397,13 +4397,13 @@ const FeatureEntry kFeatureEntries[] = { + const FeatureEntry::FeatureParam kShortcutBoostSearchAndUrl1414[] = { + {"ShortcutBoostSearchScore", "1414"}, + {"ShortcutBoostUrlScore", "1414"}}; +@@ -4974,13 +4974,13 @@ 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)}, #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, -@@ -4667,7 +4667,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(feed::kDiscoFeedEndpoint)}, +@@ -5265,7 +5265,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(feed::kFeedDynamicColors)}, #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)}, -@@ -5271,7 +5271,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)}, +@@ -5911,7 +5911,7 @@ const FeatureEntry kFeatureEntries[] = { + kOsAll, FEATURE_VALUE_TYPE(omnibox::kUseExistingAutocompleteClient)}, #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, -@@ -5915,7 +5915,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kPointerLockOptionsDescription, kOsDesktop, - FEATURE_VALUE_TYPE(features::kPointerLockOptions)}, + {"omnibox-domain-suggestions", + flag_descriptions::kOmniboxDomainSuggestionsName, + flag_descriptions::kOmniboxDomainSuggestionsDescription, kOsDesktop, +@@ -6674,7 +6674,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kParallelDownloadingDescription, kOsAll, + FEATURE_VALUE_TYPE(download::features::kParallelDownloading)}, -#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)}, -@@ -6838,7 +6838,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7566,7 +7566,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, -@@ -7573,7 +7573,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8345,7 +8345,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)}, -@@ -7789,7 +7789,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8600,7 +8600,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(ash::features::kWallpaperPerDesk)}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - {"enable-get-display-media-set", flag_descriptions::kGetDisplayMediaSetName, - flag_descriptions::kGetDisplayMediaSetDescription, + {"enable-get-all-screens-media", flag_descriptions::kGetAllScreensMediaName, + flag_descriptions::kGetAllScreensMediaDescription, kOsCrOS | kOsLacros | kOsLinux, -@@ -7848,7 +7848,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8661,7 +8661,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, -@@ -8381,7 +8381,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9243,7 +9243,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, +@@ -9942,7 +9942,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kWebUIOmniboxPopupDescription, kOsDesktop, + FEATURE_VALUE_TYPE(omnibox::kWebUIOmniboxPopup)}, + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + {"webui-system-font", flag_descriptions::kWebUiSystemFontName, + flag_descriptions::kWebUiSystemFontDescription, kOsAll, + FEATURE_VALUE_TYPE(features::kWebUiSystemFont)}, +@@ -10134,7 +10134,7 @@ const FeatureEntry kFeatureEntries[] = { + #endif + + #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + {"data-retention-policies-disable-sync-types-needed", + flag_descriptions::kDataRetentionPoliciesDisableSyncTypesNeededName, + flag_descriptions::kDataRetentionPoliciesDisableSyncTypesNeededDescription, diff --git a/www/iridium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc b/www/iridium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc new file mode 100644 index 000000000000..aa80b2a967cd --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc @@ -0,0 +1,11 @@ +--- chrome/browser/apps/app_service/publishers/extension_apps.cc.orig 2023-07-24 14:27:53 UTC ++++ chrome/browser/apps/app_service/publishers/extension_apps.cc +@@ -25,7 +25,7 @@ ExtensionApps::~ExtensionApps() = default; + + bool ExtensionApps::Accepts(const extensions::Extension* extension) { + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + if (extensions::IsExtensionUnsupportedDeprecatedApp(profile(), + extension->id())) { + return false; diff --git a/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc b/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc index 27d9c6172e70..c76e215b2039 100644 --- a/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc +++ b/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc @@ -1,20 +1,20 @@ ---- chrome/browser/apps/platform_apps/platform_app_launch.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/apps/platform_apps/platform_app_launch.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/apps/platform_apps/platform_app_launch.cc @@ -20,7 +20,7 @@ #include "extensions/common/extension.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/browser_window.h" -@@ -124,7 +124,7 @@ bool OpenExtensionApplicationTab(Profile* profile, con +@@ -138,7 +138,7 @@ bool OpenExtensionApplicationTab(Profile* profile, con } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) bool OpenDeprecatedApplicationPrompt(Profile* profile, const std::string& app_id) { if (!extensions::IsExtensionUnsupportedDeprecatedApp(profile, app_id)) diff --git a/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h b/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h index 93acde37179f..1690620972dd 100644 --- a/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h +++ b/www/iridium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h @@ -1,11 +1,11 @@ ---- chrome/browser/apps/platform_apps/platform_app_launch.h.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/apps/platform_apps/platform_app_launch.h.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/apps/platform_apps/platform_app_launch.h -@@ -36,7 +36,7 @@ bool OpenExtensionApplicationWindow(Profile* profile, - // and false otherwise. +@@ -37,7 +37,7 @@ bool OpenExtensionApplicationWindow(Profile* profile, bool OpenExtensionApplicationTab(Profile* profile, const std::string& app_id); --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Opens the deprecated Chrome Apps flow if |app_id| refers to a Chrome App and // Chrome Apps are deprecated on the |profile|. Returns true if that was the // case, or false otherwise. diff --git a/www/iridium/files/patch-chrome_browser_background_background__mode__manager.cc b/www/iridium/files/patch-chrome_browser_background_background__mode__manager.cc index f51b9df4224f..ca3973edcbf9 100644 --- a/www/iridium/files/patch-chrome_browser_background_background__mode__manager.cc +++ b/www/iridium/files/patch-chrome_browser_background_background__mode__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/background/background_mode_manager.cc.orig 2023-03-13 07:33:08 UTC +--- chrome/browser/background/background_mode_manager.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/background/background_mode_manager.cc -@@ -889,7 +889,7 @@ gfx::ImageSkia GetStatusTrayIcon() { +@@ -874,7 +874,7 @@ gfx::ImageSkia GetStatusTrayIcon() { return gfx::ImageSkia(); return family->CreateExact(size).AsImageSkia(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( IDR_PRODUCT_LOGO_128); #elif BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-chrome_browser_background_background__mode__optimizer.cc b/www/iridium/files/patch-chrome_browser_background_background__mode__optimizer.cc index 2482cca382d1..6b53b5dad712 100644 --- a/www/iridium/files/patch-chrome_browser_background_background__mode__optimizer.cc +++ b/www/iridium/files/patch-chrome_browser_background_background__mode__optimizer.cc @@ -1,11 +1,11 @@ ---- chrome/browser/background/background_mode_optimizer.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/background/background_mode_optimizer.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/background/background_mode_optimizer.cc @@ -31,7 +31,7 @@ std::unique_ptr BackgroundMod - switches::kKeepAliveForTest)) return nullptr; + } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (base::FeatureList::IsEnabled(features::kBackgroundModeAllowRestart)) + if (base::FeatureList::IsEnabled(features::kBackgroundModeAllowRestart)) { return base::WrapUnique(new BackgroundModeOptimizer()); - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + } diff --git a/www/iridium/files/patch-chrome_browser_browser__features.cc b/www/iridium/files/patch-chrome_browser_browser__features.cc index da5e09d8d1d8..ec6a1e1d445c 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 2023-03-13 07:33:08 UTC +--- chrome/browser/browser_features.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/browser_features.cc -@@ -24,7 +24,7 @@ BASE_FEATURE(kClosedTabCache, - // the browser exits. +@@ -27,7 +27,7 @@ BASE_FEATURE(kClosedTabCache, 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) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_CHROMEOS_LACROS) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); 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 f3975caec36a..6b24fcb08b46 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 2023-03-13 07:33:08 UTC +--- chrome/browser/browser_process_impl.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/browser_process_impl.cc -@@ -212,7 +212,7 @@ +@@ -215,7 +215,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 -@@ -1190,7 +1190,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1207,7 +1207,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 -@@ -1450,7 +1450,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1464,7 +1464,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_browser__process__impl.h b/www/iridium/files/patch-chrome_browser_browser__process__impl.h index 09fa73902491..7bcb5043e4de 100644 --- a/www/iridium/files/patch-chrome_browser_browser__process__impl.h +++ b/www/iridium/files/patch-chrome_browser_browser__process__impl.h @@ -1,11 +1,11 @@ ---- chrome/browser/browser_process_impl.h.orig 2023-03-13 07:33:08 UTC +--- chrome/browser/browser_process_impl.h.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/browser_process_impl.h -@@ -364,7 +364,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -378,7 +378,7 @@ class BrowserProcessImpl : public BrowserProcess, // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) base::RepeatingTimer autoupdate_timer_; // Gets called by autoupdate timer to see if browser needs restart and can be diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders.cc index 081d524ebadf..e9fa50b5fea5 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 2023-04-22 17:45:15 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -114,13 +114,13 @@ +@@ -119,13 +119,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 -@@ -194,7 +194,7 @@ +@@ -199,7 +199,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" -@@ -859,7 +859,7 @@ void PopulateChromeFrameBinders( +@@ -886,7 +886,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)); -@@ -867,7 +867,7 @@ void PopulateChromeFrameBinders( +@@ -894,7 +894,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 -@@ -932,14 +932,14 @@ void PopulateChromeWebUIFrameBinders( - SegmentationInternalsUI>(map); +@@ -963,14 +963,14 @@ void PopulateChromeWebUIFrameBinders( + commerce::CommerceInternalsUI>(map); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< connectors_internals::mojom::PageHandler, enterprise_connectors::ConnectorsInternalsUI>(map); #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 -@@ -1375,7 +1375,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1428,7 +1428,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 5aff7b1c1799..5db05b2c3ae8 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__main.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__main.cc @@ -1,43 +1,60 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -239,11 +239,11 @@ +@@ -244,11 +244,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/crashpad.h" #endif -@@ -278,7 +278,7 @@ +@@ -283,14 +283,14 @@ // 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" -@@ -988,7 +988,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { + #include "ui/base/pointer/touch_ui_controller.h" + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + #include "chrome/browser/headless/headless_mode_metrics.h" // nogncheck + #include "chrome/browser/headless/headless_mode_util.h" // nogncheck + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +@@ -1005,7 +1005,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 . -@@ -1044,7 +1044,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1061,7 +1061,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( +@@ -1295,7 +1295,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* + *UrlLanguageHistogramFactory::GetForBrowserContext(profile)); + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + if (headless::IsHeadlessMode()) { + headless::ReportHeadlessActionMetrics(); + } diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__main__linux.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__main__linux.cc index 639795f4c9fb..bae4baf4f9ad 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__main__linux.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__main__linux.cc @@ -1,28 +1,28 @@ ---- chrome/browser/chrome_browser_main_linux.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/chrome_browser_main_linux.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/chrome_browser_main_linux.cc -@@ -57,13 +57,15 @@ ChromeBrowserMainPartsLinux::~ChromeBrowserMainPartsLi +@@ -54,13 +54,15 @@ ChromeBrowserMainPartsLinux::~ChromeBrowserMainPartsLi } void ChromeBrowserMainPartsLinux::PostCreateMainMessageLoop() { -#if BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // No-op: Ash and Lacros Bluetooth DBusManager initialization depend on // FeatureList, and is done elsewhere. #endif // BUILDFLAG(IS_CHROMEOS) #if !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_BSD) bluez::BluezDBusManager::Initialize(nullptr /* system_bus */); +#endif // Set up crypt config. This needs to be done before anything starts the // network service, as the raw encryption key needs to be shared with the -@@ -123,7 +125,7 @@ void ChromeBrowserMainPartsLinux::PostBrowserStart() { +@@ -120,7 +122,7 @@ void ChromeBrowserMainPartsLinux::PostBrowserStart() { #endif // defined(USE_DBUS) && !BUILDFLAG(IS_CHROMEOS) void ChromeBrowserMainPartsLinux::PostDestroyThreads() { -#if BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // No-op; per PostBrowserStart() comment, this is done elsewhere. #else bluez::BluezDBusManager::Shutdown(); diff --git a/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc index b979eff2ce50..aff32c2511fc 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,163 +1,165 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -417,7 +417,7 @@ +@@ -427,7 +427,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" - #include "ui/display/screen.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" -@@ -503,12 +503,12 @@ +@@ -516,12 +516,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 -@@ -517,13 +517,13 @@ +@@ -530,14 +530,14 @@ #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/enterprise/profile_management/profile_management_navigation_throttle.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) -@@ -552,11 +552,11 @@ +@@ -566,11 +566,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 BUILDFLAG(IS_OZONE) #include "chrome/browser/chrome_browser_main_extra_parts_ozone.h" -@@ -1571,7 +1571,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre - policy::policy_prefs::kPPAPISharedImagesSwapChainAllowed, true); - registry->RegisterBooleanPref( - policy::policy_prefs::kForceEnablePepperVideoDecoderDevAPI, false); +@@ -1583,7 +1583,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre + prefs::kThrottleNonVisibleCrossOriginIframesAllowed, true); + registry->RegisterBooleanPref(prefs::kNewBaseUrlInheritanceBehaviorAllowed, + true); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOutOfProcessSystemDnsResolutionEnabled, true); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) -@@ -1678,7 +1678,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1697,7 +1697,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) -@@ -1717,7 +1717,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1736,7 +1736,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 -@@ -1738,7 +1738,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1757,7 +1757,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo main_parts->AddParts(std::make_unique()); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) main_parts->AddParts(std::make_unique()); #elif BUILDFLAG(IS_OZONE) main_parts->AddParts(std::make_unique()); -@@ -1757,7 +1757,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1776,7 +1776,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>()); -@@ -2576,6 +2576,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2599,6 +2599,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; #elif BUILDFLAG(IS_CHROMEOS) bool enable_crash_reporter = false; if (crash_reporter::IsCrashpadEnabled()) { -@@ -2957,7 +2959,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2996,7 +2998,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)) { -@@ -4475,7 +4477,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4468,7 +4470,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, -@@ -4997,14 +4999,14 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4989,7 +4991,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati &throttles); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) MaybeAddThrottle( WebAppSettingsNavigationThrottle::MaybeCreateThrottleFor(handle), &throttles); +@@ -4999,7 +5001,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) MaybeAddThrottle(enterprise_connectors::DeviceTrustNavigationThrottle:: MaybeCreateThrottleFor(handle), &throttles); -@@ -5043,7 +5045,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5038,7 +5040,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati handle)); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MaybeAddThrottle(browser_switcher::BrowserSwitcherNavigationThrottle:: MaybeCreateThrottleFor(handle), &throttles); -@@ -6670,7 +6672,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS +@@ -6755,7 +6757,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS } bool ChromeContentBrowserClient::ShouldRunOutOfProcessSystemDnsResolution() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // This is possibly called before `g_browser_process` is initialized. PrefService* local_state; if (g_browser_process) { diff --git a/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.h b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.h index a5a4d86dc80f..85053b9ddeec 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.h +++ b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.h @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_content_browser_client.h.orig 2023-03-13 07:33:08 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -444,7 +444,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -459,7 +459,7 @@ class ChromeContentBrowserClient : public content::Con void OverridePageVisibilityState( content::RenderFrameHost* render_frame_host, content::PageVisibilityState* visibility_state) override; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, diff --git a/www/iridium/files/patch-chrome_browser_defaults.cc b/www/iridium/files/patch-chrome_browser_defaults.cc index 209dcd00c766..ace3e2479c00 100644 --- a/www/iridium/files/patch-chrome_browser_defaults.cc +++ b/www/iridium/files/patch-chrome_browser_defaults.cc @@ -1,11 +1,11 @@ ---- chrome/browser/defaults.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/defaults.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/defaults.cc -@@ -52,7 +52,7 @@ const bool kSyncAutoStarts = true; - const bool kSyncAutoStarts = false; - #endif +@@ -46,7 +46,7 @@ const bool kShowHelpMenuItemIcon = false; + + const bool kDownloadPageHasShowInFolder = true; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool kScrollEventChangesTab = true; #else const bool kScrollEventChangesTab = false; diff --git a/www/iridium/files/patch-chrome_browser_dev__ui__browser__resources.grd b/www/iridium/files/patch-chrome_browser_dev__ui__browser__resources.grd index dd239847cf28..800bd075e772 100644 --- a/www/iridium/files/patch-chrome_browser_dev__ui__browser__resources.grd +++ b/www/iridium/files/patch-chrome_browser_dev__ui__browser__resources.grd @@ -1,11 +1,11 @@ ---- chrome/browser/dev_ui_browser_resources.grd.orig 2023-03-13 07:33:08 UTC +--- chrome/browser/dev_ui_browser_resources.grd.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/dev_ui_browser_resources.grd -@@ -33,7 +33,7 @@ This file specifies browser resources for developer-fa +@@ -35,7 +35,7 @@ This file specifies browser resources for developer-fa - + diff --git a/www/iridium/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc b/www/iridium/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc deleted file mode 100644 index 21f4fa9a5036..000000000000 --- a/www/iridium/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/devtools/devtools_eye_dropper.cc.orig 2023-04-22 17:45:15 UTC -+++ chrome/browser/devtools/devtools_eye_dropper.cc -@@ -185,7 +185,7 @@ void DevToolsEyeDropper::UpdateCursor() { - // magnified projection only with centered hotspot. - // Mac Retina requires cursor to be > 120px in order to render smoothly. - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const float kCursorSize = 63; - const float kDiameter = 63; - const float kHotspotOffset = 32; diff --git a/www/iridium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc b/www/iridium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc index 5ddb95239fb7..a7a4e1585ff1 100644 --- a/www/iridium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc +++ b/www/iridium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc @@ -1,29 +1,29 @@ ---- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1561,7 +1561,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1567,7 +1567,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile( const base::FilePath& path) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) { return !download_prefs_->ShouldOpenPdfInSystemReader(); } -@@ -1675,7 +1675,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -1686,7 +1686,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow content::CheckDownloadAllowedCallback check_download_allowed_cb) { DCHECK_CURRENTLY_ON(BrowserThread::UI); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Don't download pdf if it is a file URL, as that might cause an infinite // download loop if Chrome is not the system pdf viewer. if (url.SchemeIsFile() && download_prefs_->ShouldOpenPdfInSystemReader()) { -@@ -1721,7 +1721,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl +@@ -1732,7 +1732,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl DCHECK(download_item->IsSavePackageDownload()); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) absl::optional settings = safe_browsing::DeepScanningRequest::ShouldUploadBinary(download_item); 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 51a9e4866e20..64dab347bbe3 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 2023-04-22 17:45:15 UTC +--- chrome/browser/download/download_item_model.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/download/download_item_model.cc -@@ -765,7 +765,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -766,7 +766,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(); -@@ -808,7 +808,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand +@@ -809,7 +809,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); -@@ -1220,7 +1220,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1232,7 +1232,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 2199245975be..bffd0c25adfa 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 2023-04-22 17:45:15 UTC +--- chrome/browser/download/download_prefs.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/download/download_prefs.cc @@ -11,6 +11,7 @@ + #include #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/functional/bind.h" -@@ -64,6 +65,10 @@ +@@ -63,6 +64,10 @@ #include "chrome/browser/download/bubble/download_bubble_prefs.h" #endif -+#if BUILDFLAG(IS_OPENBSD) -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" +#endif + using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; -@@ -74,7 +79,7 @@ namespace { +@@ -73,7 +78,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; -@@ -185,7 +190,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi +@@ -181,7 +186,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 -@@ -312,7 +317,7 @@ void DownloadPrefs::RegisterProfilePrefs( +@@ -311,7 +316,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) -@@ -485,7 +490,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens +@@ -484,7 +489,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; -@@ -517,7 +522,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons +@@ -516,7 +521,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(); -@@ -548,7 +553,7 @@ void DownloadPrefs::SaveAutoOpenState() { +@@ -547,7 +552,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; -@@ -672,7 +677,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa +@@ -671,7 +676,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa #else // If the stored download directory is an absolute path, we presume it's // correct; there's not really much more validation we can do here. +#if BUILDFLAG(IS_OPENBSD) + // If unveil(2) is used, force the file dialog directory to something we + // know is available. + auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); + if (!sandbox->unveil_initialized() && path.IsAbsolute()) +#else if (path.IsAbsolute()) +#endif return path; // When the default download directory is *not* an absolute path, we use the diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_analysis_content__analysis__delegate.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_analysis_content__analysis__delegate.cc new file mode 100644 index 000000000000..937fe698e884 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_analysis_content__analysis__delegate.cc @@ -0,0 +1,20 @@ +--- chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc.orig 2023-07-24 14:27:53 UTC ++++ chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc +@@ -52,7 +52,7 @@ + #include "ui/base/l10n/l10n_util.h" + #include "ui/base/ui_base_types.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/content_analysis_sdk_manager.h" // nogncheck + #endif + +@@ -555,7 +555,7 @@ void ContentAnalysisDelegate::PageRequestCallback( + bool ContentAnalysisDelegate::UploadData() { + upload_start_time_ = base::TimeTicks::Now(); + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // If this is a local content analysis, check if the local agent is ready. + // If not, abort early. This is to prevent doing a lot of work, like reading + // files into memory or calcuating SHA256 hashes and prevent a flash of the diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_connectors__manager.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_connectors__manager.cc new file mode 100644 index 000000000000..bbc53c78acf9 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_connectors__manager.cc @@ -0,0 +1,82 @@ +--- chrome/browser/enterprise/connectors/connectors_manager.cc.orig 2023-07-24 14:27:53 UTC ++++ chrome/browser/enterprise/connectors/connectors_manager.cc +@@ -16,7 +16,7 @@ + #include "components/prefs/pref_service.h" + #include "url/gurl.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/content_analysis_sdk_manager.h" // nogncheck + #include "chrome/browser/ui/browser.h" + #include "chrome/browser/ui/browser_list.h" +@@ -25,7 +25,7 @@ + + namespace enterprise_connectors { + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + namespace { + + static constexpr enterprise_connectors::AnalysisConnector +@@ -51,7 +51,7 @@ ConnectorsManager::ConnectorsManager( + DCHECK(browser_crash_event_router_) << "Crash event router is null"; + DCHECK(extension_install_event_router_) << "Extension event router is null"; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Start observing tab strip models for all browsers. + BrowserList* browser_list = BrowserList::GetInstance(); + for (Browser* browser : *browser_list) { +@@ -62,14 +62,14 @@ ConnectorsManager::ConnectorsManager( + + if (observe_prefs) { + StartObservingPrefs(pref_service); +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + MaybeCloseLocalContentAnalysisAgentConnection(); + #endif + } + extension_install_event_router_->StartObserving(); + } + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + ConnectorsManager::~ConnectorsManager() { + BrowserList* browser_list = BrowserList::GetInstance(); + browser_list->RemoveObserver(this); +@@ -99,7 +99,7 @@ bool ConnectorsManager::IsConnectorEnabled(AnalysisCon + base::FeatureList::IsEnabled(kLocalContentAnalysisEnabled); + } + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + bool ConnectorsManager::IsConnectorEnabledForLocalAgent( + AnalysisConnector connector) const { + if (!IsConnectorEnabled(connector)) { +@@ -178,7 +178,7 @@ absl::optional ConnectorsManager::Ge + } + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void ConnectorsManager::OnBrowserAdded(Browser* browser) { + browser->tab_strip_model()->AddObserver(this); + } +@@ -241,7 +241,7 @@ void ConnectorsManager::CacheAnalysisConnectorPolicy( + service_settings, *service_provider_config_); + } + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void ConnectorsManager::MaybeCloseLocalContentAnalysisAgentConnection() { + for (auto connector : kLocalAnalysisConnectors) { + if (IsConnectorEnabledForLocalAgent(connector)) { +@@ -257,7 +257,7 @@ void ConnectorsManager::MaybeCloseLocalContentAnalysis + + void ConnectorsManager::OnPrefChanged(AnalysisConnector connector) { + CacheAnalysisConnectorPolicy(connector); +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + MaybeCloseLocalContentAnalysisAgentConnection(); + #endif + } diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_connectors__manager.h b/www/iridium/files/patch-chrome_browser_enterprise_connectors_connectors__manager.h new file mode 100644 index 000000000000..c34d432f334d --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_connectors__manager.h @@ -0,0 +1,56 @@ +--- chrome/browser/enterprise/connectors/connectors_manager.h.orig 2023-07-24 14:27:53 UTC ++++ chrome/browser/enterprise/connectors/connectors_manager.h +@@ -16,7 +16,7 @@ + #include "third_party/abseil-cpp/absl/types/optional.h" + #include "url/gurl.h" + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/browser_list_observer.h" + #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +@@ -31,7 +31,7 @@ class BrowserCrashEventRouter; + // Manages access to Connector policies for a given profile. This class is + // responsible for caching the Connector policies, validate them against + // approved service providers and provide a simple interface to them. +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + class ConnectorsManager : public BrowserListObserver, + public TabStripModelObserver { + #else +@@ -51,7 +51,7 @@ class ConnectorsManager { + PrefService* pref_service, + const ServiceProviderConfig* config, + bool observe_prefs = true); +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + ~ConnectorsManager() override; + #else + ~ConnectorsManager(); +@@ -81,7 +81,7 @@ class ConnectorsManager { + bool IsConnectorEnabled(AnalysisConnector connector) const; + bool IsConnectorEnabled(ReportingConnector connector) const; + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Check if the corresponding connector is enabled for any local agent. + bool IsConnectorEnabledForLocalAgent(AnalysisConnector connector) const; + #endif +@@ -109,7 +109,7 @@ class ConnectorsManager { + const; + + private: +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // BrowserListObserver overrides: + void OnBrowserAdded(Browser* browser) override; + void OnBrowserRemoved(Browser* browser) override; +@@ -132,7 +132,7 @@ class ConnectorsManager { + void CacheAnalysisConnectorPolicy(AnalysisConnector connector) const; + void CacheReportingConnectorPolicy(ReportingConnector connector); + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Close connection with local agent if all the relevant connectors are turned + // off for it. + void MaybeCloseLocalContentAnalysisAgentConnection(); diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_connectors__prefs.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_connectors__prefs.cc deleted file mode 100644 index ab4bdf9fb86d..000000000000 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_connectors__prefs.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/enterprise/connectors/connectors_prefs.cc.orig 2023-04-22 17:45:15 UTC -+++ chrome/browser/enterprise/connectors/connectors_prefs.cc -@@ -69,7 +69,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry - } - - void RegisterLocalStatePrefs(PrefRegistrySimple* registry) { --#if !BUILDFLAG(IS_FUCHSIA) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) - registry->RegisterInt64Pref(kLatestCrashReportCreationTime, 0); - #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 7ec5956b4913..5f4a6f5e6c5d 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc @@ -1,29 +1,29 @@ ---- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig 2023-03-13 07:33:08 UTC +--- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc @@ -11,7 +11,7 @@ #include "chrome/browser/profiles/profile.h" #include "components/keyed_service/core/keyed_service.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_process.h" - #include "chrome/browser/enterprise/connectors/device_trust/browser/browser_device_trust_connector_service.h" + #include "chrome/browser/enterprise/connectors/device_trust/browser/signing_key_policy_observer.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h" @@ -41,7 +41,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; @@ -77,7 +77,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil - DeviceTrustConnectorService* service = nullptr; + auto* service = new DeviceTrustConnectorService(profile->GetPrefs()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (IsDeviceTrustConnectorFeatureEnabled()) { auto* key_manager = g_browser_process->browser_policy_connector() ->chrome_browser_cloud_management_controller() 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 eed7ee8b3858..0f2d66f41245 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,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc @@ -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/enterprise/signals/signals_aggregator_factory.h" -@@ -75,7 +75,7 @@ DeviceTrustServiceFactory::DeviceTrustServiceFactory() +@@ -78,7 +78,7 @@ DeviceTrustServiceFactory::DeviceTrustServiceFactory() DependsOn(DeviceTrustConnectorServiceFactory::GetInstance()); DependsOn(policy::ManagementServiceFactory::GetInstance()); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Depends on this service via the SignalsService having a dependency on it. DependsOn(enterprise_signals::SignalsAggregatorFactory::GetInstance()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) 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 87fc1e4b6979..46b7ca342539 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 2023-04-22 17:45:15 UTC +--- chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc @@ -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/enterprise/signals/signals_aggregator_factory.h" -@@ -55,7 +55,7 @@ std::unique_ptr CreateSignalsService(P +@@ -56,7 +56,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. + policy::CloudPolicyStore* browser_cloud_policy_store = nullptr; + if (management_service->HasManagementAuthority( diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc index 938eb9c915a2..0291767e0e0c 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc -@@ -14,7 +14,7 @@ BrowserCrashEventRouter::BrowserCrashEventRouter( - if (!base::FeatureList::IsEnabled(kBrowserCrashEventsEnabled)) { - return; - } +@@ -11,7 +11,7 @@ namespace enterprise_connectors { + + BrowserCrashEventRouter::BrowserCrashEventRouter( + content::BrowserContext* context) { -#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) +#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_BSD) CrashReportingContext* crash_reporting_context = CrashReportingContext::GetInstance(); Profile* profile = Profile::FromBrowserContext(context); -@@ -27,7 +27,7 @@ BrowserCrashEventRouter::~BrowserCrashEventRouter() { - if (!base::FeatureList::IsEnabled(kBrowserCrashEventsEnabled)) { - return; - } +@@ -21,7 +21,7 @@ BrowserCrashEventRouter::BrowserCrashEventRouter( + } + + BrowserCrashEventRouter::~BrowserCrashEventRouter() { -#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) +#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_BSD) CrashReportingContext* crash_reporting_context = CrashReportingContext::GetInstance(); crash_reporting_context->RemoveProfile(this); diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.h b/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.h deleted file mode 100644 index 65be761b20f5..000000000000 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.h +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/enterprise/connectors/reporting/crash_reporting_context.h.orig 2023-04-22 17:45:15 UTC -+++ chrome/browser/enterprise/connectors/reporting/crash_reporting_context.h -@@ -10,7 +10,7 @@ - #include "chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.h" - #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" - --#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_BSD) - #include "third_party/crashpad/crashpad/client/crash_report_database.h" - #endif - -@@ -29,7 +29,7 @@ class CrashReportingContext - CrashReportingContext operator=(CrashReportingContext&&) = delete; - ~CrashReportingContext() override; - --#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_BSD) - static CrashReportingContext* GetInstance(); - - void AddProfile(BrowserCrashEventRouter* router, Profile* profile); -@@ -51,7 +51,7 @@ class CrashReportingContext - #endif - }; - --#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_BSD) - - // Utility function to parse reports from a crash database that were - // created past a given timestamp. Included in header for testing. diff --git a/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn b/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn index ca75d956e31b..cfa2635898f1 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 2023-04-22 17:45:15 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1340,6 +1340,10 @@ static_library("extensions") { +@@ -1350,6 +1350,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_api__browser__context__keyed__service__factories.cc b/www/iridium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc index 726dcd4510d7..9355de497358 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc -@@ -41,7 +41,7 @@ +@@ -42,7 +42,7 @@ #include "extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h" #include "extensions/browser/api/networking_private/networking_private_delegate_factory.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h" #endif -@@ -100,7 +100,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt +@@ -102,7 +102,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt extensions::SettingsPrivateEventRouterFactory::GetInstance(); extensions::SettingsOverridesAPI::GetFactoryInstance(); extensions::SidePanelService::GetFactoryInstance(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extensions::SystemIndicatorManagerFactory::GetInstance(); #endif extensions::TabGroupsEventRouterFactory::GetInstance(); diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc index 87d22d6cfe3d..de984b876b1c 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 2023-04-22 17:45:15 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2023-07-24 14:27:53 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" -@@ -150,7 +150,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( device_signals::SignalName signal_name) { -@@ -211,7 +211,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: +@@ -210,7 +210,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: // getPersistentSecret -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) EnterpriseReportingPrivateGetPersistentSecretFunction:: EnterpriseReportingPrivateGetPersistentSecretFunction() = default; -@@ -638,7 +638,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: +@@ -637,7 +637,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: } #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // getFileSystemInfo diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc b/www/iridium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc index 0be3f412e370..dc88316a6e62 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 2023-04-22 17:45:15 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -523,7 +523,7 @@ void PasswordsPrivateDelegateImpl::OsReauthCall( +@@ -534,7 +534,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) + 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 cfed602a4c5d..52266961dc78 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 2023-04-22 17:45:15 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -191,7 +191,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -194,7 +194,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist + (*s_allowlist)[::prefs::kSidePanelHorizontalAlignment] = + settings_api::PrefType::PREF_TYPE_BOOLEAN; - // 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_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::PREF_TYPE_BOOLEAN; #endif -@@ -203,7 +203,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -206,7 +206,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_extensions_external__provider__impl.cc b/www/iridium/files/patch-chrome_browser_extensions_external__provider__impl.cc index 0679ec5222a9..81b904d1e586 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_external__provider__impl.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_external__provider__impl.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/external_provider_impl.cc.orig 2023-03-13 07:33:08 UTC +--- chrome/browser/extensions/external_provider_impl.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/extensions/external_provider_impl.cc -@@ -819,7 +819,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -829,7 +829,7 @@ void ExternalProviderImpl::CreateExternalProviders( if (!profile->GetPrefs()->GetBoolean(pref_names::kBlockExternalExtensions)) { // 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) provider_list->push_back(std::make_unique( service, base::MakeRefCounted( -@@ -847,7 +847,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -857,7 +857,7 @@ void ExternalProviderImpl::CreateExternalProviders( bundled_extension_creation_flags)); // Define a per-user source of external extensions. -#if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ BUILDFLAG(CHROMIUM_BRANDING)) provider_list->push_back(std::make_unique( service, diff --git a/www/iridium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc b/www/iridium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc index 860a206e64d4..a603dada5414 100644 --- a/www/iridium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc +++ b/www/iridium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc @@ -1,11 +1,11 @@ ---- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -313,7 +313,7 @@ const struct { - {base::DIR_HOME, FILE_PATH_LITERAL("Library/Mobile Documents"), +@@ -317,7 +317,7 @@ const struct { + FILE_PATH_LITERAL("Library/Mobile Documents/com~apple~CloudDocs"), kDontBlockChildren}, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux also block access to devices via /dev. {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren}, // And security sensitive data in /proc and /sys. diff --git a/www/iridium/files/patch-chrome_browser_first__run_first__run__internal__linux.cc b/www/iridium/files/patch-chrome_browser_first__run_first__run__internal__linux.cc index 03352757575e..eab51c9ad7d2 100644 --- a/www/iridium/files/patch-chrome_browser_first__run_first__run__internal__linux.cc +++ b/www/iridium/files/patch-chrome_browser_first__run_first__run__internal__linux.cc @@ -1,16 +1,16 @@ ---- chrome/browser/first_run/first_run_internal_linux.cc.orig 2022-04-03 12:23:22 UTC +--- chrome/browser/first_run/first_run_internal_linux.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/first_run/first_run_internal_linux.cc @@ -21,7 +21,13 @@ bool IsOrganicFirstRun() { base::FilePath InitialPrefsPath() { // The standard location of the initial prefs is next to the chrome binary. - base::FilePath initial_prefs; + base::FilePath dir_exe; +#if BUILDFLAG(IS_OPENBSD) -+ initial_prefs = base::FilePath("/etc/iridium"); ++ dir_exe = base::FilePath("/etc/iridium"); +#elif BUILDFLAG(IS_FREEBSD) -+ initial_prefs = base::FilePath("/usr/local/etc/iridium"); ++ dir_exe = base::FilePath("/usr/local/etc/iridium"); +#else - initial_prefs = base::FilePath("/etc/iridium-browser"); + dir_exe = base::FilePath("/etc/iridium-browser"); +#endif - base::FilePath new_path = initial_prefs.AppendASCII(installer::kInitialPrefs); - if (base::PathIsReadable(new_path)) - return new_path; + return installer::InitialPreferences::Path(dir_exe); + } + diff --git a/www/iridium/files/patch-chrome_browser_flag__descriptions.cc b/www/iridium/files/patch-chrome_browser_flag__descriptions.cc index 1afffb3ec71f..d5ab00e2ab25 100644 --- a/www/iridium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/iridium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,65 +1,92 @@ ---- chrome/browser/flag_descriptions.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/flag_descriptions.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/flag_descriptions.cc -@@ -6166,7 +6166,7 @@ const char kLibAssistantV2MigrationDescription[] = +@@ -2423,7 +2423,7 @@ const char kWebUIOmniboxPopupName[] = "WebUI Omnibox P + const char kWebUIOmniboxPopupDescription[] = + "If enabled, shows the omnibox suggestions popup in WebUI."; + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + const char kWebUiSystemFontName[] = "WebUI System font"; + const char kWebUiSystemFontDescription[] = + "If enabled, all WebUI surfaces will use the default UI font of the " +@@ -6695,7 +6695,7 @@ const char kLibAssistantV2MigrationDescription[] = #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const char kGetDisplayMediaSetName[] = "GetDisplayMediaSet API"; - const char kGetDisplayMediaSetDescription[] = - "When enabled, the getDisplayMediaSet API for capturing multiple surfaces " -@@ -6402,7 +6402,7 @@ const char kSearchWebInSidePanelDescription[] = + const char kGetAllScreensMediaName[] = "GetAllScreensMedia API"; + const char kGetAllScreensMediaDescription[] = + "When enabled, the getAllScreensMedia API for capturing multiple screens " +@@ -6926,7 +6926,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."; -@@ -6411,7 +6411,7 @@ const char kQuickCommandsDescription[] = +@@ -6935,7 +6935,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."; -@@ -6432,7 +6432,7 @@ const char kWebShareDescription[] = +@@ -6957,7 +6957,7 @@ const char kEnableProtoApiForClassifyUrlDescription[] + "instead of JSON."; + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + const char kUseOutOfProcessVideoDecodingName[] = + "Use out-of-process video decoding (OOP-VD)"; + const char kUseOutOfProcessVideoDecodingDescription[] = +@@ -6975,7 +6975,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"; -@@ -6452,7 +6452,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -6995,7 +6995,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti "Bluetooth"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kSkipUndecryptablePasswordsName[] = "Skip undecryptable passwords to use the available decryptable " "passwords."; -@@ -6466,7 +6466,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail +@@ -7009,7 +7009,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail "storage and requests initial sync."; #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) -@@ -6567,7 +6567,7 @@ const char kElasticOverscrollDescription[] = +@@ -7110,7 +7110,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."; +@@ -7139,7 +7139,7 @@ const char kSigninInterceptBubbleV2Description[] = + #endif + + #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + const char kDataRetentionPoliciesDisableSyncTypesNeededName[] = + "Data Retention Policies Disable Sync Types"; + const char kDataRetentionPoliciesDisableSyncTypesNeededDescription[] = diff --git a/www/iridium/files/patch-chrome_browser_flag__descriptions.h b/www/iridium/files/patch-chrome_browser_flag__descriptions.h index c535111bc7e4..18a38d432525 100644 --- a/www/iridium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/iridium/files/patch-chrome_browser_flag__descriptions.h @@ -1,71 +1,98 @@ ---- chrome/browser/flag_descriptions.h.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/flag_descriptions.h.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/flag_descriptions.h -@@ -3568,7 +3568,7 @@ extern const char kLacrosScreenCoordinatesEnabledName[ - extern const char kLacrosScreenCoordinatesEnabledDescription[]; +@@ -1360,7 +1360,7 @@ extern const char kOmniboxUpdatedConnectionSecurityInd + extern const char kWebUIOmniboxPopupName[]; + extern const char kWebUIOmniboxPopupDescription[]; + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + extern const char kWebUiSystemFontName[]; + extern const char kWebUiSystemFontDescription[]; + #endif +@@ -3856,7 +3856,7 @@ extern const char kLacrosMergeIcuDataFileName[]; + extern const char kLacrosMergeIcuDataFileDescription[]; #endif // #if BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - extern const char kGetDisplayMediaSetName[]; - extern const char kGetDisplayMediaSetDescription[]; - -@@ -3690,14 +3690,14 @@ extern const char kSearchWebInSidePanelDescription[]; + extern const char kGetAllScreensMediaName[]; + extern const char kGetAllScreensMediaDescription[]; + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +@@ -3980,14 +3980,14 @@ 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[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // defined (OS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kWebShareName[]; extern const char kWebShareDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -@@ -3707,7 +3707,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa +@@ -3997,7 +3997,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[]; -@@ -3717,7 +3717,7 @@ extern const char kOzonePlatformHintName[]; +@@ -4007,7 +4007,7 @@ extern const char kOzonePlatformHintName[]; extern const char kOzonePlatformHintDescription[]; #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[]; -@@ -3725,13 +3725,13 @@ extern const char kForcePasswordInitialSyncWhenDecrypt +@@ -4015,13 +4015,13 @@ extern const char kForcePasswordInitialSyncWhenDecrypt extern const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[]; #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) || -@@ -3811,7 +3811,7 @@ extern const char kElasticOverscrollDescription[]; +@@ -4037,7 +4037,7 @@ extern const char kEnableProtoApiForClassifyUrlName[]; + extern const char kEnableProtoApiForClassifyUrlDescription[]; + #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + extern const char kUseOutOfProcessVideoDecodingName[]; + extern const char kUseOutOfProcessVideoDecodingDescription[]; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -4111,7 +4111,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[]; +@@ -4129,7 +4129,7 @@ extern const char kSigninInterceptBubbleV2Description[ + #endif + + #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + extern const char kDataRetentionPoliciesDisableSyncTypesNeededName[]; + extern const char kDataRetentionPoliciesDisableSyncTypesNeededDescription[]; + #endif diff --git a/www/iridium/files/patch-chrome_browser_headless_headless__mode__util.cc b/www/iridium/files/patch-chrome_browser_headless_headless__mode__util.cc index bfd9efa026c3..f8905f9f5e24 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,26 +1,26 @@ ---- chrome/browser/headless/headless_mode_util.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/headless/headless_mode_util.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/headless/headless_mode_util.cc @@ -10,12 +10,12 @@ // New headless mode is available on Linux, Windows and Mac platforms. // More platforms will be added later, so avoid function level clutter // by providing stub implementations at the end of the file. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "base/base_switches.h" #include "chrome/common/chrome_switches.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/gl/gl_switches.h" // nogncheck #include "ui/ozone/public/ozone_switches.h" // nogncheck #endif // BUILDFLAG(IS_LINUX) -@@ -72,7 +72,7 @@ void SetUpCommandLine(const base::CommandLine* command - base::CommandLine::ForCurrentProcess()->AppendSwitch( - ::switches::kNoErrorDialogs); - } +@@ -78,7 +78,7 @@ void SetUpCommandLine(const base::CommandLine* command + base::CommandLine::ForCurrentProcess()->AppendSwitch( + switches::kDisableLazyLoading); + -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Headless mode on Linux relies on ozone/headless platform. base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( ::switches::kOzonePlatform, switches::kHeadless); diff --git a/www/iridium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc b/www/iridium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc index 1d8645eb670a..d4f1e0532f60 100644 --- a/www/iridium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc +++ b/www/iridium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc @@ -1,20 +1,20 @@ ---- chrome/browser/media/webrtc/capture_policy_utils.cc.orig 2023-03-13 07:33:08 UTC +--- chrome/browser/media/webrtc/capture_policy_utils.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/media/webrtc/capture_policy_utils.cc -@@ -118,7 +118,7 @@ AllowedScreenCaptureLevel GetAllowedCaptureLevel(const +@@ -124,7 +124,7 @@ AllowedScreenCaptureLevel GetAllowedCaptureLevel(const + } - bool IsGetDisplayMediaSetSelectAllScreensAllowedForAnySite( - content::BrowserContext* context) { + bool IsGetAllScreensMediaAllowedForAnySite(content::BrowserContext* context) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context); if (!profile) { return false; -@@ -145,7 +145,7 @@ bool IsGetDisplayMediaSetSelectAllScreensAllowedForAny - bool IsGetDisplayMediaSetSelectAllScreensAllowed( - content::BrowserContext* context, - const GURL& url) { +@@ -160,7 +160,7 @@ bool IsGetAllScreensMediaAllowedForAnySite(content::Br + + bool IsGetAllScreensMediaAllowed(content::BrowserContext* context, + const GURL& url) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context); - if (!profile) + if (!profile) { return false; diff --git a/www/iridium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc b/www/iridium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc index 8dfc95378e72..3f34a6fc3b4d 100644 --- a/www/iridium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc +++ b/www/iridium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc @@ -1,47 +1,47 @@ ---- chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig 2023-03-13 07:33:08 UTC +--- chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/media/webrtc/chrome_screen_enumerator.cc -@@ -20,7 +20,7 @@ +@@ -21,7 +21,7 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) #include "ash/shell.h" #include "ui/aura/window.h" -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/functional/callback.h" #include "content/public/browser/desktop_capture.h" #endif -@@ -31,7 +31,7 @@ base::LazyInstance>::Destru +@@ -32,7 +32,7 @@ base::LazyInstance>::Destru root_windows_for_testing_ = LAZY_INSTANCE_INITIALIZER; } // namespace -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) namespace { base::LazyInstance>::DestructorAtExit g_desktop_capturer_for_testing = LAZY_INSTANCE_INITIALIZER; -@@ -77,7 +77,7 @@ blink::mojom::StreamDevicesSetPtr EnumerateScreens( +@@ -78,7 +78,7 @@ blink::mojom::StreamDevicesSetPtr EnumerateScreens( return stream_devices_set; } -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) blink::mojom::StreamDevicesSetPtr EnumerateScreens( blink::mojom::MediaStreamType stream_type) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); -@@ -128,7 +128,7 @@ void ChromeScreenEnumerator::SetRootWindowsForTesting( +@@ -129,7 +129,7 @@ void ChromeScreenEnumerator::SetRootWindowsForTesting( root_windows_for_testing_.Get() = std::move(root_windows); } -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ChromeScreenEnumerator::SetDesktopCapturerForTesting( std::unique_ptr capturer) { g_desktop_capturer_for_testing.Get() = std::move(capturer); -@@ -144,7 +144,7 @@ void ChromeScreenEnumerator::EnumerateScreens( - DCHECK(base::FeatureList::IsEnabled( - features::kGetDisplayMediaSetAutoSelectAllScreens)); +@@ -143,7 +143,7 @@ void ChromeScreenEnumerator::EnumerateScreens( + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + DCHECK(base::FeatureList::IsEnabled(blink::features::kGetAllScreensMedia)); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) content::GetUIThreadTaskRunner({})->PostTaskAndReplyWithResult( FROM_HERE, base::BindOnce(::EnumerateScreens, stream_type), base::BindOnce( diff --git a/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc index c63090263589..547bd04114df 100644 --- a/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc +++ b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc @@ -1,11 +1,11 @@ ---- chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2023-03-13 07:33:08 UTC +--- chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/media/webrtc/webrtc_event_log_uploader.cc -@@ -41,7 +41,7 @@ const char kProduct[] = "Chrome"; +@@ -42,7 +42,7 @@ const char kProduct[] = "Chrome"; const char kProduct[] = "Chrome_Mac"; #elif BUILDFLAG(IS_CHROMEOS_ASH) const char kProduct[] = "Chrome_ChromeOS"; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) const char kProduct[] = "Chrome_Linux"; #elif BUILDFLAG(IS_ANDROID) const char kProduct[] = "Chrome_Android"; diff --git a/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc index a1c5a7ef3233..379fe00221fd 100644 --- a/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc +++ b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc @@ -1,13 +1,13 @@ ---- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/media/webrtc/webrtc_log_uploader.cc -@@ -363,6 +363,10 @@ void WebRtcLogUploader::SetupMultipart( +@@ -372,6 +372,10 @@ void WebRtcLogUploader::SetupMultipart( const char product[] = "Chrome_ChromeOS"; #elif BUILDFLAG(IS_FUCHSIA) const char product[] = "Chrome_Fuchsia"; +#elif defined(OS_OPENBSD) + const char product[] = "Chrome_OpenBSD"; +#elif defined(OS_FREEBSD) + const char product[] = "Chrome_FreeBSD"; #else #error Platform not supported. #endif diff --git a/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc index 03ca3609fe1a..fba01b2bc6fb 100644 --- a/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc +++ b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc @@ -1,33 +1,33 @@ ---- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2023-03-13 07:33:08 UTC +--- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/media/webrtc/webrtc_logging_controller.cc -@@ -23,10 +23,10 @@ - #include "content/public/browser/browser_context.h" +@@ -25,10 +25,10 @@ + #include "components/webrtc_logging/browser/text_log_list.h" #include "content/public/browser/render_process_host.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/public/browser/child_process_security_policy.h" #include "storage/browser/file_system/isolated_context.h" -#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) using webrtc_event_logging::WebRtcEventLogManager; -@@ -277,7 +277,7 @@ void WebRtcLoggingController::StartEventLogging( +@@ -284,7 +284,7 @@ void WebRtcLoggingController::StartEventLogging( web_app_id, callback); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void WebRtcLoggingController::GetLogsDirectory( LogsDirectoryCallback callback, LogsDirectoryErrorCallback error_callback) { -@@ -322,7 +322,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess +@@ -329,7 +329,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess FROM_HERE, base::BindOnce(std::move(callback), file_system.id(), registered_name)); } -#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void WebRtcLoggingController::OnRtpPacket( std::unique_ptr packet_header, diff --git a/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h index 70285dc5e31f..2227982ab37c 100644 --- a/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h +++ b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h @@ -1,20 +1,20 @@ ---- chrome/browser/media/webrtc/webrtc_logging_controller.h.orig 2022-12-01 10:35:46 UTC +--- chrome/browser/media/webrtc/webrtc_logging_controller.h.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/media/webrtc/webrtc_logging_controller.h -@@ -133,7 +133,7 @@ class WebRtcLoggingController +@@ -134,7 +134,7 @@ class WebRtcLoggingController size_t web_app_id, const StartEventLoggingCallback& callback); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Ensures that the WebRTC Logs directory exists and then grants render // process access to the 'WebRTC Logs' directory, and invokes |callback| with // the ids necessary to create a DirectoryEntry object. -@@ -192,7 +192,7 @@ class WebRtcLoggingController - bool success, - const std::string& error_message); +@@ -199,7 +199,7 @@ class WebRtcLoggingController + + content::BrowserContext* GetBrowserContext() const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Grants the render process access to the 'WebRTC Logs' directory, and // invokes |callback| with the ids necessary to create a DirectoryEntry // object. If the |logs_path| couldn't be created or found, |error_callback| diff --git a/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc b/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc index c1e82df0bb74..851b83485bfe 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,41 +1,55 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -61,8 +61,10 @@ +@@ -67,8 +67,10 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) +#if !BUILDFLAG(IS_BSD) #include +#endif #include "base/linux_util.h" #include "base/strings/string_split.h" -@@ -92,7 +94,7 @@ - #include "chromeos/crosapi/cpp/crosapi_constants.h" - #endif // BUILDFLAG(IS_CHROMEOS_LACROS) +@@ -102,7 +104,7 @@ + #include "chromeos/startup/startup_switches.h" + #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/pressure/pressure_metrics_reporter.h" #endif // BUILDFLAG(IS_LINUX) -@@ -495,7 +497,7 @@ void RecordStartupMetrics() { +@@ -111,7 +113,7 @@ + #include "components/user_manager/user_manager.h" + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "components/power_metrics/system_power_monitor.h" + #endif + +@@ -533,7 +535,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, -@@ -685,7 +687,7 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt +@@ -742,11 +744,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt } #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) pressure_metrics_reporter_ = std::make_unique(); #endif // BUILDFLAG(IS_LINUX) - } + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::trace_event::TraceLog::GetInstance()->AddEnabledStateObserver( + power_metrics::SystemPowerMonitor::GetInstance()); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h b/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h index 281ad0ca404c..5f989fad5d27 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h +++ b/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h @@ -1,20 +1,20 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h -@@ -22,7 +22,7 @@ class PowerMetricsReporter; +@@ -32,7 +32,7 @@ class PowerMetricsReporter; class ProcessMonitor; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class PressureMetricsReporter; #endif // BUILDFLAG(IS_LINUX) -@@ -88,7 +88,7 @@ class ChromeBrowserMainExtraPartsMetrics : public Chro +@@ -133,7 +133,7 @@ class ChromeBrowserMainExtraPartsMetrics : public Chro std::unique_ptr battery_discharge_reporter_; #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Reports pressure metrics. std::unique_ptr pressure_metrics_reporter_; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc b/www/iridium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc index 9c74e273240c..064f41541f98 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,65 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -176,7 +176,7 @@ +@@ -183,7 +183,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 -@@ -738,7 +738,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -209,7 +209,7 @@ + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + #include "chrome/browser/metrics/family_link_user_metrics_provider.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS_LACROS))||BUILDFLAG(IS_ANDROID)) +@@ -795,7 +795,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 -@@ -819,7 +819,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -877,7 +877,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()); -@@ -919,7 +919,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -886,7 +886,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic + + #if BUILDFLAG(ENABLE_SUPERVISED_USERS) && \ + (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_LACROS)) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) + if (base::FeatureList::IsEnabled( + kExtendFamilyLinkUserLogSegmentToAllPlatforms)) { + metrics_service_->RegisterMetricsProvider( +@@ -1002,7 +1002,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) -@@ -1103,7 +1103,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1201,7 +1201,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_net_system__network__context__manager.cc b/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.cc index 327e6890b388..43f06e5d9679 100644 --- a/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.cc +++ b/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.cc @@ -1,65 +1,65 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/net/system_network_context_manager.cc @@ -93,7 +93,7 @@ // 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/common/chrome_paths_internal.h" #include "chrome/grit/chromium_strings.h" #include "ui/base/l10n/l10n_util.h" @@ -178,7 +178,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut auth_dynamic_params->basic_over_http_enabled = local_state->GetBoolean(prefs::kBasicAuthOverHttpEnabled); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) auth_dynamic_params->delegate_by_kdc_policy = local_state->GetBoolean(prefs::kAuthNegotiateDelegateByKdcPolicy); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -456,7 +456,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -445,7 +445,7 @@ SystemNetworkContextManager::SystemNetworkContextManag pref_change_registrar_.Add(prefs::kAllHttpAuthSchemesAllowedForOrigins, auth_pref_callback); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) pref_change_registrar_.Add(prefs::kAuthNegotiateDelegateByKdcPolicy, auth_pref_callback); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -489,7 +489,7 @@ SystemNetworkContextManager::SystemNetworkContextManag - base::Unretained(this))); +@@ -492,7 +492,7 @@ SystemNetworkContextManager::SystemNetworkContextManag + #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) pref_change_registrar_.Add( prefs::kEnforceLocalAnchorConstraintsEnabled, base::BindRepeating(&SystemNetworkContextManager:: -@@ -539,7 +539,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -541,7 +541,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterBooleanPref(prefs::kKerberosEnabled, false); #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kAuthNegotiateDelegateByKdcPolicy, false); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -568,7 +568,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -570,7 +570,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterBooleanPref(prefs::kChromeRootStoreEnabled, false); #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Note that the default value is not relevant because the pref is only // evaluated when it is managed. registry->RegisterBooleanPref(prefs::kEnforceLocalAnchorConstraintsEnabled, -@@ -944,7 +944,7 @@ void SystemNetworkContextManager::UpdateExplicitlyAllo - } +@@ -992,7 +992,7 @@ void SystemNetworkContextManager::UpdateChromeRootStor + #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) void SystemNetworkContextManager::UpdateEnforceLocalAnchorConstraintsEnabled() { const PrefService::Preference* enforce_local_anchor_constraints_enabled_pref = local_state_->FindPreference( diff --git a/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.h b/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.h index 22ba644ca500..a81a0dbcb340 100644 --- a/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.h +++ b/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.h @@ -1,11 +1,11 @@ ---- chrome/browser/net/system_network_context_manager.h.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/net/system_network_context_manager.h.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/net/system_network_context_manager.h -@@ -194,7 +194,7 @@ class SystemNetworkContextManager { - void UpdateExplicitlyAllowedNetworkPorts(); +@@ -207,7 +207,7 @@ class SystemNetworkContextManager { + #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Applies the current value of the kEnforceLocalAnchorConstraintsEnabled // pref to the enforcement state. void UpdateEnforceLocalAnchorConstraintsEnabled(); diff --git a/www/iridium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc b/www/iridium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc index c6dad08cbb34..15c899ffe98f 100644 --- a/www/iridium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc +++ b/www/iridium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc @@ -1,11 +1,11 @@ ---- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig 2023-03-13 07:33:08 UTC +--- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/password_manager/password_reuse_manager_factory.cc -@@ -101,7 +101,7 @@ KeyedService* PasswordReuseManagerFactory::BuildServic +@@ -106,7 +106,7 @@ KeyedService* PasswordReuseManagerFactory::BuildServic // 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_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) std::unique_ptr notifier = std::make_unique( IdentityManagerFactory::GetForProfile(profile)); 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 fb6e655fbb3c..41545b96de55 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,204 +1,189 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -202,17 +202,17 @@ +@@ -210,12 +210,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 "chrome/browser/enterprise/idle/action.h" - #include "components/device_signals/core/browser/pref_names.h" + #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - #include "chrome/browser/web_applications/policy/web_app_settings_policy_handler.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) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) #include "chrome/browser/privacy_sandbox/privacy_sandbox_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -755,14 +755,14 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -780,14 +780,14 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kManagedDefaultGeolocationSetting, base::Value::Type::INTEGER }, #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { key::kRequireOnlineRevocationChecksForLocalAnchors, prefs::kCertRevocationCheckingRequiredLocalAnchors, base::Value::Type::BOOLEAN }, #endif // #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) // || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kFullscreenAllowed, prefs::kFullscreenAllowed, base::Value::Type::BOOLEAN }, -@@ -1399,7 +1399,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - +@@ -1444,7 +1444,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + base::Value::Type::INTEGER }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGSSAPILibraryName, prefs::kGSSAPILibraryName, base::Value::Type::STRING }, -@@ -1469,18 +1469,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1514,18 +1514,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 }, -@@ -1493,7 +1493,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1538,7 +1538,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 }, -@@ -1597,7 +1597,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1642,7 +1642,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { key::kAlternativeBrowserPath, browser_switcher::prefs::kAlternativeBrowserPath, base::Value::Type::STRING }, -@@ -1684,13 +1684,13 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1738,13 +1738,13 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGetDisplayMediaSetSelectAllScreensAllowedForUrls, prefs::kManagedGetDisplayMediaSetSelectAllScreensAllowedForUrls, base::Value::Type::LIST }, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -#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 }, -@@ -1721,7 +1721,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1775,7 +1775,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) { key::kEnforceLocalAnchorConstraintsEnabled, prefs::kEnforceLocalAnchorConstraintsEnabled, base::Value::Type::BOOLEAN }, -@@ -1750,7 +1750,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 }, -@@ -1810,7 +1810,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1857,7 +1857,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = ash::prefs::kUrlParameterToAutofillSAMLUsername, base::Value::Type::STRING }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) - { key::kHighEfficiencyModeEnabled, - performance_manager::user_tuning::prefs::kHighEfficiencyModeEnabled, - base::Value::Type::BOOLEAN }, -@@ -1855,7 +1855,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - policy::policy_prefs::kForceEnablePepperVideoDecoderDevAPI, - base::Value::Type::BOOLEAN }, - #endif // BUILDFLAG(ENABLE_PPAPI) + { key::kBatterySaverModeAvailability, + performance_manager::user_tuning::prefs::kBatterySaverModeState, + base::Value::Type::INTEGER }, +@@ -1888,7 +1888,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + prefs::kCloudApAuthEnabled, + base::Value::Type::INTEGER }, + #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kOutOfProcessSystemDnsResolutionEnabled, prefs::kOutOfProcessSystemDnsResolutionEnabled, base::Value::Type::BOOLEAN }, -@@ -2119,7 +2119,7 @@ std::unique_ptr BuildH +@@ -1978,7 +1978,7 @@ std::unique_ptr BuildH + // Policies for all platforms - End + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + handlers->AddHandler( + std::make_unique()); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || +@@ -2177,7 +2177,7 @@ std::unique_ptr BuildH #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique()); handlers->AddHandler( -@@ -2177,7 +2177,7 @@ std::unique_ptr BuildH +@@ -2234,7 +2234,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) -@@ -2212,7 +2212,7 @@ std::unique_ptr BuildH + handlers->AddHandler( +@@ -2275,7 +2275,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)); -@@ -2559,7 +2559,7 @@ std::unique_ptr BuildH - extensions::pref_names::kManifestV2Availability, /*min=*/0, /*max=*/3, - /*clamp=*/false)); - #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) || -@@ -2572,7 +2572,7 @@ std::unique_ptr BuildH +@@ -2633,7 +2633,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( -@@ -2580,7 +2580,7 @@ std::unique_ptr BuildH +@@ -2641,7 +2641,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)); -@@ -2593,7 +2593,7 @@ std::unique_ptr BuildH +@@ -2654,7 +2654,7 @@ std::unique_ptr BuildH handlers->AddHandler( std::make_unique( chrome_schema)); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || diff --git a/www/iridium/files/patch-chrome_browser_policy_device__management__service__configuration.cc b/www/iridium/files/patch-chrome_browser_policy_device__management__service__configuration.cc index caaa54f0cde0..6a5b761ed10c 100644 --- a/www/iridium/files/patch-chrome_browser_policy_device__management__service__configuration.cc +++ b/www/iridium/files/patch-chrome_browser_policy_device__management__service__configuration.cc @@ -1,20 +1,20 @@ ---- chrome/browser/policy/device_management_service_configuration.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/policy/device_management_service_configuration.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/policy/device_management_service_configuration.cc -@@ -21,7 +21,7 @@ +@@ -22,7 +22,7 @@ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ - !BUILDFLAG(IS_ANDROID)) + !BUILDFLAG(IS_ANDROID)) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/common.h" #include "chrome/browser/enterprise/connectors/connectors_service.h" #endif @@ -100,7 +100,7 @@ DeviceManagementServiceConfiguration::GetReportingConn content::BrowserContext* context) const { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ - !BUILDFLAG(IS_ANDROID)) + !BUILDFLAG(IS_ANDROID)) || BUILDFLAG(IS_BSD) auto* service = enterprise_connectors::ConnectorsServiceFactory::GetForBrowserContext( context); diff --git a/www/iridium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc b/www/iridium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc new file mode 100644 index 000000000000..1cccf5e75d9a --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc @@ -0,0 +1,20 @@ +--- chrome/browser/policy/policy_value_and_status_aggregator.cc.orig 2023-07-24 14:27:53 UTC ++++ chrome/browser/policy/policy_value_and_status_aggregator.cc +@@ -52,7 +52,7 @@ + #include "chrome/browser/policy/value_provider/extension_policies_value_provider.h" + #endif // BUILDFLAG(ENABLE_EXTENSIONS) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "components/policy/core/common/cloud/profile_cloud_policy_manager.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + +@@ -98,7 +98,7 @@ std::unique_ptr GetUserP + #else // BUILDFLAG(IS_CHROMEOS_ASH) + policy::CloudPolicyManager* cloud_policy_manager = + profile->GetUserCloudPolicyManager(); +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (!cloud_policy_manager) { + cloud_policy_manager = profile->GetProfileCloudPolicyManager(); + } diff --git a/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc b/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc index b60c85ef04de..9a70ea192d3c 100644 --- a/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc +++ b/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -1,86 +1,87 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -458,13 +458,13 @@ - #include "components/os_crypt/os_crypt.h" +@@ -464,13 +464,13 @@ #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 "components/device_signals/core/browser/pref_names.h" + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // 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 -@@ -497,7 +497,7 @@ +@@ -503,7 +503,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 -@@ -790,7 +790,7 @@ const char kPluginsPluginsList[] = "plugins.plugins_li +@@ -708,7 +708,7 @@ const char kPluginsPluginsList[] = "plugins.plugins_li const char kPluginsShowDetails[] = "plugins.show_details"; // Deprecated 02/2023. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kWebAppsUrlHandlerInfo[] = "web_apps.url_handler_info"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -872,7 +872,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistryS +@@ -902,7 +902,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistryS #endif // BUILDFLAG(IS_CHROMEOS_ASH) // Deprecated 02/2023. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterDictionaryPref(kWebAppsUrlHandlerInfo); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - } -@@ -985,7 +985,7 @@ void RegisterProfilePrefsForMigration( + +@@ -1027,7 +1027,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 -@@ -1623,11 +1623,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync - safe_browsing::PostCleanupSettingsResetter::RegisterProfilePrefs(registry); +@@ -1762,12 +1762,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync #endif --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_ASH) ++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) device_signals::RegisterProfilePrefs(registry); - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); #endif -@@ -1824,7 +1824,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local +@@ -1920,7 +1920,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local #endif // BUILDFLAG(IS_CHROMEOS_ASH) // Added 02/2023 -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) local_state->ClearPref(kWebAppsUrlHandlerInfo); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -1969,7 +1969,7 @@ void MigrateObsoleteProfilePrefs(Profile* profile) { +@@ -2060,7 +2060,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_prefs_pref__service__incognito__allowlist.cc b/www/iridium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc index 80824a9232e7..2f199ed51029 100644 --- a/www/iridium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc +++ b/www/iridium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc @@ -1,11 +1,11 @@ ---- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/prefs/pref_service_incognito_allowlist.cc -@@ -167,7 +167,7 @@ const char* const kPersistentPrefNames[] = { +@@ -165,7 +165,7 @@ const char* const kPersistentPrefNames[] = { + prefs::kShowFullscreenToolbar, + #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) +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Toggleing custom frames affects all open windows in the profile, hence // should be written to the regular profile when changed in incognito mode. prefs::kUseCustomChromeFrame, diff --git a/www/iridium/files/patch-chrome_browser_printing_print__backend__service__manager.cc b/www/iridium/files/patch-chrome_browser_printing_print__backend__service__manager.cc index b431233e13c2..e25bfd887ee8 100644 --- a/www/iridium/files/patch-chrome_browser_printing_print__backend__service__manager.cc +++ b/www/iridium/files/patch-chrome_browser_printing_print__backend__service__manager.cc @@ -1,29 +1,29 @@ ---- chrome/browser/printing/print_backend_service_manager.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/printing/print_backend_service_manager.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/printing/print_backend_service_manager.cc -@@ -547,7 +547,7 @@ PrintBackendServiceManager::RegisterClient( +@@ -687,7 +687,7 @@ PrintBackendServiceManager::RegisterClient( query_clients_.insert(client_id); break; case ClientType::kQueryWithUi: -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) if (!query_with_ui_clients_.empty()) return absl::nullopt; #endif -@@ -813,7 +813,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate +@@ -960,7 +960,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate break; case ClientType::kQueryWithUi: -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No need to update if there were other query with UI clients. if (query_with_ui_clients_.size() > 1) return absl::nullopt; -@@ -870,7 +870,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate +@@ -1017,7 +1017,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate return kNoClientsRegisteredResetOnIdleTimeout; case ClientType::kQueryWithUi: -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No need to update if there were other query with UI clients. if (HasQueryWithUiClientForRemoteId(remote_id)) { return absl::nullopt; diff --git a/www/iridium/files/patch-chrome_browser_printing_printer__query.cc b/www/iridium/files/patch-chrome_browser_printing_printer__query.cc index 84a6a39dcd19..b703bc115477 100644 --- a/www/iridium/files/patch-chrome_browser_printing_printer__query.cc +++ b/www/iridium/files/patch-chrome_browser_printing_printer__query.cc @@ -1,11 +1,11 @@ ---- chrome/browser/printing/printer_query.cc.orig 2023-03-13 07:33:08 UTC +--- chrome/browser/printing/printer_query.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/printing/printer_query.cc -@@ -284,7 +284,7 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Di +@@ -341,7 +341,7 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Di crash_key = std::make_unique( print_backend->GetPrinterDriverInfo(printer_name)); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) +#if (BUILDFLAG(IS_BSD) || BUILDFLAG(IS_LINUX)) && BUILDFLAG(USE_CUPS) PrinterBasicInfo basic_info; if (print_backend->GetPrinterBasicInfo(printer_name, &basic_info) == mojom::ResultCode::kSuccess) { diff --git a/www/iridium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc b/www/iridium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc index 4d9106b640df..295a6884f726 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,62 +1,78 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -338,17 +338,17 @@ +@@ -364,18 +364,18 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.h" #include "chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.h" + #include "chrome/browser/enterprise/signals/user_permission_service_factory.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/idle_service_factory.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_switcher/browser_switcher_service_factory.h" + #include "chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_factory.h" #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" - #endif -@@ -495,7 +495,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -545,7 +545,7 @@ void ChromeBrowserMainExtraPartsProfiles:: BreadcrumbManagerKeyedServiceFactory::GetInstance(); } browser_sync::UserEventServiceFactory::GetInstance(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherServiceFactory::GetInstance(); #endif BrowsingDataHistoryObserverService::Factory::GetInstance(); -@@ -557,12 +557,12 @@ void ChromeBrowserMainExtraPartsProfiles:: - DomainDiversityReporterFactory::GetInstance(); - dom_distiller::DomDistillerServiceFactory::GetInstance(); - DownloadCoreServiceFactory::GetInstance(); +@@ -616,17 +616,17 @@ void ChromeBrowserMainExtraPartsProfiles:: + #if !BUILDFLAG(IS_ANDROID) + DriveServiceFactory::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_signals::SignalsAggregatorFactory::GetInstance(); #endif enterprise::ProfileIdServiceFactory::GetInstance(); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) + enterprise_signals::UserPermissionServiceFactory::GetInstance(); enterprise_connectors::DeviceTrustServiceFactory::GetInstance(); enterprise_connectors::DeviceTrustConnectorServiceFactory::GetInstance(); #endif -@@ -660,12 +660,12 @@ void ChromeBrowserMainExtraPartsProfiles:: +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + enterprise_connectors::LocalBinaryUploadServiceFactory::GetInstance(); + #endif + #if BUILDFLAG(ENABLE_SESSION_SERVICE) +@@ -732,12 +732,12 @@ 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) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) enterprise_idle::IdleServiceFactory::GetInstance(); #endif ModelTypeStoreServiceFactory::GetInstance(); +@@ -805,7 +805,7 @@ void ChromeBrowserMainExtraPartsProfiles:: + PredictionServiceFactory::GetInstance(); + + PrimaryAccountPolicyManagerFactory::GetInstance(); +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + ProfileTokenWebSigninInterceptorFactory::GetInstance(); + policy::ProfileTokenPolicyWebSigninServiceFactory::GetInstance(); + #endif 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 23caabeaf3e8..7f392943316a 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,40 @@ ---- chrome/browser/profiles/profile_impl.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -261,6 +261,10 @@ +@@ -262,6 +262,10 @@ #include "chrome/browser/spellchecker/spellcheck_service.h" #endif -+#if BUILDFLAG(IS_OPENBSD) -+#include "sandbox/policy/openbsd/sandbox_openbsd.h" ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" +#endif + using bookmarks::BookmarkModel; using content::BrowserThread; using content::DownloadManagerDelegate; -@@ -868,7 +872,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -606,7 +610,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async + #else + { + #endif // BUILDFLAG(IS_CHROMEOS_LACROS) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + ProfileManager* profile_manager = g_browser_process->profile_manager(); + ProfileAttributesEntry* entry = + profile_manager->GetProfileAttributesStorage() +@@ -881,7 +885,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) } base::FilePath ProfileImpl::last_selected_directory() { +#if BUILDFLAG(IS_OPENBSD) + // If unveil(2) is used, force the file dialog directory to something we + // know is available. + auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); + if (sandbox->unveil_initialized()) + return GetPrefs()->GetFilePath(prefs::kDownloadDefaultDirectory); + else + return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); +#else return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); +#endif } void ProfileImpl::set_last_selected_directory(const base::FilePath& path) { diff --git a/www/iridium/files/patch-chrome_browser_profiles_profiles__state.cc b/www/iridium/files/patch-chrome_browser_profiles_profiles__state.cc index fc540d87a49f..ab4ea49e183a 100644 --- a/www/iridium/files/patch-chrome_browser_profiles_profiles__state.cc +++ b/www/iridium/files/patch-chrome_browser_profiles_profiles__state.cc @@ -1,11 +1,11 @@ ---- chrome/browser/profiles/profiles_state.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/profiles/profiles_state.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/profiles/profiles_state.cc -@@ -181,7 +181,7 @@ bool IsGuestModeRequested(const base::CommandLine& com +@@ -182,7 +182,7 @@ bool IsGuestModeRequested(const base::CommandLine& com PrefService* local_state, bool show_warning) { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) DCHECK(local_state); // Check if guest mode enforcement commandline switch or policy are provided. diff --git a/www/iridium/files/patch-chrome_browser_renderer__preferences__util.cc b/www/iridium/files/patch-chrome_browser_renderer__preferences__util.cc index d847d20cb54d..7326de80e063 100644 --- a/www/iridium/files/patch-chrome_browser_renderer__preferences__util.cc +++ b/www/iridium/files/patch-chrome_browser_renderer__preferences__util.cc @@ -1,29 +1,29 @@ ---- chrome/browser/renderer_preferences_util.cc.orig 2023-04-22 17:45:15 UTC +--- chrome/browser/renderer_preferences_util.cc.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/renderer_preferences_util.cc @@ -36,7 +36,7 @@ #include "ui/views/controls/textfield/textfield.h" #endif -#if defined(USE_AURA) && BUILDFLAG(IS_LINUX) +#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" #include "ui/linux/linux_ui.h" -@@ -155,7 +155,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc +@@ -149,7 +149,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc prefs->caret_blink_interval = views::Textfield::GetCaretBlinkInterval(); #endif -#if defined(USE_AURA) && BUILDFLAG(IS_LINUX) +#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile); if (linux_ui_theme) { if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) { -@@ -178,7 +178,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc +@@ -172,7 +172,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) content::UpdateFontRendererPreferencesFromSystemSettings(prefs); #endif diff --git a/www/iridium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html b/www/iridium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html index 3785575ae317..a8c78e1a0afb 100644 --- a/www/iridium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html +++ b/www/iridium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html @@ -1,29 +1,29 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2023-03-13 07:33:08 UTC +--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2023-07-24 14:27:53 UTC +++ chrome/browser/resources/settings/appearance_page/appearance_page.html -@@ -28,7 +28,7 @@ +@@ -27,7 +27,7 @@ + - + - +