diff --git a/www/iridium/Makefile b/www/iridium/Makefile index 92501c7988de..d6f9c04396b6 100644 --- a/www/iridium/Makefile +++ b/www/iridium/Makefile @@ -1,319 +1,324 @@ PORTNAME= iridium -PORTVERSION= 2022.10.106.1 +PORTVERSION= 2022.11.107 CATEGORIES= www wayland MASTER_SITES= https://downloads.iridiumbrowser.de/source/ PKGNAMESUFFIX= -browser DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION} MAINTAINER= chromium@FreeBSD.org COMMENT= Iridium browser WWW= https://iridiumbrowser.de/ LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi ONLY_FOR_ARCHS= aarch64 amd64 i386 PATCH_SITES= https://nerd.hu/distfiles/ PATCHFILES+= disable-privacy-sandbox.patch:-p1 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/dri.pc:graphics/mesa-dri \ + ${LOCALBASE}/libdata/pkgconfig/Qt5Core.pc:devel/qt5-core \ + ${LOCALBASE}/libdata/pkgconfig/Qt5Widgets.pc:x11-toolkits/qt5-widgets LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libevent.so:devel/libevent \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic USES= bison compiler:c++17-lang cpe desktop-file-utils gl gnome iconv jpeg \ - localbase:ldflags ninja perl5 pkgconfig python:3.7+,build shebangfix \ + localbase:ldflags ninja perl5 pkgconfig python:3.7+,build qt:5 shebangfix \ tar:xz xorg CPE_VENDOR= google CPE_PRODUCT= chrome USE_GL= gbm gl USE_GNOME= atk dconf gdkpixbuf2 glib20 gtk30 libxml2 libxslt USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xorgproto xrandr xrender xscrnsaver xtst +USE_QT= buildtools:build SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format MAKE_ARGS= -C out/${BUILDTYPE} ALL_TARGET= chrome -BINARY_ALIAS= python3=${PYTHON_CMD} +BINARY_ALIAS= python3=${PYTHON_CMD} \ + moc=${PREFIX}/bin/moc-qt5 # TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) # # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= clang_use_chrome_plugins=false \ chrome_pgo_phase=0 \ enable_hangout_services_extension=true \ enable_js_type_check=false \ enable_nacl=false \ enable_remoting=false \ fatal_linker_warnings=false \ icu_use_data_file=false \ is_clang=true \ optimize_webui=true \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator="none" \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=false \ use_gnome_keyring=false \ use_lld=true \ use_sysroot=false \ use_system_freetype=false \ use_system_harfbuzz=true \ use_system_libjpeg=true \ use_system_libwayland=true \ use_system_wayland_scanner=true \ + use_system_libwayland_server=true \ use_udev=false \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" # TODO: investigate building with these options: # use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles SUB_FILES= iridium-browser.desktop iridium SUB_LIST+= COMMENT="${COMMENT}" OPTIONS_DEFINE= CODECS CUPS DEBUG KERBEROS LTO OPTIONS_DEFAULT= CODECS CUPS KERBEROS SNDIO OPTIONS_EXCLUDE_aarch64=LTO OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO OPTIONS_RADIO= KERBEROS OPTIONS_RADIO_KERBEROS= HEIMDAL HEIMDAL_BASE MIT OPTIONS_SUB= yes CODECS_DESC= Compile and enable patented codecs like H.264 HEIMDAL_BASE_DESC= Heimdal Kerberos (base) HEIMDAL_DESC= Heimdal Kerberos (security/heimdal) MIT_DESC= MIT Kerberos (security/krb5) ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ alsa-lib>=1.1.1_1:audio/alsa-lib ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CODECS_VARS= GN_ARGS+=ffmpeg_branding="Chrome" \ GN_ARGS+=proprietary_codecs=true CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \ GN_ARGS+=proprietary_codecs=false CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_VARS= BUILDTYPE=Debug \ GN_ARGS+=is_debug=true \ GN_ARGS+=is_component_build=false \ GN_ARGS+=symbol_level=1 \ GN_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="21 GB" DEBUG_VARS_OFF= BUILDTYPE=Release \ GN_ARGS+=blink_symbol_level=0 \ GN_ARGS+=is_debug=false \ GN_ARGS+=is_official_build=true \ GN_ARGS+=symbol_level=0 \ WANTSPACE="14 GB" HEIMDAL_LIB_DEPENDS= libkrb.so.26:security/heimdal KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false LTO_VARS= GN_ARGS+=use_thin_lto=true \ GN_ARGS+=thin_lto_enable_optimizations=true \ WANTSPACE="14 GB" LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false MIT_LIB_DEPENDS= libkrb.so.3:security/krb5 PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false # With SNDIO=on we exclude audio_manager_linux from the build (see # media/audio/BUILD.gn) and use audio_manager_openbsd which does not # support falling back to ALSA or PulseAudio. SNDIO_PREVENTS= ALSA PULSEAUDIO SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false .include .include .if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base .endif .if ${COMPILER_VERSION} != 130 LLVM_DEFAULT= 13 BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} BINARY_ALIAS+= cpp=${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} \ cc=${LOCALBASE}/bin/clang${LLVM_DEFAULT} \ c++=${LOCALBASE}/bin/clang++${LLVM_DEFAULT} \ ar=${LOCALBASE}/bin/llvm-ar${LLVM_DEFAULT} \ nm=${LOCALBASE}/bin/llvm-nm${LLVM_DEFAULT} \ ld=${LOCALBASE}/bin/ld.lld${LLVM_DEFAULT} .else BINARY_ALIAS+= ar=/usr/bin/llvm-ar \ nm=/usr/bin/llvm-nm .endif # swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " .else PLIST_SUB+= NOT_AARCH64="" .endif # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "To build Iridium, you should have around 2GB of memory" @${ECHO_MSG} "and around ${WANTSPACE} of free disk space." @${ECHO_MSG} pre-configure: # We used to remove bundled libraries to be sure that chromium uses # system libraries and not shipped ones. # cd ${WRKSRC} && ${PYTHON_CMD} \ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ ./build/linux/unbundle/replace_gn_files.py --system-libraries \ flac fontconfig freetype harfbuzz-ng icu libdrm libevent libpng \ libusb libwebp libxml libxslt openh264 opus snappy || ${FALSE} # Iridium uses an unreleased version of FFmpeg, so configure it .for brand in Chrome Chromium ${CP} -R \ ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/linux/ \ ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/freebsd .endfor do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin/node # Setup buildtools/freebsd @${MKDIR} ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKSRC}/buildtools/freebsd ${LN} -sf /usr/bin/strip ${WRKSRC}/buildtools/freebsd/strip do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ ${STAGEDIR}${MANPREFIX}/man/man1/iridium.1 @${SED} -i "" -e 's,\@\@PACKAGE\@\@,chromium,g;s,\@\@MENUNAME\@\@,Iridium Web Browser,g' \ ${STAGEDIR}${MANPREFIX}/man/man1/iridium.1 ${CP} ${WRKSRC}/chrome/app/theme/chromium/product_logo_22_mono.png ${WRKSRC}/chrome/app/theme/chromium/product_logo_22.png .for s in 22 24 48 64 128 256 @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps ${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${s}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/iridium.png .endfor ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.png ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.pak ${STAGEDIR}${DATADIR} .for d in protoc mksnapshot ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor .for d in snapshot_blob.bin v8_context_snapshot.bin ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chrome \ ${STAGEDIR}${DATADIR}/iridium cd ${WRKSRC}/out/${BUILDTYPE} && \ ${COPYTREE_SHARE} "locales resources" ${STAGEDIR}${DATADIR} @${MKDIR} ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKDIR}/iridium-browser.desktop \ ${STAGEDIR}${DESKTOPDIR} ${INSTALL_SCRIPT} ${WRKDIR}/iridium ${STAGEDIR}${PREFIX}/bin # ANGLE, EGL, Vk .for f in libEGL.so libGLESv2.so libVkICD_mock_icd.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvulkan.so.1 \ ${STAGEDIR}${DATADIR}/libvulkan.so .if ${BUILDTYPE} == Debug ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libVkLayer_khronos_validation.so ${STAGEDIR}${DATADIR} .endif # SwiftShader .if ${ARCH} != aarch64 @${MKDIR} ${STAGEDIR}${DATADIR}/swiftshader ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvk_swiftshader.so ${STAGEDIR}${DATADIR} .endif post-install-DEBUG-on: ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/*.so \ ${STAGEDIR}${DATADIR} ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/character_data_generator \ ${STAGEDIR}${DATADIR} .include diff --git a/www/iridium/distinfo b/www/iridium/distinfo index 86cfcca15e52..38deeadbb2b2 100644 --- a/www/iridium/distinfo +++ b/www/iridium/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1667814684 -SHA256 (iridium-browser-2022.10.106.1.tar.xz) = 6f8b9706f58e05d9e08a56701ca3618a2489a76fcd1b03ab5a45f5e844e47c36 -SIZE (iridium-browser-2022.10.106.1.tar.xz) = 1333421304 +TIMESTAMP = 1669891478 +SHA256 (iridium-browser-2022.11.107.tar.xz) = 7795b28672850fd4218138d6d9242fe246160065a474b26448733af08975e6ff +SIZE (iridium-browser-2022.11.107.tar.xz) = 1409151040 SHA256 (disable-privacy-sandbox.patch) = 9797e71f4a6700d9a675ec90c9b03487532de68af568fd010eec3fc0cd97c4de SIZE (disable-privacy-sandbox.patch) = 4772 diff --git a/www/iridium/files/patch-BUILD.gn b/www/iridium/files/patch-BUILD.gn index 41a0ab1bfd11..6e7fb90c2fc5 100644 --- a/www/iridium/files/patch-BUILD.gn +++ b/www/iridium/files/patch-BUILD.gn @@ -1,80 +1,89 @@ ---- BUILD.gn.orig 2022-10-05 07:34:01 UTC +--- BUILD.gn.orig 2022-12-01 10:35:46 UTC +++ BUILD.gn -@@ -53,7 +53,7 @@ declare_args() { +@@ -59,7 +59,7 @@ declare_args() { root_extra_deps = [] } -if (is_official_build) { +if (is_official_build && !is_bsd) { # An official (maximally optimized!) component (optimized for build times) # build doesn't make sense and usually doesn't work. assert(!is_component_build) -@@ -83,7 +83,6 @@ group("gn_all") { +@@ -89,7 +89,6 @@ group("gn_all") { "//codelabs", "//components:components_unittests", "//components/gwp_asan:gwp_asan_unittests", - "//infra/orchestrator:orchestrator_all", "//net:net_unittests", "//sandbox:sandbox_unittests", "//services:services_unittests", -@@ -441,7 +440,7 @@ group("gn_all") { +@@ -447,7 +446,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", -@@ -642,6 +641,15 @@ group("gn_all") { +@@ -648,6 +647,15 @@ group("gn_all") { deps += [ "//gpu/tools/compositor_model_bench" ] } + if (is_bsd) { + deps -= [ + "//third_party/breakpad:dump_syms($host_toolchain)", + "//third_party/breakpad:microdump_stackwalk($host_toolchain)", + "//third_party/breakpad:minidump_dump($host_toolchain)", + "//third_party/breakpad:minidump_stackwalk($host_toolchain)", + ] + } + if (is_mac) { deps += [ "//third_party/breakpad:crash_inspector", -@@ -690,7 +698,7 @@ group("gn_all") { +@@ -696,7 +704,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)" ] } -@@ -1202,7 +1210,7 @@ if (!is_ios) { +@@ -1123,7 +1131,7 @@ if (!is_ios) { + ] + } + +- if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) { ++ if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) { + # WPT Webdriver tests runner + # chrome/test/chromedriver/test/run_webdriver_tests.py + script_test("webdriver_wpt_tests") { +@@ -1218,7 +1226,7 @@ if (!is_ios) { 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)" ] } -@@ -1211,7 +1219,7 @@ if (!is_ios) { +@@ -1227,7 +1235,7 @@ if (!is_ios) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } - if (is_linux || is_chromeos) { + if ((is_linux && !is_bsd) || is_chromeos) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1654,7 +1662,7 @@ group("chromium_builder_perf") { +@@ -1668,7 +1676,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 663486914e6d..2496639afee7 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-04-01 07:48:30 UTC +--- ash/display/mirror_window_controller.cc.orig 2022-12-01 10:35:46 UTC +++ ash/display/mirror_window_controller.cc -@@ -296,7 +296,11 @@ void MirrorWindowController::UpdateWindow( - return info.id() == iter->first; - }) == display_info_list.end()) { +@@ -295,7 +295,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 ae3b1f61ce44..17173f34fa30 100644 --- a/www/iridium/files/patch-base_BUILD.gn +++ b/www/iridium/files/patch-base_BUILD.gn @@ -1,164 +1,166 @@ ---- base/BUILD.gn.orig 2022-10-05 07:34:01 UTC +--- base/BUILD.gn.orig 2022-12-01 10:35:46 UTC +++ base/BUILD.gn @@ -162,7 +162,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" -@@ -1031,7 +1031,7 @@ mixed_component("base") { +@@ -1035,7 +1035,7 @@ mixed_component("base") { "timer/hi_res_timer_manager_posix.cc", ] - if (!is_nacl && !is_apple) { + if (!is_nacl && !is_apple && !is_bsd) { sources += [ - "profiler/stack_copier_signal.cc", - "profiler/stack_copier_signal.h", -@@ -1040,6 +1040,12 @@ mixed_component("base") { + "profiler/stack_base_address_posix.cc", + "profiler/stack_base_address_posix.h", +@@ -1046,6 +1046,14 @@ mixed_component("base") { "profiler/thread_delegate_posix.h", ] } + + if (is_bsd) { + sources += [ ++ "profiler/stack_base_address_posix.cc", ++ "profiler/stack_base_address_posix.h", + "profiler/stack_sampler_posix.cc", + ] + } } if (is_win) { -@@ -1541,11 +1547,23 @@ mixed_component("base") { +@@ -1557,11 +1565,23 @@ mixed_component("base") { # Needed for if using newer C++ library than sysroot, except if # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. - if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && + if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos && !is_bsd)) && host_toolchain != "//build/toolchain/cros:host") { libs += [ "atomic" ] } + # *BSD needs libkvm + if (is_bsd) { + libs += [ "kvm" ] + } + + if (is_freebsd) { + libs += [ + "execinfo", + "util", + ] + } + if (use_allocator_shim) { sources += [ - "allocator/allocator_shim.cc", -@@ -1573,7 +1591,7 @@ mixed_component("base") { + "allocator/partition_allocator/shim/allocator_shim.cc", +@@ -1589,7 +1609,7 @@ mixed_component("base") { ] configs += [ "//base/allocator:mac_no_default_new_delete_symbols" ] } - if (is_chromeos || is_linux) { + if (is_chromeos || (is_linux && !is_bsd)) { sources += [ - "allocator/allocator_shim_override_cpp_symbols.h", - "allocator/allocator_shim_override_glibc_weak_symbols.h", -@@ -1629,7 +1647,7 @@ mixed_component("base") { + "allocator/partition_allocator/shim/allocator_shim_override_cpp_symbols.h", + "allocator/partition_allocator/shim/allocator_shim_override_glibc_weak_symbols.h", +@@ -1643,7 +1663,7 @@ mixed_component("base") { # 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" ] } -@@ -2211,6 +2229,42 @@ mixed_component("base") { +@@ -2216,6 +2236,42 @@ mixed_component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/file_util_linux.cc", + "files/scoped_file_linux.cc", + "process/memory_linux.cc", + "process/process_linux.cc", + "system/sys_info_linux.cc", + "process/process_iterator_linux.cc", + "process/process_metrics_linux.cc", + "process/process_handle_linux.cc" + ] + sources += [ + "process/memory_stubs.cc", + "files/file_path_watcher_kqueue.cc", + "files/file_path_watcher_kqueue.h", + "files/file_path_watcher_bsd.cc", + ] + } + + if (is_openbsd) { + sources += [ + "process/process_handle_openbsd.cc", + "process/process_iterator_openbsd.cc", + "process/process_metrics_openbsd.cc", + "system/sys_info_openbsd.cc", + ] + } else if (is_freebsd) { + sources += [ + "process/process_handle_freebsd.cc", + "process/process_iterator_freebsd.cc", + "process/process_metrics_freebsd.cc", + "system/sys_info_freebsd.cc", + ] + } + # iOS if (is_ios) { sources -= [ -@@ -2310,7 +2364,7 @@ mixed_component("base") { +@@ -2313,7 +2369,7 @@ mixed_component("base") { } if (dep_libevent) { - deps += [ "//third_party/libevent" ] + public_deps += [ "//third_party/libevent" ] } if (use_libevent) { -@@ -3545,7 +3599,7 @@ test("base_unittests") { +@@ -3565,7 +3621,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", -@@ -3593,7 +3647,7 @@ test("base_unittests") { +@@ -3613,7 +3669,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", - "profiler/thread_delegate_posix_unittest.cc", -@@ -3603,7 +3657,7 @@ test("base_unittests") { +@@ -3624,7 +3680,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" ] } -@@ -3791,7 +3845,7 @@ test("base_unittests") { +@@ -3812,7 +3868,7 @@ test("base_unittests") { } } - if (is_fuchsia || is_linux || is_chromeos) { + if ((is_fuchsia || is_linux || is_chromeos) && !is_bsd) { sources += [ "debug/elf_reader_unittest.cc", "debug/test_elf_image_builder.cc", diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_partition__address__space.cc b/www/iridium/files/patch-base_allocator_partition__allocator_partition__address__space.cc index 7a16a6f85476..bdbfdd035891 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_partition__address__space.cc +++ b/www/iridium/files/patch-base_allocator_partition__allocator_partition__address__space.cc @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/partition_address_space.cc.orig 2022-10-05 07:34:01 UTC +--- base/allocator/partition_allocator/partition_address_space.cc.orig 2022-12-01 10:35:46 UTC +++ base/allocator/partition_allocator/partition_address_space.cc -@@ -238,7 +238,7 @@ void PartitionAddressSpace::UninitConfigurablePoolForT +@@ -261,7 +261,7 @@ void PartitionAddressSpace::UninitConfigurablePoolForT setup_.configurable_pool_ = 0; } -#if BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) PageCharacteristics page_characteristics; diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.cc b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.cc deleted file mode 100644 index 5ffea8d69797..000000000000 --- a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc.cc +++ /dev/null @@ -1,17 +0,0 @@ ---- base/allocator/partition_allocator/partition_alloc.cc.orig 2022-10-05 07:34:01 UTC -+++ base/allocator/partition_allocator/partition_alloc.cc -@@ -63,8 +63,14 @@ void PartitionAllocGlobalInit(OomFunction on_out_of_me - "maximum direct mapped allocation"); - - // Check that some of our zanier calculations worked out as expected. -+#if defined(__i386__) && defined(OS_FREEBSD) -+ // alignof(std::max_align_t) is only 4 on FreeBSD/i386 -+ static_assert(internal::kSmallestBucket >= internal::kAlignment, -+ "generic smallest bucket"); -+#else - static_assert(internal::kSmallestBucket == internal::kAlignment, - "generic smallest bucket"); -+#endif - static_assert(internal::kMaxBucketed == 917504, "generic max bucketed"); - STATIC_ASSERT_OR_PA_CHECK( - internal::MaxSystemPagesPerRegularSlotSpan() <= 16, 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 00bceb14ac93..560917f3801b 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 2022-10-05 07:34:01 UTC +--- base/allocator/partition_allocator/partition_alloc_config.h.orig 2022-12-01 10:35:46 UTC +++ base/allocator/partition_allocator/partition_alloc_config.h @@ -76,7 +76,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). -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #define PA_HAS_LINUX_KERNEL #endif -@@ -195,7 +195,7 @@ constexpr bool kUseLazyCommit = false; +@@ -197,7 +197,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. -#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #define PA_HAS_ATFORK_HANDLER #endif -@@ -235,7 +235,7 @@ constexpr bool kUseLazyCommit = false; +@@ -238,7 +238,7 @@ constexpr bool kUseLazyCommit = false; // // Also enabled on ARM64 macOS, as the 16kiB pages on this platform lead to // larger slot spans. -#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) +#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD) #define PA_PREFER_SMALLER_SLOT_SPANS #endif // BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) 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 847dbd39091e..460caf0032f1 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2022-10-05 07:34:01 UTC +--- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2022-12-01 10:35:46 UTC +++ base/allocator/partition_allocator/partition_alloc_constants.h @@ -91,7 +91,7 @@ PartitionPageShift() { return 18; // 256 KiB } #elif (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ - (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t PartitionPageShift() { return PageAllocationGranularityShift() + 2; -@@ -270,7 +270,7 @@ constexpr size_t kNumPools = 3; +@@ -272,7 +272,7 @@ constexpr size_t kNumPools = 3; // Special-case Android and iOS, which incur test failures with larger // GigaCage. Regardless, allocating >8GiB with malloc() on these platforms is // unrealistic as of 2022. -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) constexpr size_t kPoolMaxSize = 8 * kGiB; #else constexpr size_t kPoolMaxSize = 16 * kGiB; diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__forward.h b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__forward.h new file mode 100644 index 000000000000..d2bd4a2be37a --- /dev/null +++ b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__forward.h @@ -0,0 +1,16 @@ +--- base/allocator/partition_allocator/partition_alloc_forward.h.orig 2022-12-01 10:35:46 UTC ++++ base/allocator/partition_allocator/partition_alloc_forward.h +@@ -25,9 +25,13 @@ namespace internal { + // the second one 16. We could technically return something different for + // malloc() and operator new(), but this would complicate things, and most of + // our allocations are presumably coming from operator new() anyway. ++#if defined(__i386__) && defined(OS_FREEBSD) ++constexpr size_t kAlignment = 8; ++#else + constexpr size_t kAlignment = + std::max(alignof(max_align_t), + static_cast(__STDCPP_DEFAULT_NEW_ALIGNMENT__)); ++#endif + static_assert(kAlignment <= 16, + "PartitionAlloc doesn't support a fundamental alignment larger " + "than 16 bytes."); 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 3b248067a37d..78ebbf6ab9d1 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,29 +1,11 @@ ---- base/allocator/partition_allocator/partition_page.h.orig 2022-10-05 07:34:01 UTC +--- base/allocator/partition_allocator/partition_page.h.orig 2022-12-01 10:35:46 UTC +++ base/allocator/partition_allocator/partition_page.h -@@ -131,13 +131,14 @@ struct SlotSpanMetadata { - PartitionBucket* const bucket = nullptr; - - // CHECK()ed in AllocNewSlotSpan(). --#if defined(PA_HAS_64_BITS_POINTERS) && BUILDFLAG(IS_APPLE) -+#if (defined(PA_HAS_64_BITS_POINTERS) && BUILDFLAG(IS_APPLE)) || \ -+ (BUILDFLAG(IS_FREEBSD) && defined(__i386__)) - // System page size is not a constant on Apple OSes, but is either 4 or 16kiB - // (1 << 12 or 1 << 14), as checked in PartitionRoot::Init(). And +@@ -144,7 +144,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). -@@ -151,7 +152,9 @@ struct SlotSpanMetadata { - #endif // defined(PA_HAS_64_BITS_POINTERS) && BUILDFLAG(IS_APPLE) - // The maximum number of bits needed to cover all currently supported OSes. - static constexpr size_t kMaxSlotsPerSlotSpanBits = 13; -+#if !BUILDFLAG(IS_FREEBSD) && defined(__i386__) - static_assert(kMaxSlotsPerSlotSpan < (1 << kMaxSlotsPerSlotSpanBits), ""); -+#endif - - // |marked_full| isn't equivalent to being full. Slot span is marked as full - // iff it isn't on the active slot span list (or any other list). 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 836a01cee4d1..3efecadd5033 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 2022-10-30 12:20:09 UTC +--- base/allocator/partition_allocator/partition_root.cc.orig 2022-12-01 10:35:46 UTC +++ base/allocator/partition_allocator/partition_root.cc -@@ -33,7 +33,7 @@ +@@ -41,7 +41,7 @@ #include "wow64apiset.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #endif -@@ -230,7 +230,7 @@ void PartitionAllocMallocInitOnce() { +@@ -238,7 +238,7 @@ void PartitionAllocMallocInitOnce() { if (!g_global_init_called.compare_exchange_strong(expected, true)) 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. -@@ -321,7 +321,7 @@ static size_t PartitionPurgeSlotSpan( +@@ -331,7 +331,7 @@ static size_t PartitionPurgeSlotSpan( constexpr size_t kMaxSlotCount = (PartitionPageSize() * kMaxPartitionPagesPerRegularSlotSpan) / - MaxPurgeableSlotSize(); + 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 -@@ -709,7 +709,7 @@ void PartitionRoot::Init(PartitionOptions +@@ -734,7 +734,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_base__paths__posix.cc b/www/iridium/files/patch-base_base__paths__posix.cc index afa431009616..685f852f9b76 100644 --- a/www/iridium/files/patch-base_base__paths__posix.cc +++ b/www/iridium/files/patch-base_base__paths__posix.cc @@ -1,98 +1,98 @@ ---- base/base_paths_posix.cc.orig 2022-10-05 07:34:01 UTC +--- base/base_paths_posix.cc.orig 2022-12-01 10:35:46 UTC +++ base/base_paths_posix.cc @@ -15,6 +15,7 @@ #include #include +#include "base/command_line.h" #include "base/environment.h" #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -25,9 +26,13 @@ #include "base/process/process_metrics.h" #include "build/build_config.h" -#if BUILDFLAG(IS_FREEBSD) +#if BUILDFLAG(IS_BSD) #include #include +#if BUILDFLAG(IS_OPENBSD) +#include +#define MAXTOKENS 2 +#endif #elif BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_AIX) #include #endif @@ -68,13 +73,65 @@ bool PathProviderPosix(int key, FilePath* result) { *result = FilePath(bin_dir); return true; #elif BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_AIX) - // There is currently no way to get the executable path on OpenBSD - char* cpath; - if ((cpath = getenv("CHROME_EXE_PATH")) != NULL) - *result = FilePath(cpath); - else - *result = FilePath("/usr/local/chrome/chrome"); - return true; + char *cpath; +#if !BUILDFLAG(IS_AIX) + struct kinfo_file *files; + kvm_t *kd = NULL; + char errbuf[_POSIX2_LINE_MAX]; + static char retval[PATH_MAX]; + int cnt; + struct stat sb; + pid_t cpid = getpid(); + bool ret = false; + + const base::CommandLine* command_line = + base::CommandLine::ForCurrentProcess(); + + VLOG(1) << "PathProviderPosix argv: " << command_line->argv()[0]; + + if (realpath(command_line->argv()[0].c_str(), retval) == NULL) + goto out; + + if (stat(command_line->argv()[0].c_str(), &sb) < 0) + goto out; + + if (!command_line->HasSwitch("no-sandbox")) { + ret = true; + *result = FilePath(retval); + VLOG(1) << "PathProviderPosix (sandbox) result: " << retval; + goto out; + } + + if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL) + goto out; + + if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, cpid, + sizeof(struct kinfo_file), &cnt)) == NULL) + goto out; + + for (int i = 0; i < cnt; i++) { + if (files[i].fd_fd == KERN_FILE_TEXT && + files[i].va_fsid == static_cast(sb.st_dev) && + files[i].va_fileid == sb.st_ino) { + ret = true; + *result = FilePath(retval); + VLOG(1) << "PathProviderPosix result: " << retval; + } + } +out: + if (kd) + kvm_close(kd); + if (!ret) { +#endif -+ if ((cpath = getenv("CHROME_EXE_PATH")) != NULL) ++ if ((cpath = getenv("IRIDIUM_EXE_PATH")) != NULL) + *result = FilePath(cpath); + else -+ *result = FilePath("/usr/local/chrome/chrome"); ++ *result = FilePath("/usr/local/iridium/iridium"); + return true; +#if !BUILDFLAG(IS_AIX) + } + return ret; +#endif #endif } case DIR_SRC_TEST_DATA_ROOT: { diff --git a/www/iridium/files/patch-base_debug_stack__trace__posix.cc b/www/iridium/files/patch-base_debug_stack__trace__posix.cc index a4b5269bca67..683bd2b2ae1f 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 2022-10-05 07:34:01 UTC +--- base/debug/stack_trace_posix.cc.orig 2022-12-01 10:35:46 UTC +++ base/debug/stack_trace_posix.cc @@ -39,7 +39,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 -@@ -698,6 +698,9 @@ class SandboxSymbolizeHelper { +@@ -699,6 +699,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)) { -@@ -715,6 +718,7 @@ class SandboxSymbolizeHelper { +@@ -716,6 +719,7 @@ class SandboxSymbolizeHelper { is_initialized_ = true; return true; +#endif } // Opens all object files and caches their file descriptors. -@@ -871,7 +875,7 @@ size_t CollectStackTrace(void** trace, size_t count) { +@@ -872,7 +876,7 @@ size_t CollectStackTrace(void** trace, size_t count) { // If we do not have unwind tables, then try tracing using frame pointers. return base::debug::TraceStackFramePointers(const_cast(trace), count, 0); -#elif !defined(__UCLIBC__) && !defined(_AIX) +#elif !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD) // Though the backtrace API man page does not list any possible negative // return values, we take no chance. return base::saturated_cast( diff --git a/www/iridium/files/patch-base_files_file__path__watcher__bsd.cc b/www/iridium/files/patch-base_files_file__path__watcher__bsd.cc index cc36b8b6dcf2..70f8d2563573 100644 --- a/www/iridium/files/patch-base_files_file__path__watcher__bsd.cc +++ b/www/iridium/files/patch-base_files_file__path__watcher__bsd.cc @@ -1,57 +1,57 @@ ---- base/files/file_path_watcher_bsd.cc.orig 2022-03-28 18:11:04 UTC +--- base/files/file_path_watcher_bsd.cc.orig 2022-12-01 10:35:46 UTC +++ base/files/file_path_watcher_bsd.cc @@ -0,0 +1,54 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include + +#include "base/files/file_path_watcher.h" +#include "base/files/file_path_watcher_kqueue.h" +#include "base/memory/ptr_util.h" +#include "build/build_config.h" + +namespace base { + +namespace { + +class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate { + public: + FilePathWatcherImpl() = default; + FilePathWatcherImpl(const FilePathWatcherImpl&) = delete; + FilePathWatcherImpl& operator=(const FilePathWatcherImpl&) = delete; + ~FilePathWatcherImpl() override = default; + + bool Watch(const FilePath& path, + Type type, + const FilePathWatcher::Callback& callback) override { + DCHECK(!impl_.get()); + if (type == Type::kRecursive) { + if (!FilePathWatcher::RecursiveWatchAvailable()) + return false; + } else { + impl_ = std::make_unique(); + } + DCHECK(impl_.get()); + return impl_->Watch(path, type, callback); + } + + void Cancel() override { + if (impl_.get()) + impl_->Cancel(); + set_cancelled(); + } + + private: + std::unique_ptr impl_; +}; + +} // namespace + +FilePathWatcher::FilePathWatcher() { -+ sequence_checker_.DetachFromSequence(); ++ DETACH_FROM_SEQUENCE(sequence_checker_); + impl_ = std::make_unique(); +} + +} // namespace base 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 68bd0ae78688..88a9844ce448 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 2022-10-05 07:34:01 UTC +--- base/files/file_util_unittest.cc.orig 2022-12-01 10:35:46 UTC +++ base/files/file_util_unittest.cc -@@ -3522,7 +3522,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { +@@ -3549,7 +3549,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"; -@@ -4245,7 +4245,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles +@@ -4272,7 +4272,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_i18n_icu__util.cc b/www/iridium/files/patch-base_i18n_icu__util.cc index e3900550db39..ca38b330732a 100644 --- a/www/iridium/files/patch-base_i18n_icu__util.cc +++ b/www/iridium/files/patch-base_i18n_icu__util.cc @@ -1,20 +1,20 @@ ---- base/i18n/icu_util.cc.orig 2022-10-05 07:34:01 UTC +--- base/i18n/icu_util.cc.orig 2022-12-01 10:35:46 UTC +++ base/i18n/icu_util.cc @@ -53,7 +53,7 @@ #include "third_party/icu/source/common/unicode/unistr.h" #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) #include "third_party/icu/source/i18n/unicode/timezone.h" #endif -@@ -325,7 +325,7 @@ void InitializeIcuTimeZone() { +@@ -344,7 +344,7 @@ void InitializeIcuTimeZone() { FuchsiaIntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization(); icu::TimeZone::adoptDefault( icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id))); -#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) +#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD) // To respond to the time zone change properly, the default time zone // cache in ICU has to be populated on starting up. // See TimeZoneMonitorLinux::NotifyClientsFromImpl(). diff --git a/www/iridium/files/patch-base_native__library__unittest.cc b/www/iridium/files/patch-base_native__library__unittest.cc index 8738d64c2045..055b7b4f439e 100644 --- a/www/iridium/files/patch-base_native__library__unittest.cc +++ b/www/iridium/files/patch-base_native__library__unittest.cc @@ -1,11 +1,11 @@ ---- base/native_library_unittest.cc.orig 2022-03-28 18:11:04 UTC +--- base/native_library_unittest.cc.orig 2022-12-01 10:35:46 UTC +++ base/native_library_unittest.cc -@@ -119,7 +119,7 @@ TEST(NativeLibraryTest, LoadLibrary) { +@@ -134,7 +134,7 @@ TEST(NativeLibraryTest, LoadLibrary) { // versions with respect to symbol resolution scope. // TSan and MSan error out on RTLD_DEEPBIND, https://crbug.com/705255 #if !BUILDFLAG(IS_ANDROID) && !defined(THREAD_SANITIZER) && \ - !defined(MEMORY_SANITIZER) + !defined(MEMORY_SANITIZER) && !BUILDFLAG(IS_BSD) // Verifies that the |prefer_own_symbols| option satisfies its guarantee that // a loaded library will always prefer local symbol resolution before diff --git a/www/iridium/files/patch-base_process_memory.cc b/www/iridium/files/patch-base_process_memory.cc index db25f3dd4dc4..10a5e5425971 100644 --- a/www/iridium/files/patch-base_process_memory.cc +++ b/www/iridium/files/patch-base_process_memory.cc @@ -1,11 +1,11 @@ ---- base/process/memory.cc.orig 2022-10-05 07:34:01 UTC +--- base/process/memory.cc.orig 2022-12-01 10:35:46 UTC +++ base/process/memory.cc -@@ -29,7 +29,7 @@ namespace base { +@@ -28,7 +28,7 @@ namespace base { // Defined in memory_mac.mm for macOS + use_allocator="none". In case of // USE_PARTITION_ALLOC_AS_MALLOC, no need to route the call to the system // default calloc of macOS. -#if !BUILDFLAG(IS_APPLE) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) +#if (!BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) bool UncheckedCalloc(size_t num_items, size_t size, void** result) { const size_t alloc_size = num_items * size; diff --git a/www/iridium/files/patch-base_process_process__metrics.cc b/www/iridium/files/patch-base_process_process__metrics.cc index 2398f6259a1d..6a119d9b8e96 100644 --- a/www/iridium/files/patch-base_process_process__metrics.cc +++ b/www/iridium/files/patch-base_process_process__metrics.cc @@ -1,47 +1,54 @@ ---- base/process/process_metrics.cc.orig 2022-10-05 07:34:01 UTC +--- base/process/process_metrics.cc.orig 2022-12-01 10:35:46 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 SystemMetrics::ToValue() const { Value res(Value::Type::DICTIONARY); res.SetIntKey("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 meminfo = memory_info_.ToValue(); Value vmstat = vmstat_info_.ToValue(); meminfo.MergeDictionary(&vmstat); -@@ -99,7 +99,7 @@ std::unique_ptr ProcessMetrics::Create +@@ -99,7 +99,6 @@ std::unique_ptr ProcessMetrics::Create #endif // !BUILDFLAG(IS_MAC) } -#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) -+#if !BUILDFLAG(IS_FREEBSD) - double ProcessMetrics::GetPlatformIndependentCPUUsage() { - TimeDelta cumulative_cpu = GetCumulativeCPUUsage(); + double ProcessMetrics::GetPlatformIndependentCPUUsage( + TimeDelta cumulative_cpu) { TimeTicks time = TimeTicks::Now(); -@@ -150,7 +150,7 @@ double ProcessMetrics::GetPreciseCPUUsage() { +@@ -126,7 +125,6 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( + double ProcessMetrics::GetPlatformIndependentCPUUsage() { + return GetPlatformIndependentCPUUsage(GetCumulativeCPUUsage()); + } +-#endif + + #if BUILDFLAG(IS_WIN) + double ProcessMetrics::GetPreciseCPUUsage(TimeDelta cumulative_cpu) { +@@ -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 27bdfe62aaa4..e94ede6b9ee6 100644 --- a/www/iridium/files/patch-base_process_process__metrics.h +++ b/www/iridium/files/patch-base_process_process__metrics.h @@ -1,129 +1,129 @@ ---- base/process/process_metrics.h.orig 2022-10-05 07:34:01 UTC +--- base/process/process_metrics.h.orig 2022-12-01 10:35:46 UTC +++ base/process/process_metrics.h @@ -36,7 +36,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) #include #include #include @@ -52,7 +52,7 @@ class Value; // Full declaration is in process_metrics_iocounters.h. struct IoCounters; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Minor and major page fault counts since the process creation. // Both counts are process-wide, and exclude child processes. // @@ -107,7 +107,7 @@ class BASE_EXPORT ProcessMetrics { // convenience wrapper for CreateProcessMetrics(). static std::unique_ptr CreateCurrentProcessMetrics(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Resident Set Size is a Linux/Android specific memory concept. Do not // attempt to extend this to other platforms. BASE_EXPORT size_t GetResidentSetSize() const; -@@ -155,7 +155,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -165,7 +165,7 @@ class BASE_EXPORT ProcessMetrics { #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Emits the cumulative CPU usage for all currently active threads since they // were started into the output parameter (replacing its current contents). // Threads that have already terminated will not be reported. Thus, the sum of -@@ -238,7 +238,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -248,7 +248,7 @@ class BASE_EXPORT ProcessMetrics { int GetOpenFdSoftLimit() const; #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Bytes of swap as reported by /proc/[pid]/status. uint64_t GetVmSwapBytes() const; -@@ -259,7 +259,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -269,7 +269,7 @@ class BASE_EXPORT ProcessMetrics { #endif // !BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups); #endif #if BUILDFLAG(IS_APPLE) -@@ -270,7 +270,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -280,7 +280,7 @@ class BASE_EXPORT ProcessMetrics { #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) CPU::CoreType GetCoreType(uint32_t core_index); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) -@@ -284,9 +284,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -294,9 +294,7 @@ class BASE_EXPORT ProcessMetrics { // Used to store the previous times and CPU usage counts so we can // compute the CPU usage between calls. TimeTicks last_cpu_time_; -#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) TimeDelta last_cumulative_cpu_; -#endif #if BUILDFLAG(IS_WIN) TimeTicks last_cpu_time_for_precise_cpu_usage_; -@@ -294,7 +292,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -304,7 +302,7 @@ class BASE_EXPORT ProcessMetrics { #endif #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Same thing for idle wakeups. TimeTicks last_idle_wakeups_time_; uint64_t last_absolute_idle_wakeups_; -@@ -337,7 +335,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de +@@ -347,7 +345,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Data about system-wide memory consumption. Values are in KB. Available on // Windows, Mac, Linux, Android and Chrome OS. // -@@ -372,7 +370,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -382,7 +380,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // This provides an estimate of available memory as described here: // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773 // NOTE: this is ONLY valid in kernels 3.14 and up. Its value will always -@@ -387,7 +385,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -397,7 +395,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { #endif #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) int buffers = 0; int cached = 0; int active_anon = 0; -@@ -424,7 +422,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK +@@ -434,7 +432,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK // BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Parse the data found in /proc//stat and return the sum of the // CPU-related ticks. Returns -1 on parse error. // Exposed for testing. -@@ -611,7 +609,7 @@ class BASE_EXPORT SystemMetrics { +@@ -621,7 +619,7 @@ class BASE_EXPORT SystemMetrics { FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics); size_t committed_memory_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) SystemMemoryInfoKB memory_info_; VmStatInfo vmstat_info_; SystemDiskInfo disk_info_; diff --git a/www/iridium/files/patch-base_process_process__metrics__freebsd.cc b/www/iridium/files/patch-base_process_process__metrics__freebsd.cc index c0ed225bef18..cf0839c0c5a1 100644 --- a/www/iridium/files/patch-base_process_process__metrics__freebsd.cc +++ b/www/iridium/files/patch-base_process_process__metrics__freebsd.cc @@ -1,290 +1,296 @@ ---- base/process/process_metrics_freebsd.cc.orig 2022-10-05 07:34:01 UTC +--- base/process/process_metrics_freebsd.cc.orig 2022-12-01 10:35:46 UTC +++ base/process/process_metrics_freebsd.cc @@ -3,20 +3,39 @@ // found in the LICENSE file. #include "base/process/process_metrics.h" +#include "base/notreached.h" #include +#include #include #include #include +#include /* O_RDONLY */ +#include +#include + #include "base/memory/ptr_util.h" #include "base/process/process_metrics_iocounters.h" +#include "base/values.h" namespace base { +namespace { +int GetPageShift() { + int pagesize = getpagesize(); + int pageshift = 0; + while (pagesize > 1) { + pageshift++; + pagesize >>= 1; + } + + return pageshift; +} +} + ProcessMetrics::ProcessMetrics(ProcessHandle process) - : process_(process), - last_cpu_(0) {} + : process_(process) {} // static std::unique_ptr ProcessMetrics::CreateProcessMetrics( -@@ -26,17 +45,18 @@ std::unique_ptr ProcessMetrics::Create +@@ -24,22 +43,19 @@ std::unique_ptr ProcessMetrics::Create + return WrapUnique(new ProcessMetrics(process)); + } - double ProcessMetrics::GetPlatformIndependentCPUUsage() { +-double ProcessMetrics::GetPlatformIndependentCPUUsage() { ++TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { struct kinfo_proc info; - int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, process_}; - size_t length = sizeof(info); + size_t length = sizeof(struct kinfo_proc); ++ struct timeval tv; + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_ }; + if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) - return 0; -+ return 0.0; ++ return TimeDelta(); - return (info.ki_pctcpu / FSCALE) * 100.0; -+ return static_cast((info.ki_pctcpu * 100.0) / FSCALE); ++ return Microseconds(info.ki_runtime); } - TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { +-TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { - NOTREACHED(); -+ NOTIMPLEMENTED(); - return TimeDelta(); +- return TimeDelta(); +-} +- + bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const { + return false; } - -@@ -67,4 +87,221 @@ size_t GetSystemCommitCharge() { +@@ -67,4 +83,221 @@ size_t GetSystemCommitCharge() { return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); } +int64_t GetNumberOfThreads(ProcessHandle process) { + // Taken from FreeBSD top (usr.bin/top/machine.c) + + kvm_t* kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "kvm_open"); + if (kd == NULL) + return 0; + + struct kinfo_proc* pbase; + int nproc; + pbase = kvm_getprocs(kd, KERN_PROC_PID, process, &nproc); + if (pbase == NULL) + return 0; + + if (kvm_close(kd) == -1) + return 0; + + return nproc; +} + +bool GetSystemMemoryInfo(SystemMemoryInfoKB *meminfo) { + unsigned int mem_total, mem_free, swap_total, swap_used; + size_t length; + int pagesizeKB; + + pagesizeKB = getpagesize() / 1024; + + length = sizeof(mem_total); + if (sysctlbyname("vm.stats.vm.v_page_count", &mem_total, + &length, NULL, 0) != 0 || length != sizeof(mem_total)) + return false; + + length = sizeof(mem_free); + if (sysctlbyname("vm.stats.vm.v_free_count", &mem_free, &length, NULL, 0) + != 0 || length != sizeof(mem_free)) + return false; + + length = sizeof(swap_total); + if (sysctlbyname("vm.swap_size", &swap_total, &length, NULL, 0) + != 0 || length != sizeof(swap_total)) + return false; + + length = sizeof(swap_used); + if (sysctlbyname("vm.swap_anon_use", &swap_used, &length, NULL, 0) + != 0 || length != sizeof(swap_used)) + return false; + + meminfo->total = mem_total * pagesizeKB; + meminfo->free = mem_free * pagesizeKB; + meminfo->swap_total = swap_total * pagesizeKB; + meminfo->swap_free = (swap_total - swap_used) * pagesizeKB; + + return true; +} + +int ProcessMetrics::GetOpenFdCount() const { + struct kinfo_file * kif; + int cnt; + + if ((kif = kinfo_getfile(process_, &cnt)) == NULL) + return -1; + + free(kif); + + return cnt; +} + +int ProcessMetrics::GetOpenFdSoftLimit() const { + size_t length; + int total_count = 0; + int mib[] = { CTL_KERN, KERN_MAXFILESPERPROC }; + + length = sizeof(total_count); + + if (sysctl(mib, std::size(mib), &total_count, &length, NULL, 0) < 0) { + total_count = -1; + } + + return total_count; +} + +size_t ProcessMetrics::GetResidentSetSize() const { + kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open"); + + if (kd == nullptr) + return 0; + + struct kinfo_proc *pp; + int nproc; + + if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) { + kvm_close(kd); + return 0; + } + + size_t rss; + + if (nproc > 0) { + rss = pp->ki_rssize << GetPageShift(); + } else { + rss = 0; + } + + kvm_close(kd); + return rss; +} + +uint64_t ProcessMetrics::GetVmSwapBytes() const { + kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open"); + + if (kd == nullptr) + return 0; + + struct kinfo_proc *pp; + int nproc; + + if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) { + kvm_close(kd); + return 0; + } + + size_t swrss; + + if (nproc > 0) { + swrss = pp->ki_swrss > pp->ki_rssize + ? (pp->ki_swrss - pp->ki_rssize) << GetPageShift() + : 0; + } else { + swrss = 0; + } + + kvm_close(kd); + return swrss; +} + +int ProcessMetrics::GetIdleWakeupsPerSecond() { + NOTIMPLEMENTED(); + return 0; +} + +bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) { + NOTIMPLEMENTED(); + return false; +} + +bool GetVmStatInfo(VmStatInfo* vmstat) { + NOTIMPLEMENTED(); + return false; +} + +SystemDiskInfo::SystemDiskInfo() { + reads = 0; + reads_merged = 0; + sectors_read = 0; + read_time = 0; + writes = 0; + writes_merged = 0; + sectors_written = 0; + write_time = 0; + io = 0; + io_time = 0; + weighted_io_time = 0; +} + +SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo& other) = default; + +SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default; + +Value SystemDiskInfo::ToValue() const { + Value res(Value::Type::DICTIONARY); + + // Write out uint64_t variables as doubles. + // Note: this may discard some precision, but for JS there's no other option. + res.SetDoubleKey("reads", static_cast(reads)); + res.SetDoubleKey("reads_merged", static_cast(reads_merged)); + res.SetDoubleKey("sectors_read", static_cast(sectors_read)); + res.SetDoubleKey("read_time", static_cast(read_time)); + res.SetDoubleKey("writes", static_cast(writes)); + res.SetDoubleKey("writes_merged", static_cast(writes_merged)); + res.SetDoubleKey("sectors_written", static_cast(sectors_written)); + res.SetDoubleKey("write_time", static_cast(write_time)); + res.SetDoubleKey("io", static_cast(io)); + res.SetDoubleKey("io_time", static_cast(io_time)); + res.SetDoubleKey("weighted_io_time", static_cast(weighted_io_time)); + + return res; +} + +Value SystemMemoryInfoKB::ToValue() const { + Value res(Value::Type::DICTIONARY); + + res.SetIntKey("total", total); + res.SetIntKey("free", free); + res.SetIntKey("available", available); + res.SetIntKey("buffers", buffers); + res.SetIntKey("cached", cached); + res.SetIntKey("active_anon", active_anon); + res.SetIntKey("inactive_anon", inactive_anon); + res.SetIntKey("active_file", active_file); + res.SetIntKey("inactive_file", inactive_file); + res.SetIntKey("swap_total", swap_total); + res.SetIntKey("swap_free", swap_free); + res.SetIntKey("swap_used", swap_total - swap_free); + res.SetIntKey("dirty", dirty); + res.SetIntKey("reclaimable", reclaimable); + + return res; +} + +Value VmStatInfo::ToValue() const { + Value res(Value::Type::DICTIONARY); + + res.SetIntKey("pswpin", pswpin); + res.SetIntKey("pswpout", pswpout); + res.SetIntKey("pgmajfault", pgmajfault); + + return res; +} } // namespace base diff --git a/www/iridium/files/patch-base_profiler_sampling__profiler__thread__token.cc b/www/iridium/files/patch-base_profiler_sampling__profiler__thread__token.cc new file mode 100644 index 000000000000..cb3fb8690d86 --- /dev/null +++ b/www/iridium/files/patch-base_profiler_sampling__profiler__thread__token.cc @@ -0,0 +1,20 @@ +--- base/profiler/sampling_profiler_thread_token.cc.orig 2022-12-01 10:35:46 UTC ++++ base/profiler/sampling_profiler_thread_token.cc +@@ -6,7 +6,7 @@ + + #include "build/build_config.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include + + #include "base/profiler/stack_base_address_posix.h" +@@ -19,7 +19,7 @@ SamplingProfilerThreadToken GetSamplingProfilerCurrent + PlatformThreadId id = PlatformThread::CurrentId(); + #if BUILDFLAG(IS_ANDROID) + return {id, pthread_self()}; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + absl::optional maybe_stack_base = + GetThreadStackBaseAddress(id, pthread_self()); + // GetThreadStackBaseAddress should only return nullopt on Android, so diff --git a/www/iridium/files/patch-base_profiler_sampling__profiler__thread__token.h b/www/iridium/files/patch-base_profiler_sampling__profiler__thread__token.h new file mode 100644 index 000000000000..e27fb55decad --- /dev/null +++ b/www/iridium/files/patch-base_profiler_sampling__profiler__thread__token.h @@ -0,0 +1,20 @@ +--- base/profiler/sampling_profiler_thread_token.h.orig 2022-12-01 10:35:46 UTC ++++ base/profiler/sampling_profiler_thread_token.h +@@ -11,7 +11,7 @@ + + #if BUILDFLAG(IS_ANDROID) + #include +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include + #endif + +@@ -25,7 +25,7 @@ struct SamplingProfilerThreadToken { + PlatformThreadId id; + #if BUILDFLAG(IS_ANDROID) + pthread_t pthread_id; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Due to the sandbox, we can only retrieve the stack base address for the + // current thread. We must grab it during + // GetSamplingProfilerCurrentThreadToken() and not try to get it later. diff --git a/www/iridium/files/patch-base_profiler_stack__base__address__posix.cc b/www/iridium/files/patch-base_profiler_stack__base__address__posix.cc new file mode 100644 index 000000000000..c6502df1d258 --- /dev/null +++ b/www/iridium/files/patch-base_profiler_stack__base__address__posix.cc @@ -0,0 +1,44 @@ +--- base/profiler/stack_base_address_posix.cc.orig 2022-12-01 10:35:46 UTC ++++ base/profiler/stack_base_address_posix.cc +@@ -15,6 +15,10 @@ + #include "base/files/scoped_file.h" + #endif + ++#if BUILDFLAG(IS_BSD) ++#include ++#endif ++ + #if BUILDFLAG(IS_CHROMEOS) + extern "C" void* __libc_stack_end; + #endif +@@ -42,15 +46,30 @@ absl::optional GetAndroidMainThreadStackBas + #endif + + uintptr_t GetThreadStackBaseAddressImpl(pthread_t pthread_id) { ++#if BUILDFLAG(IS_OPENBSD) ++ stack_t ss; ++ void *address; ++ size_t size; ++ if (pthread_stackseg_np(pthread_id, &ss) != 0) ++ return 0; ++ size = ss.ss_size; ++ address = (void*)((size_t) ss.ss_sp - ss.ss_size); ++#else + pthread_attr_t attr; ++#if BUILDFLAG(IS_FREEBSD) ++ pthread_attr_init(&attr); ++ pthread_attr_get_np(pthread_id, &attr); ++#else + // This will crash on ChromeOS & Linux if we are in the sandbox and pthread_id + // refers to a different thread, due to the use of sched_getaffinity(). + pthread_getattr_np(pthread_id, &attr); + // See crbug.com/617730 for limitations of this approach on Linux. ++#endif + void* address; + size_t size; + pthread_attr_getstack(&attr, &address, &size); + pthread_attr_destroy(&attr); ++#endif + const uintptr_t base_address = reinterpret_cast(address) + size; + return base_address; + } diff --git a/www/iridium/files/patch-base_profiler_thread__delegate__posix.cc b/www/iridium/files/patch-base_profiler_thread__delegate__posix.cc new file mode 100644 index 000000000000..8433915218f7 --- /dev/null +++ b/www/iridium/files/patch-base_profiler_thread__delegate__posix.cc @@ -0,0 +1,20 @@ +--- base/profiler/thread_delegate_posix.cc.orig 2022-12-01 10:35:46 UTC ++++ base/profiler/thread_delegate_posix.cc +@@ -13,7 +13,7 @@ + #include "build/build_config.h" + #include "third_party/abseil-cpp/absl/types/optional.h" + +-#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) ++#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) + #include "base/profiler/stack_base_address_posix.h" + #endif + +@@ -22,7 +22,7 @@ namespace base { + std::unique_ptr ThreadDelegatePosix::Create( + SamplingProfilerThreadToken thread_token) { + absl::optional base_address; +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + base_address = thread_token.stack_base_address; + #else + base_address = diff --git a/www/iridium/files/patch-base_rand__util.h b/www/iridium/files/patch-base_rand__util.h index 34547895ab20..7e9392dfa146 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-10-05 07:34:01 UTC +--- base/rand_util.h.orig 2022-12-01 10:35:46 UTC +++ base/rand_util.h -@@ -80,7 +80,7 @@ void RandomShuffle(Itr first, Itr last) { +@@ -89,7 +89,7 @@ void RandomShuffle(Itr first, Itr last) { std::shuffle(first, last, RandomBitGenerator()); } -#if BUILDFLAG(IS_POSIX) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_BSD) BASE_EXPORT int GetUrandomFD(); #endif diff --git a/www/iridium/files/patch-base_rand__util__posix.cc b/www/iridium/files/patch-base_rand__util__posix.cc index 7802c8f04468..898bd98ace02 100644 --- a/www/iridium/files/patch-base_rand__util__posix.cc +++ b/www/iridium/files/patch-base_rand__util__posix.cc @@ -1,57 +1,57 @@ ---- base/rand_util_posix.cc.orig 2022-10-05 07:34:01 UTC +--- base/rand_util_posix.cc.orig 2022-12-01 10:35:46 UTC +++ base/rand_util_posix.cc @@ -22,7 +22,7 @@ #include "base/time/time.h" #include "build/build_config.h" -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) #include "third_party/lss/linux_syscall_support.h" #elif BUILDFLAG(IS_MAC) // TODO(crbug.com/995996): Waiting for this header to appear in the iOS SDK. -@@ -39,6 +39,7 @@ static constexpr int kOpenFlags = O_RDONLY; +@@ -46,6 +46,7 @@ static constexpr int kOpenFlags = O_RDONLY; static constexpr int kOpenFlags = O_RDONLY | O_CLOEXEC; #endif +#if !BUILDFLAG(IS_BSD) // We keep the file descriptor for /dev/urandom around so we don't need to // reopen it (which is expensive), and since we may not even be able to reopen // it if we are later put in a sandbox. This class wraps the file descriptor so -@@ -56,10 +57,11 @@ class URandomFd { +@@ -63,10 +64,11 @@ class URandomFd { private: const int fd_; }; +#endif #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ BUILDFLAG(IS_ANDROID)) && \ - !BUILDFLAG(IS_NACL) + !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) // TODO(pasko): Unify reading kernel version numbers in: // mojo/core/channel_linux.cc // chrome/browser/android/seccomp_support_detector.cc -@@ -144,6 +146,7 @@ void ConfigureRandBytesFieldTrial() { - // (https://chromium-review.googlesource.com/c/chromium/src/+/1545096) and land - // it or some form of it. +@@ -172,6 +174,7 @@ bool UseBoringSSLForRandBytes() { + } // namespace internal + void RandBytes(void* output, size_t output_length) { +#if !BUILDFLAG(IS_BSD) - #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID)) && \ - !BUILDFLAG(IS_NACL) -@@ -172,11 +175,16 @@ void RandBytes(void* output, size_t output_length) { + #if !BUILDFLAG(IS_NACL) + // The BoringSSL experiment takes priority over everything else. + if (internal::UseBoringSSLForRandBytes()) { +@@ -210,11 +213,16 @@ void RandBytes(void* output, size_t output_length) { const bool success = ReadFromFD(urandom_fd, static_cast(output), output_length); CHECK(success); +#else + arc4random_buf(static_cast(output), output_length); +#endif } +#if !BUILDFLAG(IS_BSD) int GetUrandomFD() { static NoDestructor urandom_fd; return urandom_fd->fd(); } +#endif } // namespace base diff --git a/www/iridium/files/patch-base_third__party_symbolize_symbolize.cc b/www/iridium/files/patch-base_third__party_symbolize_symbolize.cc deleted file mode 100644 index b50fb8ca7218..000000000000 --- a/www/iridium/files/patch-base_third__party_symbolize_symbolize.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/third_party/symbolize/symbolize.cc.orig 2022-03-28 18:11:04 UTC -+++ base/third_party/symbolize/symbolize.cc -@@ -114,7 +114,7 @@ _END_GOOGLE_NAMESPACE_ - #if defined(HAVE_DLFCN_H) - #include - #endif --#if BUILDFLAG(IS_OPENBSD) -+#if defined(__OpenBSD__) - #include - #else - #include diff --git a/www/iridium/files/patch-base_threading_platform__thread__posix.cc b/www/iridium/files/patch-base_threading_platform__thread__posix.cc index 26de09a430fb..bde1550ac046 100644 --- a/www/iridium/files/patch-base_threading_platform__thread__posix.cc +++ b/www/iridium/files/patch-base_threading_platform__thread__posix.cc @@ -1,21 +1,21 @@ ---- base/threading/platform_thread_posix.cc.orig 2022-10-05 07:34:01 UTC +--- base/threading/platform_thread_posix.cc.orig 2022-12-01 10:35:46 UTC +++ base/threading/platform_thread_posix.cc -@@ -76,7 +76,7 @@ void* ThreadFunc(void* params) { +@@ -77,7 +77,7 @@ void* ThreadFunc(void* params) { if (!thread_params->joinable) base::DisallowSingleton(); -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) - #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) + #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(STARSCAN) partition_alloc::internal::PCScan::NotifyThreadCreated( partition_alloc::internal::GetStackPointer()); -@@ -371,6 +371,9 @@ namespace internal { - void SetCurrentThreadTypeImpl(ThreadType thread_type, +@@ -374,6 +374,9 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, MessagePumpType pump_type_hint) { #if BUILDFLAG(IS_NACL) -+ NOTIMPLEMENTED(); + NOTIMPLEMENTED(); +// avoid pledge(2) violation +#elif BUILDFLAG(IS_BSD) - NOTIMPLEMENTED(); ++ NOTIMPLEMENTED(); #else if (internal::SetCurrentThreadTypeForPlatform(thread_type, pump_type_hint)) + return; diff --git a/www/iridium/files/patch-base_trace__event_malloc__dump__provider.cc b/www/iridium/files/patch-base_trace__event_malloc__dump__provider.cc index 51351ba7b885..a7c2c0d7ffaf 100644 --- a/www/iridium/files/patch-base_trace__event_malloc__dump__provider.cc +++ b/www/iridium/files/patch-base_trace__event_malloc__dump__provider.cc @@ -1,30 +1,30 @@ ---- base/trace_event/malloc_dump_provider.cc.orig 2022-10-05 07:34:01 UTC +--- base/trace_event/malloc_dump_provider.cc.orig 2022-12-01 10:35:46 UTC +++ base/trace_event/malloc_dump_provider.cc @@ -24,6 +24,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif defined(OS_BSD) +#include #else #include #endif -@@ -185,7 +187,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size, +@@ -186,7 +188,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size, #if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \ (!BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) && \ - !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA)) + !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD)) void ReportMallinfoStats(ProcessMemoryDump* pmd, size_t* total_virtual_size, size_t* resident_size, -@@ -356,6 +358,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump +@@ -357,6 +359,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump &allocated_objects_count); #elif BUILDFLAG(IS_FUCHSIA) // TODO(fuchsia): Port, see https://crbug.com/706592. +#elif defined(OS_BSD) + total_virtual_size = 0; + allocated_objects_size = 0; #else ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size, &allocated_objects_size, &allocated_objects_count); diff --git a/www/iridium/files/patch-build_config_compiler_BUILD.gn b/www/iridium/files/patch-build_config_compiler_BUILD.gn index 6b6d36614ebe..afaa15c08f14 100644 --- a/www/iridium/files/patch-build_config_compiler_BUILD.gn +++ b/www/iridium/files/patch-build_config_compiler_BUILD.gn @@ -1,185 +1,213 @@ ---- build/config/compiler/BUILD.gn.orig 2022-10-05 07:34:01 UTC +--- build/config/compiler/BUILD.gn.orig 2022-12-01 10:35:46 UTC +++ build/config/compiler/BUILD.gn @@ -222,13 +222,16 @@ config("default_include_dirs") { # Compiler instrumentation can introduce dependencies in DSOs to symbols in # the executable they are loaded into, so they are unresolved at link-time. config("no_unresolved_symbols") { - if (!using_sanitizer && + if (!using_sanitizer && !is_bsd && (is_linux || is_chromeos || is_android || is_fuchsia)) { ldflags = [ "-Wl,-z,defs", "-Wl,--as-needed", ] } + if (current_cpu == "x86" && is_openbsd) { + ldflags = [ "-Wl,-z,notext" ] + } } # compiler --------------------------------------------------------------------- @@ -274,7 +277,9 @@ config("compiler") { configs += [ # See the definitions below. + ":clang_revision", ":rustc_revision", + ":compiler_cpu_abi", ":compiler_codegen", ":compiler_deterministic", ] @@ -450,6 +455,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_gold) { -@@ -862,7 +871,7 @@ config("compiler_cpu_abi") { +@@ -879,7 +888,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" ] -@@ -878,7 +887,7 @@ config("compiler_cpu_abi") { +@@ -894,7 +903,7 @@ config("compiler_cpu_abi") { + cflags += [ "-mtune=$arm_tune" ] } } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_nacl && !is_fuchsia && -- !(is_chromeos_lacros && is_chromeos_device)) { -+ !(is_chromeos_lacros && is_chromeos_device) && !is_bsd) { +- 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" ] - } -@@ -1464,7 +1473,7 @@ config("default_warnings") { - ] - } +@@ -1233,6 +1242,27 @@ config("compiler_deterministic") { + } + } + ++config("clang_revision") { ++ if (is_clang && !is_bsd && clang_base_path == default_clang_base_path) { ++ update_args = [ ++ "--print-revision", ++ "--verify-version=$clang_version", ++ ] ++ if (llvm_force_head_revision) { ++ update_args += [ "--llvm-force-head-revision" ] ++ } ++ clang_revision = exec_script("//tools/clang/scripts/update.py", ++ update_args, ++ "trim string") ++ ++ # This is here so that all files get recompiled after a clang roll and ++ # when turning clang on or off. (defines are passed via the command line, ++ # and build system rebuild things when their commandline changes). Nothing ++ # should ever read this define. ++ defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ] ++ } ++} ++ + config("rustc_revision") { + if (enable_rust && defined(rustc_version)) { + # Similar to the above config, this is here so that all files get +@@ -1450,7 +1480,7 @@ config("default_warnings") { + "-Wno-ignored-pragma-optimize", + ] - if (!is_nacl) { + if (!is_nacl && !is_bsd) { cflags += [ # TODO(crbug.com/1343975) Evaluate and possibly enable. "-Wno-deprecated-builtins", -@@ -1623,7 +1632,7 @@ config("no_chromium_code") { +@@ -1619,7 +1649,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", -@@ -1935,8 +1944,7 @@ config("default_stack_frames") { +@@ -1931,8 +1961,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. -@@ -1974,8 +1982,7 @@ config("xoptimize") { +@@ -1977,8 +2006,7 @@ config("xoptimize") { } # Turn off optimizations. -config("no_optimize") { } -config("xno_optimize") { +config("no_optimize") { if (is_win) { cflags = [ "/Od", # Disable optimization. -@@ -2015,8 +2022,7 @@ config("xno_optimize") { +@@ -2018,8 +2046,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: -@@ -2049,8 +2055,7 @@ config("xoptimize_max") { +@@ -2052,8 +2079,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: -@@ -2076,8 +2081,7 @@ config("xoptimize_speed") { +@@ -2079,8 +2105,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 -@@ -2142,7 +2146,7 @@ config("afdo_optimize_size") { +@@ -2146,7 +2171,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. -@@ -2158,7 +2162,7 @@ config("afdo") { +@@ -2162,7 +2187,7 @@ config("afdo") { cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ] inputs = [ _clang_sample_profile ] } - } else if (auto_profile_path != "" && is_a_target_toolchain) { + } else if (auto_profile_path != "" && is_a_target_toolchain && !is_bsd) { cflags = [ "-fauto-profile=${auto_profile_path}" ] inputs = [ auto_profile_path ] } -@@ -2196,8 +2200,7 @@ config("win_pdbaltpath") { +@@ -2200,8 +2225,7 @@ config("win_pdbaltpath") { } # Full symbols. -config("symbols") { } -config("xsymbols") { +config("symbols") { if (is_win) { if (is_clang) { cflags = [ "/Z7" ] # Debug information in the .obj files. -@@ -2299,7 +2302,8 @@ config("xsymbols") { - } +@@ -2311,7 +2335,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. -@@ -2322,8 +2326,7 @@ config("xsymbols") { +@@ -2334,8 +2359,7 @@ config("xsymbols") { # Minimal symbols. # This config guarantees to hold symbol for stack trace which are shown to user # when crash happens in unittests running on buildbot. -config("minimal_symbols") { } -config("xminimal_symbols") { +config("minimal_symbols") { if (is_win) { # Functions, files, and line tables only. cflags = [] -@@ -2395,8 +2398,7 @@ config("xminimal_symbols") { +@@ -2407,8 +2431,7 @@ config("xminimal_symbols") { # This configuration contains function names only. That is, the compiler is # told to not generate debug information and the linker then just puts function # names in the final debug information. -config("no_symbols") { } -config("xno_symbols") { +config("no_symbols") { if (is_win) { ldflags = [ "/DEBUG" ] diff --git a/www/iridium/files/patch-cc_BUILD.gn b/www/iridium/files/patch-cc_BUILD.gn index 777f4d138909..95d8ceed4fda 100644 --- a/www/iridium/files/patch-cc_BUILD.gn +++ b/www/iridium/files/patch-cc_BUILD.gn @@ -1,19 +1,19 @@ ---- cc/BUILD.gn.orig 2022-04-01 07:48:30 UTC +--- cc/BUILD.gn.orig 2022-12-01 10:35:46 UTC +++ cc/BUILD.gn @@ -664,7 +664,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" ] } } -@@ -891,7 +891,6 @@ cc_test("cc_unittests") { +@@ -892,7 +892,6 @@ cc_test("cc_unittests") { data = [ "//components/viz/test/data/" ] data_deps = [ "//testing/buildbot/filters:cc_unittests_filters", - "//third_party/mesa_headers", ] if (is_android && enable_chrome_android_internal) { diff --git a/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc b/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc index 57b083bc2b25..28d27f0ac8dc 100644 --- a/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc +++ b/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc @@ -1,121 +1,121 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/app/chrome_main_delegate.cc -@@ -126,7 +126,7 @@ +@@ -128,7 +128,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 -@@ -169,16 +169,16 @@ +@@ -171,16 +171,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 -@@ -329,7 +329,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -336,7 +336,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 -@@ -415,7 +415,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -422,7 +422,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) || -@@ -506,7 +506,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -513,7 +513,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. -@@ -589,7 +589,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat +@@ -596,7 +596,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( -@@ -767,6 +767,8 @@ void ChromeMainDelegate::CommonEarlyInitialization() { +@@ -832,6 +832,8 @@ void ChromeMainDelegate::CommonEarlyInitialization() { // not always enabled on Linux/ChromeOS. #if BUILDFLAG(IS_LINUX) || 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 -@@ -826,7 +828,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { +@@ -892,7 +894,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { base::internal::TimerBase::InitializeFeatures(); base::InitializeCpuReductionExperiment(); base::sequence_manager::internal::SequenceManagerImpl::InitializeFeatures(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::MessagePumpLibevent::InitializeFeatures(); #elif BUILDFLAG(IS_MAC) base::PlatformThread::InitializeOptimizedRealtimeThreadingFeature(); -@@ -916,7 +918,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -982,7 +984,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 -@@ -946,7 +948,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1012,7 +1014,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 -@@ -1336,7 +1338,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1402,7 +1404,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)) { -@@ -1412,7 +1414,7 @@ absl::variant Chrome +@@ -1478,7 +1480,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_generated__resources.grd b/www/iridium/files/patch-chrome_app_generated__resources.grd index 413eb5ad5528..59967b08e089 100644 --- a/www/iridium/files/patch-chrome_app_generated__resources.grd +++ b/www/iridium/files/patch-chrome_app_generated__resources.grd @@ -1,74 +1,74 @@ ---- chrome/app/generated_resources.grd.orig 2022-10-05 07:34:01 UTC +--- chrome/app/generated_resources.grd.orig 2022-12-01 10:35:46 UTC +++ chrome/app/generated_resources.grd @@ -2,7 +2,7 @@ -@@ -3069,7 +3069,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -3081,7 +3081,7 @@ are declared in tools/grit/grit_rule.gni. - + Device Credentials -@@ -4802,7 +4802,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -4811,7 +4811,7 @@ are declared in tools/grit/grit_rule.gni. Read information about your browser, OS, device, installed software, registry values and files - + Read information about your browser, OS, device, installed software and files -@@ -5439,7 +5439,7 @@ Keep your key file in a safe place. You will need it t +@@ -5469,7 +5469,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. -@@ -5467,7 +5467,7 @@ Keep your key file in a safe place. You will need it t +@@ -5497,7 +5497,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. -@@ -8964,7 +8964,7 @@ Check your passwords anytime in - + Use system title bar and borders -@@ -10148,7 +10148,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -10195,7 +10195,7 @@ Please help our engineers fix this problem. Tell us wh Set as default - + Minimize -@@ -12211,7 +12211,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -12285,7 +12285,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_settings__strings.grdp b/www/iridium/files/patch-chrome_app_settings__strings.grdp index a956f79d3910..f8ba3c909ba7 100644 --- a/www/iridium/files/patch-chrome_app_settings__strings.grdp +++ b/www/iridium/files/patch-chrome_app_settings__strings.grdp @@ -1,20 +1,20 @@ ---- chrome/app/settings_strings.grdp.orig 2022-10-05 07:34:01 UTC +--- chrome/app/settings_strings.grdp.orig 2022-12-01 10:35:46 UTC +++ chrome/app/settings_strings.grdp -@@ -134,7 +134,7 @@ +@@ -137,7 +137,7 @@ Theme - + - - GTK+ + + GTK -@@ -148,7 +148,7 @@ +@@ -157,7 +157,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 ab7eb9bd7ba3..d3eedd7e5eba 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,32 +1,29 @@ ---- chrome/app/theme/chrome_unscaled_resources.grd.orig 2022-10-05 07:34:01 UTC +--- chrome/app/theme/chrome_unscaled_resources.grd.orig 2022-12-01 10:35:46 UTC +++ chrome/app/theme/chrome_unscaled_resources.grd -@@ -15,12 +15,12 @@ - - - -- -+ - - - - -- -+ - - - -@@ -53,12 +53,12 @@ - - - -- -+ - - - - -- -+ - - - +@@ -19,7 +19,7 @@ + + + +- ++ + + + +@@ -36,7 +36,7 @@ + + + +- ++ + + + +@@ -78,7 +78,7 @@ + + + +- ++ + + + diff --git a/www/iridium/files/patch-chrome_app_theme_theme__resources.grd b/www/iridium/files/patch-chrome_app_theme_theme__resources.grd index d19441f84c1b..6b17ac5d3d4a 100644 --- a/www/iridium/files/patch-chrome_app_theme_theme__resources.grd +++ b/www/iridium/files/patch-chrome_app_theme_theme__resources.grd @@ -1,34 +1,47 @@ ---- chrome/app/theme/theme_resources.grd.orig 2022-10-05 07:34:01 UTC +--- chrome/app/theme/theme_resources.grd.orig 2022-12-01 10:35:46 UTC +++ chrome/app/theme/theme_resources.grd -@@ -130,11 +130,11 @@ - - - -- -+ - - - -- -+ - - - -@@ -142,7 +142,7 @@ - +@@ -131,7 +131,7 @@ -- -+ + +- ++ + + + +@@ -148,7 +148,7 @@ + + + +- ++ + + + +@@ -172,7 +172,7 @@ + + + +- ++ + - - -@@ -150,7 +150,7 @@ - - - -- -+ - - - + +@@ -182,7 +182,7 @@ + + + +- ++ + + + +@@ -191,7 +191,7 @@ + + + +- ++ + + + diff --git a/www/iridium/files/patch-chrome_browser_about__flags.cc b/www/iridium/files/patch-chrome_browser_about__flags.cc index fdf0ba9fcb20..8cd6a3c3438e 100644 --- a/www/iridium/files/patch-chrome_browser_about__flags.cc +++ b/www/iridium/files/patch-chrome_browser_about__flags.cc @@ -1,128 +1,128 @@ ---- chrome/browser/about_flags.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/about_flags.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/about_flags.cc -@@ -212,7 +212,7 @@ +@@ -214,7 +214,7 @@ #include "ui/native_theme/native_theme_features.h" #include "ui/ui_features.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/allocator/buildflags.h" #endif -@@ -287,7 +287,7 @@ +@@ -289,7 +289,7 @@ #include "chrome/browser/supervised_user/supervised_user_features/supervised_user_features.h" // nogncheck #endif // ENABLE_SUPERVISED_USERS -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "ui/ozone/buildflags.h" #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -@@ -392,7 +392,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap +@@ -394,7 +394,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, -@@ -1262,7 +1262,7 @@ const FeatureEntry::FeatureVariation +@@ -1254,7 +1254,7 @@ const FeatureEntry::FeatureVariation }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kOmniboxDocumentProviderServerScoring[] = { {"DocumentUseServerScore", "true"}, {"DocumentUseClientScore", "false"}, -@@ -3923,7 +3923,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4072,7 +4072,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(base::kOneGroupPerRenderer)}, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { "enable-accelerated-video-decode", flag_descriptions::kAcceleratedVideoDecodeName, -@@ -4549,7 +4549,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4660,7 +4660,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWebShare)}, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName, flag_descriptions::kOzonePlatformHintDescription, kOsLinux, MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, -@@ -4568,7 +4568,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4679,7 +4679,7 @@ const FeatureEntry kFeatureEntries[] = { password_manager::features::kForceInitialSyncWhenDecryptionFails)}, #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"skip-undecryptable-passwords", flag_descriptions::kSkipUndecryptablePasswordsName, flag_descriptions::kSkipUndecryptablePasswordsDescription, -@@ -4822,7 +4822,7 @@ const FeatureEntry kFeatureEntries[] = { - "FeedCloseRefresh")}, +@@ -4939,7 +4939,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(feed::kDiscoFeedEndpoint)}, #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"following-feed-sidepanel", flag_descriptions::kFollowingFeedSidepanelName, flag_descriptions::kFollowingFeedSidepanelDescription, kOsDesktop, FEATURE_VALUE_TYPE(feed::kWebUiFeed)}, -@@ -5336,7 +5336,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(omnibox::kZeroSuggestPrefetchingOnWeb)}, +@@ -5480,7 +5480,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"omnibox-experimental-keyword-mode", flag_descriptions::kOmniboxExperimentalKeywordModeName, flag_descriptions::kOmniboxExperimentalKeywordModeDescription, kOsDesktop, -@@ -5873,7 +5873,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6018,7 +6018,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kPointerLockOptionsDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kPointerLockOptions)}, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"enable-async-dns", flag_descriptions::kAsyncDnsName, flag_descriptions::kAsyncDnsDescription, kOsWin | kOsLinux, FEATURE_VALUE_TYPE(features::kAsyncDns)}, -@@ -6791,7 +6791,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6962,7 +6962,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, -@@ -7651,7 +7651,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7832,7 +7832,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)}, -@@ -7950,7 +7950,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8147,7 +8147,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, -@@ -8530,7 +8530,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8756,7 +8756,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) {"document-picture-in-picture-api", flag_descriptions::kDocumentPictureInPictureApiName, flag_descriptions::kDocumentPictureInPictureApiDescription, diff --git a/www/iridium/files/patch-chrome_browser_browser__process__impl.cc b/www/iridium/files/patch-chrome_browser_browser__process__impl.cc index 95cee6f52e68..928df95d45c0 100644 --- a/www/iridium/files/patch-chrome_browser_browser__process__impl.cc +++ b/www/iridium/files/patch-chrome_browser_browser__process__impl.cc @@ -1,29 +1,29 @@ ---- chrome/browser/browser_process_impl.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/browser_process_impl.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/browser_process_impl.cc -@@ -211,7 +211,7 @@ +@@ -210,7 +210,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 -@@ -1167,7 +1167,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1160,7 +1160,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { ApplyMetricsReportingPolicy(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ChromeJsErrorReportProcessor::Create(); #endif -@@ -1426,7 +1426,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1416,7 +1416,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__resources.grd b/www/iridium/files/patch-chrome_browser_browser__resources.grd deleted file mode 100644 index d8bff188f734..000000000000 --- a/www/iridium/files/patch-chrome_browser_browser__resources.grd +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/browser_resources.grd.orig 2022-10-05 07:34:01 UTC -+++ chrome/browser/browser_resources.grd -@@ -120,7 +120,7 @@ - - - -- -+ - - - 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 494c4e4dca4f..637a9db95101 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders.cc @@ -1,71 +1,71 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -113,13 +113,13 @@ +@@ -112,13 +112,13 @@ #endif // BUILDFLAG(FULL_SAFE_BROWSING) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/connectors_internals/connectors_internals.mojom.h" #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/app_settings/web_app_settings_ui.h" #include "ui/webui/resources/cr_components/app_management/app_management.mojom.h" #endif @@ -188,7 +188,7 @@ #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" -@@ -780,7 +780,7 @@ void PopulateChromeFrameBinders( +@@ -799,7 +799,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)); -@@ -788,7 +788,7 @@ void PopulateChromeFrameBinders( +@@ -807,7 +807,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->IsInPrimaryMainFrame()) { - map->Add( -@@ -843,14 +843,14 @@ void PopulateChromeWebUIFrameBinders( + !render_frame_host->GetParentOrOuterDocument()) { + // The service binder will reject non-primary main frames, but we still need +@@ -872,14 +872,14 @@ void PopulateChromeWebUIFrameBinders( SegmentationInternalsUI>(map); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< connectors_internals::mojom::PageHandler, enterprise_connectors::ConnectorsInternalsUI>(map); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map); #endif -@@ -1235,7 +1235,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1270,7 +1270,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 c08f0e351738..a8bc3de82574 100644 --- a/www/iridium/files/patch-chrome_browser_chrome__browser__main.cc +++ b/www/iridium/files/patch-chrome_browser_chrome__browser__main.cc @@ -1,52 +1,52 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/chrome_browser_main.cc @@ -239,11 +239,11 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/first_run/upgrade_util_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/core/app/breakpad_linux.h" #include "components/crash/core/app/crashpad.h" #endif @@ -279,7 +279,7 @@ // 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" -@@ -1025,7 +1025,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1030,7 +1030,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 . -@@ -1038,7 +1038,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1043,7 +1043,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { } #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) // Set the product channel for crash reports. if (!crash_reporter::IsCrashpadEnabled()) { breakpad::SetChannelCrashKey( -@@ -1060,7 +1060,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1079,7 +1079,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::Initialize(); TouchModeStatsTracker::Initialize( diff --git a/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc index efd7b9f3a342..f652a58cbefd 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,150 +1,160 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -386,7 +386,7 @@ +@@ -388,7 +388,7 @@ #include "components/user_manager/user_manager.h" #include "services/service_manager/public/mojom/interface_provider_spec.mojom.h" #include "storage/browser/file_system/external_mount_points.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_linux.h" #elif BUILDFLAG(IS_ANDROID) #include "base/android/application_status_listener.h" -@@ -467,17 +467,17 @@ +@@ -472,17 +472,17 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/core/app/crash_switches.h" #include "components/crash/core/app/crashpad.h" #endif -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) #if !BUILDFLAG(IS_ANDROID) #include "base/debug/leak_annotations.h" #include "components/crash/core/app/breakpad_linux.h" -@@ -485,12 +485,12 @@ +@@ -490,13 +490,13 @@ #include "components/crash/content/browser/crash_handler_host_linux.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.h" #include "chrome/browser/ui/webui/app_settings/web_app_settings_navigation_throttle.h" #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -514,11 +514,11 @@ +@@ -525,11 +525,11 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_extra_parts_linux.h" #elif defined(USE_OZONE) #include "chrome/browser/chrome_browser_main_extra_parts_ozone.h" -@@ -927,7 +927,7 @@ blink::mojom::AutoplayPolicy GetAutoplayPolicyForWebCo +@@ -938,7 +938,7 @@ blink::mojom::AutoplayPolicy GetAutoplayPolicyForWebCo int GetCrashSignalFD(const base::CommandLine& command_line) { return crashpad::CrashHandlerHost::Get()->GetDeathSignalSocket(); } -#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( const std::string& process_type) { base::FilePath dumps_path; -@@ -1475,7 +1475,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1529,7 +1529,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) -@@ -1514,7 +1514,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1568,7 +1568,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 -@@ -1535,7 +1535,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1589,7 +1589,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo main_parts->AddParts(std::make_unique()); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) main_parts->AddParts(std::make_unique()); #elif defined(USE_OZONE) main_parts->AddParts(std::make_unique()); -@@ -2304,6 +2304,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -1608,7 +1608,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo + + chrome::AddMetricsExtraParts(main_parts.get()); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + main_parts->AddParts( + std::make_unique< + chrome::enterprise_util::ChromeBrowserMainExtraPartsEnterprise>()); +@@ -2377,6 +2377,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin #elif BUILDFLAG(IS_POSIX) #if BUILDFLAG(IS_ANDROID) bool enable_crash_reporter = true; +#elif BUILDFLAG(IS_BSD) + bool enable_crash_reporter = false; #else bool enable_crash_reporter = false; if (crash_reporter::IsCrashpadEnabled()) { -@@ -2653,7 +2655,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2730,7 +2732,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)) { -@@ -4096,7 +4098,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4180,7 +4182,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, -@@ -4540,14 +4542,14 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4625,14 +4627,14 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati &throttles); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) MaybeAddThrottle( WebAppSettingsNavigationThrottle::MaybeCreateThrottleFor(handle), &throttles); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) MaybeAddThrottle(enterprise_connectors::DeviceTrustNavigationThrottle:: MaybeCreateThrottleFor(handle), &throttles); -@@ -4580,7 +4582,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4669,7 +4671,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati // 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)) MaybeAddThrottle(browser_switcher::BrowserSwitcherNavigationThrottle:: MaybeCreateThrottleFor(handle), 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 645762e24515..78351f057d5c 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 2022-10-05 07:34:01 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -436,7 +436,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -439,7 +439,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_download_chrome__download__manager__delegate.cc b/www/iridium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc index 0c9cd7e4aac7..8423840d4d18 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,38 +1,29 @@ ---- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1552,7 +1552,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1551,7 +1551,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(); } -@@ -1668,7 +1668,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -1667,7 +1667,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()) { -@@ -1710,7 +1710,7 @@ std::unique_ptr - ChromeDownloadManagerDelegate::GetRenameHandlerForDownload( - download::DownloadItem* download_item) { - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - return enterprise_connectors::FileSystemRenameHandler::CreateIfNeeded( - download_item); - #else -@@ -1726,7 +1726,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl +@@ -1713,7 +1713,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__file__picker.cc b/www/iridium/files/patch-chrome_browser_download_download__file__picker.cc index 9b9a3e9b3e0d..28f01c6016aa 100644 --- a/www/iridium/files/patch-chrome_browser_download_download__file__picker.cc +++ b/www/iridium/files/patch-chrome_browser_download_download__file__picker.cc @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_file_picker.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/download/download_file_picker.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/download/download_file_picker.cc @@ -16,7 +16,7 @@ #include "content/public/browser/download_manager.h" #include "content/public/browser/web_contents.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_window.h" #include "ui/aura/window.h" -@@ -84,7 +84,7 @@ DownloadFilePicker::DownloadFilePicker(download::Downl +@@ -87,7 +87,7 @@ DownloadFilePicker::DownloadFilePicker(download::Downl // dialog in Linux (See SelectFileImpl() in select_file_dialog_linux_gtk.cc). // and windows.Here we make owning_window host to browser current active // window if it is null. https://crbug.com/1301898 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (!owning_window || !owning_window->GetHost()) { owning_window = BrowserList::GetInstance() ->GetLastActive() diff --git a/www/iridium/files/patch-chrome_browser_download_download__item__model.cc b/www/iridium/files/patch-chrome_browser_download_download__item__model.cc index 8d188458ea48..5e1049a4854d 100644 --- a/www/iridium/files/patch-chrome_browser_download_download__item__model.cc +++ b/www/iridium/files/patch-chrome_browser_download_download__item__model.cc @@ -1,29 +1,29 @@ ---- chrome/browser/download/download_item_model.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/download/download_item_model.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/download/download_item_model.cc -@@ -731,7 +731,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -738,7 +738,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(); -@@ -773,7 +773,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand +@@ -780,7 +780,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand DownloadCommands::ALWAYS_OPEN_TYPE); DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile()); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (download_commands->CanOpenPdfInSystemViewer()) { prefs->SetShouldOpenPdfInSystemReader(!is_checked); SetShouldPreferOpeningInBrowser(is_checked); -@@ -1087,7 +1087,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1156,7 +1156,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_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 f5bb819f9561..87b2783351f6 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc @@ -1,43 +1,43 @@ ---- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc @@ -11,11 +11,11 @@ #include "chrome/browser/profiles/profile.h" #include "components/keyed_service/core/keyed_service.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_process.h" #if BUILDFLAG(IS_MAC) #include "chrome/browser/enterprise/connectors/device_trust/browser/mac_device_trust_connector_service.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/browser/browser_device_trust_connector_service.h" #endif // BUILDFLAG(IS_MAC) #include "chrome/browser/policy/chrome_browser_policy_connector.h" -@@ -40,7 +40,7 @@ DeviceTrustConnectorService* DeviceTrustConnectorServi +@@ -44,7 +44,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; -@@ -59,7 +59,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil +@@ -75,7 +75,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil DeviceTrustConnectorService* service = nullptr; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (IsDeviceTrustConnectorFeatureEnabled()) { auto* key_manager = g_browser_process->browser_policy_connector() ->chrome_browser_cloud_management_controller() -@@ -67,7 +67,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil +@@ -83,7 +83,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil #if BUILDFLAG(IS_MAC) service = new MacDeviceTrustConnectorService( key_manager, profile->GetPrefs(), g_browser_process->local_state()); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) service = new BrowserDeviceTrustConnectorService(key_manager, profile->GetPrefs()); #endif // BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc index f1f86114fc4d..77951dbd1832 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_browser_commands_key__rotation__command__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc -@@ -13,7 +13,7 @@ +@@ -14,7 +14,7 @@ #if BUILDFLAG(IS_WIN) #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/win_key_rotation_command.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/linux_key_rotation_command.h" #elif BUILDFLAG(IS_MAC) #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/mac_key_rotation_command.h" -@@ -45,7 +45,7 @@ std::unique_ptr KeyRotationCommand - scoped_refptr url_loader_factory) { +@@ -47,7 +47,7 @@ std::unique_ptr KeyRotationCommand + PrefService* local_prefs) { #if BUILDFLAG(IS_WIN) return std::make_unique(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return std::make_unique(url_loader_factory); #elif BUILDFLAG(IS_MAC) - return std::make_unique(url_loader_factory); + return std::make_unique(url_loader_factory, 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 aca8bb196f9c..9f365c1668dc 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,19 +1,19 @@ ---- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc -@@ -18,14 +18,14 @@ +@@ -19,14 +19,14 @@ #include "chrome/common/chrome_paths.h" #include "components/version_info/version_info.h" -#if !BUILDFLAG(IS_FUCHSIA) +#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) #include "components/crash/core/app/crashpad.h" #include "third_party/crashpad/crashpad/client/crash_report_database.h" #endif // !BUILDFLAG(IS_FUCHSIA) namespace enterprise_connectors { -#if !BUILDFLAG(IS_FUCHSIA) +#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) namespace { // key names used when building the dictionary to pass to the real-time // reporting API diff --git a/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.h b/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.h index 8b0d93510578..04f8c0f2b350 100644 --- a/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.h +++ b/www/iridium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.h @@ -1,20 +1,29 @@ ---- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.h.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.h.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.h -@@ -22,7 +22,7 @@ class BrowserCrashEventRouter +@@ -9,7 +9,7 @@ + #include "chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.h" + #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" + +-#if !BUILDFLAG(IS_FUCHSIA) ++#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) + #include "third_party/crashpad/crashpad/client/crash_report_database.h" + #endif // !BUILDFLAG(IS_FUCHSIA) + namespace enterprise_connectors { +@@ -27,7 +27,7 @@ class BrowserCrashEventRouter BrowserCrashEventRouter& operator=(const BrowserCrashEventRouter&) = delete; ~BrowserCrashEventRouter() override; -#if !BUILDFLAG(IS_FUCHSIA) +#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) void OnCloudReportingLaunched( enterprise_reporting::ReportScheduler* report_scheduler) override; - #endif // !BUILDFLAG(IS_FUCHSIA) -@@ -32,7 +32,7 @@ class BrowserCrashEventRouter + void UploadToReportingServer( +@@ -41,7 +41,7 @@ class BrowserCrashEventRouter nullptr; raw_ptr controller_ = nullptr; -#if !BUILDFLAG(IS_FUCHSIA) +#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_BSD) // ReportCrashes() checks the enterprise policy settings, retrieves crash // reports from the crashpad local database and sends reports that have not // been sent to the reporting server. diff --git a/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn b/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn index d390d215f8bd..3dfff81cf14e 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn +++ b/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn @@ -1,13 +1,13 @@ ---- chrome/browser/extensions/BUILD.gn.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1332,6 +1332,10 @@ static_library("extensions") { +@@ -1331,6 +1331,10 @@ static_library("extensions") { deps += [ "//chrome/services/printing/public/mojom" ] } + if (is_bsd) { + sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ] + } + if (enable_service_discovery) { sources += [ "api/mdns/mdns_api.cc", diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc index 519a666554c7..b292df7ca83a 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc @@ -1,38 +1,38 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc -@@ -31,7 +31,7 @@ +@@ -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" -@@ -155,7 +155,7 @@ api::enterprise_reporting_private::ContextInfo ToConte +@@ -151,7 +151,7 @@ api::enterprise_reporting_private::ContextInfo ToConte return info; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) device_signals::SignalsAggregationRequest CreateAggregationRequest( const std::string& user_id, -@@ -215,7 +215,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: +@@ -211,7 +211,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: // getPersistentSecret -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) EnterpriseReportingPrivateGetPersistentSecretFunction:: EnterpriseReportingPrivateGetPersistentSecretFunction() = default; -@@ -655,7 +655,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction:: +@@ -636,7 +636,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_image__writer__private_removable__storage__provider.cc b/www/iridium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc index 5a02959f36c8..25eae117cc36 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc -@@ -21,6 +21,7 @@ static base::LazyInstancePostTask( FROM_HERE, -@@ -34,6 +35,9 @@ void RemovableStorageProvider::GetAllDevices(DeviceLis +@@ -33,6 +34,9 @@ void RemovableStorageProvider::GetAllDevices(DeviceLis base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}, base::BindOnce(&RemovableStorageProvider::PopulateDeviceList), std::move(callback)); +#else + NOTIMPLEMENTED(); +#endif } // static diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc b/www/iridium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc new file mode 100644 index 000000000000..252e80f03c67 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc @@ -0,0 +1,11 @@ +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2022-12-01 10:35:46 UTC ++++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc +@@ -494,7 +494,7 @@ void PasswordsPrivateDelegateImpl::OsReauthCall( + } + + void PasswordsPrivateDelegateImpl::OsReauthTimeoutCall() { +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + PasswordsPrivateEventRouter* router = + PasswordsPrivateEventRouterFactory::GetForProfile(profile_); + if (router) diff --git a/www/iridium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc b/www/iridium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc index 1875d794c31a..d2bde42afb98 100644 --- a/www/iridium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc +++ b/www/iridium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -187,7 +187,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -191,7 +191,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::PREF_TYPE_BOOLEAN; #endif -@@ -201,7 +201,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -203,7 +203,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist + settings_api::PrefType::PREF_TYPE_STRING; + (*s_allowlist)[::prefs::kPolicyThemeColor] = settings_api::PrefType::PREF_TYPE_NUMBER; - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - (*s_allowlist)[::prefs::kUsesSystemTheme] = +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + (*s_allowlist)[::prefs::kUsesSystemThemeDeprecated] = settings_api::PrefType::PREF_TYPE_BOOLEAN; - #endif + (*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 6b9b9043fe8a..f34367be8b16 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 2022-04-01 07:48:30 UTC +--- chrome/browser/extensions/external_provider_impl.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/extensions/external_provider_impl.cc -@@ -818,7 +818,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -828,7 +828,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( -@@ -846,7 +846,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -856,7 +856,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 1e2ff2cddb93..1357d4947b84 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 2022-10-05 07:34:01 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -254,7 +254,7 @@ const struct { +@@ -256,7 +256,7 @@ const struct { {base::DIR_HOME, FILE_PATH_LITERAL("Library/Mobile Documents"), 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, as well as security // sensitive data in /sys and /proc. {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren}, diff --git a/www/iridium/files/patch-chrome_browser_flag__descriptions.cc b/www/iridium/files/patch-chrome_browser_flag__descriptions.cc index 974da531f97a..860c3f64fcbe 100644 --- a/www/iridium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/iridium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,65 +1,65 @@ ---- chrome/browser/flag_descriptions.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/flag_descriptions.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/flag_descriptions.cc -@@ -6226,7 +6226,7 @@ const char kSideSearchDSESupportDescription[] = +@@ -6383,7 +6383,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."; -@@ -6235,7 +6235,7 @@ const char kQuickCommandsDescription[] = +@@ -6392,7 +6392,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."; -@@ -6249,7 +6249,7 @@ const char kWebShareDescription[] = +@@ -6406,7 +6406,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"; -@@ -6269,7 +6269,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -6426,7 +6426,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti "Bluetooth"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kCleanUndecryptablePasswordsLinuxName[] = "Cleanup local undecryptable passwords during initial sync flow"; const char kCleanUndecryptablePasswordsLinuxDescription[] = -@@ -6282,7 +6282,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail +@@ -6439,7 +6439,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail "storage and requests initial sync."; #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kSkipUndecryptablePasswordsName[] = "Skip undecryptable passwords to use the available decryptable " "passwords."; -@@ -6291,7 +6291,7 @@ const char kSkipUndecryptablePasswordsDescription[] = +@@ -6448,7 +6448,7 @@ const char kSkipUndecryptablePasswordsDescription[] = "there are undecryptable ones."; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kAsyncDnsName[] = "Async DNS resolver"; const char kAsyncDnsDescription[] = "Enables the built-in DNS resolver."; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -@@ -6396,7 +6396,7 @@ const char kElasticOverscrollDescription[] = +@@ -6553,7 +6553,7 @@ const char kElasticOverscrollDescription[] = #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kUIDebugToolsName[] = "Debugging tools for UI"; const char kUIDebugToolsDescription[] = "Enables additional keyboard shortcuts to help debugging."; diff --git a/www/iridium/files/patch-chrome_browser_flag__descriptions.h b/www/iridium/files/patch-chrome_browser_flag__descriptions.h index 66ef087962bd..f6f0f70da1cd 100644 --- a/www/iridium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/iridium/files/patch-chrome_browser_flag__descriptions.h @@ -1,51 +1,51 @@ ---- chrome/browser/flag_descriptions.h.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/flag_descriptions.h.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/flag_descriptions.h -@@ -3574,7 +3574,7 @@ extern const char kSideSearchDSESupportDescription[]; +@@ -3661,7 +3661,7 @@ extern const char kSearchWebInSidePanelDescription[]; // Random platform combinations ----------------------------------------------- #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kQuickCommandsName[]; extern const char kQuickCommandsDescription[]; -@@ -3591,7 +3591,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa +@@ -3678,7 +3678,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[]; -@@ -3607,18 +3607,18 @@ extern const char kForcePasswordInitialSyncWhenDecrypt +@@ -3694,18 +3694,18 @@ extern const char kForcePasswordInitialSyncWhenDecrypt extern const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[]; #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kSkipUndecryptablePasswordsName[]; extern const char kSkipUndecryptablePasswordsDescription[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kAsyncDnsName[]; extern const char kAsyncDnsDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kFollowingFeedSidepanelName[]; extern const char kFollowingFeedSidepanelDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -3695,7 +3695,7 @@ extern const char kElasticOverscrollDescription[]; +@@ -3782,7 +3782,7 @@ extern const char kElasticOverscrollDescription[]; #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kUIDebugToolsName[]; extern const char kUIDebugToolsDescription[]; diff --git a/www/iridium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc b/www/iridium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc index 5f7b86fc368a..57f6d387d23e 100644 --- a/www/iridium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc +++ b/www/iridium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc @@ -1,16 +1,16 @@ ---- chrome/browser/media_galleries/media_file_system_registry.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/media_galleries/media_file_system_registry.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/media_galleries/media_file_system_registry.cc -@@ -744,7 +744,12 @@ class MediaFileSystemRegistry::MediaFileSystemContextI +@@ -585,7 +585,12 @@ class MediaFileSystemRegistry::MediaFileSystemContextI // Constructor in 'private' section because depends on private class definition. MediaFileSystemRegistry::MediaFileSystemRegistry() : file_system_context_(new MediaFileSystemContextImpl) { - StorageMonitor::GetInstance()->AddObserver(this); + /* + * This conditional is needed for shutdown. Destructors + * try to get the media file system registry. + */ + if (StorageMonitor::GetInstance()) + StorageMonitor::GetInstance()->AddObserver(this); } MediaFileSystemRegistry::~MediaFileSystemRegistry() { diff --git a/www/iridium/files/patch-chrome_browser_media_router_discovery_BUILD.gn b/www/iridium/files/patch-chrome_browser_media_router_discovery_BUILD.gn index 6413e1c86e81..488744c31ace 100644 --- a/www/iridium/files/patch-chrome_browser_media_router_discovery_BUILD.gn +++ b/www/iridium/files/patch-chrome_browser_media_router_discovery_BUILD.gn @@ -1,11 +1,11 @@ ---- chrome/browser/media/router/discovery/BUILD.gn.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/media/router/discovery/BUILD.gn.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/media/router/discovery/BUILD.gn -@@ -79,7 +79,7 @@ static_library("discovery") { +@@ -80,7 +80,7 @@ static_library("discovery") { "media_sink_discovery_metrics.h", ] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "discovery_network_list_wifi_linux.cc" ] } diff --git a/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h b/www/iridium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h index d0f349689694..70285dc5e31f 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-03-28 18:11:04 UTC +--- chrome/browser/media/webrtc/webrtc_logging_controller.h.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/media/webrtc/webrtc_logging_controller.h -@@ -132,7 +132,7 @@ class WebRtcLoggingController +@@ -133,7 +133,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. -@@ -191,7 +191,7 @@ class WebRtcLoggingController +@@ -192,7 +192,7 @@ class WebRtcLoggingController bool success, const std::string& error_message); -#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 dd9c42c7d272..4ceeeab27b12 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc +++ b/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc @@ -1,23 +1,23 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc @@ -58,8 +58,10 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) +#if !BUILDFLAG(IS_BSD) #include +#endif #include "base/linux_util.h" #include "base/strings/string_split.h" -@@ -516,7 +518,7 @@ void RecordStartupMetrics() { +@@ -491,7 +493,7 @@ void RecordStartupMetrics() { // Record whether Chrome is the default browser or not. // Disabled on Linux due to hanging browser tests, see crbug.com/1216328. -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) shell_integration::DefaultWebClientState default_state = shell_integration::GetDefaultBrowser(); base::UmaHistogramEnumeration("DefaultBrowser.State", default_state, diff --git a/www/iridium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc b/www/iridium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc index 86455309a176..e40dc692e189 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc +++ b/www/iridium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc @@ -1,47 +1,47 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -174,7 +174,7 @@ +@@ -175,7 +175,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 -@@ -721,7 +721,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -722,7 +722,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 -@@ -798,7 +798,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -799,7 +799,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()); -@@ -890,7 +890,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -894,7 +894,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) -@@ -1073,7 +1073,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1077,7 +1077,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // This creates the DesktopProfileSessionDurationsServices if it didn't exist // already. diff --git a/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.cc b/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.cc index ed6557e14480..05d2de1f79f1 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.cc +++ b/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.cc @@ -1,29 +1,29 @@ ---- chrome/browser/metrics/power/process_monitor.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/metrics/power/process_monitor.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/metrics/power/process_monitor.cc @@ -64,7 +64,7 @@ ProcessMonitor::Metrics SampleMetrics(base::ProcessMet #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) metrics.idle_wakeups = process_metrics.GetIdleWakeupsPerSecond(); #endif #if BUILDFLAG(IS_MAC) @@ -81,7 +81,7 @@ void ScaleMetrics(ProcessMonitor::Metrics* metrics, do metrics->cpu_usage *= factor; #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) metrics->idle_wakeups *= factor; #endif -@@ -130,7 +130,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me +@@ -147,7 +147,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me lhs.cpu_usage += rhs.cpu_usage; #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) lhs.idle_wakeups += rhs.idle_wakeups; #endif diff --git a/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.h b/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.h index fef39301f47c..2dcd6d5adfc2 100644 --- a/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.h +++ b/www/iridium/files/patch-chrome_browser_metrics_power_process__monitor.h @@ -1,11 +1,11 @@ ---- chrome/browser/metrics/power/process_monitor.h.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/metrics/power/process_monitor.h.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/metrics/power/process_monitor.h -@@ -70,7 +70,7 @@ class ProcessMonitor : public content::BrowserChildPro +@@ -71,7 +71,7 @@ class ProcessMonitor : public content::BrowserChildPro double cpu_usage = 0.0; #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Returns the number of average idle cpu wakeups per second since the last // time the metric was sampled. int idle_wakeups = 0; diff --git a/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.cc b/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.cc index 0d99aec179ed..9419554229b5 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,38 +1,38 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/net/system_network_context_manager.cc @@ -91,7 +91,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" @@ -173,7 +173,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) -@@ -484,7 +484,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -451,7 +451,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) -@@ -556,7 +556,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -523,7 +523,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) diff --git a/www/iridium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc b/www/iridium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc index a89356fbdc99..2ba9f63bdfb3 100644 --- a/www/iridium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc +++ b/www/iridium/files/patch-chrome_browser_new__tab__page_new__tab__page__util.cc @@ -1,11 +1,20 @@ ---- chrome/browser/new_tab_page/new_tab_page_util.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/new_tab_page/new_tab_page_util.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/new_tab_page/new_tab_page_util.cc @@ -11,7 +11,7 @@ namespace { bool IsOsSupportedForRecipe() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #else return false; +@@ -27,7 +27,7 @@ bool IsOsSupportedForCart() { + } + + bool IsOsSupportedForDrive() { +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return true; + #else + return false; diff --git a/www/iridium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc b/www/iridium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc index 4548084bdef9..c18a4b5f00f2 100644 --- a/www/iridium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc +++ b/www/iridium/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc @@ -1,11 +1,11 @@ ---- chrome/browser/policy/browser_signin_policy_handler.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/policy/browser_signin_policy_handler.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/policy/browser_signin_policy_handler.cc -@@ -44,7 +44,7 @@ void BrowserSigninPolicyHandler::ApplyPolicySettings(c +@@ -45,7 +45,7 @@ void BrowserSigninPolicyHandler::ApplyPolicySettings(c policies.GetValue(policy_name(), base::Value::Type::INTEGER); switch (static_cast(value->GetInt())) { case BrowserSigninMode::kForced: -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) prefs->SetValue(prefs::kForceBrowserSignin, base::Value(true)); #endif [[fallthrough]]; diff --git a/www/iridium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc b/www/iridium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc index 00174075da4d..6eaae53b7d68 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,129 +1,138 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -189,12 +189,12 @@ +@@ -192,12 +192,12 @@ #include "components/spellcheck/browser/pref_names.h" #endif // BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/device_signals/core/browser/pref_names.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/policy/web_app_settings_policy_handler.h" #endif -@@ -725,7 +725,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -731,7 +731,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kManagedDefaultGeolocationSetting, base::Value::Type::INTEGER }, #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kRequireOnlineRevocationChecksForLocalAnchors, prefs::kCertRevocationCheckingRequiredLocalAnchors, base::Value::Type::BOOLEAN }, -@@ -1330,7 +1330,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - base::Value::Type::BOOLEAN }, +@@ -1339,7 +1339,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + base::Value::Type::STRING }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGSSAPILibraryName, prefs::kGSSAPILibraryName, base::Value::Type::STRING }, -@@ -1400,18 +1400,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1409,18 +1409,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kTotalMemoryLimitMb, base::Value::Type::INTEGER }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kBackgroundModeEnabled, prefs::kBackgroundModeEnabled, base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kUnmanagedDeviceSignalsConsentFlowEnabled, device_signals::prefs::kUnmanagedDeviceSignalsConsentFlowEnabled, base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ - || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kDefaultBrowserSettingEnabled, prefs::kDefaultBrowserSettingEnabled, base::Value::Type::BOOLEAN }, -@@ -1424,7 +1424,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1433,7 +1433,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) // || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ - || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kAutoplayAllowed, prefs::kAutoplayAllowed, base::Value::Type::BOOLEAN }, -@@ -1609,7 +1609,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1621,7 +1621,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { key::kAuthNegotiateDelegateByKdcPolicy, prefs::kAuthNegotiateDelegateByKdcPolicy, base::Value::Type::BOOLEAN }, -@@ -1668,7 +1668,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1674,7 +1674,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(ENABLE_EXTENSIONS) && (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) \ - || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)) + || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)) || BUILDFLAG(IS_BSD) { key::kChromeAppsEnabled, extensions::pref_names::kChromeAppsEnabled, base::Value::Type::BOOLEAN }, -@@ -2007,7 +2007,7 @@ std::unique_ptr BuildH +@@ -1731,7 +1731,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + { key::kPrefixedStorageInfoEnabled, + storage::kPrefixedStorageInfoEnabled, + base::Value::Type::BOOLEAN }, +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + { key::kHighEfficiencyModeEnabled, + performance_manager::user_tuning::prefs::kHighEfficiencyModeEnabled, + base::Value::Type::BOOLEAN }, +@@ -2032,7 +2032,7 @@ std::unique_ptr BuildH key::kBrowsingDataLifetime, browsing_data::prefs::kBrowsingDataLifetime, chrome_schema)); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique()); handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -2036,7 +2036,7 @@ std::unique_ptr BuildH +@@ -2061,7 +2061,7 @@ std::unique_ptr BuildH std::vector> signin_legacy_policies; #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) signin_legacy_policies.push_back(std::make_unique( key::kForceBrowserSignin, prefs::kForceBrowserSignin, base::Value::Type::BOOLEAN)); -@@ -2369,7 +2369,7 @@ std::unique_ptr BuildH +@@ -2394,7 +2394,7 @@ std::unique_ptr BuildH chrome_schema)); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique(chrome_schema)); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -2382,7 +2382,7 @@ std::unique_ptr BuildH +@@ -2407,7 +2407,7 @@ std::unique_ptr BuildH #endif #if BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique()); handlers->AddHandler( std::make_unique( -@@ -2390,7 +2390,7 @@ std::unique_ptr BuildH +@@ -2415,7 +2415,7 @@ std::unique_ptr BuildH #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) #endif // BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique( key::kAllowSystemNotifications, prefs::kAllowSystemNotifications, base::Value::Type::BOOLEAN)); diff --git a/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc b/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc index 1d9062af2193..088513ca5c81 100644 --- a/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc +++ b/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -1,44 +1,71 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -439,14 +439,14 @@ +@@ -441,14 +441,14 @@ #include "components/os_crypt/os_crypt.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/url_handler_prefs.h" #include "components/device_signals/core/browser/pref_names.h" #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/browser_switcher/browser_switcher_prefs.h" #endif -@@ -1214,7 +1214,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) +@@ -476,7 +476,7 @@ + #include "chrome/browser/sessions/session_service_log.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/color/system_theme.h" + #endif + +@@ -1010,7 +1010,7 @@ void RegisterProfilePrefsForMigration( + registry->RegisterIntegerPref(kProfileAvatarTutorialShown, 0); + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Deprecated 08/2022. + registry->RegisterBooleanPref(prefs::kUsesSystemThemeDeprecated, false); + #endif +@@ -1241,7 +1241,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) web_app::url_handler_prefs::RegisterLocalStatePrefs(registry); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -1531,13 +1531,13 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -1561,13 +1561,13 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync safe_browsing::PostCleanupSettingsResetter::RegisterProfilePrefs(registry); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) device_signals::RegisterProfilePrefs(registry); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); #endif +@@ -1981,7 +1981,7 @@ void MigrateObsoleteProfilePrefs(Profile* profile) { + profile_prefs->ClearPref(kProfileAvatarTutorialShown); + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Added 08/2022. + if (profile_prefs->HasPrefPath(prefs::kUsesSystemThemeDeprecated)) { + auto migrated_theme = diff --git a/www/iridium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc b/www/iridium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc index b2fb081d187e..3e429227ccaf 100644 --- a/www/iridium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc +++ b/www/iridium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc @@ -1,25 +1,25 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -255,7 +255,7 @@ +@@ -257,7 +257,7 @@ #include "chrome/browser/ui/cocoa/screentime/screentime_features.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/idle_service_factory.h" #endif -@@ -435,11 +435,11 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -438,11 +438,11 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_idle::IdleServiceFactory::GetInstance(); #endif ModelTypeStoreServiceFactory::GetInstance(); diff --git a/www/iridium/files/patch-chrome_browser_profiles_profile__impl.cc b/www/iridium/files/patch-chrome_browser_profiles_profile__impl.cc index d9914b5b7e9b..e0e7fd0a47c3 100644 --- a/www/iridium/files/patch-chrome_browser_profiles_profile__impl.cc +++ b/www/iridium/files/patch-chrome_browser_profiles_profile__impl.cc @@ -1,31 +1,31 @@ ---- chrome/browser/profiles/profile_impl.cc.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -261,6 +261,10 @@ +@@ -266,6 +266,10 @@ #include "chrome/browser/spellchecker/spellcheck_service.h" #endif +#if BUILDFLAG(IS_OPENBSD) +#include "sandbox/policy/openbsd/sandbox_openbsd.h" +#endif + using bookmarks::BookmarkModel; using content::BrowserThread; using content::DownloadManagerDelegate; -@@ -851,7 +855,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -864,7 +868,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_renderer__preferences__util.cc b/www/iridium/files/patch-chrome_browser_renderer__preferences__util.cc index e7fa42eb5039..034ec5e932de 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 2022-10-05 07:34:01 UTC +--- chrome/browser/renderer_preferences_util.cc.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/renderer_preferences_util.cc @@ -37,7 +37,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" -@@ -159,7 +159,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc +@@ -156,7 +156,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)) - ui::LinuxUi* linux_ui = ui::LinuxUi::instance(); - if (linux_ui) { + auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile); + if (linux_ui_theme) { if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) { @@ -179,7 +179,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_plugin__metadata_plugins__linux.json b/www/iridium/files/patch-chrome_browser_resources_plugin__metadata_plugins__linux.json deleted file mode 100644 index 82d341ff4140..000000000000 --- a/www/iridium/files/patch-chrome_browser_resources_plugin__metadata_plugins__linux.json +++ /dev/null @@ -1,31 +0,0 @@ ---- chrome/browser/resources/plugin_metadata/plugins_linux.json.orig 2022-03-28 18:11:04 UTC -+++ chrome/browser/resources/plugin_metadata/plugins_linux.json -@@ -1,28 +1,5 @@ - { - "x-version": 46, -- "adobe-flash-player": { -- "mime_types": [ -- "application/futuresplash", -- "application/x-shockwave-flash" -- ], -- "matching_mime_types": [ -- "application/futuresplash" -- ], -- "versions": [ -- { -- "version": "32.0.0.445", -- "status": "up_to_date", -- "reference": "https://helpx.adobe.com/security/products/flash-player/apsb20-58.html" -- } -- ], -- "lang": "en-US", -- "name": "Adobe Flash Player", -- "help_url": "https://support.google.com/chrome/?p=plugin_flash", -- "url": "https://support.google.com/chrome/answer/6258784", -- "displayurl": true, -- "group_name_matcher": "*Shockwave Flash*", -- "plugin_is_deprecated": true -- }, - "google-chrome-pdf": { - "mime_types": [ - ], diff --git a/www/iridium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts b/www/iridium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts index 606bb92511a8..10f7fdc7604b 100644 --- a/www/iridium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts +++ b/www/iridium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts @@ -1,20 +1,20 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.ts.orig 2022-10-05 07:34:01 UTC +--- chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.ts.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.ts @@ -16,7 +16,7 @@ export interface AppearanceBrowserProxy { useDefaultTheme(): void; - // -+ // - useSystemTheme(): void; ++ // + useGtkTheme(): void; + useQtTheme(): void; // - -@@ -44,7 +44,7 @@ export class AppearanceBrowserProxyImpl implements App +@@ -45,7 +45,7 @@ export class AppearanceBrowserProxyImpl implements App chrome.send('useDefaultTheme'); } - // -+ // - useSystemTheme() { - chrome.send('useSystemTheme'); ++ // + useGtkTheme() { + chrome.send('useGtkTheme'); } 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 c1e1690188b5..3bd5d7afe61e 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 2022-10-05 07:34:01 UTC +--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2022-12-01 10:35:46 UTC +++ chrome/browser/resources/settings/appearance_page/appearance_page.html @@ -27,7 +27,7 @@ - + - +