diff --git a/www/iridium/Makefile b/www/iridium/Makefile index d60528c33260..606d5fcde078 100644 --- a/www/iridium/Makefile +++ b/www/iridium/Makefile @@ -1,315 +1,314 @@ PORTNAME= iridium -PORTVERSION= 2022.03.99.1 -PORTREVISION= 1 +PORTVERSION= 2022.04.100.0 CATEGORIES= www MASTER_SITES= https://downloads.iridiumbrowser.de/source/ PKGNAMESUFFIX= -browser DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION} MAINTAINER= chromium@FreeBSD.org COMMENT= Iridium browser LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi ONLY_FOR_ARCHS= aarch64 amd64 i386 BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ 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 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 \ 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 \ 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 jpeg localbase:ldflags \ ninja perl5 pkgconfig python:3.6-3.9,build 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 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} # 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 \ enable_hangout_services_extension=true \ enable_js_type_check=false \ enable_nacl=false \ enable_one_click_signin=true \ enable_remoting=false \ enable_wmax_tokens=false \ fatal_linker_warnings=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_wayland_scanner=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 libusb libdrm libpng libwebp libxml libxslt openh264 opus snappy || ${FALSE} # Iridium uses an unreleased version of FFmpeg, so configure it .for brand in Chrome Chromium ${CP} -R \ ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/linux/ \ ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/freebsd .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 icudtl.dat 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} .for g in libEGL.so libGLESv2.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/swiftshader/${g} \ ${STAGEDIR}${DATADIR}/swiftshader .endfor .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 9f177015ce36..4d2cc8c84a2b 100644 --- a/www/iridium/distinfo +++ b/www/iridium/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1648465372 -SHA256 (iridium-browser-2022.03.99.1.tar.xz) = f960ee848fd23f45b19ebde438dfdb0f59d8b33a2fc79dffc9505767ccefb7f9 -SIZE (iridium-browser-2022.03.99.1.tar.xz) = 1310538552 +TIMESTAMP = 1648800090 +SHA256 (iridium-browser-2022.04.100.0.tar.xz) = 1a111c3ac3f50e81a3120a9936941682bb66bd5a5287d92a2ccf0158a0cf2b1e +SIZE (iridium-browser-2022.04.100.0.tar.xz) = 1323781188 diff --git a/www/iridium/files/patch-BUILD.gn b/www/iridium/files/patch-BUILD.gn index f1779faaf10e..b8f84eb80257 100644 --- a/www/iridium/files/patch-BUILD.gn +++ b/www/iridium/files/patch-BUILD.gn @@ -1,72 +1,72 @@ ---- BUILD.gn.orig 2022-03-28 18:11:04 UTC +--- BUILD.gn.orig 2022-04-01 07:48:30 UTC +++ BUILD.gn -@@ -52,7 +52,7 @@ declare_args() { +@@ -53,7 +53,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) -@@ -454,7 +454,7 @@ group("gn_all") { +@@ -452,7 +452,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", @@ -636,6 +636,15 @@ group("gn_all") { } } + if (is_bsd) { + deps -= [ + "//third_party/breakpad:dump_syms($host_toolchain)", + "//third_party/breakpad:microdump_stackwalk($host_toolchain)", + "//third_party/breakpad:minidump_dump($host_toolchain)", + "//third_party/breakpad:minidump_stackwalk($host_toolchain)", + ] + } + if (is_mac) { deps += [ "//third_party/breakpad:crash_inspector", -@@ -686,7 +695,7 @@ group("gn_all") { +@@ -685,7 +694,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)" ] } -@@ -1137,7 +1146,7 @@ if (!is_ios) { +@@ -1147,7 +1156,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)" ] } -@@ -1146,7 +1155,7 @@ if (!is_ios) { +@@ -1156,7 +1165,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)" ] } -@@ -1521,7 +1530,7 @@ group("chromium_builder_perf") { +@@ -1531,7 +1540,7 @@ group("chromium_builder_perf") { if (is_win) { data_deps += [ "//chrome/installer/mini_installer:mini_installer" ] - } else { + } else if (!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 1ac5c814fd86..663486914e6d 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-03-28 18:11:04 UTC +--- ash/display/mirror_window_controller.cc.orig 2022-04-01 07:48:30 UTC +++ ash/display/mirror_window_controller.cc -@@ -297,7 +297,11 @@ void MirrorWindowController::UpdateWindow( +@@ -296,7 +296,11 @@ void MirrorWindowController::UpdateWindow( return info.id() == iter->first; }) == display_info_list.end()) { 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 2c821eccb8f0..4d25c3a44f39 100644 --- a/www/iridium/files/patch-base_BUILD.gn +++ b/www/iridium/files/patch-base_BUILD.gn @@ -1,146 +1,146 @@ ---- base/BUILD.gn.orig 2022-03-28 18:11:04 UTC +--- base/BUILD.gn.orig 2022-04-01 07:48:30 UTC +++ base/BUILD.gn -@@ -993,7 +993,7 @@ mixed_component("base") { +@@ -999,7 +999,7 @@ mixed_component("base") { "timer/hi_res_timer_manager_posix.cc", ] - if (!is_nacl && !is_apple) { + if (!is_nacl && !is_apple && !is_bsd) { sources += [ "cpu_affinity_posix.cc", "cpu_affinity_posix.h", -@@ -1004,6 +1004,12 @@ mixed_component("base") { +@@ -1010,6 +1010,12 @@ mixed_component("base") { "profiler/thread_delegate_posix.h", ] } + + if (is_bsd) { + sources += [ + "profiler/stack_sampler_posix.cc", + ] + } } if (is_win) { -@@ -1462,11 +1468,23 @@ mixed_component("base") { +@@ -1478,11 +1484,23 @@ mixed_component("base") { # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. if (!use_sysroot && - (is_android || ((is_linux || is_chromeos) && !is_chromecast)) && + (is_android || ((is_linux || is_chromeos) && !is_chromecast && !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", -@@ -1490,7 +1508,7 @@ mixed_component("base") { +@@ -1506,7 +1524,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", -@@ -1550,7 +1568,7 @@ mixed_component("base") { +@@ -1563,7 +1581,7 @@ mixed_component("base") { # Allow more direct string conversions on platforms with native utf8 # strings # TODO(crbug/1052397): Consider replacing is_ash with is_chromeos once lacros switches to target_os=chromeos - if (is_apple || is_chromeos_ash || is_chromecast || is_fuchsia) { + if (is_apple || is_chromeos_ash || is_chromecast || is_fuchsia || is_bsd) { defines += [ "SYSTEM_NATIVE_UTF8" ] } -@@ -2222,6 +2240,42 @@ mixed_component("base") { +@@ -2243,6 +2261,42 @@ mixed_component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_linux.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 -= [ -@@ -3465,7 +3519,7 @@ test("base_unittests") { +@@ -3495,7 +3549,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", -@@ -3513,7 +3567,7 @@ test("base_unittests") { +@@ -3543,7 +3597,7 @@ test("base_unittests") { "posix/unix_domain_socket_unittest.cc", "task/thread_pool/task_tracker_posix_unittest.cc", ] - if (!is_nacl && !is_apple) { + if (!is_nacl && !is_apple && !is_bsd) { sources += [ "cpu_affinity_posix_unittest.cc", "profiler/stack_copier_signal_unittest.cc", -@@ -3525,7 +3579,7 @@ test("base_unittests") { +@@ -3555,7 +3609,7 @@ test("base_unittests") { # Allow more direct string conversions on platforms with native utf8 # strings # TODO(crbug/1052397): Consider replacing is_ash with is_chromeos once lacros switches to target_os=chromeos - if (is_apple || is_chromeos_ash || is_chromecast || is_fuchsia) { + if (is_apple || is_chromeos_ash || is_chromecast || is_fuchsia || is_bsd) { defines += [ "SYSTEM_NATIVE_UTF8" ] } -@@ -3689,7 +3743,7 @@ test("base_unittests") { +@@ -3724,7 +3778,7 @@ test("base_unittests") { } } - if (is_fuchsia || is_linux || is_chromeos) { + if ((is_fuchsia || is_linux || is_chromeos) && !is_bsd) { sources += [ "debug/elf_reader_unittest.cc", "debug/test_elf_image_builder.cc", diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h b/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h index 2bc549c3c288..59f1794594a5 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h @@ -1,16 +1,16 @@ ---- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2022-03-28 18:11:04 UTC +--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2022-04-01 07:48:30 UTC +++ base/allocator/partition_allocator/page_allocator_internals_posix.h -@@ -346,8 +346,12 @@ bool TryRecommitSystemPagesInternal( +@@ -352,8 +352,12 @@ bool TryRecommitSystemPagesInternal( void DiscardSystemPagesInternal(uintptr_t address, size_t length) { void* ptr = reinterpret_cast(address); -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) +#if BUILDFLAG(IS_BSD) + int ret = madvise(ptr, length, MADV_FREE); +#else int ret = madvise(ptr, length, MADV_FREE_REUSABLE); +#endif if (ret) { // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED. ret = madvise(ptr, length, MADV_DONTNEED); diff --git a/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h b/www/iridium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h index 95a50e3ace2d..4a1da70acf5a 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,11 +1,20 @@ ---- base/allocator/partition_allocator/partition_alloc_config.h.orig 2022-03-28 18:11:04 UTC +--- base/allocator/partition_allocator/partition_alloc_config.h.orig 2022-04-01 07:48:30 UTC +++ base/allocator/partition_allocator/partition_alloc_config.h @@ -59,7 +59,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 +@@ -179,7 +179,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 + 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 4de1914e696f..d508f6fa4eec 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,22 +1,22 @@ ---- base/allocator/partition_allocator/partition_page.h.orig 2022-03-28 18:11:04 UTC +--- base/allocator/partition_allocator/partition_page.h.orig 2022-04-01 07:48:30 UTC +++ base/allocator/partition_allocator/partition_page.h -@@ -129,7 +129,8 @@ struct __attribute__((packed)) SlotSpanMetadata { +@@ -128,7 +128,8 @@ struct __attribute__((packed)) 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 // PartitionPageSize() is 4 times the OS page size. -@@ -143,7 +144,9 @@ struct __attribute__((packed)) SlotSpanMetadata { +@@ -142,7 +143,9 @@ struct __attribute__((packed)) 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.h b/www/iridium/files/patch-base_allocator_partition__allocator_partition__root.h index 4a6379e51130..7c08bb141fe9 100644 --- a/www/iridium/files/patch-base_allocator_partition__allocator_partition__root.h +++ b/www/iridium/files/patch-base_allocator_partition__allocator_partition__root.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/partition_root.h.orig 2022-03-28 18:11:04 UTC +--- base/allocator/partition_allocator/partition_root.h.orig 2022-04-01 07:48:30 UTC +++ base/allocator/partition_allocator/partition_root.h -@@ -1019,7 +1019,7 @@ ALWAYS_INLINE void PartitionRoot::FreeNoH +@@ -1071,7 +1071,7 @@ ALWAYS_INLINE void PartitionRoot::FreeNoH // essentially). #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && \ ((BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMECAST)) || \ - (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_64_BITS))) + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_64_BITS))) - PA_CHECK(IsManagedByPartitionAlloc(address)); + PA_CHECK(IsManagedByPartitionAlloc(object_addr)); #endif 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 2421f45fca24..fa26b7473e45 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-03-28 18:11:04 UTC +--- base/debug/stack_trace_posix.cc.orig 2022-04-01 07:48:30 UTC +++ base/debug/stack_trace_posix.cc -@@ -37,7 +37,7 @@ +@@ -38,7 +38,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 @@ -695,6 +695,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)) { @@ -712,6 +715,7 @@ class SandboxSymbolizeHelper { is_initialized_ = true; return true; +#endif } // Opens all object files and caches their file descriptors. @@ -868,7 +872,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(backtrace(trace, count)); diff --git a/www/iridium/files/patch-base_process_process__metrics__openbsd.cc b/www/iridium/files/patch-base_process_process__metrics__openbsd.cc index c7183d652d54..f23c76752eb3 100644 --- a/www/iridium/files/patch-base_process_process__metrics__openbsd.cc +++ b/www/iridium/files/patch-base_process_process__metrics__openbsd.cc @@ -1,234 +1,235 @@ ---- base/process/process_metrics_openbsd.cc.orig 2022-03-28 18:11:04 UTC +--- base/process/process_metrics_openbsd.cc.orig 2022-04-01 07:48:30 UTC +++ base/process/process_metrics_openbsd.cc @@ -4,17 +4,36 @@ #include "base/process/process_metrics.h" +#include "base/files/file_util.h" +#include "base/logging.h" +#include "base/process/internal_linux.h" +#include "base/strings/string_number_conversions.h" +#include "base/strings/string_split.h" +#include "base/strings/string_tokenizer.h" +#include "base/strings/string_util.h" +#include "base/system/sys_info.h" +#include "base/threading/thread_restrictions.h" +#include "base/notreached.h" + #include #include +#include #include #include +#include +#include + #include "base/cxx17_backports.h" #include "base/memory/ptr_util.h" #include "base/process/process_metrics_iocounters.h" +#include "base/values.h" namespace base { +ProcessMetrics::ProcessMetrics(ProcessHandle process) + : process_(process) {} + // static std::unique_ptr ProcessMetrics::CreateProcessMetrics( ProcessHandle process) { @@ -25,49 +44,24 @@ bool ProcessMetrics::GetIOCounters(IoCounters* io_coun return false; } -static int GetProcessCPU(pid_t pid) { +double ProcessMetrics::GetPlatformIndependentCPUUsage() { struct kinfo_proc info; - size_t length; - int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid, - sizeof(struct kinfo_proc), 0 }; + size_t length = sizeof(struct kinfo_proc); - if (sysctl(mib, base::size(mib), NULL, &length, NULL, 0) < 0) - return -1; + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_, + sizeof(struct kinfo_proc), 1 }; - mib[5] = (length / sizeof(struct kinfo_proc)); -- - if (sysctl(mib, base::size(mib), &info, &length, NULL, 0) < 0) -- return 0; ++ if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) + return 0.0; +- if (sysctl(mib, base::size(mib), &info, &length, NULL, 0) < 0) +- return 0; +- - return info.p_pctcpu; + return static_cast((info.p_pctcpu * 100.0) / FSCALE); } -double ProcessMetrics::GetPlatformIndependentCPUUsage() { - TimeTicks time = TimeTicks::Now(); - - if (last_cpu_time_.is_zero()) { - // First call, just set the last values. - last_cpu_time_ = time; - return 0; - } - - int cpu = GetProcessCPU(process_); - - last_cpu_time_ = time; - double percentage = static_cast((cpu * 100.0) / FSCALE); - - return percentage; -} - TimeDelta ProcessMetrics::GetCumulativeCPUUsage() { NOTREACHED(); return TimeDelta(); } -ProcessMetrics::ProcessMetrics(ProcessHandle process) - : process_(process), - last_cpu_(0) {} - size_t GetSystemCommitCharge() { int mib[] = { CTL_VM, VM_METER }; int pagesize; @@ -75,7 +69,7 @@ size_t GetSystemCommitCharge() { unsigned long mem_total, mem_free, mem_inactive; size_t len = sizeof(vmtotal); - if (sysctl(mib, base::size(mib), &vmtotal, &len, NULL, 0) < 0) + if (sysctl(mib, std::size(mib), &vmtotal, &len, NULL, 0) < 0) return 0; mem_total = vmtotal.t_vm; @@ -85,6 +79,129 @@ size_t GetSystemCommitCharge() { pagesize = getpagesize(); return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); +} + +int ProcessMetrics::GetOpenFdCount() const { + struct kinfo_file *files; + kvm_t *kd = NULL; + int total_count = 0; + char errbuf[_POSIX2_LINE_MAX]; + + if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL) + goto out; + + if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process_, + sizeof(struct kinfo_file), &total_count)) == NULL) { + total_count = 0; + goto out; + } + + kvm_close(kd); + +out: + return total_count; +} + +int ProcessMetrics::GetOpenFdSoftLimit() const { + return GetMaxFds(); +} + +uint64_t ProcessMetrics::GetVmSwapBytes() const { + NOTIMPLEMENTED(); + return 0; +} + +bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) { + NOTIMPLEMENTED_LOG_ONCE(); + 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; + +bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) { + NOTIMPLEMENTED(); + return false; +} + +bool GetVmStatInfo(VmStatInfo* vmstat) { + NOTIMPLEMENTED(); + return false; +} + +int ProcessMetrics::GetIdleWakeupsPerSecond() { + NOTIMPLEMENTED(); + return 0; +} + +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); + + NOTIMPLEMENTED(); + + return res; +} + +Value VmStatInfo::ToValue() const { + Value res(Value::Type::DICTIONARY); + res.SetIntKey("pswpin", pswpin); + res.SetIntKey("pswpout", pswpout); + res.SetIntKey("pgmajfault", pgmajfault); + + NOTIMPLEMENTED(); + + return res; +} + +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)); + + NOTIMPLEMENTED(); + + return res; } } // namespace base diff --git a/www/iridium/files/patch-base_process_process__posix.cc b/www/iridium/files/patch-base_process_process__posix.cc index b0d908c016cd..fad21c5cbcdd 100644 --- a/www/iridium/files/patch-base_process_process__posix.cc +++ b/www/iridium/files/patch-base_process_process__posix.cc @@ -1,93 +1,93 @@ ---- base/process/process_posix.cc.orig 2022-03-28 18:11:04 UTC +--- base/process/process_posix.cc.orig 2022-04-01 07:48:30 UTC +++ base/process/process_posix.cc @@ -23,10 +23,15 @@ #include "build/build_config.h" #include "third_party/abseil-cpp/absl/types/optional.h" -#if BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include #endif +#if defined(OS_BSD) +#include +#include +#endif + #if BUILDFLAG(CLANG_PROFILING) #include "base/test/clang_profiling.h" #endif @@ -95,7 +100,7 @@ bool WaitpidWithTimeout(base::ProcessHandle handle, return ret_pid > 0; } -#if BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Using kqueue on Mac so that we can wait on non-child processes. // We can't use kqueues on child processes because we need to reap // our own children using wait. @@ -200,7 +205,7 @@ bool WaitForExitWithTimeoutImpl(base::ProcessHandle ha const bool exited = (parent_pid < 0); if (!exited && parent_pid != our_pid) { -#if BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // On Mac we can wait on non child processes. return WaitForSingleNonChildProcess(handle, timeout); #else -@@ -358,7 +363,55 @@ void Process::Exited(int exit_code) const {} +@@ -356,7 +361,55 @@ void Process::Exited(int exit_code) const {} int Process::GetPriority() const { DCHECK(IsValid()); +// avoid pledge(2) violation +#if defined(OS_BSD) + return 0; +#else return getpriority(PRIO_PROCESS, process_); +#endif +} + +Time Process::CreationTime() const { +// avoid ps pledge in the network process +#if !defined(OS_BSD) + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid(), + sizeof(struct kinfo_proc), 0 }; + struct kinfo_proc *info = nullptr; + size_t info_size; +#endif + Time ct = Time(); + +#if !defined(OS_BSD) + if (sysctl(mib, base::size(mib), NULL, &info_size, NULL, 0) < 0) + goto out; + + mib[5] = (info_size / sizeof(struct kinfo_proc)); + if ((info = reinterpret_cast(malloc(info_size))) == NULL) + goto out; + + if (sysctl(mib, base::size(mib), info, &info_size, NULL, 0) < 0) + goto out; + + ct = Time::FromTimeT(info->p_ustart_sec); + +out: + if (info) + free(info); +#endif + return ct; +} + +bool Process::IsProcessBackgrounded() const { + return false; +} + +bool Process::SetProcessBackgrounded(bool value) { + return false; +} + +// static +bool Process::CanBackgroundProcesses() { + return false; } } // namespace base diff --git a/www/iridium/files/patch-base_rand__util.h b/www/iridium/files/patch-base_rand__util.h index b3634df57b2b..ec7e3e73a069 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-03-28 18:11:04 UTC +--- base/rand_util.h.orig 2022-04-01 07:48:30 UTC +++ base/rand_util.h -@@ -77,7 +77,7 @@ void RandomShuffle(Itr first, Itr last) { +@@ -81,7 +81,7 @@ void RandomShuffle(Itr first, Itr last) { std::shuffle(first, last, RandomBitGenerator()); } -#if BUILDFLAG(IS_POSIX) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_OPENBSD) BASE_EXPORT int GetUrandomFD(); #endif diff --git a/www/iridium/files/patch-base_system_sys__info__unittest.cc b/www/iridium/files/patch-base_system_sys__info__unittest.cc index fa90c69bc06b..ee7a0ff79e30 100644 --- a/www/iridium/files/patch-base_system_sys__info__unittest.cc +++ b/www/iridium/files/patch-base_system_sys__info__unittest.cc @@ -1,19 +1,19 @@ ---- base/system/sys_info_unittest.cc.orig 2022-03-28 18:11:04 UTC +--- base/system/sys_info_unittest.cc.orig 2022-04-01 07:48:30 UTC +++ base/system/sys_info_unittest.cc -@@ -228,12 +228,15 @@ TEST_F(SysInfoTest, GetHardwareInfo) { +@@ -234,12 +234,15 @@ TEST_F(SysInfoTest, GetHardwareInfo) { EXPECT_TRUE(IsStringUTF8(hardware_info->model)); bool empty_result_expected = #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) false; #else true; #endif EXPECT_EQ(hardware_info->manufacturer.empty(), empty_result_expected); +#if BUILDFLAG(IS_BSD) + empty_result_expected = true; +#endif EXPECT_EQ(hardware_info->model.empty(), empty_result_expected); } diff --git a/www/iridium/files/patch-base_threading_thread__local__storage__unittest.cc b/www/iridium/files/patch-base_threading_thread__local__storage__unittest.cc deleted file mode 100644 index 93c060b1771c..000000000000 --- a/www/iridium/files/patch-base_threading_thread__local__storage__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/threading/thread_local_storage_unittest.cc.orig 2022-03-28 18:11:04 UTC -+++ base/threading/thread_local_storage_unittest.cc -@@ -90,7 +90,7 @@ class ThreadLocalStorageRunner : public DelegateSimple - void ThreadLocalStorageCleanup(void *value) { - int *ptr = reinterpret_cast(value); - // Destructors should never be called with a NULL. -- ASSERT_NE(reinterpret_cast(NULL), ptr); -+ ASSERT_NE(NULL, ptr); - if (*ptr == kFinalTlsValue) - return; // We've been called enough times. - ASSERT_LT(kFinalTlsValue, *ptr); diff --git a/www/iridium/files/patch-base_trace__event_memory__dump__manager.cc b/www/iridium/files/patch-base_trace__event_memory__dump__manager.cc index f038812a59a5..71b039fdc759 100644 --- a/www/iridium/files/patch-base_trace__event_memory__dump__manager.cc +++ b/www/iridium/files/patch-base_trace__event_memory__dump__manager.cc @@ -1,11 +1,11 @@ ---- base/trace_event/memory_dump_manager.cc.orig 2022-03-28 18:11:04 UTC +--- base/trace_event/memory_dump_manager.cc.orig 2022-04-01 07:48:30 UTC +++ base/trace_event/memory_dump_manager.cc -@@ -78,7 +78,7 @@ const char* const MemoryDumpManager::kSystemAllocatorP +@@ -82,7 +82,7 @@ const char* const MemoryDumpManager::kSystemAllocatorP #if defined(MALLOC_MEMORY_TRACING_SUPPORTED) MallocDumpProvider::kAllocatedObjects; #else - nullptr; + ""; #endif // static diff --git a/www/iridium/files/patch-build_config_compiler_BUILD.gn b/www/iridium/files/patch-build_config_compiler_BUILD.gn index a2ad4e5b2b70..b63f65a970fb 100644 --- a/www/iridium/files/patch-build_config_compiler_BUILD.gn +++ b/www/iridium/files/patch-build_config_compiler_BUILD.gn @@ -1,185 +1,185 @@ ---- build/config/compiler/BUILD.gn.orig 2022-03-29 10:33:34 UTC +--- build/config/compiler/BUILD.gn.orig 2022-04-01 07:48:30 UTC +++ build/config/compiler/BUILD.gn @@ -236,13 +236,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 --------------------------------------------------------------------- @@ -291,7 +294,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 ((is_posix || is_fuchsia) && !is_apple && use_lld) { -@@ -873,7 +882,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) { cflags += [ "--target=arm-linux-gnueabihf" ] ldflags += [ "--target=arm-linux-gnueabihf" ] } -@@ -887,7 +896,7 @@ config("compiler_cpu_abi") { +@@ -893,7 +902,7 @@ config("compiler_cpu_abi") { cflags += [ "-mtune=$arm_tune" ] } } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_nacl && !is_fuchsia) { + if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) { cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] } -@@ -1456,7 +1465,7 @@ config("default_warnings") { +@@ -1465,7 +1474,7 @@ config("default_warnings") { "-Wno-ignored-pragma-optimize", ] - if (is_chromeos || default_toolchain == "//build/toolchain/cros:target") { + if (is_chromeos || default_toolchain == "//build/toolchain/cros:target" || is_bsd) { # TODO(https://crbug.com/1016945): Re-enable once ChromeOS toolchain is up to date cflags += [ "-Wno-builtin-assume-aligned-alignment" ] } -@@ -1628,7 +1637,7 @@ config("no_chromium_code") { +@@ -1644,7 +1653,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", -@@ -1940,8 +1949,7 @@ config("default_stack_frames") { +@@ -1956,8 +1965,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. -@@ -1979,8 +1987,7 @@ config("xoptimize") { +@@ -1995,8 +2003,7 @@ config("xoptimize") { } # Turn off optimizations. -config("no_optimize") { } -config("xno_optimize") { +config("no_optimize") { if (is_win) { cflags = [ "/Od", # Disable optimization. -@@ -2020,8 +2027,7 @@ config("xno_optimize") { +@@ -2036,8 +2043,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: -@@ -2054,8 +2060,7 @@ config("xoptimize_max") { +@@ -2070,8 +2076,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: -@@ -2081,8 +2086,7 @@ config("xoptimize_speed") { +@@ -2097,8 +2102,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 -@@ -2148,7 +2152,7 @@ config("afdo_optimize_size") { - # between //base/allocator:tcmalloc and AFDO on GCC), so we provide a separate +@@ -2163,7 +2167,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. -@@ -2164,7 +2168,7 @@ config("afdo") { +@@ -2179,7 +2183,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 ] } -@@ -2202,8 +2206,7 @@ config("win_pdbaltpath") { +@@ -2217,8 +2221,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. -@@ -2304,7 +2307,8 @@ config("xsymbols") { +@@ -2323,7 +2326,8 @@ config("xsymbols") { } } - 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. -@@ -2327,8 +2331,7 @@ config("xsymbols") { +@@ -2346,8 +2350,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 = [] -@@ -2397,8 +2400,7 @@ config("xminimal_symbols") { +@@ -2420,8 +2423,7 @@ config("xminimal_symbols") { # This configuration contains function names only. That is, the compiler is # told to not generate debug information and the linker then just puts function # names in the final debug information. -config("no_symbols") { } -config("xno_symbols") { +config("no_symbols") { if (is_win) { ldflags = [ "/DEBUG" ] diff --git a/www/iridium/files/patch-build_config_rust.gni b/www/iridium/files/patch-build_config_rust.gni index 4854abb1e5f4..d4cd8961aa4f 100644 --- a/www/iridium/files/patch-build_config_rust.gni +++ b/www/iridium/files/patch-build_config_rust.gni @@ -1,11 +1,11 @@ ---- build/config/rust.gni.orig 2022-03-28 18:11:04 UTC +--- build/config/rust.gni.orig 2022-04-01 07:48:30 UTC +++ build/config/rust.gni -@@ -84,7 +84,7 @@ if (enable_rust) { - rust_sysroot = get_path_info(rust_sysroot_absolute, "abspath") - use_unverified_rust_toolchain = true +@@ -116,7 +116,7 @@ if (enable_rust) { + rust_sysroot = "//third_party/rust-toolchain" + use_unverified_rust_toolchain = false } else { - if (host_os != "linux") { + if (host_os != "linux" && host_os != "openbsd" && host_os != "freebsd") { - assert( - false, - "Attempt to use standard Rust toolchain on an unsupported platform") + assert(false, + "Attempt to use Android Rust toolchain on an unsupported platform") + } diff --git a/www/iridium/files/patch-build_toolchain_gcc__toolchain.gni b/www/iridium/files/patch-build_toolchain_gcc__toolchain.gni index aa1f031e1c04..16f24db9ab60 100644 --- a/www/iridium/files/patch-build_toolchain_gcc__toolchain.gni +++ b/www/iridium/files/patch-build_toolchain_gcc__toolchain.gni @@ -1,35 +1,35 @@ ---- build/toolchain/gcc_toolchain.gni.orig 2022-03-28 18:11:04 UTC +--- build/toolchain/gcc_toolchain.gni.orig 2022-04-01 07:48:30 UTC +++ build/toolchain/gcc_toolchain.gni @@ -53,6 +53,13 @@ if (enable_resource_allowlist_generation) { "enable_resource_allowlist_generation=true does not work for target_os=$target_os") } +declare_args() { + extra_cflags = "" + extra_cppflags = "" + extra_cxxflags = "" + extra_ldflags = "" +} + # This template defines a toolchain for something that works like gcc # (including clang). # -@@ -747,13 +754,12 @@ template("gcc_toolchain") { +@@ -771,13 +778,12 @@ template("gcc_toolchain") { # use_gold too. template("clang_toolchain") { gcc_toolchain(target_name) { - prefix = rebase_path("$clang_base_path/bin", root_build_dir) - cc = "${prefix}/clang" - cxx = "${prefix}/clang++" + cc = "cc" + cxx = "c++" ld = cxx - readelf = "${prefix}/llvm-readelf" - ar = "${prefix}/llvm-ar" - nm = "${prefix}/llvm-nm" + readelf = "readelf" + ar = "ar" + nm = "nm" forward_variables_from(invoker, [ diff --git a/www/iridium/files/patch-cc_BUILD.gn b/www/iridium/files/patch-cc_BUILD.gn index 0c78ee7fd80f..777f4d138909 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-03-28 18:11:04 UTC +--- cc/BUILD.gn.orig 2022-04-01 07:48:30 UTC +++ cc/BUILD.gn -@@ -660,7 +660,7 @@ cc_test_static_library("test_support") { +@@ -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" ] } } -@@ -886,7 +886,6 @@ cc_test("cc_unittests") { +@@ -891,7 +891,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 d6ea13b87b4d..7f48959c413d 100644 --- a/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc +++ b/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc @@ -1,107 +1,107 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/app/chrome_main_delegate.cc -@@ -113,7 +113,7 @@ +@@ -114,7 +114,7 @@ #include "chrome/app/chrome_crash_reporter_client.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 -@@ -157,12 +157,12 @@ +@@ -158,12 +158,12 @@ #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_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 -@@ -310,7 +310,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -311,7 +311,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 -@@ -350,7 +350,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -351,7 +351,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) || -@@ -414,7 +414,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -415,7 +415,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. -@@ -498,7 +498,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat +@@ -499,7 +499,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( -@@ -679,6 +679,8 @@ void ChromeMainDelegate::PostFieldTrialInitialization( +@@ -680,6 +680,8 @@ void ChromeMainDelegate::PostFieldTrialInitialization( // 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 -@@ -801,7 +803,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi +@@ -815,7 +817,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi } // 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 -@@ -832,7 +834,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi +@@ -846,7 +848,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) 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 -@@ -1146,7 +1148,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1161,7 +1163,7 @@ void ChromeMainDelegate::PreSandboxStartup() { 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 BUILDFLAG(IS_ANDROID) -@@ -1222,7 +1224,7 @@ absl::variant Chrome +@@ -1237,7 +1239,7 @@ absl::variant Chrome // This entry is not needed on Linux, where the NaCl loader // process is launched via nacl_helper instead. -#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) {switches::kNaClLoaderProcess, NaClMain}, #else {"", nullptr}, // To avoid constant array of size 0 diff --git a/www/iridium/files/patch-chrome_app_chromium__strings.grd b/www/iridium/files/patch-chrome_app_chromium__strings.grd index ef4f1ee9e2ab..804d6dd668d0 100644 --- a/www/iridium/files/patch-chrome_app_chromium__strings.grd +++ b/www/iridium/files/patch-chrome_app_chromium__strings.grd @@ -1,29 +1,29 @@ ---- chrome/app/chromium_strings.grd.orig 2022-03-28 18:11:04 UTC +--- chrome/app/chromium_strings.grd.orig 2022-04-01 07:48:30 UTC +++ chrome/app/chromium_strings.grd @@ -298,7 +298,7 @@ If you update this file, be sure also to update google Welcome to Iridium; new browser window opened - + Welcome to Iridium -@@ -810,7 +810,7 @@ The browser is unable to recover your settings. +@@ -818,7 +818,7 @@ Permissions you've already given to websites and apps - + Your system administrator has configured the browser to open an alternative browser to access $1example.com. -@@ -936,7 +936,7 @@ The browser is unable to recover your settings. +@@ -944,7 +944,7 @@ Permissions you've already given to websites and apps - + The profile appears to be in use by another browsr process ($112345) on another computer ($2example.com). The browser has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch the browser. diff --git a/www/iridium/files/patch-chrome_app_generated__resources.grd b/www/iridium/files/patch-chrome_app_generated__resources.grd index 89ae72f87c60..d0137ece6f13 100644 --- a/www/iridium/files/patch-chrome_app_generated__resources.grd +++ b/www/iridium/files/patch-chrome_app_generated__resources.grd @@ -1,56 +1,56 @@ ---- chrome/app/generated_resources.grd.orig 2022-03-28 18:11:04 UTC +--- chrome/app/generated_resources.grd.orig 2022-04-01 07:48:30 UTC +++ chrome/app/generated_resources.grd @@ -2,7 +2,7 @@ @@ -298,7 +298,7 @@ are declared in tools/grit/grit_rule.gni. - + -@@ -2813,7 +2813,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -2833,7 +2833,7 @@ are declared in tools/grit/grit_rule.gni. - + Device Credentials -@@ -5568,7 +5568,7 @@ Keep your key file in a safe place. You will need it t +@@ -5686,7 +5686,7 @@ Keep your key file in a safe place. You will need it t - + Legacy Browser Support -@@ -8043,7 +8043,7 @@ Keep your key file in a safe place. You will need it t +@@ -8217,7 +8217,7 @@ Keep your key file in a safe place. You will need it t Google Pay - + Use system title bar and borders -@@ -9134,7 +9134,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -9372,7 +9372,7 @@ Please help our engineers fix this problem. Tell us wh Set as default - + Minimize diff --git a/www/iridium/files/patch-chrome_app_google__chrome__strings.grd b/www/iridium/files/patch-chrome_app_google__chrome__strings.grd index a3d95cdb3c73..90ca9b7127f4 100644 --- a/www/iridium/files/patch-chrome_app_google__chrome__strings.grd +++ b/www/iridium/files/patch-chrome_app_google__chrome__strings.grd @@ -1,29 +1,29 @@ ---- chrome/app/google_chrome_strings.grd.orig 2022-03-28 18:11:04 UTC +--- chrome/app/google_chrome_strings.grd.orig 2022-04-01 07:48:30 UTC +++ chrome/app/google_chrome_strings.grd @@ -303,7 +303,7 @@ chromium_strings.grd. --> Welcome to Chrome; new browser window opened - + Welcome to Google Chrome -@@ -818,7 +818,7 @@ Google Chrome is unable to recover your settings. +@@ -863,7 +863,7 @@ Permissions you've already given to websites and apps - + Your system administrator has configured Google Chrome to open an alternative browser to access $1example.com. -@@ -944,7 +944,7 @@ Google Chrome is unable to recover your settings. +@@ -1012,7 +1012,7 @@ Permissions you've already given to websites and apps - + The profile appears to be in use by another Google Chrome process ($112345) on another computer ($2example.com). Chrome has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chrome. 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 8f4efbf9c38c..77c8bf474b6a 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,11 +1,32 @@ ---- chrome/app/theme/chrome_unscaled_resources.grd.orig 2022-03-28 18:11:04 UTC +--- chrome/app/theme/chrome_unscaled_resources.grd.orig 2022-04-01 07:48:30 UTC +++ chrome/app/theme/chrome_unscaled_resources.grd -@@ -18,7 +18,7 @@ - - - +@@ -15,12 +15,12 @@ + + + +- ++ + + + + - + - - + + + +@@ -52,12 +52,12 @@ + + + +- ++ + + + +- ++ + + + diff --git a/www/iridium/files/patch-chrome_browser_about__flags.cc b/www/iridium/files/patch-chrome_browser_about__flags.cc index b08fe81d8158..ae127b2d48f8 100644 --- a/www/iridium/files/patch-chrome_browser_about__flags.cc +++ b/www/iridium/files/patch-chrome_browser_about__flags.cc @@ -1,137 +1,128 @@ ---- chrome/browser/about_flags.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/about_flags.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/about_flags.cc -@@ -205,7 +205,7 @@ +@@ -206,7 +206,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 -@@ -273,7 +273,7 @@ +@@ -275,7 +275,7 @@ #include "chrome/browser/supervised_user/supervised_user_features/supervised_user_features.h" #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) -@@ -360,7 +360,7 @@ const FeatureEntry::Choice kUseAngleChoicesMac[] = { +@@ -362,7 +362,7 @@ const FeatureEntry::Choice kUseAngleChoicesMac[] = { gl::kANGLEImplementationMetalName}}; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const FeatureEntry::Choice kOzonePlatformHintRuntimeChoices[] = { {flag_descriptions::kOzonePlatformHintChoiceDefault, "", ""}, {flag_descriptions::kOzonePlatformHintChoiceAuto, -@@ -966,7 +966,7 @@ const FeatureEntry::FeatureVariation kPageContentAnnot +@@ -976,7 +976,7 @@ const FeatureEntry::FeatureVariation kPageContentAnnot }; #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"}, -@@ -3243,7 +3243,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -3424,7 +3424,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(chromeos::kLacrosTtsSupport)}, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { "enable-accelerated-video-decode", flag_descriptions::kAcceleratedVideoDecodeName, -@@ -3648,7 +3648,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -3838,7 +3838,7 @@ const FeatureEntry kFeatureEntries[] = { {"enable-login-detection", flag_descriptions::kEnableLoginDetectionName, flag_descriptions::kEnableLoginDetectionDescription, kOsAll, FEATURE_VALUE_TYPE(login_detection::kLoginDetection)}, -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - {"enable-save-data", flag_descriptions::kEnableSaveDataName, - flag_descriptions::kEnableSaveDataDescription, kOsCrOS | kOsLinux, - SINGLE_VALUE_TYPE( -@@ -3835,7 +3835,7 @@ const FeatureEntry kFeatureEntries[] = { + {"enable-navigation-predictor", + flag_descriptions::kEnableNavigationPredictorName, + flag_descriptions::kEnableNavigationPredictorDescription, +@@ -4031,7 +4031,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWebShare)}, - #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) + #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)}, -@@ -4518,7 +4518,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4050,7 +4050,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, +@@ -4760,7 +4760,7 @@ const FeatureEntry kFeatureEntries[] = { "OmniboxBundledExperimentV1")}, #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, -@@ -4887,7 +4887,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5158,7 +5158,7 @@ const FeatureEntry kFeatureEntries[] = { #endif // BUILDFLAG(IS_ANDROID) #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) {"webui-feedback", flag_descriptions::kWebuiFeedbackName, flag_descriptions::kWebuiFeedbackDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kWebUIFeedback)}, -@@ -5897,7 +5897,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6198,7 +6198,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kMouseSubframeNoImplicitCapture)}, #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, -@@ -6607,7 +6607,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6912,7 +6912,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - {"incognito-brand-consistency-for-desktop", - flag_descriptions::kIncognitoBrandConsistencyForDesktopName, - flag_descriptions::kIncognitoBrandConsistencyForDesktopDescription, -@@ -6740,7 +6740,7 @@ const FeatureEntry kFeatureEntries[] = { + {"incognito-clear-browsing-data-dialog-for-desktop", + flag_descriptions::kIncognitoClearBrowsingDataDialogForDesktopName, + flag_descriptions::kIncognitoClearBrowsingDataDialogForDesktopDescription, +@@ -7037,7 +7037,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"commander", flag_descriptions::kCommanderName, flag_descriptions::kCommanderDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kCommander)}, -@@ -6985,7 +6985,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7291,7 +7291,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, -@@ -7129,7 +7129,7 @@ const FeatureEntry kFeatureEntries[] = { - #endif - - #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - {"enable-desktop-pwas-app-icon-shortcuts-menu-ui", - flag_descriptions::kDesktopPWAsAppIconShortcutsMenuUIName, - flag_descriptions::kDesktopPWAsAppIconShortcutsMenuUIDescription, -@@ -7685,7 +7685,7 @@ const FeatureEntry kFeatureEntries[] = { - SINGLE_VALUE_TYPE(switches::kPervasiveSystemAccentColor)}, - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - {"improve-accessibility-tree-using-local-ml", - flag_descriptions::kImproveAccessibilityTreeUsingLocalMLName, - flag_descriptions::kImproveAccessibilityTreeUsingLocalMLDescription, diff --git a/www/iridium/files/patch-chrome_browser_background_background__mode__manager.cc b/www/iridium/files/patch-chrome_browser_background_background__mode__manager.cc index 839cd28724d8..a825aaca917a 100644 --- a/www/iridium/files/patch-chrome_browser_background_background__mode__manager.cc +++ b/www/iridium/files/patch-chrome_browser_background_background__mode__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/background/background_mode_manager.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/background/background_mode_manager.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/background/background_mode_manager.cc -@@ -892,7 +892,7 @@ gfx::ImageSkia GetStatusTrayIcon() { +@@ -899,7 +899,7 @@ gfx::ImageSkia GetStatusTrayIcon() { return gfx::ImageSkia(); return family->CreateExact(size).AsImageSkia(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( IDR_PRODUCT_LOGO_128); #elif BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-chrome_browser_browser__features.cc b/www/iridium/files/patch-chrome_browser_browser__features.cc new file mode 100644 index 000000000000..94453af65c33 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_browser__features.cc @@ -0,0 +1,11 @@ +--- chrome/browser/browser_features.cc.orig 2022-04-01 07:48:30 UTC ++++ chrome/browser/browser_features.cc +@@ -29,7 +29,7 @@ const base::Feature kColorProviderRedirectionForThemeP + // the browser exits. + const base::Feature kDestroyProfileOnBrowserClose{ + "DestroyProfileOnBrowserClose", +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + }; + #else 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 19e62fec5dc4..74057c941fd9 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-03-28 18:11:04 UTC +--- chrome/browser/browser_process_impl.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/browser_process_impl.cc -@@ -209,7 +209,7 @@ +@@ -208,7 +208,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 @@ -1157,7 +1157,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 -@@ -1418,7 +1418,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1412,7 +1412,7 @@ void BrowserProcessImpl::Unpin() { // Mac is currently not supported. // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) bool BrowserProcessImpl::IsRunningInBackground() const { // Check if browser is in the background. diff --git a/www/iridium/files/patch-chrome_browser_browser__process__impl.h b/www/iridium/files/patch-chrome_browser_browser__process__impl.h index 912513395f22..9e5a00c89bcb 100644 --- a/www/iridium/files/patch-chrome_browser_browser__process__impl.h +++ b/www/iridium/files/patch-chrome_browser_browser__process__impl.h @@ -1,11 +1,11 @@ ---- chrome/browser/browser_process_impl.h.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/browser_process_impl.h.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/browser_process_impl.h -@@ -373,7 +373,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -367,7 +367,7 @@ class BrowserProcessImpl : public BrowserProcess, // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) base::RepeatingTimer autoupdate_timer_; // Gets called by autoupdate timer to see if browser needs restart and can be diff --git a/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders.cc b/www/iridium/files/patch-chrome_browser_chrome__browser__interface__binders.cc index 2c2170146cc0..2a946f8a4781 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,56 +1,71 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -97,7 +97,7 @@ +@@ -96,13 +96,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 -@@ -165,7 +165,7 @@ + + #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 +@@ -172,7 +172,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" -@@ -658,7 +658,7 @@ void PopulateChromeFrameBinders( +@@ -665,7 +665,7 @@ void PopulateChromeFrameBinders( #endif #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)); -@@ -666,7 +666,7 @@ void PopulateChromeFrameBinders( +@@ -673,7 +673,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->GetParent()) { map->Add( -@@ -706,7 +706,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -714,14 +714,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); -@@ -1013,7 +1013,7 @@ void PopulateChromeWebUIFrameBinders( + #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 +@@ -1040,7 +1040,7 @@ void PopulateChromeWebUIFrameBinders( #endif #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 ab1bd9dfa0ec..8d1ec7ac986c 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-03-28 18:11:04 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -228,11 +228,11 @@ +@@ -231,11 +231,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 -@@ -267,7 +267,7 @@ +@@ -270,7 +270,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) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" #include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h" @@ -1007,7 +1007,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { AddFirstRunNewTabs(browser_creator_.get(), 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 . @@ -1020,7 +1020,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( @@ -1041,7 +1041,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) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::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 fb0d0cf6898f..e95e330eed44 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,136 +1,159 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -373,7 +373,7 @@ +@@ -374,7 +374,7 @@ #include "services/service_manager/public/mojom/interface_provider_spec.mojom.h" #include "storage/browser/file_system/external_mount_points.h" #include "third_party/cros_system_api/switches/chrome_switches.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" -@@ -442,17 +442,17 @@ +@@ -444,17 +444,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" -@@ -461,7 +461,7 @@ +@@ -462,12 +462,12 @@ + #include "components/crash/content/browser/crash_handler_host_linux.h" + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "chrome/browser/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) -@@ -483,11 +483,11 @@ +@@ -489,11 +489,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" -@@ -870,7 +870,7 @@ blink::mojom::AutoplayPolicy GetAutoplayPolicyForWebCo +@@ -880,7 +880,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; -@@ -1370,7 +1370,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( +@@ -1376,7 +1376,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( #elif BUILDFLAG(IS_CHROMEOS_LACROS) main_parts = std::make_unique( std::move(parameters), &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( std::move(parameters), &startup_data_); #elif BUILDFLAG(IS_ANDROID) -@@ -1404,7 +1404,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( +@@ -1410,7 +1410,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( 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 -@@ -1421,7 +1421,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( +@@ -1427,7 +1427,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( 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()); -@@ -2161,6 +2161,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2101,7 +2101,7 @@ bool ChromeContentBrowserClient::AreDirectSocketsAllow + Profile* profile = Profile::FromBrowserContext(context); + return profile && profile->GetPrefs()->GetBoolean( + policy::policy_prefs::kEnableDirectSockets); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // There are currently no reliable way to determine managed status on Linux. + return false; + #elif BUILDFLAG(IS_MAC) +@@ -2190,6 +2190,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()) { -@@ -2474,7 +2476,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2498,7 +2500,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin ThreadProfilerConfiguration::Get()->AppendCommandLineSwitchForChildProcess( command_line); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Processes may only query perf_event_open with the BPF sandbox disabled. if (browser_command_line.HasSwitch(switches::kEnableThreadInstructionCount) && command_line->HasSwitch(sandbox::policy::switches::kNoSandbox)) { -@@ -3846,7 +3848,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -3880,7 +3882,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, -@@ -4258,7 +4260,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4292,14 +4294,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); -@@ -4291,7 +4293,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4332,7 +4334,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 4004a69cb7ca..775dde2be907 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-03-28 18:11:04 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -410,7 +410,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -417,7 +417,7 @@ class ChromeContentBrowserClient : public content::Con void OverridePageVisibilityState( content::RenderFrameHost* render_frame_host, content::PageVisibilityState* visibility_state) override; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, diff --git a/www/iridium/files/patch-chrome_browser_defaults.cc b/www/iridium/files/patch-chrome_browser_defaults.cc index fc57cc038b16..daff6ce7a409 100644 --- a/www/iridium/files/patch-chrome_browser_defaults.cc +++ b/www/iridium/files/patch-chrome_browser_defaults.cc @@ -1,11 +1,11 @@ ---- chrome/browser/defaults.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/defaults.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/defaults.cc -@@ -50,7 +50,7 @@ const bool kSyncAutoStarts = false; +@@ -48,7 +48,7 @@ const bool kSyncAutoStarts = true; + const bool kSyncAutoStarts = false; + #endif - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool kScrollEventChangesTab = true; #else const bool kScrollEventChangesTab = false; 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 4c9f540ba960..211cb0a1028f 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,47 +1,47 @@ ---- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1539,7 +1539,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1541,7 +1541,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe target_info->is_filetype_handled_safely) DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (item->GetOriginalMimeType() == "application/x-x509-user-cert") DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true); #endif -@@ -1608,7 +1608,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1610,7 +1610,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(); } -@@ -1716,7 +1716,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -1718,7 +1718,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()) { -@@ -1758,7 +1758,7 @@ std::unique_ptr +@@ -1760,7 +1760,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 -@@ -1774,7 +1774,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl +@@ -1776,7 +1776,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) if (!base::FeatureList::IsEnabled( download::features::kAllowSavePackageScanning)) { std::move(callback).Run(true); 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 593faa364869..49f14ac32745 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,20 +1,20 @@ ---- chrome/browser/download/download_item_model.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/download/download_item_model.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/download/download_item_model.cc -@@ -636,7 +636,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -640,7 +640,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(); -@@ -677,7 +677,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand +@@ -681,7 +681,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); diff --git a/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn b/www/iridium/files/patch-chrome_browser_extensions_BUILD.gn index 773830147c95..37560db6f1c2 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-03-28 18:11:04 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1298,6 +1298,10 @@ static_library("extensions") { +@@ -1299,6 +1299,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_settings__private_prefs__util.cc b/www/iridium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc index b15df5d7d358..28742ea1988b 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-03-28 18:11:04 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -181,7 +181,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -182,7 +182,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 -@@ -195,7 +195,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -196,7 +196,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist 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] = settings_api::PrefType::PREF_TYPE_BOOLEAN; #endif 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 4ec25f0412fe..6b9b9043fe8a 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-03-28 18:11:04 UTC +--- chrome/browser/extensions/external_provider_impl.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/extensions/external_provider_impl.cc -@@ -816,7 +816,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -818,7 +818,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( -@@ -844,7 +844,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -846,7 +846,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_flag__descriptions.cc b/www/iridium/files/patch-chrome_browser_flag__descriptions.cc index 7c6c45e14385..1c3cfa8f1871 100644 --- a/www/iridium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/iridium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,56 +1,56 @@ ---- chrome/browser/flag_descriptions.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/flag_descriptions.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/flag_descriptions.cc -@@ -5323,7 +5323,7 @@ const char kDownloadShelfWebUIDescription[] = +@@ -5508,7 +5508,7 @@ const char kDownloadShelfWebUIDescription[] = // Random platform combinations ----------------------------------------------- #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) - const char kWebUIBrandingUpdateName[] = "WebUI Branding Update"; - const char kWebUIBrandingUpdateDescription[] = -@@ -5338,7 +5338,7 @@ const char kWebuiFeedbackDescription[] = + const char kWebuiFeedbackName[] = "WebUI Feedback"; + const char kWebuiFeedbackDescription[] = +@@ -5519,7 +5519,7 @@ const char kWebuiFeedbackDescription[] = // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kCommanderName[] = "Commander"; const char kCommanderDescription[] = -@@ -5357,7 +5357,7 @@ const char kDesktopDetailedLanguageSettingsDescription - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - // BUILDFLAG(IS_FUCHSIA) - --#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const char kImproveAccessibilityTreeUsingLocalMLName[] = - "Enable improving accessibility tree using local machine learning library."; - const char kImproveAccessibilityTreeUsingLocalMLDescription[] = -@@ -5372,7 +5372,7 @@ const char kWebShareDescription[] = +@@ -5545,7 +5545,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"; -@@ -5384,7 +5384,7 @@ const char kOzonePlatformHintDescription[] = +@@ -5557,7 +5557,7 @@ const char kOzonePlatformHintDescription[] = "\"X11\". \"Auto\" selects Wayland if possible, X11 otherwise. "; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#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[] = -@@ -5500,7 +5500,7 @@ const char kElasticOverscrollDescription[] = +@@ -5570,7 +5570,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."; +@@ -5687,7 +5687,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 83ac6c9fc391..852395a2e121 100644 --- a/www/iridium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/iridium/files/patch-chrome_browser_flag__descriptions.h @@ -1,47 +1,47 @@ ---- chrome/browser/flag_descriptions.h.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/flag_descriptions.h.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/flag_descriptions.h -@@ -3070,7 +3070,7 @@ extern const char kDownloadShelfWebUIDescription[]; +@@ -3178,7 +3178,7 @@ extern const char kDownloadShelfWebUIDescription[]; // Random platform combinations ----------------------------------------------- #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) - extern const char kWebUIBrandingUpdateName[]; - extern const char kWebUIBrandingUpdateDescription[]; -@@ -3082,7 +3082,7 @@ extern const char kWebuiFeedbackDescription[]; + extern const char kWebuiFeedbackName[]; + extern const char kWebuiFeedbackDescription[]; +@@ -3187,7 +3187,7 @@ extern const char kWebuiFeedbackDescription[]; // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kCommanderName[]; extern const char kCommanderDescription[]; -@@ -3096,7 +3096,7 @@ extern const char kDesktopDetailedLanguageSettingsDesc - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - // defined (OS_FUCHSIA) - --#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - - extern const char kImproveAccessibilityTreeUsingLocalMLName[]; - extern const char kImproveAccessibilityTreeUsingLocalMLDescription[]; -@@ -3107,7 +3107,7 @@ extern const char kWebShareName[]; +@@ -3206,7 +3206,7 @@ extern const char kWebShareName[]; extern const char kWebShareDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kOzonePlatformHintChoiceDefault[]; extern const char kOzonePlatformHintChoiceAuto[]; extern const char kOzonePlatformHintChoiceX11[]; -@@ -3197,7 +3197,7 @@ extern const char kElasticOverscrollDescription[]; +@@ -3222,7 +3222,7 @@ 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) +@@ -3304,7 +3304,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[]; #endif diff --git a/www/iridium/files/patch-chrome_browser_headless_headless__mode__util.cc b/www/iridium/files/patch-chrome_browser_headless_headless__mode__util.cc index 006cdbc07e24..44147d0b50b6 100644 --- a/www/iridium/files/patch-chrome_browser_headless_headless__mode__util.cc +++ b/www/iridium/files/patch-chrome_browser_headless_headless__mode__util.cc @@ -1,29 +1,29 @@ ---- chrome/browser/headless/headless_mode_util.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/headless/headless_mode_util.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/headless/headless_mode_util.cc @@ -9,7 +9,7 @@ - // Native headless is currently available only on Linux and Windows platforms. + // Native headless is currently available on Linux, Windows and Mac platforms. // More platforms will be added later, so avoid function level clutter by // providing stub implementations at the end of the file. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include #include @@ -17,7 +17,7 @@ #include "base/base_switches.h" #include "ui/gfx/switches.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) @@ -51,7 +51,7 @@ void SetUpCommandLine(const base::CommandLine* command base::CommandLine::ForCurrentProcess()->AppendSwitch( ::switches::kNoErrorDialogs); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Native headless chrome on Linux relies on ozone/headless platform. base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( ::switches::kOzonePlatform, switches::kHeadless); diff --git a/www/iridium/files/patch-chrome_browser_media_router_discovery_BUILD.gn b/www/iridium/files/patch-chrome_browser_media_router_discovery_BUILD.gn index 70f82fcf095e..c90a233b8f79 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-03-28 18:11:04 UTC +--- chrome/browser/media/router/discovery/BUILD.gn.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/media/router/discovery/BUILD.gn -@@ -93,7 +93,7 @@ static_library("discovery") { +@@ -94,7 +94,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_metrics_chrome__browser__main__extra__parts__metrics.cc b/www/iridium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc index 712a5598d575..c83720399e82 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-03-28 18:11:04 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -58,8 +58,10 @@ +@@ -57,8 +57,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" -@@ -224,7 +226,7 @@ void RecordStartupMetrics() { +@@ -223,7 +225,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 979b0beb890b..dc9485b16cbe 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,29 +1,29 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -752,7 +752,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -773,7 +773,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()); -@@ -848,7 +848,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -869,7 +869,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) -@@ -1024,7 +1024,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1045,7 +1045,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // This creates the DesktopProfileSessionDurationsServices if it didn't exist // already. diff --git a/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.cc b/www/iridium/files/patch-chrome_browser_net_system__network__context__manager.cc index 50b569177ff3..89a5cd56d727 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-03-28 18:11:04 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/net/system_network_context_manager.cc @@ -84,7 +84,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" -@@ -137,7 +137,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut +@@ -144,7 +144,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) -@@ -369,7 +369,7 @@ SystemNetworkContextManager::SystemNetworkContextManag - pref_change_registrar_.Add(prefs::kBasicAuthOverHttpEnabled, +@@ -377,7 +377,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) -@@ -427,7 +427,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -437,7 +437,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterStringPref(prefs::kAuthServerAllowlist, std::string()); registry->RegisterStringPref(prefs::kAuthNegotiateDelegateAllowlist, std::string()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kAuthNegotiateDelegateByKdcPolicy, false); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc b/www/iridium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc index b21f3ae1afe9..0874da625e53 100644 --- a/www/iridium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc +++ b/www/iridium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc @@ -1,38 +1,38 @@ ---- chrome/browser/notifications/notification_display_service_impl.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/notifications/notification_display_service_impl.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/notifications/notification_display_service_impl.cc -@@ -31,7 +31,7 @@ +@@ -32,7 +32,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/send_tab_to_self/desktop_notification_handler.h" #include "chrome/browser/sharing/sharing_notification_handler.h" #endif -@@ -64,7 +64,7 @@ NotificationDisplayServiceImpl* NotificationDisplaySer +@@ -65,7 +65,7 @@ NotificationDisplayServiceImpl* NotificationDisplaySer // static void NotificationDisplayServiceImpl::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kAllowNativeNotifications, true); registry->RegisterBooleanPref(prefs::kAllowSystemNotifications, true); #endif -@@ -81,7 +81,7 @@ NotificationDisplayServiceImpl::NotificationDisplaySer +@@ -82,7 +82,7 @@ NotificationDisplayServiceImpl::NotificationDisplaySer std::make_unique()); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) AddNotificationHandler( NotificationHandler::Type::SEND_TAB_TO_SELF, std::make_unique( -@@ -89,7 +89,7 @@ NotificationDisplayServiceImpl::NotificationDisplaySer +@@ -90,7 +90,7 @@ NotificationDisplayServiceImpl::NotificationDisplaySer #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) AddNotificationHandler( NotificationHandler::Type::TAILORED_SECURITY, std::make_unique()); diff --git a/www/iridium/files/patch-chrome_browser_performance__monitor_process__metrics__recorder__util.cc b/www/iridium/files/patch-chrome_browser_performance__monitor_process__metrics__recorder__util.cc index b42cd80d7f09..c9bb97b3ea66 100644 --- a/www/iridium/files/patch-chrome_browser_performance__monitor_process__metrics__recorder__util.cc +++ b/www/iridium/files/patch-chrome_browser_performance__monitor_process__metrics__recorder__util.cc @@ -1,11 +1,11 @@ ---- chrome/browser/performance_monitor/process_metrics_recorder_util.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/performance_monitor/process_metrics_recorder_util.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/performance_monitor/process_metrics_recorder_util.cc -@@ -42,7 +42,7 @@ void RecordProcessHistograms(const char* histogram_suf +@@ -39,7 +39,7 @@ void RecordProcessHistograms(const char* histogram_suf metrics.cpu_usage * kCPUUsageFactor, kCPUUsageHistogramMin, kCPUUsageHistogramMax, kCPUUsageHistogramBucketCount); #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) base::UmaHistogramCounts10000( base::JoinString({"PerformanceMonitor.IdleWakeups.", histogram_suffix}, ""), diff --git a/www/iridium/files/patch-chrome_browser_performance__monitor_process__monitor.h b/www/iridium/files/patch-chrome_browser_performance__monitor_process__monitor.h index fcc2bb2d5126..90a31ee2631a 100644 --- a/www/iridium/files/patch-chrome_browser_performance__monitor_process__monitor.h +++ b/www/iridium/files/patch-chrome_browser_performance__monitor_process__monitor.h @@ -1,11 +1,11 @@ ---- chrome/browser/performance_monitor/process_monitor.h.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/performance_monitor/process_monitor.h.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/performance_monitor/process_monitor.h -@@ -56,7 +56,7 @@ class ProcessMonitor { +@@ -52,7 +52,7 @@ class ProcessMonitor { double cpu_usage = 0.0; #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Returns the number of average idle cpu wakeups per second since the last // time the metric was sampled. int idle_wakeups = 0; diff --git a/www/iridium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc b/www/iridium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc index e116e38f7577..a674a17985df 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,47 +1,47 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -1443,7 +1443,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1456,7 +1456,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // !BUILDFLAG(IS_MAC) && !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 }, -@@ -1552,7 +1552,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1565,7 +1565,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(ENABLE_EXTENSIONS) && (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)) +#if BUILDFLAG(ENABLE_EXTENSIONS) && (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) { key::kChromeAppsEnabled, extensions::pref_names::kChromeAppsEnabled, base::Value::Type::BOOLEAN }, -@@ -1848,7 +1848,7 @@ std::unique_ptr BuildH +@@ -1885,7 +1885,7 @@ std::unique_ptr BuildH #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique< enterprise_connectors::EnterpriseConnectorsPolicyHandler>( -@@ -2213,7 +2213,7 @@ std::unique_ptr BuildH +@@ -2256,7 +2256,7 @@ std::unique_ptr BuildH SimpleSchemaValidatingPolicyHandler::MANDATORY_ALLOWED)); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique( key::kWebAppSettings, prefs::kWebAppSettings, chrome_schema, SCHEMA_ALLOW_UNKNOWN, -@@ -2244,7 +2244,7 @@ std::unique_ptr BuildH +@@ -2287,7 +2287,7 @@ std::unique_ptr BuildH policy::key::kSpellcheckLanguageBlocklist)); #endif // BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique( std::make_unique(key::kAllowNativeNotifications, prefs::kAllowNativeNotifications, 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 04a4318d0bb7..71d0e148e2ed 100644 --- a/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc +++ b/www/iridium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -1,46 +1,46 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/prefs/browser_prefs.cc @@ -418,14 +418,14 @@ #include "components/os_crypt/os_crypt.h" #endif -#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/web_applications/url_handler_prefs.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 -@@ -1131,7 +1131,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) +@@ -1139,7 +1139,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) // TODO(crbug/1169547) Remove `BUILDFLAG(IS_CHROMEOS_LACROS)` once the // migration is complete. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) enterprise_connectors::RegisterLocalPrefs(registry); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -1163,7 +1163,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) +@@ -1171,7 +1171,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) web_app::url_handler_prefs::RegisterLocalStatePrefs(registry); #endif -@@ -1460,7 +1460,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -1469,7 +1469,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync // 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 diff --git a/www/iridium/files/patch-chrome_browser_process__singleton__posix.cc b/www/iridium/files/patch-chrome_browser_process__singleton__posix.cc index e3c3890ea524..741ea318daa3 100644 --- a/www/iridium/files/patch-chrome_browser_process__singleton__posix.cc +++ b/www/iridium/files/patch-chrome_browser_process__singleton__posix.cc @@ -1,35 +1,35 @@ ---- chrome/browser/process_singleton_posix.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/process_singleton_posix.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/process_singleton_posix.cc -@@ -97,12 +97,12 @@ +@@ -98,12 +98,12 @@ #include "net/base/network_interfaces.h" #include "ui/base/l10n/l10n_util.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/process_singleton_dialog_linux.h" #endif #if defined(TOOLKIT_VIEWS) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) #include "ui/views/linux_ui/linux_ui.h" #endif -@@ -356,7 +356,7 @@ bool DisplayProfileInUseError(const base::FilePath& lo +@@ -357,7 +357,7 @@ bool DisplayProfileInUseError(const base::FilePath& lo if (g_disable_prompt) return g_user_opted_unlock_in_use_profile; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::u16string relaunch_button_text = l10n_util::GetStringUTF16(IDS_PROFILE_IN_USE_LINUX_RELAUNCH); return ShowProcessSingletonDialog(error, relaunch_button_text); -@@ -935,7 +935,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::Notif +@@ -926,7 +926,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::Notif return PROCESS_NONE; } else if (strncmp(buf, kACKToken, base::size(kACKToken) - 1) == 0) { #if defined(TOOLKIT_VIEWS) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) // Likely NULL in unit tests. views::LinuxUI* linux_ui = views::LinuxUI::instance(); if (linux_ui) 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 23e9698d51d8..6ef951573943 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,11 +1,11 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -385,7 +385,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -393,7 +393,7 @@ 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 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 86c9e66c590f..ef57e867a8ec 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-03-28 18:11:04 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -264,6 +264,10 @@ +@@ -263,6 +263,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; -@@ -850,7 +854,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -848,7 +852,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 be50a30baf89..a4e5f01fb39e 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-03-28 18:11:04 UTC +--- chrome/browser/renderer_preferences_util.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/renderer_preferences_util.cc -@@ -41,7 +41,7 @@ - #include "ui/base/cocoa/defaults_utils.h" +@@ -37,7 +37,7 @@ + #include "ui/views/controls/textfield/textfield.h" #endif -#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" #include "ui/views/linux_ui/linux_ui.h" -@@ -169,7 +169,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc - prefs->caret_blink_interval = interval; +@@ -159,7 +159,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc + prefs->caret_blink_interval = views::Textfield::GetCaretBlinkInterval(); #endif -#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) views::LinuxUI* linux_ui = views::LinuxUI::instance(); if (linux_ui) { if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) { -@@ -189,7 +189,7 @@ void UpdateFromSystemSettings(blink::RendererPreferenc +@@ -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_new__tab__page_new__tab__page.js b/www/iridium/files/patch-chrome_browser_resources_new__tab__page_new__tab__page.js deleted file mode 100644 index a63915732770..000000000000 --- a/www/iridium/files/patch-chrome_browser_resources_new__tab__page_new__tab__page.js +++ /dev/null @@ -1,13 +0,0 @@ ---- chrome/browser/resources/new_tab_page/new_tab_page.js.orig 2022-03-28 18:11:04 UTC -+++ chrome/browser/resources/new_tab_page/new_tab_page.js -@@ -21,10 +21,6 @@ export {chromeCartDescriptor as chromeCartV2Descriptor - export {DriveProxy} from './modules/drive/drive_module_proxy.js'; - export {driveDescriptor} from './modules/drive/module.js'; - export {driveDescriptor as driveV2Descriptor} from './modules/drive_v2/module.js'; --// --export {FooProxy} from './modules/dummy_v2/foo_proxy.js'; --export {dummyV2Descriptor} from './modules/dummy_v2/module.js'; --// - export {InfoDialogElement} from './modules/info_dialog.js'; - export {InitializeModuleCallback, Module, ModuleDescriptor, ModuleDescriptorV2, ModuleHeight} from './modules/module_descriptor.js'; - export {ModuleHeaderElement} from './modules/module_header.js'; diff --git a/www/iridium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.ts b/www/iridium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.ts index 8bcd58ca2730..2806916cf6fa 100644 --- a/www/iridium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.ts +++ b/www/iridium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.ts @@ -1,51 +1,51 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_page.ts.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/resources/settings/appearance_page/appearance_page.ts.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/resources/settings/appearance_page/appearance_page.ts -@@ -145,7 +145,7 @@ export class SettingsAppearancePageElement extends +@@ -146,7 +146,7 @@ export class SettingsAppearancePageElement extends 'prefs.autogenerated.theme.policy.color.controlledBy)', }, - // + // /** * Whether to show the "Custom Chrome Frame" setting. */ -@@ -167,7 +167,7 @@ export class SettingsAppearancePageElement extends +@@ -168,7 +168,7 @@ export class SettingsAppearancePageElement extends 'themeChanged_(' + 'prefs.extensions.theme.id.value, useSystemTheme_, isForcedTheme_)', - // + // // NOTE: this pref only exists on Linux. 'useSystemThemePrefChanged_(prefs.extensions.theme.use_system.value)', // -@@ -186,7 +186,7 @@ export class SettingsAppearancePageElement extends +@@ -187,7 +187,7 @@ export class SettingsAppearancePageElement extends private showReaderModeOption_: boolean; private isForcedTheme_: boolean; - // + // private showCustomChromeFrame_: boolean; // -@@ -264,7 +264,7 @@ export class SettingsAppearancePageElement extends +@@ -265,7 +265,7 @@ export class SettingsAppearancePageElement extends this.appearanceBrowserProxy_.useDefaultTheme(); } - // + // private useSystemThemePrefChanged_(useSystemTheme: boolean) { this.useSystemTheme_ = useSystemTheme; } -@@ -325,10 +325,10 @@ export class SettingsAppearancePageElement extends +@@ -326,10 +326,10 @@ export class SettingsAppearancePageElement extends } let i18nId; - // + // i18nId = useSystemTheme ? 'systemTheme' : 'classicTheme'; // - // + // i18nId = 'chooseFromWebStore'; // this.themeSublabel_ = this.i18n(i18nId); diff --git a/www/iridium/files/patch-chrome_browser_resources_settings_route.ts b/www/iridium/files/patch-chrome_browser_resources_settings_route.ts index 4f0e946c8706..1be67024a4d9 100644 --- a/www/iridium/files/patch-chrome_browser_resources_settings_route.ts +++ b/www/iridium/files/patch-chrome_browser_resources_settings_route.ts @@ -1,11 +1,11 @@ ---- chrome/browser/resources/settings/route.ts.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/resources/settings/route.ts.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/resources/settings/route.ts -@@ -179,7 +179,7 @@ function createBrowserSettingsRoutes(): SettingsRoutes +@@ -185,7 +185,7 @@ function createBrowserSettingsRoutes(): SettingsRoutes r.ACCESSIBILITY = r.ADVANCED.createSection('/accessibility', 'a11y'); - // + // r.CAPTIONS = r.ACCESSIBILITY.createChild('/captions'); // diff --git a/www/iridium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc b/www/iridium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc index c98ff3653cc7..6d2fc17c09df 100644 --- a/www/iridium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc +++ b/www/iridium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc @@ -1,29 +1,29 @@ ---- chrome/browser/safe_browsing/download_protection/file_analyzer.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/safe_browsing/download_protection/file_analyzer.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/safe_browsing/download_protection/file_analyzer.cc -@@ -20,7 +20,7 @@ - #include "components/safe_browsing/core/common/features.h" +@@ -21,7 +21,7 @@ #include "content/public/browser/browser_thread.h" + #include "url/gurl.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) | BUILDFLAG(IS_BSD) #include "chrome/browser/safe_browsing/download_protection/document_analysis_service.h" #endif -@@ -101,7 +101,7 @@ void FileAnalyzer::Start(const base::FilePath& target_ +@@ -102,7 +102,7 @@ void FileAnalyzer::Start(const base::FilePath& target_ } else if (inspection_type == DownloadFileType::DMG) { StartExtractDmgFeatures(); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) } else if (base::FeatureList::IsEnabled( safe_browsing::kClientSideDetectionDocumentScanning) && inspection_type == DownloadFileType::OFFICE_DOCUMENT) { -@@ -285,7 +285,7 @@ void FileAnalyzer::OnDmgAnalysisFinished( +@@ -286,7 +286,7 @@ void FileAnalyzer::OnDmgAnalysisFinished( } #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) void FileAnalyzer::StartExtractDocumentFeatures() { DCHECK_CURRENTLY_ON(BrowserThread::UI); diff --git a/www/iridium/files/patch-chrome_browser_signin_signin__util.cc b/www/iridium/files/patch-chrome_browser_signin_signin__util.cc index b73e362c2332..8584a6ab20b4 100644 --- a/www/iridium/files/patch-chrome_browser_signin_signin__util.cc +++ b/www/iridium/files/patch-chrome_browser_signin_signin__util.cc @@ -1,11 +1,11 @@ ---- chrome/browser/signin/signin_util.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/signin/signin_util.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/signin/signin_util.cc -@@ -41,7 +41,7 @@ +@@ -39,7 +39,7 @@ #include "ui/base/l10n/l10n_util.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_list_observer.h" diff --git a/www/iridium/files/patch-chrome_browser_sync_chrome__sync__client.cc b/www/iridium/files/patch-chrome_browser_sync_chrome__sync__client.cc index b764a9d21568..40ddda2d47fa 100644 --- a/www/iridium/files/patch-chrome_browser_sync_chrome__sync__client.cc +++ b/www/iridium/files/patch-chrome_browser_sync_chrome__sync__client.cc @@ -1,11 +1,11 @@ ---- chrome/browser/sync/chrome_sync_client.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/sync/chrome_sync_client.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/sync/chrome_sync_client.cc -@@ -420,7 +420,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy +@@ -412,7 +412,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy // Chrome prefers OS provided spell checkers where they exist. So only sync the // custom dictionary on platforms that typically don't provide one. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Dictionary sync is enabled by default. if (GetPrefService()->GetBoolean(spellcheck::prefs::kSpellCheckEnable)) { controllers.push_back( diff --git a/www/iridium/files/patch-chrome_browser_themes_theme__helper.cc b/www/iridium/files/patch-chrome_browser_themes_theme__helper.cc index ca3e969175b8..46cddabddceb 100644 --- a/www/iridium/files/patch-chrome_browser_themes_theme__helper.cc +++ b/www/iridium/files/patch-chrome_browser_themes_theme__helper.cc @@ -1,11 +1,11 @@ ---- chrome/browser/themes/theme_helper.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/themes/theme_helper.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/themes/theme_helper.cc -@@ -334,7 +334,7 @@ bool ThemeHelper::ShouldUseIncreasedContrastThemeSuppl +@@ -297,7 +297,7 @@ bool ThemeHelper::ShouldUseIncreasedContrastThemeSuppl ui::NativeTheme* native_theme) const { // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // On Linux the GTK system theme provides the high contrast colors, // so don't use the IncreasedContrastThemeSupplier. return false; diff --git a/www/iridium/files/patch-chrome_browser_ui_browser__command__controller.cc b/www/iridium/files/patch-chrome_browser_ui_browser__command__controller.cc index 02445e870a7a..75faa8bd930f 100644 --- a/www/iridium/files/patch-chrome_browser_ui_browser__command__controller.cc +++ b/www/iridium/files/patch-chrome_browser_ui_browser__command__controller.cc @@ -1,38 +1,38 @@ ---- chrome/browser/ui/browser_command_controller.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/browser_command_controller.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/browser_command_controller.cc @@ -88,7 +88,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 "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h" #endif -@@ -274,7 +274,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( +@@ -277,7 +277,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( // 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 this key was registered by the user as a content editing hotkey, then // it is not reserved. ui::TextEditKeyBindingsDelegateAuraLinux* delegate = -@@ -510,7 +510,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -513,7 +513,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) case IDC_MINIMIZE_WINDOW: browser_->window()->Minimize(); break; -@@ -1026,7 +1026,7 @@ void BrowserCommandController::InitCommandState() { +@@ -1040,7 +1040,7 @@ void BrowserCommandController::InitCommandState() { #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_MAXIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_RESTORE_WINDOW, true); diff --git a/www/iridium/files/patch-chrome_browser_ui_chrome__pages.cc b/www/iridium/files/patch-chrome_browser_ui_chrome__pages.cc new file mode 100644 index 000000000000..b2635c303024 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_ui_chrome__pages.cc @@ -0,0 +1,11 @@ +--- chrome/browser/ui/chrome_pages.cc.orig 2022-04-01 07:48:30 UTC ++++ chrome/browser/ui/chrome_pages.cc +@@ -550,7 +550,7 @@ void ShowBrowserSigninOrSettings(Browser* browser, + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + void ShowWebAppSettings(Browser* browser, + const std::string& app_id, + web_app::AppSettingsPageEntryPoint entry_point) { diff --git a/www/iridium/files/patch-chrome_browser_ui_chrome__pages.h b/www/iridium/files/patch-chrome_browser_ui_chrome__pages.h new file mode 100644 index 000000000000..8a60314adda2 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_ui_chrome__pages.h @@ -0,0 +1,20 @@ +--- chrome/browser/ui/chrome_pages.h.orig 2022-04-01 07:48:30 UTC ++++ chrome/browser/ui/chrome_pages.h +@@ -26,7 +26,7 @@ + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + #include "chrome/browser/web_applications/web_app_utils.h" + #endif + +@@ -201,7 +201,7 @@ void ShowBrowserSigninOrSettings(Browser* browser, + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + // Show chrome://app-settings/ page. + void ShowWebAppSettings(Browser* browser, + const std::string& app_id, diff --git a/www/iridium/files/patch-chrome_browser_ui_color_native__chrome__color__mixer.cc b/www/iridium/files/patch-chrome_browser_ui_color_native__chrome__color__mixer.cc new file mode 100644 index 000000000000..ce776ea8d881 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_ui_color_native__chrome__color__mixer.cc @@ -0,0 +1,11 @@ +--- chrome/browser/ui/color/native_chrome_color_mixer.cc.orig 2022-04-01 07:48:30 UTC ++++ chrome/browser/ui/color/native_chrome_color_mixer.cc +@@ -6,7 +6,7 @@ + + #include "build/build_config.h" + +-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD) + void AddNativeChromeColorMixer(ui::ColorProvider* provider, + const ui::ColorProviderManager::Key& key) {} + #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_signin__view__controller.cc b/www/iridium/files/patch-chrome_browser_ui_signin__view__controller.cc index 29350889b7a2..0511c57ff723 100644 --- a/www/iridium/files/patch-chrome_browser_ui_signin__view__controller.cc +++ b/www/iridium/files/patch-chrome_browser_ui_signin__view__controller.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/signin_view_controller.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/signin_view_controller.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/signin_view_controller.cc -@@ -253,7 +253,7 @@ void SigninViewController::ShowModalEnterpriseConfirma +@@ -259,7 +259,7 @@ void SigninViewController::ShowModalEnterpriseConfirma SkColor profile_color, base::OnceCallback callback) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CloseModalSignin(); dialog_ = std::make_unique( SigninViewControllerDelegate::CreateEnterpriseConfirmationDelegate( diff --git a/www/iridium/files/patch-chrome_browser_ui_signin_dice__web__signin__interceptor__delegate.cc b/www/iridium/files/patch-chrome_browser_ui_signin_dice__web__signin__interceptor__delegate.cc deleted file mode 100644 index d129890da357..000000000000 --- a/www/iridium/files/patch-chrome_browser_ui_signin_dice__web__signin__interceptor__delegate.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/ui/signin/dice_web_signin_interceptor_delegate.cc.orig 2022-03-28 18:11:04 UTC -+++ chrome/browser/ui/signin/dice_web_signin_interceptor_delegate.cc -@@ -66,7 +66,7 @@ class ForcedEnterpriseSigninInterceptionHandle - void ShowEnterpriseProfileInterceptionDialog(const AccountInfo& account_info, - SkColor profile_color) { - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_LACROS) -+ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - if (base::FeatureList::IsEnabled(kAccountPoliciesLoadedWithoutSync)) { - browser_->signin_view_controller()->ShowModalEnterpriseConfirmationDialog( - account_info, profile_color, diff --git a/www/iridium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc b/www/iridium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc index f444ac3d4115..b8276f73efc2 100644 --- a/www/iridium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc +++ b/www/iridium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc @@ -1,53 +1,53 @@ ---- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/startup/startup_browser_creator.cc -@@ -124,12 +124,12 @@ +@@ -126,12 +126,12 @@ #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/ui/startup/web_app_url_handling_startup_utils.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/ui/startup/web_app_info_recorder_utils.h" #endif -@@ -414,7 +414,7 @@ bool MaybeLaunchAppShortcutWindow(const base::CommandL +@@ -518,7 +518,7 @@ bool MaybeLaunchAppShortcutWindow(const base::CommandL return false; } -#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 MaybeLaunchUrlHandlerWebAppFromCmd( const base::CommandLine& command_line, const base::FilePath& cur_dir, -@@ -908,7 +908,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -989,7 +989,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( silent_launch = true; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Writes open and installed web apps to the specified file without // launching a new browser window or tab. if (base::FeatureList::IsEnabled(features::kListWebAppsSwitch) && -@@ -1057,7 +1057,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( - - if (command_line.HasSwitch(switches::kAppId)) { +@@ -1181,7 +1181,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( + CHECK_EQ(profile_info.mode, StartupProfileMode::kBrowserWindow) + << "Failed launch with app: couldn't pick a profile"; std::string app_id = command_line.GetSwitchValueASCII(switches::kAppId); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If Chrome Apps are deprecated and |app_id| is a Chrome App, display the // deprecation UI instead of launching the app. if (apps::OpenDeprecatedApplicationPrompt(privacy_safe_profile, app_id)) -@@ -1094,7 +1094,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1220,7 +1220,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( web_app::startup::MaybeHandleWebAppLaunch( command_line, cur_dir, privacy_safe_profile, is_first_run); -#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) handled_as_app = handled_as_app || // Give web apps a chance to handle a URL. MaybeLaunchUrlHandlerWebAppFromCmd( diff --git a/www/iridium/files/patch-chrome_browser_ui_tab__helpers.cc b/www/iridium/files/patch-chrome_browser_ui_tab__helpers.cc index 2a216f864b14..c49383be0e38 100644 --- a/www/iridium/files/patch-chrome_browser_ui_tab__helpers.cc +++ b/www/iridium/files/patch-chrome_browser_ui_tab__helpers.cc @@ -1,36 +1,36 @@ ---- chrome/browser/ui/tab_helpers.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/tab_helpers.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/tab_helpers.cc -@@ -178,7 +178,7 @@ +@@ -179,7 +179,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/blocked_content/framebust_block_tab_helper.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/hats/hats_helper.h" -@@ -495,13 +495,13 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -500,13 +500,13 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( features::kHappinessTrackingSurveysForDesktopDemo) || base::FeatureList::IsEnabled(features::kTrustSafetySentimentSurvey) || -@@ -512,7 +512,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -517,7 +517,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (Browser* browser = chrome::FindBrowserWithProfile(profile)) { - SharedHighlightingPromo::CreateForWebContents(web_contents, browser); - } + SharedHighlightingPromo::CreateForWebContents(web_contents); + #endif + diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__desktop__window__tree__host__linux.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__desktop__window__tree__host__linux.cc index 67a6da3e5f41..69bd1c2678f3 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__desktop__window__tree__host__linux.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__desktop__window__tree__host__linux.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.cc -@@ -146,7 +146,7 @@ bool BrowserDesktopWindowTreeHostLinux::SupportsClient +@@ -150,7 +150,7 @@ bool BrowserDesktopWindowTreeHostLinux::SupportsClient } void BrowserDesktopWindowTreeHostLinux::UpdateFrameHints() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* view = static_cast( native_frame_->browser_frame()->GetFrameView()); auto* layout = view->layout(); diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc index b45a9f59e5e2..79eee5045d53 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc @@ -1,52 +1,52 @@ ---- chrome/browser/ui/views/frame/browser_frame.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/views/frame/browser_frame.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/views/frame/browser_frame.cc -@@ -48,11 +48,11 @@ +@@ -49,11 +49,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 "ui/display/screen.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/views/linux_ui/linux_ui.h" #endif -@@ -61,7 +61,7 @@ namespace { +@@ -62,7 +62,7 @@ namespace { bool IsUsingGtkTheme(Profile* profile) { // 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) return ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme(); #else return false; -@@ -263,7 +263,7 @@ void BrowserFrame::OnNativeWidgetWorkspaceChanged() { +@@ -268,7 +268,7 @@ void BrowserFrame::OnNativeWidgetWorkspaceChanged() { IsVisibleOnAllWorkspaces()); // 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 the window was sent to a different workspace, prioritize it if // it was sent to the current workspace and deprioritize it // otherwise. This is done by MoveBrowsersInWorkspaceToFront() -@@ -386,7 +386,7 @@ void BrowserFrame::SelectNativeTheme() { - } +@@ -381,7 +381,7 @@ void BrowserFrame::SelectNativeTheme() { + return; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const views::LinuxUI* linux_ui = views::LinuxUI::instance(); // Ignore GTK+ for web apps with window-controls-overlay as the // display_override so the web contents can blend with the overlay by using -@@ -405,7 +405,7 @@ bool BrowserFrame::RegenerateFrameOnThemeChange( +@@ -400,7 +400,7 @@ bool BrowserFrame::RegenerateFrameOnThemeChange( bool need_regenerate = false; // 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) // GTK and user theme changes can both change frame buttons, so the frame // always needs to be regenerated on Linux. need_regenerate = true; diff --git a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__view.cc b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__view.cc index f2f9036a4ff0..76319fb5f76f 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__view.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_frame_browser__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/frame/browser_view.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -1750,7 +1750,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra +@@ -1825,7 +1825,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra // CrOS cleanup is done. // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) contents_web_view_->SetFastResize(is_dragging); if (!is_dragging) { // When tab dragging is ended, we need to make sure the web contents get diff --git a/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc b/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc index bb0a03d9b67c..76bd3a9005ba 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/profiles/profile_menu_view_base.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc -@@ -612,7 +612,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( +@@ -611,7 +611,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // crbug.com/1161166: Orca does not read the accessible window title of the // bubble, so we duplicate it in the top-level menu item. To be revisited // after considering other options, including fixes on the AT side. diff --git a/www/iridium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc b/www/iridium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc index 091f452935f7..ee4b2984ea82 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc -@@ -117,7 +117,7 @@ SigninViewControllerDelegateViews::CreateProfileCustom +@@ -137,7 +137,7 @@ SigninViewControllerDelegateViews::CreateProfileCustom #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // static std::unique_ptr SigninViewControllerDelegateViews::CreateEnterpriseConfirmationWebView( -@@ -392,7 +392,7 @@ SigninViewControllerDelegate::CreateProfileCustomizati +@@ -413,7 +413,7 @@ SigninViewControllerDelegate::CreateProfileCustomizati #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // static SigninViewControllerDelegate* SigninViewControllerDelegate::CreateEnterpriseConfirmationDelegate( diff --git a/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab.cc b/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab.cc index 24d78a61640a..64864eb4755b 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tabs/tab.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/views/tabs/tab.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/views/tabs/tab.cc -@@ -576,7 +576,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& +@@ -580,7 +580,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& if (mouse_hovered_ || !GetWidget()->IsMouseEventsEnabled()) return; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Move the hit test area for hovering up so that it is not overlapped by tab // hover cards when they are shown. // TODO(crbug.com/978134): Once Linux/CrOS widget transparency is solved, diff --git a/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc b/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc index 809314d66aad..42f1ce07feec 100644 --- a/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc +++ b/www/iridium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/views/tabs/tab_drag_controller.cc -@@ -468,7 +468,7 @@ void TabDragController::Init(TabDragContext* source_co +@@ -480,7 +480,7 @@ void TabDragController::Init(TabDragContext* source_co // synchronous on desktop Linux, so use that. // - Chrome OS // Releasing capture on Ash cancels gestures so avoid it. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) can_release_capture_ = false; #endif start_point_in_screen_ = gfx::Point(source_view_offset, mouse_offset.y()); -@@ -916,7 +916,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon +@@ -1021,7 +1021,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) // EndMoveLoop is going to snap the window back to its original location. // Hide it so users don't see this. Hiding a window in Linux aura causes // it to lose capture so skip it. -@@ -2128,7 +2128,7 @@ TabDragController::Liveness TabDragController::GetLoca +@@ -2350,7 +2350,7 @@ TabDragController::Liveness TabDragController::GetLoca } // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Exclude windows which are pending deletion via Browser::TabStripEmpty(). // These windows can be returned in the Linux Aura port because the browser // window which was used for dragging is not hidden once all of its tabs are diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_about__ui.cc b/www/iridium/files/patch-chrome_browser_ui_webui_about__ui.cc index c2616f2310f3..26f2eb159159 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_about__ui.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_about__ui.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/about_ui.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/webui/about_ui.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/webui/about_ui.cc -@@ -656,7 +656,7 @@ std::string ChromeURLs() { +@@ -603,7 +603,7 @@ std::string ChromeURLs() { return html; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::string AboutLinuxProxyConfig() { std::string data; AppendHeader(&data, -@@ -712,7 +712,7 @@ void AboutUIHTMLSource::StartDataRequest( +@@ -661,7 +661,7 @@ void AboutUIHTMLSource::StartDataRequest( response = ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(idr); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) } else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) { response = AboutLinuxProxyConfig(); #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc b/www/iridium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc index 383eb5f3c2d6..a90e1754aeb7 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc @@ -1,86 +1,98 @@ ---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -284,7 +284,7 @@ +@@ -296,7 +296,7 @@ #include "chrome/browser/ui/webui/app_launcher_page_ui.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/webui_js_error/webui_js_error_ui.h" #endif -@@ -308,17 +308,17 @@ +@@ -320,22 +320,22 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/discards/discards_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/sandbox/sandbox_internals_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" #endif -@@ -611,7 +611,7 @@ bool IsAboutUI(const GURL& url) { + #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" + #endif + +@@ -661,7 +661,7 @@ bool IsAboutUI(const GURL& url) { #if !BUILDFLAG(IS_ANDROID) || url.host_piece() == chrome::kChromeUITermsHost #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || url.host_piece() == chrome::kChromeUILinuxProxyConfigHost #endif #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -1003,7 +1003,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -1073,7 +1073,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we return &NewWebUI; #endif // !defined(OFFICIAL_BUILD) #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIWebUIJsErrorHost) return &NewWebUI; #endif -@@ -1061,7 +1061,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -1131,7 +1131,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we if (url.host_piece() == chrome::kChromeUINaClHost) return &NewWebUI; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) if (url.host_piece() == chrome::kChromeUITabModalConfirmDialogHost) -@@ -1117,22 +1117,22 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -1187,27 +1187,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUISandboxHost) { return &NewWebUI; } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIConnectorsInternalsHost) return &NewWebUI; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIDiscardsHost) return &NewWebUI; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIBrowserSwitchHost) return &NewWebUI; #endif + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + if (base::FeatureList::IsEnabled(features::kDesktopPWAsWebAppSettingsPage) && + url.host_piece() == chrome::kChromeUIWebAppSettingsHost) { + return &NewWebUI; diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc b/www/iridium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc index cc46e55593fe..e2ae319defd1 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/ntp/app_launcher_handler.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/webui/ntp/app_launcher_handler.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/webui/ntp/app_launcher_handler.cc -@@ -310,7 +310,7 @@ void AppLauncherHandler::CreateExtensionInfo(const Ext +@@ -313,7 +313,7 @@ void AppLauncherHandler::CreateExtensionInfo(const Ext base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)); bool is_deprecated_app = false; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) is_deprecated_app = extensions::IsExtensionUnsupportedDeprecatedApp( extension_service_->GetBrowserContext(), extension->id()); #endif -@@ -739,7 +739,7 @@ void AppLauncherHandler::HandleLaunchApp(const base::L +@@ -756,7 +756,7 @@ void AppLauncherHandler::HandleLaunchApp(const base::L Profile* profile = extension_service_->profile(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (extensions::IsExtensionUnsupportedDeprecatedApp(profile, extension_id)) { // TODO(crbug.com/1225779): Show the deprecated apps dialog. return; -@@ -1332,7 +1332,7 @@ void AppLauncherHandler::InstallOsHooks(const web_app: +@@ -1348,7 +1348,7 @@ void AppLauncherHandler::InstallOsHooks(const web_app: options.os_hooks[web_app::OsHookType::kUninstallationViaOsSettings] = web_app->CanUserUninstallWebApp(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) options.os_hooks[web_app::OsHookType::kUrlHandlers] = true; #else diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc b/www/iridium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc index 52ec02f352db..6b86ca723065 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/settings/appearance_handler.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/webui/settings/appearance_handler.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/webui/settings/appearance_handler.cc @@ -31,7 +31,7 @@ void AppearanceHandler::RegisterMessages() { base::Unretained(this))); // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) - web_ui()->RegisterDeprecatedMessageCallback( ++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) + web_ui()->RegisterMessageCallback( "useSystemTheme", base::BindRepeating(&AppearanceHandler::HandleUseSystemTheme, -@@ -45,7 +45,7 @@ void AppearanceHandler::HandleUseDefaultTheme(const ba +@@ -45,7 +45,7 @@ void AppearanceHandler::HandleUseDefaultTheme(base::Va // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) - void AppearanceHandler::HandleUseSystemTheme(const base::ListValue* args) { ++#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) + void AppearanceHandler::HandleUseSystemTheme(base::Value::ConstListView args) { if (profile_->IsChild()) NOTREACHED(); diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.h b/www/iridium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.h index cf112107492b..c1c22ddf69e9 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.h +++ b/www/iridium/files/patch-chrome_browser_ui_webui_settings_appearance__handler.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/webui/settings/appearance_handler.h.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/webui/settings/appearance_handler.h.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/webui/settings/appearance_handler.h -@@ -44,7 +44,7 @@ class AppearanceHandler : public SettingsPageUIHandler +@@ -40,7 +40,7 @@ class AppearanceHandler : public SettingsPageUIHandler // 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) // Changes the UI theme of the browser to the system (GTK+) theme. - void HandleUseSystemTheme(const base::ListValue* args); + void HandleUseSystemTheme(base::Value::ConstListView args); #endif diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc b/www/iridium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc index 0332d8214643..08b99046ea3a 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc @@ -1,47 +1,47 @@ ---- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -117,7 +117,7 @@ +@@ -118,7 +118,7 @@ #include "chrome/browser/ui/webui/settings/chromeos/constants/routes.mojom.h" #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) #include "ui/display/screen.h" #endif -@@ -137,7 +137,7 @@ +@@ -138,7 +138,7 @@ #include "chrome/browser/ui/webui/certificate_manager_localized_strings_provider.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/ozone/public/ozone_platform.h" #endif -@@ -370,7 +370,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -371,7 +371,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht {"huge", IDS_SETTINGS_HUGE_FONT_SIZE}, // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) {"systemTheme", IDS_SETTINGS_SYSTEM_THEME}, {"useSystemTheme", IDS_SETTINGS_USE_SYSTEM_THEME}, {"classicTheme", IDS_SETTINGS_CLASSIC_THEME}, -@@ -378,7 +378,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -379,7 +379,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht #else {"resetToDefaultTheme", IDS_SETTINGS_RESET_TO_DEFAULT_THEME}, #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, #endif #if BUILDFLAG(IS_MAC) -@@ -399,7 +399,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -400,7 +400,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) bool show_custom_chrome_frame = ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_server_side_window_decorations; diff --git a/www/iridium/files/patch-chrome_browser_ui_webui_settings_settings__ui.cc b/www/iridium/files/patch-chrome_browser_ui_webui_settings_settings__ui.cc index 0b113a9bf5b4..5faf5bbc5788 100644 --- a/www/iridium/files/patch-chrome_browser_ui_webui_settings_settings__ui.cc +++ b/www/iridium/files/patch-chrome_browser_ui_webui_settings_settings__ui.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/settings/settings_ui.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/ui/webui/settings/settings_ui.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/ui/webui/settings/settings_ui.cc -@@ -141,7 +141,7 @@ +@@ -140,7 +140,7 @@ #include "chrome/browser/ui/webui/settings/native_certificates_handler.h" #endif // BUILDFLAG(USE_NSS_CERTS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/ui/webui/settings/url_handlers_handler.h" #include "chrome/browser/web_applications/web_app_provider.h" -@@ -245,7 +245,7 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) +@@ -243,7 +243,7 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) AddSettingsPageUIHandler(std::make_unique(profile)); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) if (web_app::WebAppProvider::GetForWebApps(profile) != nullptr) { AddSettingsPageUIHandler(std::make_unique( diff --git a/www/iridium/files/patch-chrome_browser_web__applications_externally__managed__app__install__task.cc b/www/iridium/files/patch-chrome_browser_web__applications_externally__managed__app__install__task.cc deleted file mode 100644 index bdeae093dacd..000000000000 --- a/www/iridium/files/patch-chrome_browser_web__applications_externally__managed__app__install__task.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/web_applications/externally_managed_app_install_task.cc.orig 2022-03-28 18:11:04 UTC -+++ chrome/browser/web_applications/externally_managed_app_install_task.cc -@@ -363,7 +363,7 @@ void ExternallyManagedAppInstallTask::OnWebAppInstalle - const WebApp* web_app = registrar_->GetAppById(app_id); - options.os_hooks[OsHookType::kUninstallationViaOsSettings] = - web_app->CanUserUninstallWebApp(); --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) - options.os_hooks[OsHookType::kUrlHandlers] = true; - #else diff --git a/www/iridium/files/patch-chrome_browser_web__applications_web__app__file__handler__registration.h b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h similarity index 69% rename from www/iridium/files/patch-chrome_browser_web__applications_web__app__file__handler__registration.h rename to www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h index a04580eb6228..52f936df9806 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_web__app__file__handler__registration.h +++ b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/web_app_file_handler_registration.h.orig 2022-03-28 18:11:04 UTC -+++ chrome/browser/web_applications/web_app_file_handler_registration.h +--- chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h.orig 2022-04-01 07:48:30 UTC ++++ chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h @@ -44,7 +44,7 @@ void UnregisterFileHandlersWithOs(const AppId& app_id, Profile* profile, ResultCallback callback); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Exposed for testing purposes. Register the set of // MIME-type-to-file-extensions mappings corresponding to |file_handlers|. File // I/O and a a callout to the Linux shell are performed asynchronously. diff --git a/www/iridium/files/patch-chrome_browser_web__applications_web__app__shortcut.cc b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc similarity index 89% rename from www/iridium/files/patch-chrome_browser_web__applications_web__app__shortcut.cc rename to www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc index e31ee2312919..5cf7436ed43a 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_web__app__shortcut.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc @@ -1,38 +1,38 @@ ---- chrome/browser/web_applications/web_app_shortcut.cc.orig 2022-03-28 18:11:04 UTC -+++ chrome/browser/web_applications/web_app_shortcut.cc +--- chrome/browser/web_applications/os_integration/web_app_shortcut.cc.orig 2022-04-01 07:48:30 UTC ++++ chrome/browser/web_applications/os_integration/web_app_shortcut.cc @@ -43,7 +43,7 @@ namespace { #if BUILDFLAG(IS_MAC) const int kDesiredIconSizesForShortcut[] = {16, 32, 128, 256, 512}; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Linux supports icons of any size. FreeDesktop Icon Theme Specification states // that "Minimally you should install a 48x48 icon in the hicolor theme." const int kDesiredIconSizesForShortcut[] = {16, 32, 48, 128, 256, 512}; @@ -133,7 +133,7 @@ ScopedShortcutOverrideForTesting::~ScopedShortcutOverr } } } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) directories = {&desktop}; #endif for (base::ScopedTempDir* dir : directories) { @@ -177,7 +177,7 @@ std::unique_ptr Over scoped_override->chrome_apps_folder.CreateUniqueTempDirUnderPath( base_path); DCHECK(success); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool success = scoped_override->desktop.CreateUniqueTempDirUnderPath(base_path); DCHECK(success); @@ -195,7 +195,7 @@ std::unique_ptr Over #elif BUILDFLAG(IS_MAC) bool success = scoped_override->chrome_apps_folder.CreateUniqueTempDir(); DCHECK(success); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool success = scoped_override->desktop.CreateUniqueTempDir(); DCHECK(success); #endif diff --git a/www/iridium/files/patch-chrome_browser_web__applications_web__app__shortcut.h b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h similarity index 75% rename from www/iridium/files/patch-chrome_browser_web__applications_web__app__shortcut.h rename to www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h index c9200e128203..73ba8666420b 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_web__app__shortcut.h +++ b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h @@ -1,29 +1,29 @@ ---- chrome/browser/web_applications/web_app_shortcut.h.orig 2022-03-28 18:11:04 UTC -+++ chrome/browser/web_applications/web_app_shortcut.h +--- chrome/browser/web_applications/os_integration/web_app_shortcut.h.orig 2022-04-01 07:48:30 UTC ++++ chrome/browser/web_applications/os_integration/web_app_shortcut.h @@ -19,7 +19,7 @@ #include "ui/gfx/image/image_family.h" #include "url/gurl.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "chrome/browser/web_applications/web_app_shortcut_linux.h" + #include "chrome/browser/web_applications/os_integration/web_app_shortcut_linux.h" #endif // BUILDFLAG(IS_LINUX) @@ -47,7 +47,7 @@ struct ScopedShortcutOverrideForTesting { base::ScopedTempDir startup; #elif BUILDFLAG(IS_MAC) base::ScopedTempDir chrome_apps_folder; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::ScopedTempDir desktop; #endif }; @@ -89,7 +89,7 @@ struct ShortcutInfo { std::set file_handler_extensions; std::set file_handler_mime_types; std::set protocol_handlers; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::set actions; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/iridium/files/patch-chrome_browser_web__applications_web__app__shortcut__manager.cc b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc similarity index 77% rename from www/iridium/files/patch-chrome_browser_web__applications_web__app__shortcut__manager.cc rename to www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc index 68d7bc561f40..1b6f9fc08584 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_web__app__shortcut__manager.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc @@ -1,20 +1,20 @@ ---- chrome/browser/web_applications/web_app_shortcut_manager.cc.orig 2022-03-28 18:11:04 UTC -+++ chrome/browser/web_applications/web_app_shortcut_manager.cc +--- chrome/browser/web_applications/os_integration/web_app_shortcut_manager.cc.orig 2022-04-01 07:48:30 UTC ++++ chrome/browser/web_applications/os_integration/web_app_shortcut_manager.cc @@ -35,7 +35,7 @@ namespace web_app { namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Aligns with other platform implementations that only support 10 items. constexpr int kMaxApplicationDockMenuItems = 10; #endif // BUILDFLAG(IS_LINUX) @@ -382,7 +382,7 @@ std::unique_ptr WebAppShortcutManager::B } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const std::vector& shortcuts_menu_item_infos = app->shortcuts_menu_item_infos(); int num_entries = std::min(static_cast(shortcuts_menu_item_infos.size()), diff --git a/www/iridium/files/patch-chrome_browser_web__applications_web__app__install__task.cc b/www/iridium/files/patch-chrome_browser_web__applications_web__app__install__task.cc deleted file mode 100644 index ce9e76e02474..000000000000 --- a/www/iridium/files/patch-chrome_browser_web__applications_web__app__install__task.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/web_applications/web_app_install_task.cc.orig 2022-03-28 18:11:04 UTC -+++ chrome/browser/web_applications/web_app_install_task.cc -@@ -915,7 +915,7 @@ void WebAppInstallTask::OnInstallFinalizedCreateShortc - web_app->CanUserUninstallWebApp(); - } - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ - (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) - options.os_hooks[OsHookType::kUrlHandlers] = true; - #else diff --git a/www/iridium/files/patch-chrome_browser_web__applications_web__app__provider.cc b/www/iridium/files/patch-chrome_browser_web__applications_web__app__provider.cc index f3736ef8a1dd..fc624a22b045 100644 --- a/www/iridium/files/patch-chrome_browser_web__applications_web__app__provider.cc +++ b/www/iridium/files/patch-chrome_browser_web__applications_web__app__provider.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/web_app_provider.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/browser/web_applications/web_app_provider.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/browser/web_applications/web_app_provider.cc -@@ -281,7 +281,7 @@ void WebAppProvider::CreateSubsystems(Profile* profile +@@ -289,7 +289,7 @@ void WebAppProvider::CreateSubsystems(Profile* profile protocol_handler_manager.get()); std::unique_ptr url_handler_manager; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) url_handler_manager = std::make_unique(profile); #endif diff --git a/www/iridium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc b/www/iridium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc new file mode 100644 index 000000000000..34121ade65e4 --- /dev/null +++ b/www/iridium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc @@ -0,0 +1,11 @@ +--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2022-04-01 07:48:30 UTC ++++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc +@@ -749,7 +749,7 @@ bool ChromeAuthenticatorRequestDelegate::ShouldPermitC + // TODO(crbug.com/1052397): Revisit the macro expression once build flag + // switch of lacros-chrome is complete. If updating this, also update + // kWebAuthCableServerLink. +-#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + + // caBLEv1 is disabled on these platforms. It never launched on them because + // it causes problems in bluez. Rather than disabling caBLE completely, which diff --git a/www/iridium/files/patch-chrome_common_chrome__features.cc b/www/iridium/files/patch-chrome_common_chrome__features.cc index 0b01e6cbe3a8..5107107f84e5 100644 --- a/www/iridium/files/patch-chrome_common_chrome__features.cc +++ b/www/iridium/files/patch-chrome_common_chrome__features.cc @@ -1,101 +1,92 @@ ---- chrome/common/chrome_features.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/common/chrome_features.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/common/chrome_features.cc -@@ -113,7 +113,7 @@ const base::Feature kAsyncDns { +@@ -105,7 +105,7 @@ const base::Feature kAsyncDns { }; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Enables or disables the Autofill survey triggered by opening a prompt to // save address info. const base::Feature kAutofillAddressSurvey{"AutofillAddressSurvey", -@@ -128,7 +128,7 @@ const base::Feature kAutofillPasswordSurvey{"AutofillP +@@ -120,7 +120,7 @@ const base::Feature kAutofillPasswordSurvey{"AutofillP base::FEATURE_DISABLED_BY_DEFAULT}; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Enables the Restart background mode optimization. When all Chrome UI is // closed and it goes in the background, allows to restart the browser to // discard memory. -@@ -145,7 +145,7 @@ const base::Feature kBorealis{"Borealis", base::FEATUR +@@ -142,7 +142,7 @@ const base::Feature kBorealis{"Borealis", base::FEATUR const base::Feature kChangePictureVideoMode{"ChangePictureVideoMode", base::FEATURE_ENABLED_BY_DEFAULT}; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Controls whether Chrome Apps are supported. See https://crbug.com/1221251. // If the feature is disabled, Chrome Apps continue to work. If enabled, Chrome // Apps will not launch and will be marked in the UI as deprecated. -@@ -258,7 +258,7 @@ const base::Feature kPreinstalledWebAppInstallation{ - #endif - - #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - // Enables Desktop PWAs shortcuts menu to be visible and executable in ChromeOS, - // MacOS and Linux. - const base::Feature kDesktopPWAsAppIconShortcutsMenuUI{ -@@ -305,7 +305,7 @@ const base::Feature kDesktopPWAsNotificationIconAndTit +@@ -298,7 +298,7 @@ const base::Feature kDesktopPWAsNotificationIconAndTit // Enables or disables Desktop PWAs to be auto-started on OS login. const base::Feature kDesktopPWAsRunOnOsLogin { "DesktopPWAsRunOnOsLogin", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -339,7 +339,7 @@ const base::FeatureParam kDisableHttpDiskCacheMem +@@ -320,7 +320,7 @@ const base::Feature kDesktopPWAsWebBundles{"DesktopPWA + base::FEATURE_DISABLED_BY_DEFAULT}; + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + // Serves web app settings at chrome://app-settings/. + const base::Feature kDesktopPWAsWebAppSettingsPage{ + "DesktopPWAsWebAppSettingsPage", base::FEATURE_ENABLED_BY_DEFAULT}; +@@ -330,7 +330,7 @@ const base::Feature kDesktopPWAsWebAppSettingsPage{ const base::Feature kDnsOverHttps { "DnsOverHttps", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -361,7 +361,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa +@@ -352,7 +352,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa const base::FeatureParam kDnsOverHttpsShowUiParam { &kDnsOverHttps, "ShowUi", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) true #else false -@@ -608,7 +608,7 @@ const base::Feature kImmersiveFullscreen{"ImmersiveFul - base::FEATURE_DISABLED_BY_DEFAULT}; - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - const base::Feature kImproveAccessibilityTreeUsingLocalML{ - "ImproveAccessibilityTreeUsingLocalML", base::FEATURE_DISABLED_BY_DEFAULT}; - #endif -@@ -645,7 +645,7 @@ const base::Feature kIncognitoNtpRevamp{"IncognitoNtpR +@@ -624,7 +624,7 @@ const base::Feature kIncognitoNtpRevamp{"IncognitoNtpR base::FEATURE_DISABLED_BY_DEFAULT}; #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // When enabled, removes any theme or background customization done by the user // on the Incognito UI. const base::Feature kIncognitoBrandConsistencyForDesktop{ -@@ -681,7 +681,7 @@ const base::Feature kLinkCapturingUiUpdate{"LinkCaptur +@@ -658,7 +658,7 @@ const base::Feature kLinkCapturingUiUpdate{"LinkCaptur base::FEATURE_DISABLED_BY_DEFAULT}; #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) const base::Feature kLinuxLowMemoryMonitor{"LinuxLowMemoryMonitor", base::FEATURE_DISABLED_BY_DEFAULT}; -@@ -694,7 +694,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -671,7 +671,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit &kLinuxLowMemoryMonitor, "critical_level", 255}; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const base::Feature kListWebAppsSwitch{"ListWebAppsSwitch", base::FEATURE_DISABLED_BY_DEFAULT}; #endif diff --git a/www/iridium/files/patch-chrome_common_chrome__features.h b/www/iridium/files/patch-chrome_common_chrome__features.h index ce9f8961aa0d..d5c366e223e1 100644 --- a/www/iridium/files/patch-chrome_common_chrome__features.h +++ b/www/iridium/files/patch-chrome_common_chrome__features.h @@ -1,74 +1,65 @@ ---- chrome/common/chrome_features.h.orig 2022-03-28 18:11:04 UTC +--- chrome/common/chrome_features.h.orig 2022-04-01 07:48:30 UTC +++ chrome/common/chrome_features.h -@@ -95,7 +95,7 @@ extern const base::Feature kArcPiGhostWindow; +@@ -90,7 +90,7 @@ extern const base::Feature kArcPiGhostWindow; COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kAsyncDns; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kAutofillAddressSurvey; COMPONENT_EXPORT(CHROME_FEATURES) -@@ -104,7 +104,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -99,7 +99,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kAutofillPasswordSurvey; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kBackgroundModeAllowRestart; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -121,7 +121,7 @@ extern const base::Feature kBrowserAppInstanceTracking COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kChangePictureVideoMode; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kChromeAppsDeprecation; #endif -@@ -186,7 +186,7 @@ extern const base::Feature kPreinstalledWebAppInstalla - #endif +@@ -219,7 +219,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) + extern const base::Feature kDesktopPWAsWebBundles; - #if BUILDFLAG(IS_CHROMEOS_ASH) || 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) COMPONENT_EXPORT(CHROME_FEATURES) - extern const base::Feature kDesktopPWAsAppIconShortcutsMenuUI; - #endif -@@ -410,7 +410,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) - extern const base::Feature kImmersiveFullscreen; - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - COMPONENT_EXPORT(CHROME_FEATURES) - extern const base::Feature kImproveAccessibilityTreeUsingLocalML; + extern const base::Feature kDesktopPWAsWebAppSettingsPage; #endif -@@ -435,7 +435,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -425,7 +425,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kIncognitoNtpRevamp; #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kIncognitoBrandConsistencyForDesktop; -@@ -462,7 +462,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -452,7 +452,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kLinkCapturingUiUpdate; #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kLinuxLowMemoryMonitor; COMPONENT_EXPORT(CHROME_FEATURES) -@@ -471,7 +471,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -461,7 +461,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam kLinuxLowMemoryMonitorCriticalLevel; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kListWebAppsSwitch; #endif diff --git a/www/iridium/files/patch-chrome_common_chrome__paths.cc b/www/iridium/files/patch-chrome_common_chrome__paths.cc index 84bfc41984f9..f5b1b04108da 100644 --- a/www/iridium/files/patch-chrome_common_chrome__paths.cc +++ b/www/iridium/files/patch-chrome_common_chrome__paths.cc @@ -1,80 +1,83 @@ ---- chrome/common/chrome_paths.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/common/chrome_paths.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/common/chrome_paths.cc @@ -44,14 +44,14 @@ namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The path to the external extension .json files. // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/ const base::FilePath::CharType kFilepathSinglePrefExtensions[] = #if BUILDFLAG(GOOGLE_CHROME_BRANDING) - FILE_PATH_LITERAL("/usr/share/google-chrome/extensions"); + FILE_PATH_LITERAL("/usr/local/share/chromium/extensions"); #else - FILE_PATH_LITERAL("/usr/share/chromium/extensions"); + FILE_PATH_LITERAL("/usr/local/share/chromium/extensions"); #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -178,7 +178,7 @@ bool PathProvider(int key, base::FilePath* result) { return false; break; case chrome::DIR_DEFAULT_DOWNLOADS_SAFE: -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!GetUserDownloadsDirectorySafe(&cur)) return false; break; -@@ -411,10 +411,12 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -407,12 +407,14 @@ bool PathProvider(int key, base::FilePath* result) { if (!base::PathExists(cur)) // We don't want to create this return false; break; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) case chrome::DIR_POLICY_FILES: { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) cur = base::FilePath(FILE_PATH_LITERAL("/etc/opt/iridium-browser/policies")); +#elif BUILDFLAG(IS_FREEBSD) + cur = base::FilePath(FILE_PATH_LITERAL("/usr/local/etc/iridium/policies")); #else - cur = base::FilePath(FILE_PATH_LITERAL("/etc/iridium-browser/policies")); +- cur = base::FilePath(FILE_PATH_LITERAL("/etc/iridium-browser/policies")); ++ cur = base::FilePath(FILE_PATH_LITERAL("/etc/iridium/policies")); #endif -@@ -426,7 +428,7 @@ bool PathProvider(int key, base::FilePath* result) { + break; + } +@@ -422,7 +424,7 @@ bool PathProvider(int key, base::FilePath* result) { #if BUILDFLAG(IS_CHROMEOS_ASH) || \ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ BUILDFLAG(CHROMIUM_BRANDING)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case chrome::DIR_USER_EXTERNAL_EXTENSIONS: { if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) return false; -@@ -434,7 +436,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -430,7 +432,7 @@ bool PathProvider(int key, base::FilePath* result) { break; } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: { cur = base::FilePath(kFilepathSinglePrefExtensions); break; -@@ -479,7 +481,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -475,7 +477,7 @@ bool PathProvider(int key, base::FilePath* result) { break; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case chrome::DIR_NATIVE_MESSAGING: #if BUILDFLAG(IS_MAC) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) -@@ -493,6 +495,9 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -489,6 +491,9 @@ bool PathProvider(int key, base::FilePath* result) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) cur = base::FilePath(FILE_PATH_LITERAL( "/etc/opt/chrome/native-messaging-hosts")); +#elif BUILDFLAG(IS_FREEBSD) + cur = base::FilePath(FILE_PATH_LITERAL( + "/usr/local/etc/chromium/native-messaging-hosts")); #else cur = base::FilePath(FILE_PATH_LITERAL( "/etc/iridium-browser/native-messaging-hosts")); diff --git a/www/iridium/files/patch-chrome_common_chrome__switches.cc b/www/iridium/files/patch-chrome_common_chrome__switches.cc index 5335a6351a5b..36e181b10d75 100644 --- a/www/iridium/files/patch-chrome_common_chrome__switches.cc +++ b/www/iridium/files/patch-chrome_common_chrome__switches.cc @@ -1,19 +1,19 @@ ---- chrome/common/chrome_switches.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/common/chrome_switches.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/common/chrome_switches.cc -@@ -790,14 +790,14 @@ const char kAllowNaClSocketAPI[] = "allow-n +@@ -794,14 +794,14 @@ const char kAllowNaClSocketAPI[] = "allow-n #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon"; // Causes the browser to launch directly in guest mode. const char kGuest[] = "guest"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Writes open and installed web apps for each profile to the specified file // without launching a new browser window or tab. Pass a absolute file path to // specify where to output the information. Can be used together with optional diff --git a/www/iridium/files/patch-chrome_common_chrome__switches.h b/www/iridium/files/patch-chrome_common_chrome__switches.h index ff42739c5801..a2a4597704f7 100644 --- a/www/iridium/files/patch-chrome_common_chrome__switches.h +++ b/www/iridium/files/patch-chrome_common_chrome__switches.h @@ -1,17 +1,17 @@ ---- chrome/common/chrome_switches.h.orig 2022-03-28 18:11:04 UTC +--- chrome/common/chrome_switches.h.orig 2022-04-01 07:48:30 UTC +++ chrome/common/chrome_switches.h -@@ -247,12 +247,12 @@ extern const char kAllowNaClSocketAPI[]; +@@ -248,12 +248,12 @@ extern const char kAllowNaClSocketAPI[]; #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kEnableNewAppMenuIcon[]; extern const char kGuest[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kListApps[]; extern const char kProfileBaseName[]; #endif diff --git a/www/iridium/files/patch-chrome_common_extensions_command.cc b/www/iridium/files/patch-chrome_common_extensions_command.cc index 6bba448efc1c..338e14cae9ab 100644 --- a/www/iridium/files/patch-chrome_common_extensions_command.cc +++ b/www/iridium/files/patch-chrome_common_extensions_command.cc @@ -1,11 +1,11 @@ ---- chrome/common/extensions/command.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/common/extensions/command.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/common/extensions/command.cc -@@ -294,7 +294,7 @@ std::string Command::CommandPlatform() { +@@ -295,7 +295,7 @@ std::string Command::CommandPlatform() { return values::kKeybindingPlatformMac; #elif BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) return values::kKeybindingPlatformChromeOs; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return values::kKeybindingPlatformLinux; #else return ""; diff --git a/www/iridium/files/patch-chrome_common_pref__names.cc b/www/iridium/files/patch-chrome_common_pref__names.cc index 7a7355df8899..73d95c06068b 100644 --- a/www/iridium/files/patch-chrome_common_pref__names.cc +++ b/www/iridium/files/patch-chrome_common_pref__names.cc @@ -1,56 +1,56 @@ ---- chrome/common/pref_names.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/common/pref_names.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/common/pref_names.cc -@@ -1194,7 +1194,7 @@ const char kUseAshProxy[] = "lacros.proxy.use_ash_prox +@@ -1188,7 +1188,7 @@ const char kUseAshProxy[] = "lacros.proxy.use_ash_prox // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Linux specific preference on whether we should match the system theme. const char kUsesSystemTheme[] = "extensions.theme.use_system"; #endif -@@ -1297,7 +1297,7 @@ const char kShowUpdatePromotionInfoBar[] = +@@ -1291,7 +1291,7 @@ const char kShowUpdatePromotionInfoBar[] = // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Boolean that is false if we should show window manager decorations. If // true, we draw a custom chrome frame (thicker title bar and blue border). const char kUseCustomChromeFrame[] = "browser.custom_chrome_frame"; -@@ -1776,7 +1776,7 @@ const char kDownloadDefaultDirectory[] = "download.def +@@ -1780,7 +1780,7 @@ const char kDownloadDefaultDirectory[] = "download.def const char kDownloadDirUpgraded[] = "download.directory_upgrade"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kOpenPdfDownloadInSystemReader[] = "download.open_pdf_in_system_reader"; #endif -@@ -2065,7 +2065,7 @@ const char kWebAppsPreferences[] = "web_apps.web_app_i +@@ -2069,7 +2069,7 @@ const char kWebAppsPreferences[] = "web_apps.web_app_i // its isolation requirements. const char kWebAppsIsolationState[] = "web_apps.isolation_state"; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) // Dictionary that maps origins to web apps that can act as URL handlers. const char kWebAppsUrlHandlerInfo[] = "web_apps.url_handler_info"; -@@ -2193,7 +2193,7 @@ const char kAmbientAuthenticationInPrivateModesEnabled +@@ -2199,7 +2199,7 @@ const char kAmbientAuthenticationInPrivateModesEnabled // requests. const char kBasicAuthOverHttpEnabled[] = "auth.basic_over_http_enabled"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Boolean that specifies whether OK-AS-DELEGATE flag from KDC is respected // along with kAuthNegotiateDelegateAllowlist. const char kAuthNegotiateDelegateByKdcPolicy[] = -@@ -3117,7 +3117,7 @@ const char kBlockAutoplayEnabled[] = "media.block_auto +@@ -3129,7 +3129,7 @@ const char kBlockAutoplayEnabled[] = "media.block_auto const char kSandboxExternalProtocolBlocked[] = "profile.sandbox_external_protocol_blocked"; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Boolean that indicates if native notifications are allowed to be used in // place of Chrome notifications. Will be replaced by kAllowSystemNotifications. const char kAllowNativeNotifications[] = "native_notifications.allowed"; diff --git a/www/iridium/files/patch-chrome_common_pref__names.h b/www/iridium/files/patch-chrome_common_pref__names.h index 0e3159426d70..b7b0c410074b 100644 --- a/www/iridium/files/patch-chrome_common_pref__names.h +++ b/www/iridium/files/patch-chrome_common_pref__names.h @@ -1,56 +1,56 @@ ---- chrome/common/pref_names.h.orig 2022-03-28 18:11:04 UTC +--- chrome/common/pref_names.h.orig 2022-04-01 07:48:30 UTC +++ chrome/common/pref_names.h -@@ -375,7 +375,7 @@ extern const char kUseAshProxy[]; +@@ -372,7 +372,7 @@ extern const char kUseAshProxy[]; #endif // BUILDFLAG(IS_CHROMEOS_LACROS) // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) extern const char kUsesSystemTheme[]; #endif extern const char kCurrentThemePackFilename[]; -@@ -404,7 +404,7 @@ extern const char kShowUpdatePromotionInfoBar[]; +@@ -401,7 +401,7 @@ extern const char kShowUpdatePromotionInfoBar[]; #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) extern const char kUseCustomChromeFrame[]; #endif #if BUILDFLAG(ENABLE_PLUGINS) -@@ -587,7 +587,7 @@ extern const char kDownloadExtensionsToOpenByPolicy[]; +@@ -584,7 +584,7 @@ extern const char kDownloadExtensionsToOpenByPolicy[]; extern const char kDownloadAllowedURLsForOpenByPolicy[]; extern const char kDownloadDirUpgraded[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kOpenPdfDownloadInSystemReader[]; #endif #if BUILDFLAG(IS_ANDROID) -@@ -694,7 +694,7 @@ extern const char kWebAppsUninstalledDefaultChromeApps +@@ -691,7 +691,7 @@ extern const char kWebAppsUninstalledDefaultChromeApps extern const char kWebAppsPreferences[]; extern const char kWebAppsIsolationState[]; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) extern const char kWebAppsUrlHandlerInfo[]; #endif -@@ -834,7 +834,7 @@ extern const char kGloballyScopeHTTPAuthCacheEnabled[] +@@ -830,7 +830,7 @@ extern const char kGloballyScopeHTTPAuthCacheEnabled[] extern const char kAmbientAuthenticationInPrivateModesEnabled[]; extern const char kBasicAuthOverHttpEnabled[]; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kAuthNegotiateDelegateByKdcPolicy[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) @@ -1068,7 +1068,7 @@ extern const char kBlockAutoplayEnabled[]; #endif extern const char kSandboxExternalProtocolBlocked[]; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kAllowNativeNotifications[]; extern const char kAllowSystemNotifications[]; #endif diff --git a/www/iridium/files/patch-chrome_common_webui__url__constants.cc b/www/iridium/files/patch-chrome_common_webui__url__constants.cc index 584cf09f491a..9771a96f366f 100644 --- a/www/iridium/files/patch-chrome_common_webui__url__constants.cc +++ b/www/iridium/files/patch-chrome_common_webui__url__constants.cc @@ -1,81 +1,94 @@ ---- chrome/common/webui_url_constants.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/common/webui_url_constants.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/common/webui_url_constants.cc -@@ -428,18 +428,18 @@ const char kOsUIFlagsURL[] = "os://flags"; +@@ -434,18 +434,18 @@ const char kOsUIFlagsURL[] = "os://flags"; const char kOsUIVersionURL[] = "os://version"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kChromeUIWebUIJsErrorHost[] = "webuijserror"; const char kChromeUIWebUIJsErrorURL[] = "chrome://webuijserror/"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kChromeUIConnectorsInternalsHost[] = "connectors-internals"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kChromeUIDiscardsHost[] = "discards"; const char kChromeUIDiscardsURL[] = "chrome://discards/"; #endif -@@ -454,14 +454,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr +@@ -460,14 +460,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) const char kChromeUISandboxHost[] = "sandbox"; #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) || BUILDFLAG(IS_FUCHSIA) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) const char kChromeUIBrowserSwitchHost[] = "browser-switch"; const char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/"; const char kChromeUIEnterpriseProfileWelcomeHost[] = -@@ -476,7 +476,7 @@ const char kChromeUIProfilePickerUrl[] = "chrome://pro +@@ -482,7 +482,7 @@ const char kChromeUIProfilePickerUrl[] = "chrome://pro const char kChromeUIProfilePickerStartupQuery[] = "startup"; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) const char kChromeUITabModalConfirmDialogHost[] = "tab-modal-confirm-dialog"; -@@ -668,18 +668,18 @@ const char* const kChromeHostURLs[] = { +@@ -554,7 +554,7 @@ const char kPrivacySandboxSubPagePath[] = "/privacySan + #endif + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + const char kChromeUIWebAppSettingsURL[] = "chrome://app-settings/"; + const char kChromeUIWebAppSettingsHost[] = "app-settings"; + #endif +@@ -678,21 +678,21 @@ const char* const kChromeHostURLs[] = { kChromeUIAssistantOptInHost, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) kChromeUIConnectorsInternalsHost, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) kChromeUIDiscardsHost, #endif +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + kChromeUIWebAppSettingsHost, + #endif #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) kChromeUILinuxProxyConfigHost, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) kChromeUISandboxHost, #endif #if BUILDFLAG(IS_WIN) -@@ -736,7 +736,7 @@ const char* const kChromeDebugURLs[] = { +@@ -749,7 +749,7 @@ const char* const kChromeDebugURLs[] = { blink::kChromeUIGpuJavaCrashURL, kChromeUIJavaCrashURL, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) kChromeUIWebUIJsErrorURL, #endif kChromeUIQuitURL, diff --git a/www/iridium/files/patch-chrome_common_webui__url__constants.h b/www/iridium/files/patch-chrome_common_webui__url__constants.h index 32904622c022..5444bc983325 100644 --- a/www/iridium/files/patch-chrome_common_webui__url__constants.h +++ b/www/iridium/files/patch-chrome_common_webui__url__constants.h @@ -1,50 +1,57 @@ ---- chrome/common/webui_url_constants.h.orig 2022-03-28 18:11:04 UTC +--- chrome/common/webui_url_constants.h.orig 2022-04-01 07:48:30 UTC +++ chrome/common/webui_url_constants.h -@@ -371,18 +371,18 @@ extern const char kOsUIFlagsURL[]; +@@ -371,24 +371,24 @@ extern const char kOsUIFlagsURL[]; extern const char kOsUIVersionURL[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kChromeUIWebUIJsErrorHost[]; extern const char kChromeUIWebUIJsErrorURL[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kChromeUIConnectorsInternalsHost[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kChromeUIDiscardsHost[]; extern const char kChromeUIDiscardsURL[]; #endif -@@ -397,14 +397,14 @@ extern const char kChromeUILinuxProxyConfigHost[]; + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + extern const char kChromeUIWebAppSettingsURL[]; + extern const char kChromeUIWebAppSettingsHost[]; + #endif +@@ -403,14 +403,14 @@ extern const char kChromeUILinuxProxyConfigHost[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) extern const char kChromeUISandboxHost[]; #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) || BUILDFLAG(IS_FUCHSIA) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) extern const char kChromeUIBrowserSwitchHost[]; extern const char kChromeUIBrowserSwitchURL[]; extern const char kChromeUIEnterpriseProfileWelcomeHost[]; -@@ -416,7 +416,7 @@ extern const char kChromeUIProfilePickerUrl[]; +@@ -422,7 +422,7 @@ extern const char kChromeUIProfilePickerUrl[]; extern const char kChromeUIProfilePickerStartupQuery[]; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) extern const char kChromeUITabModalConfirmDialogHost[]; diff --git a/www/iridium/files/patch-chrome_services_printing_print__backend__service__impl.cc b/www/iridium/files/patch-chrome_services_printing_print__backend__service__impl.cc index b76179d61862..b1209960bc75 100644 --- a/www/iridium/files/patch-chrome_services_printing_print__backend__service__impl.cc +++ b/www/iridium/files/patch-chrome_services_printing_print__backend__service__impl.cc @@ -1,11 +1,11 @@ ---- chrome/services/printing/print_backend_service_impl.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/services/printing/print_backend_service_impl.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/services/printing/print_backend_service_impl.cc -@@ -484,7 +484,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( +@@ -510,7 +510,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( crash_keys_ = std::make_unique( print_backend_->GetPrinterDriverInfo(printer_name)); -#if BUILDFLAG(IS_LINUX) && defined(USE_CUPS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(USE_CUPS) // Try to fill in advanced settings based upon basic info options. PrinterBasicInfo basic_info; if (print_backend_->GetPrinterBasicInfo(printer_name, &basic_info) == diff --git a/www/iridium/files/patch-chrome_test_BUILD.gn b/www/iridium/files/patch-chrome_test_BUILD.gn index 7818316ac69c..c2f99cffe5e2 100644 --- a/www/iridium/files/patch-chrome_test_BUILD.gn +++ b/www/iridium/files/patch-chrome_test_BUILD.gn @@ -1,11 +1,11 @@ ---- chrome/test/BUILD.gn.orig 2022-03-28 18:11:04 UTC +--- chrome/test/BUILD.gn.orig 2022-04-01 07:48:30 UTC +++ chrome/test/BUILD.gn -@@ -8875,7 +8875,7 @@ test("chrome_app_unittests") { +@@ -9110,7 +9110,7 @@ test("chrome_app_unittests") { "//components/safe_browsing:buildflags", "//pdf:pdf_ppapi", ] - if (!is_fuchsia) { + if (!is_fuchsia && !is_bsd) { deps += [ "//third_party/breakpad:client" ] } if (enable_gwp_asan) { diff --git a/www/iridium/files/patch-chrome_test_chromedriver_chrome__launcher.cc b/www/iridium/files/patch-chrome_test_chromedriver_chrome__launcher.cc index 330009f27185..1d0dd8655cc1 100644 --- a/www/iridium/files/patch-chrome_test_chromedriver_chrome__launcher.cc +++ b/www/iridium/files/patch-chrome_test_chromedriver_chrome__launcher.cc @@ -1,10 +1,10 @@ ---- chrome/test/chromedriver/chrome_launcher.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/test/chromedriver/chrome_launcher.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/test/chromedriver/chrome_launcher.cc @@ -65,6 +65,7 @@ #include #include #include +#include #include - #elif defined(OS_WIN) + #elif BUILDFLAG(IS_WIN) #include "chrome/test/chromedriver/keycode_text_conversion.h" diff --git a/www/iridium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc b/www/iridium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc index fae54c5753c3..1ca8f641156b 100644 --- a/www/iridium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc +++ b/www/iridium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc @@ -1,20 +1,20 @@ ---- chrome/test/chromedriver/chrome/chrome_finder.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/test/chromedriver/chrome/chrome_finder.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/test/chromedriver/chrome/chrome_finder.cc @@ -54,7 +54,7 @@ void GetApplicationDirs(std::vector* l installation_locations[i].Append(L"Chromium\\Application")); } } --#elif defined(OS_LINUX) || defined(OS_CHROMEOS) -+#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void GetApplicationDirs(std::vector* locations) { // TODO: Respect users' PATH variables. // Until then, we use an approximation of the most common defaults. @@ -139,7 +139,7 @@ bool FindChrome(base::FilePath* browser_exe) { base::FilePath browser_exes_array[] = { - #if defined(OS_WIN) || defined(OS_MAC) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) base::FilePath(chrome::kBrowserProcessExecutablePath), --#elif defined(OS_LINUX) || defined(OS_CHROMEOS) -+#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath("google-chrome"), base::FilePath(chrome::kBrowserProcessExecutablePath), base::FilePath("chromium"), diff --git a/www/iridium/files/patch-chrome_test_chromedriver_key__converter__unittest.cc b/www/iridium/files/patch-chrome_test_chromedriver_key__converter__unittest.cc index 75c0c98c6436..63508afbbf23 100644 --- a/www/iridium/files/patch-chrome_test_chromedriver_key__converter__unittest.cc +++ b/www/iridium/files/patch-chrome_test_chromedriver_key__converter__unittest.cc @@ -1,20 +1,20 @@ ---- chrome/test/chromedriver/key_converter_unittest.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/test/chromedriver/key_converter_unittest.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/test/chromedriver/key_converter_unittest.cc @@ -246,7 +246,7 @@ TEST(KeyConverter, ToggleModifiers) { CheckEventsReleaseModifiers(keys, key_events); } --#if defined(OS_LINUX) || defined(OS_CHROMEOS) -+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Fails on bots: crbug.com/174962 #define MAYBE_AllEnglishKeyboardSymbols DISABLED_AllEnglishKeyboardSymbols #else @@ -303,7 +303,7 @@ TEST(KeyConverter, AllEnglishKeyboardTextChars) { TEST(KeyConverter, AllSpecialWebDriverKeysOnEnglishKeyboard) { ui::ScopedKeyboardLayout keyboard_layout(ui::KEYBOARD_LAYOUT_ENGLISH_US); const char kTextForKeys[] = { --#if defined(OS_LINUX) || defined(OS_CHROMEOS) -+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) 0, 0, 0, 0, '\t', 0, '\r', '\r', 0, 0, 0, 0, 0, #else 0, 0, 0, 0, 0, 0, '\r', '\r', 0, 0, 0, 0, 0, diff --git a/www/iridium/files/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc b/www/iridium/files/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc index c60cc45f100e..e4a49cf12969 100644 --- a/www/iridium/files/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc +++ b/www/iridium/files/patch-chrome_test_chromedriver_keycode__text__conversion__unittest.cc @@ -1,20 +1,20 @@ ---- chrome/test/chromedriver/keycode_text_conversion_unittest.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/test/chromedriver/keycode_text_conversion_unittest.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/test/chromedriver/keycode_text_conversion_unittest.cc @@ -64,7 +64,7 @@ std::string ConvertKeyCodeToTextNoError(ui::KeyboardCo // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. --#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Fails on bots: crbug.com/174962 #define MAYBE_KeyCodeToText DISABLED_KeyCodeToText #else @@ -101,7 +101,7 @@ TEST(KeycodeTextConversionTest, MAYBE_KeyCodeToText) { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. --#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Fails on bots: crbug.com/174962 #define MAYBE_CharToKeyCode DISABLED_CharToKeyCode #else diff --git a/www/iridium/files/patch-chrome_updater_app_app__install.cc b/www/iridium/files/patch-chrome_updater_app_app__install.cc index e7c20b5b79a2..a3427e8079ef 100644 --- a/www/iridium/files/patch-chrome_updater_app_app__install.cc +++ b/www/iridium/files/patch-chrome_updater_app_app__install.cc @@ -1,11 +1,11 @@ ---- chrome/updater/app/app_install.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/updater/app/app_install.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/updater/app/app_install.cc -@@ -155,7 +155,7 @@ void AppInstall::WakeCandidate() { +@@ -166,7 +166,7 @@ void AppInstall::WakeCandidate() { update_service_internal, base::WrapRefCounted(this))); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1276114) - implement. void AppInstall::WakeCandidateDone() { NOTIMPLEMENTED(); diff --git a/www/iridium/files/patch-chrome_updater_configurator.cc b/www/iridium/files/patch-chrome_updater_configurator.cc index 5dd8f7105fdf..b91ebff0c9c1 100644 --- a/www/iridium/files/patch-chrome_updater_configurator.cc +++ b/www/iridium/files/patch-chrome_updater_configurator.cc @@ -1,11 +1,11 @@ ---- chrome/updater/configurator.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/updater/configurator.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/updater/configurator.cc -@@ -37,7 +37,7 @@ +@@ -39,7 +39,7 @@ #include "chrome/updater/win/net/network.h" #elif BUILDFLAG(IS_MAC) #include "chrome/updater/mac/net/network.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/updater/linux/net/network.h" #endif diff --git a/www/iridium/files/patch-chrome_updater_updater.cc b/www/iridium/files/patch-chrome_updater_updater.cc index e42d482732a6..5c5f148d39d7 100644 --- a/www/iridium/files/patch-chrome_updater_updater.cc +++ b/www/iridium/files/patch-chrome_updater_updater.cc @@ -1,11 +1,11 @@ ---- chrome/updater/updater.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/updater/updater.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/updater/updater.cc -@@ -38,7 +38,7 @@ +@@ -41,7 +41,7 @@ #include "chrome/updater/win/win_util.h" #elif BUILDFLAG(IS_MAC) #include "chrome/updater/app/server/mac/server.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/updater/app/server/linux/server.h" #endif diff --git a/www/iridium/files/patch-chrome_updater_util.cc b/www/iridium/files/patch-chrome_updater_util.cc index 8e843ddbeb6b..cd83b2de661e 100644 --- a/www/iridium/files/patch-chrome_updater_util.cc +++ b/www/iridium/files/patch-chrome_updater_util.cc @@ -1,11 +1,11 @@ ---- chrome/updater/util.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/updater/util.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/updater/util.cc -@@ -219,7 +219,7 @@ GURL AppendQueryParameter(const GURL& url, +@@ -253,7 +253,7 @@ GURL AppendQueryParameter(const GURL& url, return url.ReplaceComponents(replacements); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1276188) - implement the functions below. absl::optional GetUpdaterFolderPath(UpdaterScope scope) { diff --git a/www/iridium/files/patch-chrome_utility_services.cc b/www/iridium/files/patch-chrome_utility_services.cc index db489ba1ca6f..7f0c4054190d 100644 --- a/www/iridium/files/patch-chrome_utility_services.cc +++ b/www/iridium/files/patch-chrome_utility_services.cc @@ -1,29 +1,29 @@ ---- chrome/utility/services.cc.orig 2022-03-28 18:11:04 UTC +--- chrome/utility/services.cc.orig 2022-04-01 07:48:30 UTC +++ chrome/utility/services.cc -@@ -64,7 +64,7 @@ +@@ -63,7 +63,7 @@ #include "chrome/services/file_util/file_util_service.h" // nogncheck #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) #include "chrome/services/file_util/document_analysis_service.h" // nogncheck #endif -@@ -218,7 +218,7 @@ auto RunCupsIppParser( +@@ -216,7 +216,7 @@ auto RunCupsIppParser( } #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) auto RunDocumentAnalysis( mojo::PendingReceiver receiver) { return std::make_unique(std::move(receiver)); @@ -382,7 +382,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& services.Add(RunFileUtil); #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) services.Add(RunDocumentAnalysis); #endif diff --git a/www/iridium/files/patch-chromecast_browser_cast__browser__main__parts.cc b/www/iridium/files/patch-chromecast_browser_cast__browser__main__parts.cc index 9308aa567669..1f3bcf5402bf 100644 --- a/www/iridium/files/patch-chromecast_browser_cast__browser__main__parts.cc +++ b/www/iridium/files/patch-chromecast_browser_cast__browser__main__parts.cc @@ -1,65 +1,65 @@ ---- chromecast/browser/cast_browser_main_parts.cc.orig 2022-03-28 18:11:04 UTC +--- chromecast/browser/cast_browser_main_parts.cc.orig 2022-04-01 07:48:30 UTC +++ chromecast/browser/cast_browser_main_parts.cc -@@ -94,7 +94,7 @@ +@@ -93,7 +93,7 @@ #include "ui/base/ui_base_switches.h" #include "ui/gl/gl_switches.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include #include -@@ -149,7 +149,7 @@ +@@ -148,7 +148,7 @@ #include "extensions/browser/extension_prefs.h" // nogncheck #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) #include "chromecast/browser/exo/wayland_server_controller.h" #endif -@@ -285,7 +285,7 @@ class CastViewsDelegate : public views::ViewsDelegate +@@ -284,7 +284,7 @@ class CastViewsDelegate : public views::ViewsDelegate #endif // defined(USE_AURA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath GetApplicationFontsDir() { std::unique_ptr env(base::Environment::Create()); -@@ -331,7 +331,7 @@ const DefaultCommandLineSwitch kDefaultSwitches[] = { +@@ -330,7 +330,7 @@ const DefaultCommandLineSwitch kDefaultSwitches[] = { {cc::switches::kDisableThreadedAnimation, ""}, #endif // BUILDFLAG(IS_ANDROID) #endif // BUILDFLAG(IS_CAST_AUDIO_ONLY) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(ARCH_CPU_X86_FAMILY) // This is needed for now to enable the x11 Ozone platform to work with // current Linux/NVidia OpenGL drivers. -@@ -523,7 +523,7 @@ void CastBrowserMainParts::ToolkitInitialized() { +@@ -522,7 +522,7 @@ void CastBrowserMainParts::ToolkitInitialized() { views_delegate_ = std::make_unique(); #endif // defined(USE_AURA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath dir_font = GetApplicationFontsDir(); const FcChar8 *dir_font_char8 = reinterpret_cast(dir_font.value().data()); if (!FcConfigAppFontAddDir(gfx::GetGlobalFontConfig(), dir_font_char8)) { -@@ -757,7 +757,7 @@ int CastBrowserMainParts::PreMainMessageLoopRun() { +@@ -753,7 +753,7 @@ int CastBrowserMainParts::PreMainMessageLoopRun() { cast_browser_process_->browser_context()); #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) wayland_server_controller_ = std::make_unique(window_manager_.get()); #endif -@@ -832,7 +832,7 @@ void CastBrowserMainParts::PostMainMessageLoopRun() { +@@ -828,7 +828,7 @@ void CastBrowserMainParts::PostMainMessageLoopRun() { cast_browser_process_->cast_service()->Stop(); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) wayland_server_controller_.reset(); #endif #if BUILDFLAG(ENABLE_CHROMECAST_EXTENSIONS) diff --git a/www/iridium/files/patch-chromecast_browser_cast__content__browser__client.cc b/www/iridium/files/patch-chromecast_browser_cast__content__browser__client.cc index 675955a37e83..d0470fd5de3c 100644 --- a/www/iridium/files/patch-chromecast_browser_cast__content__browser__client.cc +++ b/www/iridium/files/patch-chromecast_browser_cast__content__browser__client.cc @@ -1,29 +1,29 @@ ---- chromecast/browser/cast_content_browser_client.cc.orig 2022-03-28 18:11:04 UTC +--- chromecast/browser/cast_content_browser_client.cc.orig 2022-04-01 07:48:30 UTC +++ chromecast/browser/cast_content_browser_client.cc -@@ -133,7 +133,7 @@ +@@ -135,7 +135,7 @@ #include "extensions/common/constants.h" // nogncheck #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) #include "chromecast/browser/webview/webview_controller.h" #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) @@ -476,7 +476,7 @@ void CastContentBrowserClient::AppendExtraCommandLineS switches::kAudioOutputChannels)); } } else if (process_type == switches::kGpuProcess) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Necessary for accelerated 2d canvas. By default on Linux, Chromium // assumes GLES2 contexts can be lost to a power-save mode, which breaks GPU // canvas apps. @@ -872,7 +872,7 @@ CastContentBrowserClient::CreateThrottlesForNavigation handle, general_audience_browsing_service_.get())); } -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) auto webview_throttle = WebviewController::MaybeGetNavigationThrottle(handle); if (webview_throttle) { throttles.push_back(std::move(webview_throttle)); diff --git a/www/iridium/files/patch-chromecast_browser_cast__content__browser__client__receiver__bindings.cc b/www/iridium/files/patch-chromecast_browser_cast__content__browser__client__receiver__bindings.cc index 96fedcf02365..815e3e503f01 100644 --- a/www/iridium/files/patch-chromecast_browser_cast__content__browser__client__receiver__bindings.cc +++ b/www/iridium/files/patch-chromecast_browser_cast__content__browser__client__receiver__bindings.cc @@ -1,20 +1,20 @@ ---- chromecast/browser/cast_content_browser_client_receiver_bindings.cc.orig 2022-03-28 18:11:04 UTC +--- chromecast/browser/cast_content_browser_client_receiver_bindings.cc.orig 2022-04-01 07:48:30 UTC +++ chromecast/browser/cast_content_browser_client_receiver_bindings.cc @@ -35,7 +35,7 @@ #include "media/mojo/services/media_service.h" // nogncheck #endif // BUILDFLAG(ENABLE_CAST_RENDERER) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) #include "chromecast/browser/webview/js_channel_service.h" #include "chromecast/common/mojom/js_channel.mojom.h" #endif -@@ -227,7 +227,7 @@ void CastContentBrowserClient::RunServiceInstance( +@@ -234,7 +234,7 @@ void CastContentBrowserClient::RunServiceInstance( void CastContentBrowserClient::BindHostReceiverForRenderer( content::RenderProcessHost* render_process_host, mojo::GenericPendingReceiver receiver) { -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) if (auto r = receiver.As<::chromecast::mojom::JsChannelBindingProvider>()) { JsChannelService::Create(render_process_host, std::move(r), base::ThreadTaskRunnerHandle::Get()); diff --git a/www/iridium/files/patch-chromecast_renderer_cast__content__renderer__client.cc b/www/iridium/files/patch-chromecast_renderer_cast__content__renderer__client.cc index c367cc738653..a41c24c24a31 100644 --- a/www/iridium/files/patch-chromecast_renderer_cast__content__renderer__client.cc +++ b/www/iridium/files/patch-chromecast_renderer_cast__content__renderer__client.cc @@ -1,11 +1,11 @@ ---- chromecast/renderer/cast_content_renderer_client.cc.orig 2022-03-28 18:11:04 UTC +--- chromecast/renderer/cast_content_renderer_client.cc.orig 2022-04-01 07:48:30 UTC +++ chromecast/renderer/cast_content_renderer_client.cc -@@ -193,7 +193,7 @@ void CastContentRendererClient::RenderFrameCreated( +@@ -194,7 +194,7 @@ void CastContentRendererClient::RenderFrameCreated( dispatcher->OnRenderFrameCreated(render_frame); #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) // JsChannelBindings destroys itself when the RenderFrame is destroyed. JsChannelBindings::Create(render_frame); #endif diff --git a/www/iridium/files/patch-components_autofill_core_browser_personal__data__manager.cc b/www/iridium/files/patch-components_autofill_core_browser_personal__data__manager.cc index 4c77083280de..d8747d4fb33f 100644 --- a/www/iridium/files/patch-components_autofill_core_browser_personal__data__manager.cc +++ b/www/iridium/files/patch-components_autofill_core_browser_personal__data__manager.cc @@ -1,12 +1,12 @@ ---- components/autofill/core/browser/personal_data_manager.cc.orig 2022-03-28 18:11:04 UTC +--- components/autofill/core/browser/personal_data_manager.cc.orig 2022-04-01 07:48:30 UTC +++ components/autofill/core/browser/personal_data_manager.cc -@@ -2107,7 +2107,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp +@@ -1986,7 +1986,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) // This option should only be shown for users that have not enabled the Sync // Feature and that have server credit cards available. if (!sync_service_ || sync_service_->IsSyncFeatureEnabled() || diff --git a/www/iridium/files/patch-components_autofill_core_common_autofill__payments__features.cc b/www/iridium/files/patch-components_autofill_core_common_autofill__payments__features.cc index 4b2dd0134269..b71fcef301cf 100644 --- a/www/iridium/files/patch-components_autofill_core_common_autofill__payments__features.cc +++ b/www/iridium/files/patch-components_autofill_core_common_autofill__payments__features.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/common/autofill_payments_features.cc.orig 2022-03-28 18:11:04 UTC +--- components/autofill/core/common/autofill_payments_features.cc.orig 2022-04-01 07:48:30 UTC +++ components/autofill/core/common/autofill_payments_features.cc -@@ -180,7 +180,7 @@ const base::Feature kAutofillUpstreamAllowAllEmailDoma +@@ -192,7 +192,7 @@ const base::Feature kAutofillUpstreamAllowAllEmailDoma bool ShouldShowImprovedUserConsentForCreditCardSave() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // The new user consent UI is fully launched on MacOS, Windows and Linux. return true; diff --git a/www/iridium/files/patch-components_feature__engagement_public_feature__configurations.cc b/www/iridium/files/patch-components_feature__engagement_public_feature__configurations.cc index 17acd30a6b4d..669e0cc99769 100644 --- a/www/iridium/files/patch-components_feature__engagement_public_feature__configurations.cc +++ b/www/iridium/files/patch-components_feature__engagement_public_feature__configurations.cc @@ -1,21 +1,21 @@ ---- components/feature_engagement/public/feature_configurations.cc.orig 2022-03-28 18:11:04 UTC +--- components/feature_engagement/public/feature_configurations.cc.orig 2022-04-01 07:48:30 UTC +++ components/feature_engagement/public/feature_configurations.cc @@ -35,7 +35,7 @@ FeatureConfig CreateAlwaysTriggerConfig(const base::Fe absl::optional GetClientSideFeatureConfig( const base::Feature* feature) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (kIPHPasswordsAccountStorageFeature.name == feature->name) { absl::optional config = FeatureConfig(); config->valid = true; -@@ -721,7 +721,8 @@ absl::optional GetClientSideFeatureConf +@@ -834,7 +834,8 @@ absl::optional GetClientSideFeatureConf #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) if (kIPHAutofillVirtualCardSuggestionFeature.name == feature->name) { // A config that allows the virtual card credit card suggestion IPH to be // shown when: diff --git a/www/iridium/files/patch-components_feature__engagement_public_feature__constants.cc b/www/iridium/files/patch-components_feature__engagement_public_feature__constants.cc index 61a65f1a4fe0..1b2d566be184 100644 --- a/www/iridium/files/patch-components_feature__engagement_public_feature__constants.cc +++ b/www/iridium/files/patch-components_feature__engagement_public_feature__constants.cc @@ -1,20 +1,20 @@ ---- components/feature_engagement/public/feature_constants.cc.orig 2022-03-28 18:11:04 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2022-04-01 07:48:30 UTC +++ components/feature_engagement/public/feature_constants.cc @@ -22,7 +22,7 @@ const base::Feature kIPHDummyFeature{"IPH_Dummy", base::FEATURE_DISABLED_BY_DEFAULT}; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const base::Feature kIPHDesktopSharedHighlightingFeature{ "IPH_DesktopSharedHighlighting", base::FEATURE_DISABLED_BY_DEFAULT}; const base::Feature kIPHDesktopTabGroupsNewGroupFeature{ -@@ -274,7 +274,7 @@ const base::Feature kIPHDiscoverFeedHeaderFeature{ - "IPH_DiscoverFeedHeaderMenu", base::FEATURE_DISABLED_BY_DEFAULT}; +@@ -286,7 +286,7 @@ const base::Feature kIPHDefaultSiteViewFeature{ + "IPH_DefaultSiteView", base::FEATURE_DISABLED_BY_DEFAULT}; #endif // BUILDFLAG(IS_IOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) const base::Feature kIPHAutofillVirtualCardSuggestionFeature{ "IPH_AutofillVirtualCardSuggestion", base::FEATURE_ENABLED_BY_DEFAULT}; diff --git a/www/iridium/files/patch-components_feature__engagement_public_feature__constants.h b/www/iridium/files/patch-components_feature__engagement_public_feature__constants.h index 25dafc57f631..8b85980fac3c 100644 --- a/www/iridium/files/patch-components_feature__engagement_public_feature__constants.h +++ b/www/iridium/files/patch-components_feature__engagement_public_feature__constants.h @@ -1,20 +1,20 @@ ---- components/feature_engagement/public/feature_constants.h.orig 2022-03-28 18:11:04 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2022-04-01 07:48:30 UTC +++ components/feature_engagement/public/feature_constants.h @@ -30,7 +30,7 @@ extern const base::Feature kUseClientConfigIPH; extern const base::Feature kIPHDummyFeature; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const base::Feature kIPHDesktopSharedHighlightingFeature; extern const base::Feature kIPHDesktopTabGroupsNewGroupFeature; extern const base::Feature kIPHFocusHelpBubbleScreenReaderPromoFeature; -@@ -169,7 +169,7 @@ extern const base::Feature kIPHBadgedTranslateManualTr - extern const base::Feature kIPHDiscoverFeedHeaderFeature; +@@ -174,7 +174,7 @@ extern const base::Feature kIPHDiscoverFeedHeaderFeatu + extern const base::Feature kIPHDefaultSiteViewFeature; #endif // BUILDFLAG(IS_IOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) extern const base::Feature kIPHAutofillVirtualCardSuggestionFeature; extern const base::Feature kIPHUpdatedConnectionSecurityIndicatorsFeature; diff --git a/www/iridium/files/patch-components_feature__engagement_public_feature__list.cc b/www/iridium/files/patch-components_feature__engagement_public_feature__list.cc index 3adf00632691..e43237594fbe 100644 --- a/www/iridium/files/patch-components_feature__engagement_public_feature__list.cc +++ b/www/iridium/files/patch-components_feature__engagement_public_feature__list.cc @@ -1,21 +1,21 @@ ---- components/feature_engagement/public/feature_list.cc.orig 2022-03-28 18:11:04 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2022-04-01 07:48:30 UTC +++ components/feature_engagement/public/feature_list.cc -@@ -117,7 +117,7 @@ const base::Feature* const kAllFeatures[] = { - &kIPHDiscoverFeedHeaderFeature, +@@ -121,7 +121,7 @@ const base::Feature* const kAllFeatures[] = { + &kIPHDefaultSiteViewFeature, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) &kIPHDesktopTabGroupsNewGroupFeature, &kIPHFocusHelpBubbleScreenReaderPromoFeature, &kIPHGMCCastStartStopFeature, -@@ -138,7 +138,8 @@ const base::Feature* const kAllFeatures[] = { +@@ -143,7 +143,8 @@ const base::Feature* const kAllFeatures[] = { // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) &kIPHAutofillVirtualCardSuggestionFeature, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || diff --git a/www/iridium/files/patch-components_feature__engagement_public_feature__list.h b/www/iridium/files/patch-components_feature__engagement_public_feature__list.h index fdc1bf51d0f4..8de030239098 100644 --- a/www/iridium/files/patch-components_feature__engagement_public_feature__list.h +++ b/www/iridium/files/patch-components_feature__engagement_public_feature__list.h @@ -1,40 +1,40 @@ ---- components/feature_engagement/public/feature_list.h.orig 2022-03-28 18:11:04 UTC +--- components/feature_engagement/public/feature_list.h.orig 2022-04-01 07:48:30 UTC +++ components/feature_engagement/public/feature_list.h -@@ -223,7 +223,7 @@ DEFINE_VARIATION_PARAM(kIPHDiscoverFeedHeaderFeature, +@@ -224,7 +224,7 @@ DEFINE_VARIATION_PARAM(kIPHDefaultSiteViewFeature, "IP #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHDesktopTabGroupsNewGroupFeature, "IPH_DesktopTabGroupsNewGroup"); DEFINE_VARIATION_PARAM(kIPHFocusModeFeature, "IPH_FocusMode"); -@@ -252,7 +252,8 @@ DEFINE_VARIATION_PARAM(kIPHDesktopSharedHighlightingFe +@@ -254,7 +254,8 @@ DEFINE_VARIATION_PARAM(kIPHDesktopSharedHighlightingFe // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHAutofillVirtualCardSuggestionFeature, "IPH_AutofillVirtualCardSuggestion"); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || -@@ -356,7 +357,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation - VARIATION_ENTRY(kIPHBadgedTranslateManualTriggerFeature), +@@ -359,7 +360,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation VARIATION_ENTRY(kIPHDiscoverFeedHeaderFeature), + VARIATION_ENTRY(kIPHDefaultSiteViewFeature), #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHDesktopTabGroupsNewGroupFeature), VARIATION_ENTRY(kIPHFocusModeFeature), VARIATION_ENTRY(kIPHGlobalMediaControls), -@@ -378,7 +379,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -382,7 +383,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHAutofillVirtualCardSuggestionFeature), #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || diff --git a/www/iridium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc b/www/iridium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc new file mode 100644 index 000000000000..de7b24c81239 --- /dev/null +++ b/www/iridium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc @@ -0,0 +1,13 @@ +--- components/feed/core/v2/feed_network_impl_unittest.cc.orig 2022-04-01 07:48:30 UTC ++++ components/feed/core/v2/feed_network_impl_unittest.cc +@@ -678,8 +678,8 @@ TEST_F(FeedNetworkTest, SendApiRequest_DecodesClientIn + + EXPECT_EQ(feedwire::ClientInfo::CHROME_ANDROID, client_info.app_type()); + EXPECT_EQ(feedwire::Version::RELEASE, client_info.app_version().build_type()); +- EXPECT_EQ(1, client_info.app_version().major()); +- EXPECT_EQ(2, client_info.app_version().minor()); ++ EXPECT_EQ(1, client_info.app_version().gmajor()); ++ EXPECT_EQ(2, client_info.app_version().gminor()); + EXPECT_EQ(3, client_info.app_version().build()); + EXPECT_EQ(4, client_info.app_version().revision()); + EXPECT_FALSE(client_info.chrome_client_info().start_surface()); diff --git a/www/iridium/files/patch-components_feed_core_v2_test_proto__printer.cc b/www/iridium/files/patch-components_feed_core_v2_test_proto__printer.cc index dddd4e58067e..af369af4886e 100644 --- a/www/iridium/files/patch-components_feed_core_v2_test_proto__printer.cc +++ b/www/iridium/files/patch-components_feed_core_v2_test_proto__printer.cc @@ -1,13 +1,13 @@ ---- components/feed/core/v2/test/proto_printer.cc.orig 2022-03-28 18:11:04 UTC +--- components/feed/core/v2/test/proto_printer.cc.orig 2022-04-01 07:48:30 UTC +++ components/feed/core/v2/test/proto_printer.cc -@@ -158,8 +158,8 @@ class TextProtoPrinter { +@@ -157,8 +157,8 @@ class TextProtoPrinter { } TextProtoPrinter& operator<<(const feedwire::Version& v) { BeginMessage(); - PRINT_FIELD(major); - PRINT_FIELD(minor); + PRINT_FIELD(gmajor); + PRINT_FIELD(gminor); PRINT_FIELD(build); PRINT_FIELD(revision); PRINT_FIELD(architecture); diff --git a/www/iridium/files/patch-components_flags__ui_flags__state.cc b/www/iridium/files/patch-components_flags__ui_flags__state.cc index 2fd82231e7f1..b16c0594bbc1 100644 --- a/www/iridium/files/patch-components_flags__ui_flags__state.cc +++ b/www/iridium/files/patch-components_flags__ui_flags__state.cc @@ -1,11 +1,11 @@ ---- components/flags_ui/flags_state.cc.orig 2022-03-28 18:11:04 UTC +--- components/flags_ui/flags_state.cc.orig 2022-04-01 07:48:30 UTC +++ components/flags_ui/flags_state.cc -@@ -654,7 +654,7 @@ unsigned short FlagsState::GetCurrentPlatform() { +@@ -622,7 +622,7 @@ unsigned short FlagsState::GetCurrentPlatform() { #elif BUILDFLAG(IS_CHROMEOS_ASH) return kOsCrOS; #elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_OPENBSD) + BUILDFLAG(IS_BSD) return kOsLinux; #elif BUILDFLAG(IS_ANDROID) return kOsAndroid; diff --git a/www/iridium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc b/www/iridium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc index f002a2dbf735..c1ec2c61fe24 100644 --- a/www/iridium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc +++ b/www/iridium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc @@ -1,11 +1,11 @@ ---- components/network_session_configurator/browser/network_session_configurator_unittest.cc.orig 2022-03-28 18:11:04 UTC +--- components/network_session_configurator/browser/network_session_configurator_unittest.cc.orig 2022-04-01 07:48:30 UTC +++ components/network_session_configurator/browser/network_session_configurator_unittest.cc -@@ -775,7 +775,7 @@ TEST_F(NetworkSessionConfiguratorTest, HostRules) { +@@ -776,7 +776,7 @@ TEST_F(NetworkSessionConfiguratorTest, HostRules) { } TEST_F(NetworkSessionConfiguratorTest, DefaultCacheBackend) { -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) EXPECT_EQ(net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE, ChooseCacheType()); #elif BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-components_password__manager_core_browser_login__database.cc b/www/iridium/files/patch-components_password__manager_core_browser_login__database.cc index c598afd7b59f..a4d478a4102e 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_login__database.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_login__database.cc @@ -1,29 +1,29 @@ ---- components/password_manager/core/browser/login_database.cc.orig 2022-03-28 18:11:04 UTC +--- components/password_manager/core/browser/login_database.cc.orig 2022-04-01 07:48:30 UTC +++ components/password_manager/core/browser/login_database.cc -@@ -645,7 +645,7 @@ std::string GeneratePlaceholders(size_t count) { +@@ -664,7 +664,7 @@ std::string GeneratePlaceholders(size_t count) { return result; } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Fills |form| with necessary data required to be removed from the database // and returns it. PasswordForm GetFormForRemoval(sql::Statement& statement) { -@@ -662,7 +662,7 @@ PasswordForm GetFormForRemoval(sql::Statement& stateme +@@ -681,7 +681,7 @@ PasswordForm GetFormForRemoval(sql::Statement& stateme // Whether we should try to return the decryptable passwords while the // encryption service fails for some passwords. bool ShouldReturnPartialPasswords() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(features::kSkipUndecryptablePasswords); #else return false; -@@ -1473,7 +1473,7 @@ bool LoginDatabase::DeleteAndRecreateDatabaseFile() { +@@ -1488,7 +1488,7 @@ bool LoginDatabase::DeleteAndRecreateDatabaseFile() { } DatabaseCleanupResult LoginDatabase::DeleteUndecryptableLogins() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) TRACE_EVENT0("passwords", "LoginDatabase::DeleteUndecryptableLogins"); // If the Keychain in MacOS or the real secret key in Linux is unavailable, // don't delete any logins. diff --git a/www/iridium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc b/www/iridium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc index e02c63856c0d..b0614c892b7f 100644 --- a/www/iridium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc +++ b/www/iridium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc @@ -1,11 +1,20 @@ ---- components/password_manager/core/browser/sync/password_sync_bridge.cc.orig 2022-03-28 18:11:04 UTC +--- components/password_manager/core/browser/sync/password_sync_bridge.cc.orig 2022-04-01 07:48:30 UTC +++ components/password_manager/core/browser/sync/password_sync_bridge.cc -@@ -181,7 +181,7 @@ bool ShouldRecoverPasswordsDuringMerge() { +@@ -185,7 +185,7 @@ bool ShouldRecoverPasswordsDuringMerge() { // Delete the local undecryptable copy when this is MacOS only. #if BUILDFLAG(IS_MAC) return true; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled( features::kSyncUndecryptablePasswordsLinux); #else +@@ -194,7 +194,7 @@ bool ShouldRecoverPasswordsDuringMerge() { + } + + bool ShouldCleanSyncMetadataDuringStartupWhenDecryptionFails() { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return ShouldRecoverPasswordsDuringMerge() && + base::FeatureList::IsEnabled( + features::kForceInitialSyncWhenDecryptionFails); diff --git a/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.cc b/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.cc index 7b685a08824f..73ebe9b159da 100644 --- a/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.cc +++ b/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.cc @@ -1,20 +1,29 @@ ---- components/password_manager/core/common/password_manager_features.cc.orig 2022-03-28 18:11:04 UTC +--- components/password_manager/core/common/password_manager_features.cc.orig 2022-04-01 07:48:30 UTC +++ components/password_manager/core/common/password_manager_features.cc -@@ -133,7 +133,7 @@ const base::Feature kReparseServerPredictionsFollowing +@@ -63,7 +63,7 @@ const base::Feature kFillingAcrossAffiliatedWebsites{ + const base::Feature kFillOnAccountSelect = {"fill-on-account-select", + base::FEATURE_DISABLED_BY_DEFAULT}; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // When enabled, initial sync will be forced during startup if the password + // store has encryption service failures. + const base::Feature kForceInitialSyncWhenDecryptionFails = { +@@ -145,7 +145,7 @@ const base::Feature kReparseServerPredictionsFollowing const base::Feature kSecondaryServerFieldPredictions = { "SecondaryServerFieldPredictions", base::FEATURE_ENABLED_BY_DEFAULT}; -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Displays at least the decryptable and never saved logins in the password // manager const base::Feature kSkipUndecryptablePasswords = { -@@ -145,7 +145,7 @@ const base::Feature kSkipUndecryptablePasswords = { +@@ -157,7 +157,7 @@ const base::Feature kSkipUndecryptablePasswords = { const base::Feature kSupportForAddPasswordsInSettings = { "SupportForAddPasswordsInSettings", base::FEATURE_DISABLED_BY_DEFAULT}; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // When enabled, all undecryptable passwords are deleted from the local database // during initial sync flow. const base::Feature kSyncUndecryptablePasswordsLinux = { diff --git a/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.h b/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.h index cf49827c54ec..d9f04dca25d7 100644 --- a/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.h +++ b/www/iridium/files/patch-components_password__manager_core_common_password__manager__features.h @@ -1,16 +1,25 @@ ---- components/password_manager/core/common/password_manager_features.h.orig 2022-03-28 18:11:04 UTC +--- components/password_manager/core/common/password_manager_features.h.orig 2022-04-01 07:48:30 UTC +++ components/password_manager/core/common/password_manager_features.h -@@ -41,11 +41,11 @@ extern const base::Feature kPasswordScriptsFetching; +@@ -27,7 +27,7 @@ extern const base::Feature kEnablePasswordsAccountStor + extern const base::Feature KEnablePasswordGenerationForClearTextFields; + extern const base::Feature kFillingAcrossAffiliatedWebsites; + extern const base::Feature kFillOnAccountSelect; +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + extern const base::Feature kForceInitialSyncWhenDecryptionFails; + #endif + extern const base::Feature kInferConfirmationPasswordField; +@@ -46,11 +46,11 @@ extern const base::Feature kPasswordScriptsFetching; extern const base::Feature kRecoverFromNeverSaveAndroid; extern const base::Feature kReparseServerPredictionsFollowingFormChange; extern const base::Feature kSecondaryServerFieldPredictions; -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const base::Feature kSkipUndecryptablePasswords; #endif extern const base::Feature kSupportForAddPasswordsInSettings; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const base::Feature kSyncUndecryptablePasswordsLinux; #endif - extern const base::Feature kTreatNewPasswordHeuristicsAsReliable; + #if BUILDFLAG(IS_ANDROID) diff --git a/www/iridium/files/patch-components_performance__manager_features.cc b/www/iridium/files/patch-components_performance__manager_features.cc index 2327e70056b6..e7cab87cbb1b 100644 --- a/www/iridium/files/patch-components_performance__manager_features.cc +++ b/www/iridium/files/patch-components_performance__manager_features.cc @@ -1,11 +1,11 @@ ---- components/performance_manager/features.cc.orig 2022-03-28 18:11:04 UTC +--- components/performance_manager/features.cc.orig 2022-04-01 07:48:30 UTC +++ components/performance_manager/features.cc -@@ -22,7 +22,7 @@ const base::Feature kUrgentDiscardingFromPerformanceMa +@@ -21,7 +21,7 @@ const base::Feature kUrgentDiscardingFromPerformanceMa "UrgentDiscardingFromPerformanceManager", // Ash Chrome uses memory pressure evaluator instead of performance manager to // discard tabs. -#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_DISABLED_BY_DEFAULT #else base::FEATURE_ENABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc b/www/iridium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc index 7e21ab0ca0df..0fda10f0c9ba 100644 --- a/www/iridium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc +++ b/www/iridium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc @@ -1,11 +1,11 @@ ---- components/policy/core/browser/policy_pref_mapping_test.cc.orig 2022-03-28 18:11:04 UTC +--- components/policy/core/browser/policy_pref_mapping_test.cc.orig 2022-04-01 07:48:30 UTC +++ components/policy/core/browser/policy_pref_mapping_test.cc -@@ -340,7 +340,7 @@ class PolicyTestCase { +@@ -342,7 +342,7 @@ class PolicyTestCase { const std::string os("chromeos_lacros"); #elif BUILDFLAG(IS_IOS) const std::string os("ios"); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const std::string os("linux"); #elif BUILDFLAG(IS_MAC) const std::string os("mac"); diff --git a/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc b/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc index 0b6ece77e654..eff92a1e79b2 100644 --- a/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc +++ b/www/iridium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc @@ -1,11 +1,11 @@ ---- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2022-03-28 18:11:04 UTC +--- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2022-04-01 07:48:30 UTC +++ components/policy/core/common/cloud/cloud_policy_client.cc -@@ -419,7 +419,7 @@ void CloudPolicyClient::FetchPolicy() { +@@ -417,7 +417,7 @@ void CloudPolicyClient::FetchPolicy() { fetch_request->set_invalidation_payload(invalidation_payload_); } } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Only set browser device identifier for CBCM Chrome cloud policy on // desktop. if (base::FeatureList::IsEnabled( diff --git a/www/iridium/files/patch-components_policy_resources_policy__templates.json b/www/iridium/files/patch-components_policy_resources_policy__templates.json index b473cd0f1045..ac15d8a4c426 100644 --- a/www/iridium/files/patch-components_policy_resources_policy__templates.json +++ b/www/iridium/files/patch-components_policy_resources_policy__templates.json @@ -1,191 +1,191 @@ ---- components/policy/resources/policy_templates.json.orig 2022-03-28 18:11:04 UTC +--- components/policy/resources/policy_templates.json.orig 2022-04-01 07:48:30 UTC +++ components/policy/resources/policy_templates.json -@@ -1410,7 +1410,7 @@ +@@ -1430,7 +1430,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pastarmovj@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win7:11-', 'chrome.mac:11-', 'chrome.linux:11-'], + 'supported_on': ['chrome.win7:11-', 'chrome.mac:11-', 'chrome.linux:11-', 'chrome.openbsd:11-', 'chrome.freebsd:11-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -2512,7 +2512,7 @@ +@@ -2534,7 +2534,7 @@ 'owners': ['file://remoting/OWNERS', 'jamiewalch@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:25-', 'chrome.mac:25-'], + 'supported_on': ['chrome.linux:25-', 'chrome.mac:25-', 'chrome.openbsd:25-', 'chrome.freebsd:25-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -4244,7 +4244,7 @@ +@@ -4300,7 +4300,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pastarmovj@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:57-', 'chrome.mac:88-', 'chrome.linux:88-'], + 'supported_on': ['chrome.win:57-', 'chrome.mac:88-', 'chrome.linux:88-', 'chrome.openbsd:88-', 'chrome.freebsd:88-'], 'features': { 'dynamic_refresh': False, 'per_profile': False, -@@ -4273,7 +4273,7 @@ +@@ -4329,7 +4329,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pastarmovj@chromium.org'], 'type': 'string', 'schema': { 'type': 'string' }, - 'supported_on': ['chrome.win:57-', 'chrome.mac:88-', 'chrome.linux:88-'], + 'supported_on': ['chrome.win:57-', 'chrome.mac:88-', 'chrome.linux:88-', 'chrome.openbsd:88-', 'chrome.freebsd:88-'], 'features': { 'dynamic_refresh': False, 'per_profile': False, -@@ -5187,7 +5187,7 @@ +@@ -5262,7 +5262,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'rsorokin@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:74-','chrome.mac:74-','chrome_os:74-'], + 'supported_on': ['chrome.linux:74-','chrome.mac:74-','chrome_os:74-','chrome.openbsd:74-','chrome.freebsd:74-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -5248,7 +5248,7 @@ +@@ -5323,7 +5323,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'rsorokin@chromium.org'], 'type': 'string', 'schema': { 'type': 'string' }, - 'supported_on': ['chrome.linux:9-'], + 'supported_on': ['chrome.linux:9-','chrome.openbsd:9-','chrome.freebsd:9-'], 'features': { 'dynamic_refresh': False, 'per_profile': False, -@@ -5314,7 +5314,7 @@ +@@ -5389,7 +5389,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'rsorokin@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:63-','chrome.mac:63-','chrome_os:63-','android:63-','webview_android:63-'], + 'supported_on': ['chrome.linux:63-','chrome.mac:63-','chrome_os:63-','android:63-','webview_android:63-','chrome.openbsd:63-','chrome.freebsd:63-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -10099,7 +10099,7 @@ +@@ -10460,7 +10460,7 @@ 'owners': ['file://net/cert/OWNERS', 'rsleevi@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome_os:30-', 'chrome.linux:30-', 'chrome.win:30-'], + 'supported_on': ['chrome_os:30-', 'chrome.linux:30-', 'chrome.win:30-', 'chrome.openbsd:30-', 'chrome.freebsd:30-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -10193,7 +10193,7 @@ +@@ -10554,7 +10554,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pmarko@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome_os:77-83', 'chrome.linux:79-83', 'chrome.mac:83-'], + 'supported_on': ['chrome_os:77-83', 'chrome.linux:79-83', 'chrome.mac:83-', 'chrome.openbsd:79-83', 'chrome.freebsd:79-83'], 'features': { 'dynamic_refresh': False, 'per_profile': False, -@@ -12163,7 +12163,7 @@ +@@ -12551,7 +12551,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pmarko@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:19-', 'chrome.linux:19-'], + 'supported_on': ['chrome.win:19-', 'chrome.linux:19-', 'chrome.openbsd:19-', 'chrome.freebsd:19-'], 'features': { 'can_be_recommended': True, 'dynamic_refresh': True, -@@ -13021,7 +13021,7 @@ +@@ -13409,7 +13409,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'bartfab@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:31-', 'chrome.linux:31-', 'chrome_os:31-'], + 'supported_on': ['chrome.win:31-', 'chrome.linux:31-', 'chrome_os:31-', 'chrome.openbsd:31-', 'chrome.freebsd:31-'], 'features': { 'dynamic_refresh': True, 'per_profile': True, -@@ -19891,7 +19891,7 @@ +@@ -20284,7 +20284,7 @@ 'items': { 'type': 'string' } }, # Spell checking is provided by macOS, so can't be controlled on Mac. - 'supported_on': ['chrome.win:65-', 'chrome.linux:65-', 'chrome_os:65-'], + 'supported_on': ['chrome.win:65-', 'chrome.linux:65-', 'chrome_os:65-', 'chrome.openbsd:65-', 'chrome.freebsd:65-'], 'features': { 'can_be_recommended': False, 'dynamic_refresh': True, -@@ -19922,7 +19922,7 @@ +@@ -20315,7 +20315,7 @@ 'items': { 'type': 'string' } }, # Spell checking is provided by macOS, so can't be controlled on Mac. - 'supported_on': ['chrome.win:75-', 'chrome.linux:75-', 'chrome_os:75-'], + 'supported_on': ['chrome.win:75-', 'chrome.linux:75-', 'chrome_os:75-', 'chrome.openbsd:75-', 'chrome.freebsd:75-'], 'deprecated': True, 'features': { 'can_be_recommended': False, -@@ -19956,7 +19956,7 @@ +@@ -20349,7 +20349,7 @@ 'items': { 'type': 'string' } }, # Spell checking is provided by macOS, so can't be controlled on Mac. - 'supported_on': ['chrome.win:86-', 'chrome.linux:86-', 'chrome_os:86-'], + 'supported_on': ['chrome.win:86-', 'chrome.linux:86-', 'chrome_os:86-', 'chrome.openbsd:86-', 'chrome.freebsd:86-'], 'features': { 'can_be_recommended': False, 'dynamic_refresh': True, -@@ -20694,7 +20694,7 @@ +@@ -21087,7 +21087,7 @@ 'owners': ['fbeaufort@chromium.org', 'beccahughes@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:66-', 'chrome.linux:66-', 'chrome.mac:66-', 'chrome_os:66-'], + 'supported_on': ['chrome.win:66-', 'chrome.linux:66-', 'chrome.mac:66-', 'chrome_os:66-', 'chrome.openbsd:66-', 'chrome.freebsd:66-'], 'features': { 'dynamic_refresh': True, 'per_profile': True, -@@ -24924,7 +24924,7 @@ +@@ -25361,7 +25361,7 @@ 'owners': ['file://services/audio/OWNERS', 'dalecurtis@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:79-', 'chrome.linux:79-', 'chrome.mac:79-'], + 'supported_on': ['chrome.win:79-', 'chrome.linux:79-', 'chrome.mac:79-', 'chrome.openbsd:79-', 'chrome.freebsd:79-'], 'features': { 'dynamic_refresh': False, 'per_profile': False, -@@ -26266,7 +26266,7 @@ If this policy is left unset, privacy screen is disabl +@@ -26703,7 +26703,7 @@ If this policy is left unset, privacy screen is disabl 'owners': ['file://chrome/browser/notifications/OWNERS', 'knollr@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:83-'], + 'supported_on': ['chrome.linux:83-','chrome.openbsd:83-','chrome.freebsd:83-'], 'features': { 'dynamic_refresh': True, 'per_profile': True, -@@ -26290,7 +26290,7 @@ If set to False, $1Google +@@ -26727,7 +26727,7 @@ If set to False, $1Google 'owners': ['file://chrome/browser/notifications/OWNERS'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:90-'], + 'supported_on': ['chrome.linux:90-','chrome.openbsd:90-','chrome.freebsd:90-'], 'features': { 'dynamic_refresh': True, 'per_profile': True, -@@ -27357,7 +27357,7 @@ If you disable this policy, web page scrolling to spec +@@ -27796,7 +27796,7 @@ If you disable this policy, web page scrolling to spec 'owners': ['asumaneev@google.com'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:91-92', 'chrome_os:91-'], + 'supported_on': ['chrome.linux:91-92', 'chrome_os:91-', 'chrome.openbsd:91-', 'chrome.freebsd:91-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -28593,7 +28593,7 @@ When this policy is set, $2 +@@ -29032,7 +29032,7 @@ When this policy is set, $2 }, ], 'default': True, - 'supported_on': ['chrome.win:93-', 'chrome.linux:93-', 'chrome.mac:93-'], + 'supported_on': ['chrome.win:93-', 'chrome.linux:93-', 'chrome.mac:93-', 'chrome.openbsd:93-', 'chrome.freebsd:93-'], 'features': { 'dynamic_refresh': True, 'per_profile': True, -@@ -28726,7 +28726,7 @@ When this policy is set, $2 +@@ -29165,7 +29165,7 @@ When this policy is set, $2 'owners': ['mattm@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'future_on': ['chrome.win', 'chrome.mac', 'chrome.linux'], + 'future_on': ['chrome.win', 'chrome.mac', 'chrome.linux', 'chrome.openbsd', 'chrome.freebsd'], 'features': { 'dynamic_refresh': True, 'per_profile': True, diff --git a/www/iridium/files/patch-components_policy_tools_generate__policy__source.py b/www/iridium/files/patch-components_policy_tools_generate__policy__source.py index 14c6ce6e1716..27e339b8120e 100644 --- a/www/iridium/files/patch-components_policy_tools_generate__policy__source.py +++ b/www/iridium/files/patch-components_policy_tools_generate__policy__source.py @@ -1,14 +1,14 @@ ---- components/policy/tools/generate_policy_source.py.orig 2022-03-28 18:11:04 UTC +--- components/policy/tools/generate_policy_source.py.orig 2022-04-01 07:48:30 UTC +++ components/policy/tools/generate_policy_source.py -@@ -48,8 +48,10 @@ PLATFORM_STRINGS = { +@@ -49,8 +49,10 @@ PLATFORM_STRINGS = { 'ios': ['ios'], 'chrome.win': ['win'], 'chrome.linux': ['linux'], + 'chrome.openbsd': ['openbsd'], + 'chrome.freebsd': ['freebsd'], 'chrome.mac': ['mac'], - 'chrome.*': ['win', 'mac', 'linux', 'fuchsia'], + 'chrome.*': ['win', 'mac', 'linux', 'fuchsia', 'openbsd', 'freebsd'], 'chrome.win7': ['win'], } diff --git a/www/iridium/files/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc b/www/iridium/files/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc index cde4524da864..75db3e0133e8 100644 --- a/www/iridium/files/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc +++ b/www/iridium/files/patch-components_safe__browsing_content_common_file__type__policies__unittest.cc @@ -1,11 +1,11 @@ ---- components/safe_browsing/content/common/file_type_policies_unittest.cc.orig 2022-03-28 18:11:04 UTC +--- components/safe_browsing/content/common/file_type_policies_unittest.cc.orig 2022-04-01 07:48:30 UTC +++ components/safe_browsing/content/common/file_type_policies_unittest.cc -@@ -137,7 +137,7 @@ TEST_F(FileTypePoliciesTest, UnpackResourceBundle) { +@@ -139,7 +139,7 @@ TEST_F(FileTypePoliciesTest, UnpackResourceBundle) { EXPECT_EQ(DownloadFileType::FULL_PING, file_type.ping_setting()); // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) EXPECT_EQ(DownloadFileType::ALLOW_ON_USER_GESTURE, file_type.platform_settings(0).danger_level()); EXPECT_EQ(DownloadFileType::DISALLOW_AUTO_OPEN, diff --git a/www/iridium/files/patch-components_translate_core_common_translate__util.cc b/www/iridium/files/patch-components_translate_core_common_translate__util.cc index 5ffe8123eeca..69214ce8db6a 100644 --- a/www/iridium/files/patch-components_translate_core_common_translate__util.cc +++ b/www/iridium/files/patch-components_translate_core_common_translate__util.cc @@ -1,11 +1,11 @@ ---- components/translate/core/common/translate_util.cc.orig 2022-03-28 18:11:04 UTC +--- components/translate/core/common/translate_util.cc.orig 2022-04-01 07:48:30 UTC +++ components/translate/core/common/translate_util.cc -@@ -29,7 +29,7 @@ const base::Feature kTranslateSubFrames{"TranslateSubF +@@ -34,7 +34,7 @@ const base::Feature kTranslateSubFrames{"TranslateSubF const base::Feature kTFLiteLanguageDetectionEnabled{ "TFLiteLanguageDetectionEnabled", #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-components_viz_common_features.cc b/www/iridium/files/patch-components_viz_common_features.cc index 2321baf9af57..27a1dc968d0c 100644 --- a/www/iridium/files/patch-components_viz_common_features.cc +++ b/www/iridium/files/patch-components_viz_common_features.cc @@ -1,11 +1,11 @@ ---- components/viz/common/features.cc.orig 2022-03-28 18:11:04 UTC +--- components/viz/common/features.cc.orig 2022-04-01 07:48:30 UTC +++ components/viz/common/features.cc -@@ -64,7 +64,7 @@ const base::Feature kUseSkiaRenderer { +@@ -67,7 +67,7 @@ const base::Feature kUseSkiaRenderer { "UseSkiaRenderer", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc b/www/iridium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc index 5de0a3b0ff8a..5cb3992ad3a9 100644 --- a/www/iridium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc +++ b/www/iridium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc @@ -1,11 +1,11 @@ ---- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2022-03-28 18:11:04 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2022-04-01 07:48:30 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl.cc -@@ -1162,7 +1162,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor +@@ -1171,7 +1171,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor ->GetDeviceQueue() ->GetVulkanPhysicalDevice(), VK_IMAGE_TILING_OPTIMAL, ycbcr_info); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Textures that were allocated _on linux_ with ycbcr info came from // VaapiVideoDecoder, which exports using DRM format modifiers. return GrBackendFormat::MakeVk(gr_ycbcr_info, diff --git a/www/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc b/www/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc index e7e5547bfc37..dab72645e2d9 100644 --- a/www/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc +++ b/www/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc @@ -1,20 +1,20 @@ ---- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2022-03-28 18:11:04 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2022-04-01 07:48:30 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -@@ -61,7 +61,7 @@ RootCompositorFrameSinkImpl::Create( +@@ -97,7 +97,7 @@ RootCompositorFrameSinkImpl::Create( // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // For X11, we need notify client about swap completion after resizing, so the // client can use it for synchronize with X11 WM. output_surface->SetNeedsSwapSizeNotifications(true); -@@ -526,7 +526,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw +@@ -569,7 +569,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw display_client_->DidCompleteSwapWithSize(pixel_size); // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (display_client_ && pixel_size != last_swap_pixel_size_) { last_swap_pixel_size_ = pixel_size; display_client_->DidCompleteSwapWithNewSize(last_swap_pixel_size_); diff --git a/www/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h b/www/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h index ed2e669d2847..516b4215a475 100644 --- a/www/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h +++ b/www/iridium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h @@ -1,11 +1,11 @@ ---- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig 2022-03-28 18:11:04 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig 2022-04-01 07:48:30 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h -@@ -189,7 +189,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl +@@ -196,7 +196,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl // 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) gfx::Size last_swap_pixel_size_; #endif diff --git a/www/iridium/files/patch-content_app_content__main.cc b/www/iridium/files/patch-content_app_content__main.cc index 4353fc027f88..80af4f13bb3e 100644 --- a/www/iridium/files/patch-content_app_content__main.cc +++ b/www/iridium/files/patch-content_app_content__main.cc @@ -1,11 +1,11 @@ ---- content/app/content_main.cc.orig 2022-03-28 18:11:04 UTC +--- content/app/content_main.cc.orig 2022-04-01 07:48:30 UTC +++ content/app/content_main.cc -@@ -252,7 +252,7 @@ RunContentProcess(ContentMainParams params, - #endif +@@ -254,7 +254,7 @@ RunContentProcess(ContentMainParams params, + base::allocator::InstallDanglingRawPtrChecks(); base::EnableTerminationOnOutOfMemory(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The various desktop environments set this environment variable that // allows the dbus client library to connect directly to the bus. When this // variable is not set (test environments like xvfb-run), the dbus client diff --git a/www/iridium/files/patch-content_app_content__main__runner__impl.cc b/www/iridium/files/patch-content_app_content__main__runner__impl.cc index e75f35cf9640..6186c3136919 100644 --- a/www/iridium/files/patch-content_app_content__main__runner__impl.cc +++ b/www/iridium/files/patch-content_app_content__main__runner__impl.cc @@ -1,120 +1,120 @@ ---- content/app/content_main_runner_impl.cc.orig 2022-03-28 18:11:04 UTC +--- content/app/content_main_runner_impl.cc.orig 2022-04-01 07:48:30 UTC +++ content/app/content_main_runner_impl.cc @@ -130,13 +130,13 @@ #include "base/posix/global_descriptors.h" #include "content/public/common/content_descriptors.h" -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) #include "content/public/common/zygote/zygote_fork_delegate_linux.h" #endif #endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/native_library.h" #include "base/rand_util.h" #include "content/public/common/zygote/sandbox_support_linux.h" @@ -170,6 +170,10 @@ #include "media/base/media_switches.h" #endif +#if BUILDFLAG(IS_BSD) +#include "base/system/sys_info.h" +#endif + #if BUILDFLAG(IS_ANDROID) #include "base/system/sys_info.h" #include "components/power_scheduler/power_scheduler.h" -@@ -335,7 +339,7 @@ void InitializeZygoteSandboxForBrowserProcess( +@@ -340,7 +344,7 @@ void InitializeZygoteSandboxForBrowserProcess( } #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if BUILDFLAG(ENABLE_PLUGINS) // Loads the (native) libraries but does not initialize them (i.e., does not -@@ -371,7 +375,7 @@ void PreloadLibraryCdms() { +@@ -376,7 +380,7 @@ void PreloadLibraryCdms() { } #endif // BUILDFLAG(ENABLE_LIBRARY_CDMS) -#if BUILDFLAG(USE_ZYGOTE_HANDLE) +#if BUILDFLAG(USE_ZYGOTE_HANDLE) || BUILDFLAG(IS_BSD) void PreSandboxInit() { // Pre-acquire resources needed by BoringSSL. See // https://boringssl.googlesource.com/boringssl/+/HEAD/SANDBOXING.md -@@ -387,6 +391,11 @@ void PreSandboxInit() { +@@ -392,6 +396,11 @@ void PreSandboxInit() { #endif InitializeWebRtcModule(); +#if BUILDFLAG(IS_BSD) + // "cache" the amount of physical memory before pledge(2) + base::SysInfo::AmountOfPhysicalMemoryMB(); +#endif + // Set the android SkFontMgr for blink. We need to ensure this is done // before the sandbox is initialized to allow the font manager to access // font configuration files on disk. -@@ -556,7 +565,7 @@ int NO_STACK_PROTECTOR RunZygote(ContentMainDelegate* +@@ -561,7 +570,7 @@ int NO_STACK_PROTECTOR RunZygote(ContentMainDelegate* delegate->ZygoteStarting(&zygote_fork_delegates); media::InitializeMediaLibrary(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) PreSandboxInit(); #endif -@@ -732,11 +741,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -747,11 +756,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam kFieldTrialDescriptor + base::GlobalDescriptors::kBaseDescriptor); #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) g_fds->Set(kCrashDumpSignal, kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); -#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || - // BUILDFLAG(IS_OPENBSD) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #endif // !BUILDFLAG(IS_WIN) -@@ -925,6 +933,16 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -949,6 +957,16 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam } #endif +#if BUILDFLAG(IS_BSD) + if (process_type.empty()) { + sandbox::policy::SandboxLinux::Options sandbox_options; + sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox( + sandbox::policy::SandboxTypeFromCommandLine( + *base::CommandLine::ForCurrentProcess()), + sandbox::policy::SandboxLinux::PreSandboxHook(), sandbox_options); + } +#endif + delegate_->SandboxInitialized(process_type); #if BUILDFLAG(USE_ZYGOTE_HANDLE) -@@ -980,7 +998,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1004,7 +1022,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { mojo::core::InitFeatures(); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If dynamic Mojo Core is being used, ensure that it's loaded very early in // the child/zygote process, before any sandbox is initialized. The library // is not fully initialized with IPC support until a ChildProcess is later -@@ -1013,6 +1031,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1037,6 +1055,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { content_main_params_.reset(); RegisterMainThreadFactories(); + +#if BUILDFLAG(IS_BSD) + if (!process_type.empty()) + PreSandboxInit(); +#endif if (process_type.empty()) return RunBrowser(std::move(main_params), start_minimal_browser); diff --git a/www/iridium/files/patch-content_browser_BUILD.gn b/www/iridium/files/patch-content_browser_BUILD.gn index 3271df3834d3..b375fef09750 100644 --- a/www/iridium/files/patch-content_browser_BUILD.gn +++ b/www/iridium/files/patch-content_browser_BUILD.gn @@ -1,16 +1,16 @@ ---- content/browser/BUILD.gn.orig 2022-03-28 18:11:04 UTC +--- content/browser/BUILD.gn.orig 2022-04-01 07:48:30 UTC +++ content/browser/BUILD.gn -@@ -2318,6 +2318,13 @@ source_set("browser") { +@@ -2331,6 +2331,13 @@ source_set("browser") { ] } + if (is_bsd) { + sources -= [ + "sandbox_ipc_linux.cc", + "sandbox_ipc_linux.h", + ] + } + if (is_chromeos) { deps += [ "//components/value_store:value_store" ] sources += [ diff --git a/www/iridium/files/patch-content_browser_browser__child__process__host__impl.cc b/www/iridium/files/patch-content_browser_browser__child__process__host__impl.cc index e8d2c7ab88d3..b96a9c4d7fb6 100644 --- a/www/iridium/files/patch-content_browser_browser__child__process__host__impl.cc +++ b/www/iridium/files/patch-content_browser_browser__child__process__host__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/browser_child_process_host_impl.cc.orig 2022-03-28 18:11:04 UTC +--- content/browser/browser_child_process_host_impl.cc.orig 2022-04-01 07:48:30 UTC +++ content/browser/browser_child_process_host_impl.cc -@@ -293,6 +293,8 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo +@@ -292,6 +292,8 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo switches::kDisableBestEffortTasks, switches::kDisableLogging, switches::kEnableLogging, + switches::kDisableUnveil, + switches::kTrk, switches::kIPCConnectionTimeout, switches::kLogBestEffortTasks, switches::kLogFile, diff --git a/www/iridium/files/patch-content_browser_browser__main__loop.cc b/www/iridium/files/patch-content_browser_browser__main__loop.cc index 0675e64fb3ba..8ee3c56c945d 100644 --- a/www/iridium/files/patch-content_browser_browser__main__loop.cc +++ b/www/iridium/files/patch-content_browser_browser__main__loop.cc @@ -1,46 +1,46 @@ ---- content/browser/browser_main_loop.cc.orig 2022-03-28 18:11:04 UTC +--- content/browser/browser_main_loop.cc.orig 2022-04-01 07:48:30 UTC +++ content/browser/browser_main_loop.cc -@@ -239,6 +239,12 @@ +@@ -240,6 +240,12 @@ #include "mojo/public/cpp/bindings/lib/test_random_mojo_delays.h" #endif +#if BUILDFLAG(IS_BSD) +#include "content/browser/sandbox_host_linux.h" +#include "content/public/common/zygote/sandbox_support_linux.h" +#include "sandbox/policy/sandbox.h" +#endif + // One of the linux specific headers defines this as a macro. #ifdef DestroyAll #undef DestroyAll -@@ -546,6 +552,12 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -547,6 +553,12 @@ int BrowserMainLoop::EarlyInitialization() { // by now since a thread to start the ServiceManager has been created // before the browser main loop starts. DCHECK(SandboxHostLinux::GetInstance()->IsInitialized()); +#elif BUILDFLAG(IS_BSD) + base::FileHandleMappingVector additional_remapped_fds; + base::LaunchOptions options; + SandboxHostLinux::GetInstance()->Init(); + const int sfd = SandboxHostLinux::GetInstance()->GetChildSocket(); + options.fds_to_remap.push_back(std::make_pair(sfd, GetSandboxFD())); #endif // GLib's spawning of new processes is buggy, so it's important that at this -@@ -573,7 +585,7 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -574,7 +586,7 @@ int BrowserMainLoop::EarlyInitialization() { // Up the priority of the UI thread unless it was already high (since Mac // and recent versions of Android (O+) do this automatically). -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( features::kBrowserUseDisplayThreadPriority) && base::PlatformThread::GetCurrentThreadPriority() < -@@ -584,7 +596,7 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -585,7 +597,7 @@ int BrowserMainLoop::EarlyInitialization() { #endif // !BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // We use quite a few file descriptors for our IPC as well as disk the disk // cache,and the default limit on the Mac is low (256), so bump it up. diff --git a/www/iridium/files/patch-content_browser_compute__pressure_cpu__probe.cc b/www/iridium/files/patch-content_browser_compute__pressure_cpu__probe.cc index 038db95c56e9..d78b05174e86 100644 --- a/www/iridium/files/patch-content_browser_compute__pressure_cpu__probe.cc +++ b/www/iridium/files/patch-content_browser_compute__pressure_cpu__probe.cc @@ -1,10 +1,10 @@ ---- content/browser/compute_pressure/cpu_probe.cc.orig 2022-03-28 18:11:04 UTC +--- content/browser/compute_pressure/cpu_probe.cc.orig 2022-04-01 07:48:30 UTC +++ content/browser/compute_pressure/cpu_probe.cc -@@ -52,6 +52,7 @@ std::unique_ptr CpuProbe::Create() { +@@ -53,6 +53,7 @@ std::unique_ptr CpuProbe::Create() { #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) return CpuProbeLinux::Create(); #else + NOTIMPLEMENTED(); return std::make_unique(); #endif // BUILDFLAG(IS_ANDROID) } diff --git a/www/iridium/files/patch-content_browser_download_download__manager__impl.cc b/www/iridium/files/patch-content_browser_download_download__manager__impl.cc index 945362021e80..28bf3386b1da 100644 --- a/www/iridium/files/patch-content_browser_download_download__manager__impl.cc +++ b/www/iridium/files/patch-content_browser_download_download__manager__impl.cc @@ -1,29 +1,29 @@ ---- content/browser/download/download_manager_impl.cc.orig 2022-03-28 18:11:04 UTC +--- content/browser/download/download_manager_impl.cc.orig 2022-04-01 07:48:30 UTC +++ content/browser/download/download_manager_impl.cc -@@ -88,7 +88,7 @@ +@@ -89,7 +89,7 @@ #include "third_party/blink/public/common/storage_key/storage_key.h" #include "url/origin.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/nix/xdg_util.h" #endif -@@ -235,7 +235,7 @@ class DownloadItemFactoryImpl : public download::Downl +@@ -217,7 +217,7 @@ class DownloadItemFactoryImpl : public download::Downl } }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath GetTemporaryDownloadDirectory() { std::unique_ptr env(base::Environment::Create()); return base::nix::GetXDGDirectory(env.get(), "XDG_DATA_HOME", ".local/share"); -@@ -591,7 +591,7 @@ bool DownloadManagerImpl::InterceptDownload( +@@ -653,7 +653,7 @@ bool DownloadManagerImpl::InterceptDownload( base::FilePath DownloadManagerImpl::GetDefaultDownloadDirectory() { base::FilePath default_download_directory; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(thomasanderson,crbug.com/784010): Remove this when all Linux // distros with versions of GTK lower than 3.14.7 are no longer // supported. This should happen when support for Ubuntu Trusty and diff --git a/www/iridium/files/patch-content_browser_font__access_font__enumeration__cache.h b/www/iridium/files/patch-content_browser_font__access_font__enumeration__cache.h deleted file mode 100644 index 871d4cf5adab..000000000000 --- a/www/iridium/files/patch-content_browser_font__access_font__enumeration__cache.h +++ /dev/null @@ -1,11 +0,0 @@ ---- content/browser/font_access/font_enumeration_cache.h.orig 2022-03-28 18:11:04 UTC -+++ content/browser/font_access/font_enumeration_cache.h -@@ -24,7 +24,7 @@ - #include "third_party/blink/public/mojom/font_access/font_access.mojom.h" - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - #define PLATFORM_HAS_LOCAL_FONT_ENUMERATION_IMPL 1 - #endif - diff --git a/www/iridium/files/patch-content_browser_font__access_font__enumeration__data__source.cc b/www/iridium/files/patch-content_browser_font__access_font__enumeration__data__source.cc new file mode 100644 index 000000000000..bcff0127a457 --- /dev/null +++ b/www/iridium/files/patch-content_browser_font__access_font__enumeration__data__source.cc @@ -0,0 +1,29 @@ +--- content/browser/font_access/font_enumeration_data_source.cc.orig 2022-04-01 07:48:30 UTC ++++ content/browser/font_access/font_enumeration_data_source.cc +@@ -16,7 +16,7 @@ + #include "content/browser/font_access/font_enumeration_data_source_win.h" + #elif BUILDFLAG(IS_MAC) + #include "content/browser/font_access/font_enumeration_data_source_mac.h" +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "content/browser/font_access/font_enumeration_data_source_linux.h" + #endif // BUILDFLAG(IS_WIN) + +@@ -61,7 +61,7 @@ std::unique_ptr FontEnumera + return std::make_unique(); + #elif BUILDFLAG(IS_MAC) + return std::make_unique(); +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + return std::make_unique(); + #else + return std::make_unique(); +@@ -76,7 +76,7 @@ bool FontEnumerationDataSource::IsOsSupportedForTestin + return true; + #elif BUILDFLAG(IS_MAC) + return true; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + return true; + #else + return false; diff --git a/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc b/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc deleted file mode 100644 index d7d47d6251c1..000000000000 --- a/www/iridium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2022-03-28 18:11:04 UTC -+++ content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1340,7 +1340,7 @@ void GpuDataManagerImplPrivate::AppendGpuCommandLine( - break; - case gpu::GpuMode::SWIFTSHADER: { - bool legacy_software_gl = true; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - // This setting makes WebGL run on SwANGLE instead of SwiftShader GL. - legacy_software_gl = false; - #endif diff --git a/www/iridium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc b/www/iridium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc index 51b2039bfef2..1bfee54eb448 100644 --- a/www/iridium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc +++ b/www/iridium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/media/media_keys_listener_manager_impl.cc.orig 2022-03-28 18:11:04 UTC +--- content/browser/media/media_keys_listener_manager_impl.cc.orig 2022-04-01 07:48:30 UTC +++ content/browser/media/media_keys_listener_manager_impl.cc -@@ -226,7 +226,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMe +@@ -232,7 +232,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMe // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) system_media_controls_ = system_media_controls::SystemMediaControls::Create( media::AudioManager::GetGlobalAppName()); #endif diff --git a/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.cc b/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.cc index f4ad47d56e33..b06a6bb70c9f 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.cc +++ b/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.cc @@ -1,38 +1,38 @@ ---- content/browser/renderer_host/render_process_host_impl.cc.orig 2022-03-28 18:11:04 UTC +--- content/browser/renderer_host/render_process_host_impl.cc.orig 2022-04-01 07:48:30 UTC +++ content/browser/renderer_host/render_process_host_impl.cc -@@ -206,7 +206,7 @@ +@@ -208,7 +208,7 @@ #include "third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck -@@ -1226,7 +1226,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = +@@ -1228,7 +1228,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = // to indicate failure and std::numeric_limits::max() to indicate // unlimited. size_t GetPlatformProcessLimit() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) struct rlimit limit; if (getrlimit(RLIMIT_NPROC, &limit) != 0) return kUnknownPlatformProcessLimit; -@@ -1313,7 +1313,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1315,7 +1315,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (auto font_receiver = receiver.As()) { ConnectToFontService(std::move(font_receiver)); return; -@@ -3321,6 +3321,8 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin +@@ -3332,6 +3332,8 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, switches::kDisableTouchDragDrop, + switches::kDisableUnveil, + switches::kTrk, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, switches::kDisableWebGLImageChromium, diff --git a/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.h b/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.h index 225fb8891df0..893e26159377 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.h +++ b/www/iridium/files/patch-content_browser_renderer__host_render__process__host__impl.h @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/render_process_host_impl.h.orig 2022-03-28 18:11:04 UTC +--- content/browser/renderer_host/render_process_host_impl.h.orig 2022-04-01 07:48:30 UTC +++ content/browser/renderer_host/render_process_host_impl.h -@@ -464,7 +464,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -465,7 +465,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // Sets this RenderProcessHost to be guest only. For Testing only. void SetForGuestsOnlyForTesting(); -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) // Launch the zygote early in the browser startup. static void EarlyZygoteLaunch(); #endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) diff --git a/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc b/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc index bc5b24747cb6..470221ac447c 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc +++ b/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc @@ -1,47 +1,47 @@ ---- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2022-03-28 18:11:04 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2022-04-01 07:48:30 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -115,7 +115,7 @@ #include "ui/gfx/gdi_util.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "content/browser/accessibility/browser_accessibility_auralinux.h" #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h" -@@ -429,7 +429,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge +@@ -453,7 +453,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge if (manager) return ToBrowserAccessibilityWin(manager->GetRoot())->GetCOM(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BrowserAccessibilityManager* manager = host()->GetOrCreateRootBrowserAccessibilityManager(); if (manager && manager->GetRoot()) -@@ -1552,7 +1552,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { +@@ -1576,7 +1576,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { return GetTextInputManager() && GetTextInputManager()->should_do_learning(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool RenderWidgetHostViewAura::SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) { -@@ -2369,7 +2369,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -2412,7 +2412,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { } bool RenderWidgetHostViewAura::NeedsMouseCapture() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) return NeedsInputGrab(); #else return false; -@@ -2546,7 +2546,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -2604,7 +2604,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit if (!target_host) return; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate = ui::GetTextEditKeyBindingsDelegate(); std::vector commands; diff --git a/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h b/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h index 2f0e3705ffa4..6e2eae4efd79 100644 --- a/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h +++ b/www/iridium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/render_widget_host_view_aura.h.orig 2022-03-28 18:11:04 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.h.orig 2022-04-01 07:48:30 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.h -@@ -240,7 +240,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura +@@ -243,7 +243,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura ukm::SourceId GetClientSourceForMetrics() const override; bool ShouldDoLearning() override; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) override; diff --git a/www/iridium/files/patch-content_browser_web__contents_web__contents__view__aura.cc b/www/iridium/files/patch-content_browser_web__contents_web__contents__view__aura.cc index 56df334677d6..cdfb2fa58db8 100644 --- a/www/iridium/files/patch-content_browser_web__contents_web__contents__view__aura.cc +++ b/www/iridium/files/patch-content_browser_web__contents_web__contents__view__aura.cc @@ -1,29 +1,29 @@ ---- content/browser/web_contents/web_contents_view_aura.cc.orig 2022-03-28 18:11:04 UTC +--- content/browser/web_contents/web_contents_view_aura.cc.orig 2022-04-01 07:48:30 UTC +++ content/browser/web_contents/web_contents_view_aura.cc @@ -159,7 +159,7 @@ class WebDragSourceAura : public content::WebContentsO raw_ptr window_; }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Fill out the OSExchangeData with a file contents, synthesizing a name if // necessary. void PrepareDragForFileContents(const DropData& drop_data, @@ -242,7 +242,7 @@ void PrepareDragData(const DropData& drop_data, if (!drop_data.download_metadata.empty()) PrepareDragForDownload(drop_data, provider, web_contents); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // We set the file contents before the URL because the URL also sets file // contents (to a .URL shortcut). We want to prefer file content data over // a shortcut so we add it first. -@@ -1312,7 +1312,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* +@@ -1324,7 +1324,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* // Linux window managers like to handle raise-on-click themselves. If we // raise-on-click manually, this may override user settings that prevent // focus-stealing. -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // It is possible for the web-contents to be destroyed while it is being // activated. Use a weak-ptr to track whether that happened or not. // More in https://crbug.com/1040725 diff --git a/www/iridium/files/patch-content_child_child__process.cc b/www/iridium/files/patch-content_child_child__process.cc index 7c5744619280..bcd211e3e3e7 100644 --- a/www/iridium/files/patch-content_child_child__process.cc +++ b/www/iridium/files/patch-content_child_child__process.cc @@ -1,11 +1,11 @@ ---- content/child/child_process.cc.orig 2022-03-28 18:11:04 UTC +--- content/child/child_process.cc.orig 2022-04-01 07:48:30 UTC +++ content/child/child_process.cc -@@ -52,7 +52,7 @@ ChildProcess::ChildProcess(base::ThreadPriority io_thr +@@ -71,7 +71,7 @@ ChildProcess::ChildProcess(base::ThreadPriority io_thr DCHECK(!g_lazy_child_process_tls.Pointer()->Get()); g_lazy_child_process_tls.Pointer()->Set(this); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); const bool is_embedded_in_browser_process = diff --git a/www/iridium/files/patch-content_common_user__agent.cc b/www/iridium/files/patch-content_common_user__agent.cc index 6db30b4d0154..911f32dc06c4 100644 --- a/www/iridium/files/patch-content_common_user__agent.cc +++ b/www/iridium/files/patch-content_common_user__agent.cc @@ -1,19 +1,19 @@ ---- content/common/user_agent.cc.orig 2022-03-28 18:11:04 UTC +--- content/common/user_agent.cc.orig 2022-04-01 07:48:30 UTC +++ content/common/user_agent.cc -@@ -244,6 +244,16 @@ std::string BuildOSCpuInfoFromOSVersionAndCpuType(cons +@@ -245,6 +245,16 @@ std::string BuildOSCpuInfoFromOSVersionAndCpuType(cons "Android %s", os_version.c_str() #elif BUILDFLAG(IS_FUCHSIA) "Fuchsia" +#elif BUILDFLAG(IS_BSD) +#if defined(__x86_64__) + "Linux x86_64; %s %s", +#elif defined(__aarch64__) + "Linux aarch64; %s %s", +#else + "Linux i686; %s %s", +#endif + unixinfo.sysname, // e.g. Linux + cpu_type.c_str() // e.g. i686 #elif BUILDFLAG(IS_POSIX) "%s %s", unixinfo.sysname, // e.g. Linux diff --git a/www/iridium/files/patch-content_gpu_gpu__main.cc b/www/iridium/files/patch-content_gpu_gpu__main.cc index 148e0fa1422b..913aa98a20f0 100644 --- a/www/iridium/files/patch-content_gpu_gpu__main.cc +++ b/www/iridium/files/patch-content_gpu_gpu__main.cc @@ -1,73 +1,73 @@ ---- content/gpu/gpu_main.cc.orig 2022-03-28 18:11:04 UTC +--- content/gpu/gpu_main.cc.orig 2022-04-01 07:48:30 UTC +++ content/gpu/gpu_main.cc -@@ -83,7 +83,7 @@ +@@ -86,7 +86,7 @@ #include "sandbox/win/src/sandbox.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/gpu/gpu_sandbox_hook_linux.h" #include "sandbox/policy/linux/sandbox_linux.h" #include "sandbox/policy/sandbox_type.h" -@@ -105,7 +105,7 @@ namespace content { +@@ -108,7 +108,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool StartSandboxLinux(gpu::GpuWatchdogThread*, const gpu::GPUInfo*, const gpu::GpuPreferences&); -@@ -167,7 +167,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel +@@ -170,7 +170,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel bool EnsureSandboxInitialized(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) override { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs); #elif BUILDFLAG(IS_WIN) return StartSandboxWindows(sandbox_info_); -@@ -263,7 +263,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -266,7 +266,7 @@ int GpuMain(MainFunctionParams parameters) { std::make_unique( gpu_preferences.message_pump_type); } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #error "Unsupported Linux platform." #elif BUILDFLAG(IS_MAC) // Cross-process CoreAnimation requires a CFRunLoop to function at all, and -@@ -406,17 +406,19 @@ int GpuMain(MainFunctionParams parameters) { +@@ -409,17 +409,19 @@ int GpuMain(MainFunctionParams parameters) { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) { TRACE_EVENT0("gpu,startup", "Initialize sandbox"); +#if !BUILDFLAG(IS_BSD) if (watchdog_thread) { // SandboxLinux needs to be able to ensure that the thread // has really been stopped. sandbox::policy::SandboxLinux::GetInstance()->StopThread(watchdog_thread); } +#endif // SandboxLinux::InitializeSandbox() must always be called // with only one thread. -@@ -437,11 +439,13 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo +@@ -454,11 +456,13 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo *base::CommandLine::ForCurrentProcess()), base::BindOnce(GpuProcessPreSandboxHook), sandbox_options); +#if !BUILDFLAG(IS_BSD) if (watchdog_thread) { base::Thread::Options thread_options; thread_options.timer_slack = base::TIMER_SLACK_MAXIMUM; watchdog_thread->StartWithOptions(std::move(thread_options)); } +#endif return res; } diff --git a/www/iridium/files/patch-content_gpu_gpu__sandbox__hook__linux.cc b/www/iridium/files/patch-content_gpu_gpu__sandbox__hook__linux.cc index de8014a7358f..a518d8e01a29 100644 --- a/www/iridium/files/patch-content_gpu_gpu__sandbox__hook__linux.cc +++ b/www/iridium/files/patch-content_gpu_gpu__sandbox__hook__linux.cc @@ -1,70 +1,70 @@ ---- content/gpu/gpu_sandbox_hook_linux.cc.orig 2022-03-28 18:11:04 UTC +--- content/gpu/gpu_sandbox_hook_linux.cc.orig 2022-04-01 07:48:30 UTC +++ content/gpu/gpu_sandbox_hook_linux.cc -@@ -101,6 +101,7 @@ static const char kLibV4lEncPluginPath[] = +@@ -104,6 +104,7 @@ static const char kLibV4lEncPluginPath[] = constexpr int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE; +#if !defined(OS_BSD) void AddV4L2GpuPermissions( std::vector* permissions, const sandbox::policy::SandboxSeccompBPF::Options& options) { -@@ -407,8 +408,10 @@ std::vector FilePermissionsForGp +@@ -420,8 +421,10 @@ std::vector FilePermissionsForGp AddStandardGpuPermissions(&permissions); return permissions; } +#endif void LoadArmGpuLibraries() { +#if !defined(OS_BSD) // Preload the Mali library. if (UseChromecastSandboxAllowlist()) { for (const char* path : kAllowedChromecastPaths) { -@@ -450,6 +453,7 @@ void LoadArmGpuLibraries() { +@@ -463,6 +466,7 @@ void LoadArmGpuLibraries() { dlopen(driver_paths[i], dlopen_flag); } } +#endif } bool LoadAmdGpuLibraries() { -@@ -513,12 +517,14 @@ void LoadV4L2Libraries( +@@ -526,12 +530,14 @@ void LoadV4L2Libraries( } void LoadChromecastV4L2Libraries() { +#if !defined(OS_BSD) for (const char* path : kAllowedChromecastPaths) { const std::string library_path(std::string(path) + std::string("libvpcodec.so")); if (dlopen(library_path.c_str(), dlopen_flag)) break; } +#endif } bool LoadLibrariesForGpu( -@@ -545,6 +551,7 @@ bool LoadLibrariesForGpu( +@@ -558,6 +564,7 @@ bool LoadLibrariesForGpu( return true; } +#if !defined(OS_BSD) sandbox::syscall_broker::BrokerCommandSet CommandSetForGPU( const sandbox::policy::SandboxLinux::Options& options) { sandbox::syscall_broker::BrokerCommandSet command_set; -@@ -567,13 +574,17 @@ bool BrokerProcessPreSandboxHook( +@@ -580,13 +587,17 @@ bool BrokerProcessPreSandboxHook( SetProcessTitleFromCommandLine(nullptr); return true; } +#endif } // namespace bool GpuProcessPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { + NOTIMPLEMENTED(); +#if !defined(OS_BSD) sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess( CommandSetForGPU(options), FilePermissionsForGpu(options), base::BindOnce(BrokerProcessPreSandboxHook), options); +#endif if (!LoadLibrariesForGpu(options)) return false; diff --git a/www/iridium/files/patch-content_public_common_common__param__traits__macros.h b/www/iridium/files/patch-content_public_common_common__param__traits__macros.h index eb9f4aa20780..474b5484157f 100644 --- a/www/iridium/files/patch-content_public_common_common__param__traits__macros.h +++ b/www/iridium/files/patch-content_public_common_common__param__traits__macros.h @@ -1,11 +1,11 @@ ---- content/public/common/common_param_traits_macros.h.orig 2022-03-28 18:11:04 UTC +--- content/public/common/common_param_traits_macros.h.orig 2022-04-01 07:48:30 UTC +++ content/public/common/common_param_traits_macros.h -@@ -127,7 +127,7 @@ IPC_STRUCT_TRAITS_BEGIN(blink::RendererPreferences) +@@ -128,7 +128,7 @@ IPC_STRUCT_TRAITS_BEGIN(blink::RendererPreferences) IPC_STRUCT_TRAITS_MEMBER(accept_languages) IPC_STRUCT_TRAITS_MEMBER(plugin_fullscreen_allowed) IPC_STRUCT_TRAITS_MEMBER(caret_browsing_enabled) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) IPC_STRUCT_TRAITS_MEMBER(system_font_family_name) #endif #if BUILDFLAG(IS_WIN) diff --git a/www/iridium/files/patch-content_public_common_content__features.cc b/www/iridium/files/patch-content_public_common_content__features.cc index 2cc6c242b465..73d7c8fe6b87 100644 --- a/www/iridium/files/patch-content_public_common_content__features.cc +++ b/www/iridium/files/patch-content_public_common_content__features.cc @@ -1,59 +1,50 @@ ---- content/public/common/content_features.cc.orig 2022-03-28 18:11:04 UTC +--- content/public/common/content_features.cc.orig 2022-04-01 07:48:30 UTC +++ content/public/common/content_features.cc @@ -50,7 +50,7 @@ const base::Feature kAudioServiceOutOfProcess { "AudioServiceOutOfProcess", // TODO(crbug.com/1052397): Remove !IS_CHROMEOS_LACROS once lacros starts being // built with OS_CHROMEOS instead of OS_LINUX. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) base::FEATURE_ENABLED_BY_DEFAULT #else @@ -62,7 +62,7 @@ const base::Feature kAudioServiceOutOfProcess { // kAudioServiceOutOfProcess feature is enabled. const base::Feature kAudioServiceSandbox { "AudioServiceSandbox", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -987,7 +987,7 @@ const base::Feature kWebAssemblyBaseline{"WebAssemblyB +@@ -1030,7 +1030,7 @@ const base::Feature kWebAssemblyBaseline{"WebAssemblyB const base::Feature kWebAssemblyCodeProtection{ - "WebAssemblyCodeProtection", base::FEATURE_DISABLED_BY_DEFAULT}; + "WebAssemblyCodeProtection", base::FEATURE_ENABLED_BY_DEFAULT}; -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) // Use memory protection keys in userspace (PKU) (if available) to protect code // JITed for WebAssembly. Fall back to traditional memory protection if // WebAssemblyCodeProtection is also enabled. -@@ -1017,7 +1017,7 @@ const base::Feature kWebAssemblyTiering{"WebAssemblyTi +@@ -1060,7 +1060,7 @@ const base::Feature kWebAssemblyTiering{"WebAssemblyTi const base::Feature kWebAssemblyTrapHandler { "WebAssemblyTrapHandler", #if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC)) && \ + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) && \ defined(ARCH_CPU_X86_64)) || \ (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) base::FEATURE_ENABLED_BY_DEFAULT -@@ -1039,7 +1039,7 @@ const base::Feature kWebAuthCable { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. - // If updating this, also update kWebAuthCableServerLink. --#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - base::FEATURE_DISABLED_BY_DEFAULT - #else - base::FEATURE_ENABLED_BY_DEFAULT -@@ -1107,7 +1107,11 @@ const base::Feature kWebUIReportOnlyTrustedTypes{ +@@ -1146,7 +1146,11 @@ const base::Feature kWebUIReportOnlyTrustedTypes{ // Controls whether the WebUSB API is enabled: // https://wicg.github.io/webusb +#if BUILDFLAG(IS_BSD) +const base::Feature kWebUsb{"WebUSB", base::FEATURE_DISABLED_BY_DEFAULT}; +#else const base::Feature kWebUsb{"WebUSB", base::FEATURE_ENABLED_BY_DEFAULT}; +#endif // Controls whether the WebXR Device API is enabled. const base::Feature kWebXr{"WebXR", base::FEATURE_ENABLED_BY_DEFAULT}; diff --git a/www/iridium/files/patch-content_public_common_content__features.h b/www/iridium/files/patch-content_public_common_content__features.h index 5695aed84775..e0889eb80d5f 100644 --- a/www/iridium/files/patch-content_public_common_content__features.h +++ b/www/iridium/files/patch-content_public_common_content__features.h @@ -1,11 +1,11 @@ ---- content/public/common/content_features.h.orig 2022-03-28 18:11:04 UTC +--- content/public/common/content_features.h.orig 2022-04-01 07:48:30 UTC +++ content/public/common/content_features.h -@@ -249,7 +249,7 @@ CONTENT_EXPORT extern const base::Feature +@@ -258,7 +258,7 @@ CONTENT_EXPORT extern const base::Feature kV8VmFuture; CONTENT_EXPORT extern const base::Feature kWebAppWindowControlsOverlay; CONTENT_EXPORT extern const base::Feature kWebAssemblyBaseline; CONTENT_EXPORT extern const base::Feature kWebAssemblyCodeProtection; -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) CONTENT_EXPORT extern const base::Feature kWebAssemblyCodeProtectionPku; #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && // defined(ARCH_CPU_X86_64) diff --git a/www/iridium/files/patch-content_public_common_content__switches.cc b/www/iridium/files/patch-content_public_common_content__switches.cc index b269e3ff8cc0..523600f90cc5 100644 --- a/www/iridium/files/patch-content_public_common_content__switches.cc +++ b/www/iridium/files/patch-content_public_common_content__switches.cc @@ -1,22 +1,22 @@ ---- content/public/common/content_switches.cc.orig 2022-03-28 18:11:04 UTC +--- content/public/common/content_switches.cc.orig 2022-04-01 07:48:30 UTC +++ content/public/common/content_switches.cc @@ -383,6 +383,10 @@ const char kEnableGpuMemoryBufferVideoFrames[] = // builds. const char kEnableLogging[] = "enable-logging"; +const char kDisableUnveil[] = "disable-unveil"; + +const char kTrk[] = "trk"; + // Enables the type, downlinkMax attributes of the NetInfo API. Also, enables // triggering of change attribute of the NetInfo API when there is a change in // the connection type. -@@ -991,7 +995,7 @@ const char kEnableAutomation[] = "enable-automation"; +@@ -981,7 +985,7 @@ const char kEnableAutomation[] = "enable-automation"; // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Allows sending text-to-speech requests to speech-dispatcher, a common // Linux speech service. Because it's buggy, the user must explicitly // enable it so that visiting a random webpage can't cause instability. diff --git a/www/iridium/files/patch-content_public_common_content__switches.h b/www/iridium/files/patch-content_public_common_content__switches.h index 2c280f7506b8..944342a820ed 100644 --- a/www/iridium/files/patch-content_public_common_content__switches.h +++ b/www/iridium/files/patch-content_public_common_content__switches.h @@ -1,20 +1,20 @@ ---- content/public/common/content_switches.h.orig 2022-03-28 18:11:04 UTC +--- content/public/common/content_switches.h.orig 2022-04-01 07:48:30 UTC +++ content/public/common/content_switches.h -@@ -114,6 +114,8 @@ CONTENT_EXPORT extern const char kEnableBlinkTestFeatu +@@ -120,6 +120,8 @@ CONTENT_EXPORT extern const char kEnableBlinkTestFeatu CONTENT_EXPORT extern const char kEnableGpuMemoryBufferVideoFrames[]; CONTENT_EXPORT extern const char kEnableLCDText[]; CONTENT_EXPORT extern const char kEnableLogging[]; +CONTENT_EXPORT extern const char kDisableUnveil[]; +CONTENT_EXPORT extern const char kTrk[]; CONTENT_EXPORT extern const char kEnableNetworkInformationDownlinkMax[]; CONTENT_EXPORT extern const char kEnableCanvas2DLayers[]; - CONTENT_EXPORT extern const char kEnableCanvasContextLostInBackground[]; -@@ -272,7 +274,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD + CONTENT_EXPORT extern const char kEnableNewCanvas2DAPI[]; +@@ -267,7 +269,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT extern const char kEnableSpeechDispatcher[]; #endif diff --git a/www/iridium/files/patch-content_renderer_render__thread__impl.cc b/www/iridium/files/patch-content_renderer_render__thread__impl.cc index 11c046605abf..4368a5539401 100644 --- a/www/iridium/files/patch-content_renderer_render__thread__impl.cc +++ b/www/iridium/files/patch-content_renderer_render__thread__impl.cc @@ -1,47 +1,47 @@ ---- content/renderer/render_thread_impl.cc.orig 2022-03-28 18:11:04 UTC +--- content/renderer/render_thread_impl.cc.orig 2022-04-01 07:48:30 UTC +++ content/renderer/render_thread_impl.cc @@ -189,7 +189,7 @@ #if BUILDFLAG(IS_MAC) #include -#else +#elif !BUILDFLAG(IS_OPENBSD) #include #endif @@ -718,7 +718,7 @@ void RenderThreadImpl::Init() { DCHECK(parsed_num_raster_threads) << string_value; DCHECK_GT(num_raster_threads, 0); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) categorized_worker_pool_->SetBackgroundingCallback( main_thread_scheduler_->DefaultTaskRunner(), base::BindOnce( @@ -741,7 +741,7 @@ void RenderThreadImpl::Init() { base::DiscardableMemoryAllocator::SetInstance( discardable_memory_allocator_.get()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( blink::features::kBlinkCompositorUseDisplayThreadPriority)) { render_message_filter()->SetThreadPriority( -@@ -1075,7 +1075,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1093,7 +1093,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: const bool enable_video_decode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) && #else !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) && -@@ -1086,7 +1086,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1104,7 +1104,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: const bool enable_video_encode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux) && #else !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoEncode) && diff --git a/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.cc b/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.cc index 9fd6dbda5b35..5eab543380d8 100644 --- a/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.cc +++ b/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.cc @@ -1,48 +1,48 @@ ---- content/renderer/renderer_blink_platform_impl.cc.orig 2022-03-28 18:11:04 UTC +--- content/renderer/renderer_blink_platform_impl.cc.orig 2022-04-01 07:48:30 UTC +++ content/renderer/renderer_blink_platform_impl.cc -@@ -108,7 +108,7 @@ +@@ -109,7 +109,7 @@ #if BUILDFLAG(IS_MAC) #include "content/child/child_process_sandbox_support_impl_mac.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/child_process_sandbox_support_impl_linux.h" #endif -@@ -177,7 +177,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -178,7 +178,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( main_thread_scheduler_(main_thread_scheduler) { // RenderThread may not exist in some tests. if (RenderThreadImpl::current()) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::PendingRemote font_service; RenderThreadImpl::current()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -187,7 +187,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -188,7 +188,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( #endif } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (sandboxEnabled()) { #if BUILDFLAG(IS_MAC) sandbox_support_ = std::make_unique(); -@@ -261,7 +261,8 @@ RendererBlinkPlatformImpl::WrapSharedURLLoaderFactory( +@@ -283,7 +283,8 @@ RendererBlinkPlatformImpl::WrapSharedURLLoaderFactory( /*terminate_sync_load_event=*/nullptr); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +// pledge +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) void RendererBlinkPlatformImpl::SetDisplayThreadPriority( base::PlatformThreadId thread_id) { if (RenderThreadImpl* render_thread = RenderThreadImpl::current()) { -@@ -276,7 +277,7 @@ blink::BlameContext* RendererBlinkPlatformImpl::GetTop +@@ -298,7 +299,7 @@ blink::BlameContext* RendererBlinkPlatformImpl::GetTop } blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return sandbox_support_.get(); #else // These platforms do not require sandbox support. diff --git a/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.h b/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.h index f9d4bf7592e4..6d3efe2ed5ea 100644 --- a/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.h +++ b/www/iridium/files/patch-content_renderer_renderer__blink__platform__impl.h @@ -1,29 +1,29 @@ ---- content/renderer/renderer_blink_platform_impl.h.orig 2022-03-28 18:11:04 UTC +--- content/renderer/renderer_blink_platform_impl.h.orig 2022-04-01 07:48:30 UTC +++ content/renderer/renderer_blink_platform_impl.h -@@ -29,7 +29,7 @@ +@@ -30,7 +30,7 @@ #include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom.h" #include "third_party/blink/public/mojom/loader/code_cache.mojom.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/services/font/public/cpp/font_loader.h" // nogncheck #include "third_party/skia/include/core/SkRefCnt.h" // nogncheck #endif -@@ -274,7 +274,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -276,7 +276,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi void Collect3DContextInformation(blink::Platform::GraphicsInfo* gl_info, const gpu::GPUInfo& gpu_info) const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) std::unique_ptr sandbox_support_; #endif -@@ -298,7 +298,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi - mojo::SharedRemote code_cache_host_ - GUARDED_BY(code_cache_host_lock_); +@@ -304,7 +304,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi + mutable base::WaitableEvent io_thread_id_ready_event_; + base::PlatformThreadId io_thread_id_ = base::kInvalidThreadId; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sk_sp font_loader_; #endif diff --git a/www/iridium/files/patch-content_shell_BUILD.gn b/www/iridium/files/patch-content_shell_BUILD.gn index dfdd1ec37d33..f12d3b9d4176 100644 --- a/www/iridium/files/patch-content_shell_BUILD.gn +++ b/www/iridium/files/patch-content_shell_BUILD.gn @@ -1,11 +1,11 @@ ---- content/shell/BUILD.gn.orig 2022-03-28 18:11:04 UTC +--- content/shell/BUILD.gn.orig 2022-04-01 07:48:30 UTC +++ content/shell/BUILD.gn -@@ -872,7 +872,7 @@ group("content_shell_crash_test") { +@@ -882,7 +882,7 @@ group("content_shell_crash_test") { if (is_win) { data_deps += [ "//build/win:copy_cdb_to_output" ] } - if (is_posix) { + if (is_posix && !is_bsd) { data_deps += [ "//third_party/breakpad:dump_syms", "//third_party/breakpad:minidump_stackwalk", diff --git a/www/iridium/files/patch-content_test_BUILD.gn b/www/iridium/files/patch-content_test_BUILD.gn index b56d26401a02..6a5f8b0ab1d4 100644 --- a/www/iridium/files/patch-content_test_BUILD.gn +++ b/www/iridium/files/patch-content_test_BUILD.gn @@ -1,20 +1,20 @@ ---- content/test/BUILD.gn.orig 2022-03-28 18:11:04 UTC +--- content/test/BUILD.gn.orig 2022-04-01 07:48:30 UTC +++ content/test/BUILD.gn -@@ -1900,7 +1900,7 @@ static_library("run_all_unittests") { +@@ -1914,7 +1914,7 @@ static_library("run_all_unittests") { ":test_support", "//base/test:test_support", ] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { deps += [ "//content/common:set_process_title_linux" ] } } -@@ -2828,7 +2828,7 @@ test("content_unittests") { +@@ -2850,7 +2850,7 @@ test("content_unittests") { deps += [ "//third_party/boringssl" ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "../common/set_process_title_linux_unittest.cc" ] deps += [ "//content/common:set_process_title_linux" ] } diff --git a/www/iridium/files/patch-device_fido_features.cc b/www/iridium/files/patch-device_fido_features.cc deleted file mode 100644 index f939de7a677a..000000000000 --- a/www/iridium/files/patch-device_fido_features.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- device/fido/features.cc.orig 2022-03-28 18:11:04 UTC -+++ device/fido/features.cc -@@ -24,7 +24,7 @@ extern const base::Feature kWebAuthCableSecondFactor { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. - // If updating this, also update kWebAuthCableServerLink. --#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - base::FEATURE_DISABLED_BY_DEFAULT - #else - base::FEATURE_ENABLED_BY_DEFAULT diff --git a/www/iridium/files/patch-extensions_browser_api_messaging_message__service.cc b/www/iridium/files/patch-extensions_browser_api_messaging_message__service.cc index 19c8da07d925..002139b12936 100644 --- a/www/iridium/files/patch-extensions_browser_api_messaging_message__service.cc +++ b/www/iridium/files/patch-extensions_browser_api_messaging_message__service.cc @@ -1,20 +1,20 @@ ---- extensions/browser/api/messaging/message_service.cc.orig 2022-03-28 18:11:04 UTC +--- extensions/browser/api/messaging/message_service.cc.orig 2022-04-01 07:48:30 UTC +++ extensions/browser/api/messaging/message_service.cc @@ -74,7 +74,7 @@ namespace { const char kReceivingEndDoesntExistError[] = "Could not establish connection. Receiving end does not exist."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kMissingPermissionError[] = "Access to native messaging requires nativeMessaging permission."; const char kProhibitedByPoliciesError[] = -@@ -439,7 +439,7 @@ void MessageService::OpenChannelToNativeApp( +@@ -447,7 +447,7 @@ void MessageService::OpenChannelToNativeApp( return; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool has_permission = extension->permissions_data()->HasAPIPermission( mojom::APIPermissionID::kNativeMessaging); if (!has_permission) { diff --git a/www/iridium/files/patch-extensions_browser_browser__context__keyed__service__factories.cc b/www/iridium/files/patch-extensions_browser_browser__context__keyed__service__factories.cc index 5afb0d5c1b48..e30a9f6683d8 100644 --- a/www/iridium/files/patch-extensions_browser_browser__context__keyed__service__factories.cc +++ b/www/iridium/files/patch-extensions_browser_browser__context__keyed__service__factories.cc @@ -1,11 +1,11 @@ ---- extensions/browser/browser_context_keyed_service_factories.cc.orig 2022-03-28 18:11:04 UTC +--- extensions/browser/browser_context_keyed_service_factories.cc.orig 2022-04-01 07:48:30 UTC +++ extensions/browser/browser_context_keyed_service_factories.cc -@@ -91,7 +91,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() +@@ -89,7 +89,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() IdleManagerFactory::GetInstance(); ManagementAPI::GetFactoryInstance(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) NetworkingPrivateEventRouterFactory::GetInstance(); #endif PowerAPI::GetFactoryInstance(); diff --git a/www/iridium/files/patch-extensions_browser_extension__prefs.cc b/www/iridium/files/patch-extensions_browser_extension__prefs.cc index 51353477c8df..18fab18cc8c0 100644 --- a/www/iridium/files/patch-extensions_browser_extension__prefs.cc +++ b/www/iridium/files/patch-extensions_browser_extension__prefs.cc @@ -1,11 +1,11 @@ ---- extensions/browser/extension_prefs.cc.orig 2022-03-28 18:11:04 UTC +--- extensions/browser/extension_prefs.cc.orig 2022-04-01 07:48:30 UTC +++ extensions/browser/extension_prefs.cc -@@ -2265,7 +2265,7 @@ void ExtensionPrefs::RegisterProfilePrefs( +@@ -2269,7 +2269,7 @@ void ExtensionPrefs::RegisterProfilePrefs( registry->RegisterStringPref(pref_names::kLastChromeVersion, std::string()); registry->RegisterDictionaryPref(kInstallSignature); registry->RegisterListPref(kExternalUninstalls); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(pref_names::kChromeAppsEnabled, false); #endif registry->RegisterBooleanPref(pref_names::kU2fSecurityKeyApiEnabled, false); diff --git a/www/iridium/files/patch-google__apis_gcm_engine_heartbeat__manager.cc b/www/iridium/files/patch-google__apis_gcm_engine_heartbeat__manager.cc index 15045a40af0d..77557e265ecc 100644 --- a/www/iridium/files/patch-google__apis_gcm_engine_heartbeat__manager.cc +++ b/www/iridium/files/patch-google__apis_gcm_engine_heartbeat__manager.cc @@ -1,29 +1,29 @@ ---- google_apis/gcm/engine/heartbeat_manager.cc.orig 2022-03-28 18:11:04 UTC +--- google_apis/gcm/engine/heartbeat_manager.cc.orig 2022-04-01 07:48:30 UTC +++ google_apis/gcm/engine/heartbeat_manager.cc @@ -32,7 +32,7 @@ const int kMinClientHeartbeatIntervalMs = 1000 * 30; // Minimum time spent sleeping before we force a new heartbeat. const int kMinSuspendTimeMs = 1000 * 10; // 10 seconds. --#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // The period at which to check if the heartbeat time has passed. Used to // protect against platforms where the timer is delayed by the system being // suspended. Only needed on linux because the other OSes provide a standard @@ -192,7 +192,7 @@ void HeartbeatManager::RestartTimer() { base::BindRepeating(&HeartbeatManager::OnHeartbeatTriggered, weak_ptr_factory_.GetWeakPtr())); --#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Windows, Mac, Android, iOS, and Chrome OS all provide a way to be notified // when the system is suspending or resuming. The only one that does not is // Linux so we need to poll to check for missed heartbeats. @@ -217,7 +217,7 @@ void HeartbeatManager::CheckForMissedHeartbeat() { return; } --#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Otherwise check again later. io_task_runner_->PostDelayedTask( FROM_HERE, diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__image__backing__factory__angle__vulkan.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image__backing__factory__angle__vulkan.cc index 1b53096d467e..b0d6aad983d5 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__image__backing__factory__angle__vulkan.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__image__backing__factory__angle__vulkan.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image_backing_factory_angle_vulkan.cc.orig 2022-03-28 18:11:04 UTC +--- gpu/command_buffer/service/shared_image_backing_factory_angle_vulkan.cc.orig 2022-04-01 07:48:30 UTC +++ gpu/command_buffer/service/shared_image_backing_factory_angle_vulkan.cc -@@ -573,7 +573,7 @@ bool SharedImageBackingFactoryAngleVulkan::CanUseAngle +@@ -574,7 +574,7 @@ bool SharedImageBackingFactoryAngleVulkan::CanUseAngle // TODO(penghuang): verify the scanout is the right usage for video playback. // crbug.com/1280798 constexpr auto kSupportedUsages = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SHARED_IMAGE_USAGE_SCANOUT | #endif SHARED_IMAGE_USAGE_GLES2 | SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT | diff --git a/www/iridium/files/patch-gpu_command__buffer_service_shared__image__factory.cc b/www/iridium/files/patch-gpu_command__buffer_service_shared__image__factory.cc index 91f976f58b01..654e56816426 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_shared__image__factory.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_shared__image__factory.cc @@ -1,34 +1,35 @@ ---- gpu/command_buffer/service/shared_image_factory.cc.orig 2022-03-28 18:11:04 UTC +--- gpu/command_buffer/service/shared_image_factory.cc.orig 2022-04-01 07:48:30 UTC +++ gpu/command_buffer/service/shared_image_factory.cc -@@ -34,11 +34,11 @@ - #include "ui/gl/gl_switches.h" - #include "ui/gl/trace_util.h" +@@ -38,12 +38,12 @@ + #include "gpu/command_buffer/service/shared_image_backing_factory_angle_vulkan.h" + #endif -#if BUILDFLAG(IS_LINUX) && defined(USE_OZONE) && BUILDFLAG(ENABLE_VULKAN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) && BUILDFLAG(ENABLE_VULKAN) #include "ui/ozone/public/ozone_platform.h" #endif --#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN)) && \ -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) && \ - BUILDFLAG(ENABLE_VULKAN) + #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN)) && \ +- BUILDFLAG(ENABLE_VULKAN) ++ BUILDFLAG(ENABLE_VULKAN) || BUILDFLAG(IS_BSD) #include "gpu/command_buffer/service/external_vk_image_factory.h" - #include "gpu/command_buffer/service/shared_image_backing_factory_angle_vulkan.h" -@@ -75,7 +75,7 @@ + #elif BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_VULKAN) + #include "gpu/command_buffer/service/external_vk_image_factory.h" +@@ -78,7 +78,7 @@ namespace gpu { -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_ASH) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_ASH) && \ !BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_CHROMECAST) && \ BUILDFLAG(ENABLE_VULKAN) -@@ -200,7 +200,7 @@ SharedImageFactory::SharedImageFactory( - // |gr_context_type|. - if (gr_context_type_ == GrContextType::kVulkan) { - #if BUILDFLAG(ENABLE_VULKAN) +@@ -240,7 +240,7 @@ SharedImageFactory::SharedImageFactory( + factories_.push_back(std::move(external_vk_image_factory)); + } + #elif defined(USE_OZONE) -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_ASH) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_ASH) && \ !BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_CHROMECAST) - // Desktop Linux, not ChromeOS. - if (base::FeatureList::IsEnabled(features::kVulkanFromANGLE)) { + // Desktop Linux, not ChromeOS. + if (gr_context_type_ == GrContextType::kVulkan && diff --git a/www/iridium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc b/www/iridium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc index ebfa06bebe39..019e3a0f2529 100644 --- a/www/iridium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc +++ b/www/iridium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2022-03-28 18:11:04 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2022-04-01 07:48:30 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1010,7 +1010,7 @@ error::Error WebGPUDecoderImpl::HandleRequestAdapter( +@@ -1498,7 +1498,7 @@ error::Error WebGPUDecoderImpl::HandleRequestAdapter( } if (gr_context_type_ != GrContextType::kVulkan) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SendAdapterProperties(request_adapter_serial, -1, nullptr, "WebGPU on Linux requires command-line flag " "--enable-features=Vulkan,UseSkiaRenderer"); diff --git a/www/iridium/files/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc b/www/iridium/files/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc new file mode 100644 index 000000000000..c574011f8b50 --- /dev/null +++ b/www/iridium/files/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc @@ -0,0 +1,29 @@ +--- gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc.orig 2022-04-01 07:48:30 UTC ++++ gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc +@@ -29,7 +29,7 @@ + #include "ui/gl/gl_image.h" + #include "ui/gl/test/gl_image_test_support.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h" + #include "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h" + #endif +@@ -72,7 +72,7 @@ class GpuMemoryBufferTest : public testing::TestWithPa + GLManager gl_; + }; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + class GpuMemoryBufferTestEGL : public testing::Test, + public gpu::GpuCommandBufferTestEGL { + public: +@@ -364,7 +364,7 @@ TEST_P(GpuMemoryBufferTest, Lifecycle) { + glDeleteTextures(1, &texture_id); + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Test glCreateImageCHROMIUM with gfx::NATIVE_PIXMAP. Basically the test + // reproduces the situation where some dmabuf fds are available outside the + // gpu process and the user wants to import them using glCreateImageCHROMIUM. diff --git a/www/iridium/files/patch-gpu_command__buffer_tests_gl__oes__egl__image__unittest.cc b/www/iridium/files/patch-gpu_command__buffer_tests_gl__oes__egl__image__unittest.cc new file mode 100644 index 000000000000..1e6708ecd4ff --- /dev/null +++ b/www/iridium/files/patch-gpu_command__buffer_tests_gl__oes__egl__image__unittest.cc @@ -0,0 +1,20 @@ +--- gpu/command_buffer/tests/gl_oes_egl_image_unittest.cc.orig 2022-04-01 07:48:30 UTC ++++ gpu/command_buffer/tests/gl_oes_egl_image_unittest.cc +@@ -14,7 +14,7 @@ + #include "ui/gl/gl_image.h" + #include "ui/gl/init/gl_factory.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "ui/gl/gl_image_native_pixmap.h" + #endif + +@@ -43,7 +43,7 @@ class GpuOESEGLImageTest : public testing::Test, + bool egl_initialized_{false}; + }; + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // TODO(crbug.com/835072): re-enable this test on ASAN once bugs are fixed. + #if !defined(ADDRESS_SANITIZER) + diff --git a/www/iridium/files/patch-gpu_command__buffer_tests_gl__test__utils.cc b/www/iridium/files/patch-gpu_command__buffer_tests_gl__test__utils.cc new file mode 100644 index 000000000000..6eb113690d04 --- /dev/null +++ b/www/iridium/files/patch-gpu_command__buffer_tests_gl__test__utils.cc @@ -0,0 +1,20 @@ +--- gpu/command_buffer/tests/gl_test_utils.cc.orig 2022-04-01 07:48:30 UTC ++++ gpu/command_buffer/tests/gl_test_utils.cc +@@ -24,7 +24,7 @@ + #include "ui/gl/gl_version_info.h" + #include "ui/gl/init/gl_factory.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "ui/gl/gl_image_native_pixmap.h" + #endif + +@@ -453,7 +453,7 @@ void GpuCommandBufferTestEGL::RestoreGLDefault() { + window_system_binding_info_ = gl::GLWindowSystemBindingInfo(); + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + scoped_refptr + GpuCommandBufferTestEGL::CreateGLImageNativePixmap(gfx::BufferFormat format, + gfx::Size size, diff --git a/www/iridium/files/patch-gpu_command__buffer_tests_gl__test__utils.h b/www/iridium/files/patch-gpu_command__buffer_tests_gl__test__utils.h new file mode 100644 index 000000000000..7b581f639f84 --- /dev/null +++ b/www/iridium/files/patch-gpu_command__buffer_tests_gl__test__utils.h @@ -0,0 +1,11 @@ +--- gpu/command_buffer/tests/gl_test_utils.h.orig 2022-04-01 07:48:30 UTC ++++ gpu/command_buffer/tests/gl_test_utils.h +@@ -120,7 +120,7 @@ class GpuCommandBufferTestEGL { + return gfx::HasExtension(gl_extensions_, extension); + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Create GLImageNativePixmap filled in with the given pixels. + scoped_refptr CreateGLImageNativePixmap( + gfx::BufferFormat format, diff --git a/www/iridium/files/patch-gpu_config_gpu__util.cc b/www/iridium/files/patch-gpu_config_gpu__util.cc deleted file mode 100644 index a62fb64d67b4..000000000000 --- a/www/iridium/files/patch-gpu_config_gpu__util.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- gpu/config/gpu_util.cc.orig 2022-03-28 18:11:04 UTC -+++ gpu/config/gpu_util.cc -@@ -754,7 +754,7 @@ bool EnableSwiftShaderIfNeeded(base::CommandLine* comm - gpu_feature_info.status_values[GPU_FEATURE_TYPE_ACCELERATED_GL] != - kGpuFeatureStatusEnabled) { - bool legacy_software_gl = true; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - // This setting makes WebGL run on SwANGLE instead of SwiftShader GL. - legacy_software_gl = false; - #endif diff --git a/www/iridium/files/patch-gpu_ipc_service_gpu__init.cc b/www/iridium/files/patch-gpu_ipc_service_gpu__init.cc index a2c96e6500c7..989ebf0497df 100644 --- a/www/iridium/files/patch-gpu_ipc_service_gpu__init.cc +++ b/www/iridium/files/patch-gpu_ipc_service_gpu__init.cc @@ -1,83 +1,65 @@ ---- gpu/ipc/service/gpu_init.cc.orig 2022-03-28 18:11:04 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2022-04-01 07:48:30 UTC +++ gpu/ipc/service/gpu_init.cc -@@ -122,7 +122,7 @@ void InitializePlatformOverlaySettings(GPUInfo* gpu_in - } - - #if BUILDFLAG(IS_CHROMEOS_LACROS) || \ -- (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMECAST)) -+ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMECAST)) && !BUILDFLAG(IS_BSD) - bool CanAccessNvidiaDeviceFile() { - bool res = true; - base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, -@@ -220,7 +220,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - device_perf_info_ = device_perf_info; - } - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_BSD) - if (gpu_info_.gpu.vendor_id == 0x10de && // NVIDIA - gpu_info_.gpu.driver_vendor == "NVIDIA" && !CanAccessNvidiaDeviceFile()) - return false; -@@ -284,7 +284,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - delayed_watchdog_enable = true; +@@ -278,7 +278,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL + enable_watchdog = false; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // PreSandbox is mainly for resource handling and not related to the GPU - // driver, it doesn't need the GPU watchdog. The loadLibrary may take long - // time that killing and restarting the GPU process will not help. -@@ -324,7 +324,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL + bool gpu_sandbox_start_early = gpu_preferences_.gpu_sandbox_start_early; + #else // !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + // For some reasons MacOSX's VideoToolbox might crash when called after +@@ -328,7 +328,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } bool attempted_startsandbox = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Chrome OS ARM Mali, GPU driver userspace creates threads when // initializing a GL context, so start the sandbox early. // TODO(zmo): Need to collect OS version before this. -@@ -373,7 +373,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - } +@@ -377,7 +377,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL + if (gl_initialized && gl_use_swiftshader_ && !gl::IsSoftwareGLImplementation(gl::GetGLImplementationParts())) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly " << "on Linux"; return false; -@@ -407,7 +407,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -410,7 +410,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The ContentSandboxHelper is currently the only one implementation of // GpuSandboxHelper and it has no dependency. Except on Linux where // VaapiWrapper checks the GL implementation to determine which display -@@ -460,7 +460,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -469,7 +469,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL command_line, gpu_feature_info_, gpu_preferences_.disable_software_rasterizer, false); if (gl_use_swiftshader_) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly " << "on Linux"; return false; -@@ -566,7 +566,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -591,7 +591,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL InitializePlatformOverlaySettings(&gpu_info_, gpu_feature_info_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. -@@ -799,7 +799,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -822,7 +822,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c InitializePlatformOverlaySettings(&gpu_info_, gpu_feature_info_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. diff --git a/www/iridium/files/patch-gpu_vulkan_vulkan__device__queue.cc b/www/iridium/files/patch-gpu_vulkan_vulkan__device__queue.cc index c3da3d1d314b..eb5a6605555c 100644 --- a/www/iridium/files/patch-gpu_vulkan_vulkan__device__queue.cc +++ b/www/iridium/files/patch-gpu_vulkan_vulkan__device__queue.cc @@ -1,20 +1,20 @@ ---- gpu/vulkan/vulkan_device_queue.cc.orig 2022-03-28 18:11:04 UTC +--- gpu/vulkan/vulkan_device_queue.cc.orig 2022-04-01 07:48:30 UTC +++ gpu/vulkan/vulkan_device_queue.cc @@ -85,7 +85,7 @@ bool VulkanDeviceQueue::Initialize( // In dual-CPU cases, we cannot detect the active GPU correctly on Linux, // so don't select GPU device based on the |gpu_info|. -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // If gpu_info is provided, the device should match it. if (gpu_info && (device_properties.vendorID != gpu_info->gpu.vendor_id || device_properties.deviceID != gpu_info->gpu.device_id)) { -@@ -230,7 +230,7 @@ bool VulkanDeviceQueue::Initialize( +@@ -229,7 +229,7 @@ bool VulkanDeviceQueue::Initialize( enabled_device_features_2_ = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2}; // Android, Fuchsia, and Linux(VaapiVideoDecoder) need YCbCr sampler support. -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!physical_device_info.feature_sampler_ycbcr_conversion) { LOG(ERROR) << "samplerYcbcrConversion is not supported."; return false; diff --git a/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.cc b/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.cc index 5065a226c7ae..55e17444dcd4 100644 --- a/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.cc +++ b/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.cc @@ -1,29 +1,29 @@ ---- gpu/vulkan/vulkan_function_pointers.cc.orig 2022-03-28 18:11:04 UTC +--- gpu/vulkan/vulkan_function_pointers.cc.orig 2022-04-01 07:48:30 UTC +++ gpu/vulkan/vulkan_function_pointers.cc -@@ -916,7 +916,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer +@@ -926,7 +926,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer } #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (gfx::HasExtension(enabled_extensions, VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME)) { vkGetSemaphoreFdKHR = reinterpret_cast( -@@ -961,7 +961,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer +@@ -971,7 +971,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer } #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (gfx::HasExtension(enabled_extensions, VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME)) { vkGetMemoryFdKHR = reinterpret_cast( -@@ -1131,7 +1131,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer +@@ -1141,7 +1141,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (gfx::HasExtension(enabled_extensions, VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME)) { vkGetImageDrmFormatModifierPropertiesEXT = diff --git a/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.h b/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.h index 0155c1d5fcba..35827dfdb6dc 100644 --- a/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.h +++ b/www/iridium/files/patch-gpu_vulkan_vulkan__function__pointers.h @@ -1,63 +1,63 @@ ---- gpu/vulkan/vulkan_function_pointers.h.orig 2022-03-28 18:11:04 UTC +--- gpu/vulkan/vulkan_function_pointers.h.orig 2022-04-01 07:48:30 UTC +++ gpu/vulkan/vulkan_function_pointers.h -@@ -256,7 +256,7 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFunctionPointers +@@ -250,7 +250,7 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFunctionPointers vkGetAndroidHardwareBufferPropertiesANDROID; #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) VulkanFunction vkGetSemaphoreFdKHR; VulkanFunction vkImportSemaphoreFdKHR; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || -@@ -268,7 +268,7 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFunctionPointers +@@ -262,7 +262,7 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFunctionPointers vkImportSemaphoreWin32HandleKHR; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) VulkanFunction vkGetMemoryFdKHR; VulkanFunction vkGetMemoryFdPropertiesKHR; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || -@@ -309,7 +309,7 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFunctionPointers +@@ -303,7 +303,7 @@ struct COMPONENT_EXPORT(VULKAN) VulkanFunctionPointers VulkanFunction vkGetSwapchainImagesKHR; VulkanFunction vkQueuePresentKHR; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VulkanFunction vkGetImageDrmFormatModifierPropertiesEXT; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -1030,7 +1030,7 @@ ALWAYS_INLINE VkResult vkGetAndroidHardwareBufferPrope +@@ -1033,7 +1033,7 @@ ALWAYS_INLINE VkResult vkGetAndroidHardwareBufferPrope } #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) ALWAYS_INLINE VkResult vkGetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, -@@ -1064,7 +1064,7 @@ vkImportSemaphoreWin32HandleKHR(VkDevice device, +@@ -1067,7 +1067,7 @@ vkImportSemaphoreWin32HandleKHR(VkDevice device, } #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) ALWAYS_INLINE VkResult vkGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd) { -@@ -1200,7 +1200,7 @@ ALWAYS_INLINE VkResult vkQueuePresentKHR(VkQueue queue +@@ -1203,7 +1203,7 @@ ALWAYS_INLINE VkResult vkQueuePresentKHR(VkQueue queue pPresentInfo); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierPropertiesEXT( VkDevice device, VkImage image, -@@ -1210,4 +1210,4 @@ ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierProp +@@ -1213,4 +1213,4 @@ ALWAYS_INLINE VkResult vkGetImageDrmFormatModifierProp } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#endif // GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_ \ No newline at end of file +#endif // GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_ diff --git a/www/iridium/files/patch-gpu_vulkan_x_vulkan__implementation__x11.cc b/www/iridium/files/patch-gpu_vulkan_x_vulkan__implementation__x11.cc deleted file mode 100644 index 40a5ffffbd8c..000000000000 --- a/www/iridium/files/patch-gpu_vulkan_x_vulkan__implementation__x11.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- gpu/vulkan/x/vulkan_implementation_x11.cc.orig 2022-03-28 18:11:04 UTC -+++ gpu/vulkan/x/vulkan_implementation_x11.cc -@@ -72,7 +72,11 @@ bool VulkanImplementationX11::InitializeVulkanInstance - - path = path.Append("libvk_swiftshader.so"); - } else { -+#if defined(OS_BSD) -+ path = base::FilePath("libvulkan.so"); -+#else - path = base::FilePath("libvulkan.so.1"); -+#endif - } - - VulkanFunctionPointers* vulkan_function_pointers = diff --git a/www/iridium/files/patch-headless_lib_browser_headless__web__contents__impl.cc b/www/iridium/files/patch-headless_lib_browser_headless__web__contents__impl.cc index 15a7b786c0c6..3393e3a54c8d 100644 --- a/www/iridium/files/patch-headless_lib_browser_headless__web__contents__impl.cc +++ b/www/iridium/files/patch-headless_lib_browser_headless__web__contents__impl.cc @@ -1,11 +1,11 @@ ---- headless/lib/browser/headless_web_contents_impl.cc.orig 2022-03-28 18:11:04 UTC +--- headless/lib/browser/headless_web_contents_impl.cc.orig 2022-04-01 07:48:30 UTC +++ headless/lib/browser/headless_web_contents_impl.cc -@@ -57,7 +57,7 @@ namespace headless { +@@ -56,7 +56,7 @@ namespace headless { namespace { void UpdatePrefsFromSystemSettings(blink::RendererPreferences* prefs) { -#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) content::UpdateFontRendererPreferencesFromSystemSettings(prefs); #endif diff --git a/www/iridium/files/patch-headless_lib_headless__content__main__delegate.cc b/www/iridium/files/patch-headless_lib_headless__content__main__delegate.cc index 9fb0704d1a22..0963910c4314 100644 --- a/www/iridium/files/patch-headless_lib_headless__content__main__delegate.cc +++ b/www/iridium/files/patch-headless_lib_headless__content__main__delegate.cc @@ -1,11 +1,11 @@ ---- headless/lib/headless_content_main_delegate.cc.orig 2022-03-28 18:11:04 UTC +--- headless/lib/headless_content_main_delegate.cc.orig 2022-04-01 07:48:30 UTC +++ headless/lib/headless_content_main_delegate.cc -@@ -331,7 +331,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( +@@ -336,7 +336,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( if (process_type != switches::kZygoteProcess) { g_headless_crash_client.Pointer()->set_crash_dumps_dir( options()->crash_dumps_dir); -#if !BUILDFLAG(IS_WIN) +#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD) crash_reporter::InitializeCrashpad(process_type.empty(), process_type); #endif // !BUILDFLAG(IS_WIN) crash_keys::SetSwitchesFromCommandLine(command_line, nullptr); diff --git a/www/iridium/files/patch-headless_public_headless__browser.cc b/www/iridium/files/patch-headless_public_headless__browser.cc index 35d92c2c4682..4f7214b27831 100644 --- a/www/iridium/files/patch-headless_public_headless__browser.cc +++ b/www/iridium/files/patch-headless_public_headless__browser.cc @@ -1,11 +1,11 @@ ---- headless/public/headless_browser.cc.orig 2022-03-28 18:11:04 UTC +--- headless/public/headless_browser.cc.orig 2022-04-01 07:48:30 UTC +++ headless/public/headless_browser.cc @@ -42,7 +42,7 @@ Options::Options(int argc, const char** argv) user_agent(content::BuildUserAgentFromProduct(product_name_and_version)), window_size(kDefaultWindowSize), font_render_hinting(kDefaultFontRenderHinting) { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) gl_implementation = gl::kGLImplementationANGLEName; angle_implementation = gl::kANGLEImplementationSwiftShaderForWebGLName; #endif diff --git a/www/iridium/files/patch-ipc_ipc__message__utils.cc b/www/iridium/files/patch-ipc_ipc__message__utils.cc index 1f11216af86b..f956cbc8385e 100644 --- a/www/iridium/files/patch-ipc_ipc__message__utils.cc +++ b/www/iridium/files/patch-ipc_ipc__message__utils.cc @@ -1,11 +1,11 @@ ---- ipc/ipc_message_utils.cc.orig 2022-03-28 18:11:04 UTC +--- ipc/ipc_message_utils.cc.orig 2022-04-01 07:48:30 UTC +++ ipc/ipc_message_utils.cc -@@ -349,7 +349,7 @@ void ParamTraits::Log(const param_type& +@@ -350,7 +350,7 @@ void ParamTraits::Log(const param_type& } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS)) void ParamTraits::Log(const param_type& p, std::string* l) { l->append(base::NumberToString(p)); diff --git a/www/iridium/files/patch-ipc_ipc__message__utils.h b/www/iridium/files/patch-ipc_ipc__message__utils.h index b5b1cfc0f289..a570e5c3591a 100644 --- a/www/iridium/files/patch-ipc_ipc__message__utils.h +++ b/www/iridium/files/patch-ipc_ipc__message__utils.h @@ -1,11 +1,11 @@ ---- ipc/ipc_message_utils.h.orig 2022-03-28 18:11:04 UTC +--- ipc/ipc_message_utils.h.orig 2022-04-01 07:48:30 UTC +++ ipc/ipc_message_utils.h -@@ -205,7 +205,7 @@ struct ParamTraits { +@@ -214,7 +214,7 @@ struct ParamTraits { // Since we want to support Android 32<>64 bit IPC, as long as we don't have // these traits for 32 bit ARM then that'll catch any errors. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS)) template <> struct ParamTraits { diff --git a/www/iridium/files/patch-media_audio_BUILD.gn b/www/iridium/files/patch-media_audio_BUILD.gn index 14a632b9eacf..ce75574ee328 100644 --- a/www/iridium/files/patch-media_audio_BUILD.gn +++ b/www/iridium/files/patch-media_audio_BUILD.gn @@ -1,24 +1,24 @@ ---- media/audio/BUILD.gn.orig 2022-03-28 18:11:04 UTC +--- media/audio/BUILD.gn.orig 2022-04-01 07:48:30 UTC +++ media/audio/BUILD.gn -@@ -237,9 +237,20 @@ source_set("audio") { +@@ -245,9 +245,20 @@ source_set("audio") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !use_sndio) { sources += [ "linux/audio_manager_linux.cc" ] } + + if (use_sndio) { + libs += [ "sndio" ] + sources += [ + "sndio/audio_manager_sndio.cc", + "sndio/sndio_input.cc", + "sndio/sndio_input.h", + "sndio/sndio_output.cc", + "sndio/sndio_output.h" + ] + } if (use_alsa) { libs += [ "asound" ] diff --git a/www/iridium/files/patch-media_audio_alsa_audio__manager__alsa.cc b/www/iridium/files/patch-media_audio_alsa_audio__manager__alsa.cc new file mode 100644 index 000000000000..178b34071bbc --- /dev/null +++ b/www/iridium/files/patch-media_audio_alsa_audio__manager__alsa.cc @@ -0,0 +1,54 @@ +--- media/audio/alsa/audio_manager_alsa.cc.orig 2022-04-01 07:48:30 UTC ++++ media/audio/alsa/audio_manager_alsa.cc +@@ -89,7 +89,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType + int card = -1; + + // Loop through the sound cards to get ALSA device hints. ++#if !BUILDFLAG(IS_BSD) + while (!wrapper_->CardNext(&card) && card >= 0) { ++#endif + void** hints = NULL; + int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); + if (!error) { +@@ -101,7 +103,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType + DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: " + << wrapper_->StrError(error); + } ++#if !BUILDFLAG(IS_BSD) + } ++#endif + } + + void AudioManagerAlsa::GetAlsaDevicesInfo(AudioManagerAlsa::StreamType type, +@@ -184,7 +188,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvailable( + // goes through software conversion if needed (e.g. incompatible + // sample rate). + // TODO(joi): Should we prefer "hw" instead? ++#if BUILDFLAG(IS_BSD) ++ static const char kDeviceTypeDesired[] = "plug"; ++#else + static const char kDeviceTypeDesired[] = "plughw"; ++#endif + return strncmp(kDeviceTypeDesired, device_name, + base::size(kDeviceTypeDesired) - 1) == 0; + } +@@ -206,7 +214,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( + // Loop through the sound cards. + // Don't use snd_device_name_hint(-1,..) since there is an access violation + // inside this ALSA API with libasound.so.2.0.0. ++#if !BUILDFLAG(IS_BSD) + while (!wrapper_->CardNext(&card) && (card >= 0) && !has_device) { ++#endif + int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); + if (!error) { + for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) { +@@ -230,7 +240,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( + DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: " + << wrapper_->StrError(error); + } ++#if !BUILDFLAG(IS_BSD) + } ++#endif + + return has_device; + } diff --git a/www/iridium/files/patch-media_base_media__switches.cc b/www/iridium/files/patch-media_base_media__switches.cc index 1aa802f61143..500f060597a5 100644 --- a/www/iridium/files/patch-media_base_media__switches.cc +++ b/www/iridium/files/patch-media_base_media__switches.cc @@ -1,47 +1,47 @@ ---- media/base/media_switches.cc.orig 2022-03-28 18:11:04 UTC +--- media/base/media_switches.cc.orig 2022-04-01 07:48:30 UTC +++ media/base/media_switches.cc @@ -9,7 +9,7 @@ #include "build/chromeos_buildflags.h" #include "components/system_media_controls/linux/buildflags/buildflags.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/cpu.h" #endif -@@ -397,7 +397,7 @@ const base::Feature kGav1VideoDecoder{"Gav1VideoDecode +@@ -402,7 +402,7 @@ const base::Feature kGav1VideoDecoder{"Gav1VideoDecode const base::Feature kGlobalMediaControls { "GlobalMediaControls", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -429,7 +429,7 @@ constexpr base::FeatureParamstorage_type()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Linux/ChromeOS require a special configuration to use dmabuf storage. // We need to keep sending frames the same way the first frame was sent. // Other platforms will happily mix GpuMemoryBuffer storage with regular diff --git a/www/iridium/files/patch-media_video_video__encode__accelerator__adapter__test.cc b/www/iridium/files/patch-media_video_video__encode__accelerator__adapter__test.cc index 1a5c90f8fc48..2c065f367cf8 100644 --- a/www/iridium/files/patch-media_video_video__encode__accelerator__adapter__test.cc +++ b/www/iridium/files/patch-media_video_video__encode__accelerator__adapter__test.cc @@ -1,11 +1,11 @@ ---- media/video/video_encode_accelerator_adapter_test.cc.orig 2022-03-28 18:11:04 UTC +--- media/video/video_encode_accelerator_adapter_test.cc.orig 2022-04-01 07:48:30 UTC +++ media/video/video_encode_accelerator_adapter_test.cc -@@ -349,7 +349,7 @@ TEST_P(VideoEncodeAcceleratorAdapterTest, TwoFramesRes +@@ -350,7 +350,7 @@ TEST_P(VideoEncodeAcceleratorAdapterTest, TwoFramesRes vea()->SetEncodingCallback(base::BindLambdaForTesting( [&](BitstreamBuffer&, bool keyframe, scoped_refptr frame) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) EXPECT_EQ(frame->format(), IsYuvPlanar(pixel_format) ? pixel_format : PIXEL_FORMAT_I420); #else diff --git a/www/iridium/files/patch-media_webrtc_audio__processor.cc b/www/iridium/files/patch-media_webrtc_audio__processor.cc index d3ae74df8e81..bbbdc56e1edf 100644 --- a/www/iridium/files/patch-media_webrtc_audio__processor.cc +++ b/www/iridium/files/patch-media_webrtc_audio__processor.cc @@ -1,11 +1,11 @@ ---- media/webrtc/audio_processor.cc.orig 2022-03-28 18:11:04 UTC +--- media/webrtc/audio_processor.cc.orig 2022-04-01 07:48:30 UTC +++ media/webrtc/audio_processor.cc -@@ -487,7 +487,7 @@ absl::optional AudioProcessor::ProcessData( +@@ -428,7 +428,7 @@ absl::optional AudioProcessor::ProcessData( #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) DCHECK_LE(volume, 1.0); #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_OPENBSD) + BUILDFLAG(IS_BSD) // We have a special situation on Linux where the microphone volume can be // "higher than maximum". The input volume slider in the sound preference // allows the user to set a scaling that is higher than 100%. It means that diff --git a/www/iridium/files/patch-media_webrtc_helpers__unittests.cc b/www/iridium/files/patch-media_webrtc_helpers__unittests.cc index 33a67ee7800f..2839ed74b0a2 100644 --- a/www/iridium/files/patch-media_webrtc_helpers__unittests.cc +++ b/www/iridium/files/patch-media_webrtc_helpers__unittests.cc @@ -1,20 +1,20 @@ ---- media/webrtc/helpers_unittests.cc.orig 2022-03-28 18:11:04 UTC +--- media/webrtc/helpers_unittests.cc.orig 2022-04-01 07:48:30 UTC +++ media/webrtc/helpers_unittests.cc @@ -36,7 +36,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau EXPECT_FALSE(config.pre_amplifier.enabled); EXPECT_TRUE(config.echo_canceller.enabled); EXPECT_TRUE(config.gain_controller1.enabled); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) EXPECT_TRUE(config.gain_controller2.enabled); #else EXPECT_FALSE(config.gain_controller2.enabled); -@@ -95,7 +95,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau +@@ -94,7 +94,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau // Check that either AGC1 digital or AGC2 digital is used based on the // platforms where the Hybrid AGC is enabled by default. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) EXPECT_FALSE(agc1_analog_config.enable_digital_adaptive); EXPECT_TRUE(config.gain_controller2.enabled); EXPECT_TRUE(config.gain_controller2.adaptive_digital.enabled); diff --git a/www/iridium/files/patch-mojo_public_c_system_thunks.cc b/www/iridium/files/patch-mojo_public_c_system_thunks.cc index d1ec3c054fdc..694b0d51b20c 100644 --- a/www/iridium/files/patch-mojo_public_c_system_thunks.cc +++ b/www/iridium/files/patch-mojo_public_c_system_thunks.cc @@ -1,38 +1,38 @@ ---- mojo/public/c/system/thunks.cc.orig 2022-03-28 18:11:04 UTC +--- mojo/public/c/system/thunks.cc.orig 2022-04-01 07:48:30 UTC +++ mojo/public/c/system/thunks.cc -@@ -19,7 +19,7 @@ - #include "mojo/public/c/system/core.h" +@@ -20,7 +20,7 @@ #include "mojo/public/c/system/macros.h" --#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "base/environment.h" #include "base/files/file_path.h" #include "base/scoped_native_library.h" -@@ -67,7 +67,7 @@ class CoreLibraryInitializer { - ~CoreLibraryInitializer() = default; +@@ -69,7 +69,7 @@ class CoreLibraryInitializer { MojoResult LoadLibrary(base::FilePath library_path) { --#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (library_ && library_->is_valid()) return MOJO_RESULT_OK; -@@ -81,7 +81,7 @@ class CoreLibraryInitializer { +@@ -83,7 +83,7 @@ class CoreLibraryInitializer { if (library_path.empty()) { // Default to looking for the library in the current working directory. -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::FilePath::CharType kDefaultLibraryPathValue[] = FILE_PATH_LITERAL("./libmojo_core.so"); - #elif BUILDFLAG(IS_WIN) -@@ -131,7 +131,7 @@ class CoreLibraryInitializer { - } + #elif BUILDFLAG(IS_FUCHSIA) +@@ -139,7 +139,7 @@ class CoreLibraryInitializer { private: --#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) absl::optional library_; #endif }; diff --git a/www/iridium/files/patch-mojo_public_js_mojo__bindings__resources.grd b/www/iridium/files/patch-mojo_public_js_mojo__bindings__resources.grd index 0bd5d6d60a99..08944c61988b 100644 --- a/www/iridium/files/patch-mojo_public_js_mojo__bindings__resources.grd +++ b/www/iridium/files/patch-mojo_public_js_mojo__bindings__resources.grd @@ -1,11 +1,11 @@ ---- mojo/public/js/mojo_bindings_resources.grd.orig 2022-03-28 18:11:04 UTC +--- mojo/public/js/mojo_bindings_resources.grd.orig 2022-04-01 07:48:30 UTC +++ mojo/public/js/mojo_bindings_resources.grd -@@ -110,7 +110,7 @@ +@@ -126,7 +126,7 @@ use_base_dir="false" resource_path="mojo/mojo/public/mojom/base/unguessable_token.mojom-webui.js" type="BINDATA" /> - + NetworkChangeNo +@@ -321,6 +321,9 @@ std::unique_ptr NetworkChangeNo #elif BUILDFLAG(IS_FUCHSIA) return std::make_unique( /*require_wlan=*/false); +#elif BUILDFLAG(IS_BSD) + return std::make_unique( + /*dns_config_notifier*/nullptr); #else NOTIMPLEMENTED(); return NULL; diff --git a/www/iridium/files/patch-net_cert_cert__verify__proc.cc b/www/iridium/files/patch-net_cert_cert__verify__proc.cc index 511e806777b5..74a329aae991 100644 --- a/www/iridium/files/patch-net_cert_cert__verify__proc.cc +++ b/www/iridium/files/patch-net_cert_cert__verify__proc.cc @@ -1,11 +1,11 @@ ---- net/cert/cert_verify_proc.cc.orig 2022-03-28 18:11:04 UTC +--- net/cert/cert_verify_proc.cc.orig 2022-04-01 07:48:30 UTC +++ net/cert/cert_verify_proc.cc -@@ -470,7 +470,7 @@ base::Value CertVerifyParams(X509Certificate* cert, +@@ -552,7 +552,7 @@ base::Value CertVerifyParams(X509Certificate* cert, } // namespace -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // static scoped_refptr CertVerifyProc::CreateSystemVerifyProc( scoped_refptr cert_net_fetcher) { diff --git a/www/iridium/files/patch-net_cert_cert__verify__proc.h b/www/iridium/files/patch-net_cert_cert__verify__proc.h index 14086ca5910a..71af1c82dd47 100644 --- a/www/iridium/files/patch-net_cert_cert__verify__proc.h +++ b/www/iridium/files/patch-net_cert_cert__verify__proc.h @@ -1,11 +1,11 @@ ---- net/cert/cert_verify_proc.h.orig 2022-03-28 18:11:04 UTC +--- net/cert/cert_verify_proc.h.orig 2022-04-01 07:48:30 UTC +++ net/cert/cert_verify_proc.h -@@ -66,7 +66,7 @@ class NET_EXPORT CertVerifyProc - kMaxValue = kChainLengthOne +@@ -79,7 +79,7 @@ class NET_EXPORT CertVerifyProc + kMaxValue = kOther }; -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // Creates and returns a CertVerifyProc that uses the system verifier. // |cert_net_fetcher| may not be used, depending on the implementation. static scoped_refptr CreateSystemVerifyProc( diff --git a/www/iridium/files/patch-net_cert_cert__verify__proc__unittest.cc b/www/iridium/files/patch-net_cert_cert__verify__proc__unittest.cc index 70ed5ce6bb44..256c90bd3f7d 100644 --- a/www/iridium/files/patch-net_cert_cert__verify__proc__unittest.cc +++ b/www/iridium/files/patch-net_cert_cert__verify__proc__unittest.cc @@ -1,11 +1,11 @@ ---- net/cert/cert_verify_proc_unittest.cc.orig 2022-03-28 18:11:04 UTC +--- net/cert/cert_verify_proc_unittest.cc.orig 2022-04-01 07:48:30 UTC +++ net/cert/cert_verify_proc_unittest.cc -@@ -223,7 +223,7 @@ const std::vector kAllCertVerifier +@@ -225,7 +225,7 @@ const std::vector kAllCertVerifier CERT_VERIFY_PROC_MAC, CERT_VERIFY_PROC_BUILTIN #elif BUILDFLAG(IS_WIN) CERT_VERIFY_PROC_WIN -#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CERT_VERIFY_PROC_BUILTIN #else #error Unsupported platform diff --git a/www/iridium/files/patch-net_dns_BUILD.gn b/www/iridium/files/patch-net_dns_BUILD.gn index 3866fc8d0e1f..a4ab22c14805 100644 --- a/www/iridium/files/patch-net_dns_BUILD.gn +++ b/www/iridium/files/patch-net_dns_BUILD.gn @@ -1,31 +1,31 @@ ---- net/dns/BUILD.gn.orig 2022-03-28 18:11:04 UTC +--- net/dns/BUILD.gn.orig 2022-04-01 07:48:30 UTC +++ net/dns/BUILD.gn -@@ -112,7 +112,7 @@ source_set("dns") { +@@ -114,7 +114,7 @@ source_set("dns") { "dns_config_service_android.cc", "dns_config_service_android.h", ] - } else if (is_linux) { + } else if (is_linux && !is_bsd) { sources += [ "dns_config_service_linux.cc", "dns_config_service_linux.h", -@@ -153,6 +153,7 @@ source_set("dns") { +@@ -155,6 +155,7 @@ source_set("dns") { ":host_resolver_manager", ":mdns_client", "//net:net_public_deps", + "//printing/buildflags", ] allow_circular_includes_from = [ -@@ -415,9 +416,9 @@ source_set("tests") { +@@ -416,9 +417,9 @@ source_set("tests") { if (is_android) { sources += [ "dns_config_service_android_unittest.cc" ] - } else if (is_linux) { + } else if (is_linux && !is_bsd) { sources += [ "dns_config_service_linux_unittest.cc" ] - } else if (is_posix) { + } else if (is_posix && !is_bsd) { sources += [ "dns_config_service_posix_unittest.cc" ] } diff --git a/www/iridium/files/patch-net_dns_address__sorter__posix.cc b/www/iridium/files/patch-net_dns_address__sorter__posix.cc index 245112168227..962477539236 100644 --- a/www/iridium/files/patch-net_dns_address__sorter__posix.cc +++ b/www/iridium/files/patch-net_dns_address__sorter__posix.cc @@ -1,10 +1,10 @@ ---- net/dns/address_sorter_posix.cc.orig 2022-03-28 18:11:04 UTC +--- net/dns/address_sorter_posix.cc.orig 2022-04-01 07:48:30 UTC +++ net/dns/address_sorter_posix.cc -@@ -17,6 +17,7 @@ +@@ -18,6 +18,7 @@ #include #include #include +#include #include #include #endif diff --git a/www/iridium/files/patch-net_dns_dns__util.cc b/www/iridium/files/patch-net_dns_dns__util.cc index 4e2e0963f366..feb79e73543f 100644 --- a/www/iridium/files/patch-net_dns_dns__util.cc +++ b/www/iridium/files/patch-net_dns_dns__util.cc @@ -1,11 +1,11 @@ ---- net/dns/dns_util.cc.orig 2022-03-28 18:11:04 UTC +--- net/dns/dns_util.cc.orig 2022-04-01 07:48:30 UTC +++ net/dns/dns_util.cc -@@ -28,6 +28,8 @@ +@@ -27,6 +27,8 @@ + #include "net/third_party/uri_template/uri_template.h" #include "third_party/abseil-cpp/absl/types/optional.h" - #include "url/url_canon.h" +#include + #if BUILDFLAG(IS_POSIX) #include #include diff --git a/www/iridium/files/patch-net_dns_host__resolver__manager.cc b/www/iridium/files/patch-net_dns_host__resolver__manager.cc index 3e497673b86c..5d1248fb4b48 100644 --- a/www/iridium/files/patch-net_dns_host__resolver__manager.cc +++ b/www/iridium/files/patch-net_dns_host__resolver__manager.cc @@ -1,11 +1,11 @@ ---- net/dns/host_resolver_manager.cc.orig 2022-03-28 18:11:04 UTC +--- net/dns/host_resolver_manager.cc.orig 2022-04-01 07:48:30 UTC +++ net/dns/host_resolver_manager.cc -@@ -3014,7 +3014,7 @@ HostResolverManager::HostResolverManager( +@@ -2979,7 +2979,7 @@ HostResolverManager::HostResolverManager( NetworkChangeNotifier::AddConnectionTypeObserver(this); if (system_dns_config_notifier_) system_dns_config_notifier_->AddObserver(this); -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \ +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) && \ !BUILDFLAG(IS_ANDROID) EnsureDnsReloaderInit(); #endif diff --git a/www/iridium/files/patch-net_dns_host__resolver__proc.cc b/www/iridium/files/patch-net_dns_host__resolver__proc.cc index 58fe0df301aa..2b5bc1827407 100644 --- a/www/iridium/files/patch-net_dns_host__resolver__proc.cc +++ b/www/iridium/files/patch-net_dns_host__resolver__proc.cc @@ -1,22 +1,22 @@ ---- net/dns/host_resolver_proc.cc.orig 2022-03-28 18:11:04 UTC +--- net/dns/host_resolver_proc.cc.orig 2022-04-01 07:48:30 UTC +++ net/dns/host_resolver_proc.cc @@ -19,10 +19,6 @@ #include "net/dns/dns_util.h" #include "net/dns/host_resolver.h" -#if BUILDFLAG(IS_OPENBSD) -#define AI_ADDRCONFIG 0 -#endif - namespace net { HostResolverProc* HostResolverProc::default_proc_ = nullptr; -@@ -177,7 +173,7 @@ int SystemHostResolverCall(const std::string& host, +@@ -192,7 +188,7 @@ int SystemHostResolverCall(const std::string& host, base::BlockingType::WILL_BLOCK); #if BUILDFLAG(IS_POSIX) && \ - !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_ANDROID)) + !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_ANDROID)) DnsReloaderMaybeReload(); #endif - absl::optional ai; + auto [ai, err, os_error] = AddressInfo::Get(host, hints, nullptr, network); diff --git a/www/iridium/files/patch-net_dns_public_BUILD.gn b/www/iridium/files/patch-net_dns_public_BUILD.gn index f94f9f0ce254..be529589f3c2 100644 --- a/www/iridium/files/patch-net_dns_public_BUILD.gn +++ b/www/iridium/files/patch-net_dns_public_BUILD.gn @@ -1,11 +1,11 @@ ---- net/dns/public/BUILD.gn.orig 2022-03-28 18:11:04 UTC +--- net/dns/public/BUILD.gn.orig 2022-04-01 07:48:30 UTC +++ net/dns/public/BUILD.gn -@@ -72,7 +72,7 @@ source_set("tests") { - "util_unittest.cc", +@@ -74,7 +74,7 @@ source_set("tests") { + "doh_provider_entry_unittest.cc", ] - if (is_posix && !is_android) { + if (is_posix && !is_android && !is_bsd) { sources += [ "resolv_reader_unittest.cc" ] } diff --git a/www/iridium/files/patch-net_socket_tcp__socket__posix.cc b/www/iridium/files/patch-net_socket_tcp__socket__posix.cc index 18fa66510c6f..93e174166504 100644 --- a/www/iridium/files/patch-net_socket_tcp__socket__posix.cc +++ b/www/iridium/files/patch-net_socket_tcp__socket__posix.cc @@ -1,20 +1,20 @@ ---- net/socket/tcp_socket_posix.cc.orig 2022-03-28 18:11:04 UTC +--- net/socket/tcp_socket_posix.cc.orig 2022-04-01 07:48:30 UTC +++ net/socket/tcp_socket_posix.cc -@@ -95,6 +95,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { +@@ -96,6 +96,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { PLOG(ERROR) << "Failed to set TCP_KEEPALIVE on fd: " << fd; return false; } +#elif BUILDFLAG(IS_FREEBSD) + // Set seconds until first TCP keep alive. + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &delay, sizeof(delay))) { + PLOG(ERROR) << "Failed to set TCP_KEEPIDLE on fd: " << fd; + return false; + } + // Set seconds between TCP keep alives. + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &delay, sizeof(delay))) { + PLOG(ERROR) << "Failed to set TCP_KEEPINTVL on fd: " << fd; + return false; + } #endif return true; } diff --git a/www/iridium/files/patch-net_socket_udp__socket__posix.cc b/www/iridium/files/patch-net_socket_udp__socket__posix.cc index 5a04876276e6..bb2585fc51db 100644 --- a/www/iridium/files/patch-net_socket_udp__socket__posix.cc +++ b/www/iridium/files/patch-net_socket_udp__socket__posix.cc @@ -1,11 +1,11 @@ ---- net/socket/udp_socket_posix.cc.orig 2022-03-28 18:11:04 UTC +--- net/socket/udp_socket_posix.cc.orig 2022-04-01 07:48:30 UTC +++ net/socket/udp_socket_posix.cc -@@ -636,7 +636,7 @@ int UDPSocketPosix::SetDoNotFragment() { +@@ -574,7 +574,7 @@ int UDPSocketPosix::SetDoNotFragment() { } void UDPSocketPosix::SetMsgConfirm(bool confirm) { -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) if (confirm) { sendto_flags_ |= MSG_CONFIRM; } else { diff --git a/www/iridium/files/patch-net_socket_udp__socket__unittest.cc b/www/iridium/files/patch-net_socket_udp__socket__unittest.cc index bac13146fe7b..a55eed6bc09e 100644 --- a/www/iridium/files/patch-net_socket_udp__socket__unittest.cc +++ b/www/iridium/files/patch-net_socket_udp__socket__unittest.cc @@ -1,47 +1,47 @@ ---- net/socket/udp_socket_unittest.cc.orig 2022-03-28 18:11:04 UTC +--- net/socket/udp_socket_unittest.cc.orig 2022-04-01 07:48:30 UTC +++ net/socket/udp_socket_unittest.cc @@ -324,7 +324,7 @@ TEST_F(UDPSocketTest, PartialRecv) { EXPECT_EQ(second_packet, received); } -#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // - MacOS: requires root permissions on OSX 10.7+. // - Android: devices attached to testbots don't have default network, so // broadcasting to 255.255.255.255 returns error -109 (Address not reachable). @@ -584,7 +584,7 @@ TEST_F(UDPSocketTest, ClientSetDoNotFragment) { EXPECT_THAT(rv, IsOk()); rv = client.SetDoNotFragment(); -#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) -+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) ++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // TODO(crbug.com/945590): IP_MTU_DISCOVER is not implemented on Fuchsia. EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED)); #else @@ -606,7 +606,7 @@ TEST_F(UDPSocketTest, ServerSetDoNotFragment) { EXPECT_THAT(rv, IsOk()); rv = server.SetDoNotFragment(); -#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) -+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) ++#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // TODO(crbug.com/945590): IP_MTU_DISCOVER is not implemented on Fuchsia. EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED)); #else @@ -665,7 +665,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup) { // TODO(https://crbug.com/947115): failing on device on iOS 12.2. // TODO(https://crbug.com/1227554): flaky on Mac 11. --#if BUILDFLAG(IS_IOS) || defined(OS_MAC) -+#if BUILDFLAG(IS_IOS) || defined(OS_MAC) || defined(IS_BSD) +-#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #define MAYBE_SharedMulticastAddress DISABLED_SharedMulticastAddress #else #define MAYBE_SharedMulticastAddress SharedMulticastAddress @@ -719,7 +719,7 @@ TEST_F(UDPSocketTest, MAYBE_SharedMulticastAddress) { NetLogSource()); ASSERT_THAT(client_socket.Connect(send_address), IsOk()); -#if !BUILDFLAG(IS_CHROMEOS_ASH) +#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_BSD) // Send a message via the multicast group. That message is expected be be // received by both receving sockets. // diff --git a/www/iridium/files/patch-net_third__party_quiche_BUILD.gn b/www/iridium/files/patch-net_third__party_quiche_BUILD.gn index fa646d57dd8f..ed63a83df7c3 100644 --- a/www/iridium/files/patch-net_third__party_quiche_BUILD.gn +++ b/www/iridium/files/patch-net_third__party_quiche_BUILD.gn @@ -1,33 +1,33 @@ ---- net/third_party/quiche/BUILD.gn.orig 2022-03-28 18:11:04 UTC +--- net/third_party/quiche/BUILD.gn.orig 2022-04-01 07:48:30 UTC +++ net/third_party/quiche/BUILD.gn -@@ -706,7 +706,7 @@ proto_library("net_quic_test_tools_proto") { +@@ -708,7 +708,7 @@ proto_library("net_quic_test_tools_proto") { extra_configs = [ "//build/config/compiler:wexit_time_destructors" ] } -if (is_linux || is_chromeos) { +if ((is_linux || is_chromeos) && !is_bsd) { source_set("epoll_server_core") { sources = [ "src/epoll_server/platform/api/epoll_bug.h", -@@ -1061,7 +1061,7 @@ source_set("quic_test_tools_core") { +@@ -1063,7 +1063,7 @@ source_set("quic_test_tools_core") { "//third_party/quic_trace:quic_trace_proto", ] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "src/epoll_server/fake_simple_epoll_server.cc", "src/epoll_server/fake_simple_epoll_server.h", -@@ -1526,10 +1526,10 @@ source_set("quiche_tests") { +@@ -1528,10 +1528,10 @@ source_set("quiche_tests") { ] public_deps = [] - if (is_linux || is_chromeos_lacros) { + if ((is_linux || is_chromeos_lacros) && !is_bsd) { public_deps += [ "//net:epoll_quic_tools" ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "src/epoll_server/simple_epoll_server_test.cc", "src/quic/core/chlo_extractor_test.cc", diff --git a/www/iridium/files/patch-net_url__request_url__fetcher.h b/www/iridium/files/patch-net_url__request_url__fetcher.h index 4ccbfa00063a..2405a75fbc1e 100644 --- a/www/iridium/files/patch-net_url__request_url__fetcher.h +++ b/www/iridium/files/patch-net_url__request_url__fetcher.h @@ -1,11 +1,11 @@ ---- net/url_request/url_fetcher.h.orig 2022-03-28 18:11:04 UTC +--- net/url_request/url_fetcher.h.orig 2022-04-01 07:48:30 UTC +++ net/url_request/url_fetcher.h -@@ -354,7 +354,7 @@ class NET_EXPORT URLFetcher { +@@ -344,7 +344,7 @@ class NET_EXPORT URLFetcher { // 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))) || \ + !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD))) || \ BUILDFLAG(IS_CHROMEOS) // |url| is the URL to send the request to. It must be valid. // |request_type| is the type of request to make. diff --git a/www/iridium/files/patch-net_url__request_url__request.cc b/www/iridium/files/patch-net_url__request_url__request.cc index 3ee864d3a334..a16bb4ad725d 100644 --- a/www/iridium/files/patch-net_url__request_url__request.cc +++ b/www/iridium/files/patch-net_url__request_url__request.cc @@ -1,29 +1,29 @@ ---- net/url_request/url_request.cc.orig 2022-03-28 18:11:04 UTC +--- net/url_request/url_request.cc.orig 2022-04-01 07:48:30 UTC +++ net/url_request/url_request.cc @@ -14,12 +14,14 @@ #include "base/callback.h" #include "base/callback_helpers.h" #include "base/compiler_specific.h" +#include "base/command_line.h" #include "base/metrics/histogram_macros.h" #include "base/rand_util.h" #include "base/strings/utf_string_conversions.h" #include "base/synchronization/lock.h" #include "base/threading/thread_task_runner_handle.h" #include "base/values.h" +#include "content/public/common/content_switches.h" #include "net/base/auth.h" #include "net/base/load_flags.h" #include "net/base/load_timing_info.h" -@@ -58,7 +60,10 @@ namespace iridium { +@@ -57,7 +59,10 @@ namespace iridium { void textlog_request(const char *caller, const GURL &url) { -#ifdef __linux__ + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + if (!command_line->HasSwitch(switches::kTrk)) + return; +#ifdef __unix__ bool tty = isatty(fileno(stderr)); #else bool tty = false; diff --git a/www/iridium/files/patch-net_url__request_url__request__context.cc b/www/iridium/files/patch-net_url__request_url__request__context.cc index c840a0fca99b..0ea56278dc5e 100644 --- a/www/iridium/files/patch-net_url__request_url__request__context.cc +++ b/www/iridium/files/patch-net_url__request_url__request__context.cc @@ -1,11 +1,11 @@ ---- net/url_request/url_request_context.cc.orig 2022-03-28 18:11:04 UTC +--- net/url_request/url_request_context.cc.orig 2022-04-01 07:48:30 UTC +++ net/url_request/url_request_context.cc -@@ -89,7 +89,7 @@ const HttpNetworkSessionContext* URLRequestContext::Ge +@@ -90,7 +90,7 @@ const HttpNetworkSessionContext* URLRequestContext::Ge // 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)) + !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) std::unique_ptr URLRequestContext::CreateRequest( const GURL& url, RequestPriority priority, diff --git a/www/iridium/files/patch-net_url__request_url__request__context.h b/www/iridium/files/patch-net_url__request_url__request__context.h index d2cd4f476537..fba3dc7399ed 100644 --- a/www/iridium/files/patch-net_url__request_url__request__context.h +++ b/www/iridium/files/patch-net_url__request_url__request__context.h @@ -1,11 +1,11 @@ ---- net/url_request/url_request_context.h.orig 2022-03-28 18:11:04 UTC +--- net/url_request/url_request_context.h.orig 2022-04-01 07:48:30 UTC +++ net/url_request/url_request_context.h -@@ -82,7 +82,7 @@ class NET_EXPORT URLRequestContext { +@@ -83,7 +83,7 @@ class NET_EXPORT URLRequestContext { // 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)) + !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) // This function should not be used in Chromium, please use the version with // NetworkTrafficAnnotationTag in the future. // diff --git a/www/iridium/files/patch-net_url__request_url__request__context__builder.cc b/www/iridium/files/patch-net_url__request_url__request__context__builder.cc index 5f79a6a660b4..85481e9db7b1 100644 --- a/www/iridium/files/patch-net_url__request_url__request__context__builder.cc +++ b/www/iridium/files/patch-net_url__request_url__request__context__builder.cc @@ -1,11 +1,11 @@ ---- net/url_request/url_request_context_builder.cc.orig 2022-03-28 18:11:04 UTC +--- net/url_request/url_request_context_builder.cc.orig 2022-04-01 07:48:30 UTC +++ net/url_request/url_request_context_builder.cc -@@ -427,7 +427,7 @@ std::unique_ptr URLRequestContextBu +@@ -492,7 +492,7 @@ std::unique_ptr URLRequestContextBu } if (!proxy_resolution_service_) { -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) // TODO(willchan): Switch to using this code when // ConfiguredProxyResolutionService::CreateSystemProxyConfigService()'s // signature doesn't suck. diff --git a/www/iridium/files/patch-printing_print__settings__conversion.cc b/www/iridium/files/patch-printing_print__settings__conversion.cc index 87d0ce6e9044..e1dcfcefe7bc 100644 --- a/www/iridium/files/patch-printing_print__settings__conversion.cc +++ b/www/iridium/files/patch-printing_print__settings__conversion.cc @@ -1,11 +1,11 @@ ---- printing/print_settings_conversion.cc.orig 2022-03-28 18:11:04 UTC +--- printing/print_settings_conversion.cc.orig 2022-04-01 07:48:30 UTC +++ printing/print_settings_conversion.cc -@@ -216,7 +216,7 @@ std::unique_ptr PrintSettingsFromJobSet +@@ -217,7 +217,7 @@ std::unique_ptr PrintSettingsFromJobSet settings->set_is_modifiable(is_modifiable.value()); } -#if BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && defined(USE_CUPS)) +#if BUILDFLAG(IS_CHROMEOS) || ((BUILDFLAG(IS_BSD) || BUILDFLAG(IS_LINUX)) && defined(USE_CUPS)) const base::Value* advanced_settings = job_settings.FindDictKey(kSettingAdvancedSettings); if (advanced_settings) { diff --git a/www/iridium/files/patch-remoting_host_host__main.cc b/www/iridium/files/patch-remoting_host_host__main.cc index 1d3b10cb980f..4c5da7721228 100644 --- a/www/iridium/files/patch-remoting_host_host__main.cc +++ b/www/iridium/files/patch-remoting_host_host__main.cc @@ -1,29 +1,29 @@ ---- remoting/host/host_main.cc.orig 2022-03-28 18:11:04 UTC +--- remoting/host/host_main.cc.orig 2022-04-01 07:48:30 UTC +++ remoting/host/host_main.cc @@ -50,7 +50,7 @@ int FileChooserMain(); int RdpDesktopSessionMain(); int UrlForwarderConfiguratorMain(); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) int XSessionChooserMain(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -63,7 +63,7 @@ const char kUsageMessage[] = "\n" "Options:\n" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) " --audio-pipe-name= - Sets the pipe name to capture audio on " "Linux.\n" #endif // BUILDFLAG(IS_LINUX) -@@ -152,7 +152,7 @@ MainRoutineFn SelectMainRoutine(const std::string& pro +@@ -154,7 +154,7 @@ MainRoutineFn SelectMainRoutine(const std::string& pro } else if (process_type == kProcessTypeUrlForwarderConfigurator) { main_routine = &UrlForwarderConfiguratorMain; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) } else if (process_type == kProcessTypeXSessionChooser) { main_routine = &XSessionChooserMain; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/iridium/files/patch-remoting_host_remoting__me2me__host.cc b/www/iridium/files/patch-remoting_host_remoting__me2me__host.cc index a06f10f773d1..a25fbe668e1b 100644 --- a/www/iridium/files/patch-remoting_host_remoting__me2me__host.cc +++ b/www/iridium/files/patch-remoting_host_remoting__me2me__host.cc @@ -1,92 +1,92 @@ ---- remoting/host/remoting_me2me_host.cc.orig 2022-03-28 18:11:04 UTC +--- remoting/host/remoting_me2me_host.cc.orig 2022-04-01 07:48:30 UTC +++ remoting/host/remoting_me2me_host.cc -@@ -123,7 +123,7 @@ +@@ -124,7 +124,7 @@ #include "remoting/host/mac/permission_utils.h" #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include "base/linux_util.h" -@@ -167,7 +167,7 @@ const char kApplicationName[] = "chromoting"; +@@ -168,7 +168,7 @@ const char kApplicationName[] = "chromoting"; const char kStdinConfigPath[] = "-"; #endif // !defined(REMOTING_MULTI_PROCESS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The command line switch used to pass name of the pipe to capture audio on // linux. const char kAudioPipeSwitchName[] = "audio-pipe-name"; -@@ -368,7 +368,7 @@ class HostProcess : public ConfigWatcher::Delegate, +@@ -373,7 +373,7 @@ class HostProcess : public ConfigWatcher::Delegate, std::unique_ptr context_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Watch for certificate changes and kill the host when changes occur std::unique_ptr cert_watcher_; #endif -@@ -741,7 +741,7 @@ void HostProcess::StartOnNetworkThread() { +@@ -747,7 +747,7 @@ void HostProcess::StartOnNetworkThread() { void HostProcess::ShutdownOnNetworkThread() { DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); config_watcher_.reset(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) cert_watcher_.reset(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } -@@ -800,7 +800,7 @@ void HostProcess::CreateAuthenticatorFactory() { +@@ -806,7 +806,7 @@ void HostProcess::CreateAuthenticatorFactory() { DCHECK(third_party_auth_config_.token_url.is_valid()); DCHECK(third_party_auth_config_.token_validation_url.is_valid()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!cert_watcher_) { cert_watcher_ = std::make_unique( base::BindRepeating(&HostProcess::ShutdownHost, -@@ -914,7 +914,7 @@ void HostProcess::StartOnUiThread() { +@@ -916,7 +916,7 @@ void HostProcess::StartOnUiThread() { base::BindRepeating(&HostProcess::OnPolicyUpdate, base::Unretained(this)), base::BindRepeating(&HostProcess::OnPolicyError, base::Unretained(this))); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If an audio pipe is specific on the command-line then initialize // AudioCapturerLinux to capture from it. base::FilePath audio_pipe_name = base::CommandLine::ForCurrentProcess()-> -@@ -975,7 +975,7 @@ void HostProcess::ShutdownOnUiThread() { +@@ -987,7 +987,7 @@ void HostProcess::ShutdownOnUiThread() { // It is now safe for the HostProcess to be deleted. self_ = nullptr; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Cause the global AudioPipeReader to be freed, otherwise the audio // thread will remain in-use and prevent the process from exiting. // TODO(wez): DesktopEnvironmentFactory should own the pipe reader. -@@ -1685,7 +1685,7 @@ void HostProcess::StartHost() { +@@ -1697,7 +1697,7 @@ void HostProcess::StartHost() { // The feature is enabled for all Googlers using a supported platform. desktop_environment_options_.set_enable_remote_open_url(is_googler_); -#if BUILDFLAG(IS_LINUX) || !defined(NDEBUG) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || !defined(NDEBUG) // Experimental feature. Enabled on Linux for easier testing. if (is_googler_) { desktop_environment_options_.set_enable_remote_webauthn(true); -@@ -1882,7 +1882,7 @@ void HostProcess::CrashHostProcess(const std::string& - int HostProcessMain() { +@@ -1897,7 +1897,7 @@ int HostProcessMain() { HOST_LOG << "Starting host process: version " << STRINGIZE(VERSION); + const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Initialize Xlib for multi-threaded use, allowing non-Chromium code to // use X11 safely (such as the WebRTC capturer, GTK ...) x11::InitXlib(); -@@ -1919,7 +1919,7 @@ int HostProcessMain() { +@@ -1941,7 +1941,7 @@ int HostProcessMain() { std::unique_ptr network_change_notifier( net::NetworkChangeNotifier::CreateIfNeeded()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Create an X11EventSource on all UI threads, so the global X11 connection // (x11::Connection::Get()) can dispatch X events. auto event_source = diff --git a/www/iridium/files/patch-services_network_network__sandbox__hook__linux.cc b/www/iridium/files/patch-services_network_network__sandbox__hook__linux.cc index b9f8aed417cd..e0ce7bd57ff8 100644 --- a/www/iridium/files/patch-services_network_network__sandbox__hook__linux.cc +++ b/www/iridium/files/patch-services_network_network__sandbox__hook__linux.cc @@ -1,18 +1,26 @@ ---- services/network/network_sandbox_hook_linux.cc.orig 2022-03-28 18:11:04 UTC +--- services/network/network_sandbox_hook_linux.cc.orig 2022-04-01 07:48:30 UTC +++ services/network/network_sandbox_hook_linux.cc -@@ -32,6 +32,7 @@ std::vector GetNetworkFilePermis +@@ -26,12 +26,15 @@ sandbox::syscall_broker::BrokerCommandSet GetNetworkBr + }); } ++#if !defined(OS_BSD) + std::vector GetNetworkFilePermissions() { + // TODO(tsepez): remove universal permission under filesystem root. + return {BrokerFilePermission::ReadWriteCreateRecursive("/")}; + } ++#endif + bool NetworkPreSandboxHook(sandbox::policy::SandboxLinux::Options options) { +#if !defined(OS_BSD) auto* instance = sandbox::policy::SandboxLinux::GetInstance(); instance->StartBrokerProcess( -@@ -39,6 +40,7 @@ bool NetworkPreSandboxHook(sandbox::policy::SandboxLin +@@ -39,6 +42,7 @@ bool NetworkPreSandboxHook(sandbox::policy::SandboxLin sandbox::policy::SandboxLinux::PreSandboxHook(), options); instance->EngageNamespaceSandboxIfPossible(); +#endif return true; } diff --git a/www/iridium/files/patch-services_network_network__service.cc b/www/iridium/files/patch-services_network_network__service.cc index 86ba5a1a3a51..a75979cdb728 100644 --- a/www/iridium/files/patch-services_network_network__service.cc +++ b/www/iridium/files/patch-services_network_network__service.cc @@ -1,11 +1,11 @@ ---- services/network/network_service.cc.orig 2022-03-28 18:11:04 UTC +--- services/network/network_service.cc.orig 2022-04-01 07:48:30 UTC +++ services/network/network_service.cc -@@ -77,7 +77,7 @@ +@@ -82,7 +82,7 @@ #include "third_party/boringssl/src/include/openssl/cpu.h" #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) && \ !BUILDFLAG(IS_CHROMECAST) #include "components/os_crypt/key_storage_config_linux.h" #endif diff --git a/www/iridium/files/patch-skia_ext_SkMemory__new__handler.cpp b/www/iridium/files/patch-skia_ext_SkMemory__new__handler.cpp index edd5d55fa27c..50204f41131a 100644 --- a/www/iridium/files/patch-skia_ext_SkMemory__new__handler.cpp +++ b/www/iridium/files/patch-skia_ext_SkMemory__new__handler.cpp @@ -1,11 +1,11 @@ ---- skia/ext/SkMemory_new_handler.cpp.orig 2022-03-28 18:11:04 UTC +--- skia/ext/SkMemory_new_handler.cpp.orig 2022-04-01 07:48:30 UTC +++ skia/ext/SkMemory_new_handler.cpp -@@ -78,7 +78,7 @@ static void* malloc_nothrow(size_t size) { +@@ -79,7 +79,7 @@ static void* malloc_nothrow(size_t size) { // TODO(b.kelemen): we should always use UncheckedMalloc but currently it // doesn't work as intended everywhere. void* result; --#if defined(OS_IOS) -+#if defined(OS_IOS) || defined(OS_BSD) - result = malloc(size); +-#if BUILDFLAG(IS_IOS) ++#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) + result = malloc(size); #else - // It's the responsibility of the caller to check the return value. + // It's the responsibility of the caller to check the return value. diff --git a/www/iridium/files/patch-third__party_angle_src_common_system__utils__posix.cpp b/www/iridium/files/patch-third__party_angle_src_common_system__utils__posix.cpp index bcdeaa00cb22..380773601785 100644 --- a/www/iridium/files/patch-third__party_angle_src_common_system__utils__posix.cpp +++ b/www/iridium/files/patch-third__party_angle_src_common_system__utils__posix.cpp @@ -1,12 +1,12 @@ ---- third_party/angle/src/common/system_utils_posix.cpp.orig 2022-03-28 18:11:04 UTC +--- third_party/angle/src/common/system_utils_posix.cpp.orig 2022-04-01 07:48:30 UTC +++ third_party/angle/src/common/system_utils_posix.cpp -@@ -248,7 +248,9 @@ Library *OpenSharedLibraryWithExtensionAndGetError(con +@@ -197,7 +197,9 @@ void *OpenSystemLibraryWithExtensionAndGetError(const int extraFlags = 0; if (searchType == SearchType::AlreadyLoaded) { +#if !defined(__OpenBSD__) extraFlags = RTLD_NOLOAD; +#endif } std::string fullPath = directory + libraryName; diff --git a/www/iridium/files/patch-third__party_angle_src_libANGLE_Display.cpp b/www/iridium/files/patch-third__party_angle_src_libANGLE_Display.cpp index 137704449150..cdafceaaea17 100644 --- a/www/iridium/files/patch-third__party_angle_src_libANGLE_Display.cpp +++ b/www/iridium/files/patch-third__party_angle_src_libANGLE_Display.cpp @@ -1,47 +1,47 @@ ---- third_party/angle/src/libANGLE/Display.cpp.orig 2022-03-28 18:11:04 UTC +--- third_party/angle/src/libANGLE/Display.cpp.orig 2022-04-01 07:48:30 UTC +++ third_party/angle/src/libANGLE/Display.cpp @@ -55,7 +55,7 @@ # include "libANGLE/renderer/gl/wgl/DisplayWGL.h" # elif defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_IOS) # include "libANGLE/renderer/gl/apple/DisplayApple_api.h" -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # include "libANGLE/renderer/gl/egl/DisplayEGL.h" # if defined(ANGLE_USE_GBM) # include "libANGLE/renderer/gl/egl/gbm/DisplayGbm.h" -@@ -313,7 +313,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -320,7 +320,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di impl = rx::CreateDisplayCGLOrEAGL(state); break; -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) if (platformType == 0) { -@@ -358,7 +358,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -365,7 +365,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di #if defined(ANGLE_ENABLE_OPENGL) # if defined(ANGLE_PLATFORM_WINDOWS) impl = new rx::DisplayWGL(state); -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) - if (platformType == 0) - { -@@ -406,7 +406,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di + if (platformType == 0 || + platformType == EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE) +@@ -416,7 +416,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di impl = rx::CreateVulkanWin32Display(state); } break; -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_X11) if (platformType == EGL_PLATFORM_X11_EXT && rx::IsVulkanXcbDisplayAvailable()) { -@@ -1893,7 +1893,7 @@ static ClientExtensions GenerateClientExtensions() +@@ -1915,7 +1915,7 @@ static ClientExtensions GenerateClientExtensions() extensions.x11Visual = true; #endif -#if defined(ANGLE_PLATFORM_LINUX) +#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) extensions.platformANGLEDeviceTypeEGLANGLE = true; #endif diff --git a/www/iridium/files/patch-third__party_angle_src_libANGLE_formatutils.cpp b/www/iridium/files/patch-third__party_angle_src_libANGLE_formatutils.cpp new file mode 100644 index 000000000000..d0fffe74830e --- /dev/null +++ b/www/iridium/files/patch-third__party_angle_src_libANGLE_formatutils.cpp @@ -0,0 +1,11 @@ +--- third_party/angle/src/libANGLE/formatutils.cpp.orig 2022-04-01 07:48:30 UTC ++++ third_party/angle/src/libANGLE/formatutils.cpp +@@ -1388,7 +1388,7 @@ static InternalFormatInfoMap BuildInternalFormatInfoMa + AddYUVFormat(&map, GL_G8_B8R8_2PLANE_420_UNORM_ANGLE, true, 8, 8, 8, 0, 0, GL_G8_B8R8_2PLANE_420_UNORM_ANGLE, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, NeverSupported, NeverSupported); + AddYUVFormat(&map, GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE, true, 8, 8, 8, 0, 0, GL_G8_B8_R8_3PLANE_420_UNORM_ANGLE, GL_UNSIGNED_BYTE, GL_UNSIGNED_NORMALIZED, false, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, RequireExt<&Extensions::yuvInternalFormatANGLE>, NeverSupported, NeverSupported); + +-#if defined(ANGLE_PLATFORM_LINUX) ++#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) + // From GL_OES_required_internalformat + // The |shared| bit shouldn't be 2. But given this hits assertion when bits + // are checked, it's fine to have this bit set as 2 as a workaround. diff --git a/www/iridium/files/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc b/www/iridium/files/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc index 2c8551ab05a0..1ac2ef509847 100644 --- a/www/iridium/files/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc +++ b/www/iridium/files/patch-third__party_blink_common_renderer__preferences_renderer__preferences__mojom__traits.cc @@ -1,11 +1,11 @@ ---- third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc.orig 2022-03-28 18:11:04 UTC +--- third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc.orig 2022-04-01 07:48:30 UTC +++ third_party/blink/common/renderer_preferences/renderer_preferences_mojom_traits.cc @@ -64,7 +64,7 @@ bool StructTraitsaccept_languages)) return false; --#if defined(OS_LINUX) || defined(OS_CHROMEOS) -+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!data.ReadSystemFontFamilyName(&out->system_font_family_name)) return false; #endif diff --git a/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h b/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h index 7a99e638bbbf..e8bb8efbfddb 100644 --- a/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h +++ b/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h @@ -1,11 +1,11 @@ ---- third_party/blink/public/common/renderer_preferences/renderer_preferences.h.orig 2022-03-28 18:11:04 UTC +--- third_party/blink/public/common/renderer_preferences/renderer_preferences.h.orig 2022-04-01 07:48:30 UTC +++ third_party/blink/public/common/renderer_preferences/renderer_preferences.h @@ -50,7 +50,7 @@ struct BLINK_COMMON_EXPORT RendererPreferences { bool webrtc_allow_legacy_tls_protocols{false}; UserAgentOverride user_agent_override; std::string accept_languages; --#if defined(OS_LINUX) || defined(OS_CHROMEOS) -+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::string system_font_family_name; #endif - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) diff --git a/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h b/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h index 584bd5cfdcb4..43226c19b577 100644 --- a/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h +++ b/www/iridium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h @@ -1,11 +1,11 @@ ---- third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h.orig 2022-03-28 18:11:04 UTC +--- third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h.orig 2022-04-01 07:48:30 UTC +++ third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h @@ -157,7 +157,7 @@ struct BLINK_COMMON_EXPORT return data.accept_languages; } --#if defined(OS_LINUX) || defined(OS_CHROMEOS) -+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) static const std::string& system_font_family_name( const ::blink::RendererPreferences& data) { return data.system_font_family_name; diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc b/www/iridium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc index 3abd0b489258..ad2be0b5279e 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2022-03-28 18:11:04 UTC +--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2022-04-01 07:48:30 UTC +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -401,7 +401,7 @@ SkFontHinting RendererPreferencesToSkiaHinting( +@@ -404,7 +404,7 @@ SkFontHinting RendererPreferencesToSkiaHinting( const blink::RendererPreferences& prefs) { // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (!prefs.should_antialias_text) { // When anti-aliasing is off, GTK maps all non-zero hinting settings to // 'Normal' hinting so we do the same. Otherwise, folks who have 'Slight' -@@ -3170,7 +3170,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3159,7 +3159,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs renderer_preferences_.use_subpixel_positioning); // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) && \ !BUILDFLAG(IS_ANDROID) if (!renderer_preferences_.system_font_family_name.empty()) { WebFontRenderStyle::SetSystemFontFamily(blink::WebString::FromUTF8( diff --git a/www/iridium/files/patch-third__party_blink_renderer_core_html_forms_internal__popup__menu.cc b/www/iridium/files/patch-third__party_blink_renderer_core_html_forms_internal__popup__menu.cc index d9372f8d9d1d..b562d897586c 100644 --- a/www/iridium/files/patch-third__party_blink_renderer_core_html_forms_internal__popup__menu.cc +++ b/www/iridium/files/patch-third__party_blink_renderer_core_html_forms_internal__popup__menu.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/html/forms/internal_popup_menu.cc.orig 2022-03-28 18:11:04 UTC +--- third_party/blink/renderer/core/html/forms/internal_popup_menu.cc.orig 2022-04-01 07:48:30 UTC +++ third_party/blink/renderer/core/html/forms/internal_popup_menu.cc -@@ -159,7 +159,7 @@ class InternalPopupMenu::ItemIterationContext { +@@ -179,7 +179,7 @@ class InternalPopupMenu::ItemIterationContext { is_in_group_(false), buffer_(buffer) { DCHECK(buffer_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On other platforms, the