diff --git a/www/chromium/Makefile b/www/chromium/Makefile index 17796bc6e534..fcc944af7cc0 100644 --- a/www/chromium/Makefile +++ b/www/chromium/Makefile @@ -1,382 +1,389 @@ PORTNAME= chromium -PORTVERSION= 122.0.6261.111 +PORTVERSION= 123.0.6312.58 CATEGORIES= www wayland MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ https://nerd.hu/distfiles/:external DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ chrome-linux-${PORTVERSION}-llvm17.profdata${EXTRACT_SUFX}:external MAINTAINER= chromium@FreeBSD.org COMMENT= Google web browser based on WebKit WWW= https://www.chromium.org/Home 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 \ + rustc:lang/rust \ xcb-proto>0:x11/xcb-proto \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} \ ${LOCALBASE}/include/va/va.h:multimedia/libva \ ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri \ ${LOCALBASE}/libdata/pkgconfig/Qt5Core.pc:devel/qt5-core \ ${LOCALBASE}/libdata/pkgconfig/Qt5Widgets.pc:x11-toolkits/qt5-widgets LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libepoll-shim.so:devel/libepoll-shim \ libevent.so:devel/libevent \ libffi.so:devel/libffi \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libdav1d.so:multimedia/dav1d \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic USES= bison compiler:c++17-lang cpe desktop-file-utils gl gmake gnome \ iconv:wchar_t jpeg localbase:ldflags ninja perl5 pkgconfig \ python:build qt:5 shebangfix tar:xz xorg CPE_VENDOR= google CPE_PRODUCT= chrome USE_GL= gbm gl USE_GNOME= atk dconf gdkpixbuf2 glib20 gtk30 libxml2 libxslt USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xorgproto xrandr xrender xscrnsaver xtst USE_QT= buildtools:build SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format MAKE_ARGS= -C out/${BUILDTYPE} ALL_TARGET= chrome BINARY_ALIAS= python3=${PYTHON_CMD} \ moc=${PREFIX}/bin/moc-qt5 # TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) # # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= clang_use_chrome_plugins=false \ enable_backup_ref_ptr_support=false \ enable_hangout_services_extension=true \ enable_log_error_not_reached=true \ enable_nacl=false \ enable_remoting=false \ - enable_rust=false \ enable_widevine=true \ fatal_linker_warnings=false \ icu_use_data_file=false \ is_clang=true \ optimize_webui=true \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=true \ use_custom_libunwind=true \ use_lld=true \ use_partition_alloc=true \ use_partition_alloc_as_malloc=false \ use_sysroot=false \ use_system_freetype=false \ use_system_harfbuzz=true \ use_system_libffi=true \ use_system_libjpeg=true \ use_udev=false \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" \ ffmpeg_branding="${FFMPEG_BRAND}" # TODO: investigate building with these options: # use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles # FreeBSD Chromium Api Key # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . # Note: these are for FreeBSD use ONLY. For your own distribution, # please get your own set of keys. GN_ARGS+= google_api_key="AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8" SUB_FILES= chromium-browser.desktop chrome SUB_LIST+= COMMENT="${COMMENT}" OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS LTO PIPEWIRE TEST WIDEVINE OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS PIPEWIRE 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 DRIVER_DESC= Install chromedriver HEIMDAL_BASE_DESC= Heimdal Kerberos (base) HEIMDAL_DESC= Heimdal Kerberos (security/heimdal) MIT_DESC= MIT Kerberos (security/krb5) ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ alsa-lib>=1.1.1_1:audio/alsa-lib ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CODECS_VARS= GN_ARGS+=proprietary_codecs=true \ FFMPEG_BRAND="Chrome" CODECS_VARS_OFF= GN_ARGS+=proprietary_codecs=false \ FFMPEG_BRAND="Chromium" CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_BUILD_DEPENDS= esbuild:devel/esbuild 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" DRIVER_MAKE_ARGS= chromedriver HEIMDAL_LIB_DEPENDS= libkrb.so.26:security/heimdal KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false LTO_VARS= GN_ARGS+=use_thin_lto=true \ GN_ARGS+=thin_lto_enable_optimizations=true \ WANTSPACE="14 GB" LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false MIT_LIB_DEPENDS= libkrb.so.3:security/krb5 PIPEWIRE_DESC= Screen capture via PipeWire PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire PIPEWIRE_VARS= GN_ARGS+=rtc_use_pipewire=true \ GN_ARGS+=rtc_link_pipewire=true PIPEWIRE_VARS_OFF= GN_ARGS+=rtc_use_pipewire=false \ GN_ARGS+=rtc_link_pipewire=false PULSEAUDIO_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 WIDEVINE_DESC= Depend on foreign-cdm to enable playback of DRM content WIDEVINE_RUN_DEPENDS= foreign-cdm>0:www/foreign-cdm .include "Makefile.tests" TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX} \ test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz:external TEST_ALL_TARGET= ${TEST_TARGETS} .include .include # for COMPILER_VERSION .if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base .endif .if ${COMPILER_VERSION} < 170 LLVM_DEFAULT= 17 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 # - map ffmpeg target to ${ARCH} .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " FFMPEG_TARGET= arm64 .elif ${ARCH} == amd64 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= x64 .elif ${ARCH} == i386 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= ia32 .endif FFMPEG_BDIR= ${WRKSRC}/build.${FFMPEG_TARGET}.freebsd/${FFMPEG_BRAND} FFMPEG_CDIR= ${WRKSRC}/third_party/ffmpeg/chromium/config/${FFMPEG_BRAND}/freebsd/${FFMPEG_TARGET} # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include +# rust +RUSTC_VERSION!= rustc -V 2>/dev/null || true +MAKE_ENV+= RUSTC_BOOTSTRAP=1 +GN_ARGS+= enable_rust=true \ + rust_sysroot_absolute="${LOCALBASE}" \ + rustc_version="${RUSTC_VERSION}" + pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "To build Chromium, you should have around 2GB of memory" @${ECHO_MSG} "and around ${WANTSPACE} of free disk space." @${ECHO_MSG} post-extract-TEST-on: @${MKDIR} ${WRKSRC}/third_party/test_fonts/test_fonts @${MV} ${WRKDIR}/test_fonts ${WRKSRC}/third_party/test_fonts/ pre-configure: # We used to remove bundled libraries to be sure that chromium uses # system libraries and not shipped ones. # cd ${WRKSRC} && ${PYTHON_CMD} \ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ ./build/linux/unbundle/replace_gn_files.py --system-libraries \ dav1d flac fontconfig freetype harfbuzz-ng icu libdrm libevent libpng \ libusb libwebp libxml libxslt openh264 opus || ${FALSE} # Chromium uses an unreleased version of FFmpeg, so configure it cd ${WRKSRC}/third_party/ffmpeg && \ ${PYTHON_CMD} chromium/scripts/build_ffmpeg.py freebsd ${FFMPEG_TARGET} \ --config-only --branding=${FFMPEG_BRAND} cd ${FFMPEG_BDIR} && ${GMAKE} ffversion.h ${MKDIR} ${FFMPEG_CDIR} .for _e in config.h config.asm config_components.h libavcodec libavformat libavutil -${CP} -pR ${FFMPEG_BDIR}/${_e} ${FFMPEG_CDIR} .endfor do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin/node # Setup buildtools/freebsd @${MKDIR} ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKSRC}/buildtools/freebsd ${LN} -sf /usr/bin/strip ${WRKSRC}/buildtools/freebsd/strip do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ ${STAGEDIR}${PREFIX}/share/man/man1/chrome.1 @${SED} -i "" -e 's,\@\@PACKAGE\@\@,chromium,g;s,\@\@MENUNAME\@\@,Chromium Web Browser,g' \ ${STAGEDIR}${PREFIX}/share/man/man1/chrome.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/chrome.png .endfor ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.png ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.pak ${STAGEDIR}${DATADIR} .for d in protoc mksnapshot ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor .for d in snapshot_blob.bin v8_context_snapshot.bin ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chrome \ ${STAGEDIR}${DATADIR} cd ${WRKSRC}/out/${BUILDTYPE} && \ ${COPYTREE_SHARE} "locales resources" ${STAGEDIR}${DATADIR} @${MKDIR} ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKDIR}/chromium-browser.desktop \ ${STAGEDIR}${DESKTOPDIR} ${INSTALL_SCRIPT} ${WRKDIR}/chrome ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/chrome/tools/build/linux/chrome-wrapper \ ${STAGEDIR}${DATADIR} # 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 ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvk_swiftshader.so ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/vk_swiftshader_icd.json ${STAGEDIR}${DATADIR} .endif post-install-DEBUG-on: ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/*.so \ ${STAGEDIR}${DATADIR} ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/character_data_generator \ ${STAGEDIR}${DATADIR} post-install-DRIVER-on: ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver.unstripped \ ${STAGEDIR}${PREFIX}/bin/chromedriver do-test-TEST-on: .for t in ${TEST_TARGETS} cd ${WRKSRC}/out/${BUILDTYPE} && ${SETENV} LC_ALL=en_US.UTF-8 \ ./${t} --gtest_filter=-${EXCLUDE_${t}:ts:} || ${TRUE} .endfor .include diff --git a/www/chromium/distinfo b/www/chromium/distinfo index 8c8e92120361..f759bfecff1b 100644 --- a/www/chromium/distinfo +++ b/www/chromium/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1709727475 -SHA256 (chromium-122.0.6261.111.tar.xz) = 0b3da2f0ca63625e84a1b36571f23591248b8fcb422ce683c09283dbfc35c309 -SIZE (chromium-122.0.6261.111.tar.xz) = 3422993788 -SHA256 (chrome-linux-122.0.6261.111-llvm17.profdata.tar.xz) = f42386be3892a4b6be516350868a4dbb3fe4b78adaf9dafb952fb30ced90d30e -SIZE (chrome-linux-122.0.6261.111-llvm17.profdata.tar.xz) = 29671344 -SHA256 (chromium-122.0.6261.111-testdata.tar.xz) = 80dc53e110b3f0fa5ef36bf6ae188a034f32daeb99942cfb4f1e9d6d20786aca -SIZE (chromium-122.0.6261.111-testdata.tar.xz) = 280203120 +TIMESTAMP = 1711095187 +SHA256 (chromium-123.0.6312.58.tar.xz) = f8dae4a2ff7b00bb44fa136c2101638fea4f232e4819be3f73381ddc0d3bf718 +SIZE (chromium-123.0.6312.58.tar.xz) = 3465099244 +SHA256 (chrome-linux-123.0.6312.58-llvm17.profdata.tar.xz) = fc9b772967baa84f44c0387f054433c22d4ccc2e0deb69b2ac7826f0de447655 +SIZE (chrome-linux-123.0.6312.58-llvm17.profdata.tar.xz) = 29783740 +SHA256 (chromium-123.0.6312.58-testdata.tar.xz) = a5dbcc3dd4a7469db1a85e31739508c8919fb37ca6050a617f059329e0d45940 +SIZE (chromium-123.0.6312.58-testdata.tar.xz) = 275371844 SHA256 (test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz) = a2ca2962daf482a8f943163541e1c73ba4b2694fabcd2510981f2db4eda493c8 SIZE (test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz) = 32624734 diff --git a/www/chromium/files/patch-BUILD.gn b/www/chromium/files/patch-BUILD.gn index 26c8e3e07811..b7b12485ca76 100644 --- a/www/chromium/files/patch-BUILD.gn +++ b/www/chromium/files/patch-BUILD.gn @@ -1,89 +1,89 @@ ---- BUILD.gn.orig 2024-02-23 21:04:38 UTC +--- BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ BUILD.gn -@@ -63,7 +63,7 @@ declare_args() { +@@ -64,7 +64,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) -@@ -95,7 +95,6 @@ group("gn_all") { +@@ -96,7 +96,6 @@ group("gn_all") { "//codelabs", "//components:components_unittests", "//components/gwp_asan:gwp_asan_unittests", - "//infra/orchestrator:orchestrator_all", "//net:net_unittests", "//sandbox:sandbox_unittests", "//services:services_unittests", -@@ -425,7 +424,7 @@ group("gn_all") { +@@ -428,7 +427,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", -@@ -625,6 +624,15 @@ group("gn_all") { +@@ -628,6 +627,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:dump_syms", -@@ -671,7 +679,7 @@ group("gn_all") { +@@ -674,7 +682,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)" ] } -@@ -1092,7 +1100,7 @@ if (use_blink && !is_cronet_build) { +@@ -1095,7 +1103,7 @@ if (use_blink && !is_cronet_build) { ] } - if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) { + if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) { script_test("chrome_wpt_tests") { script = "//third_party/blink/tools/run_wpt_tests.py" args = [ -@@ -1183,7 +1191,7 @@ if (use_blink && !is_cronet_build) { +@@ -1186,7 +1194,7 @@ if (use_blink && !is_cronet_build) { data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] } - if (!is_win && !is_android) { + if (!is_win && !is_android && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -1192,7 +1200,7 @@ if (use_blink && !is_cronet_build) { +@@ -1195,7 +1203,7 @@ if (use_blink && !is_cronet_build) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } - if (is_linux || is_chromeos) { + if ((is_linux && !is_bsd) || is_chromeos) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1642,7 +1650,7 @@ group("chromium_builder_perf") { +@@ -1645,7 +1653,7 @@ group("chromium_builder_perf") { data_deps += [ "//chrome/test:performance_browser_tests" ] } - if (!is_win) { + if (!is_win && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } diff --git a/www/chromium/files/patch-base_BUILD.gn b/www/chromium/files/patch-base_BUILD.gn index 1ea08cf2eb2c..5ab4d3df8551 100644 --- a/www/chromium/files/patch-base_BUILD.gn +++ b/www/chromium/files/patch-base_BUILD.gn @@ -1,162 +1,162 @@ ---- base/BUILD.gn.orig 2024-02-23 21:04:38 UTC +--- base/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ base/BUILD.gn -@@ -187,7 +187,7 @@ buildflag_header("ios_cronet_buildflags") { +@@ -192,7 +192,7 @@ buildflag_header("ios_cronet_buildflags") { flags = [ "CRONET_BUILD=$is_cronet_build" ] } -enable_message_pump_epoll = is_linux || is_chromeos || is_android +enable_message_pump_epoll = (is_linux || is_chromeos || is_android) && !is_bsd buildflag_header("message_pump_buildflags") { header = "message_pump_buildflags.h" header_dir = "base/message_loop" -@@ -1118,11 +1118,23 @@ component("base") { +@@ -1126,11 +1126,23 @@ component("base") { # Needed for if using newer C++ library than sysroot, except if # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. - if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && + if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos && !is_bsd)) && host_toolchain != "//build/toolchain/cros:host") { libs += [ "atomic" ] } + # *BSD needs libkvm + if (is_bsd) { + libs += [ "kvm" ] + } + + if (is_freebsd) { + libs += [ + "execinfo", + "util", + ] + } + if (use_allocator_shim) { if (is_apple) { sources += [ "allocator/early_zone_registration_apple.h" ] -@@ -1142,7 +1154,7 @@ component("base") { +@@ -1150,7 +1162,7 @@ component("base") { # Allow more direct string conversions on platforms with native utf8 # strings - if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) { + if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia || is_bsd) { defines += [ "SYSTEM_NATIVE_UTF8" ] } -@@ -2088,6 +2100,22 @@ component("base") { +@@ -2106,6 +2118,22 @@ component("base") { ] } + if (is_openbsd) { + sources += [ + "process/process_handle_openbsd.cc", + "process/process_iterator_openbsd.cc", + "process/process_metrics_openbsd.cc", + "system/sys_info_openbsd.cc", + ] + } else if (is_freebsd) { + sources += [ + "process/process_handle_freebsd.cc", + "process/process_iterator_freebsd.cc", + "process/process_metrics_freebsd.cc", + "system/sys_info_freebsd.cc", + ] + } + # iOS if (is_ios) { sources += [ -@@ -2218,6 +2246,31 @@ component("base") { +@@ -2241,6 +2269,31 @@ component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/scoped_file_linux.cc", + "system/sys_info_linux.cc", + "process/process_iterator_linux.cc", + "process/process_linux.cc", + "process/process_metrics_linux.cc", + "process/process_handle_linux.cc", + "profiler/stack_copier_signal.cc", + "profiler/stack_copier_signal.h", + "profiler/thread_delegate_posix.cc", + "profiler/thread_delegate_posix.h", + "threading/platform_thread_linux.cc", + "stack_canary_linux.cc", + "stack_canary_linux.h", + ] + sources += [ + "files/file_path_watcher_kqueue.cc", + "files/file_path_watcher_kqueue.h", + "files/file_path_watcher_bsd.cc", + "threading/platform_thread_bsd.cc", + ] + } + if (use_blink) { sources += [ "files/file_path_watcher.cc", -@@ -2228,7 +2281,7 @@ component("base") { +@@ -2251,7 +2304,7 @@ component("base") { } if (dep_libevent) { - deps += [ "//third_party/libevent" ] + public_deps += [ "//third_party/libevent" ] } if (use_libevent) { -@@ -2993,7 +3046,7 @@ if (is_apple) { +@@ -3027,7 +3080,7 @@ if (is_apple) { } } -if (!is_nacl && (is_linux || is_chromeos)) { +if (!is_nacl && !is_bsd && (is_linux || is_chromeos)) { # This test must compile with -fstack-protector-all source_set("stack_canary_linux_unittests") { testonly = true -@@ -3629,14 +3682,14 @@ test("base_unittests") { +@@ -3675,14 +3728,14 @@ 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", "nix/mime_util_xdg_unittest.cc", ] - if (!is_nacl) { + if (!is_nacl && !is_bsd) { deps += [ ":stack_canary_linux_unittests" ] } } -@@ -3651,7 +3704,7 @@ test("base_unittests") { +@@ -3701,7 +3754,7 @@ test("base_unittests") { "posix/file_descriptor_shuffle_unittest.cc", "posix/unix_domain_socket_unittest.cc", ] - if (!is_nacl && !is_apple) { + if (!is_nacl && !is_apple && !is_bsd) { sources += [ "profiler/stack_base_address_posix_unittest.cc", "profiler/stack_copier_signal_unittest.cc", -@@ -3662,7 +3715,7 @@ test("base_unittests") { +@@ -3712,7 +3765,7 @@ test("base_unittests") { # Allow more direct string conversions on platforms with native utf8 # strings - if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) { + if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia || is_bsd) { defines += [ "SYSTEM_NATIVE_UTF8" ] } -@@ -3925,7 +3978,7 @@ test("base_unittests") { +@@ -3980,7 +4033,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/chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index 284403a45df8..90ec31009c98 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni +++ b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/partition_alloc.gni.orig 2024-03-06 06:05:23 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2024-03-22 08:19:40 UTC +++ base/allocator/partition_allocator/partition_alloc.gni @@ -30,7 +30,7 @@ if (is_nacl) { } has_memory_tagging = - current_cpu == "arm64" && is_clang && !is_asan && (is_linux || is_android) + current_cpu == "arm64" && is_clang && !is_asan && !is_bsd && (is_linux || is_android) declare_args() { # Causes all the allocations to be routed via allocator_shim.cc. Usually, -@@ -335,7 +335,7 @@ declare_args() { +@@ -357,7 +357,7 @@ declare_args() { # dependencies that use partition_allocator are compiled in AOSP against a # version of glibc that does not include pkeys syscall numbers. enable_pkeys = - (is_linux || is_chromeos) && target_cpu == "x64" && !is_cronet_build + !is_bsd && (is_linux || is_chromeos) && target_cpu == "x64" && !is_cronet_build } assert(!enable_pkeys || ((is_linux || is_chromeos) && target_cpu == "x64"), "Pkeys are only supported on x64 linux and ChromeOS") diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn index 19500f839d60..d721d056c575 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2024-02-23 21:04:38 UTC +--- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ base/allocator/partition_allocator/src/partition_alloc/BUILD.gn -@@ -852,7 +852,7 @@ if (is_clang_or_gcc) { +@@ -858,7 +858,7 @@ if (is_clang_or_gcc) { configs -= [ "//build/config/compiler:enable_arc" ] } } - if (is_chromeos || is_linux) { + if ((is_chromeos || is_linux) && !is_bsd) { shim_headers += [ "shim/allocator_shim_override_cpp_symbols.h", "shim/allocator_shim_override_glibc_weak_symbols.h", diff --git a/www/chromium/files/patch-base_base__switches.cc b/www/chromium/files/patch-base_base__switches.cc deleted file mode 100644 index ceb14284311d..000000000000 --- a/www/chromium/files/patch-base_base__switches.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/base_switches.cc.orig 2024-02-23 21:04:38 UTC -+++ base/base_switches.cc -@@ -172,7 +172,7 @@ const char kPackageVersionName[] = "package-version-na - const char kPackageVersionCode[] = "package-version-code"; - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/1176772): Remove kEnableCrashpad and IsCrashpadEnabled() when - // Crashpad is fully enabled on Linux. Indicates that Crashpad should be - // enabled. diff --git a/www/chromium/files/patch-base_base__switches.h b/www/chromium/files/patch-base_base__switches.h deleted file mode 100644 index c26526d104cb..000000000000 --- a/www/chromium/files/patch-base_base__switches.h +++ /dev/null @@ -1,11 +0,0 @@ ---- base/base_switches.h.orig 2024-02-23 21:04:38 UTC -+++ base/base_switches.h -@@ -60,7 +60,7 @@ extern const char kPackageVersionName[]; - extern const char kPackageVersionCode[]; - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // TODO(crbug.com/1176772): Remove kEnableCrashpad and IsCrashpadEnabled() when - // Crashpad is fully enabled on Linux. - extern const char kEnableCrashpad[]; diff --git a/www/chromium/files/patch-base_functional_unretained__traits.h b/www/chromium/files/patch-base_functional_unretained__traits.h index 31fa0d0bb343..7f6a6a8d660a 100644 --- a/www/chromium/files/patch-base_functional_unretained__traits.h +++ b/www/chromium/files/patch-base_functional_unretained__traits.h @@ -1,11 +1,11 @@ ---- base/functional/unretained_traits.h.orig 2024-02-23 21:04:38 UTC +--- base/functional/unretained_traits.h.orig 2024-03-22 08:19:40 UTC +++ base/functional/unretained_traits.h -@@ -99,7 +99,7 @@ struct SupportsUnretainedImpl { +@@ -93,7 +93,7 @@ struct SupportsUnretainedImpl { // official builds, and then in non-test code as well. #if defined(FORCE_UNRETAINED_COMPLETENESS_CHECKS_FOR_TESTS) || \ (!defined(UNIT_TEST) && !defined(OFFICIAL_BUILD) && \ - (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN))) + (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD))) static_assert(v, "Argument requires unretained storage, but type is not " "fully defined. This prevents determining whether " diff --git a/www/chromium/files/patch-base_i18n_icu__util.cc b/www/chromium/files/patch-base_i18n_icu__util.cc index 7508c99c6f98..1143a76baf9d 100644 --- a/www/chromium/files/patch-base_i18n_icu__util.cc +++ b/www/chromium/files/patch-base_i18n_icu__util.cc @@ -1,20 +1,20 @@ ---- base/i18n/icu_util.cc.orig 2023-09-13 12:11:42 UTC +--- base/i18n/icu_util.cc.orig 2024-03-22 08:19:40 UTC +++ base/i18n/icu_util.cc -@@ -51,7 +51,7 @@ +@@ -52,7 +52,7 @@ #include "third_party/icu/source/common/unicode/unistr.h" #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) #include "third_party/icu/source/i18n/unicode/timezone.h" #endif -@@ -345,7 +345,7 @@ void InitializeIcuTimeZone() { +@@ -328,7 +328,7 @@ void InitializeIcuTimeZone() { FuchsiaIntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization(); icu::TimeZone::adoptDefault( icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id))); -#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) +#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD) // To respond to the time zone change properly, the default time zone // cache in ICU has to be populated on starting up. // See TimeZoneMonitorLinux::NotifyClientsFromImpl(). diff --git a/www/chromium/files/patch-base_native__library__unittest.cc b/www/chromium/files/patch-base_native__library__unittest.cc index 3209836e3ab1..6e6c27253205 100644 --- a/www/chromium/files/patch-base_native__library__unittest.cc +++ b/www/chromium/files/patch-base_native__library__unittest.cc @@ -1,11 +1,11 @@ ---- base/native_library_unittest.cc.orig 2024-01-30 07:53:34 UTC +--- base/native_library_unittest.cc.orig 2024-03-22 08:19:40 UTC +++ base/native_library_unittest.cc -@@ -135,7 +135,7 @@ TEST(NativeLibraryTest, LoadLibrary) { +@@ -133,7 +133,7 @@ TEST(NativeLibraryTest, LoadLibrary) { // versions with respect to symbol resolution scope. // TSan and MSan error out on RTLD_DEEPBIND, https://crbug.com/705255 #if !BUILDFLAG(IS_ANDROID) && !defined(THREAD_SANITIZER) && \ - !defined(MEMORY_SANITIZER) + !defined(MEMORY_SANITIZER) && !BUILDFLAG(IS_BSD) // Verifies that the |prefer_own_symbols| option satisfies its guarantee that // a loaded library will always prefer local symbol resolution before diff --git a/www/chromium/files/patch-base_process_process__handle__openbsd.cc b/www/chromium/files/patch-base_process_process__handle__openbsd.cc index f8e318565de3..861e92bb331c 100644 --- a/www/chromium/files/patch-base_process_process__handle__openbsd.cc +++ b/www/chromium/files/patch-base_process_process__handle__openbsd.cc @@ -1,89 +1,133 @@ ---- base/process/process_handle_openbsd.cc.orig 2022-04-21 18:48:31 UTC +--- base/process/process_handle_openbsd.cc.orig 2024-03-22 08:19:40 UTC +++ base/process/process_handle_openbsd.cc -@@ -3,8 +3,11 @@ +@@ -3,48 +3,112 @@ // found in the LICENSE file. #include "base/process/process_handle.h" +#include "base/files/file_util.h" #include ++#include +#include +#include ++#include #include #include #include -@@ -12,39 +15,59 @@ + ++#include ++ namespace base { ProcessId GetParentProcessId(ProcessHandle process) { - struct kinfo_proc info; + struct kinfo_proc *info; size_t length; + pid_t ppid; int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process, sizeof(struct kinfo_proc), 0 }; if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) < 0) return -1; +- mib[5] = (length / sizeof(struct kinfo_proc)); + info = (struct kinfo_proc *)malloc(length); -+ - mib[5] = (length / sizeof(struct kinfo_proc)); - if (sysctl(mib, std::size(mib), &info, &length, NULL, 0) < 0) - return -1; ++ mib[5] = static_cast((length / sizeof(struct kinfo_proc))); + +- return info.p_ppid; + if (sysctl(mib, std::size(mib), info, &length, NULL, 0) < 0) { + ppid = -1; + goto out; + } - -- return info.p_ppid; ++ + ppid = info->p_ppid; + +out: + free(info); + return ppid; } FilePath GetProcessExecutablePath(ProcessHandle process) { - struct kinfo_proc kp; -- size_t len; -+ struct kinfo_proc *info; -+ size_t length; -+ char *path = NULL; - int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process, - sizeof(struct kinfo_proc), 0 }; ++ struct kinfo_file *files; ++ kvm_t *kd = NULL; ++ char errbuf[_POSIX2_LINE_MAX]; ++ char **retvalargs, *cpath, retval[PATH_MAX]; ++ int cnt; + size_t len; +- int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process, +- sizeof(struct kinfo_proc), 0 }; ++ char *tokens[2]; ++ struct stat sb; ++ FilePath *result = nullptr; - if (sysctl(mib, std::size(mib), NULL, &len, NULL, 0) == -1) -+ if (sysctl(mib, std::size(mib), NULL, &length, NULL, 0) == -1) - return FilePath(); +- return FilePath(); - mib[5] = (len / sizeof(struct kinfo_proc)); - if (sysctl(mib, std::size(mib), &kp, &len, NULL, 0) < 0) - return FilePath(); - if ((kp.p_flag & P_SYSTEM) != 0) - return FilePath(); - if (strcmp(kp.p_comm, "chrome") == 0) - return FilePath(kp.p_comm); ++ int mib[] = { CTL_KERN, KERN_PROC_ARGS, process, KERN_PROC_ARGV }; - return FilePath(); -+ info = (struct kinfo_proc *)malloc(length); ++ if ((cpath = getenv("CHROME_EXE_PATH")) != NULL) ++ *result = FilePath(cpath); ++ else ++ *result = FilePath("/usr/local/chrome/chrome"); + -+ mib[5] = (length / sizeof(struct kinfo_proc)); ++ if (sysctl(mib, std::size(mib), NULL, &len, NULL, 0) != -1) { ++ retvalargs = static_cast(malloc(len)); ++ if (!retvalargs) ++ return *result; + -+ if (sysctl(mib, std::size(mib), info, &length, NULL, 0) < 0) -+ goto out; ++ if (sysctl(mib, std::size(mib), retvalargs, &len, NULL, 0) < 0) { ++ free(retvalargs); ++ return *result; ++ } + -+ if ((info->p_flag & P_SYSTEM) != 0) -+ goto out; ++ if ((*tokens = strtok(retvalargs[0], ":")) == NULL) { ++ free(retvalargs); ++ return *result; ++ } + -+ if (strcmp(info->p_comm, "chrome") == 0) { -+ path = info->p_comm; -+ goto out; ++ free(retvalargs); ++ ++ if (tokens[0] == NULL) ++ return *result; ++ ++ if (realpath(tokens[0], retval) == NULL) ++ return *result; ++ ++ if (stat(retval, &sb) < 0) ++ return *result; ++ ++ if ((kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, ++ errbuf)) == NULL) ++ return *result; ++ ++ if ((files = kvm_getfiles(kd, KERN_FILE_BYPID, process, ++ sizeof(struct kinfo_file), &cnt)) == NULL) { ++ kvm_close(kd); ++ return *result; ++ } ++ ++ for (int i = 0; i < cnt; i++) { ++ if (files[i].fd_fd == KERN_FILE_TEXT && ++ files[i].va_fsid == static_cast(sb.st_dev) && ++ files[i].va_fileid == sb.st_ino) { ++ kvm_close(kd); ++ *result = FilePath(retval); ++ } ++ } + } + -+out: -+ free(info); -+ return FilePath(path); ++ return *result; } } // namespace base diff --git a/www/chromium/files/patch-base_process_process__metrics.h b/www/chromium/files/patch-base_process_process__metrics.h index 6401065f7738..360c25b6d3f3 100644 --- a/www/chromium/files/patch-base_process_process__metrics.h +++ b/www/chromium/files/patch-base_process_process__metrics.h @@ -1,120 +1,120 @@ ---- base/process/process_metrics.h.orig 2023-12-10 06:10:27 UTC +--- base/process/process_metrics.h.orig 2024-03-22 08:19:40 UTC +++ base/process/process_metrics.h @@ -37,7 +37,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) #include #include #include @@ -50,7 +50,7 @@ namespace base { // Full declaration is in process_metrics_iocounters.h. struct IoCounters; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Minor and major page fault counts since the process creation. // Both counts are process-wide, and exclude child processes. // @@ -105,7 +105,7 @@ class BASE_EXPORT ProcessMetrics { // convenience wrapper for CreateProcessMetrics(). static std::unique_ptr CreateCurrentProcessMetrics(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Resident Set Size is a Linux/Android specific memory concept. Do not // attempt to extend this to other platforms. BASE_EXPORT size_t GetResidentSetSize() const; @@ -163,7 +163,7 @@ class BASE_EXPORT ProcessMetrics { #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Emits the cumulative CPU usage for all currently active threads since they // were started into the output parameter (replacing its current contents). // Threads that have already terminated will not be reported. Thus, the sum of @@ -219,7 +219,7 @@ class BASE_EXPORT ProcessMetrics { int GetOpenFdSoftLimit() const; #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Bytes of swap as reported by /proc/[pid]/status. uint64_t GetVmSwapBytes() const; @@ -240,7 +240,7 @@ class BASE_EXPORT ProcessMetrics { #endif // !BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups); #endif #if BUILDFLAG(IS_APPLE) @@ -262,9 +262,7 @@ class BASE_EXPORT ProcessMetrics { // Used to store the previous times and CPU usage counts so we can // compute the CPU usage between calls. TimeTicks last_cpu_time_; -#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) TimeDelta last_cumulative_cpu_; -#endif #if BUILDFLAG(IS_WIN) TimeTicks last_cpu_time_for_precise_cpu_usage_; @@ -272,7 +270,7 @@ class BASE_EXPORT ProcessMetrics { #endif #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Same thing for idle wakeups. TimeTicks last_idle_wakeups_time_; uint64_t last_absolute_idle_wakeups_; @@ -313,7 +311,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Data about system-wide memory consumption. Values are in KB. Available on // Windows, Mac, Linux, Android and Chrome OS. // @@ -348,7 +346,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // This provides an estimate of available memory as described here: // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773 // NOTE: this is ONLY valid in kernels 3.14 and up. Its value will always @@ -363,7 +361,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { #endif #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) int buffers = 0; int cached = 0; int active_anon = 0; @@ -400,7 +398,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK // BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Parse the data found in /proc//stat and return the sum of the // CPU-related ticks. Returns -1 on parse error. // Exposed for testing. -@@ -588,7 +586,7 @@ class BASE_EXPORT SystemMetrics { +@@ -594,7 +592,7 @@ class BASE_EXPORT SystemMetrics { FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics); size_t committed_memory_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) SystemMemoryInfoKB memory_info_; VmStatInfo vmstat_info_; SystemDiskInfo disk_info_; diff --git a/www/chromium/files/patch-base_process_process__unittest.cc b/www/chromium/files/patch-base_process_process__unittest.cc index 39648480fc45..5a13d8c56a58 100644 --- a/www/chromium/files/patch-base_process_process__unittest.cc +++ b/www/chromium/files/patch-base_process_process__unittest.cc @@ -1,11 +1,11 @@ ---- base/process/process_unittest.cc.orig 2023-11-03 10:09:45 UTC +--- base/process/process_unittest.cc.orig 2024-03-22 08:19:40 UTC +++ base/process/process_unittest.cc -@@ -198,7 +198,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) { +@@ -199,7 +199,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) { // was spawned and a time recorded after it was spawned. However, since the // base::Time and process creation clocks don't match, tolerate some error. constexpr base::TimeDelta kTolerance = -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux, process creation time is relative to boot time which has a // 1-second resolution. Tolerate 1 second for the imprecise boot time and // 100 ms for the imprecise clock. diff --git a/www/chromium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc b/www/chromium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc index d739c9137c77..e2957f5e2403 100644 --- a/www/chromium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc +++ b/www/chromium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc @@ -1,11 +1,11 @@ ---- base/profiler/stack_sampling_profiler_unittest.cc.orig 2022-02-28 16:54:41 UTC +--- base/profiler/stack_sampling_profiler_unittest.cc.orig 2024-03-22 08:19:40 UTC +++ base/profiler/stack_sampling_profiler_unittest.cc -@@ -41,7 +41,7 @@ +@@ -42,7 +42,7 @@ #include #include #include -#else +#elif !BUILDFLAG(IS_BSD) #include #endif diff --git a/www/chromium/files/patch-base_rand__util__posix.cc b/www/chromium/files/patch-base_rand__util__posix.cc index d92e78de10f5..1b2a99d867ab 100644 --- a/www/chromium/files/patch-base_rand__util__posix.cc +++ b/www/chromium/files/patch-base_rand__util__posix.cc @@ -1,62 +1,62 @@ ---- base/rand_util_posix.cc.orig 2024-02-23 21:04:38 UTC +--- base/rand_util_posix.cc.orig 2024-03-22 08:19:40 UTC +++ base/rand_util_posix.cc @@ -23,7 +23,7 @@ #include "base/time/time.h" #include "build/build_config.h" -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) #include "third_party/lss/linux_syscall_support.h" #elif BUILDFLAG(IS_MAC) // TODO(crbug.com/995996): Waiting for this header to appear in the iOS SDK. @@ -40,6 +40,7 @@ namespace base { namespace { +#if !BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_AIX) // AIX has no 64-bit support for O_CLOEXEC. static constexpr int kOpenFlags = O_RDONLY; @@ -64,10 +65,11 @@ class URandomFd { private: const int fd_; }; +#endif #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ BUILDFLAG(IS_ANDROID)) && \ - !BUILDFLAG(IS_NACL) + !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) // TODO(pasko): Unify reading kernel version numbers in: // mojo/core/channel_linux.cc // chrome/browser/android/seccomp_support_detector.cc @@ -177,6 +179,7 @@ bool UseBoringSSLForRandBytes() { namespace { void RandBytes(span output, bool avoid_allocation) { +#if !BUILDFLAG(IS_BSD) #if !BUILDFLAG(IS_NACL) // The BoringSSL experiment takes priority over everything else. if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) { @@ -215,6 +218,9 @@ void RandBytes(span output, bool avoid_alloca const int urandom_fd = GetUrandomFD(); const bool success = ReadFromFD(urandom_fd, as_writable_chars(output)); CHECK(success); +#else + arc4random_buf(output.data(), output.size()); +#endif } } // namespace @@ -239,9 +245,11 @@ void RandBytes(void* output, size_t output_length) { - RandBytes(make_span(reinterpret_cast(output), output_length)); + RandBytes(make_span(static_cast(output), output_length)); } +#if !BUILDFLAG(IS_BSD) int GetUrandomFD() { static NoDestructor urandom_fd; return urandom_fd->fd(); } +#endif } // namespace base diff --git a/www/chromium/files/patch-base_synchronization_lock__impl.h b/www/chromium/files/patch-base_synchronization_lock__impl.h index 65885cac963f..8de885d72f5a 100644 --- a/www/chromium/files/patch-base_synchronization_lock__impl.h +++ b/www/chromium/files/patch-base_synchronization_lock__impl.h @@ -1,23 +1,23 @@ ---- base/synchronization/lock_impl.h.orig 2024-02-23 21:04:38 UTC +--- base/synchronization/lock_impl.h.orig 2024-03-22 08:19:40 UTC +++ base/synchronization/lock_impl.h -@@ -106,6 +106,10 @@ void LockImpl::Unlock() { +@@ -105,6 +105,10 @@ void LockImpl::Unlock() { } #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FREEBSD) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wthread-safety-analysis" +#endif #if DCHECK_IS_ON() BASE_EXPORT void dcheck_trylock_result(int rv); -@@ -126,6 +130,9 @@ void LockImpl::Unlock() { +@@ -125,6 +129,9 @@ void LockImpl::Unlock() { dcheck_unlock_result(rv); #endif } +#if BUILDFLAG(IS_FREEBSD) +#pragma GCC diagnostic pop +#endif #endif // This is an implementation used for AutoLock templated on the lock type. diff --git a/www/chromium/files/patch-base_syslog__logging.cc b/www/chromium/files/patch-base_syslog__logging.cc index 5c1921e82d4a..3cf333be003d 100644 --- a/www/chromium/files/patch-base_syslog__logging.cc +++ b/www/chromium/files/patch-base_syslog__logging.cc @@ -1,20 +1,20 @@ ---- base/syslog_logging.cc.orig 2022-02-28 16:54:41 UTC +--- base/syslog_logging.cc.orig 2024-03-22 08:19:40 UTC +++ base/syslog_logging.cc -@@ -15,7 +15,7 @@ +@@ -17,7 +17,7 @@ #include "base/strings/string_util.h" #include "base/win/scoped_handle.h" #include "base/win/win_util.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // defines LOG_INFO, LOG_WARNING macros that could conflict with // base::LOG_INFO, base::LOG_WARNING. #include -@@ -147,7 +147,7 @@ EventLogMessage::~EventLogMessage() { +@@ -149,7 +149,7 @@ EventLogMessage::~EventLogMessage() { if (user_sid != nullptr) ::LocalFree(user_sid); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kEventSource[] = "chrome"; openlog(kEventSource, LOG_NOWAIT | LOG_PID, LOG_USER); // We can't use the defined names for the logging severity from syslog.h diff --git a/www/chromium/files/patch-base_system_sys__info__posix.cc b/www/chromium/files/patch-base_system_sys__info__posix.cc index 2334fe9e6157..377a5e6c709e 100644 --- a/www/chromium/files/patch-base_system_sys__info__posix.cc +++ b/www/chromium/files/patch-base_system_sys__info__posix.cc @@ -1,29 +1,29 @@ ---- base/system/sys_info_posix.cc.orig 2023-12-10 06:10:27 UTC +--- base/system/sys_info_posix.cc.orig 2024-03-22 08:19:40 UTC +++ base/system/sys_info_posix.cc -@@ -117,7 +117,7 @@ bool GetDiskSpaceInfo(const base::FilePath& path, +@@ -118,7 +118,7 @@ bool GetDiskSpaceInfo(const base::FilePath& path, namespace base { -#if !BUILDFLAG(IS_OPENBSD) +#if !BUILDFLAG(IS_BSD) // static int SysInfo::NumberOfProcessors() { #if BUILDFLAG(IS_MAC) -@@ -174,7 +174,7 @@ int SysInfo::NumberOfProcessors() { +@@ -175,7 +175,7 @@ int SysInfo::NumberOfProcessors() { return cached_num_cpus; } -#endif // !BUILDFLAG(IS_OPENBSD) +#endif // !BUILDFLAG(IS_BSD) // static uint64_t SysInfo::AmountOfVirtualMemory() { -@@ -264,6 +264,8 @@ std::string SysInfo::OperatingSystemArchitecture() { +@@ -265,6 +265,8 @@ std::string SysInfo::OperatingSystemArchitecture() { arch = "x86"; } else if (arch == "amd64") { arch = "x86_64"; + } else if (arch == "arm64") { + arch = "aarch64"; } else if (std::string(info.sysname) == "AIX") { arch = "ppc64"; } diff --git a/www/chromium/files/patch-base_test_test__file__util__posix.cc b/www/chromium/files/patch-base_test_test__file__util__posix.cc index 37c9bbbb70ec..044e4903e8b6 100644 --- a/www/chromium/files/patch-base_test_test__file__util__posix.cc +++ b/www/chromium/files/patch-base_test_test__file__util__posix.cc @@ -1,11 +1,11 @@ ---- base/test/test_file_util_posix.cc.orig 2022-02-28 16:54:41 UTC +--- base/test/test_file_util_posix.cc.orig 2024-03-22 08:19:40 UTC +++ base/test/test_file_util_posix.cc -@@ -88,7 +88,7 @@ void SyncPageCacheToDisk() { +@@ -89,7 +89,7 @@ void SyncPageCacheToDisk() { } #if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_APPLE) && \ - !BUILDFLAG(IS_ANDROID) + !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) bool EvictFileFromSystemCache(const FilePath& file) { // There doesn't seem to be a POSIX way to cool the disk cache. NOTIMPLEMENTED(); diff --git a/www/chromium/files/patch-base_threading_hang__watcher.cc b/www/chromium/files/patch-base_threading_hang__watcher.cc index 43f5c06f568c..a32aef72b4d9 100644 --- a/www/chromium/files/patch-base_threading_hang__watcher.cc +++ b/www/chromium/files/patch-base_threading_hang__watcher.cc @@ -1,11 +1,11 @@ ---- base/threading/hang_watcher.cc.orig 2023-10-11 18:22:24 UTC +--- base/threading/hang_watcher.cc.orig 2024-03-22 08:19:40 UTC +++ base/threading/hang_watcher.cc -@@ -331,7 +331,7 @@ void HangWatcher::InitializeOnMainThread(ProcessType p +@@ -332,7 +332,7 @@ void HangWatcher::InitializeOnMainThread(ProcessType p bool enable_hang_watcher = base::FeatureList::IsEnabled(kEnableHangWatcher); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) if (is_zygote_child) { enable_hang_watcher = enable_hang_watcher && diff --git a/www/chromium/files/patch-base_threading_platform__thread__internal__posix.cc b/www/chromium/files/patch-base_threading_platform__thread__internal__posix.cc index d7c579381726..87a3c8373eb5 100644 --- a/www/chromium/files/patch-base_threading_platform__thread__internal__posix.cc +++ b/www/chromium/files/patch-base_threading_platform__thread__internal__posix.cc @@ -1,11 +1,11 @@ ---- base/threading/platform_thread_internal_posix.cc.orig 2023-09-13 12:11:42 UTC +--- base/threading/platform_thread_internal_posix.cc.orig 2024-03-22 08:19:40 UTC +++ base/threading/platform_thread_internal_posix.cc -@@ -41,7 +41,7 @@ ThreadPriorityForTest NiceValueToThreadPriorityForTest +@@ -42,7 +42,7 @@ ThreadPriorityForTest NiceValueToThreadPriorityForTest } int GetCurrentThreadNiceValue() { -#if BUILDFLAG(IS_NACL) +#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD) NOTIMPLEMENTED(); return 0; #else diff --git a/www/chromium/files/patch-base_trace__event_process__memory__dump.cc b/www/chromium/files/patch-base_trace__event_process__memory__dump.cc index 4a938cc94c34..d216c91dd0cc 100644 --- a/www/chromium/files/patch-base_trace__event_process__memory__dump.cc +++ b/www/chromium/files/patch-base_trace__event_process__memory__dump.cc @@ -1,20 +1,20 @@ ---- base/trace_event/process_memory_dump.cc.orig 2022-09-24 10:57:32 UTC +--- base/trace_event/process_memory_dump.cc.orig 2024-03-22 08:19:40 UTC +++ base/trace_event/process_memory_dump.cc -@@ -112,7 +112,7 @@ absl::optional ProcessMemoryDump::CountResiden +@@ -113,7 +113,7 @@ absl::optional ProcessMemoryDump::CountResiden #if BUILDFLAG(IS_WIN) std::unique_ptr vec( new PSAPI_WORKING_SET_EX_INFORMATION[max_vec_size]); -#elif BUILDFLAG(IS_APPLE) +#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) std::unique_ptr vec(new char[max_vec_size]); #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) std::unique_ptr vec(new unsigned char[max_vec_size]); -@@ -134,7 +134,7 @@ absl::optional ProcessMemoryDump::CountResiden +@@ -135,7 +135,7 @@ absl::optional ProcessMemoryDump::CountResiden for (size_t i = 0; i < page_count; i++) resident_page_count += vec[i].VirtualAttributes.Valid; -#elif BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // TODO(crbug.com/851760): Implement counting resident bytes. // For now, log and avoid unused variable warnings. NOTIMPLEMENTED_LOG_ONCE(); diff --git a/www/chromium/files/patch-build_config_clang_BUILD.gn b/www/chromium/files/patch-build_config_clang_BUILD.gn new file mode 100644 index 000000000000..731f89b15035 --- /dev/null +++ b/www/chromium/files/patch-build_config_clang_BUILD.gn @@ -0,0 +1,11 @@ +--- build/config/clang/BUILD.gn.orig 2024-03-22 08:19:40 UTC ++++ build/config/clang/BUILD.gn +@@ -194,7 +194,7 @@ template("clang_lib") { + + # Adds a dependency on the Clang runtime library clang_rt.builtins. + clang_lib("compiler_builtins") { +- if (!toolchain_has_rust) { ++ if (!toolchain_has_rust || is_bsd) { + # Since there's no Rust in the toolchain, there's no concern that we'll use + # the Rust stdlib's intrinsics here. + # diff --git a/www/chromium/files/patch-build_config_compiler_BUILD.gn b/www/chromium/files/patch-build_config_compiler_BUILD.gn index 535594404c7a..cd71b2674d2e 100644 --- a/www/chromium/files/patch-build_config_compiler_BUILD.gn +++ b/www/chromium/files/patch-build_config_compiler_BUILD.gn @@ -1,136 +1,136 @@ ---- build/config/compiler/BUILD.gn.orig 2024-02-23 21:04:38 UTC +--- build/config/compiler/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ build/config/compiler/BUILD.gn @@ -204,7 +204,7 @@ declare_args() { # This greatly reduces the size of debug builds, at the cost of # debugging information which is required by some specialized # debugging tools. - simple_template_names = is_clang && !is_nacl && !is_win && !is_apple + simple_template_names = is_clang && !is_nacl && !is_win && !is_apple && !is_bsd } declare_args() { @@ -268,13 +268,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" ] ++ ldflags = [ "-Wl,-z,notext", "-Wl,--strip-all" ] + } } # compiler --------------------------------------------------------------------- -@@ -520,6 +523,10 @@ config("compiler") { +@@ -515,6 +518,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_gold) { -@@ -595,7 +602,7 @@ config("compiler") { +@@ -590,7 +597,7 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } - if (is_clang && !is_nacl && current_os != "zos") { + if (is_clang && !is_nacl && current_os != "zos" && !is_bsd) { cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] if (save_reproducers_on_lld_crash && use_lld) { ldflags += [ @@ -1174,7 +1181,7 @@ config("compiler_cpu_abi") { ] } } else if (current_cpu == "arm") { - if (is_clang && !is_android && !is_nacl && + if (is_clang && !is_android && !is_nacl && !is_bsd && !(is_chromeos_lacros && is_chromeos_device)) { cflags += [ "--target=arm-linux-gnueabihf" ] ldflags += [ "--target=arm-linux-gnueabihf" ] @@ -1189,7 +1196,7 @@ config("compiler_cpu_abi") { cflags += [ "-mtune=$arm_tune" ] } } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_nacl && !is_fuchsia && + if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd && !(is_chromeos_lacros && is_chromeos_device)) { cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] @@ -1524,7 +1531,7 @@ config("compiler_deterministic") { # different build directory like "out/feature_a" and "out/feature_b" if # we build same files with same compile flag. # Other paths are already given in relative, no need to normalize them. - if (is_nacl) { + if (is_nacl || is_bsd) { # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here. cflags += [ "-Xclang", @@ -1576,7 +1583,7 @@ config("compiler_deterministic") { } config("clang_revision") { - if (is_clang && clang_base_path == default_clang_base_path) { + if (is_clang && !is_bsd && clang_base_path == default_clang_base_path) { update_args = [ "--print-revision", "--verify-version=$clang_version", -@@ -1874,12 +1881,9 @@ config("default_warnings") { +@@ -1877,12 +1884,9 @@ config("default_warnings") { # TODO(crbug.com/1494809): Evaluate and possibly enable. "-Wno-vla-extension", - - # TODO(https://crbug.com/1490607): Fix and re-enable. - "-Wno-thread-safety-reference-return", ] - if (!is_nacl) { + if (!is_nacl && !is_bsd) { cflags_cc += [ # TODO(https://crbug.com/1513724): Fix and re-enable. "-Wno-c++11-narrowing-const-reference", -@@ -2067,7 +2071,7 @@ config("no_chromium_code") { +@@ -2100,7 +2104,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", -@@ -2596,7 +2600,7 @@ config("afdo_optimize_size") { +@@ -2619,7 +2623,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. -@@ -2623,7 +2627,7 @@ config("afdo") { +@@ -2646,7 +2650,7 @@ config("afdo") { cflags += [ "-Wno-backend-plugin" ] inputs = [ _clang_sample_profile ] } - } else if (auto_profile_path != "" && is_a_target_toolchain) { + } else if (auto_profile_path != "" && is_a_target_toolchain && !is_bsd) { cflags = [ "-fauto-profile=${auto_profile_path}" ] inputs = [ auto_profile_path ] } -@@ -2787,7 +2791,8 @@ config("symbols") { +@@ -2810,7 +2814,8 @@ config("symbols") { configs += [ "//build/config:compress_debug_sections" ] } - if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") { + if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos" && + !is_bsd) { if (is_apple) { # TODO(https://crbug.com/1050118): Investigate missing debug info on mac. # Make sure we don't use constructor homing on mac. diff --git a/www/chromium/files/patch-build_config_rust.gni b/www/chromium/files/patch-build_config_rust.gni new file mode 100644 index 000000000000..e768d0f5ec92 --- /dev/null +++ b/www/chromium/files/patch-build_config_rust.gni @@ -0,0 +1,13 @@ +--- build/config/rust.gni.orig 2024-03-22 08:19:40 UTC ++++ build/config/rust.gni +@@ -280,6 +280,10 @@ if (is_linux || is_chromeos) { + } + } + ++if (is_bsd) { ++ rust_abi_target = string_replace(rust_abi_target, "linux-gnu", current_os) ++} ++ + assert(!toolchain_has_rust || rust_abi_target != "") + + # This variable is passed to the Rust libstd build. diff --git a/www/chromium/files/patch-build_rust_std_BUILD.gn b/www/chromium/files/patch-build_rust_std_BUILD.gn new file mode 100644 index 000000000000..0ca959a13e47 --- /dev/null +++ b/www/chromium/files/patch-build_rust_std_BUILD.gn @@ -0,0 +1,10 @@ +--- build/rust/std/BUILD.gn.orig 2024-03-22 08:19:40 UTC ++++ build/rust/std/BUILD.gn +@@ -90,7 +90,6 @@ if (toolchain_has_rust) { + # don't need to pass to the C++ linker because they're used for specialized + # purposes. + skip_stdlib_files = [ +- "profiler_builtins", + "rustc_std_workspace_alloc", + "rustc_std_workspace_core", + "rustc_std_workspace_std", diff --git a/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni b/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni index af3f3d4a3638..f017ad1a10fd 100644 --- a/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni +++ b/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni @@ -1,44 +1,44 @@ ---- build/toolchain/gcc_toolchain.gni.orig 2024-02-23 21:04:38 UTC +--- build/toolchain/gcc_toolchain.gni.orig 2024-03-22 08:19:40 UTC +++ build/toolchain/gcc_toolchain.gni -@@ -53,6 +53,13 @@ if (enable_resource_allowlist_generation) { +@@ -57,6 +57,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). # -@@ -886,22 +893,12 @@ template("gcc_toolchain") { +@@ -890,22 +897,12 @@ template("gcc_toolchain") { # use_gold too. template("clang_toolchain") { gcc_toolchain(target_name) { - _path = "$clang_base_path/bin" - _is_path_absolute = get_path_info(_path, "abspath") == _path - - # Preserve absolute paths for tools like distcc. - if (_is_path_absolute && filter_include([ _path ], [ "//*" ]) == []) { - prefix = _path - } else { - prefix = rebase_path(_path, root_build_dir) - } - - cc = "${prefix}/clang" - cxx = "${prefix}/clang++" + cc = "cc" + cxx = "c++" ld = cxx - readelf = "${prefix}/llvm-readelf" - ar = "${prefix}/llvm-ar" - nm = "${prefix}/llvm-nm" + readelf = "readelf" + ar = "ar" + nm = "nm" forward_variables_from(invoker, "*", [ "toolchain_args" ]) diff --git a/www/chromium/files/patch-build_toolchain_toolchain.gni b/www/chromium/files/patch-build_toolchain_toolchain.gni index a19575c60080..d4db1261df78 100644 --- a/www/chromium/files/patch-build_toolchain_toolchain.gni +++ b/www/chromium/files/patch-build_toolchain_toolchain.gni @@ -1,11 +1,11 @@ ---- build/toolchain/toolchain.gni.orig 2023-11-03 10:09:45 UTC +--- build/toolchain/toolchain.gni.orig 2024-03-22 08:19:40 UTC +++ build/toolchain/toolchain.gni -@@ -72,7 +72,7 @@ if (host_os == "mac") { +@@ -68,7 +68,7 @@ if (host_os == "mac") { host_shlib_extension = ".dylib" } else if (host_os == "win") { host_shlib_extension = ".dll" -} else if (host_os == "linux" || host_os == "aix") { +} else if (is_posix) { host_shlib_extension = ".so" } else { assert(false, "Host platform not supported") diff --git a/www/chromium/files/patch-cc_BUILD.gn b/www/chromium/files/patch-cc_BUILD.gn index a0a5a073d9e4..da4ebe4e15cf 100644 --- a/www/chromium/files/patch-cc_BUILD.gn +++ b/www/chromium/files/patch-cc_BUILD.gn @@ -1,19 +1,19 @@ ---- cc/BUILD.gn.orig 2024-02-23 21:04:38 UTC +--- cc/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ cc/BUILD.gn @@ -678,7 +678,7 @@ cc_test_static_library("test_support") { if (enable_vulkan) { deps += [ "//gpu/vulkan/init" ] } - if (!is_android) { + if (!is_android && !is_bsd) { data_deps = [ "//third_party/mesa_headers" ] } if (skia_use_dawn) { -@@ -938,7 +938,6 @@ cc_test("cc_unittests") { +@@ -937,7 +937,6 @@ cc_test("cc_unittests") { data = [ "//components/test/data/viz/" ] data_deps = [ "//testing/buildbot/filters:cc_unittests_filters", - "//third_party/mesa_headers", ] if (is_android && enable_chrome_android_internal) { diff --git a/www/chromium/files/patch-chrome_app_chrome__main.cc b/www/chromium/files/patch-chrome_app_chrome__main.cc index efec1e81b8bc..cb1edb8de3a8 100644 --- a/www/chromium/files/patch-chrome_app_chrome__main.cc +++ b/www/chromium/files/patch-chrome_app_chrome__main.cc @@ -1,43 +1,43 @@ ---- chrome/app/chrome_main.cc.orig 2024-01-30 07:53:34 UTC +--- chrome/app/chrome_main.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/app/chrome_main.cc -@@ -29,11 +29,11 @@ - #include "chrome/app/notification_metrics.h" +@@ -28,11 +28,11 @@ + #include "chrome/app/chrome_main_mac.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/base_switches.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/app/chrome_main_linux.h" #endif -@@ -81,7 +81,7 @@ int ChromeMain(int argc, const char** argv) { +@@ -80,7 +80,7 @@ int ChromeMain(int argc, const char** argv) { #error Unknown platform. #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) PossiblyDetermineFallbackChromeChannel(argv[0]); #endif -@@ -142,7 +142,7 @@ int ChromeMain(int argc, const char** argv) { +@@ -141,7 +141,7 @@ int ChromeMain(int argc, const char** argv) { SetUpBundleOverrides(); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) AppendExtraArgumentsToCommandLine(command_line); #endif -@@ -171,7 +171,7 @@ int ChromeMain(int argc, const char** argv) { +@@ -170,7 +170,7 @@ int ChromeMain(int argc, const char** argv) { headless_mode_handle = headless::InitHeadlessMode(); } else { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (headless::IsOldHeadlessMode()) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) command_line->AppendSwitch(::headless::switches::kEnableCrashReporter); diff --git a/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc b/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc index dbba685eec9f..727361306922 100644 --- a/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc +++ b/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc @@ -1,112 +1,130 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/app/chrome_main_delegate.cc @@ -146,7 +146,7 @@ #include "components/about_ui/credit_utils.h" #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) #include "components/nacl/common/nacl_paths.h" #include "components/nacl/zygote/nacl_fork_delegate_linux.h" #endif -@@ -190,16 +190,16 @@ +@@ -188,16 +188,16 @@ #include "v8/include/v8.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/environment.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "base/message_loop/message_pump_libevent.h" #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/policy_path_parser.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -339,7 +339,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -337,7 +337,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 -@@ -424,7 +424,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -422,7 +422,7 @@ bool HandleVersionSwitches(const base::CommandLine& co // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Show the man page if --help or -h is on the command line. void HandleHelpSwitches(const base::CommandLine& command_line) { if (command_line.HasSwitch(switches::kHelp) || -@@ -638,7 +638,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -481,7 +481,7 @@ void AddFeatureFlagsToCommandLine( + } + #endif // BUILDFLAG(IS_CHROMEOS_LACROS) + +-#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) ++#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) + void SIGTERMProfilingShutdown(int signal) { + content::Profiling::Stop(); + struct sigaction sigact; +@@ -636,7 +636,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. -@@ -765,7 +765,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat +@@ -763,7 +763,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::GetCommon().RecordStartupProcessCreationTime( -@@ -1138,7 +1138,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv +@@ -1116,7 +1116,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv + + const bool emit_crashes = + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + chrome::GetChannel() == version_info::Channel::CANARY || + chrome::GetChannel() == version_info::Channel::DEV; + #else +@@ -1130,7 +1130,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv base::InitializeCpuReductionExperiment(); base::sequence_manager::internal::SequenceManagerImpl::InitializeFeatures(); base::sequence_manager::internal::ThreadController::InitializeFeatures(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::MessagePumpLibevent::InitializeFeatures(); #elif BUILDFLAG(IS_MAC) base::PlatformThread::InitFeaturesPostFieldTrial(); -@@ -1290,7 +1290,7 @@ std::optional ChromeMainDelegate::BasicStartupCom +@@ -1276,7 +1276,7 @@ std::optional ChromeMainDelegate::BasicStartupCom // 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 -@@ -1320,7 +1320,7 @@ std::optional ChromeMainDelegate::BasicStartupCom +@@ -1306,7 +1306,7 @@ std::optional ChromeMainDelegate::BasicStartupCom #if BUILDFLAG(IS_CHROMEOS) chromeos::dbus_paths::RegisterPathProvider(); #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) nacl::RegisterPathProvider(); #endif -@@ -1717,7 +1717,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1703,7 +1703,7 @@ void ChromeMainDelegate::PreSandboxStartup() { CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; } -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess) { if (command_line.HasSwitch(switches::kPreCrashpadCrashTest)) { -@@ -1826,7 +1826,7 @@ absl::variant Chrome +@@ -1804,7 +1804,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/chromium/files/patch-chrome_browser_BUILD.gn b/www/chromium/files/patch-chrome_browser_BUILD.gn index ea6d564f86af..f4492fc34a87 100644 --- a/www/chromium/files/patch-chrome_browser_BUILD.gn +++ b/www/chromium/files/patch-chrome_browser_BUILD.gn @@ -1,16 +1,16 @@ ---- chrome/browser/BUILD.gn.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/BUILD.gn -@@ -6477,6 +6477,13 @@ static_library("browser") { +@@ -6513,6 +6513,13 @@ static_library("browser") { } } + if (is_bsd) { + sources -= [ + "metrics/bluetooth_metrics_provider.cc", + "metrics/bluetooth_metrics_provider.h", + ] + } + if (is_linux && use_dbus) { sources += [ "dbus_memory_pressure_evaluator_linux.cc", diff --git a/www/chromium/files/patch-chrome_browser_about__flags.cc b/www/chromium/files/patch-chrome_browser_about__flags.cc index e69fa0922aff..96f04be1859c 100644 --- a/www/chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/chromium/files/patch-chrome_browser_about__flags.cc @@ -1,209 +1,218 @@ ---- chrome/browser/about_flags.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/about_flags.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/about_flags.cc @@ -234,7 +234,7 @@ #include "ui/ui_features.h" #include "url/url_features.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/allocator/buildflags.h" #endif -@@ -327,7 +327,7 @@ +@@ -326,7 +326,7 @@ #include "device/vr/public/cpp/features.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -@@ -336,7 +336,7 @@ +@@ -335,7 +335,7 @@ #include "chrome/browser/win/titlebar_config.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/profile_management/profile_management_features.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -493,7 +493,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap +@@ -492,7 +492,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap {"Max 3 Frames", &kDXGIWaitableSwapChain3Frames, 1, nullptr}}; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const FeatureEntry::Choice kOzonePlatformHintRuntimeChoices[] = { {flag_descriptions::kOzonePlatformHintChoiceDefault, "", ""}, {flag_descriptions::kOzonePlatformHintChoiceAuto, -@@ -1389,7 +1389,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 +@@ -1374,7 +1374,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 nullptr}}; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kShortcutBoostSingleUrl[] = { {"ShortcutBoostSearchScore", "0"}, {"ShortcutBoostNonTopHitThreshold", "0"}, -@@ -3749,7 +3749,7 @@ const flags_ui::FeatureEntry::FeatureVariation +@@ -3687,7 +3687,7 @@ const flags_ui::FeatureEntry::FeatureVariation std::size(kParcelTrackingTestDataOutForDelivery), nullptr}, }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const flags_ui::FeatureEntry::FeatureParam kDesktopPWAsLinkCapturingDefaultOn[] = {{"on_by_default", "true"}}; const flags_ui::FeatureEntry::FeatureParam -@@ -4506,7 +4506,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4425,7 +4425,7 @@ const FeatureEntry kFeatureEntries[] = { }, #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { "fluent-overlay-scrollbars", flag_descriptions::kFluentOverlayScrollbarsName, -@@ -5063,7 +5063,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4864,7 +4864,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(features::kWebAppUniversalInstall)}, + #endif // !BUILDFLAG(IS_ANDROID) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + {"shortcuts-not-apps", flag_descriptions::kShortcutsNotAppsName, + flag_descriptions::kShortcutsNotAppsDescription, + kOsMac | kOsWin | kOsLinux | kOsFuchsia, +@@ -4993,7 +4993,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWebShare)}, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"pulseaudio-loopback-for-cast", flag_descriptions::kPulseaudioLoopbackForCastName, flag_descriptions::kPulseaudioLoopbackForCastDescription, kOsLinux, -@@ -5079,7 +5079,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5009,7 +5009,7 @@ const FeatureEntry kFeatureEntries[] = { MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"skip-undecryptable-passwords", flag_descriptions::kSkipUndecryptablePasswordsName, flag_descriptions::kSkipUndecryptablePasswordsDescription, -@@ -5367,7 +5367,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5292,7 +5292,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(feed::kRefreshFeedOnRestart)}, #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"following-feed-sidepanel", flag_descriptions::kFollowingFeedSidepanelName, flag_descriptions::kFollowingFeedSidepanelDescription, kOsDesktop, FEATURE_VALUE_TYPE(feed::kWebUiFeed)}, -@@ -6011,7 +6011,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5943,7 +5943,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"omnibox-actions-ui-simplification", flag_descriptions::kOmniboxActionsUISimplificationName, flag_descriptions::kOmniboxActionsUISimplificationDescription, kOsDesktop, -@@ -6836,7 +6836,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6800,7 +6800,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kParallelDownloadingDescription, kOsAll, FEATURE_VALUE_TYPE(download::features::kParallelDownloading)}, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"enable-async-dns", flag_descriptions::kAsyncDnsName, flag_descriptions::kAsyncDnsDescription, kOsWin | kOsLinux, - FEATURE_VALUE_TYPE(features::kAsyncDns)}, -@@ -7817,7 +7817,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(net::features::kAsyncDns)}, +@@ -7778,7 +7778,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(ash::features::kPrivacyIndicators)}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"enable-network-service-sandbox", flag_descriptions::kEnableNetworkServiceSandboxName, flag_descriptions::kEnableNetworkServiceSandboxDescription, -@@ -7850,7 +7850,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7811,7 +7811,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE( supervised_user::kFilterWebsitesForSupervisedUsersOnDesktopAndIOS)}, -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"enable-family-link-extensions-permissions", flag_descriptions:: kEnableExtensionsPermissionsForSupervisedUsersOnDesktopName, -@@ -8478,7 +8478,7 @@ const FeatureEntry kFeatureEntries[] = { - #endif - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - {"quick-commands", flag_descriptions::kQuickCommandsName, - flag_descriptions::kQuickCommandsDescription, kOsDesktop, - FEATURE_VALUE_TYPE(features::kQuickCommands)}, -@@ -8738,7 +8738,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8709,7 +8709,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(ash::features::kWallpaperPerDesk)}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"enable-get-all-screens-media", flag_descriptions::kGetAllScreensMediaName, flag_descriptions::kGetAllScreensMediaDescription, kOsCrOS | kOsLacros | kOsLinux, -@@ -8780,7 +8780,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8751,7 +8751,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, -@@ -9065,7 +9065,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9040,7 +9040,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) {"policy-indication-for-managed-default-search", flag_descriptions::kPolicyIndicationForManagedDefaultSearchName, flag_descriptions::kPolicyIndicationForManagedDefaultSearchDescription, -@@ -9365,7 +9365,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9344,7 +9344,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - {"document-picture-in-picture-api", - flag_descriptions::kDocumentPictureInPictureApiName, - flag_descriptions::kDocumentPictureInPictureApiDescription, -@@ -10432,7 +10432,7 @@ const FeatureEntry kFeatureEntries[] = { + {"media-session-enter-picture-in-picture", + flag_descriptions::kMediaSessionEnterPictureInPictureName, + flag_descriptions::kMediaSessionEnterPictureInPictureDescription, +@@ -10334,7 +10334,7 @@ const FeatureEntry kFeatureEntries[] = { kOsDesktop | kOsAndroid, FEATURE_VALUE_TYPE(features::kProcessPerSiteUpToMainFrameThreshold)}, -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"camera-mic-effects", flag_descriptions::kCameraMicEffectsName, flag_descriptions::kCameraMicEffectsDescription, static_cast(kOsMac | kOsWin | kOsLinux), -@@ -10463,7 +10463,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10365,7 +10365,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kSiteInstanceGroupsForDataUrls)}, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"site-search-settings-policy", flag_descriptions::kSiteSearchSettingsPolicyName, flag_descriptions::kSiteSearchSettingsPolicyDescription, kOsAll, -@@ -10593,7 +10593,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10495,7 +10495,7 @@ const FeatureEntry kFeatureEntries[] = { password_manager::features::kFillingAcrossAffiliatedWebsitesAndroid)}, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"third-party-profile-management", flag_descriptions::kThirdPartyProfileManagementName, flag_descriptions::kThirdPartyProfileManagementDescription, -@@ -10945,7 +10945,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10838,7 +10838,7 @@ const FeatureEntry kFeatureEntries[] = { trusted_vault::kTrustedVaultFrequentDegradedRecoverabilityPolling)}, #endif -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"restart-to-gain-access-to-keychain", flag_descriptions::kRestartToGainAccessToKeychainName, flag_descriptions::kRestartToGainAccessToKeychainDescription, +@@ -11092,7 +11092,7 @@ const FeatureEntry kFeatureEntries[] = { + + // Controls the view mode for (history) sync screen. + #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + {"minor-mode-restrictions-for-history-sync-opt-in", + flag_descriptions::kMinorModeRestrictionsForHistorySyncOptInName, + flag_descriptions::kMinorModeRestrictionsForHistorySyncOptInDescription, diff --git a/www/chromium/files/patch-chrome_browser_accessibility_pdf__ocr__controller.cc b/www/chromium/files/patch-chrome_browser_accessibility_pdf__ocr__controller.cc index 10a5a2dc3c55..568fbf176797 100644 --- a/www/chromium/files/patch-chrome_browser_accessibility_pdf__ocr__controller.cc +++ b/www/chromium/files/patch-chrome_browser_accessibility_pdf__ocr__controller.cc @@ -1,11 +1,11 @@ ---- chrome/browser/accessibility/pdf_ocr_controller.cc.orig 2024-01-30 07:53:34 UTC +--- chrome/browser/accessibility/pdf_ocr_controller.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/accessibility/pdf_ocr_controller.cc -@@ -86,7 +86,7 @@ void AnnounceToScreenReader(const int message_id) { +@@ -111,7 +111,7 @@ void AnnounceToScreenReader(const int message_id) { // TODO(crbug.com/1442928): Sending announcements results in a failure in // `AuraLinuxAccessibilityInProcessBrowserTest::IndexInParentWithModal` and // flaky fail when running Chrome. -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) const Browser* browser = BrowserList::GetInstance()->GetLastActive(); if (!browser) { VLOG(2) << "Browser is not ready to announce"; diff --git a/www/chromium/files/patch-chrome_browser_after__startup__task__utils.cc b/www/chromium/files/patch-chrome_browser_after__startup__task__utils.cc index ef6940d77ab3..2c5887ba8034 100644 --- a/www/chromium/files/patch-chrome_browser_after__startup__task__utils.cc +++ b/www/chromium/files/patch-chrome_browser_after__startup__task__utils.cc @@ -1,11 +1,11 @@ ---- chrome/browser/after_startup_task_utils.cc.orig 2022-08-31 12:19:35 UTC +--- chrome/browser/after_startup_task_utils.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/after_startup_task_utils.cc -@@ -107,7 +107,7 @@ void SetBrowserStartupIsComplete() { - TRACE_EVENT0("startup", "SetBrowserStartupIsComplete"); - g_startup_complete_flag.Get().Set(); +@@ -115,7 +115,7 @@ void SetBrowserStartupIsComplete() { + TRACE_EVENT_SCOPE_GLOBAL, "BrowserCount", browser_count); + GetStartupCompleteFlag().Set(); #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Process::Current().CreationTime() is not available on all platforms. const base::Time process_creation_time = base::Process::Current().CreationTime(); diff --git a/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc b/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc index 00caea43beba..69e31dfd8fd9 100644 --- a/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc +++ b/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/background/background_mode_manager.cc.orig 2023-12-10 06:10:27 UTC +--- chrome/browser/background/background_mode_manager.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/background/background_mode_manager.cc -@@ -869,7 +869,7 @@ gfx::ImageSkia GetStatusTrayIcon() { +@@ -870,7 +870,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/chromium/files/patch-chrome_browser_background_background__mode__optimizer.cc b/www/chromium/files/patch-chrome_browser_background_background__mode__optimizer.cc index 67fdcc4ecaef..61cf1ecf80b2 100644 --- a/www/chromium/files/patch-chrome_browser_background_background__mode__optimizer.cc +++ b/www/chromium/files/patch-chrome_browser_background_background__mode__optimizer.cc @@ -1,11 +1,11 @@ ---- chrome/browser/background/background_mode_optimizer.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/background/background_mode_optimizer.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/background/background_mode_optimizer.cc @@ -31,7 +31,7 @@ std::unique_ptr BackgroundMod return nullptr; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kBackgroundModeAllowRestart)) { + // Private ctor. return base::WrapUnique(new BackgroundModeOptimizer()); - } diff --git a/www/chromium/files/patch-chrome_browser_browser__features.cc b/www/chromium/files/patch-chrome_browser_browser__features.cc index 5e36cefd73f0..72a1717a15fe 100644 --- a/www/chromium/files/patch-chrome_browser_browser__features.cc +++ b/www/chromium/files/patch-chrome_browser_browser__features.cc @@ -1,20 +1,20 @@ ---- chrome/browser/browser_features.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/browser_features.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/browser_features.cc -@@ -28,7 +28,7 @@ BASE_FEATURE(kClosedTabCache, +@@ -44,7 +44,7 @@ const base::FeatureParam kSpareRendererWarmupDel BASE_FEATURE(kDestroyProfileOnBrowserClose, "DestroyProfileOnBrowserClose", #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); -@@ -302,7 +302,7 @@ BASE_FEATURE(kNewTabPageTriggerForPrerender2, +@@ -328,7 +328,7 @@ BASE_FEATURE(kNewTabPageTriggerForPrerender2, BASE_FEATURE(kSupportSearchSuggestionForPrerender2, "SupportSearchSuggestionForPrerender2", #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/www/chromium/files/patch-chrome_browser_browser__process__impl.cc b/www/chromium/files/patch-chrome_browser_browser__process__impl.cc index cc4312205cef..bb269b3a46a0 100644 --- a/www/chromium/files/patch-chrome_browser_browser__process__impl.cc +++ b/www/chromium/files/patch-chrome_browser_browser__process__impl.cc @@ -1,29 +1,29 @@ ---- chrome/browser/browser_process_impl.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/browser_process_impl.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/browser_process_impl.cc -@@ -219,7 +219,7 @@ - #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" +@@ -220,7 +220,7 @@ + #include "chrome/browser/ui/profiles/profile_picker.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/error_reporting/chrome_js_error_report_processor.h" // nogncheck #endif -@@ -1232,7 +1232,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1253,7 +1253,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 -@@ -1511,7 +1511,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1533,7 +1533,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/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc b/www/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc index be368aeca89c..365d00375830 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc +++ b/www/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc @@ -1,81 +1,81 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/chrome_browser_interface_binders.cc @@ -128,13 +128,13 @@ #endif // BUILDFLAG(FULL_SAFE_BROWSING) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/connectors_internals/connectors_internals.mojom.h" #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/app_settings/web_app_settings_ui.h" #include "ui/webui/resources/cr_components/app_management/app_management.mojom.h" #endif @@ -222,7 +222,7 @@ #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/companion/visual_query/visual_query_suggestions_service_factory.h" #include "chrome/browser/ui/web_applications/sub_apps_service_impl.h" #include "chrome/browser/ui/webui/discards/discards.mojom.h" -@@ -829,7 +829,7 @@ void BindScreen2xMainContentExtractor( +@@ -831,7 +831,7 @@ void BindScreen2xMainContentExtractor( #endif #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) void BindVisualSuggestionsModelProvider( content::RenderFrameHost* frame_host, mojo::PendingReceiver< -@@ -1025,7 +1025,7 @@ void PopulateChromeFrameBinders( +@@ -1027,7 +1027,7 @@ void PopulateChromeFrameBinders( #endif // BUILDFLAG(ENABLE_SPEECH_SERVICE) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!render_frame_host->GetParent()) { map->Add( base::BindRepeating(&DraggableRegionsHostImpl::CreateIfAllowed)); -@@ -1033,7 +1033,7 @@ void PopulateChromeFrameBinders( +@@ -1035,7 +1035,7 @@ void PopulateChromeFrameBinders( #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(blink::features::kDesktopPWAsSubApps) && !render_frame_host->GetParentOrOuterDocument()) { // The service binder will reject non-primary main frames, but we still need -@@ -1120,7 +1120,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1122,7 +1122,7 @@ void PopulateChromeWebUIFrameBinders( commerce::CommerceInternalsUI>(map); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< connectors_internals::mojom::PageHandler, enterprise_connectors::ConnectorsInternalsUI>(map); -@@ -1132,7 +1132,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1134,7 +1134,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 -@@ -1676,7 +1676,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1687,7 +1687,7 @@ void PopulateChromeWebUIFrameBinders( #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder(map); diff --git a/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc b/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc index bef392ca91e3..7c5fdd12c30f 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc +++ b/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc @@ -1,104 +1,104 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -245,11 +245,11 @@ +@@ -246,11 +246,11 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/first_run/upgrade_util_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/core/app/crashpad.h" #endif -@@ -282,14 +282,14 @@ +@@ -283,14 +283,14 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" #include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h" #include "chrome/browser/profiles/profile_activity_metrics_recorder.h" #include "ui/base/pointer/touch_ui_controller.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/headless/headless_mode_metrics.h" // nogncheck #include "chrome/browser/headless/headless_mode_util.h" // nogncheck #include "components/headless/select_file_dialog/headless_select_file_dialog.h" -@@ -351,14 +351,14 @@ +@@ -352,14 +352,14 @@ #endif // BUILDFLAG(IS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER) #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "sql/database.h" #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) namespace { #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) constexpr base::FilePath::CharType kMediaHistoryDatabaseName[] = FILE_PATH_LITERAL("Media History"); -@@ -1068,7 +1068,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1073,7 +1073,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { browser_creator_->AddFirstRunTabs(master_prefs_->new_tabs); } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Create directory for user-level Native Messaging manifest files. This // makes it less likely that the directory will be created by third-party // software with incorrect owner or permission. See crbug.com/725513 . -@@ -1124,7 +1124,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1121,7 +1121,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::Initialize(); TouchModeStatsTracker::Initialize( -@@ -1323,7 +1323,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1320,7 +1320,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Delete the media history database if it still exists. // TODO(crbug.com/1198344): Remove this. base::ThreadPool::PostTask( -@@ -1372,7 +1372,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1369,7 +1369,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* *UrlLanguageHistogramFactory::GetForBrowserContext(profile)); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode()) { headless::ReportHeadlessActionMetrics(); } -@@ -1480,7 +1480,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( +@@ -1477,7 +1477,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( // In headless mode provide alternate SelectFileDialog factory overriding // any platform specific SelectFileDialog implementation that may have been // set. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode()) { headless::HeadlessSelectFileDialogFactory::SetUp(); } -@@ -2011,7 +2011,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat +@@ -2016,7 +2016,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat // Drop the request if headless mode is in effect or the request is from // a headless Chrome process. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode() || command_line.HasSwitch(switches::kHeadless)) { return false; diff --git a/www/chromium/files/patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc b/www/chromium/files/patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc new file mode 100644 index 000000000000..abf384ae9558 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_chrome__browser__main__extra__parts__ozone.cc @@ -0,0 +1,11 @@ +--- chrome/browser/chrome_browser_main_extra_parts_ozone.cc.orig 2024-03-22 08:19:40 UTC ++++ chrome/browser/chrome_browser_main_extra_parts_ozone.cc +@@ -31,7 +31,7 @@ void ChromeBrowserMainExtraPartsOzone::PostCreateMainM + } + + void ChromeBrowserMainExtraPartsOzone::PostMainMessageLoopRun() { +-#if !BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + // Lacros's `PostMainMessageLoopRun` must be called at the very end of + // `PostMainMessageLoopRun` in + // `ChromeBrowserMainPartsLacros::PostMainMessageLoopRun`. diff --git a/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc b/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc index a8ef5a332af8..c341ed44a5cd 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc +++ b/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc @@ -1,21 +1,39 @@ ---- chrome/browser/chrome_browser_main_linux.cc.orig 2023-12-10 06:10:27 UTC +--- chrome/browser/chrome_browser_main_linux.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/chrome_browser_main_linux.cc -@@ -67,7 +67,9 @@ void ChromeBrowserMainPartsLinux::PostCreateMainMessag +@@ -24,7 +24,7 @@ + #include "device/bluetooth/dbus/bluez_dbus_thread_manager.h" + #include "ui/base/l10n/l10n_util.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/ozone/public/ozone_platform.h" + #endif + +@@ -71,7 +71,9 @@ void ChromeBrowserMainPartsLinux::PostCreateMainMessag #endif // BUILDFLAG(IS_CHROMEOS) #if !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_BSD) bluez::BluezDBusManager::Initialize(nullptr /* system_bus */); +#endif // Set up crypt config. This needs to be done before anything starts the // network service, as the raw encryption key needs to be shared with the -@@ -124,7 +126,7 @@ void ChromeBrowserMainPartsLinux::PostBrowserStart() { +@@ -96,7 +98,7 @@ void ChromeBrowserMainPartsLinux::PostCreateMainMessag + ChromeBrowserMainPartsPosix::PostCreateMainMessageLoop(); + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void ChromeBrowserMainPartsLinux::PostMainMessageLoopRun() { + ChromeBrowserMainPartsPosix::PostMainMessageLoopRun(); + ui::OzonePlatform::GetInstance()->PostMainMessageLoopRun(); +@@ -135,7 +137,7 @@ void ChromeBrowserMainPartsLinux::PostBrowserStart() { #endif // defined(USE_DBUS) && !BUILDFLAG(IS_CHROMEOS) void ChromeBrowserMainPartsLinux::PostDestroyThreads() { -#if BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // No-op; per PostBrowserStart() comment, this is done elsewhere. #else bluez::BluezDBusManager::Shutdown(); diff --git a/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.h b/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.h new file mode 100644 index 000000000000..ae75c65d03cb --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.h @@ -0,0 +1,11 @@ +--- chrome/browser/chrome_browser_main_linux.h.orig 2024-03-22 08:19:40 UTC ++++ chrome/browser/chrome_browser_main_linux.h +@@ -30,7 +30,7 @@ class ChromeBrowserMainPartsLinux : public ChromeBrows + + // ChromeBrowserMainPartsPosix overrides. + void PostCreateMainMessageLoop() override; +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void PostMainMessageLoopRun() override; + #endif + void PreProfileInit() override; diff --git a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc index c7b5ce24abc2..bef1c8951e4d 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc +++ b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc @@ -1,160 +1,160 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -456,7 +456,7 @@ +@@ -457,7 +457,7 @@ #include "storage/browser/file_system/external_mount_points.h" // 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) #include "chrome/browser/chrome_browser_main_linux.h" #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" #elif BUILDFLAG(IS_ANDROID) -@@ -559,12 +559,12 @@ +@@ -565,12 +565,12 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/core/app/crash_switches.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -575,14 +575,14 @@ +@@ -581,14 +581,14 @@ #include "chrome/browser/apps/link_capturing/web_app_link_capturing_delegate.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.h" #include "chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.h" #include "chrome/browser/ui/webui/app_settings/web_app_settings_navigation_throttle.h" #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -598,7 +598,7 @@ +@@ -604,7 +604,7 @@ #include "components/lens/lens_features.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_extra_parts_linux.h" #elif BUILDFLAG(IS_OZONE) #include "chrome/browser/chrome_browser_main_extra_parts_ozone.h" -@@ -1457,7 +1457,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre +@@ -1467,7 +1467,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre #if BUILDFLAG(IS_CHROMEOS) registry->RegisterBooleanPref(prefs::kNativeClientForceAllowed, false); #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOutOfProcessSystemDnsResolutionEnabled, true); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) -@@ -1576,7 +1576,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1588,7 +1588,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo #elif BUILDFLAG(IS_CHROMEOS_LACROS) main_parts = std::make_unique( is_integration_test, &startup_data_); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) main_parts = std::make_unique( is_integration_test, &startup_data_); #elif BUILDFLAG(IS_ANDROID) -@@ -1613,7 +1613,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1625,7 +1625,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo std::make_unique()); // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) main_parts->AddParts( std::make_unique()); #else -@@ -1634,7 +1634,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1646,7 +1646,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo main_parts->AddParts(std::make_unique()); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) main_parts->AddParts(std::make_unique()); #elif BUILDFLAG(IS_OZONE) main_parts->AddParts(std::make_unique()); -@@ -1653,7 +1653,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1665,7 +1665,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo chrome::AddMetricsExtraParts(main_parts.get()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) main_parts->AddParts( std::make_unique< chrome::enterprise_util::ChromeBrowserMainExtraPartsEnterprise>()); -@@ -2485,6 +2485,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2502,7 +2502,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin + client_info->client_id); + } #elif BUILDFLAG(IS_POSIX) - #if BUILDFLAG(IS_ANDROID) - bool enable_crash_reporter = true; -+#elif BUILDFLAG(IS_BSD) -+ bool enable_crash_reporter = false; - #elif BUILDFLAG(IS_CHROMEOS) - bool enable_crash_reporter = false; - if (crash_reporter::IsCrashpadEnabled()) { -@@ -2826,7 +2828,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +-#if !BUILDFLAG(IS_ANDROID) ++#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) + pid_t pid; + if (crash_reporter::GetHandlerSocket(nullptr, &pid)) { + command_line->AppendSwitchASCII( +@@ -2823,7 +2823,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin ThreadProfilerConfiguration::Get()->AppendCommandLineSwitchForChildProcess( command_line); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && !BUILDFLAG(IS_BSD) // Opt into a hardened stack canary mitigation if it hasn't already been // force-disabled. if (!browser_command_line.HasSwitch(switches::kChangeStackGuardOnFork)) { -@@ -4478,7 +4480,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4506,7 +4506,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, -@@ -5037,7 +5039,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5065,7 +5065,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati &throttles); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) MaybeAddThrottle( WebAppSettingsNavigationThrottle::MaybeCreateThrottleFor(handle), &throttles); -@@ -5047,7 +5049,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5075,7 +5075,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) MaybeAddThrottle(enterprise_connectors::DeviceTrustNavigationThrottle:: MaybeCreateThrottleFor(handle), &throttles); -@@ -5086,7 +5088,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5114,7 +5114,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati handle)); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MaybeAddThrottle(browser_switcher::BrowserSwitcherNavigationThrottle:: MaybeCreateThrottleFor(handle), &throttles); -@@ -7033,7 +7035,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS +@@ -7083,7 +7083,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS bool ChromeContentBrowserClient::ShouldRunOutOfProcessSystemDnsResolution() { // This enterprise policy is supported on Android, but the feature will not be // launched there. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // This is possibly called before `g_browser_process` is initialized. PrefService* local_state; if (g_browser_process) { diff --git a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h index 0d7df7be5355..c02e6bef0b11 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h +++ b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_content_browser_client.h.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -489,7 +489,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -497,7 +497,7 @@ class ChromeContentBrowserClient : public content::Con bool IsPluginAllowedToUseDevChannelAPIs( content::BrowserContext* browser_context, const GURL& url) override; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, diff --git a/www/chromium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc b/www/chromium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc index 570e4b0e649c..e5050b8953ac 100644 --- a/www/chromium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc +++ b/www/chromium/files/patch-chrome_browser_component__updater_widevine__cdm__component__installer.cc @@ -1,29 +1,38 @@ ---- chrome/browser/component_updater/widevine_cdm_component_installer.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/component_updater/widevine_cdm_component_installer.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/component_updater/widevine_cdm_component_installer.cc -@@ -40,7 +40,7 @@ +@@ -41,7 +41,7 @@ #include "third_party/widevine/cdm/buildflags.h" #include "third_party/widevine/cdm/widevine_cdm_common.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "base/path_service.h" + #include "chrome/common/chrome_paths.h" #include "chrome/common/media/component_widevine_cdm_hint_file_linux.h" - #endif - -@@ -78,7 +78,7 @@ static_assert(std::size(kWidevineSha2Hash) == crypto:: +@@ -74,7 +74,7 @@ static_assert(std::size(kWidevineSha2Hash) == crypto:: const char ImageLoaderComponentName[] = "WidevineCdm"; #endif -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // On Linux and ChromeOS the Widevine CDM is loaded at startup before the // zygote is locked down. As a result there is no need to register the CDM // with Chrome as it can't be used until Chrome is restarted. -@@ -364,7 +364,7 @@ void WidevineCdmComponentInstallerPolicy::UpdateCdmPat +@@ -102,7 +102,7 @@ void RegisterWidevineCdmWithChrome(const base::Version + } + #endif // !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // On Linux and ChromeOS the Widevine CDM is loaded at startup before the + // zygote is locked down. To locate the Widevine CDM at startup, a hint file + // is used. Update the hint file with the new Widevine CDM path. +@@ -388,7 +388,7 @@ void WidevineCdmComponentInstallerPolicy::UpdateCdmPat return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) VLOG(1) << "Updating hint file with Widevine CDM " << cdm_version; // This is running on a thread that allows IO, so simply update the hint file. diff --git a/www/chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc b/www/chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc index 1c746bfd2d17..a86a512ef4ee 100644 --- a/www/chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc +++ b/www/chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc @@ -1,29 +1,29 @@ ---- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1661,7 +1661,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1674,7 +1674,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferredForFile( const base::FilePath& path) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) { return !download_prefs_->ShouldOpenPdfInSystemReader(); } -@@ -1780,7 +1780,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -1793,7 +1793,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()) { -@@ -1826,7 +1826,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl +@@ -1839,7 +1839,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl DCHECK(download_item->IsSavePackageDownload()); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) std::optional settings = safe_browsing::DeepScanningRequest::ShouldUploadBinary(download_item); diff --git a/www/chromium/files/patch-chrome_browser_download_download__item__model.cc b/www/chromium/files/patch-chrome_browser_download_download__item__model.cc index 6a61aa66b760..faf652ff1e66 100644 --- a/www/chromium/files/patch-chrome_browser_download_download__item__model.cc +++ b/www/chromium/files/patch-chrome_browser_download_download__item__model.cc @@ -1,29 +1,29 @@ ---- chrome/browser/download/download_item_model.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/download/download_item_model.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/download/download_item_model.cc @@ -747,7 +747,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(); @@ -793,7 +793,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); -@@ -1149,7 +1149,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1107,7 +1107,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (download_->GetOriginalMimeType() == "application/x-x509-user-cert") { SetShouldPreferOpeningInBrowser(true); return; diff --git a/www/chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc b/www/chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc index 5590377ae638..cdc383179c1f 100644 --- a/www/chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc +++ b/www/chromium/files/patch-chrome_browser_enterprise_connectors_reporting_browser__crash__event__router.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc.orig 2023-07-16 15:47:57 UTC +--- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.cc @@ -11,7 +11,7 @@ namespace enterprise_connectors { BrowserCrashEventRouter::BrowserCrashEventRouter( content::BrowserContext* context) { --#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_BSD) +-#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS) ++#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) CrashReportingContext* crash_reporting_context = CrashReportingContext::GetInstance(); Profile* profile = Profile::FromBrowserContext(context); @@ -21,7 +21,7 @@ BrowserCrashEventRouter::BrowserCrashEventRouter( } BrowserCrashEventRouter::~BrowserCrashEventRouter() { --#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_BSD) +-#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS) ++#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) CrashReportingContext* crash_reporting_context = CrashReportingContext::GetInstance(); crash_reporting_context->RemoveProfile(this); diff --git a/www/chromium/files/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc b/www/chromium/files/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc index 58f2b6d9fd47..89fffff10498 100644 --- a/www/chromium/files/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc +++ b/www/chromium/files/patch-chrome_browser_enterprise_connectors_reporting_crash__reporting__context.cc @@ -1,11 +1,11 @@ ---- chrome/browser/enterprise/connectors/reporting/crash_reporting_context.cc.orig 2023-04-05 11:05:06 UTC +--- chrome/browser/enterprise/connectors/reporting/crash_reporting_context.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/enterprise/connectors/reporting/crash_reporting_context.cc @@ -18,7 +18,7 @@ namespace enterprise_connectors { --#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) -+#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_BSD) +-#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS) ++#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) namespace { diff --git a/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn b/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn index c2f896012ec3..cfaa8014eaf6 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn +++ b/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn @@ -1,13 +1,13 @@ ---- chrome/browser/extensions/BUILD.gn.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1380,6 +1380,10 @@ static_library("extensions") { +@@ -1376,6 +1376,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/chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc b/www/chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc index 1b6af07ff2ae..0d1b0b53acb6 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -600,7 +600,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem +@@ -603,7 +603,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem } void PasswordsPrivateDelegateImpl::OsReauthTimeoutCall() { -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) PasswordsPrivateEventRouter* router = PasswordsPrivateEventRouterFactory::GetForProfile(profile_); if (router) { diff --git a/www/chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc b/www/chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc index 54ae28702f81..0493b49f6eba 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc @@ -1,13 +1,13 @@ ---- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2023-12-10 06:10:27 UTC +--- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc -@@ -279,7 +279,9 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor +@@ -281,7 +281,9 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor } else if (strcmp(os, "linux") == 0) { info->os = extensions::api::runtime::PlatformOs::kLinux; } else if (strcmp(os, "openbsd") == 0) { - info->os = extensions::api::runtime::PlatformOs::kOpenbsd; + info->os = extensions::api::runtime::PlatformOs::kLinux; + } else if (strcmp(os, "freebsd") == 0) { + info->os = extensions::api::runtime::PlatformOs::kLinux; } else if (strcmp(os, "fuchsia") == 0) { info->os = extensions::api::runtime::PlatformOs::kFuchsia; } else { diff --git a/www/chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc b/www/chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc index 89c3d5455b64..bb556f103d5e 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc +++ b/www/chromium/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 2024-01-30 07:53:34 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -196,7 +196,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -205,7 +205,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist (*s_allowlist)[::prefs::kSidePanelHorizontalAlignment] = settings_api::PrefType::kBoolean; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::kBoolean; #endif -@@ -205,7 +205,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -214,7 +214,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist // Appearance settings. (*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString; (*s_allowlist)[::prefs::kPolicyThemeColor] = settings_api::PrefType::kNumber; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kSystemTheme] = settings_api::PrefType::kNumber; #endif (*s_allowlist)[::prefs::kHomePage] = settings_api::PrefType::kUrl; diff --git a/www/chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc b/www/chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc index 50380b6a27ff..6851eace45b4 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_api_tabs_tabs__api.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/tabs/tabs_api.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/extensions/api/tabs/tabs_api.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/extensions/api/tabs/tabs_api.cc -@@ -836,7 +836,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio +@@ -889,7 +889,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio // minimized. // TODO(crbug.com/1410400): Remove this workaround when linux is fixed. // TODO(crbug.com/1410400): Find a fix for wayland as well. -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) if (new_window->initial_show_state() == ui::SHOW_STATE_MINIMIZED) { new_window->window()->Minimize(); } diff --git a/www/chromium/files/patch-chrome_browser_flag__descriptions.cc b/www/chromium/files/patch-chrome_browser_flag__descriptions.cc index c83088966134..10ffec41be84 100644 --- a/www/chromium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/chromium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,101 +1,92 @@ ---- chrome/browser/flag_descriptions.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/flag_descriptions.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/flag_descriptions.cc -@@ -2895,7 +2895,7 @@ const char kCbdTimeframeRequiredDescription[] = +@@ -2931,7 +2931,7 @@ const char kCbdTimeframeRequiredDescription[] = "value to the list."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) const char kPolicyIndicationForManagedDefaultSearchName[] = "Enable policy indication for managed Default Search provider"; const char kPolicyIndicationForManagedDefaultSearchDescription[] = -@@ -3213,7 +3213,7 @@ const char kSiteInstanceGroupsForDataUrlsDescription[] +@@ -3256,7 +3256,7 @@ const char kSiteInstanceGroupsForDataUrlsDescription[] "but in the same SiteInstanceGroup, and thus the same process."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kSiteSearchSettingsPolicyName[] = "Enable SiteSearchSettings policy"; const char kSiteSearchSettingsPolicyDescription[] = "Allow site search engines to be defined by the SiteSearchSettings policy."; -@@ -7387,7 +7387,7 @@ const char kLacrosMergeIcuDataFileDescription[] = +@@ -7485,7 +7485,7 @@ const char kLacrosMergeIcuDataFileDescription[] = "Enables sharing common areas of icudtl.dat between Ash and Lacros."; #endif // #if BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kGetAllScreensMediaName[] = "GetAllScreensMedia API"; const char kGetAllScreensMediaDescription[] = "When enabled, the getAllScreensMedia API for capturing multiple screens " -@@ -7633,7 +7633,7 @@ const char kV4L2FlatStatefulVideoDecoderDescription[] +@@ -7731,7 +7731,7 @@ const char kV4L2FlatStatefulVideoDecoderDescription[] // Linux ----------------------------------------------------------------------- -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kOzonePlatformHintChoiceDefault[] = "Default"; const char kOzonePlatformHintChoiceAuto[] = "Auto"; const char kOzonePlatformHintChoiceX11[] = "X11"; -@@ -7681,7 +7681,7 @@ const char kZeroCopyVideoCaptureDescription[] = +@@ -7779,7 +7779,7 @@ const char kZeroCopyVideoCaptureDescription[] = #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - const char kQuickCommandsName[] = "Quick Commands"; - const char kQuickCommandsDescription[] = - "Enable a text interface to browser features. Invoke with Ctrl-Space."; -@@ -7690,7 +7690,7 @@ const char kQuickCommandsDescription[] = - // BUILDFLAG(IS_FUCHSIA) - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kFollowingFeedSidepanelName[] = "Following feed in the sidepanel"; const char kFollowingFeedSidepanelDescription[] = "Enables the following feed in the sidepanel."; -@@ -7705,7 +7705,7 @@ const char kEnableProtoApiForClassifyUrlDescription[] +@@ -7794,7 +7794,7 @@ const char kEnableProtoApiForClassifyUrlDescription[] "instead of JSON."; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kEnableNetworkServiceSandboxName[] = "Enable the network service sandbox."; const char kEnableNetworkServiceSandboxDescription[] = -@@ -7737,7 +7737,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -7826,7 +7826,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti "Bluetooth"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kSkipUndecryptablePasswordsName[] = "Skip undecryptable passwords to use the available decryptable " "passwords."; -@@ -7757,7 +7757,7 @@ const char kRestartToGainAccessToKeychainDescription[] +@@ -7846,7 +7846,7 @@ const char kRestartToGainAccessToKeychainDescription[] "to restart Chrome to gain access to computer's password manager."; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kAsyncDnsName[] = "Async DNS resolver"; const char kAsyncDnsDescription[] = "Enables the built-in DNS resolver."; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -@@ -7858,7 +7858,7 @@ const char kElementCaptureDescription[] = +@@ -7947,7 +7947,7 @@ const char kElementCaptureDescription[] = #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."; -@@ -7910,7 +7910,7 @@ const char kComposeName[] = "CCO Edits"; - const char kComposeDescription[] = "Enables CCO editing feature"; +@@ -7996,7 +7996,7 @@ const char kComposeTextSelectionDescription[] = + "Enables feature for different heuristics for selecting text for Compose"; #endif // BUILDFLAG(ENABLE_COMPOSE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const char kThirdPartyProfileManagementName[] = "Third party profile management"; const char kThirdPartyProfileManagementDescription[] = diff --git a/www/chromium/files/patch-chrome_browser_flag__descriptions.h b/www/chromium/files/patch-chrome_browser_flag__descriptions.h index 0e1c8455992d..3da1325c2917 100644 --- a/www/chromium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/chromium/files/patch-chrome_browser_flag__descriptions.h @@ -1,107 +1,90 @@ ---- chrome/browser/flag_descriptions.h.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/flag_descriptions.h.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/flag_descriptions.h -@@ -1665,7 +1665,7 @@ extern const char kCbdTimeframeRequiredName[]; +@@ -1691,7 +1691,7 @@ extern const char kCbdTimeframeRequiredName[]; extern const char kCbdTimeframeRequiredDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) extern const char kPolicyIndicationForManagedDefaultSearchName[]; extern const char kPolicyIndicationForManagedDefaultSearchDescription[]; #endif -@@ -1847,7 +1847,7 @@ extern const char kSiteInstanceGroupsForDataUrlsName[] +@@ -1876,7 +1876,7 @@ extern const char kSiteInstanceGroupsForDataUrlsName[] extern const char kSiteInstanceGroupsForDataUrlsDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kSiteSearchSettingsPolicyName[]; extern const char kSiteSearchSettingsPolicyDescription[]; #endif -@@ -4242,7 +4242,7 @@ extern const char kLacrosMergeIcuDataFileName[]; +@@ -4302,7 +4302,7 @@ extern const char kLacrosMergeIcuDataFileName[]; extern const char kLacrosMergeIcuDataFileDescription[]; #endif // #if BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kGetAllScreensMediaName[]; extern const char kGetAllScreensMediaDescription[]; #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -4382,7 +4382,7 @@ extern const char kV4L2FlatStatefulVideoDecoderDescrip +@@ -4442,7 +4442,7 @@ extern const char kV4L2FlatStatefulVideoDecoderDescrip // Linux --------------------------------------------------------------------- -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kOzonePlatformHintChoiceDefault[]; extern const char kOzonePlatformHintChoiceAuto[]; extern const char kOzonePlatformHintChoiceX11[]; -@@ -4415,14 +4415,14 @@ extern const char kZeroCopyVideoCaptureDescription[]; - #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - extern const char kQuickCommandsName[]; - extern const char kQuickCommandsDescription[]; - - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - // defined (OS_FUCHSIA) - --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - extern const char kWebShareName[]; - extern const char kWebShareDescription[]; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -@@ -4432,7 +4432,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa +@@ -4484,7 +4484,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa extern const char kWebBluetoothConfirmPairingSupportDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kSkipUndecryptablePasswordsName[]; extern const char kSkipUndecryptablePasswordsDescription[]; -@@ -4443,13 +4443,13 @@ extern const char kRestartToGainAccessToKeychainName[] +@@ -4495,13 +4495,13 @@ extern const char kRestartToGainAccessToKeychainName[] extern const char kRestartToGainAccessToKeychainDescription[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kAsyncDnsName[]; extern const char kAsyncDnsDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kFollowingFeedSidepanelName[]; extern const char kFollowingFeedSidepanelDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -4460,7 +4460,7 @@ extern const char kEnableProtoApiForClassifyUrlName[]; +@@ -4512,7 +4512,7 @@ extern const char kEnableProtoApiForClassifyUrlName[]; extern const char kEnableProtoApiForClassifyUrlDescription[]; #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kEnableNetworkServiceSandboxName[]; extern const char kEnableNetworkServiceSandboxDescription[]; -@@ -4537,7 +4537,7 @@ extern const char kElementCaptureDescription[]; +@@ -4589,7 +4589,7 @@ extern const char kElementCaptureDescription[]; #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[]; -@@ -4573,7 +4573,7 @@ extern const char kComposeName[]; - extern const char kComposeDescription[]; +@@ -4623,7 +4623,7 @@ extern const char kComposeTextSelectionName[]; + extern const char kComposeTextSelectionDescription[]; #endif // BUILDFLAG(ENABLE_COMPOSE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kThirdPartyProfileManagementName[]; extern const char kThirdPartyProfileManagementDescription[]; diff --git a/www/chromium/files/patch-chrome_browser_headless_headless__mode__util.cc b/www/chromium/files/patch-chrome_browser_headless_headless__mode__util.cc index e80a7f933701..428d84fa1c0e 100644 --- a/www/chromium/files/patch-chrome_browser_headless_headless__mode__util.cc +++ b/www/chromium/files/patch-chrome_browser_headless_headless__mode__util.cc @@ -1,20 +1,20 @@ ---- chrome/browser/headless/headless_mode_util.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/headless/headless_mode_util.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/headless/headless_mode_util.cc -@@ -18,7 +18,7 @@ +@@ -19,7 +19,7 @@ #include "chrome/common/chrome_switches.h" #include "content/public/common/content_switches.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/gl/gl_switches.h" // nogncheck #include "ui/ozone/public/ozone_switches.h" // nogncheck #endif // BUILDFLAG(IS_LINUX) -@@ -86,7 +86,7 @@ class HeadlessModeHandleImpl : public HeadlessModeHand +@@ -87,7 +87,7 @@ class HeadlessModeHandleImpl : public HeadlessModeHand command_line->AppendSwitchPath(switches::kUserDataDir, GetUserDataDir()); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Headless mode on Linux relies on ozone/headless platform. command_line->AppendSwitchASCII(::switches::kOzonePlatform, switches::kHeadless); diff --git a/www/chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc b/www/chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc index dea62848186b..9c471316f9b7 100644 --- a/www/chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc +++ b/www/chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc @@ -1,92 +1,92 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -191,7 +191,7 @@ +@@ -193,7 +193,7 @@ #include "chrome/notification_helper/notification_helper_constants.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/metrics/motherboard_metrics_provider.h" #endif -@@ -208,7 +208,7 @@ +@@ -210,7 +210,7 @@ #include "chrome/browser/metrics/power/power_metrics_provider_mac.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/bluetooth_metrics_provider.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -581,7 +581,7 @@ void ChromeMetricsServiceClient::RegisterPrefs(PrefReg +@@ -586,7 +586,7 @@ void ChromeMetricsServiceClient::RegisterPrefs(PrefReg #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) metrics::structured::StructuredMetricsService::RegisterPrefs(registry); #if !BUILDFLAG(IS_CHROMEOS_ASH) -@@ -767,7 +767,7 @@ void ChromeMetricsServiceClient::Initialize() { +@@ -773,7 +773,7 @@ void ChromeMetricsServiceClient::Initialize() { RegisterUKMProviders(); } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) metrics::structured::Recorder::GetInstance()->SetUiTaskRunner( base::SequencedTaskRunner::GetCurrentDefault()); #endif -@@ -814,7 +814,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -820,7 +820,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic metrics_service_->RegisterMetricsProvider( std::make_unique()); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) metrics_service_->RegisterMetricsProvider( std::make_unique()); #endif -@@ -899,7 +899,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -905,7 +905,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) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) metrics_service_->RegisterMetricsProvider( std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || -@@ -1009,7 +1009,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -1015,7 +1015,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) -@@ -1174,7 +1174,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1180,7 +1180,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) // Begin initializing the structured metrics system. Initialization must wait // until a profile is added, because it reads keys stored within the user's // cryptohome. We only initialize for profiles that are valid candidates -@@ -1205,7 +1205,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1211,7 +1211,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) // This creates the DesktopProfileSessionDurationsServices if it didn't exist // already. metrics::DesktopProfileSessionDurationsServiceFactory::GetForBrowserContext( -@@ -1548,7 +1548,7 @@ void ChromeMetricsServiceClient::CreateStructuredMetri +@@ -1554,7 +1554,7 @@ void ChromeMetricsServiceClient::CreateStructuredMetri recorder = std::make_unique( cros_system_profile_provider_.get()); -#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Make sure that Structured Metrics recording delegates have been created // before the service is created. This is handled in other places for ChromeOS diff --git a/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.cc b/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.cc index d445f0c13404..1d3768c3e5a7 100644 --- a/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.cc +++ b/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.cc @@ -1,174 +1,174 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/net/system_network_context_manager.cc -@@ -92,7 +92,7 @@ +@@ -94,7 +94,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/branded_strings.h" #include "ui/base/l10n/l10n_util.h" -@@ -137,7 +137,7 @@ SystemNetworkContextManager* g_system_network_context_ +@@ -139,7 +139,7 @@ SystemNetworkContextManager* g_system_network_context_ // received a failed launch for a sandboxed network service. bool g_previously_failed_to_launch_sandboxed_service = false; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Whether kerberos library loading will work in the network service due to the // sandbox. bool g_network_service_will_allow_gssapi_library_load = false; -@@ -145,7 +145,7 @@ bool g_network_service_will_allow_gssapi_library_load +@@ -147,7 +147,7 @@ bool g_network_service_will_allow_gssapi_library_load const char* kGssapiDesiredPref = #if BUILDFLAG(IS_CHROMEOS) prefs::kKerberosEnabled; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) prefs::kReceivedHttpAuthNegotiateHeader; #endif #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -191,7 +191,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut +@@ -193,7 +193,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) -@@ -206,7 +206,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut +@@ -208,7 +208,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut local_state->GetString(prefs::kAuthAndroidNegotiateAccountType); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auth_dynamic_params->allow_gssapi_library_load = local_state->GetBoolean(kGssapiDesiredPref); #endif // BUILDFLAG(IS_CHROMEOS) -@@ -216,7 +216,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut +@@ -218,7 +218,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut void OnNewHttpAuthDynamicParams( network::mojom::HttpAuthDynamicParamsPtr& params) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The kerberos library is incompatible with the network service sandbox, so // if library loading is now enabled, the network service needs to be // restarted. It will be restarted unsandboxed because is -@@ -258,11 +258,11 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() +@@ -260,11 +260,11 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() if (g_previously_failed_to_launch_sandboxed_service) { return NetworkSandboxState::kDisabledBecauseOfFailedLaunch; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* local_state = g_browser_process->local_state(); #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The network service sandbox and the kerberos library are incompatible. // If kerberos is enabled by policy, disable the network service sandbox. if (g_network_service_will_allow_gssapi_library_load || -@@ -278,7 +278,7 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() +@@ -280,7 +280,7 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() } #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (local_state && local_state->HasPrefPath(prefs::kNetworkServiceSandboxEnabled)) { return local_state->GetBoolean(prefs::kNetworkServiceSandboxEnabled) -@@ -508,7 +508,7 @@ void SystemNetworkContextManager::DeleteInstance() { +@@ -510,7 +510,7 @@ void SystemNetworkContextManager::DeleteInstance() { g_system_network_context_manager = nullptr; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SystemNetworkContextManager::GssapiLibraryLoadObserver:: GssapiLibraryLoadObserver(SystemNetworkContextManager* owner) : owner_(owner) {} -@@ -566,7 +566,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -568,7 +568,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) -@@ -580,7 +580,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -582,7 +582,7 @@ SystemNetworkContextManager::SystemNetworkContextManag auth_pref_callback); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) pref_change_registrar_.Add(kGssapiDesiredPref, auth_pref_callback); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -606,7 +606,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -608,7 +608,7 @@ SystemNetworkContextManager::SystemNetworkContextManag #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) pref_change_registrar_.Add( prefs::kEnforceLocalAnchorConstraintsEnabled, base::BindRepeating(&SystemNetworkContextManager:: -@@ -661,7 +661,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -663,7 +663,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterBooleanPref(prefs::kKerberosEnabled, false); #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kAuthNegotiateDelegateByKdcPolicy, false); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -685,7 +685,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -687,7 +687,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterIntegerPref(prefs::kMaxConnectionsPerProxy, -1); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Note that the default value is not relevant because the pref is only // evaluated when it is managed. registry->RegisterBooleanPref(prefs::kEnforceLocalAnchorConstraintsEnabled, -@@ -694,11 +694,11 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -696,11 +696,11 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterListPref(prefs::kExplicitlyAllowedNetworkPorts); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kNetworkServiceSandboxEnabled, true); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kReceivedHttpAuthNegotiateHeader, false); #endif // BUILDFLAG(IS_LINUX) -@@ -751,7 +751,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea +@@ -753,7 +753,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea OnNewHttpAuthDynamicParams(http_auth_dynamic_params); network_service->ConfigureHttpAuthPrefs(std::move(http_auth_dynamic_params)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gssapi_library_loader_observer_.Install(network_service); #endif // BUILDFLAG(IS_LINUX) -@@ -954,7 +954,7 @@ bool SystemNetworkContextManager::IsNetworkSandboxEnab +@@ -970,7 +970,7 @@ bool SystemNetworkContextManager::IsNetworkSandboxEnab break; } -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!enabled) { g_network_service_will_allow_gssapi_library_load = true; } -@@ -1040,7 +1040,7 @@ void SystemNetworkContextManager::UpdateExplicitlyAllo +@@ -1062,7 +1062,7 @@ void SystemNetworkContextManager::UpdateExplicitlyAllo } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) void SystemNetworkContextManager::UpdateEnforceLocalAnchorConstraintsEnabled() { const PrefService::Preference* enforce_local_anchor_constraints_enabled_pref = local_state_->FindPreference( diff --git a/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.h b/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.h index fa9e4e69fc2d..fd94d57e4055 100644 --- a/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.h +++ b/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.h @@ -1,29 +1,29 @@ ---- chrome/browser/net/system_network_context_manager.h.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/net/system_network_context_manager.h.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/net/system_network_context_manager.h -@@ -200,7 +200,7 @@ class SystemNetworkContextManager { +@@ -204,7 +204,7 @@ class SystemNetworkContextManager { class URLLoaderFactoryForSystem; class NetworkProcessLaunchWatcher; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class GssapiLibraryLoadObserver : public network::mojom::GssapiLibraryLoadObserver { public: -@@ -236,7 +236,7 @@ class SystemNetworkContextManager { +@@ -240,7 +240,7 @@ class SystemNetworkContextManager { void UpdateExplicitlyAllowedNetworkPorts(); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Applies the current value of the kEnforceLocalAnchorConstraintsEnabled // pref to the enforcement state. void UpdateEnforceLocalAnchorConstraintsEnabled(); -@@ -284,7 +284,7 @@ class SystemNetworkContextManager { +@@ -290,7 +290,7 @@ class SystemNetworkContextManager { - static std::optional certificate_transparency_enabled_for_testing_; + std::unique_ptr network_annotation_monitor_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) GssapiLibraryLoadObserver gssapi_library_loader_observer_{this}; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc b/www/chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc index 4c978277ee20..aa5834ad1c77 100644 --- a/www/chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc +++ b/www/chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc @@ -1,11 +1,11 @@ ---- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/password_manager/chrome_password_manager_client.cc -@@ -675,7 +675,7 @@ void ChromePasswordManagerClient::NotifyUserCredential +@@ -671,7 +671,7 @@ void ChromePasswordManagerClient::NotifyUserCredential } void ChromePasswordManagerClient::NotifyKeychainError() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) PasswordsClientUIDelegate* manage_passwords_ui_controller = PasswordsClientUIDelegateFromWebContents(web_contents()); manage_passwords_ui_controller->OnKeychainError(); diff --git a/www/chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc b/www/chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc index 52b55e79e669..9d3219e5320b 100644 --- a/www/chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc +++ b/www/chromium/files/patch-chrome_browser_password__manager_password__reuse__manager__factory.cc @@ -1,11 +1,11 @@ ---- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/password_manager/password_reuse_manager_factory.cc -@@ -136,7 +136,7 @@ PasswordReuseManagerFactory::BuildServiceInstanceForBr +@@ -137,7 +137,7 @@ PasswordReuseManagerFactory::BuildServiceInstanceForBr // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) std::unique_ptr notifier = std::make_unique( IdentityManagerFactory::GetForProfile(profile)); diff --git a/www/chromium/files/patch-chrome_browser_permissions_chrome__permissions__client.cc b/www/chromium/files/patch-chrome_browser_permissions_chrome__permissions__client.cc deleted file mode 100644 index a0ed7a0c68ed..000000000000 --- a/www/chromium/files/patch-chrome_browser_permissions_chrome__permissions__client.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/permissions/chrome_permissions_client.cc.orig 2024-02-23 21:04:38 UTC -+++ chrome/browser/permissions/chrome_permissions_client.cc -@@ -225,7 +225,7 @@ void ChromePermissionsClient::AreSitesImportant( - bool ChromePermissionsClient::IsCookieDeletionDisabled( - content::BrowserContext* browser_context, - const GURL& origin) { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - if (!base::FeatureList::IsEnabled( - supervised_user::kClearingCookiesKeepsSupervisedUsersSignedIn)) { - return false; diff --git a/www/chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc b/www/chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc index 00d258718861..a7725481f099 100644 --- a/www/chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc +++ b/www/chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc @@ -1,239 +1,264 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -224,19 +224,20 @@ +@@ -228,19 +228,20 @@ #include "components/spellcheck/browser/pref_names.h" #endif // BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/action.h" #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "components/enterprise/idle/idle_timeout_policy_handler.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) || \ + BUILDFLAG(IS_BSD) #include "chrome/browser/privacy_sandbox/privacy_sandbox_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || -@@ -247,7 +248,7 @@ - #endif +@@ -255,13 +256,13 @@ + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/battery_saver_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -837,7 +838,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "components/search_engines/site_search_policy_handler.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS) +@@ -854,7 +855,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kManagedDefaultGeolocationSetting, base::Value::Type::INTEGER }, #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { key::kRequireOnlineRevocationChecksForLocalAnchors, prefs::kCertRevocationCheckingRequiredLocalAnchors, base::Value::Type::BOOLEAN }, -@@ -847,7 +848,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -864,7 +865,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) // || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kFullscreenAllowed, prefs::kFullscreenAllowed, base::Value::Type::BOOLEAN }, -@@ -1586,7 +1587,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - base::Value::Type::BOOLEAN }, +@@ -1637,7 +1638,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGSSAPILibraryName, prefs::kGSSAPILibraryName, base::Value::Type::STRING }, -@@ -1631,7 +1632,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1682,7 +1683,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kNetworkServiceSandboxEnabled, prefs::kNetworkServiceSandboxEnabled, base::Value::Type::BOOLEAN }, -@@ -1657,12 +1658,12 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1708,12 +1709,12 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kTotalMemoryLimitMb, base::Value::Type::INTEGER }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kBackgroundModeEnabled, prefs::kBackgroundModeEnabled, base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kUnmanagedDeviceSignalsConsentFlowEnabled, device_signals::prefs::kUnmanagedDeviceSignalsConsentFlowEnabled, base::Value::Type::BOOLEAN }, -@@ -1671,7 +1672,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1722,7 +1723,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::LIST }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ - || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kDefaultBrowserSettingEnabled, prefs::kDefaultBrowserSettingEnabled, base::Value::Type::BOOLEAN }, -@@ -1684,7 +1685,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1735,7 +1736,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) // || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ - || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kAutoplayAllowed, prefs::kAutoplayAllowed, base::Value::Type::BOOLEAN }, -@@ -1785,7 +1786,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1836,7 +1837,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { key::kAlternativeBrowserPath, browser_switcher::prefs::kAlternativeBrowserPath, base::Value::Type::STRING }, -@@ -1883,7 +1884,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1934,7 +1935,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1454054): replace the // kGetDisplayMediaSetSelectAllScreensAllowedForUrls policy by a policy that // matches the name of the new `getAllScreensMedia` API. -@@ -1892,7 +1893,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1943,7 +1944,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::LIST }, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { key::kAuthNegotiateDelegateByKdcPolicy, prefs::kAuthNegotiateDelegateByKdcPolicy, base::Value::Type::BOOLEAN }, -@@ -1917,7 +1918,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1968,7 +1969,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) { key::kEnforceLocalAnchorConstraintsEnabled, prefs::kEnforceLocalAnchorConstraintsEnabled, base::Value::Type::BOOLEAN }, -@@ -1981,7 +1982,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2029,7 +2030,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = ash::prefs::kUrlParameterToAutofillSAMLUsername, base::Value::Type::STRING }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) { key::kTabDiscardingExceptions, performance_manager::user_tuning::prefs::kManagedTabDiscardingExceptions, base::Value::Type::LIST }, -@@ -2009,7 +2010,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2057,7 +2058,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kCloudApAuthEnabled, base::Value::Type::INTEGER }, #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kOutOfProcessSystemDnsResolutionEnabled, prefs::kOutOfProcessSystemDnsResolutionEnabled, base::Value::Type::BOOLEAN }, -@@ -2044,7 +2045,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2083,7 +2084,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kManagedPrivateNetworkAccessRestrictionsEnabled, base::Value::Type::BOOLEAN }, #if BUILDFLAG(ENABLE_EXTENSIONS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kExtensionInstallTypeBlocklist, extensions::pref_names::kExtensionInstallTypeBlocklist, base::Value::Type::LIST}, -@@ -2171,7 +2172,7 @@ std::unique_ptr BuildH +@@ -2104,7 +2105,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + optimization_guide::model_execution::prefs::kWallpaperSearchEnterprisePolicyAllowed, + base::Value::Type::INTEGER}, + #endif +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + { key::kChromeForTestingAllowed, + prefs::kChromeForTestingAllowed, + base::Value::Type::BOOLEAN }, +@@ -2221,7 +2222,7 @@ std::unique_ptr BuildH // Policies for all platforms - End #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique()); // Note: This needs to be created after `DefaultSearchPolicyHandler`. -@@ -2370,7 +2371,7 @@ std::unique_ptr BuildH +@@ -2229,7 +2230,7 @@ std::unique_ptr BuildH + // BUILDFLAG(IS_CHROMEOS_ASH) + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + handlers->AddHandler( + std::make_unique(chrome_schema)); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || +@@ -2425,7 +2426,7 @@ std::unique_ptr BuildH #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique()); handlers->AddHandler( -@@ -2428,7 +2429,7 @@ std::unique_ptr BuildH +@@ -2483,7 +2484,7 @@ std::unique_ptr BuildH key::kBrowsingDataLifetime, browsing_data::prefs::kBrowsingDataLifetime, chrome_schema)); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique()); handlers->AddHandler(std::make_unique()); handlers->AddHandler( -@@ -2492,7 +2493,7 @@ std::unique_ptr BuildH +@@ -2557,7 +2558,7 @@ std::unique_ptr BuildH std::vector> signin_legacy_policies; #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) signin_legacy_policies.push_back(std::make_unique( key::kForceBrowserSignin, prefs::kForceBrowserSignin, base::Value::Type::BOOLEAN)); -@@ -2850,7 +2851,7 @@ std::unique_ptr BuildH +@@ -2916,7 +2917,7 @@ std::unique_ptr BuildH #endif #if BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique()); handlers->AddHandler( std::make_unique( -@@ -2858,7 +2859,7 @@ std::unique_ptr BuildH +@@ -2924,7 +2925,7 @@ std::unique_ptr BuildH #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) #endif // BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique( key::kAllowSystemNotifications, prefs::kAllowSystemNotifications, base::Value::Type::BOOLEAN)); -@@ -2875,7 +2876,7 @@ std::unique_ptr BuildH +@@ -2941,7 +2942,7 @@ std::unique_ptr BuildH /*new_policy_handler=*/std::make_unique< first_party_sets::FirstPartySetsOverridesPolicyHandler>( policy::key::kRelatedWebsiteSetsOverrides, chrome_schema))); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -2900,7 +2901,7 @@ std::unique_ptr BuildH +@@ -2966,7 +2967,7 @@ std::unique_ptr BuildH base::Value::Type::BOOLEAN))); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc b/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc index 206d6c869b04..e1289f31d0d2 100644 --- a/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc +++ b/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -1,75 +1,57 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -486,18 +486,18 @@ +@@ -489,18 +489,18 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #endif // TODO(crbug.com/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 -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #endif -@@ -529,7 +529,7 @@ +@@ -535,7 +535,7 @@ #include "chrome/browser/sessions/session_service_log.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/color/system_theme.h" #endif -@@ -567,7 +567,7 @@ const char kPluginsPluginsList[] = "plugins.plugins_li - const char kPluginsShowDetails[] = "plugins.show_details"; - - // Deprecated 02/2023. --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const char kWebAppsUrlHandlerInfo[] = "web_apps.url_handler_info"; - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +@@ -1685,7 +1685,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) + registry->RegisterBooleanPref(prefs::kOopPrintDriversAllowedByPolicy, true); + #endif -@@ -972,7 +972,7 @@ const char kBorealisVmTokenHash[] = "borealis.vm_token - // key). - void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) { - // Deprecated 02/2023. --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - registry->RegisterDictionaryPref(kWebAppsUrlHandlerInfo); - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + registry->RegisterBooleanPref(prefs::kChromeForTestingAllowed, true); + #endif -@@ -1986,12 +1986,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -2031,12 +2031,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) device_signals::RegisterProfilePrefs(registry); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); enterprise_signin::RegisterProfilePrefs(registry); #endif -@@ -2121,7 +2121,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local - // Please don't delete the preceding line. It is used by PRESUBMIT.py. - - // Added 02/2023. --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - local_state->ClearPref(kWebAppsUrlHandlerInfo); - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) - diff --git a/www/chromium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc b/www/chromium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc index 30dd8e385a1a..133c8bbda70a 100644 --- a/www/chromium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc +++ b/www/chromium/files/patch-chrome_browser_prefs_pref__service__incognito__allowlist.cc @@ -1,11 +1,11 @@ ---- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2023-08-17 07:33:31 UTC +--- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/prefs/pref_service_incognito_allowlist.cc -@@ -168,7 +168,7 @@ const char* const kPersistentPrefNames[] = { +@@ -175,7 +175,7 @@ const char* const kPersistentPrefNames[] = { prefs::kShowFullscreenToolbar, #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Toggleing custom frames affects all open windows in the profile, hence // should be written to the regular profile when changed in incognito mode. prefs::kUseCustomChromeFrame, diff --git a/www/chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc b/www/chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc index 1e2565d4dd9c..b461a3519d37 100644 --- a/www/chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc +++ b/www/chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc @@ -1,114 +1,114 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -314,7 +314,7 @@ +@@ -317,7 +317,7 @@ #include "chromeos/constants/chromeos_features.h" #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/messaging_layer/util/manual_test_heartbeat_event_factory.h" #endif -@@ -409,18 +409,18 @@ - #endif +@@ -408,18 +408,18 @@ + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.h" #include "chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.h" #include "chrome/browser/enterprise/signals/user_permission_service_factory.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/idle_service_factory.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_switcher/browser_switcher_service_factory.h" #include "chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_factory.h" #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" -@@ -647,7 +647,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -648,7 +648,7 @@ void ChromeBrowserMainExtraPartsProfiles:: DiceBoundSessionCookieServiceFactory::GetInstance(); #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) #endif // BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherServiceFactory::GetInstance(); #endif browser_sync::UserEventServiceFactory::GetInstance(); -@@ -765,29 +765,29 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -767,29 +767,29 @@ void ChromeBrowserMainExtraPartsProfiles:: enterprise_commands::UserRemoteCommandsServiceFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) enterprise_connectors::DeviceTrustConnectorServiceFactory::GetInstance(); enterprise_connectors::DeviceTrustServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_connectors::LocalBinaryUploadServiceFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) enterprise_idle::IdleServiceFactory::GetInstance(); #endif #if !BUILDFLAG(IS_CHROMEOS_ASH) enterprise_reporting::CloudProfileReportingServiceFactory::GetInstance(); #endif enterprise_reporting::LegacyTechServiceFactory::GetInstance(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_signals::SignalsAggregatorFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) enterprise_signals::UserPermissionServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_signin::EnterpriseSigninServiceFactory::GetInstance(); #endif #if BUILDFLAG(ENABLE_SESSION_SERVICE) -@@ -911,7 +911,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -913,7 +913,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 -@@ -1017,7 +1017,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1019,7 +1019,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if BUILDFLAG(IS_CHROMEOS) policy::PolicyCertServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) policy::ProfileTokenPolicyWebSigninServiceFactory::GetInstance(); #endif policy::UserCloudPolicyInvalidatorFactory::GetInstance(); -@@ -1058,7 +1058,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1060,7 +1060,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID) ProfileStatisticsFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileTokenWebSigninInterceptorFactory::GetInstance(); #endif #if !BUILDFLAG(IS_ANDROID) -@@ -1076,7 +1076,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1078,7 +1078,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif ReduceAcceptLanguageFactory::GetInstance(); RendererUpdaterFactory::GetInstance(); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) reporting::ManualTestHeartbeatEventFactory::GetInstance(); #endif #if BUILDFLAG(IS_CHROMEOS_LACROS) diff --git a/www/chromium/files/patch-chrome_browser_profiles_profile__impl.cc b/www/chromium/files/patch-chrome_browser_profiles_profile__impl.cc index 231bd9596e6b..ae9bdad0ad41 100644 --- a/www/chromium/files/patch-chrome_browser_profiles_profile__impl.cc +++ b/www/chromium/files/patch-chrome_browser_profiles_profile__impl.cc @@ -1,40 +1,40 @@ ---- chrome/browser/profiles/profile_impl.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -261,6 +261,10 @@ +@@ -267,6 +267,10 @@ #include "chrome/browser/spellchecker/spellcheck_service.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using bookmarks::BookmarkModel; using content::BrowserThread; using content::DownloadManagerDelegate; -@@ -592,7 +596,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async +@@ -598,7 +602,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async #else { #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileManager* profile_manager = g_browser_process->profile_manager(); ProfileAttributesEntry* entry = profile_manager->GetProfileAttributesStorage() -@@ -873,7 +877,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -886,7 +890,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/chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc b/www/chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc index f2286802ae93..4ea5ef08be3d 100644 --- a/www/chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc +++ b/www/chromium/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 2024-02-23 21:04:38 UTC +--- chrome/browser/safe_browsing/download_protection/file_analyzer.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/safe_browsing/download_protection/file_analyzer.cc @@ -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 @@ -85,7 +85,7 @@ void FileAnalyzer::Start(const base::FilePath& target_ } else if (inspection_type == DownloadFileType::DMG) { StartExtractDmgFeatures(); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - } else if (inspection_type == DownloadFileType::OFFICE_DOCUMENT) { + } else if (inspection_type == DownloadFileType::OFFICE_DOCUMENT && + !base::FeatureList::IsEnabled(kMaldocaSkipCheck)) { StartExtractDocumentFeatures(); - #endif -@@ -324,7 +324,7 @@ void FileAnalyzer::OnDmgAnalysisFinished( +@@ -326,7 +326,7 @@ void FileAnalyzer::OnDmgAnalysisFinished( } #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) void FileAnalyzer::StartExtractDocumentFeatures() { DCHECK_CURRENTLY_ON(BrowserThread::UI); diff --git a/www/chromium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc b/www/chromium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc index ad2376ea9315..9410218e5cca 100644 --- a/www/chromium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc +++ b/www/chromium/files/patch-chrome_browser_screen__ai_screen__ai__install__state.cc @@ -1,29 +1,20 @@ ---- chrome/browser/screen_ai/screen_ai_install_state.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/screen_ai/screen_ai_install_state.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/screen_ai/screen_ai_install_state.cc -@@ -23,7 +23,7 @@ - #include "components/services/screen_ai/public/cpp/utilities.h" +@@ -24,7 +24,7 @@ #include "content/public/browser/browser_thread.h" + #include "ui/accessibility/accessibility_features.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/cpu.h" #include "base/files/file_util.h" #endif -@@ -39,7 +39,7 @@ const char kMinExpectedVersion[] = "121.1"; +@@ -36,7 +36,7 @@ const char kMinExpectedVersion[] = "123.1"; bool IsDeviceCompatible() { // Check if the CPU has the required instruction set to run the Screen AI // library. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!base::CPU().has_sse41()) { return false; } -@@ -284,7 +284,7 @@ void ScreenAIInstallState::ResetForTesting() { - - void ScreenAIInstallState::SetComponentFolderForTesting() { - CHECK_IS_TEST(); --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Set the path to the ScreenAI test files. For more details, see the - // `screen_ai_test_files` rule in the accessibility_common BUILD file. - base::FilePath screenai_library_path = diff --git a/www/chromium/files/patch-chrome_browser_send__tab__to__self_receiving__ui__handler__registry.cc b/www/chromium/files/patch-chrome_browser_send__tab__to__self_receiving__ui__handler__registry.cc index aab704eb461e..943f7cc57732 100644 --- a/www/chromium/files/patch-chrome_browser_send__tab__to__self_receiving__ui__handler__registry.cc +++ b/www/chromium/files/patch-chrome_browser_send__tab__to__self_receiving__ui__handler__registry.cc @@ -1,20 +1,20 @@ ---- chrome/browser/send_tab_to_self/receiving_ui_handler_registry.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/send_tab_to_self/receiving_ui_handler_registry.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/send_tab_to_self/receiving_ui_handler_registry.cc -@@ -16,7 +16,7 @@ +@@ -15,7 +15,7 @@ #include "components/send_tab_to_self/features.h" #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/ui/send_tab_to_self/send_tab_to_self_toolbar_icon_controller.h" #endif -@@ -48,7 +48,7 @@ SendTabToSelfToolbarIconController* +@@ -47,7 +47,7 @@ SendTabToSelfToolbarIconController* ReceivingUiHandlerRegistry::GetToolbarButtonControllerForProfile( Profile* profile) { #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) for (const std::unique_ptr& handler : applicable_handlers_) { auto* button_controller = diff --git a/www/chromium/files/patch-chrome_browser_send__tab__to__self_send__tab__to__self__client__service.cc b/www/chromium/files/patch-chrome_browser_send__tab__to__self_send__tab__to__self__client__service.cc index 5e174e544e28..2e99aa0f1f64 100644 --- a/www/chromium/files/patch-chrome_browser_send__tab__to__self_send__tab__to__self__client__service.cc +++ b/www/chromium/files/patch-chrome_browser_send__tab__to__self_send__tab__to__self__client__service.cc @@ -1,20 +1,20 @@ ---- chrome/browser/send_tab_to_self/send_tab_to_self_client_service.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/send_tab_to_self/send_tab_to_self_client_service.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/send_tab_to_self/send_tab_to_self_client_service.cc -@@ -17,7 +17,7 @@ +@@ -16,7 +16,7 @@ #include "components/send_tab_to_self/send_tab_to_self_model.h" #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/send_tab_to_self/send_tab_to_self_toolbar_icon_controller.h" #endif -@@ -51,7 +51,7 @@ void SendTabToSelfClientService::EntriesAddedRemotely( +@@ -50,7 +50,7 @@ void SendTabToSelfClientService::EntriesAddedRemotely( const std::vector& new_entries) { for (const std::unique_ptr& handler : GetHandlers()) { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Only respond to notifications corresponding to this service's profile // for these OSes; mobile does not have a Profile. // Cast note: on desktop, handlers are guaranteed to be the derived class diff --git a/www/chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc b/www/chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc index 02cf0e369e68..3db41c8e72e8 100644 --- a/www/chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc +++ b/www/chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc @@ -1,38 +1,38 @@ ---- chrome/browser/sync/chrome_sync_client.cc.orig 2023-12-10 06:10:27 UTC +--- chrome/browser/sync/chrome_sync_client.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/sync/chrome_sync_client.cc -@@ -111,7 +111,7 @@ +@@ -110,7 +110,7 @@ #endif // BUILDFLAG(ENABLE_SPELLCHECK) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service.h" #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h" #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || -@@ -441,7 +441,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy +@@ -456,7 +456,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy #endif // !BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kTabGroupsSave)) { controllers.push_back(std::make_unique( syncer::SAVED_TAB_GROUP, -@@ -454,7 +454,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy +@@ -469,7 +469,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( -@@ -610,7 +610,7 @@ base::WeakPtr +@@ -625,7 +625,7 @@ base::WeakPtr ChromeSyncClient::GetControllerDelegateForModelType(syncer::ModelType type) { switch (type) { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) case syncer::SAVED_TAB_GROUP: { DCHECK(base::FeatureList::IsEnabled(features::kTabGroupsSave)); return SavedTabGroupServiceFactory::GetForProfile(profile_) diff --git a/www/chromium/files/patch-chrome_browser_sync_sync__service__factory.cc b/www/chromium/files/patch-chrome_browser_sync_sync__service__factory.cc index 31b9a0d2ed4e..33fa9a55fe11 100644 --- a/www/chromium/files/patch-chrome_browser_sync_sync__service__factory.cc +++ b/www/chromium/files/patch-chrome_browser_sync_sync__service__factory.cc @@ -1,29 +1,29 @@ ---- chrome/browser/sync/sync_service_factory.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/sync/sync_service_factory.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/sync/sync_service_factory.cc @@ -84,7 +84,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h" #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || // BUILDFLAG(IS_WIN) -@@ -126,7 +126,7 @@ std::unique_ptr BuildSyncService( +@@ -130,7 +130,7 @@ std::unique_ptr BuildSyncService( // TODO(crbug.com/1052397): Reassess whether the following block needs to be // included in lacros-chrome once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) syncer::SyncPrefs prefs(profile->GetPrefs()); local_sync_backend_enabled = prefs.IsLocalSyncEnabled(); -@@ -260,7 +260,7 @@ SyncServiceFactory::SyncServiceFactory() +@@ -264,7 +264,7 @@ SyncServiceFactory::SyncServiceFactory() DependsOn(ProfilePasswordStoreFactory::GetInstance()); DependsOn(PowerBookmarkServiceFactory::GetInstance()); #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) DependsOn(SavedTabGroupServiceFactory::GetInstance()); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || // BUILDFLAG(IS_WIN) diff --git a/www/chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h b/www/chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h index 688cfbb747e0..d0ce4deb6ca6 100644 --- a/www/chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h +++ b/www/chromium/files/patch-chrome_browser_ui_actions_chrome__action__id.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/actions/chrome_action_id.h.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/actions/chrome_action_id.h.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/actions/chrome_action_id.h -@@ -527,7 +527,7 @@ +@@ -526,7 +526,7 @@ IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_ANSWER) \ E(kActionContentContextQuickAnswersInlineQuery, \ IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_QUERY) -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define CHROME_PLATFORM_SPECIFIC_ACTION_IDS \ E(kUseSystemTitleBar, IDC_USE_SYSTEM_TITLE_BAR) \ E(kRestoreWindow, IDC_RESTORE_WINDOW) diff --git a/www/chromium/files/patch-chrome_browser_ui_browser__command__controller.cc b/www/chromium/files/patch-chrome_browser_ui_browser__command__controller.cc index c13e8710bdbc..dd887960eb63 100644 --- a/www/chromium/files/patch-chrome_browser_ui_browser__command__controller.cc +++ b/www/chromium/files/patch-chrome_browser_ui_browser__command__controller.cc @@ -1,53 +1,53 @@ ---- chrome/browser/ui/browser_command_controller.cc.orig 2023-12-10 06:10:27 UTC +--- chrome/browser/ui/browser_command_controller.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/browser_command_controller.cc @@ -121,7 +121,7 @@ #include "components/user_manager/user_manager.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/base/ime/text_input_flags.h" #include "ui/linux/linux_ui.h" #endif @@ -303,7 +303,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( #endif } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If this key was registered by the user as a content editing hotkey, then // it is not reserved. auto* linux_ui = ui::LinuxUi::instance(); @@ -555,7 +555,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; @@ -567,7 +567,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo break; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) case IDC_USE_SYSTEM_TITLE_BAR: { PrefService* prefs = profile()->GetPrefs(); prefs->SetBoolean(prefs::kUseCustomChromeFrame, -@@ -1234,12 +1234,12 @@ void BrowserCommandController::InitCommandState() { +@@ -1231,12 +1231,12 @@ 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); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool use_system_title_bar = true; #if BUILDFLAG(IS_OZONE) use_system_title_bar = ui::OzonePlatform::GetInstance() diff --git a/www/chromium/files/patch-chrome_browser_ui_chrome__pages.cc b/www/chromium/files/patch-chrome_browser_ui_chrome__pages.cc index 77bab1fbbff0..9e17006ad478 100644 --- a/www/chromium/files/patch-chrome_browser_ui_chrome__pages.cc +++ b/www/chromium/files/patch-chrome_browser_ui_chrome__pages.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/chrome_pages.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/chrome_pages.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/chrome_pages.cc -@@ -80,7 +80,7 @@ +@@ -81,7 +81,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 -@@ -700,7 +700,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -702,7 +702,7 @@ void ShowShortcutCustomizationApp(Profile* profile, } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) void ShowWebAppSettingsImpl(Browser* browser, Profile* profile, const std::string& app_id, diff --git a/www/chromium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc b/www/chromium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc index 58146fd6c477..dfb65e409dd0 100644 --- a/www/chromium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc +++ b/www/chromium/files/patch-chrome_browser_ui_passwords_manage__passwords__ui__controller.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/passwords/manage_passwords_ui_controller.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/passwords/manage_passwords_ui_controller.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/passwords/manage_passwords_ui_controller.cc -@@ -87,7 +87,7 @@ int ManagePasswordsUIController::save_fallback_timeout +@@ -88,7 +88,7 @@ int ManagePasswordsUIController::save_fallback_timeout namespace { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Should be kept in sync with constant declared in // bubble_controllers/relaunch_chrome_bubble_controller.cc. constexpr int kMaxNumberOfTimesKeychainErrorBubbleIsShown = 3; -@@ -452,7 +452,7 @@ void ManagePasswordsUIController::OnBiometricAuthBefor +@@ -478,7 +478,7 @@ void ManagePasswordsUIController::OnBiometricAuthBefor } void ManagePasswordsUIController::OnKeychainError() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) CHECK(!dialog_controller_); PrefService* prefs = Profile::FromBrowserContext(web_contents()->GetBrowserContext()) diff --git a/www/chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc b/www/chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc index 2c57fbfa6fe5..8b52dda74f67 100644 --- a/www/chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc +++ b/www/chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc @@ -1,38 +1,38 @@ ---- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/startup/startup_browser_creator.cc @@ -135,7 +135,7 @@ #include "chrome/credential_provider/common/gcp_strings.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/headless/headless_mode_util.h" #include "chrome/browser/ui/startup/web_app_info_recorder_utils.h" #include "components/headless/policy/headless_mode_policy.h" -@@ -937,7 +937,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -941,7 +941,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( TRACE_EVENT0("startup", "StartupBrowserCreator::ProcessCmdLineImpl"); ComputeAndRecordLaunchMode(command_line); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode() && headless::HeadlessModePolicy::IsHeadlessModeDisabled( g_browser_process->local_state())) { -@@ -1042,7 +1042,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1046,7 +1046,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) && -@@ -1253,7 +1253,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1257,7 +1257,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( CHECK_EQ(profile_info.mode, StartupProfileMode::kBrowserWindow) << "Failed launch with app: couldn't pick a profile"; std::string app_id = command_line.GetSwitchValueASCII(switches::kAppId); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If Chrome Apps are deprecated and |app_id| is a Chrome App, display the // deprecation UI instead of launching the app. if (apps::OpenDeprecatedApplicationPrompt(privacy_safe_profile, app_id)) diff --git a/www/chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc b/www/chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc index 321e56eaf521..0c446528c9c0 100644 --- a/www/chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc +++ b/www/chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/startup/startup_browser_creator_impl.cc -@@ -256,7 +256,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser( +@@ -261,7 +261,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser( // at the state of the MessageLoop. Browser::CreateParams params = Browser::CreateParams(profile_, false); params.creation_source = Browser::CreationSource::kStartupCreator; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) params.startup_id = command_line_->GetSwitchValueASCII("desktop-startup-id"); #endif diff --git a/www/chromium/files/patch-chrome_browser_ui_startup_startup__tab__provider.cc b/www/chromium/files/patch-chrome_browser_ui_startup_startup__tab__provider.cc new file mode 100644 index 000000000000..cdc34974bd8e --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_ui_startup_startup__tab__provider.cc @@ -0,0 +1,20 @@ +--- chrome/browser/ui/startup/startup_tab_provider.cc.orig 2024-03-22 08:19:40 UTC ++++ chrome/browser/ui/startup/startup_tab_provider.cc +@@ -61,7 +61,7 @@ + #include "extensions/browser/extension_registry.h" + #endif // !BUILDFLAG(IS_ANDROID) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "chrome/browser/headless/headless_mode_util.h" + #endif + +@@ -105,7 +105,7 @@ bool ValidateUrl(const GURL& url) { + #if BUILDFLAG(IS_CHROMEOS_LACROS) + // In ChromeOS, allow any URL pattern that matches chrome:// scheme. + url_scheme_is_chrome = url.SchemeIs(content::kChromeUIScheme); +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // In Headless mode, allow any URL pattern that matches chrome:// scheme if + // the user explicitly allowed it. + if (headless::IsHeadlessMode() && url.SchemeIs(content::kChromeUIScheme)) { diff --git a/www/chromium/files/patch-chrome_browser_ui_tab__helpers.cc b/www/chromium/files/patch-chrome_browser_ui_tab__helpers.cc index 1b2dad652fee..a605097689b2 100644 --- a/www/chromium/files/patch-chrome_browser_ui_tab__helpers.cc +++ b/www/chromium/files/patch-chrome_browser_ui_tab__helpers.cc @@ -1,26 +1,26 @@ ---- chrome/browser/ui/tab_helpers.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/tab_helpers.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/tab_helpers.cc -@@ -230,7 +230,7 @@ +@@ -234,7 +234,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" -@@ -668,12 +668,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -676,12 +676,12 @@ 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) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) 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) || diff --git a/www/chromium/files/patch-chrome_browser_ui_ui__features.cc b/www/chromium/files/patch-chrome_browser_ui_ui__features.cc index 817319654491..5fa7c3de73cf 100644 --- a/www/chromium/files/patch-chrome_browser_ui_ui__features.cc +++ b/www/chromium/files/patch-chrome_browser_ui_ui__features.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/ui_features.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/ui_features.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/ui_features.cc -@@ -348,7 +348,7 @@ BASE_FEATURE(kTopChromeWebUIUsesSpareRenderer, +@@ -357,7 +357,7 @@ BASE_FEATURE(kTopChromeWebUIUsesSpareRenderer, "TopChromeWebUIUsesSpareRenderer", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables alternate update-related text to be displayed in browser app menu // button, menu item and confirmation dialog. BASE_FEATURE(kUpdateTextOptions, diff --git a/www/chromium/files/patch-chrome_browser_ui_ui__features.h b/www/chromium/files/patch-chrome_browser_ui_ui__features.h index 27858b1ea0ef..9dc3a8f79b5f 100644 --- a/www/chromium/files/patch-chrome_browser_ui_ui__features.h +++ b/www/chromium/files/patch-chrome_browser_ui_ui__features.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/ui_features.h.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/ui_features.h.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/ui_features.h -@@ -221,7 +221,7 @@ BASE_DECLARE_FEATURE(kToolbarUseHardwareBitmapDraw); +@@ -223,7 +223,7 @@ BASE_DECLARE_FEATURE(kToolbarUseHardwareBitmapDraw); BASE_DECLARE_FEATURE(kTopChromeWebUIUsesSpareRenderer); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kUpdateTextOptions); extern const base::FeatureParam kUpdateTextOptionNumber; #endif diff --git a/www/chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc b/www/chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc index 6ab1d76205f7..3c69401f3354 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc @@ -1,43 +1,43 @@ ---- chrome/browser/ui/views/accelerator_table.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/views/accelerator_table.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/views/accelerator_table.cc @@ -72,11 +72,11 @@ const AcceleratorMapping kAcceleratorMap[] = { {ui::VKEY_S, ui::EF_PLATFORM_ACCELERATOR, IDC_SAVE_PAGE}, {ui::VKEY_9, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_LAST_TAB}, {ui::VKEY_NUMPAD9, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_LAST_TAB}, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {ui::VKEY_9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB}, {ui::VKEY_NUMPAD9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB}, #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {ui::VKEY_NEXT, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_NEXT}, {ui::VKEY_PRIOR, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_PREVIOUS}, @@ -104,7 +104,7 @@ const AcceleratorMapping kAcceleratorMap[] = { {ui::VKEY_NUMPAD7, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_6}, {ui::VKEY_8, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_7}, {ui::VKEY_NUMPAD8, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_7}, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {ui::VKEY_1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0}, {ui::VKEY_NUMPAD1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0}, {ui::VKEY_2, ui::EF_ALT_DOWN, IDC_SELECT_TAB_1}, @@ -154,7 +154,7 @@ const AcceleratorMapping kAcceleratorMap[] = { IDC_SHOW_AVATAR_MENU}, // Platform-specific key maps. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK}, {ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD}, {ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME}, -@@ -254,7 +254,7 @@ const AcceleratorMapping kAcceleratorMap[] = { +@@ -250,7 +250,7 @@ const AcceleratorMapping kAcceleratorMap[] = { #endif // !BUILDFLAG(IS_CHROMEOS) #endif // !BUILDFLAG(IS_MAC) #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) {ui::VKEY_S, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_CONTENT_CONTEXT_RUN_LAYOUT_EXTRACTION}, #endif diff --git a/www/chromium/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc b/www/chromium/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc index 2c93b7fad9c4..f25c607967a0 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc -@@ -39,7 +39,7 @@ +@@ -38,7 +38,7 @@ #include "ui/wm/core/wm_state.h" #endif // defined(USE_AURA) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #include #include -@@ -132,7 +132,7 @@ void ChromeBrowserMainExtraPartsViews::PreProfileInit( +@@ -131,7 +131,7 @@ void ChromeBrowserMainExtraPartsViews::PreProfileInit( return controller; })); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On the Linux desktop, we want to prevent the user from logging in as root, // so that we don't destroy the profile. Now that we have some minimal ui // initialized, check to see if we're running as root and bail if we are. diff --git a/www/chromium/files/patch-chrome_browser_ui_views_compose_compose__dialog__view.cc b/www/chromium/files/patch-chrome_browser_ui_views_compose_compose__dialog__view.cc index f2ba1af2a6de..fbf2fabd0fe1 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_compose_compose__dialog__view.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_compose_compose__dialog__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/compose/compose_dialog_view.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/views/compose/compose_dialog_view.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/views/compose/compose_dialog_view.cc -@@ -144,7 +144,7 @@ void ComposeDialogView::OnBeforeBubbleWidgetInit( +@@ -159,7 +159,7 @@ void ComposeDialogView::OnBeforeBubbleWidgetInit( views::Widget::InitParams* params, views::Widget* widget) const { WebUIBubbleDialogView::OnBeforeBubbleWidgetInit(params, widget); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // In linux, windows may be clipped to their anchors' bounds, // resulting in visual errors, unless they use accelerated rendering. See // crbug.com/1445770 for details. diff --git a/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc b/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc index de917edae177..142cca9329c8 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/frame/browser_view.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -2161,7 +2161,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra +@@ -2204,7 +2204,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/chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc b/www/chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc index 8f0468cd9793..eee1f4a4cbba 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc @@ -1,92 +1,92 @@ ---- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc -@@ -58,7 +58,7 @@ +@@ -59,7 +59,7 @@ #include "ui/aura/window.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.h" #include "chrome/browser/ui/views/frame/desktop_browser_frame_aura_linux.h" #endif -@@ -90,7 +90,7 @@ constexpr int kContentSettingIconSize = 16; +@@ -86,7 +86,7 @@ constexpr int kContentSettingIconSize = 16; // The height of the controls bar at the top of the window. constexpr int kTopControlsHeight = 34; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Frame border when window shadow is not drawn. constexpr int kFrameBorderThickness = 4; #endif -@@ -185,7 +185,7 @@ class WindowEventObserver : public ui::EventObserver { +@@ -181,7 +181,7 @@ class WindowEventObserver : public ui::EventObserver { gfx::Rect input_bounds = pip_browser_frame_view_->GetLocalBounds(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Calculate input bounds for Linux. This is needed because the input bounds // is not necessary the same as the local bounds on Linux. if (pip_browser_frame_view_->ShouldDrawFrameShadow()) { -@@ -575,7 +575,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow +@@ -571,7 +571,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow AddChildView(std::move(auto_pip_setting_overlay)); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) frame_background_ = std::make_unique(); #endif -@@ -751,7 +751,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( +@@ -774,7 +774,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( for (ContentSettingImageView* view : content_setting_views_) view->SetIconColor(color_provider->GetColor(kColorPipWindowForeground)); -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // On Linux the top bar background will be drawn in OnPaint(). top_bar_container_view_->SetBackground(views::CreateSolidBackground( color_provider->GetColor(kColorPipWindowTopBarBackground))); -@@ -830,7 +830,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg +@@ -853,7 +853,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg BrowserNonClientFrameView::RemovedFromWidget(); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::Insets PictureInPictureBrowserFrameView::MirroredFrameBorderInsets() const { auto border = FrameBorderInsets(); -@@ -1084,7 +1084,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre +@@ -1107,7 +1107,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre // views::View implementations: void PictureInPictureBrowserFrameView::OnPaint(gfx::Canvas* canvas) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Draw the PiP window frame borders and shadows, including the top bar // background. if (window_frame_provider_) { -@@ -1208,7 +1208,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie +@@ -1231,7 +1231,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie } gfx::Insets PictureInPictureBrowserFrameView::FrameBorderInsets() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (window_frame_provider_) { const auto insets = window_frame_provider_->GetFrameThicknessDip(); const bool tiled = frame()->tiled(); -@@ -1226,7 +1226,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor +@@ -1249,7 +1249,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor } gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return FrameBorderInsets(); - #elif BUILDFLAG(IS_CHROMEOS_ASH) - return gfx::Insets(chromeos::kResizeInsideBoundsSize); -@@ -1247,7 +1247,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie + #elif !BUILDFLAG(IS_CHROMEOS_ASH) + return gfx::Insets(kResizeBorder); +@@ -1270,7 +1270,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie top_height + border_thickness.bottom()); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void PictureInPictureBrowserFrameView::SetWindowFrameProvider( ui::WindowFrameProvider* window_frame_provider) { DCHECK(window_frame_provider); diff --git a/www/chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h b/www/chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h index 71ff3ce3e539..b5b0c94844cc 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h +++ b/www/chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h @@ -1,47 +1,47 @@ ---- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h -@@ -26,7 +26,7 @@ - #include "ui/views/controls/image_view.h" +@@ -27,7 +27,7 @@ + #include "ui/views/layout/flex_layout_view.h" #include "ui/views/widget/widget_observer.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/window_frame_provider.h" #endif -@@ -34,7 +34,7 @@ +@@ -35,7 +35,7 @@ // parent window, so to prevent cutting off important dialogs we resize the // picture-in-picture window to fit them. While ChromeOS Ash also uses Aura, it // does not have this issue so we do not resize on ChromeOS Ash. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #define RESIZE_DOCUMENT_PICTURE_IN_PICTURE_TO_DIALOG 1 #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_LACROS) -@@ -100,7 +100,7 @@ class PictureInPictureBrowserFrameView - void Layout() override; +@@ -101,7 +101,7 @@ class PictureInPictureBrowserFrameView + void Layout(PassKey) override; void AddedToWidget() override; void RemovedFromWidget() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::Insets MirroredFrameBorderInsets() const override; gfx::Insets GetInputInsets() const override; SkRRect GetRestoredClipRegion() const override; -@@ -194,7 +194,7 @@ class PictureInPictureBrowserFrameView +@@ -192,7 +192,7 @@ class PictureInPictureBrowserFrameView // Returns true if there's an overlay view that's currently shown. bool IsOverlayViewVisible() const; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Sets the window frame provider so that it will be used for drawing. void SetWindowFrameProvider(ui::WindowFrameProvider* window_frame_provider); -@@ -366,7 +366,7 @@ class PictureInPictureBrowserFrameView +@@ -370,7 +370,7 @@ class PictureInPictureBrowserFrameView // `top_bar_color_animation_`. std::optional current_foreground_color_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Used to draw window frame borders and shadow on Linux when GTK theme is // enabled. raw_ptr window_frame_provider_ = nullptr; diff --git a/www/chromium/files/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc b/www/chromium/files/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc index 77c95f43b49e..390cd541a028 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_passwords_password__bubble__view__base.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/passwords/password_bubble_view_base.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/views/passwords/password_bubble_view_base.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/views/passwords/password_bubble_view_base.cc -@@ -33,7 +33,7 @@ +@@ -34,7 +34,7 @@ #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/views/controls/button/button.h" -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/views/passwords/password_relaunch_chrome_view.h" #endif -@@ -136,7 +136,7 @@ PasswordBubbleViewBase* PasswordBubbleViewBase::Create +@@ -139,7 +139,7 @@ PasswordBubbleViewBase* PasswordBubbleViewBase::Create } else if (model_state == password_manager::ui::NOTIFY_RECEIVED_SHARED_CREDENTIALS) { view = new SharedPasswordsNotificationView(web_contents, anchor_view); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) } else if (model_state == password_manager::ui::KEYCHAIN_ERROR_STATE) { view = new RelaunchChromeView( web_contents, anchor_view, diff --git a/www/chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc b/www/chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc index 3d4b1db5bfb1..678be0c91a87 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view__base.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/profiles/profile_menu_view_base.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc -@@ -672,7 +672,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( +@@ -703,7 +703,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/chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc b/www/chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc index 4b1aa016a561..09c31dc77347 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tab_search_bubble_host.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/views/tab_search_bubble_host.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/views/tab_search_bubble_host.cc -@@ -285,7 +285,7 @@ bool TabSearchBubbleHost::ShouldTabSearchRenderBeforeT +@@ -296,7 +296,7 @@ bool TabSearchBubbleHost::ShouldTabSearchRenderBeforeT // Mac should have tabsearch on the right side. Windows >= Win10 has the // Tab Search button as a FrameCaptionButton, but it still needs to be on the // left if it exists. -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return features::IsChromeRefresh2023(); #else return false; diff --git a/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc b/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc index 232522af70cd..75519ecc19f8 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc @@ -1,56 +1,56 @@ ---- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/views/tabs/tab_drag_controller.cc @@ -94,7 +94,7 @@ #include "components/remote_cocoa/browser/window.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/aura/client/drag_drop_client.h" #endif @@ -214,7 +214,7 @@ bool IsWindowDragUsingSystemDragDropAllowed() { void UpdateSystemDnDDragImage(TabDragContext* attached_context, const gfx::ImageSkia& image) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) aura::Window* root_window = attached_context->GetWidget()->GetNativeWindow()->GetRootWindow(); if (aura::client::GetDragDropClient(root_window)) { @@ -395,7 +395,7 @@ TabDragController::Liveness TabDragController::Init( // synchronous on desktop Linux, so use that. // - ChromeOS Ash // Releasing capture on Ash cancels gestures so avoid it. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) can_release_capture_ = false; #endif start_point_in_screen_ = gfx::Point(source_view_offset, mouse_offset.y()); -@@ -1032,7 +1032,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon +@@ -1039,7 +1039,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. -@@ -2071,7 +2071,7 @@ void TabDragController::CompleteDrag() { +@@ -2088,7 +2088,7 @@ void TabDragController::CompleteDrag() { } // If source window was maximized - maximize the new window as well. -#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) // Keeping maximized state breaks snap to Grid on Windows when dragging // tabs from maximized windows. TODO:(crbug.com/727051) Explore doing this // for other desktop OS's. kMaximizedStateRetainedOnTabDrag in -@@ -2535,7 +2535,7 @@ TabDragController::Liveness TabDragController::GetLoca +@@ -2559,7 +2559,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/chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc b/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc index 65b13eaceff7..617b71ed2158 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc -@@ -385,7 +385,7 @@ TabHoverCardBubbleView::TabHoverCardBubbleView(Tab* ta +@@ -373,7 +373,7 @@ TabHoverCardBubbleView::TabHoverCardBubbleView(Tab* ta // not become active. Setting this to false creates the need to explicitly // hide the hovercard on press, touch, and keyboard events. SetCanActivate(false); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) set_accept_events(false); #endif diff --git a/www/chromium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc b/www/chromium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc index 1a2176fdc4be..a287dec4c0fc 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_user__education_browser__user__education__service.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/views/user_education/browser_user_education_service.cc -@@ -777,7 +777,7 @@ void MaybeRegisterChromeFeaturePromos( +@@ -771,7 +771,7 @@ void MaybeRegisterChromeFeaturePromos( FeaturePromoSpecification::AcceleratorInfo()) .SetBubbleArrow(HelpBubbleArrow::kTopLeft))); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // kIPHDesktopPWAsLinkCapturingLaunch: registry.RegisterFeature(std::move( FeaturePromoSpecification::CreateForCustomAction( diff --git a/www/chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc b/www/chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc index 06979ca21c4c..6022a727c73c 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_web__apps_web__app__integration__test__driver.cc @@ -1,83 +1,83 @@ ---- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc -@@ -466,7 +466,7 @@ std::string GetFileExtension(FileExtension file_extens +@@ -512,7 +512,7 @@ std::string GetFileExtension(FileExtension file_extens } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_BSD) SiteConfig GetSiteConfigurationFromAppName(const std::string& app_name) { SiteConfig config; bool is_app_found = false; -@@ -1938,7 +1938,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc +@@ -2093,7 +2093,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc if (app_name.empty()) { app_name = GetSiteConfiguration(site).app_name; } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ASSERT_TRUE(override_registration_->test_override->IsShortcutCreated( profile(), app_id, app_name)); ASSERT_TRUE( -@@ -3257,7 +3257,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna +@@ -3407,7 +3407,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna app_state->id, app_state->name); ASSERT_TRUE(icon_color.has_value()); ASSERT_THAT(site_config.icon_color, testing::Eq(icon_color.value())); -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ASSERT_TRUE(override_registration_->test_override->IsRunOnOsLoginEnabled( profile(), app_state->id, app_state->name)); #endif -@@ -3272,7 +3272,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3422,7 +3422,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis GetAppBySiteMode(after_state_change_action_state_.get(), profile(), site); ASSERT_TRUE(app_state); base::ScopedAllowBlockingForTesting allow_blocking; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ASSERT_FALSE(override_registration_->test_override->IsRunOnOsLoginEnabled( profile(), app_state->id, app_state->name)); #endif -@@ -3282,7 +3282,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3432,7 +3432,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis void WebAppIntegrationTestDriver::CheckSiteHandlesFile( Site site, FileExtension file_extension) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!BeforeStateCheckAction(__FUNCTION__)) { return; } -@@ -3298,7 +3298,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile +@@ -3448,7 +3448,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile void WebAppIntegrationTestDriver::CheckSiteNotHandlesFile( Site site, FileExtension file_extension) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!BeforeStateCheckAction(__FUNCTION__)) { return; } -@@ -4091,7 +4091,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu +@@ -4271,7 +4271,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu base::FilePath shortcut_dir, const std::string& app_name, const webapps::AppId& app_id) { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return override_registration_->test_override->GetShortcutPath( profile(), shortcut_dir, app_id, app_name); #else -@@ -4285,7 +4285,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre +@@ -4471,7 +4471,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre const webapps::AppId& id) { base::ScopedAllowBlockingForTesting allow_blocking; bool is_shortcut_and_icon_correct = false; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool is_shortcut_correct = override_registration_->test_override->IsShortcutCreated(profile, id, name); -@@ -4329,7 +4329,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr +@@ -4515,7 +4515,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr do_icon_colors_match = (expected_icon_pixel_color == shortcut_pixel_color_apps_folder.value()); } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SkColor expected_icon_pixel_color = GetSiteConfigurationFromAppName(name).icon_color; std::optional actual_color_install_icon_size = diff --git a/www/chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc b/www/chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc index 861f1128a8b4..cb1cbdf9c303 100644 --- a/www/chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc +++ b/www/chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/webui/app_home/app_home_page_handler.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/webui/app_home/app_home_page_handler.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/webui/app_home/app_home_page_handler.cc -@@ -386,7 +386,7 @@ app_home::mojom::AppInfoPtr AppHomePageHandler::Create +@@ -392,7 +392,7 @@ app_home::mojom::AppInfoPtr AppHomePageHandler::Create bool deprecated_app = false; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) auto* context = extension_system_->extension_service()->GetBrowserContext(); deprecated_app = extensions::IsExtensionUnsupportedDeprecatedApp(context, extension->id()); -@@ -450,7 +450,7 @@ void AppHomePageHandler::FillExtensionInfoList( +@@ -456,7 +456,7 @@ void AppHomePageHandler::FillExtensionInfoList( } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) auto* context = extension_system_->extension_service()->GetBrowserContext(); const bool is_deprecated_app = extensions::IsExtensionUnsupportedDeprecatedApp(context, diff --git a/www/chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc b/www/chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc index 6d5b79472ec1..c19487ba111e 100644 --- a/www/chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc +++ b/www/chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc @@ -1,92 +1,92 @@ ---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -209,7 +209,7 @@ +@@ -200,7 +200,7 @@ #include "chrome/browser/ui/webui/chromeos/chrome_url_disabled/chrome_url_disabled_ui.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/webui_js_error/webui_js_error_ui.h" #endif -@@ -235,17 +235,17 @@ +@@ -226,17 +226,17 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/discards/discards_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/sandbox/sandbox_internals_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" #endif -@@ -403,7 +403,7 @@ bool IsAboutUI(const GURL& url) { +@@ -388,7 +388,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) -@@ -654,7 +654,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -625,7 +625,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we if (url.host_piece() == chrome::kChromeUIMobileSetupHost) return &NewWebUI; #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIWebUIJsErrorHost) return &NewWebUI; #endif -@@ -710,7 +710,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -681,7 +681,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) -@@ -771,27 +771,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -736,27 +736,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUISandboxHost) { return &NewWebUI; } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIConnectorsInternalsHost) return &NewWebUI; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIDiscardsHost) return &NewWebUI; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIBrowserSwitchHost) return &NewWebUI; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIWebAppSettingsHost) return &NewWebUI; #endif diff --git a/www/chromium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc b/www/chromium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc deleted file mode 100644 index ddd6a971c25a..000000000000 --- a/www/chromium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/ui/webui/ntp/app_launcher_handler.cc.orig 2023-12-10 06:10:27 UTC -+++ chrome/browser/ui/webui/ntp/app_launcher_handler.cc -@@ -311,7 +311,7 @@ base::Value::Dict AppLauncherHandler::CreateExtensionI - bool is_deprecated_app = false; - auto* context = extension_service_->GetBrowserContext(); - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - is_deprecated_app = - extensions::IsExtensionUnsupportedDeprecatedApp(context, extension->id()); - #endif diff --git a/www/chromium/files/patch-chrome_browser_ui_webui_realbox_realbox__handler.cc b/www/chromium/files/patch-chrome_browser_ui_webui_realbox_realbox__handler.cc index d365533b4608..c7926a99108c 100644 --- a/www/chromium/files/patch-chrome_browser_ui_webui_realbox_realbox__handler.cc +++ b/www/chromium/files/patch-chrome_browser_ui_webui_realbox_realbox__handler.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/realbox/realbox_handler.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/webui/realbox/realbox_handler.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/webui/realbox/realbox_handler.cc @@ -148,7 +148,7 @@ const char* kMacShareIconResourceName = #elif BUILDFLAG(IS_WIN) const char* kWinShareIconResourceName = "//resources/cr_components/omnibox/icons/win_share.svg"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char* kLinuxShareIconResourceName = "//resources/cr_components/omnibox/icons/share.svg"; #else @@ -207,7 +207,7 @@ static void DefineChromeRefreshRealboxIcons() { #elif BUILDFLAG(IS_WIN) kWinShareIconResourceName = "//resources/cr_components/omnibox/icons/win_share_cr23.svg"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) kLinuxShareIconResourceName = "//resources/cr_components/omnibox/icons/share_cr23.svg"; #else -@@ -835,7 +835,7 @@ std::string RealboxHandler::PedalVectorIconToResourceN +@@ -837,7 +837,7 @@ std::string RealboxHandler::PedalVectorIconToResourceN icon.name == omnibox::kShareWinChromeRefreshIcon.name) { return kWinShareIconResourceName; } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (icon.name == omnibox::kShareIcon.name || icon.name == omnibox::kShareLinuxChromeRefreshIcon.name) { return kLinuxShareIconResourceName; diff --git a/www/chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc b/www/chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc index 4e4e3bd6e71c..f0fee1f3fa5a 100644 --- a/www/chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc +++ b/www/chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc @@ -1,65 +1,65 @@ ---- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc @@ -138,7 +138,7 @@ #include "ash/webui/settings/public/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 @@ -157,7 +157,7 @@ #include "chrome/browser/ui/webui/certificate_manager_localized_strings_provider.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui_factory.h" #include "ui/ozone/public/ozone_platform.h" #endif -@@ -265,7 +265,7 @@ void AddCommonStrings(content::WebUIDataSource* html_s - base::FeatureList::IsEnabled( - supervised_user::kClearingCookiesKeepsSupervisedUsersSignedIn)); +@@ -260,7 +260,7 @@ void AddCommonStrings(content::WebUIDataSource* html_s + + html_source->AddBoolean("isChildAccount", profile->IsChild()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool allow_qt_theme = base::FeatureList::IsEnabled(ui::kAllowQt); #else bool allow_qt_theme = false; -@@ -295,7 +295,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou +@@ -290,7 +290,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou {"focusHighlightLabel", IDS_SETTINGS_ACCESSIBILITY_FOCUS_HIGHLIGHT_DESCRIPTION}, #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"overscrollHistoryNavigationTitle", IDS_SETTINGS_OVERSCROLL_HISTORY_NAVIGATION_TITLE}, {"overscrollHistoryNavigationSubtitle", -@@ -440,7 +440,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -432,7 +432,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht {"huge", IDS_SETTINGS_HUGE_FONT_SIZE}, {"sidePanelAlignLeft", IDS_SETTINGS_SIDE_PANEL_ALIGN_LEFT}, {"sidePanelAlignRight", IDS_SETTINGS_SIDE_PANEL_ALIGN_RIGHT}, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"gtkTheme", IDS_SETTINGS_GTK_THEME}, {"useGtkTheme", IDS_SETTINGS_USE_GTK_THEME}, {"qtTheme", IDS_SETTINGS_QT_THEME}, -@@ -450,7 +450,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -442,7 +442,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) -@@ -475,7 +475,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -467,7 +467,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/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc b/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc index 26cf4f115334..f724163a3001 100644 --- a/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc +++ b/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/web_app_shortcut_manager.cc.orig 2023-09-13 12:11:42 UTC +--- chrome/browser/web_applications/os_integration/web_app_shortcut_manager.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/web_applications/os_integration/web_app_shortcut_manager.cc -@@ -434,7 +434,7 @@ std::unique_ptr WebAppShortcutManager::B +@@ -440,7 +440,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(); DCHECK_LE(shortcuts_menu_item_infos.size(), kMaxApplicationDockMenuItems); diff --git a/www/chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc b/www/chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc index 11f22a8203f8..a3bda1d01ea3 100644 --- a/www/chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc +++ b/www/chromium/files/patch-chrome_browser_web__applications_policy_web__app__policy__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/policy/web_app_policy_manager.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/web_applications/policy/web_app_policy_manager.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/web_applications/policy/web_app_policy_manager.cc -@@ -113,7 +113,7 @@ namespace web_app { +@@ -112,7 +112,7 @@ namespace web_app { BASE_FEATURE(kDesktopPWAsForceUnregisterOSIntegration, "DesktopPWAsForceUnregisterOSIntegration", -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc b/www/chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc index 2e2bc33c7ea9..32fc449eb238 100644 --- a/www/chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc +++ b/www/chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc @@ -1,11 +1,11 @@ ---- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc -@@ -745,7 +745,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureDisc +@@ -805,7 +805,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureDisc g_observer->ConfiguringCable(request_type); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No caBLEv1 on Linux. It tends to crash bluez. if (base::Contains(pairings_from_extension, device::CableDiscoveryData::Version::V1, diff --git a/www/chromium/files/patch-chrome_common_chrome__features.cc b/www/chromium/files/patch-chrome_common_chrome__features.cc index 0cea5013c674..3bb04a90da53 100644 --- a/www/chromium/files/patch-chrome_common_chrome__features.cc +++ b/www/chromium/files/patch-chrome_common_chrome__features.cc @@ -1,83 +1,74 @@ ---- chrome/common/chrome_features.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/common/chrome_features.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/common/chrome_features.cc -@@ -78,7 +78,7 @@ BASE_FEATURE(kAppShimNotificationAttribution, - BASE_FEATURE(kAsyncDns, - "AsyncDns", - #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT - #else - base::FEATURE_DISABLED_BY_DEFAULT -@@ -86,7 +86,7 @@ BASE_FEATURE(kAsyncDns, - ); +@@ -81,7 +81,7 @@ BASE_FEATURE(kUseAdHocSigningForWebAppShims, + #endif // BUILDFLAG(IS_MAC) #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. BASE_FEATURE(kAutofillAddressSurvey, -@@ -104,7 +104,7 @@ BASE_FEATURE(kAutofillPasswordSurvey, +@@ -99,7 +99,7 @@ BASE_FEATURE(kAutofillPasswordSurvey, base::FEATURE_DISABLED_BY_DEFAULT); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Enables the Restart background mode optimization. When all Chrome UI is // closed and it goes in the background, allows to restart the browser to // discard memory. -@@ -315,7 +315,7 @@ BASE_FEATURE(kDesktopPWAsEnforceWebAppSettingsPolicy, +@@ -321,7 +321,7 @@ BASE_FEATURE(kDesktopPWAsEnforceWebAppSettingsPolicy, BASE_FEATURE(kDesktopPWAsRunOnOsLogin, "DesktopPWAsRunOnOsLogin", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -354,7 +354,7 @@ BASE_FEATURE(kDesktopPWAsTabStripSettings, +@@ -360,7 +360,7 @@ BASE_FEATURE(kDesktopPWAsTabStripSettings, base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Controls whether Chrome Apps are supported. See https://crbug.com/1221251. // If the feature is disabled, Chrome Apps continue to work. If enabled, Chrome // Apps will not launch and will be marked in the UI as deprecated. -@@ -374,7 +374,7 @@ BASE_FEATURE(kDisruptiveNotificationPermissionRevocati +@@ -383,7 +383,7 @@ BASE_FEATURE(kDisruptiveNotificationPermissionRevocati BASE_FEATURE(kDnsOverHttps, "DnsOverHttps", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -390,7 +390,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa +@@ -399,7 +399,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 -@@ -957,7 +957,7 @@ BASE_FEATURE(kLacrosSharedComponentsDir, +@@ -974,7 +974,7 @@ BASE_FEATURE(kLacrosSharedComponentsDir, base::FEATURE_ENABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) BASE_FEATURE(kLinuxLowMemoryMonitor, "LinuxLowMemoryMonitor", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -970,7 +970,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -987,7 +987,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit &kLinuxLowMemoryMonitor, "critical_level", 255}; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_FEATURE(kListWebAppsSwitch, "ListWebAppsSwitch", base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/www/chromium/files/patch-chrome_common_chrome__features.h b/www/chromium/files/patch-chrome_common_chrome__features.h index 17e11252bab7..15e7deb95acc 100644 --- a/www/chromium/files/patch-chrome_common_chrome__features.h +++ b/www/chromium/files/patch-chrome_common_chrome__features.h @@ -1,45 +1,45 @@ ---- chrome/common/chrome_features.h.orig 2024-02-23 21:04:38 UTC +--- chrome/common/chrome_features.h.orig 2024-03-22 08:19:40 UTC +++ chrome/common/chrome_features.h -@@ -60,13 +60,13 @@ BASE_DECLARE_FEATURE(kAppShimNotificationAttribution); - COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAsyncDns); +@@ -60,13 +60,13 @@ BASE_DECLARE_FEATURE(kUseAdHocSigningForWebAppShims); + #endif // BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillAddressSurvey); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillCardSurvey); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAutofillPasswordSurvey); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kBackgroundModeAllowRestart); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -226,7 +226,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -228,7 +228,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kChromeAppsDeprecation); - #endif - -@@ -567,7 +567,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) + COMPONENT_EXPORT(CHROME_FEATURES) + BASE_DECLARE_FEATURE(kShortcutsNotApps); +@@ -572,7 +572,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kLacrosSharedComponentsDir); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kLinuxLowMemoryMonitor); COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam kLinuxLowMemoryMonitorModerateLevel; -@@ -575,7 +575,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -580,7 +580,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam kLinuxLowMemoryMonitorCriticalLevel; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kListWebAppsSwitch); #endif diff --git a/www/chromium/files/patch-chrome_common_chrome__paths.cc b/www/chromium/files/patch-chrome_common_chrome__paths.cc index d7069602daab..b8f02a72325e 100644 --- a/www/chromium/files/patch-chrome_common_chrome__paths.cc +++ b/www/chromium/files/patch-chrome_common_chrome__paths.cc @@ -1,84 +1,84 @@ ---- chrome/common/chrome_paths.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/common/chrome_paths.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/common/chrome_paths.cc @@ -30,7 +30,7 @@ #include "base/apple/foundation_util.h" #endif -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) #include "components/policy/core/common/policy_paths.h" #endif @@ -52,14 +52,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) @@ -225,7 +225,7 @@ bool PathProvider(int key, base::FilePath* result) { } 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; } -@@ -539,7 +539,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -544,7 +544,7 @@ bool PathProvider(int key, base::FilePath* result) { 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: { cur = base::FilePath(policy::kPolicyPath); break; -@@ -550,7 +550,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -555,7 +555,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; -@@ -559,7 +559,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -564,7 +564,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; -@@ -607,7 +607,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -612,7 +612,7 @@ bool PathProvider(int key, base::FilePath* result) { #endif #if BUILDFLAG(ENABLE_EXTENSIONS) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)) + (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) -@@ -621,6 +621,9 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -626,6 +626,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/chromium/native-messaging-hosts")); diff --git a/www/chromium/files/patch-chrome_common_chrome__switches.cc b/www/chromium/files/patch-chrome_common_chrome__switches.cc index 5db3c4e7b9c7..7fb0c081ae50 100644 --- a/www/chromium/files/patch-chrome_common_chrome__switches.cc +++ b/www/chromium/files/patch-chrome_common_chrome__switches.cc @@ -1,19 +1,19 @@ ---- chrome/common/chrome_switches.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/common/chrome_switches.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/common/chrome_switches.cc -@@ -865,14 +865,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- +@@ -876,14 +876,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon"; // Causes the browser to launch directly in guest mode. const char kGuest[] = "guest"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Writes open and installed web apps for each profile to the specified file // without launching a new browser window or tab. Pass a absolute file path to // specify where to output the information. Can be used together with optional diff --git a/www/chromium/files/patch-chrome_common_chrome__switches.h b/www/chromium/files/patch-chrome_common_chrome__switches.h index fccab6ef533d..b5b2d88bc9a6 100644 --- a/www/chromium/files/patch-chrome_common_chrome__switches.h +++ b/www/chromium/files/patch-chrome_common_chrome__switches.h @@ -1,17 +1,17 @@ ---- chrome/common/chrome_switches.h.orig 2024-02-23 21:04:38 UTC +--- chrome/common/chrome_switches.h.orig 2024-03-22 08:19:40 UTC +++ chrome/common/chrome_switches.h -@@ -274,12 +274,12 @@ extern const char kAllowNaClSocketAPI[]; +@@ -276,12 +276,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[]; extern const char kProfileManagementAttributes[]; diff --git a/www/chromium/files/patch-chrome_common_media_cdm__registration.cc b/www/chromium/files/patch-chrome_common_media_cdm__registration.cc index 8e14904bc5dd..60c11659d41d 100644 --- a/www/chromium/files/patch-chrome_common_media_cdm__registration.cc +++ b/www/chromium/files/patch-chrome_common_media_cdm__registration.cc @@ -1,52 +1,61 @@ ---- chrome/common/media/cdm_registration.cc.orig 2023-12-10 06:10:27 UTC +--- chrome/common/media/cdm_registration.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/common/media/cdm_registration.cc -@@ -26,11 +26,11 @@ +@@ -30,11 +30,11 @@ #if BUILDFLAG(ENABLE_WIDEVINE) #include "third_party/widevine/cdm/widevine_cdm_common.h" // nogncheck -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "base/native_library.h" #include "chrome/common/chrome_paths.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/no_destructor.h" #include "chrome/common/media/component_widevine_cdm_hint_file_linux.h" #include "media/cdm/supported_audio_codecs.h" -@@ -56,7 +56,7 @@ using Robustness = content::CdmInfo::Robustness; +@@ -60,7 +60,7 @@ using Robustness = content::CdmInfo::Robustness; #if BUILDFLAG(ENABLE_WIDEVINE) #if (BUILDFLAG(BUNDLE_WIDEVINE_CDM) || \ BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // Create a CdmInfo for a Widevine CDM, using |version|, |cdm_library_path|, and // |capability|. std::unique_ptr CreateWidevineCdmInfo( -@@ -101,7 +101,7 @@ std::unique_ptr CreateCdmInfoFromWid +@@ -105,7 +105,7 @@ std::unique_ptr CreateCdmInfoFromWid // BUILDFLAG(IS_CHROMEOS)) #if BUILDFLAG(BUNDLE_WIDEVINE_CDM) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // On Linux/ChromeOS we have to preload the CDM since it uses the zygote - // sandbox. On Windows and Mac, the bundled CDM is handled by the component - // updater. -@@ -125,7 +125,7 @@ content::CdmInfo* GetBundledWidevine() { + // sandbox. On Windows and Mac, CDM registration is handled by Component + // Update (as the CDM can be loaded only when needed). +@@ -129,7 +129,7 @@ content::CdmInfo* GetBundledWidevine() { // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) #if BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) - // This code checks to see if a component updated Widevine CDM can be found. If - // there is one and it looks valid, return the CdmInfo for that CDM. Otherwise - // return nullptr. -@@ -160,7 +160,7 @@ void AddSoftwareSecureWidevine(std::vector* cd + DVLOG(3) << __func__ << " done with " << cdms->size() << " cdms"; + } + +-#if BUILDFLAG(ENABLE_WIDEVINE) && BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(ENABLE_WIDEVINE) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) + std::vector GetSoftwareSecureWidevineForTesting() { + std::vector cdms; + AddSoftwareSecureWidevine(&cdms); diff --git a/www/chromium/files/patch-chrome_common_media_cdm__registration.h b/www/chromium/files/patch-chrome_common_media_cdm__registration.h new file mode 100644 index 000000000000..c3c26db9a6ec --- /dev/null +++ b/www/chromium/files/patch-chrome_common_media_cdm__registration.h @@ -0,0 +1,11 @@ +--- chrome/common/media/cdm_registration.h.orig 2024-03-22 08:19:40 UTC ++++ chrome/common/media/cdm_registration.h +@@ -14,7 +14,7 @@ + // Register CdmInfo for Content Decryption Modules (CDM) supported. + void RegisterCdmInfo(std::vector* cdms); + +-#if BUILDFLAG(ENABLE_WIDEVINE) && BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(ENABLE_WIDEVINE) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) + // Returns the software secure Widevine CDM. + std::vector GetSoftwareSecureWidevineForTesting(); + #endif diff --git a/www/chromium/files/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h b/www/chromium/files/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h index 3723e2265d12..e3a0477c5df7 100644 --- a/www/chromium/files/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h +++ b/www/chromium/files/patch-chrome_common_media_component__widevine__cdm__hint__file__linux.h @@ -1,11 +1,11 @@ ---- chrome/common/media/component_widevine_cdm_hint_file_linux.h.orig 2023-10-11 18:22:24 UTC +--- chrome/common/media/component_widevine_cdm_hint_file_linux.h.orig 2024-03-22 08:19:40 UTC +++ chrome/common/media/component_widevine_cdm_hint_file_linux.h -@@ -15,7 +15,7 @@ +@@ -17,7 +17,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)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) #error "This file only applies to desktop Linux and ChromeOS." #endif diff --git a/www/chromium/files/patch-chrome_common_pref__names.h b/www/chromium/files/patch-chrome_common_pref__names.h index de77fd606b59..c87b826c641b 100644 --- a/www/chromium/files/patch-chrome_common_pref__names.h +++ b/www/chromium/files/patch-chrome_common_pref__names.h @@ -1,82 +1,91 @@ ---- chrome/common/pref_names.h.orig 2024-02-23 21:04:38 UTC +--- chrome/common/pref_names.h.orig 2024-03-22 08:19:40 UTC +++ chrome/common/pref_names.h -@@ -1323,7 +1323,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u +@@ -1304,7 +1304,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u // 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. inline constexpr char kSystemTheme[] = "extensions.theme.system_theme"; #endif -@@ -1449,7 +1449,7 @@ inline constexpr char kShowUpdatePromotionInfoBar[] = +@@ -1435,7 +1435,7 @@ inline constexpr char kShowUpdatePromotionInfoBar[] = "browser.show_update_promotion_info_bar"; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Boolean that is false if we should show window manager decorations. If // true, we draw a custom chrome frame (thicker title bar and blue border). inline constexpr char kUseCustomChromeFrame[] = "browser.custom_chrome_frame"; -@@ -2001,7 +2001,7 @@ inline constexpr char kDownloadDefaultDirectory[] = +@@ -1995,7 +1995,7 @@ inline constexpr char kDownloadDefaultDirectory[] = inline constexpr char kDownloadDirUpgraded[] = "download.directory_upgrade"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) inline constexpr char kOpenPdfDownloadInSystemReader[] = "download.open_pdf_in_system_reader"; #endif -@@ -2439,14 +2439,14 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s +@@ -2427,14 +2427,14 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s inline constexpr char kMediaCdmOriginData[] = "media.cdm.origin_data"; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // A boolean pref to determine whether or not the network service is running // sandboxed. inline constexpr char kNetworkServiceSandboxEnabled[] = "net.network_service_sandbox"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Records whether the user has seen an HTTP auth "negotiate" header. inline constexpr char kReceivedHttpAuthNegotiateHeader[] = "net.received_http_auth_negotiate_headers"; -@@ -2524,7 +2524,7 @@ inline constexpr char kAmbientAuthenticationInPrivateM +@@ -2512,7 +2512,7 @@ inline constexpr char kAmbientAuthenticationInPrivateM inline constexpr char kBasicAuthOverHttpEnabled[] = "auth.basic_over_http_enabled"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Boolean that specifies whether OK-AS-DELEGATE flag from KDC is respected // along with kAuthNegotiateDelegateAllowlist. inline constexpr char kAuthNegotiateDelegateByKdcPolicy[] = -@@ -3575,7 +3575,7 @@ inline constexpr char kFileOrDirectoryPickerWithoutGes +@@ -3030,7 +3030,7 @@ inline constexpr char kDeviceWeeklyScheduledSuspend[] + + #endif // 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) + // Defines administrator-set availability of Chrome for Testing. + inline constexpr char kChromeForTestingAllowed[] = "chrome_for_testing.allowed"; + #endif +@@ -3580,7 +3580,7 @@ inline constexpr char kFileOrDirectoryPickerWithoutGes inline constexpr char kSandboxExternalProtocolBlocked[] = "profile.sandbox_external_protocol_blocked"; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Boolean that indicates if system notifications are allowed to be used in // place of Chrome notifications. inline constexpr char kAllowSystemNotifications[] = -@@ -3624,7 +3624,7 @@ inline constexpr char kCACertificateManagementAllowed[ +@@ -3629,7 +3629,7 @@ inline constexpr char kCACertificateManagementAllowed[ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) inline constexpr char kEnforceLocalAnchorConstraintsEnabled[] = "enforce_local_anchor_constraints_enabled"; #endif -@@ -3938,7 +3938,7 @@ inline constexpr char kThrottleNonVisibleCrossOriginIf +@@ -3943,7 +3943,7 @@ inline constexpr char kThrottleNonVisibleCrossOriginIf inline constexpr char kNewBaseUrlInheritanceBehaviorAllowed[] = "new_base_url_inheritance_behavior_allowed"; -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If this exists and is true, Chrome may run system DNS resolution out of the // network process. If false, Chrome will run system DNS resolution in the // network process. If non-existent, Chrome will decide where to run system DNS diff --git a/www/chromium/files/patch-chrome_common_url__constants.h b/www/chromium/files/patch-chrome_common_url__constants.h index d753c46e29f8..11752ddccd21 100644 --- a/www/chromium/files/patch-chrome_common_url__constants.h +++ b/www/chromium/files/patch-chrome_common_url__constants.h @@ -1,11 +1,11 @@ ---- chrome/common/url_constants.h.orig 2024-02-23 21:04:38 UTC +--- chrome/common/url_constants.h.orig 2024-03-22 08:19:40 UTC +++ chrome/common/url_constants.h -@@ -822,7 +822,7 @@ inline constexpr char kPhoneHubPermissionLearnMoreURL[ +@@ -842,7 +842,7 @@ inline constexpr char kPhoneHubPermissionLearnMoreURL[ "https://support.google.com/chromebook?p=multidevice"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // "Learn more" URL for the chrome apps deprecation dialog. inline constexpr char kChromeAppsDeprecationLearnMoreURL[] = "https://support.google.com/chrome?p=chrome_app_deprecation"; diff --git a/www/chromium/files/patch-chrome_common_webui__url__constants.cc b/www/chromium/files/patch-chrome_common_webui__url__constants.cc index 3d8abc11f123..9b88f692c2f7 100644 --- a/www/chromium/files/patch-chrome_common_webui__url__constants.cc +++ b/www/chromium/files/patch-chrome_common_webui__url__constants.cc @@ -1,68 +1,68 @@ ---- chrome/common/webui_url_constants.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/common/webui_url_constants.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/common/webui_url_constants.cc -@@ -507,18 +507,18 @@ const char kOsUISystemURL[] = "os://system"; +@@ -512,18 +512,18 @@ const char kOsUISystemURL[] = "os://system"; 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_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || 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 -@@ -533,14 +533,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr +@@ -538,14 +538,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 kChromeUIIntroHost[] = "intro"; -@@ -559,7 +559,7 @@ const char kChromeUIProfilePickerUrl[] = "chrome://pro +@@ -564,7 +564,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"; -@@ -641,7 +641,7 @@ const char kCookiesSubPagePath[] = "/cookies"; +@@ -644,7 +644,7 @@ const char kCookiesSubPagePath[] = "/cookies"; #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 -@@ -872,7 +872,7 @@ const char* const kChromeDebugURLs[] = { +@@ -875,7 +875,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/chromium/files/patch-chrome_common_webui__url__constants.h b/www/chromium/files/patch-chrome_common_webui__url__constants.h index b513ca32cb7b..5f1d042ce187 100644 --- a/www/chromium/files/patch-chrome_common_webui__url__constants.h +++ b/www/chromium/files/patch-chrome_common_webui__url__constants.h @@ -1,57 +1,57 @@ ---- chrome/common/webui_url_constants.h.orig 2024-02-23 21:04:38 UTC +--- chrome/common/webui_url_constants.h.orig 2024-03-22 08:19:40 UTC +++ chrome/common/webui_url_constants.h -@@ -429,24 +429,24 @@ extern const char kOsUISystemURL[]; +@@ -432,24 +432,24 @@ extern const char kOsUISystemURL[]; 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_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || 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 #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 -@@ -461,14 +461,14 @@ extern const char kChromeUILinuxProxyConfigHost[]; +@@ -464,14 +464,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 kChromeUIIntroHost[]; -@@ -484,7 +484,7 @@ extern const char kChromeUIProfilePickerUrl[]; +@@ -487,7 +487,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/chromium/files/patch-chrome_renderer_chrome__render__frame__observer.cc b/www/chromium/files/patch-chrome_renderer_chrome__render__frame__observer.cc index 4bc4ce2da1dd..7b086505708e 100644 --- a/www/chromium/files/patch-chrome_renderer_chrome__render__frame__observer.cc +++ b/www/chromium/files/patch-chrome_renderer_chrome__render__frame__observer.cc @@ -1,11 +1,11 @@ ---- chrome/renderer/chrome_render_frame_observer.cc.orig 2024-01-30 07:53:34 UTC +--- chrome/renderer/chrome_render_frame_observer.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/renderer/chrome_render_frame_observer.cc -@@ -353,7 +353,7 @@ void ChromeRenderFrameObserver::WillDetach(blink::Deta +@@ -351,7 +351,7 @@ void ChromeRenderFrameObserver::WillDetach(blink::Deta void ChromeRenderFrameObserver::DraggableRegionsChanged() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Only the main frame is allowed to control draggable regions, to avoid other // frames manipulate the regions in the browser process. if (!render_frame()->IsMainFrame()) diff --git a/www/chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc b/www/chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc index 2578fdbaed25..d40b51e2da49 100644 --- a/www/chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc +++ b/www/chromium/files/patch-chrome_services_printing_print__backend__service__impl.cc @@ -1,47 +1,47 @@ ---- chrome/services/printing/print_backend_service_impl.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/services/printing/print_backend_service_impl.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/services/printing/print_backend_service_impl.cc @@ -49,7 +49,7 @@ #include "printing/backend/cups_connection_pool.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/no_destructor.h" #include "ui/linux/linux_ui.h" #include "ui/linux/linux_ui_delegate_stub.h" @@ -76,7 +76,7 @@ namespace printing { namespace { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void InstantiateLinuxUiDelegate() { // TODO(crbug.com/809738) Until a real UI can be used in a utility process, // need to use the stub version. @@ -85,7 +85,7 @@ void InstantiateLinuxUiDelegate() { #endif scoped_refptr GetPrintingTaskRunner() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Use task runner associated with equivalent of UI thread. Needed for calls // made through `PrintDialogLinuxInterface` to properly execute. CHECK(base::SequencedTaskRunner::HasCurrentDefault()); -@@ -467,7 +467,7 @@ void PrintBackendServiceImpl::Init( +@@ -469,7 +469,7 @@ void PrintBackendServiceImpl::Init( // `InitCommon()`. InitializeProcessForPrinting(); print_backend_ = PrintBackend::CreateInstance(locale); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Test framework already initializes the UI, so this should not go in // `InitCommon()`. Additionally, low-level Linux UI is not needed when tests // are using `TestPrintingContext`. -@@ -688,7 +688,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( +@@ -690,7 +690,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( crash_keys_ = std::make_unique( *printer_name, print_backend_->GetPrinterDriverInfo(*printer_name)); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(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/chromium/files/patch-chrome_test_BUILD.gn b/www/chromium/files/patch-chrome_test_BUILD.gn deleted file mode 100644 index 2a2c1b9ec0de..000000000000 --- a/www/chromium/files/patch-chrome_test_BUILD.gn +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/test/BUILD.gn.orig 2024-02-23 21:04:38 UTC -+++ chrome/test/BUILD.gn -@@ -11604,7 +11604,7 @@ test("chrome_app_unittests") { - "//components/heap_profiling/in_process", - "//components/safe_browsing:buildflags", - ] -- if (!is_fuchsia && !is_mac) { -+ if (!is_fuchsia && !is_mac && !is_bsd) { - deps += [ "//third_party/breakpad:client" ] - } - if (is_android) { diff --git a/www/chromium/files/patch-chrome_utility_services.cc b/www/chromium/files/patch-chrome_utility_services.cc index 3928947bedbd..c897d782f2e7 100644 --- a/www/chromium/files/patch-chrome_utility_services.cc +++ b/www/chromium/files/patch-chrome_utility_services.cc @@ -1,56 +1,56 @@ ---- chrome/utility/services.cc.orig 2024-01-30 07:53:34 UTC +--- chrome/utility/services.cc.orig 2024-03-22 08:19:40 UTC +++ chrome/utility/services.cc -@@ -57,7 +57,7 @@ +@@ -55,7 +55,7 @@ #include "chrome/services/system_signals/mac/mac_system_signals_service.h" #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/services/system_signals/linux/linux_system_signals_service.h" #endif // BUILDFLAG(IS_LINUX) -@@ -83,7 +83,7 @@ +@@ -81,7 +81,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 -@@ -219,7 +219,7 @@ auto RunMacNotificationService( +@@ -212,7 +212,7 @@ auto RunMacNotificationService( } #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto RunSystemSignalsService( mojo::PendingReceiver receiver) { -@@ -279,7 +279,7 @@ auto RunCupsIppParser( +@@ -272,7 +272,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)); -@@ -467,7 +467,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -465,7 +465,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& services.Add(RunWindowsIconReader); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) services.Add(RunSystemSignalsService); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -483,7 +483,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -481,7 +481,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/chromium/files/patch-chromecast_browser_cast__content__browser__client.cc b/www/chromium/files/patch-chromecast_browser_cast__content__browser__client.cc index 051bbfc96b4d..d38b3db68c50 100644 --- a/www/chromium/files/patch-chromecast_browser_cast__content__browser__client.cc +++ b/www/chromium/files/patch-chromecast_browser_cast__content__browser__client.cc @@ -1,11 +1,11 @@ ---- chromecast/browser/cast_content_browser_client.cc.orig 2024-02-23 21:04:38 UTC +--- chromecast/browser/cast_content_browser_client.cc.orig 2024-03-22 08:19:40 UTC +++ chromecast/browser/cast_content_browser_client.cc -@@ -433,7 +433,7 @@ void CastContentBrowserClient::AppendExtraCommandLineS +@@ -434,7 +434,7 @@ void CastContentBrowserClient::AppendExtraCommandLineS switches::kAudioOutputChannels)); } } else if (process_type == switches::kGpuProcess) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Necessary for accelerated 2d canvas. By default on Linux, Chromium // assumes GLES2 contexts can be lost to a power-save mode, which breaks GPU // canvas apps. diff --git a/www/chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc b/www/chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc index ede8ae26a768..c504cc5cdc88 100644 --- a/www/chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc +++ b/www/chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc @@ -1,12 +1,12 @@ ---- components/autofill/core/browser/personal_data_manager.cc.orig 2024-02-23 21:04:38 UTC +--- components/autofill/core/browser/personal_data_manager.cc.orig 2024-03-22 08:19:40 UTC +++ components/autofill/core/browser/personal_data_manager.cc -@@ -2409,7 +2409,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp +@@ -2329,7 +2329,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. - // TODO(crbug.com/1462552): Simplify once ConsentLevel::kSync and + // TODO(crbug.com/40066949): Simplify once ConsentLevel::kSync and diff --git a/www/chromium/files/patch-components_autofill_core_common_autofill__util.cc b/www/chromium/files/patch-components_autofill_core_common_autofill__util.cc index 7b5c2560fb4b..13366843dfe4 100644 --- a/www/chromium/files/patch-components_autofill_core_common_autofill__util.cc +++ b/www/chromium/files/patch-components_autofill_core_common_autofill__util.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/common/autofill_util.cc.orig 2024-02-23 21:04:38 UTC +--- components/autofill/core/common/autofill_util.cc.orig 2024-03-22 08:19:40 UTC +++ components/autofill/core/common/autofill_util.cc -@@ -130,7 +130,7 @@ bool SanitizedFieldIsEmpty(const std::u16string& value +@@ -131,7 +131,7 @@ bool SanitizedFieldIsEmpty(const std::u16string& value bool ShouldAutoselectFirstSuggestionOnArrowDown() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/chromium/files/patch-components_commerce_core_commerce__feature__list.cc b/www/chromium/files/patch-components_commerce_core_commerce__feature__list.cc index 8c10441f7dcd..6feb47965aea 100644 --- a/www/chromium/files/patch-components_commerce_core_commerce__feature__list.cc +++ b/www/chromium/files/patch-components_commerce_core_commerce__feature__list.cc @@ -1,20 +1,20 @@ ---- components/commerce/core/commerce_feature_list.cc.orig 2024-02-23 21:04:38 UTC +--- components/commerce/core/commerce_feature_list.cc.orig 2024-03-22 08:19:40 UTC +++ components/commerce/core/commerce_feature_list.cc -@@ -167,7 +167,7 @@ BASE_FEATURE(kPriceInsights, +@@ -168,7 +168,7 @@ BASE_FEATURE(kPriceInsights, "PriceInsights", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kPriceInsightsRegionLaunched, "PriceInsightsRegionLaunched", base::FEATURE_ENABLED_BY_DEFAULT); -@@ -240,7 +240,7 @@ BASE_FEATURE(kShoppingCollection, +@@ -244,7 +244,7 @@ const base::FeatureParam kDeleteAllMerchantsOnCl BASE_FEATURE(kShoppingList, "ShoppingList", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kShoppingListRegionLaunched, "ShoppingListRegionLaunched", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/chromium/files/patch-components_constrained__window_constrained__window__views.cc b/www/chromium/files/patch-components_constrained__window_constrained__window__views.cc new file mode 100644 index 000000000000..62f87c529226 --- /dev/null +++ b/www/chromium/files/patch-components_constrained__window_constrained__window__views.cc @@ -0,0 +1,11 @@ +--- components/constrained_window/constrained_window_views.cc.orig 2024-03-22 08:19:40 UTC ++++ components/constrained_window/constrained_window_views.cc +@@ -324,7 +324,7 @@ bool SupportsGlobalScreenCoordinates() { + } + + bool PlatformClipsChildrenToViewport() { +-#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return true; + #else + return false; diff --git a/www/chromium/files/patch-components_crash_core_app_BUILD.gn b/www/chromium/files/patch-components_crash_core_app_BUILD.gn index 8f754cfa9a9d..4145bd618de1 100644 --- a/www/chromium/files/patch-components_crash_core_app_BUILD.gn +++ b/www/chromium/files/patch-components_crash_core_app_BUILD.gn @@ -1,43 +1,43 @@ ---- components/crash/core/app/BUILD.gn.orig 2023-12-10 06:10:27 UTC +--- components/crash/core/app/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ components/crash/core/app/BUILD.gn -@@ -76,7 +76,7 @@ static_library("app") { - "crashpad.h", - ] - -- if (is_linux || is_chromeos) { -+ if ((is_linux || is_chromeos) && !is_bsd) { - sources += [ "crashpad_linux.cc" ] - } - -@@ -89,6 +89,10 @@ static_library("app") { +@@ -82,6 +82,10 @@ static_library("app") { ] } + if (is_bsd) { + sources -= [ "crashpad.cc" ] + } + defines = [ "CRASH_IMPLEMENTATION" ] public_deps = [ ":lib" ] -@@ -117,7 +121,7 @@ static_library("app") { +@@ -95,7 +99,7 @@ static_library("app") { + "//third_party/crashpad/crashpad/util", + ] + +- if (is_linux || is_chromeos) { ++ if ((is_linux || is_chromeos) && !is_bsd) { + sources += [ "crashpad_linux.cc" ] + data_deps = [ ":chrome_crashpad_handler" ] + } +@@ -115,7 +119,7 @@ static_library("app") { libs = [ "log" ] } - if (is_android || is_linux || is_chromeos) { + if ((is_android || is_linux || is_chromeos) && !is_bsd) { deps += [ "//base:base_static", "//components/crash/core/common", -@@ -245,11 +249,6 @@ if (is_mac || is_android || is_linux || is_chromeos) { +@@ -243,11 +247,6 @@ if (is_mac || is_android || is_linux || is_chromeos) { # define custom UserStreamDataSources. executable("chrome_crashpad_handler") { sources = [ "chrome_crashpad_handler.cc" ] - - deps = [ - ":crashpad_handler_main", - "//third_party/crashpad/crashpad/handler", - ] if (is_mac && (is_component_build || is_asan)) { ldflags = [ diff --git a/www/chromium/files/patch-components_feature__engagement_public_feature__configurations.cc b/www/chromium/files/patch-components_feature__engagement_public_feature__configurations.cc index 83af6f40843a..6cd9c0d87d48 100644 --- a/www/chromium/files/patch-components_feature__engagement_public_feature__configurations.cc +++ b/www/chromium/files/patch-components_feature__engagement_public_feature__configurations.cc @@ -1,30 +1,30 @@ ---- components/feature_engagement/public/feature_configurations.cc.orig 2024-02-23 21:04:38 UTC +--- components/feature_engagement/public/feature_configurations.cc.orig 2024-03-22 08:19:40 UTC +++ components/feature_engagement/public/feature_configurations.cc -@@ -48,7 +48,7 @@ FeatureConfig CreateAlwaysTriggerConfig(const base::Fe +@@ -93,7 +93,7 @@ std::optional CreateNewUserGestureInPro - absl::optional GetClientSideFeatureConfig( + std::optional GetClientSideFeatureConfig( const base::Feature* feature) { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // The IPH bubble for link capturing has a trigger set to ANY so that it // always shows up. The per app specific guardrails are independently stored -@@ -67,7 +67,7 @@ absl::optional GetClientSideFeatureConf +@@ -112,7 +112,7 @@ std::optional GetClientSideFeatureConfi #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (kIPHPasswordsAccountStorageFeature.name == feature->name) { - absl::optional config = FeatureConfig(); + std::optional config = FeatureConfig(); config->valid = true; -@@ -1530,7 +1530,8 @@ absl::optional GetClientSideFeatureConf +@@ -1555,7 +1555,8 @@ std::optional GetClientSideFeatureConfi #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) if (kIPHAutofillExternalAccountProfileSuggestionFeature.name == feature->name) { diff --git a/www/chromium/files/patch-components_feature__engagement_public_feature__constants.cc b/www/chromium/files/patch-components_feature__engagement_public_feature__constants.cc index ec333d0957bb..bfb576b87e44 100644 --- a/www/chromium/files/patch-components_feature__engagement_public_feature__constants.cc +++ b/www/chromium/files/patch-components_feature__engagement_public_feature__constants.cc @@ -1,29 +1,30 @@ ---- components/feature_engagement/public/feature_constants.cc.orig 2024-02-23 21:04:38 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2024-03-22 08:19:40 UTC +++ components/feature_engagement/public/feature_constants.cc -@@ -21,7 +21,7 @@ BASE_FEATURE(kUseClientConfigIPH, +@@ -18,7 +18,7 @@ BASE_FEATURE(kIPHDemoMode, "IPH_DemoMode", base::FEATU BASE_FEATURE(kIPHDummyFeature, "IPH_Dummy", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) BASE_FEATURE(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode", base::FEATURE_ENABLED_BY_DEFAULT); -@@ -610,7 +610,7 @@ constexpr base::FeatureParam kDefaultBrowserEligi - /*default_value=*/365}; +@@ -611,7 +611,8 @@ const char kGestureInProductHelpDaysBetweenOccurrences #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) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ ++ BUILDFLAG(IS_BSD) BASE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature, "IPH_AutofillExternalAccountProfileSuggestion", -@@ -736,7 +736,7 @@ BASE_FEATURE(kIPHScalableIphGamingFeature, + base::FEATURE_ENABLED_BY_DEFAULT); +@@ -736,7 +737,7 @@ BASE_FEATURE(kIPHScalableIphGamingFeature, base::FEATURE_DISABLED_BY_DEFAULT); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // This can be enabled by default, as the DesktopPWAsLinkCapturing flag is - // needed for the IPH linked to this feature to work, and use-cases to show - // the IPH are guarded by that flag. + // This can be enabled by default, as the DesktopPWAsLinkCapturing + // flag is needed for the IPH linked to this feature to work, and + // use-cases to show the IPH are guarded by that flag. diff --git a/www/chromium/files/patch-components_feature__engagement_public_feature__constants.h b/www/chromium/files/patch-components_feature__engagement_public_feature__constants.h index 0607ba0ddb3e..6f064b691d5e 100644 --- a/www/chromium/files/patch-components_feature__engagement_public_feature__constants.h +++ b/www/chromium/files/patch-components_feature__engagement_public_feature__constants.h @@ -1,29 +1,29 @@ ---- components/feature_engagement/public/feature_constants.h.orig 2024-02-23 21:04:38 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2024-03-22 08:19:40 UTC +++ components/feature_engagement/public/feature_constants.h -@@ -25,7 +25,7 @@ BASE_DECLARE_FEATURE(kUseClientConfigIPH); +@@ -20,7 +20,7 @@ BASE_DECLARE_FEATURE(kIPHDemoMode); BASE_DECLARE_FEATURE(kIPHDummyFeature); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kIPHBatterySaverModeFeature); BASE_DECLARE_FEATURE(kIPHCompanionSidePanelFeature); BASE_DECLARE_FEATURE(kIPHCompanionSidePanelRegionSearchFeature); -@@ -252,7 +252,7 @@ extern const base::FeatureParam - kDefaultBrowserEligibilitySlidingWindowParam; +@@ -255,7 +255,7 @@ extern const char kGestureInProductHelpDaysBetweenOccu + #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) BASE_DECLARE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature); BASE_DECLARE_FEATURE(kIPHAutofillVirtualCardCVCSuggestionFeature); -@@ -300,7 +300,7 @@ BASE_DECLARE_FEATURE(kIPHScalableIphHelpAppBasedTenFea +@@ -303,7 +303,7 @@ BASE_DECLARE_FEATURE(kIPHScalableIphHelpAppBasedTenFea BASE_DECLARE_FEATURE(kIPHScalableIphGamingFeature); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kIPHDesktopPWAsLinkCapturingLaunch); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/chromium/files/patch-components_feature__engagement_public_feature__list.cc b/www/chromium/files/patch-components_feature__engagement_public_feature__list.cc index 1566ab8fb7a3..8b155d9a4205 100644 --- a/www/chromium/files/patch-components_feature__engagement_public_feature__list.cc +++ b/www/chromium/files/patch-components_feature__engagement_public_feature__list.cc @@ -1,29 +1,29 @@ ---- components/feature_engagement/public/feature_list.cc.orig 2024-02-23 21:04:38 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2024-03-22 08:19:40 UTC +++ components/feature_engagement/public/feature_list.cc @@ -157,7 +157,7 @@ const base::Feature* const kAllFeatures[] = { - &kIPHiOSPromoStaySafeFeature, + &kIPHiOSPostDefaultAbandonmentPromoFeature, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) &kIPHBatterySaverModeFeature, &kIPHCompanionSidePanelFeature, &kIPHCompanionSidePanelRegionSearchFeature, -@@ -214,7 +214,7 @@ const base::Feature* const kAllFeatures[] = { +@@ -213,7 +213,7 @@ const base::Feature* const kAllFeatures[] = { #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -#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) &kIPHAutofillExternalAccountProfileSuggestionFeature, &kIPHAutofillVirtualCardCVCSuggestionFeature, -@@ -262,7 +262,7 @@ const base::Feature* const kAllFeatures[] = { +@@ -261,7 +261,7 @@ const base::Feature* const kAllFeatures[] = { &kIPHScalableIphGamingFeature, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) &kIPHDesktopPWAsLinkCapturingLaunch, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/chromium/files/patch-components_feature__engagement_public_feature__list.h b/www/chromium/files/patch-components_feature__engagement_public_feature__list.h index a21a65acd1e5..f620f51982b6 100644 --- a/www/chromium/files/patch-components_feature__engagement_public_feature__list.h +++ b/www/chromium/files/patch-components_feature__engagement_public_feature__list.h @@ -1,56 +1,56 @@ ---- components/feature_engagement/public/feature_list.h.orig 2024-02-23 21:04:38 UTC +--- components/feature_engagement/public/feature_list.h.orig 2024-03-22 08:19:40 UTC +++ components/feature_engagement/public/feature_list.h -@@ -288,7 +288,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSPromoStaySafeFeature, "I +@@ -290,7 +290,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSPostDefaultAbandonmentPr #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode"); DEFINE_VARIATION_PARAM(kIPHCompanionSidePanelFeature, "IPH_CompanionSidePanel"); DEFINE_VARIATION_PARAM(kIPHCompanionSidePanelRegionSearchFeature, @@ -386,7 +386,7 @@ DEFINE_VARIATION_PARAM(kIPHBackNavigationMenuFeature, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -#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) DEFINE_VARIATION_PARAM(kIPHAutofillExternalAccountProfileSuggestionFeature, "IPH_AutofillExternalAccountProfileSuggestion"); @@ -470,7 +470,7 @@ DEFINE_VARIATION_PARAM(kIPHScalableIphHelpAppBasedTenF DEFINE_VARIATION_PARAM(kIPHScalableIphGamingFeature, "IPH_ScalableIphGaming"); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHDesktopPWAsLinkCapturingLaunch, "IPH_DesktopPWAsLinkCapturingLaunch"); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -615,7 +615,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation - VARIATION_ENTRY(kIPHiOSPromoMadeForIOSFeature), - VARIATION_ENTRY(kIPHiOSPromoStaySafeFeature), +@@ -618,7 +618,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation + VARIATION_ENTRY(kIPHiOSSwipeToolbarToChangeTabFeature), + VARIATION_ENTRY(kIPHiOSPostDefaultAbandonmentPromoFeature), #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHBatterySaverModeFeature), VARIATION_ENTRY(kIPHCompanionSidePanelFeature), VARIATION_ENTRY(kIPHCompanionSidePanelRegionSearchFeature), -@@ -672,7 +672,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -674,7 +674,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -#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) VARIATION_ENTRY(kIPHAutofillExternalAccountProfileSuggestionFeature), VARIATION_ENTRY(kIPHAutofillVirtualCardCVCSuggestionFeature), -@@ -720,7 +720,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -722,7 +722,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation VARIATION_ENTRY(kIPHScalableIphGamingFeature), #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHDesktopPWAsLinkCapturingLaunch), #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/chromium/files/patch-components_gwp__asan_client_gwp__asan.cc b/www/chromium/files/patch-components_gwp__asan_client_gwp__asan.cc index 0bd189198dfb..0c00056684d7 100644 --- a/www/chromium/files/patch-components_gwp__asan_client_gwp__asan.cc +++ b/www/chromium/files/patch-components_gwp__asan_client_gwp__asan.cc @@ -1,11 +1,11 @@ ---- components/gwp_asan/client/gwp_asan.cc.orig 2024-01-30 07:53:34 UTC +--- components/gwp_asan/client/gwp_asan.cc.orig 2024-03-22 08:19:40 UTC +++ components/gwp_asan/client/gwp_asan.cc -@@ -70,7 +70,7 @@ namespace { +@@ -71,7 +71,7 @@ namespace { // ProcessSamplingBoost is the multiplier to increase the // ProcessSamplingProbability in scenarios where we want to perform additional // testing (e.g., on canary/dev builds). -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) constexpr int kDefaultMaxAllocations = 50; constexpr int kDefaultMaxMetadata = 210; constexpr int kDefaultTotalPages = kCpuIs64Bit ? 2048 : kDefaultMaxMetadata * 2; diff --git a/www/chromium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc b/www/chromium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc index ad656d4c8b5c..c52529f2b241 100644 --- a/www/chromium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc +++ b/www/chromium/files/patch-components_gwp__asan_crash__handler_crash__analyzer.cc @@ -1,20 +1,20 @@ ---- components/gwp_asan/crash_handler/crash_analyzer.cc.orig 2023-05-31 08:12:17 UTC +--- components/gwp_asan/crash_handler/crash_analyzer.cc.orig 2024-03-22 08:19:40 UTC +++ components/gwp_asan/crash_handler/crash_analyzer.cc -@@ -30,7 +30,7 @@ +@@ -31,7 +31,7 @@ #include "third_party/crashpad/crashpad/snapshot/process_snapshot.h" #include "third_party/crashpad/crashpad/util/process/process_memory.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include #elif BUILDFLAG(IS_APPLE) #include -@@ -90,7 +90,7 @@ bool CrashAnalyzer::GetExceptionInfo( +@@ -91,7 +91,7 @@ bool CrashAnalyzer::GetExceptionInfo( crashpad::VMAddress CrashAnalyzer::GetAccessAddress( const crashpad::ExceptionSnapshot& exception) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (exception.Exception() == SIGSEGV || exception.Exception() == SIGBUS) return exception.ExceptionAddress(); #elif BUILDFLAG(IS_APPLE) diff --git a/www/chromium/files/patch-components_live__caption_caption__util.h b/www/chromium/files/patch-components_live__caption_caption__util.h index 0970da0c55e0..e984458a8466 100644 --- a/www/chromium/files/patch-components_live__caption_caption__util.h +++ b/www/chromium/files/patch-components_live__caption_caption__util.h @@ -1,11 +1,11 @@ ---- components/live_caption/caption_util.h.orig 2023-07-16 15:47:57 UTC +--- components/live_caption/caption_util.h.orig 2024-03-22 08:19:40 UTC +++ components/live_caption/caption_util.h -@@ -14,7 +14,7 @@ class PrefService; +@@ -15,7 +15,7 @@ class PrefService; namespace captions { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kCaptionSettingsUrl[]; #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_MAC) diff --git a/www/chromium/files/patch-components_named__mojo__ipc__server_connection__info.h b/www/chromium/files/patch-components_named__mojo__ipc__server_connection__info.h index f4b66ca0942d..a8974c4f65ca 100644 --- a/www/chromium/files/patch-components_named__mojo__ipc__server_connection__info.h +++ b/www/chromium/files/patch-components_named__mojo__ipc__server_connection__info.h @@ -1,20 +1,20 @@ ---- components/named_mojo_ipc_server/connection_info.h.orig 2023-02-08 09:03:45 UTC +--- components/named_mojo_ipc_server/connection_info.h.orig 2024-03-22 08:19:40 UTC +++ components/named_mojo_ipc_server/connection_info.h -@@ -13,7 +13,7 @@ +@@ -14,7 +14,7 @@ #include "base/win/scoped_handle.h" #elif BUILDFLAG(IS_MAC) #include -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include #endif -@@ -32,7 +32,7 @@ struct ConnectionInfo { - absl::optional impersonation_token{}; +@@ -33,7 +33,7 @@ struct ConnectionInfo { + std::optional impersonation_token{}; #elif BUILDFLAG(IS_MAC) audit_token_t audit_token{}; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ucred credentials{}; #endif }; diff --git a/www/chromium/files/patch-components_password__manager_core_browser_features_password__features.cc b/www/chromium/files/patch-components_password__manager_core_browser_features_password__features.cc index 75916fc3a9c7..56b9a9e6f5ba 100644 --- a/www/chromium/files/patch-components_password__manager_core_browser_features_password__features.cc +++ b/www/chromium/files/patch-components_password__manager_core_browser_features_password__features.cc @@ -1,20 +1,20 @@ ---- components/password_manager/core/browser/features/password_features.cc.orig 2024-02-23 21:04:38 UTC +--- components/password_manager/core/browser/features/password_features.cc.orig 2024-03-22 08:19:40 UTC +++ components/password_manager/core/browser/features/password_features.cc @@ -24,7 +24,7 @@ BASE_FEATURE(kButterOnDesktopFollowup, BASE_FEATURE(kClearUndecryptablePasswordsOnSync, "ClearUndecryptablePasswordsInSync", -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -104,7 +104,7 @@ BASE_FEATURE(kPasswordManagerLogToTerminal, +@@ -99,7 +99,7 @@ BASE_FEATURE(kPasswordManagerLogToTerminal, "PasswordManagerLogToTerminal", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_FEATURE(kRestartToGainAccessToKeychain, "RestartToGainAccessToKeychain", base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/www/chromium/files/patch-components_password__manager_core_browser_features_password__features.h b/www/chromium/files/patch-components_password__manager_core_browser_features_password__features.h index b87784f46f41..39fa8905f4c3 100644 --- a/www/chromium/files/patch-components_password__manager_core_browser_features_password__features.h +++ b/www/chromium/files/patch-components_password__manager_core_browser_features_password__features.h @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/features/password_features.h.orig 2024-02-23 21:04:38 UTC +--- components/password_manager/core/browser/features/password_features.h.orig 2024-03-22 08:19:40 UTC +++ components/password_manager/core/browser/features/password_features.h -@@ -94,7 +94,7 @@ BASE_DECLARE_FEATURE(kPasswordManagerEnableSenderServi +@@ -95,7 +95,7 @@ BASE_DECLARE_FEATURE(kPasswordManagerEnableSenderServi // terminal. BASE_DECLARE_FEATURE(kPasswordManagerLogToTerminal); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables "Needs access to keychain, restart chrome" bubble and banner. BASE_DECLARE_FEATURE(kRestartToGainAccessToKeychain); - #endif // BUILDFLAG(IS_MAC) + #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/chromium/files/patch-components_password__manager_core_browser_password__form__manager.cc b/www/chromium/files/patch-components_password__manager_core_browser_password__form__manager.cc index bafe710801e5..cf7ff8750bc1 100644 --- a/www/chromium/files/patch-components_password__manager_core_browser_password__form__manager.cc +++ b/www/chromium/files/patch-components_password__manager_core_browser_password__form__manager.cc @@ -1,29 +1,29 @@ ---- components/password_manager/core/browser/password_form_manager.cc.orig 2024-02-23 21:04:38 UTC +--- components/password_manager/core/browser/password_form_manager.cc.orig 2024-03-22 08:19:40 UTC +++ components/password_manager/core/browser/password_form_manager.cc @@ -58,7 +58,7 @@ #include "components/webauthn/android/webauthn_cred_man_delegate.h" #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/os_crypt/sync/os_crypt.h" #endif @@ -229,7 +229,7 @@ bool ShouldUploadCrowdsourcingVotes(const FormOrDigest return false; } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool ShouldShowKeychainErrorBubble( - absl::optional backend_error) { + std::optional backend_error) { if (!backend_error.has_value()) { -@@ -794,7 +794,7 @@ void PasswordFormManager::OnFetchCompleted() { +@@ -800,7 +800,7 @@ void PasswordFormManager::OnFetchCompleted() { error.value().type); } -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (ShouldShowKeychainErrorBubble( form_fetcher_->GetProfileStoreBackendError())) { client_->NotifyKeychainError(); diff --git a/www/chromium/files/patch-components_password__manager_core_browser_password__manager.cc b/www/chromium/files/patch-components_password__manager_core_browser_password__manager.cc index 9e09cb4ebded..4dbf4146e67a 100644 --- a/www/chromium/files/patch-components_password__manager_core_browser_password__manager.cc +++ b/www/chromium/files/patch-components_password__manager_core_browser_password__manager.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/password_manager.cc.orig 2024-02-23 21:04:38 UTC +--- components/password_manager/core/browser/password_manager.cc.orig 2024-03-22 08:19:40 UTC +++ components/password_manager/core/browser/password_manager.cc -@@ -363,7 +363,7 @@ void PasswordManager::RegisterProfilePrefs( +@@ -361,7 +361,7 @@ void PasswordManager::RegisterProfilePrefs( registry->RegisterListPref(prefs::kPasswordManagerPromoCardsList); #endif // BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) registry->RegisterBooleanPref(prefs::kPasswordSharingEnabled, true); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterIntegerPref(prefs::kRelaunchChromeBubbleDismissedCounter, 0); #endif diff --git a/www/chromium/files/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc b/www/chromium/files/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc index a72bfd07692d..9b73c604369f 100644 --- a/www/chromium/files/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc +++ b/www/chromium/files/patch-components_password__manager_core_browser_password__store_login__database__unittest.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/password_store/login_database_unittest.cc.orig 2024-01-30 07:53:34 UTC +--- components/password_manager/core/browser/password_store/login_database_unittest.cc.orig 2024-03-22 08:19:40 UTC +++ components/password_manager/core/browser/password_store/login_database_unittest.cc -@@ -2106,7 +2106,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, +@@ -2105,7 +2105,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, LoginDatabaseMigrationTestBroken, testing::Values(1, 2, 3, 24)); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) class LoginDatabaseUndecryptableLoginsTest : public testing::Test { protected: LoginDatabaseUndecryptableLoginsTest() = default; diff --git a/www/chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc b/www/chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc index 8eef36579ea9..b9bbf7aa08ea 100644 --- a/www/chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc +++ b/www/chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/sync/password_sync_bridge.cc.orig 2023-10-27 05:38:38 UTC +--- components/password_manager/core/browser/sync/password_sync_bridge.cc.orig 2024-03-22 08:19:40 UTC +++ components/password_manager/core/browser/sync/password_sync_bridge.cc -@@ -197,7 +197,7 @@ bool ShouldRecoverPasswordsDuringMerge() { +@@ -195,7 +195,7 @@ bool ShouldRecoverPasswordsDuringMerge() { } bool ShouldCleanSyncMetadataDuringStartupWhenDecryptionFails() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return ShouldRecoverPasswordsDuringMerge() && base::FeatureList::IsEnabled( features::kForceInitialSyncWhenDecryptionFails); diff --git a/www/chromium/files/patch-components_password__manager_core_common_password__manager__pref__names.h b/www/chromium/files/patch-components_password__manager_core_common_password__manager__pref__names.h index de620598068b..a571073e6428 100644 --- a/www/chromium/files/patch-components_password__manager_core_common_password__manager__pref__names.h +++ b/www/chromium/files/patch-components_password__manager_core_common_password__manager__pref__names.h @@ -1,11 +1,11 @@ ---- components/password_manager/core/common/password_manager_pref_names.h.orig 2024-02-23 21:04:38 UTC +--- components/password_manager/core/common/password_manager_pref_names.h.orig 2024-03-22 08:19:40 UTC +++ components/password_manager/core/common/password_manager_pref_names.h -@@ -324,7 +324,7 @@ inline constexpr char kPasswordManagerPromoCardsList[] +@@ -328,7 +328,7 @@ inline constexpr char kPasswordManagerPromoCardsList[] inline constexpr char kPasswordSharingEnabled[] = "password_manager.password_sharing_enabled"; -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Integer pref indicating how many times relaunch Chrome bubble was dismissed. inline constexpr char kRelaunchChromeBubbleDismissedCounter[] = "password_manager.relaunch_chrome_bubble_dismissed_counter"; diff --git a/www/chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc b/www/chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc index 26b8f03cbc69..b66671da5ad2 100644 --- a/www/chromium/files/patch-components_policy_core_browser_policy__pref__mapping__test.cc +++ b/www/chromium/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 2024-01-30 07:53:34 UTC +--- components/policy/core/browser/policy_pref_mapping_test.cc.orig 2024-03-22 08:19:40 UTC +++ components/policy/core/browser/policy_pref_mapping_test.cc -@@ -318,7 +318,7 @@ class PolicyTestCase { +@@ -322,7 +322,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/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc b/www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc index 4822e59aa429..09e1b7859f50 100644 --- a/www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc +++ b/www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc @@ -1,11 +1,11 @@ ---- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2024-02-23 21:04:38 UTC +--- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2024-03-22 08:19:40 UTC +++ components/policy/core/common/cloud/cloud_policy_client.cc -@@ -554,7 +554,7 @@ void CloudPolicyClient::FetchPolicy(PolicyFetchReason +@@ -578,7 +578,7 @@ void CloudPolicyClient::FetchPolicy(PolicyFetchReason fetch_request->set_invalidation_payload(invalidation_payload_); } } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Only set browser device identifier for CBCM Chrome cloud policy on // desktop. if (type_to_fetch.first == diff --git a/www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc b/www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc index 588a7b34d098..b1538650647f 100644 --- a/www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc +++ b/www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc @@ -1,55 +1,55 @@ ---- components/policy/core/common/cloud/cloud_policy_util.cc.orig 2023-11-03 10:09:45 UTC +--- components/policy/core/common/cloud/cloud_policy_util.cc.orig 2024-03-22 08:19:40 UTC +++ components/policy/core/common/cloud/cloud_policy_util.cc @@ -20,7 +20,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include #include #include @@ -35,10 +35,15 @@ #import #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include // For HOST_NAME_MAX #endif +#if BUILDFLAG(IS_FREEBSD) +#include +#define HOST_NAME_MAX MAXHOSTNAMELEN +#endif + #include #include -@@ -86,7 +91,7 @@ namespace em = enterprise_management; +@@ -88,7 +93,7 @@ namespace em = enterprise_management; std::string GetMachineName() { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) char hostname[HOST_NAME_MAX]; if (gethostname(hostname, HOST_NAME_MAX) == 0) // Success. return hostname; -@@ -143,7 +148,7 @@ std::string GetMachineName() { +@@ -145,7 +150,7 @@ std::string GetMachineName() { std::string GetOSVersion() { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return base::SysInfo::OperatingSystemVersion(); #elif BUILDFLAG(IS_WIN) base::win::OSInfo::VersionNumber version_number = -@@ -166,7 +171,7 @@ std::string GetOSArchitecture() { +@@ -168,7 +173,7 @@ std::string GetOSArchitecture() { } std::string GetOSUsername() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) struct passwd* creds = getpwuid(getuid()); if (!creds || !creds->pw_name) return std::string(); diff --git a/www/chromium/files/patch-components_qr__code__generator_BUILD.gn b/www/chromium/files/patch-components_qr__code__generator_BUILD.gn deleted file mode 100644 index 1167c4a03f75..000000000000 --- a/www/chromium/files/patch-components_qr__code__generator_BUILD.gn +++ /dev/null @@ -1,32 +0,0 @@ ---- components/qr_code_generator/BUILD.gn.orig 2024-02-23 21:04:38 UTC -+++ components/qr_code_generator/BUILD.gn -@@ -40,20 +40,20 @@ source_set("qr_code_generator") { - ] - deps = [ - ":qr_code_generator_features", -- ":qr_code_generator_ffi_glue", -+# ":qr_code_generator_ffi_glue", - "//base", - ] - public_deps = [ "//base" ] - } - --rust_static_library("qr_code_generator_ffi_glue") { -- allow_unsafe = true # Needed for FFI that underpins the `cxx` crate. -- crate_root = "qr_code_generator_ffi_glue.rs" -- sources = [ "qr_code_generator_ffi_glue.rs" ] -- cxx_bindings = [ "qr_code_generator_ffi_glue.rs" ] -- visibility = [ ":qr_code_generator" ] -- deps = [ "//third_party/rust/qr_code/v2:lib" ] --} -+#rust_static_library("qr_code_generator_ffi_glue") { -+# allow_unsafe = true # Needed for FFI that underpins the `cxx` crate. -+# crate_root = "qr_code_generator_ffi_glue.rs" -+# sources = [ "qr_code_generator_ffi_glue.rs" ] -+# cxx_bindings = [ "qr_code_generator_ffi_glue.rs" ] -+# visibility = [ ":qr_code_generator" ] -+# deps = [ "//third_party/rust/qr_code/v2:lib" ] -+#} - - source_set("unit_tests") { - testonly = true diff --git a/www/chromium/files/patch-components_qr__code__generator_features.cc b/www/chromium/files/patch-components_qr__code__generator_features.cc deleted file mode 100644 index 9bc549348eed..000000000000 --- a/www/chromium/files/patch-components_qr__code__generator_features.cc +++ /dev/null @@ -1,13 +0,0 @@ ---- components/qr_code_generator/features.cc.orig 2024-02-23 21:04:38 UTC -+++ components/qr_code_generator/features.cc -@@ -11,6 +11,10 @@ namespace qr_code_generator { - - BASE_FEATURE(kRustyQrCodeGeneratorFeature, - "RustyQrCodeGenerator", -+#if BUILDFLAG(IS_BSD) -+ base::FEATURE_DISABLED_BY_DEFAULT); -+#else - base::FEATURE_ENABLED_BY_DEFAULT); -+#endif - - } // namespace qr_code_generator diff --git a/www/chromium/files/patch-components_qr__code__generator_features.h b/www/chromium/files/patch-components_qr__code__generator_features.h deleted file mode 100644 index 66cb42ff2671..000000000000 --- a/www/chromium/files/patch-components_qr__code__generator_features.h +++ /dev/null @@ -1,14 +0,0 @@ ---- components/qr_code_generator/features.h.orig 2024-01-30 07:53:34 UTC -+++ components/qr_code_generator/features.h -@@ -26,7 +26,11 @@ BASE_DECLARE_FEATURE(kRustyQrCodeGeneratorFeature); - // See https://crbug.com/1431991 for more details about the feature and the - // Rust QR Code Generator project. - inline bool IsRustyQrCodeGeneratorFeatureEnabled() { -+#ifdef notyet - return base::FeatureList::IsEnabled(kRustyQrCodeGeneratorFeature); -+#else -+ return false; -+#endif - } - - } // namespace qr_code_generator diff --git a/www/chromium/files/patch-components_qr__code__generator_qr__code__generator.cc b/www/chromium/files/patch-components_qr__code__generator_qr__code__generator.cc deleted file mode 100644 index e31833b35d58..000000000000 --- a/www/chromium/files/patch-components_qr__code__generator_qr__code__generator.cc +++ /dev/null @@ -1,47 +0,0 @@ ---- components/qr_code_generator/qr_code_generator.cc.orig 2024-02-23 21:04:38 UTC -+++ components/qr_code_generator/qr_code_generator.cc -@@ -11,12 +11,16 @@ - #include - - #include "base/check_op.h" -+#ifdef notyet - #include "base/containers/span_rust.h" -+#endif - #include "base/memory/raw_ptr.h" - #include "base/notreached.h" - #include "base/numerics/safe_conversions.h" - #include "components/qr_code_generator/features.h" -+#ifdef notyet - #include "components/qr_code_generator/qr_code_generator_ffi_glue.rs.h" -+#endif - - namespace qr_code_generator { - -@@ -572,6 +576,7 @@ size_t SegmentSpanLength(base::span GenerateQrCodeUsingRust( - base::span in, - absl::optional min_version) { -@@ -596,6 +601,7 @@ absl::optional Generat - CHECK_EQ(code.data.size(), static_cast(code.qr_size * code.qr_size)); - return code; - } -+#endif - - } // namespace - -@@ -613,9 +619,11 @@ QRCodeGenerator::GeneratedCode::~GeneratedCode() = def - absl::optional QRCodeGenerator::Generate( - base::span in, - absl::optional min_version) { -+#ifdef notyet - if (IsRustyQrCodeGeneratorFeatureEnabled()) { - return GenerateQrCodeUsingRust(in, min_version); - } -+#endif - - if (in.size() > kMaxInputSize) { - return absl::nullopt; diff --git a/www/chromium/files/patch-components_safe__browsing_core_common_features.cc b/www/chromium/files/patch-components_safe__browsing_core_common_features.cc index bb62d15bc130..9ff494307405 100644 --- a/www/chromium/files/patch-components_safe__browsing_core_common_features.cc +++ b/www/chromium/files/patch-components_safe__browsing_core_common_features.cc @@ -1,11 +1,11 @@ ---- components/safe_browsing/core/common/features.cc.orig 2024-02-23 21:04:38 UTC +--- components/safe_browsing/core/common/features.cc.orig 2024-03-22 08:19:40 UTC +++ components/safe_browsing/core/common/features.cc -@@ -201,7 +201,7 @@ BASE_FEATURE(kSafeBrowsingSkipSubresources, +@@ -240,7 +240,7 @@ BASE_FEATURE(kSafeBrowsingSkipSubresources, BASE_FEATURE(kSafeBrowsingSkipSubresources2, "SafeBrowsingSkipSubResources2", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_LACROS) -+ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/chromium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc b/www/chromium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc index e03d8603ca9e..6f249c239aa3 100644 --- a/www/chromium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc +++ b/www/chromium/files/patch-components_search__engines_search__engine__choice_search__engine__choice__service.cc @@ -1,11 +1,11 @@ ---- components/search_engines/search_engine_choice/search_engine_choice_service.cc.orig 2024-02-23 21:04:38 UTC +--- components/search_engines/search_engine_choice/search_engine_choice_service.cc.orig 2024-03-22 08:19:40 UTC +++ components/search_engines/search_engine_choice/search_engine_choice_service.cc -@@ -456,7 +456,7 @@ void SearchEngineChoiceService::PreprocessPrefsForRepr +@@ -428,7 +428,7 @@ void SearchEngineChoiceService::PreprocessPrefsForRepr int SearchEngineChoiceService::GetCountryIdInternal() { // `country_codes::kCountryIDAtInstall` may not be set yet. -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Android, ChromeOS and Linux, `country_codes::kCountryIDAtInstall` is // computed asynchronously using platform-specific signals, and may not be // available yet. diff --git a/www/chromium/files/patch-components_search__engines_template__url__service.cc b/www/chromium/files/patch-components_search__engines_template__url__service.cc index 6bfe24100a77..2376cc901f94 100644 --- a/www/chromium/files/patch-components_search__engines_template__url__service.cc +++ b/www/chromium/files/patch-components_search__engines_template__url__service.cc @@ -1,11 +1,11 @@ ---- components/search_engines/template_url_service.cc.orig 2024-02-29 08:25:16 UTC +--- components/search_engines/template_url_service.cc.orig 2024-03-22 08:19:40 UTC +++ components/search_engines/template_url_service.cc -@@ -2915,7 +2915,7 @@ bool TemplateURLService::MatchesDefaultSearchProvider( +@@ -2925,7 +2925,7 @@ bool TemplateURLService::MatchesDefaultSearchProvider( std::unique_ptr TemplateURLService::GetEnterpriseSiteSearchManager(PrefService* prefs) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS_ASH) -+ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(omnibox::kSiteSearchSettingsPolicy) ? std::make_unique( prefs, base::BindRepeating( diff --git a/www/chromium/files/patch-components_services_screen__ai_public_cpp_utilities.cc b/www/chromium/files/patch-components_services_screen__ai_public_cpp_utilities.cc index f76bf0b762b8..094e6ab8b4e8 100644 --- a/www/chromium/files/patch-components_services_screen__ai_public_cpp_utilities.cc +++ b/www/chromium/files/patch-components_services_screen__ai_public_cpp_utilities.cc @@ -1,20 +1,11 @@ ---- components/services/screen_ai/public/cpp/utilities.cc.orig 2024-02-23 21:04:38 UTC +--- components/services/screen_ai/public/cpp/utilities.cc.orig 2024-03-22 08:19:40 UTC +++ components/services/screen_ai/public/cpp/utilities.cc -@@ -32,7 +32,7 @@ constexpr char kScreenAIDlcRootPath[] = - "/run/imageloader/screen-ai/package/root/"; +@@ -34,7 +34,7 @@ constexpr char kScreenAIDlcRootPath[] = #endif + #if BUILDFLAG(ENABLE_SCREEN_AI_BROWSERTESTS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr base::FilePath::CharType kScreenAIResourcePathForTests[] = FILE_PATH_LITERAL("third_party/screen-ai/linux/resources"); - -@@ -72,7 +72,7 @@ base::FilePath GetComponentDir() { - } - - base::FilePath GetLatestComponentBinaryPath() { --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - if (features::IsScreenAITestModeEnabled()) { - CHECK_IS_TEST(); - return GetTestComponentBinaryPath(); + #elif BUILDFLAG(IS_MAC) diff --git a/www/chromium/files/patch-components_signin_public_base_signin__switches.cc b/www/chromium/files/patch-components_signin_public_base_signin__switches.cc index 3e27036a575a..ec456f8ed02f 100644 --- a/www/chromium/files/patch-components_signin_public_base_signin__switches.cc +++ b/www/chromium/files/patch-components_signin_public_base_signin__switches.cc @@ -1,11 +1,20 @@ ---- components/signin/public/base/signin_switches.cc.orig 2024-02-23 21:04:38 UTC +--- components/signin/public/base/signin_switches.cc.orig 2024-03-22 08:19:40 UTC +++ components/signin/public/base/signin_switches.cc -@@ -104,7 +104,7 @@ BASE_FEATURE(kSearchEngineChoice, - BASE_FEATURE(kUnoDesktop, "UnoDesktop", base::FEATURE_DISABLED_BY_DEFAULT); +@@ -121,7 +121,7 @@ bool IsExplicitBrowserSigninUIOnDesktopEnabled( + } #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kMinorModeRestrictionsForHistorySyncOptIn, "MinorModeRestrictionsForHistorySyncOptIn", base::FEATURE_DISABLED_BY_DEFAULT); +@@ -130,7 +130,7 @@ constexpr int kMinorModeRestrictionsFetchDeadlineDefau + #if BUILDFLAG(IS_ANDROID) + // Based on Signin.AccountCapabilities.UserVisibleLatency + 400; +-#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // Based on Signin.SyncOptIn.PreSyncConfirmationLatency + 900; + #elif BUILDFLAG(IS_IOS) diff --git a/www/chromium/files/patch-components_signin_public_base_signin__switches.h b/www/chromium/files/patch-components_signin_public_base_signin__switches.h index 4f74e0fdd7ad..0b12cf8168dc 100644 --- a/www/chromium/files/patch-components_signin_public_base_signin__switches.h +++ b/www/chromium/files/patch-components_signin_public_base_signin__switches.h @@ -1,11 +1,11 @@ ---- components/signin/public/base/signin_switches.h.orig 2024-02-23 21:04:38 UTC +--- components/signin/public/base/signin_switches.h.orig 2024-03-22 08:19:40 UTC +++ components/signin/public/base/signin_switches.h -@@ -92,7 +92,7 @@ BASE_DECLARE_FEATURE(kUnoDesktop); +@@ -119,7 +119,7 @@ bool IsExplicitBrowserSigninUIOnDesktopEnabled( // Controls the view mode for (history) sync screen. #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) + COMPONENT_EXPORT(SIGNIN_SWITCHES) BASE_DECLARE_FEATURE(kMinorModeRestrictionsForHistorySyncOptIn); - #endif diff --git a/www/chromium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc b/www/chromium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc index 9f2ddced4466..12bc5fc0af82 100644 --- a/www/chromium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc +++ b/www/chromium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc @@ -1,11 +1,11 @@ ---- components/supervised_user/core/browser/supervised_user_service.cc.orig 2024-02-23 21:04:38 UTC +--- components/supervised_user/core/browser/supervised_user_service.cc.orig 2024-03-22 08:19:40 UTC +++ components/supervised_user/core/browser/supervised_user_service.cc -@@ -164,7 +164,7 @@ FirstTimeInterstitialBannerState SupervisedUserService +@@ -170,7 +170,7 @@ FirstTimeInterstitialBannerState SupervisedUserService const FirstTimeInterstitialBannerState original_state) { FirstTimeInterstitialBannerState target_state = original_state; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_IOS) + BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) if (supervised_user::CanDisplayFirstTimeInterstitialBanner()) { if (original_state != FirstTimeInterstitialBannerState::kSetupComplete && can_show_first_time_interstitial_banner_) { diff --git a/www/chromium/files/patch-components_supervised__user_core_common_features.cc b/www/chromium/files/patch-components_supervised__user_core_common_features.cc index 59ec85c61ca5..de4ea8a4d0ba 100644 --- a/www/chromium/files/patch-components_supervised__user_core_common_features.cc +++ b/www/chromium/files/patch-components_supervised__user_core_common_features.cc @@ -1,54 +1,47 @@ ---- components/supervised_user/core/common/features.cc.orig 2024-02-23 21:04:38 UTC +--- components/supervised_user/core/common/features.cc.orig 2024-03-22 08:19:40 UTC +++ components/supervised_user/core/common/features.cc @@ -66,7 +66,7 @@ bool IsLocalWebApprovalsEnabled() { BASE_FEATURE(kFilterWebsitesForSupervisedUsersOnDesktopAndIOS, "FilterWebsitesForSupervisedUsersOnDesktopAndIOS", #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_IOS) + BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); @@ -74,7 +74,7 @@ BASE_FEATURE(kFilterWebsitesForSupervisedUsersOnDeskto BASE_FEATURE(kSupervisedPrefsControlledBySupervisedStore, "SupervisedPrefsControlledBySupervisedStore", -#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 base::FEATURE_DISABLED_BY_DEFAULT); -@@ -84,13 +84,13 @@ BASE_FEATURE(kSupervisedPrefsControlledBySupervisedSto +@@ -84,7 +84,7 @@ BASE_FEATURE(kSupervisedPrefsControlledBySupervisedSto // users in various UI surfaces. BASE_FEATURE(kEnableManagedByParentUi, "EnableManagedByParentUi", -#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 base::FEATURE_DISABLED_BY_DEFAULT); - #endif +@@ -94,7 +94,7 @@ BASE_FEATURE(kEnableSupervisedUserSkipParentApprovalTo + "EnableSupervisedUserSkipParentApprovalToInstallExtensions", + base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_FEATURE(kEnableExtensionsPermissionsForSupervisedUsersOnDesktop, "EnableExtensionsPermissionsForSupervisedUsersOnDesktop", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -111,7 +111,7 @@ bool CanDisplayFirstTimeInterstitialBanner() { - // their google account when cookies are cleared - BASE_FEATURE(kClearingCookiesKeepsSupervisedUsersSignedIn, - "ClearingCookiesKeepsSupervisedUsersSignedIn", --#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 - base::FEATURE_DISABLED_BY_DEFAULT); -@@ -152,7 +152,7 @@ bool IsChildAccountSupervisionEnabled() { +@@ -143,7 +143,7 @@ bool IsChildAccountSupervisionEnabled() { return base::FeatureList::IsEnabled( supervised_user:: kFilterWebsitesForSupervisedUsersOnDesktopAndIOS) || -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled( supervised_user:: kEnableExtensionsPermissionsForSupervisedUsersOnDesktop) || diff --git a/www/chromium/files/patch-components_supervised__user_core_common_features.h b/www/chromium/files/patch-components_supervised__user_core_common_features.h index faf91dffd546..89b0702f651c 100644 --- a/www/chromium/files/patch-components_supervised__user_core_common_features.h +++ b/www/chromium/files/patch-components_supervised__user_core_common_features.h @@ -1,11 +1,11 @@ ---- components/supervised_user/core/common/features.h.orig 2023-12-10 06:10:27 UTC +--- components/supervised_user/core/common/features.h.orig 2024-03-22 08:19:40 UTC +++ components/supervised_user/core/common/features.h -@@ -24,7 +24,7 @@ BASE_DECLARE_FEATURE(kEnableManagedByParentUi); - extern const base::FeatureParam kManagedByParentUiMoreInfoUrl; - BASE_DECLARE_FEATURE(kClearingCookiesKeepsSupervisedUsersSignedIn); +@@ -28,7 +28,7 @@ extern const base::FeatureParam kManagedB + BASE_DECLARE_FEATURE( + kEnableSupervisedUserSkipParentApprovalToInstallExtensions); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kEnableExtensionsPermissionsForSupervisedUsersOnDesktop); #endif diff --git a/www/chromium/files/patch-components_sync_base_features.cc b/www/chromium/files/patch-components_sync_base_features.cc index 615aa1c45b84..71eedf43533e 100644 --- a/www/chromium/files/patch-components_sync_base_features.cc +++ b/www/chromium/files/patch-components_sync_base_features.cc @@ -1,11 +1,11 @@ ---- components/sync/base/features.cc.orig 2024-02-23 21:04:38 UTC +--- components/sync/base/features.cc.orig 2024-03-22 08:19:40 UTC +++ components/sync/base/features.cc -@@ -113,7 +113,7 @@ BASE_FEATURE(kEnablePreferencesAccountStorage, +@@ -122,7 +122,7 @@ BASE_FEATURE(kEnablePreferencesAccountStorage, BASE_FEATURE(kSyncPollImmediatelyOnEveryStartup, "SyncPollImmediatelyOnEveryStartup2", #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/chromium/files/patch-components_user__education_views_help__bubble__view.cc b/www/chromium/files/patch-components_user__education_views_help__bubble__view.cc index 22b8f0f42e8c..2c23881a9d4d 100644 --- a/www/chromium/files/patch-components_user__education_views_help__bubble__view.cc +++ b/www/chromium/files/patch-components_user__education_views_help__bubble__view.cc @@ -1,11 +1,11 @@ ---- components/user_education/views/help_bubble_view.cc.orig 2024-01-30 07:53:34 UTC +--- components/user_education/views/help_bubble_view.cc.orig 2024-03-22 08:19:40 UTC +++ components/user_education/views/help_bubble_view.cc -@@ -1009,7 +1009,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect() const { +@@ -1011,7 +1011,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect() const { void HelpBubbleView::OnBeforeBubbleWidgetInit(views::Widget::InitParams* params, views::Widget* widget) const { BubbleDialogDelegateView::OnBeforeBubbleWidgetInit(params, widget); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Help bubbles anchored to menus may be clipped to their anchors' bounds, // resulting in visual errors, unless they use accelerated rendering. See // crbug.com/1445770 for details. diff --git a/www/chromium/files/patch-components_variations_service_variations__service.cc b/www/chromium/files/patch-components_variations_service_variations__service.cc index 0f02d30b0b80..ab6858c04cc7 100644 --- a/www/chromium/files/patch-components_variations_service_variations__service.cc +++ b/www/chromium/files/patch-components_variations_service_variations__service.cc @@ -1,11 +1,11 @@ ---- components/variations/service/variations_service.cc.orig 2024-02-23 21:04:38 UTC +--- components/variations/service/variations_service.cc.orig 2024-03-22 08:19:40 UTC +++ components/variations/service/variations_service.cc -@@ -98,7 +98,7 @@ std::string GetPlatformString() { +@@ -99,7 +99,7 @@ std::string GetPlatformString() { return "android"; #elif BUILDFLAG(IS_FUCHSIA) return "fuchsia"; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_SOLARIS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_BSD) // Default BSD and SOLARIS to Linux to not break those builds, although these // platforms are not officially supported by Chrome. return "linux"; diff --git a/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc b/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc index f21998db099a..77374ca3ad2e 100644 --- a/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc +++ b/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc @@ -1,11 +1,11 @@ ---- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2024-02-23 21:04:38 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2024-03-22 08:19:40 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl.cc -@@ -1549,7 +1549,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor +@@ -1519,7 +1519,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor ->GetDeviceQueue() ->GetVulkanPhysicalDevice(), VK_IMAGE_TILING_OPTIMAL, vk_format, yuv_color_space, ycbcr_info); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Textures that were allocated _on linux_ with ycbcr info came from // VaapiVideoDecoder, which exports using DRM format modifiers. return GrBackendFormats::MakeVk(gr_ycbcr_info, diff --git a/www/chromium/files/patch-components_viz_service_display_skia__renderer.cc b/www/chromium/files/patch-components_viz_service_display_skia__renderer.cc index 5c7d3a455163..ac00413cd507 100644 --- a/www/chromium/files/patch-components_viz_service_display_skia__renderer.cc +++ b/www/chromium/files/patch-components_viz_service_display_skia__renderer.cc @@ -1,11 +1,11 @@ ---- components/viz/service/display/skia_renderer.cc.orig 2024-02-23 21:04:38 UTC +--- components/viz/service/display/skia_renderer.cc.orig 2024-03-22 08:19:40 UTC +++ components/viz/service/display/skia_renderer.cc -@@ -1346,7 +1346,7 @@ void SkiaRenderer::ClearFramebuffer() { +@@ -1466,7 +1466,7 @@ void SkiaRenderer::ClearFramebuffer() { if (current_frame()->current_render_pass->has_transparent_background) { ClearCanvas(SkColors::kTransparent); } else { -#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) +#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // On DEBUG builds, opaque render passes are cleared to blue // to easily see regions that were not drawn on the screen. // ClearCavas() call causes slight pixel difference, so linux-ref and diff --git a/www/chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc b/www/chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc index 554b368d1904..2e300d44c8b4 100644 --- a/www/chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc +++ b/www/chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc @@ -1,20 +1,20 @@ ---- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2024-01-30 07:53:34 UTC +--- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2024-03-22 08:19:40 UTC +++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -@@ -109,7 +109,7 @@ RootCompositorFrameSinkImpl::Create( +@@ -112,7 +112,7 @@ RootCompositorFrameSinkImpl::Create( output_surface->SetNeedsSwapSizeNotifications( params->send_swap_size_notifications); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) // For X11, we need notify client about swap completion after resizing, so the // client can use it for synchronize with X11 WM. output_surface->SetNeedsSwapSizeNotifications(true); -@@ -713,7 +713,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw +@@ -712,7 +712,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw #if BUILDFLAG(IS_ANDROID) if (display_client_ && enable_swap_competion_callback_) display_client_->DidCompleteSwapWithSize(pixel_size); -#elif BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) if (display_client_ && pixel_size != last_swap_pixel_size_) { last_swap_pixel_size_ = pixel_size; display_client_->DidCompleteSwapWithNewSize(last_swap_pixel_size_); diff --git a/www/chromium/files/patch-content_app_content__main__runner__impl.cc b/www/chromium/files/patch-content_app_content__main__runner__impl.cc index aacc6ebb4a18..b67c231aaef1 100644 --- a/www/chromium/files/patch-content_app_content__main__runner__impl.cc +++ b/www/chromium/files/patch-content_app_content__main__runner__impl.cc @@ -1,122 +1,122 @@ ---- content/app/content_main_runner_impl.cc.orig 2024-02-23 21:04:38 UTC +--- content/app/content_main_runner_impl.cc.orig 2024-03-22 08:19:40 UTC +++ content/app/content_main_runner_impl.cc @@ -143,13 +143,13 @@ #include "content/browser/posix_file_descriptor_info_impl.h" #include "content/public/common/content_descriptors.h" -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) #include "content/public/common/zygote/zygote_fork_delegate_linux.h" #endif #endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/file_path_watcher_inotify.h" #include "base/native_library.h" #include "base/rand_util.h" @@ -187,6 +187,10 @@ #include "media/base/media_switches.h" #endif +#if BUILDFLAG(IS_BSD) +#include "base/system/sys_info.h" +#endif + #if BUILDFLAG(IS_ANDROID) #include "base/system/sys_info.h" #include "content/browser/android/battery_metrics.h" @@ -373,7 +377,7 @@ void InitializeZygoteSandboxForBrowserProcess( } #endif // BUILDFLAG(USE_ZYGOTE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if BUILDFLAG(ENABLE_PPAPI) // Loads the (native) libraries but does not initialize them (i.e., does not @@ -411,7 +415,10 @@ void PreloadLibraryCdms() { void PreSandboxInit() { // Ensure the /dev/urandom is opened. + // we use arc4random +#if !BUILDFLAG(IS_BSD) base::GetUrandomFD(); +#endif // May use sysinfo(), sched_getaffinity(), and open various /sys/ and /proc/ // files. @@ -423,9 +430,16 @@ void PreSandboxInit() { // https://boringssl.googlesource.com/boringssl/+/HEAD/SANDBOXING.md CRYPTO_pre_sandbox_init(); +#if BUILDFLAG(IS_BSD) + // "cache" the amount of physical memory before pledge(2) + base::SysInfo::AmountOfPhysicalMemoryMB(); +#endif + +#if !BUILDFLAG(IS_BSD) // Pre-read /proc/sys/fs/inotify/max_user_watches so it doesn't have to be // allowed by the sandbox. base::GetMaxNumberOfInotifyWatches(); +#endif #if BUILDFLAG(ENABLE_PPAPI) // Ensure access to the Pepper plugins before the sandbox is turned on. -@@ -834,11 +848,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam - kFieldTrialDescriptor + base::GlobalDescriptors::kBaseDescriptor); +@@ -838,11 +852,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam + base::GlobalDescriptors::kBaseDescriptor); #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) g_fds->Set(kCrashDumpSignal, kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); -#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || - // BUILDFLAG(IS_OPENBSD) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #endif // !BUILDFLAG(IS_WIN) -@@ -1031,8 +1044,20 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -1035,8 +1048,20 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam process_type == switches::kZygoteProcess) { PreSandboxInit(); } +#elif BUILDFLAG(IS_BSD) + PreSandboxInit(); #endif +#if BUILDFLAG(IS_BSD) + if (process_type.empty()) { + sandbox::policy::SandboxLinux::Options sandbox_options; + sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox( + sandbox::policy::SandboxTypeFromCommandLine( + *base::CommandLine::ForCurrentProcess()), + sandbox::policy::SandboxLinux::PreSandboxHook(), sandbox_options); + } +#endif + delegate_->SandboxInitialized(process_type); #if BUILDFLAG(USE_ZYGOTE) -@@ -1100,7 +1125,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1104,7 +1129,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { ->ReconfigureAfterFeatureListInit(process_type); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If dynamic Mojo Core is being used, ensure that it's loaded very early in // the child/zygote process, before any sandbox is initialized. The library // is not fully initialized with IPC support until a ChildProcess is later -@@ -1135,6 +1160,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1139,6 +1164,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/chromium/files/patch-content_browser_BUILD.gn b/www/chromium/files/patch-content_browser_BUILD.gn index 18c4b72e122c..e8d75b0234ce 100644 --- a/www/chromium/files/patch-content_browser_BUILD.gn +++ b/www/chromium/files/patch-content_browser_BUILD.gn @@ -1,16 +1,16 @@ ---- content/browser/BUILD.gn.orig 2024-02-23 21:04:38 UTC +--- content/browser/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ content/browser/BUILD.gn -@@ -2457,6 +2457,13 @@ source_set("browser") { +@@ -2476,6 +2476,13 @@ source_set("browser") { deps += [ "//media/mojo/mojom/stable:stable_video_decoder" ] } + if (is_bsd) { + sources -= [ + "sandbox_ipc_linux.cc", + "sandbox_ipc_linux.h", + ] + } + if (is_chromeos) { sources += [ "handwriting/handwriting_recognition_service_impl_cros.cc", diff --git a/www/chromium/files/patch-content_browser_browser__child__process__host__impl.cc b/www/chromium/files/patch-content_browser_browser__child__process__host__impl.cc index adcdeed1dd64..a436ee6f07ee 100644 --- a/www/chromium/files/patch-content_browser_browser__child__process__host__impl.cc +++ b/www/chromium/files/patch-content_browser_browser__child__process__host__impl.cc @@ -1,19 +1,19 @@ ---- content/browser/browser_child_process_host_impl.cc.orig 2024-02-23 21:04:38 UTC +--- content/browser/browser_child_process_host_impl.cc.orig 2024-03-22 08:19:40 UTC +++ content/browser/browser_child_process_host_impl.cc @@ -326,6 +326,7 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo switches::kDisableBestEffortTasks, switches::kDisableLogging, switches::kEnableLogging, + switches::kDisableUnveil, switches::kIPCConnectionTimeout, switches::kLogBestEffortTasks, switches::kLogFile, -@@ -635,7 +636,7 @@ void BrowserChildProcessHostImpl::OnProcessLaunched() +@@ -650,7 +651,7 @@ void BrowserChildProcessHostImpl::OnProcessLaunched() ->child_process()); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) child_thread_type_switcher_.SetPid(process.Pid()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/chromium/files/patch-content_browser_browser__main__loop.cc b/www/chromium/files/patch-content_browser_browser__main__loop.cc index eeed6943712b..9dc4630888eb 100644 --- a/www/chromium/files/patch-content_browser_browser__main__loop.cc +++ b/www/chromium/files/patch-content_browser_browser__main__loop.cc @@ -1,37 +1,37 @@ ---- content/browser/browser_main_loop.cc.orig 2024-02-23 21:04:38 UTC +--- content/browser/browser_main_loop.cc.orig 2024-03-22 08:19:40 UTC +++ content/browser/browser_main_loop.cc -@@ -249,6 +249,12 @@ +@@ -250,6 +250,12 @@ #include "mojo/public/cpp/bindings/lib/test_random_mojo_delays.h" #endif +#if BUILDFLAG(IS_BSD) +#include "content/browser/sandbox_host_linux.h" +#include "content/public/common/zygote/sandbox_support_linux.h" +#include "sandbox/policy/sandbox.h" +#endif + // One of the linux specific headers defines this as a macro. #ifdef DestroyAll #undef DestroyAll -@@ -554,6 +560,12 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -555,6 +561,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 -@@ -591,7 +603,7 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -592,7 +604,7 @@ int BrowserMainLoop::EarlyInitialization() { base::PlatformThread::SetCurrentThreadType(base::ThreadType::kCompositing); #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // We use quite a few file descriptors for our IPC as well as disk the disk // cache, and the default limit on Apple is low (256), so bump it up. diff --git a/www/chromium/files/patch-content_browser_child__process__launcher__helper.h b/www/chromium/files/patch-content_browser_child__process__launcher__helper.h index dc352d3f3b73..7130e42a209b 100644 --- a/www/chromium/files/patch-content_browser_child__process__launcher__helper.h +++ b/www/chromium/files/patch-content_browser_child__process__launcher__helper.h @@ -1,11 +1,11 @@ ---- content/browser/child_process_launcher_helper.h.orig 2024-02-23 21:04:38 UTC +--- content/browser/child_process_launcher_helper.h.orig 2024-03-22 08:19:40 UTC +++ content/browser/child_process_launcher_helper.h -@@ -269,7 +269,7 @@ class ChildProcessLauncherHelper +@@ -271,7 +271,7 @@ class ChildProcessLauncherHelper std::unique_ptr delegate_; base::WeakPtr child_process_launcher_; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The priority of the process. The state is stored to avoid changing the // setting repeatedly. std::optional priority_; diff --git a/www/chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc b/www/chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc index f8b1077684c0..5b3f6ee6c17c 100644 --- a/www/chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc +++ b/www/chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc @@ -1,11 +1,11 @@ ---- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2023-11-03 10:09:45 UTC +--- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2024-03-22 08:19:40 UTC +++ content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1783,7 +1783,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( +@@ -1807,7 +1807,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( UMA_HISTOGRAM_ENUMERATION("GPU.CompositingMode", compositing_mode); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool GpuDataManagerImplPrivate::IsGpuMemoryBufferNV12Supported() { return is_gpu_memory_buffer_NV12_supported_; } diff --git a/www/chromium/files/patch-content_browser_gpu_gpu__process__host.cc b/www/chromium/files/patch-content_browser_gpu_gpu__process__host.cc index 6744d4521117..38727bd529f0 100644 --- a/www/chromium/files/patch-content_browser_gpu_gpu__process__host.cc +++ b/www/chromium/files/patch-content_browser_gpu_gpu__process__host.cc @@ -1,19 +1,19 @@ ---- content/browser/gpu/gpu_process_host.cc.orig 2024-02-23 21:04:38 UTC +--- content/browser/gpu/gpu_process_host.cc.orig 2024-03-22 08:19:40 UTC +++ content/browser/gpu/gpu_process_host.cc -@@ -256,6 +256,7 @@ static const char* const kSwitchNames[] = { +@@ -261,6 +261,7 @@ static const char* const kSwitchNames[] = { switches::kEnableGpuRasterization, switches::kEnableSkiaGraphite, switches::kEnableLogging, + switches::kDisableUnveil, switches::kDoubleBufferCompositing, switches::kHeadless, switches::kLoggingLevel, -@@ -290,7 +291,7 @@ static const char* const kSwitchNames[] = { +@@ -295,7 +296,7 @@ static const char* const kSwitchNames[] = { switches::kDisableExplicitDmaFences, switches::kOzoneDumpFile, #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) switches::kX11Display, switches::kNoXshm, #endif diff --git a/www/chromium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc b/www/chromium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc index bfdcae66a2f9..d3eba0b54393 100644 --- a/www/chromium/files/patch-content_browser_media_media__keys__listener__manager__impl.cc +++ b/www/chromium/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 2024-01-30 07:53:34 UTC +--- content/browser/media/media_keys_listener_manager_impl.cc.orig 2024-03-22 08:19:40 UTC +++ content/browser/media/media_keys_listener_manager_impl.cc -@@ -300,7 +300,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMe +@@ -334,7 +334,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMe } #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Create SystemMediaControls with the SingletonHwnd. browser_system_media_controls_ = system_media_controls::SystemMediaControls::Create( diff --git a/www/chromium/files/patch-content_browser_renderer__host_delegated__frame__host.cc b/www/chromium/files/patch-content_browser_renderer__host_delegated__frame__host.cc index 590915ef173e..d833c8e5f7d5 100644 --- a/www/chromium/files/patch-content_browser_renderer__host_delegated__frame__host.cc +++ b/www/chromium/files/patch-content_browser_renderer__host_delegated__frame__host.cc @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/delegated_frame_host.cc.orig 2024-01-30 07:53:34 UTC +--- content/browser/renderer_host/delegated_frame_host.cc.orig 2024-03-22 08:19:40 UTC +++ content/browser/renderer_host/delegated_frame_host.cc -@@ -317,7 +317,7 @@ void DelegatedFrameHost::EmbedSurface( +@@ -318,7 +318,7 @@ void DelegatedFrameHost::EmbedSurface( if (!primary_surface_id || primary_surface_id->local_surface_id() != local_surface_id_) { -#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) // On Windows and Linux, we would like to produce new content as soon as // possible or the OS will create an additional black gutter. Until we can // block resize on surface synchronization on these platforms, we will not diff --git a/www/chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc b/www/chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc index f148e61236cd..54ee1950b4fd 100644 --- a/www/chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc +++ b/www/chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc @@ -1,64 +1,64 @@ ---- content/browser/renderer_host/render_process_host_impl.cc.orig 2024-02-29 08:25:16 UTC +--- content/browser/renderer_host/render_process_host_impl.cc.orig 2024-03-22 08:19:40 UTC +++ content/browser/renderer_host/render_process_host_impl.cc @@ -224,7 +224,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 @@ -966,7 +966,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; -@@ -1154,7 +1154,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1148,7 +1148,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public IOThreadHostImpl& operator=(const IOThreadHostImpl& other) = delete; void SetPid(base::ProcessId child_pid) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) child_thread_type_switcher_.SetPid(child_pid); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } -@@ -1171,7 +1171,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1165,7 +1165,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; -@@ -1265,7 +1265,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1259,7 +1259,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public std::unique_ptr binders_; mojo::Receiver receiver_{this}; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::Remote video_encode_accelerator_factory_remote_; ChildThreadTypeSwitcher child_thread_type_switcher_; -@@ -3377,7 +3377,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( +@@ -3352,7 +3352,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( base::TimeTicks::UnixEpoch().since_origin().InMicroseconds())); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Append `kDisableVideoCaptureUseGpuMemoryBuffer` flag if there is no support // for NV12 GPU memory buffer. if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled() && -@@ -3437,6 +3437,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin +@@ -3412,6 +3412,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, switches::kDisableTouchDragDrop, + switches::kDisableUnveil, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, switches::kDisableWebGLImageChromium, diff --git a/www/chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h b/www/chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h index 95c43d96de61..b37628f18aaf 100644 --- a/www/chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h +++ b/www/chromium/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 2024-02-23 21:04:38 UTC +--- content/browser/renderer_host/render_process_host_impl.h.orig 2024-03-22 08:19:40 UTC +++ content/browser/renderer_host/render_process_host_impl.h -@@ -543,7 +543,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -548,7 +548,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/chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc b/www/chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc index 60633f68b228..46e9ad7e916f 100644 --- a/www/chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc +++ b/www/chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc @@ -1,47 +1,47 @@ ---- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2024-02-23 21:04:38 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2024-03-22 08:19:40 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -120,7 +120,7 @@ +@@ -118,7 +118,7 @@ #include "ui/gfx/gdi_util.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/browser/accessibility/browser_accessibility_auralinux.h" #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/base/ime/text_input_flags.h" -@@ -458,7 +458,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge +@@ -451,7 +451,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge return ToBrowserAccessibilityWin(manager->GetBrowserAccessibilityRoot()) ->GetCOM(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BrowserAccessibilityManager* manager = host()->GetOrCreateRootBrowserAccessibilityManager(); if (manager && manager->GetBrowserAccessibilityRoot()) -@@ -1696,7 +1696,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { +@@ -1694,7 +1694,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) { -@@ -2540,7 +2540,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -2526,7 +2526,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; -@@ -2723,7 +2723,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -2710,7 +2710,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit if (!target_host) return; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* linux_ui = ui::LinuxUi::instance(); std::vector commands; if (!event.skip_if_unhandled && linux_ui && event.os_event && diff --git a/www/chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h b/www/chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h index 549fd19eaa1b..982104643768 100644 --- a/www/chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h +++ b/www/chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.h @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/render_widget_host_view_aura.h.orig 2024-02-23 21:04:38 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.h.orig 2024-03-22 08:19:40 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.h -@@ -256,7 +256,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura +@@ -258,7 +258,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/chromium/files/patch-content_browser_utility__process__host.cc b/www/chromium/files/patch-content_browser_utility__process__host.cc index bd4a044fd450..3276fdb7b82f 100644 --- a/www/chromium/files/patch-content_browser_utility__process__host.cc +++ b/www/chromium/files/patch-content_browser_utility__process__host.cc @@ -1,63 +1,63 @@ ---- content/browser/utility_process_host.cc.orig 2024-02-23 21:04:38 UTC +--- content/browser/utility_process_host.cc.orig 2024-03-22 08:19:40 UTC +++ content/browser/utility_process_host.cc @@ -61,7 +61,7 @@ #include "content/browser/v8_snapshot_files.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/file_util.h" #include "base/files/scoped_file.h" #include "base/pickle.h" @@ -75,7 +75,7 @@ #include "services/network/public/mojom/network_service.mojom.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "base/task/sequenced_task_runner.h" #include "components/viz/host/gpu_client.h" #include "media/capture/capture_switches.h" @@ -86,7 +86,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::ScopedFD PassNetworkContextParentDirs( std::vector network_context_parent_dirs) { base::Pickle pickle; @@ -150,7 +150,7 @@ UtilityProcessHost::UtilityProcessHost(std::unique_ptr started_(false), name_(u"utility process"), file_data_(std::make_unique()), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) gpu_client_(nullptr, base::OnTaskRunnerDeleter(nullptr)), #endif client_(std::move(client)) { -@@ -432,7 +432,7 @@ bool UtilityProcessHost::StartProcess() { +@@ -431,7 +431,7 @@ bool UtilityProcessHost::StartProcess() { file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload()); #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The network service should have access to the parent directories // necessary for its usage. if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork) { -@@ -443,13 +443,13 @@ bool UtilityProcessHost::StartProcess() { +@@ -442,13 +442,13 @@ bool UtilityProcessHost::StartProcess() { } #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) // Pass `kVideoCaptureUseGpuMemoryBuffer` flag to video capture service only // when the video capture use GPU memory buffer enabled. if (metrics_name_ == video_capture::mojom::VideoCaptureService::Name_) { bool pass_gpu_buffer_flag = switches::IsVideoCaptureUseGpuMemoryBufferEnabled(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Check if NV12 GPU memory buffer supported at the same time. pass_gpu_buffer_flag = pass_gpu_buffer_flag && diff --git a/www/chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc b/www/chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc index b498e7d739e1..1e0e0cef4b08 100644 --- a/www/chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc +++ b/www/chromium/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 2023-12-10 06:10:27 UTC +--- content/browser/web_contents/web_contents_view_aura.cc.orig 2024-03-22 08:19:40 UTC +++ content/browser/web_contents/web_contents_view_aura.cc @@ -174,7 +174,7 @@ class WebDragSourceAura : public content::WebContentsO raw_ptr window_; }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Fill out the OSExchangeData with a file contents, synthesizing a name if // necessary. void PrepareDragForFileContents(const DropData& drop_data, @@ -258,7 +258,7 @@ void PrepareDragData(const DropData& drop_data, if (!drop_data.download_metadata.empty()) PrepareDragForDownload(drop_data, provider, web_contents); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // We set the file contents before the URL because the URL also sets file // contents (to a .URL shortcut). We want to prefer file content data over // a shortcut so we add it first. -@@ -1319,7 +1319,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* +@@ -1322,7 +1322,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/chromium/files/patch-content_common_features.cc b/www/chromium/files/patch-content_common_features.cc index 62bdfb692a0b..69d40aa62b6d 100644 --- a/www/chromium/files/patch-content_common_features.cc +++ b/www/chromium/files/patch-content_common_features.cc @@ -1,20 +1,20 @@ ---- content/common/features.cc.orig 2024-02-23 21:04:38 UTC +--- content/common/features.cc.orig 2024-03-22 08:19:40 UTC +++ content/common/features.cc @@ -166,7 +166,7 @@ BASE_FEATURE(kEnableBackForwardCacheForOngoingSubframe base::FEATURE_DISABLED_BY_DEFAULT); // Enables error reporting for JS errors inside DevTools frontend host -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kEnableDevToolsJsErrorReporting, "EnableDevToolsJsErrorReporting", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -254,7 +254,7 @@ BASE_FEATURE(kGroupNIKByJoiningOrigin, +@@ -262,7 +262,7 @@ BASE_FEATURE(kGroupNIKByJoiningOrigin, // process and having browser process handle adjusting thread properties (nice // value, c-group, latency sensitivity...) for children which have sandbox // restrictions. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) BASE_FEATURE(kHandleChildThreadTypeChangesInBrowser, "HandleChildThreadTypeChangesInBrowser", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/chromium/files/patch-content_common_features.h b/www/chromium/files/patch-content_common_features.h index 70ccff7b94c3..0642480c9cea 100644 --- a/www/chromium/files/patch-content_common_features.h +++ b/www/chromium/files/patch-content_common_features.h @@ -1,20 +1,20 @@ ---- content/common/features.h.orig 2024-02-23 21:04:38 UTC +--- content/common/features.h.orig 2024-03-22 08:19:40 UTC +++ content/common/features.h @@ -37,7 +37,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kDocumentPolicyNeg CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableBackForwardCacheForScreenReader); CONTENT_EXPORT BASE_DECLARE_FEATURE( kEnableBackForwardCacheForOngoingSubframeNavigation); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableDevToolsJsErrorReporting); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnsureAllowBindingsIsAlwaysForWebUI); -@@ -58,7 +58,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kForwardMemoryPres +@@ -61,7 +61,7 @@ CONTENT_EXPORT extern const base::FeatureParam CONTENT_EXPORT BASE_DECLARE_FEATURE(kGpuInfoCollectionSeparatePrefetch); #endif CONTENT_EXPORT BASE_DECLARE_FEATURE(kGroupNIKByJoiningOrigin); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT BASE_DECLARE_FEATURE(kHandleChildThreadTypeChangesInBrowser); #endif CONTENT_EXPORT BASE_DECLARE_FEATURE(kHighPriorityBeforeUnload); diff --git a/www/chromium/files/patch-content_gpu_gpu__main.cc b/www/chromium/files/patch-content_gpu_gpu__main.cc index 5f8e14ac6b08..2cc852a2044e 100644 --- a/www/chromium/files/patch-content_gpu_gpu__main.cc +++ b/www/chromium/files/patch-content_gpu_gpu__main.cc @@ -1,66 +1,66 @@ ---- content/gpu/gpu_main.cc.orig 2024-01-30 07:53:34 UTC +--- content/gpu/gpu_main.cc.orig 2024-03-22 08:19:40 UTC +++ content/gpu/gpu_main.cc @@ -91,7 +91,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/child/sandboxed_process_thread_type_handler.h" #include "content/common/gpu_pre_sandbox_hook_linux.h" #include "sandbox/policy/linux/sandbox_linux.h" @@ -114,7 +114,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&); @@ -179,7 +179,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel bool EnsureSandboxInitialized(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) override { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs); #elif BUILDFLAG(IS_WIN) return StartSandboxWindows(sandbox_info_); @@ -291,7 +291,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 -@@ -330,7 +330,8 @@ int GpuMain(MainFunctionParams parameters) { +@@ -328,7 +328,8 @@ int GpuMain(MainFunctionParams parameters) { // before it. InitializeSkia(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +// XXX BSD +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) // Thread type delegate of the process should be registered before // first thread type change in ChildProcess constructor. // It also needs to be registered before the process has multiple threads, -@@ -438,7 +439,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -436,7 +437,7 @@ int GpuMain(MainFunctionParams parameters) { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) { -@@ -478,7 +479,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo +@@ -476,7 +477,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo sandbox_options.accelerated_video_encode_enabled = !gpu_prefs.disable_accelerated_video_encode; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Video decoding of many video streams can use thousands of FDs as well as // Exo clients like Lacros. // See https://crbug.com/1417237 diff --git a/www/chromium/files/patch-content_public_browser_content__browser__client.cc b/www/chromium/files/patch-content_public_browser_content__browser__client.cc index 1e113e19f2ab..cfcd065d69db 100644 --- a/www/chromium/files/patch-content_public_browser_content__browser__client.cc +++ b/www/chromium/files/patch-content_public_browser_content__browser__client.cc @@ -1,11 +1,11 @@ ---- content/public/browser/content_browser_client.cc.orig 2024-02-23 21:04:38 UTC +--- content/public/browser/content_browser_client.cc.orig 2024-03-22 08:19:40 UTC +++ content/public/browser/content_browser_client.cc -@@ -1273,7 +1273,7 @@ bool ContentBrowserClient::ShouldRunOutOfProcessSystem +@@ -1277,7 +1277,7 @@ bool ContentBrowserClient::ShouldRunOutOfProcessSystem // that can be adequately sandboxed. // Currently Android's network service will not run out of process or sandboxed, // so OutOfProcessSystemDnsResolution is not currently enabled on Android. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/chromium/files/patch-content_public_common_content__features.cc b/www/chromium/files/patch-content_public_common_content__features.cc index 35a1f2b35c92..1006428f467c 100644 --- a/www/chromium/files/patch-content_public_common_content__features.cc +++ b/www/chromium/files/patch-content_public_common_content__features.cc @@ -1,50 +1,41 @@ ---- content/public/common/content_features.cc.orig 2024-02-23 21:04:38 UTC +--- content/public/common/content_features.cc.orig 2024-03-22 08:19:40 UTC +++ content/public/common/content_features.cc -@@ -40,7 +40,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, +@@ -32,7 +32,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, "AudioServiceOutOfProcess", // TODO(crbug.com/1052397): Remove !IS_CHROMEOS_LACROS once lacros starts being // built with OS_CHROMEOS instead of OS_LINUX. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) base::FEATURE_ENABLED_BY_DEFAULT #else -@@ -52,7 +52,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, +@@ -44,7 +44,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, // kAudioServiceOutOfProcess feature is enabled. 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 -@@ -664,7 +664,7 @@ BASE_FEATURE(kOverscrollHistoryNavigation, - // Setting to control overscroll history navigation. - BASE_FEATURE(kOverscrollHistoryNavigationSetting, - "OverscrollHistoryNavigationSetting", --#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 -@@ -1208,7 +1208,7 @@ BASE_FEATURE(kWebAssemblyTiering, +@@ -1179,7 +1179,7 @@ BASE_FEATURE(kWebAssemblyTiering, BASE_FEATURE(kWebAssemblyTrapHandler, "WebAssemblyTrapHandler", #if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC)) && \ + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) && \ defined(ARCH_CPU_X86_64)) || \ (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) base::FEATURE_ENABLED_BY_DEFAULT -@@ -1250,7 +1250,11 @@ BASE_FEATURE(kWebUICodeCache, +@@ -1221,7 +1221,11 @@ BASE_FEATURE(kWebUICodeCache, // Controls whether the WebUSB API is enabled: // https://wicg.github.io/webusb +#if BUILDFLAG(IS_BSD) +BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_DISABLED_BY_DEFAULT); +#else BASE_FEATURE(kWebUsb, "WebUSB", base::FEATURE_ENABLED_BY_DEFAULT); +#endif // Controls whether the WebXR Device API is enabled. BASE_FEATURE(kWebXr, "WebXR", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/www/chromium/files/patch-content_renderer_render__thread__impl.cc b/www/chromium/files/patch-content_renderer_render__thread__impl.cc index 181a636db478..46274313602c 100644 --- a/www/chromium/files/patch-content_renderer_render__thread__impl.cc +++ b/www/chromium/files/patch-content_renderer_render__thread__impl.cc @@ -1,38 +1,38 @@ ---- content/renderer/render_thread_impl.cc.orig 2024-02-23 21:04:38 UTC +--- content/renderer/render_thread_impl.cc.orig 2024-03-22 08:19:40 UTC +++ content/renderer/render_thread_impl.cc @@ -203,6 +203,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif -@@ -942,7 +944,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -996,7 +998,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: kGpuStreamIdMedia, kGpuStreamPriorityMedia); const bool enable_video_decode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) && #endif // BUILDFLAG(IS_LINUX) !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) && -@@ -951,7 +953,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1005,7 +1007,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: gpu::kGpuFeatureStatusEnabled); const bool enable_video_encode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux) && #else !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoEncode) && -@@ -1740,7 +1742,7 @@ std::unique_ptr RenderThreadImpl::Create +@@ -1753,7 +1755,7 @@ std::unique_ptr RenderThreadImpl::Create bool enable_video_encode_accelerator) { mojo::PendingRemote vea_provider; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(media::kUseOutOfProcessVideoEncoding)) { BindHostReceiver(vea_provider.InitWithNewPipeAndPassReceiver()); } else { diff --git a/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc b/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc index 74fc3c2f5231..d1ad91623417 100644 --- a/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc +++ b/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc @@ -1,45 +1,45 @@ ---- content/renderer/renderer_blink_platform_impl.cc.orig 2024-02-23 21:04:38 UTC +--- content/renderer/renderer_blink_platform_impl.cc.orig 2024-03-22 08:19:40 UTC +++ content/renderer/renderer_blink_platform_impl.cc -@@ -114,7 +114,7 @@ +@@ -116,7 +116,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" #include "content/child/sandboxed_process_thread_type_handler.h" #endif -@@ -184,13 +184,13 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -186,13 +186,13 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( is_locked_to_site_(false), main_thread_scheduler_(main_thread_scheduler), next_frame_sink_id_(uint32_t{std::numeric_limits::max()} + 1) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sk_sp font_loader; #endif // 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()); -@@ -199,7 +199,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -201,7 +201,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(); -@@ -260,7 +260,7 @@ void RendererBlinkPlatformImpl::SetThreadType(base::Pl +@@ -262,7 +262,7 @@ void RendererBlinkPlatformImpl::SetThreadType(base::Pl #endif blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return sandbox_support_.get(); #else // These platforms do not require sandbox support. diff --git a/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.h b/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.h index 4588d483eb6f..0f22f424c194 100644 --- a/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.h +++ b/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.h @@ -1,11 +1,11 @@ ---- content/renderer/renderer_blink_platform_impl.h.orig 2024-02-23 21:04:38 UTC +--- content/renderer/renderer_blink_platform_impl.h.orig 2024-03-22 08:19:40 UTC +++ content/renderer/renderer_blink_platform_impl.h -@@ -246,7 +246,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -247,7 +247,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 diff --git a/www/chromium/files/patch-content_shell_BUILD.gn b/www/chromium/files/patch-content_shell_BUILD.gn index 990e25cb8a07..52391dfe1bbd 100644 --- a/www/chromium/files/patch-content_shell_BUILD.gn +++ b/www/chromium/files/patch-content_shell_BUILD.gn @@ -1,11 +1,11 @@ ---- content/shell/BUILD.gn.orig 2024-01-30 07:53:34 UTC +--- content/shell/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ content/shell/BUILD.gn -@@ -1030,7 +1030,7 @@ group("content_shell_crash_test") { +@@ -1027,7 +1027,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/chromium/files/patch-content_shell_app_shell__main__delegate.cc b/www/chromium/files/patch-content_shell_app_shell__main__delegate.cc index fa4e2a937fc8..31e54525c09e 100644 --- a/www/chromium/files/patch-content_shell_app_shell__main__delegate.cc +++ b/www/chromium/files/patch-content_shell_app_shell__main__delegate.cc @@ -1,11 +1,11 @@ ---- content/shell/app/shell_main_delegate.cc.orig 2023-12-10 06:10:27 UTC +--- content/shell/app/shell_main_delegate.cc.orig 2024-03-22 08:19:40 UTC +++ content/shell/app/shell_main_delegate.cc -@@ -227,7 +227,7 @@ void ShellMainDelegate::PreSandboxStartup() { +@@ -223,7 +223,7 @@ void ShellMainDelegate::PreSandboxStartup() { // Reporting for sub-processes will be initialized in ZygoteForked. if (process_type != switches::kZygoteProcess) { crash_reporter::InitializeCrashpad(process_type.empty(), process_type); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) crash_reporter::SetFirstChanceExceptionHandler( v8::TryHandleWebAssemblyTrapPosix); #endif diff --git a/www/chromium/files/patch-content_test_BUILD.gn b/www/chromium/files/patch-content_test_BUILD.gn index 462858df56c0..5c7e5a36990f 100644 --- a/www/chromium/files/patch-content_test_BUILD.gn +++ b/www/chromium/files/patch-content_test_BUILD.gn @@ -1,20 +1,20 @@ ---- content/test/BUILD.gn.orig 2024-02-23 21:04:38 UTC +--- content/test/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ content/test/BUILD.gn -@@ -2262,7 +2262,7 @@ static_library("run_all_unittests") { +@@ -2278,7 +2278,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" ] } } -@@ -3373,7 +3373,7 @@ test("content_unittests") { +@@ -3388,7 +3388,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/chromium/files/patch-content_utility_services.cc b/www/chromium/files/patch-content_utility_services.cc index ff1a6eb5e3b8..531f6b8528dc 100644 --- a/www/chromium/files/patch-content_utility_services.cc +++ b/www/chromium/files/patch-content_utility_services.cc @@ -1,92 +1,92 @@ ---- content/utility/services.cc.orig 2024-02-23 21:04:38 UTC +--- content/utility/services.cc.orig 2024-03-22 08:19:40 UTC +++ content/utility/services.cc @@ -67,7 +67,7 @@ extern sandbox::TargetServices* g_utility_target_services; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "media/mojo/services/mojo_video_encode_accelerator_provider_factory.h" #include "sandbox/linux/services/libc_interceptor.h" #include "sandbox/policy/mojom/sandbox.mojom.h" @@ -90,7 +90,7 @@ extern sandbox::TargetServices* g_utility_target_servi #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) #include "content/common/features.h" #include "media/mojo/services/stable_video_decoder_factory_process_service.h" // nogncheck @@ -107,7 +107,7 @@ extern sandbox::TargetServices* g_utility_target_servi #include "ui/accessibility/accessibility_features.h" #endif // BUILDFLAG(ENABLE_ACCESSIBILITY_SERVICE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "media/capture/capture_switches.h" #include "services/viz/public/cpp/gpu/gpu.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || @@ -226,7 +226,7 @@ auto RunAudio(mojo::PendingReceiver receiver) { +@@ -312,7 +312,7 @@ auto RunVideoCapture( + #endif // BUILDFLAG(IS_CHROMEOS_ASH) auto service = std::make_unique( std::move(receiver), base::SingleThreadTaskRunner::GetCurrentDefault()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_CHROMEOS_ASH) { #else -@@ -352,7 +352,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( +@@ -356,7 +356,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) auto RunStableVideoDecoderFactoryProcessService( mojo::PendingReceiver< -@@ -363,7 +363,7 @@ auto RunStableVideoDecoderFactoryProcessService( +@@ -367,7 +367,7 @@ auto RunStableVideoDecoderFactoryProcessService( #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) auto RunVideoEncodeAcceleratorProviderFactory( mojo::PendingReceiver receiver) { -@@ -386,7 +386,7 @@ void RegisterIOThreadServices(mojo::ServiceFactory& se +@@ -390,7 +390,7 @@ void RegisterIOThreadServices(mojo::ServiceFactory& se // loop of type IO that can get notified when pipes have data. services.Add(RunNetworkService); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) if (base::FeatureList::IsEnabled( features::kRunStableVideoDecoderFactoryProcessServiceOnIOThread)) { -@@ -434,7 +434,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -438,7 +438,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) if (!base::FeatureList::IsEnabled( features::kRunStableVideoDecoderFactoryProcessServiceOnIOThread)) { -@@ -443,7 +443,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -447,7 +447,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) services.Add(RunVideoEncodeAcceleratorProviderFactory); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/chromium/files/patch-content_zygote_zygote__linux.cc b/www/chromium/files/patch-content_zygote_zygote__linux.cc index 83c8938e2c5b..6c2be1d7240c 100644 --- a/www/chromium/files/patch-content_zygote_zygote__linux.cc +++ b/www/chromium/files/patch-content_zygote_zygote__linux.cc @@ -1,15 +1,15 @@ ---- content/zygote/zygote_linux.cc.orig 2024-02-23 21:04:38 UTC +--- content/zygote/zygote_linux.cc.orig 2024-03-22 08:19:40 UTC +++ content/zygote/zygote_linux.cc @@ -1,6 +1,7 @@ // Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#if 0 #include "content/zygote/zygote_linux.h" -@@ -709,3 +710,4 @@ void Zygote::HandleReinitializeLoggingRequest(base::Pi +@@ -717,3 +718,4 @@ void Zygote::HandleReinitializeLoggingRequest(base::Pi } } // namespace content +#endif diff --git a/www/chromium/files/patch-device_bluetooth_bluetooth__adapter.cc b/www/chromium/files/patch-device_bluetooth_bluetooth__adapter.cc index e3bc6e26e5f7..7500f6258520 100644 --- a/www/chromium/files/patch-device_bluetooth_bluetooth__adapter.cc +++ b/www/chromium/files/patch-device_bluetooth_bluetooth__adapter.cc @@ -1,11 +1,11 @@ ---- device/bluetooth/bluetooth_adapter.cc.orig 2023-04-28 17:01:32 UTC +--- device/bluetooth/bluetooth_adapter.cc.orig 2024-03-22 08:19:40 UTC +++ device/bluetooth/bluetooth_adapter.cc -@@ -31,7 +31,7 @@ namespace device { +@@ -32,7 +32,7 @@ namespace device { BluetoothAdapter::ServiceOptions::ServiceOptions() = default; BluetoothAdapter::ServiceOptions::~ServiceOptions() = default; -#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) && \ +#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) && \ !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) // static scoped_refptr BluetoothAdapter::CreateAdapter() { diff --git a/www/chromium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc b/www/chromium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc index 857ae62066db..f1aa3cddf900 100644 --- a/www/chromium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc +++ b/www/chromium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc @@ -1,11 +1,11 @@ ---- extensions/browser/api/api_browser_context_keyed_service_factories.cc.orig 2023-12-10 06:10:27 UTC +--- extensions/browser/api/api_browser_context_keyed_service_factories.cc.orig 2024-03-22 08:19:40 UTC +++ extensions/browser/api/api_browser_context_keyed_service_factories.cc -@@ -107,7 +107,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt - MessagingAPIMessageFilter::EnsureAssociatedFactoryBuilt(); +@@ -102,7 +102,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt #endif + MessageService::GetFactoryInstance(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) NetworkingPrivateEventRouterFactory::GetInstance(); #endif OffscreenDocumentManager::GetFactory(); diff --git a/www/chromium/files/patch-extensions_browser_api_management_management__api.cc b/www/chromium/files/patch-extensions_browser_api_management_management__api.cc index daa0b3622e52..84f048583d83 100644 --- a/www/chromium/files/patch-extensions_browser_api_management_management__api.cc +++ b/www/chromium/files/patch-extensions_browser_api_management_management__api.cc @@ -1,11 +1,11 @@ ---- extensions/browser/api/management/management_api.cc.orig 2024-02-23 21:04:38 UTC +--- extensions/browser/api/management/management_api.cc.orig 2024-03-22 08:19:40 UTC +++ extensions/browser/api/management/management_api.cc -@@ -279,7 +279,7 @@ bool PlatformSupportsApprovalFlowForExtensions() { +@@ -280,7 +280,7 @@ bool PlatformSupportsApprovalFlowForExtensions() { #if BUILDFLAG(IS_CHROMEOS) // ChromeOS devices have this feature already shipped. return true; -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled( supervised_user::kEnableExtensionsPermissionsForSupervisedUsersOnDesktop); #else diff --git a/www/chromium/files/patch-extensions_browser_api_messaging_message__service.cc b/www/chromium/files/patch-extensions_browser_api_messaging_message__service.cc index b1f943f2ee61..72ae18751e3c 100644 --- a/www/chromium/files/patch-extensions_browser_api_messaging_message__service.cc +++ b/www/chromium/files/patch-extensions_browser_api_messaging_message__service.cc @@ -1,20 +1,20 @@ ---- extensions/browser/api/messaging/message_service.cc.orig 2024-02-23 21:04:38 UTC +--- extensions/browser/api/messaging/message_service.cc.orig 2024-03-22 08:19:40 UTC +++ extensions/browser/api/messaging/message_service.cc -@@ -70,7 +70,7 @@ namespace { +@@ -71,7 +71,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[] = -@@ -540,7 +540,7 @@ void MessageService::OpenChannelToNativeAppImpl( +@@ -541,7 +541,7 @@ void MessageService::OpenChannelToNativeAppImpl( 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/chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc b/www/chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc index 6166cb1bf916..da63bfef3b9c 100644 --- a/www/chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc +++ b/www/chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2023-12-10 06:10:27 UTC +--- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2024-03-22 08:19:40 UTC +++ gpu/command_buffer/service/gles2_cmd_decoder.cc -@@ -2999,7 +2999,7 @@ GLES2Decoder* GLES2Decoder::Create( +@@ -2984,7 +2984,7 @@ GLES2Decoder* GLES2Decoder::Create( } // Allow linux to run fuzzers. -#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return new GLES2DecoderImpl(client, command_buffer_service, outputter, group); #else LOG(FATAL) << "Validating command decoder is not supported."; diff --git a/www/chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc b/www/chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc index 734e3efc508f..f722a1c9ab3c 100644 --- a/www/chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc +++ b/www/chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2024-02-23 21:04:38 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2024-03-22 08:19:40 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing.cc -@@ -49,7 +49,7 @@ +@@ -50,7 +50,7 @@ #include "ui/gl/gl_version_info.h" #include "ui/gl/scoped_binders.h" -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) #include "gpu/command_buffer/service/shared_image/external_vk_image_dawn_representation.h" #if BUILDFLAG(DAWN_ENABLE_BACKEND_OPENGLES) #include "gpu/command_buffer/service/shared_image/dawn_gl_texture_representation.h" -@@ -679,7 +679,7 @@ std::unique_ptr ExternalVkIma +@@ -689,7 +689,7 @@ std::unique_ptr ExternalVkIma wgpu::BackendType backend_type, std::vector view_formats, scoped_refptr context_state) { -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) auto wgpu_format = ToDawnFormat(format()); if (wgpu_format == wgpu::TextureFormat::Undefined) { diff --git a/www/chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc b/www/chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc index 5198fb607a29..e4a7a7a32ac6 100644 --- a/www/chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc +++ b/www/chromium/files/patch-gpu_command__buffer_service_shared__image_external__vk__image__backing__factory.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig 2024-02-23 21:04:38 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc.orig 2024-03-22 08:19:40 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing_factory.cc @@ -147,7 +147,7 @@ bool IsFormatSupported(viz::SharedImageFormat format, } // namespace constexpr uint32_t kSupportedUsage = -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) - SHARED_IMAGE_USAGE_WEBGPU | SHARED_IMAGE_USAGE_WEBGPU_SWAP_CHAIN_TEXTURE | + SHARED_IMAGE_USAGE_WEBGPU_READ | SHARED_IMAGE_USAGE_WEBGPU_WRITE | + SHARED_IMAGE_USAGE_WEBGPU_SWAP_CHAIN_TEXTURE | SHARED_IMAGE_USAGE_WEBGPU_STORAGE_TEXTURE | - #endif diff --git a/www/chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc b/www/chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc index c92e85b32b73..7485b7a79566 100644 --- a/www/chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc +++ b/www/chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/shared_image_factory.cc.orig 2024-02-23 21:04:38 UTC +--- gpu/command_buffer/service/shared_image/shared_image_factory.cc.orig 2024-03-22 08:19:40 UTC +++ gpu/command_buffer/service/shared_image/shared_image_factory.cc -@@ -143,7 +143,7 @@ gfx::GpuMemoryBufferType GetNativeBufferType() { +@@ -144,7 +144,7 @@ gfx::GpuMemoryBufferType GetNativeBufferType() { return gfx::GpuMemoryBufferType::IO_SURFACE_BUFFER; #elif BUILDFLAG(IS_ANDROID) return gfx::GpuMemoryBufferType::ANDROID_HARDWARE_BUFFER; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return gfx::GpuMemoryBufferType::NATIVE_PIXMAP; #elif BUILDFLAG(IS_WIN) return gfx::GpuMemoryBufferType::DXGI_SHARED_HANDLE; diff --git a/www/chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc b/www/chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc index aab6383e94d9..514541e9f434 100644 --- a/www/chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc +++ b/www/chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__manager.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig 2024-02-23 21:04:38 UTC +--- gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig 2024-03-22 08:19:40 UTC +++ gpu/command_buffer/service/shared_image/shared_image_manager.cc -@@ -550,7 +550,7 @@ bool SharedImageManager::SupportsScanoutImages() { +@@ -568,7 +568,7 @@ bool SharedImageManager::SupportsScanoutImages() { return true; #elif BUILDFLAG(IS_ANDROID) return base::AndroidHardwareBufferCompat::IsSupportAvailable(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_native_pixmaps; diff --git a/www/chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc b/www/chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc index 2a68f9dda79c..9ab46c38f02e 100644 --- a/www/chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc +++ b/www/chromium/files/patch-gpu_command__buffer_service_shared__image_wrapped__sk__image__backing.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc.orig 2023-11-03 10:09:45 UTC +--- gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc.orig 2024-03-22 08:19:40 UTC +++ gpu/command_buffer/service/shared_image/wrapped_sk_image_backing.cc -@@ -212,7 +212,7 @@ bool WrappedSkImageBacking::Initialize(const std::stri +@@ -214,7 +214,7 @@ bool WrappedSkImageBacking::Initialize(const std::stri constexpr GrRenderable is_renderable = GrRenderable::kYes; constexpr GrProtected is_protected = GrProtected::kNo; -#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) +#if DCHECK_IS_ON() && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // Blue for single-planar and magenta-ish for multi-planar. SkColor4f fallback_color = format().is_single_plane() ? SkColors::kBlue : SkColors::kWhite; diff --git a/www/chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc b/www/chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc index fcb777019171..24c49af54cbe 100644 --- a/www/chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc +++ b/www/chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2024-02-23 21:04:38 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2024-03-22 08:19:40 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1243,7 +1243,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( +@@ -1239,7 +1239,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( force_fallback_adapter = true; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!shared_context_state_->GrContextIsVulkan() && !shared_context_state_->IsGraphiteDawnVulkan() && use_webgpu_adapter_ != WebGPUAdapterName::kOpenGLES) { -@@ -1895,7 +1895,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( +@@ -1891,7 +1891,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( } #if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_APPLE) && \ - !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX) + !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) if (usage & wgpu::TextureUsage::StorageBinding) { LOG(ERROR) << "AssociateMailbox: wgpu::TextureUsage::StorageBinding is NOT " "supported yet on this platform."; diff --git a/www/chromium/files/patch-gpu_config_gpu__finch__features.cc b/www/chromium/files/patch-gpu_config_gpu__finch__features.cc index f7f9f63744d5..8a0acb57a855 100644 --- a/www/chromium/files/patch-gpu_config_gpu__finch__features.cc +++ b/www/chromium/files/patch-gpu_config_gpu__finch__features.cc @@ -1,21 +1,20 @@ ---- gpu/config/gpu_finch_features.cc.orig 2024-01-30 07:53:34 UTC +--- gpu/config/gpu_finch_features.cc.orig 2024-03-22 08:19:40 UTC +++ gpu/config/gpu_finch_features.cc -@@ -63,7 +63,7 @@ bool IsDeviceBlocked(const char* field, const std::str - BASE_FEATURE(kUseGles2ForOopR, - "UseGles2ForOopR", - #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - base::FEATURE_DISABLED_BY_DEFAULT - #else - base::FEATURE_ENABLED_BY_DEFAULT -@@ -143,7 +143,8 @@ BASE_FEATURE(kAggressiveSkiaGpuResourcePurge, +@@ -131,7 +131,7 @@ const base::FeatureParam BASE_FEATURE(kDefaultEnableGpuRasterization, "DefaultEnableGpuRasterization", #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) -+ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ -+ BUILDFLAG(IS_BSD) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + #else + base::FEATURE_DISABLED_BY_DEFAULT +@@ -144,7 +144,7 @@ BASE_FEATURE(kCanvasOopRasterization, + "CanvasOopRasterization", + #if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_WIN) || \ + (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_ANDROID) || \ +- BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc b/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc index c539736175cf..93bb5eab9d3b 100644 --- a/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc +++ b/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc @@ -1,74 +1,74 @@ ---- gpu/ipc/service/gpu_init.cc.orig 2024-02-23 21:04:38 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2024-03-22 08:19:40 UTC +++ gpu/ipc/service/gpu_init.cc @@ -354,7 +354,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL enable_watchdog = false; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool gpu_sandbox_start_early = gpu_preferences_.gpu_sandbox_start_early; #else // !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) // For some reasons MacOSX's VideoToolbox might crash when called after @@ -391,7 +391,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. @@ -492,7 +492,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL gpu_preferences_.gr_context_type = GrContextType::kGL; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The ContentSandboxHelper is currently the only one implementation of // GpuSandboxHelper and it has no dependency. Except on Linux where // VaapiWrapper checks the GL implementation to determine which display @@ -574,7 +574,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; -@@ -731,7 +731,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -721,7 +721,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. -@@ -786,7 +786,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -776,7 +776,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } } } -#if BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE)) if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) { // https://rr-project.org/ is a Linux-only record-and-replay debugger that -@@ -940,7 +940,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -930,7 +930,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c } bool gl_disabled = gl::GetGLImplementation() == gl::kGLImplementationDisabled; -#if BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_CHROMEOS_DEVICE)) if (!gl_disabled && !gl_use_swiftshader_ && std::getenv("RUNNING_UNDER_RR")) { // https://rr-project.org/ is a Linux-only record-and-replay debugger that -@@ -1010,7 +1010,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -990,7 +990,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. diff --git a/www/chromium/files/patch-media_base_libaom__thread__wrapper.cc b/www/chromium/files/patch-media_base_libaom__thread__wrapper.cc new file mode 100644 index 000000000000..35e149fb275c --- /dev/null +++ b/www/chromium/files/patch-media_base_libaom__thread__wrapper.cc @@ -0,0 +1,24 @@ +--- media/base/libaom_thread_wrapper.cc.orig 2024-03-22 08:19:40 UTC ++++ media/base/libaom_thread_wrapper.cc +@@ -5,17 +5,21 @@ + #include "base/logging.h" + #include "media/base/codec_worker_impl.h" + #include "media/base/libvpx_thread_wrapper.h" ++#if !BUILDFLAG(IS_BSD) + #include "third_party/libaom/source/libaom/aom_util/aom_thread.h" ++#endif + + namespace media { + + void InitLibAomThreadWrapper() { ++#if !BUILDFLAG(IS_BSD) + const AVxWorkerInterface interface = + CodecWorkerImpl::GetCodecWorkerInterface(); + CHECK(aom_set_worker_interface(&interface)); ++#endif + } + + } // namespace media diff --git a/www/chromium/files/patch-media_base_libvpx__thread__wrapper.cc b/www/chromium/files/patch-media_base_libvpx__thread__wrapper.cc index 789d0b6eff9a..583b218fbdcd 100644 --- a/www/chromium/files/patch-media_base_libvpx__thread__wrapper.cc +++ b/www/chromium/files/patch-media_base_libvpx__thread__wrapper.cc @@ -1,24 +1,25 @@ ---- media/base/libvpx_thread_wrapper.cc.orig 2024-02-23 21:04:38 UTC +--- media/base/libvpx_thread_wrapper.cc.orig 2024-03-22 08:19:40 UTC +++ media/base/libvpx_thread_wrapper.cc -@@ -5,17 +5,21 @@ +@@ -5,11 +5,14 @@ #include "media/base/libvpx_thread_wrapper.h" #include "media/base/codec_worker_impl.h" -+#if !BUILDFLAG(IS_BSD) ++#if !BUILDFLAG(IS_OPENBSD) #include "third_party/libvpx/source/libvpx/vpx_util/vpx_thread.h" +#endif namespace media { void InitLibVpxThreadWrapper() { -+#if !BUILDFLAG(IS_BSD) ++#if !BUILDFLAG(IS_OPENBSD) const VPxWorkerInterface interface = CodecWorkerImpl::GetCodecWorkerInterface(); + VPxWorkerStatus, VPX_WORKER_STATUS_NOT_OK, +@@ -17,6 +20,7 @@ void InitLibVpxThreadWrapper() { + VPX_WORKER_STATUS_WORKING>::GetCodecWorkerInterface(); CHECK(vpx_set_worker_interface(&interface)); +#endif } } // namespace media diff --git a/www/chromium/files/patch-media_base_media__switches.cc b/www/chromium/files/patch-media_base_media__switches.cc index a4ebc3ae43c5..fcc53f033a85 100644 --- a/www/chromium/files/patch-media_base_media__switches.cc +++ b/www/chromium/files/patch-media_base_media__switches.cc @@ -1,94 +1,94 @@ ---- media/base/media_switches.cc.orig 2024-02-23 21:04:38 UTC +--- media/base/media_switches.cc.orig 2024-03-22 08:19:40 UTC +++ media/base/media_switches.cc @@ -21,7 +21,7 @@ #include "ui/gl/gl_features.h" #include "ui/gl/gl_utils.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/cpu.h" #endif @@ -368,8 +368,8 @@ BASE_FEATURE(kMacLoopbackAudioForScreenShare, "MacLoopbackAudioForScreenShare", base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_MAC) - -#if BUILDFLAG(IS_LINUX) + +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables system audio mirroring using pulseaudio. BASE_FEATURE(kPulseaudioLoopbackForCast, "PulseaudioLoopbackForCast", -@@ -605,7 +605,7 @@ BASE_FEATURE(kUseWritePixelsYUV, +@@ -608,7 +608,7 @@ BASE_FEATURE(kUseWritePixelsYUV, BASE_FEATURE(kUseMultiPlaneFormatForHardwareVideo, "UseMultiPlaneFormatForHardwareVideo", #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || \ -- BUILDFLAG(IS_LINUX) -+ BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +- BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -710,7 +710,7 @@ BASE_FEATURE(kFallbackAfterDecodeError, +@@ -721,7 +721,7 @@ BASE_FEATURE(kFallbackAfterDecodeError, // Show toolbar button that opens dialog for controlling media sessions. BASE_FEATURE(kGlobalMediaControls, "GlobalMediaControls", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -733,7 +733,7 @@ BASE_FEATURE(kGlobalMediaControlsCrOSUpdatedUI, +@@ -749,7 +749,7 @@ BASE_FEATURE(kGlobalMediaControlsUpdatedUI, // If enabled, users can request Media Remoting without fullscreen-in-tab. BASE_FEATURE(kMediaRemotingWithoutFullscreen, "MediaRemotingWithoutFullscreen", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -745,7 +745,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, +@@ -761,7 +761,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, BASE_FEATURE(kGlobalMediaControlsPictureInPicture, "GlobalMediaControlsPictureInPicture", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -774,7 +774,7 @@ BASE_FEATURE(kUnifiedAutoplay, +@@ -790,7 +790,7 @@ BASE_FEATURE(kUnifiedAutoplay, "UnifiedAutoplay", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enable vaapi video decoding on linux. This is already enabled by default on // chromeos, but needs an experiment on linux. BASE_FEATURE(kVaapiVideoDecodeLinux, -@@ -860,7 +860,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, +@@ -881,7 +881,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, "VaapiVp9SModeHWEncoding", base::FEATURE_DISABLED_BY_DEFAULT); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables the new V4L2StatefulVideoDecoder instead of V4L2VideoDecoder. BASE_FEATURE(kV4L2FlatStatelessVideoDecoder, "V4L2FlatStatelessVideoDecoder", -@@ -969,7 +969,7 @@ BASE_FEATURE(kLiveCaptionUseWaitK, +@@ -1000,7 +1000,7 @@ BASE_FEATURE(kLiveCaptionUseWaitK, // Live Caption can be used in multiple languages, as opposed to just English. BASE_FEATURE(kLiveCaptionMultiLanguage, "LiveCaptionMultiLanguage", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -1437,7 +1437,7 @@ BASE_FEATURE(kUseOutOfProcessVideoDecoding, +@@ -1472,7 +1472,7 @@ BASE_FEATURE(kUseOutOfProcessVideoDecoding, ); #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Spawn utility processes to perform hardware encode acceleration instead of // using the GPU process. BASE_FEATURE(kUseOutOfProcessVideoEncoding, diff --git a/www/chromium/files/patch-media_base_media__switches.h b/www/chromium/files/patch-media_base_media__switches.h index 1e9ed766838c..2cff3f25f3f9 100644 --- a/www/chromium/files/patch-media_base_media__switches.h +++ b/www/chromium/files/patch-media_base_media__switches.h @@ -1,38 +1,38 @@ ---- media/base/media_switches.h.orig 2024-02-23 21:04:38 UTC +--- media/base/media_switches.h.orig 2024-03-22 08:19:40 UTC +++ media/base/media_switches.h -@@ -307,7 +307,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlatformHEVCEncoder +@@ -313,7 +313,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlatformHEVCEncoder MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlaybackSpeedButton); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMediaEngagementData); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPreloadMetadataSuspend); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForCast); MEDIA_EXPORT BASE_DECLARE_FEATURE(kPulseaudioLoopbackForScreenShare); #endif // BUILDFLAG(IS_LINUX) -@@ -325,7 +325,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay); +@@ -331,7 +331,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseAndroidOverlayForSecureOnly); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseDecoderStreamForWebRTC); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMediaStream); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinux); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoDecodeLinuxGL); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVideoEncodeLinux); -@@ -344,7 +344,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLa +@@ -350,7 +350,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLa MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLayerHWEncoding); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEncoding); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatelessVideoDecoder); MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -471,7 +471,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kExposeOutOfProcessV +@@ -484,7 +484,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kExposeOutOfProcessV MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoDecoding); #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoEncoding); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/chromium/files/patch-media_base_video__frame.cc b/www/chromium/files/patch-media_base_video__frame.cc index 22a21c9deb49..b7873e8c2403 100644 --- a/www/chromium/files/patch-media_base_video__frame.cc +++ b/www/chromium/files/patch-media_base_video__frame.cc @@ -1,74 +1,74 @@ ---- media/base/video_frame.cc.orig 2024-02-23 21:04:38 UTC +--- media/base/video_frame.cc.orig 2024-03-22 08:19:40 UTC +++ media/base/video_frame.cc @@ -80,7 +80,7 @@ std::string VideoFrame::StorageTypeToString( return "OWNED_MEMORY"; case VideoFrame::STORAGE_SHMEM: return "SHMEM"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case VideoFrame::STORAGE_DMABUFS: return "DMABUFS"; #endif @@ -95,7 +95,7 @@ std::string VideoFrame::StorageTypeToString( // static bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) { return -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This is not strictly needed but makes explicit that, at VideoFrame // level, DmaBufs are not mappable from userspace. storage_type != VideoFrame::STORAGE_DMABUFS && -@@ -306,7 +306,7 @@ static absl::optional GetDefaultLayo +@@ -306,7 +306,7 @@ static std::optional GetDefaultLayou return VideoFrameLayout::CreateWithPlanes(format, coded_size, planes); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This class allows us to embed a vector into a scoped_refptr, and // thus to have several VideoFrames share the same set of DMABUF FDs. class VideoFrame::DmabufHolder @@ -636,7 +636,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM for (size_t i = 0; i < num_planes; ++i) planes[i].stride = gpu_memory_buffer->stride(i); uint64_t modifier = gfx::NativePixmapHandle::kNoModifier; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (gpu_memory_buffer->GetType() == gfx::NATIVE_PIXMAP) { const auto gmb_handle = gpu_memory_buffer->CloneHandle(); if (gmb_handle.is_null() || @@ -682,7 +682,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM return frame; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // static scoped_refptr VideoFrame::WrapExternalDmabufs( const VideoFrameLayout& layout, @@ -901,7 +901,7 @@ scoped_refptr VideoFrame::WrapVideoFrame( } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) DCHECK(frame->dmabuf_fds_); // If there are any |dmabuf_fds_| plugged in, we should refer them too. wrapping_frame->dmabuf_fds_ = frame->dmabuf_fds_; @@ -1312,7 +1312,7 @@ const gpu::MailboxHolder& VideoFrame::mailbox_holder( : mailbox_holders_[texture_index]; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) size_t VideoFrame::NumDmabufFds() const { return dmabuf_fds_->size(); } @@ -1429,7 +1429,7 @@ VideoFrame::VideoFrame(const VideoFrameLayout& layout, storage_type_(storage_type), visible_rect_(Intersection(visible_rect, gfx::Rect(layout.coded_size()))), natural_size_(natural_size), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) dmabuf_fds_(base::MakeRefCounted()), #endif timestamp_(timestamp), diff --git a/www/chromium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc b/www/chromium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc index 990bc46e7604..06fa56adfcbb 100644 --- a/www/chromium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc +++ b/www/chromium/files/patch-media_gpu_chromeos_libyuv__image__processor__backend.cc @@ -1,29 +1,29 @@ ---- media/gpu/chromeos/libyuv_image_processor_backend.cc.orig 2024-01-30 07:53:34 UTC +--- media/gpu/chromeos/libyuv_image_processor_backend.cc.orig 2024-03-22 08:19:40 UTC +++ media/gpu/chromeos/libyuv_image_processor_backend.cc -@@ -47,7 +47,7 @@ static constexpr struct { +@@ -48,7 +48,7 @@ static constexpr struct { #define CONV(in, out, trans, result) \ {Fourcc::in, Fourcc::out, Transform::trans, SupportResult::result} // Conversion. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) CONV(NV12, AR24, kConversion, Supported), #endif CONV(NV12, NV12, kConversion, Supported), -@@ -430,7 +430,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Vi +@@ -434,7 +434,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr fr->GetWritableVisibleData(VideoFrame::kUVPlane)), \ fr->stride(VideoFrame::kUVPlane) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define ARGB_DATA(fr) \ fr->GetWritableVisibleData(VideoFrame::kARGBPlane), \ fr->stride(VideoFrame::kARGBPlane) -@@ -573,7 +573,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Vi +@@ -595,7 +595,7 @@ int LibYUVImageProcessorBackend::DoConversion(const Fr } } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (output->format() == PIXEL_FORMAT_ARGB) { if (input_config_.fourcc == Fourcc(Fourcc::NV12)) { return LIBYUV_FUNC(NV12ToARGB, Y_UV_DATA(input), diff --git a/www/chromium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc b/www/chromium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc index 23b8754438a3..9c4c3b5704f1 100644 --- a/www/chromium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc +++ b/www/chromium/files/patch-media_gpu_chromeos_mailbox__video__frame__converter.cc @@ -1,11 +1,11 @@ ---- media/gpu/chromeos/mailbox_video_frame_converter.cc.orig 2024-01-30 07:53:34 UTC +--- media/gpu/chromeos/mailbox_video_frame_converter.cc.orig 2024-03-22 08:19:40 UTC +++ media/gpu/chromeos/mailbox_video_frame_converter.cc -@@ -61,7 +61,7 @@ viz::SharedImageFormat GetSharedImageFormat(gfx::Buffe +@@ -62,7 +62,7 @@ viz::SharedImageFormat GetSharedImageFormat(gfx::Buffe << static_cast(buffer_format); NOTREACHED_NORETURN(); } -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If format is true multiplanar format, we prefer external sampler on // ChromeOS and Linux. if (format.is_multi_plane()) { diff --git a/www/chromium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc b/www/chromium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc index 4570c8547b4e..e347be5170db 100644 --- a/www/chromium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc +++ b/www/chromium/files/patch-media_gpu_chromeos_platform__video__frame__utils.cc @@ -1,20 +1,29 @@ ---- media/gpu/chromeos/platform_video_frame_utils.cc.orig 2024-02-23 21:04:38 UTC +--- media/gpu/chromeos/platform_video_frame_utils.cc.orig 2024-03-22 08:19:40 UTC +++ media/gpu/chromeos/platform_video_frame_utils.cc @@ -68,7 +68,7 @@ static std::unique_ptr CreateGbmDevice( const base::FilePath dev_path(FILE_PATH_LITERAL( base::StrCat({drm_node_file_prefix, base::NumberToString(i)}))); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_V4L2_CODEC) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_V4L2_CODEC) const bool is_render_node = base::Contains(drm_node_file_prefix, "render"); // TODO(b/313513760): don't guard base::File::FLAG_WRITE behind -@@ -301,7 +301,7 @@ scoped_refptr CreateGpuMemoryBufferVideoFr +@@ -196,7 +196,7 @@ class GbmDeviceWrapper { + const bool is_intel_media_compression_enabled = + #if BUILDFLAG(IS_CHROMEOS) + base::FeatureList::IsEnabled(features::kEnableIntelMediaCompression); +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + false; + #endif + if (is_intel_media_compression_enabled) { +@@ -334,7 +334,7 @@ scoped_refptr CreateGpuMemoryBufferVideoFr const bool is_intel_media_compression_enabled = #if BUILDFLAG(IS_CHROMEOS) base::FeatureList::IsEnabled(features::kEnableIntelMediaCompression); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) false; #endif diff --git a/www/chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc b/www/chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc index 39447dbff63e..32bab1918ba0 100644 --- a/www/chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc +++ b/www/chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc @@ -1,28 +1,29 @@ ---- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2024-02-23 21:04:38 UTC +--- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2024-03-22 08:19:40 UTC +++ media/gpu/chromeos/video_decoder_pipeline.cc -@@ -1009,14 +1009,14 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1017,7 +1017,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( } #endif -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_VAAPI) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_VAAPI) // Linux should always use a custom allocator (to allocate buffers using // libva) and a PlatformVideoFramePool. CHECK(allocator.has_value()); - CHECK(main_frame_pool_->AsPlatformVideoFramePool()); +@@ -1027,7 +1027,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( + // to create NativePixmap-backed frames. main_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator( - *allocator); + *allocator, VideoFrame::STORAGE_GPU_MEMORY_BUFFER); -#elif BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_V4L2_CODEC) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_V4L2_CODEC) // Linux w/ V4L2 should not use a custom allocator // Only tested with video_decode_accelerator_tests // TODO(wenst@) Test with full Chromium Browser -@@ -1158,7 +1158,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1185,7 +1185,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( << " VideoFrames"; auxiliary_frame_pool_->set_parent_task_runner(decoder_task_runner_); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // TODO(nhebert): Change the storage type argument when |allocator| switches + // to create NativePixmap-backed frames. auxiliary_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator( - *allocator); - #endif diff --git a/www/chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc b/www/chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc index 014c591029b8..4a6cda343b9c 100644 --- a/www/chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc +++ b/www/chromium/files/patch-media_gpu_sandbox_hardware__video__decoding__sandbox__hook__linux.cc @@ -1,44 +1,44 @@ ---- media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc.orig 2023-07-16 15:47:57 UTC +--- media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc.orig 2024-03-22 08:19:40 UTC +++ media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.cc -@@ -15,7 +15,9 @@ +@@ -16,7 +16,9 @@ #include "media/gpu/vaapi/vaapi_wrapper.h" #endif +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; +#endif // TODO(b/195769334): the hardware video decoding sandbox is really only useful // when building with VA-API or V4L2 (otherwise, we're not really doing hardware -@@ -31,6 +33,7 @@ using sandbox::syscall_broker::BrokerFilePermission; +@@ -32,6 +34,7 @@ using sandbox::syscall_broker::BrokerFilePermission; namespace media { namespace { +#if !BUILDFLAG(IS_BSD) void AllowAccessToRenderNodes(std::vector& permissions, bool include_sys_dev_char, bool read_write) { -@@ -165,6 +168,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( +@@ -166,6 +169,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( NOTREACHED_NORETURN(); #endif // BUILDFLAG(USE_V4L2_CODEC) } +#endif } // namespace -@@ -180,6 +184,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( +@@ -181,6 +185,7 @@ bool HardwareVideoDecodingPreSandboxHookForV4L2( // (at least). bool HardwareVideoDecodingPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) using HardwareVideoDecodingProcessPolicy = sandbox::policy::HardwareVideoDecodingProcessPolicy; using PolicyType = -@@ -217,6 +222,7 @@ bool HardwareVideoDecodingPreSandboxHook( +@@ -227,6 +232,7 @@ bool HardwareVideoDecodingPreSandboxHook( sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess( command_set, permissions, sandbox::policy::SandboxLinux::PreSandboxHook(), options); +#endif return true; } diff --git a/www/chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc b/www/chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc index d0ef0d9c3153..55873e2d9c20 100644 --- a/www/chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc +++ b/www/chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc @@ -1,11 +1,11 @@ ---- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2024-02-23 21:04:38 UTC +--- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2024-03-22 08:19:40 UTC +++ media/gpu/vaapi/vaapi_video_decoder.cc -@@ -789,7 +789,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree +@@ -779,7 +779,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree const gfx::Size decoder_natural_size = aspect_ratio_.GetNaturalSize(decoder_visible_rect); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - absl::optional allocator = + std::optional allocator = base::BindRepeating(&AllocateCustomFrameProxy, weak_this_); std::vector candidates = { diff --git a/www/chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc b/www/chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc index 39f0d3a88a7d..0a290ec4307d 100644 --- a/www/chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc +++ b/www/chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc @@ -1,11 +1,11 @@ ---- media/gpu/vaapi/vaapi_wrapper.cc.orig 2024-02-23 21:04:38 UTC +--- media/gpu/vaapi/vaapi_wrapper.cc.orig 2024-03-22 08:19:40 UTC +++ media/gpu/vaapi/vaapi_wrapper.cc -@@ -66,7 +66,7 @@ +@@ -67,7 +67,7 @@ using media_gpu_vaapi::kModuleVa_prot; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/files/file_util.h" #include "base/strings/string_split.h" #endif diff --git a/www/chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc b/www/chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc index cb0ebd223e13..5eaec57ba456 100644 --- a/www/chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc +++ b/www/chromium/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc @@ -1,29 +1,29 @@ ---- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2024-02-23 21:04:38 UTC +--- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2024-03-22 08:19:40 UTC +++ media/video/gpu_memory_buffer_video_frame_pool.cc @@ -803,7 +803,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa } bool is_software_backed_video_frame = !video_frame->HasTextures(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) is_software_backed_video_frame &= !video_frame->HasDmaBufs(); #endif @@ -1285,7 +1285,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) is_webgpu_compatible = (gpu_memory_buffer != nullptr); if (is_webgpu_compatible) { is_webgpu_compatible &= -@@ -1305,7 +1305,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1307,7 +1307,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo gpu::SHARED_IMAGE_USAGE_DISPLAY_READ | gpu::SHARED_IMAGE_USAGE_SCANOUT; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1241537): Always add the flag once the // OzoneImageBacking is by default turned on. if (base::CommandLine::ForCurrentProcess()->HasSwitch( diff --git a/www/chromium/files/patch-media_video_video__encode__accelerator__adapter.cc b/www/chromium/files/patch-media_video_video__encode__accelerator__adapter.cc index 73a97a2592f2..d91dcd01f6eb 100644 --- a/www/chromium/files/patch-media_video_video__encode__accelerator__adapter.cc +++ b/www/chromium/files/patch-media_video_video__encode__accelerator__adapter.cc @@ -1,20 +1,20 @@ ---- media/video/video_encode_accelerator_adapter.cc.orig 2024-01-30 07:53:34 UTC +--- media/video/video_encode_accelerator_adapter.cc.orig 2024-03-22 08:19:40 UTC +++ media/video/video_encode_accelerator_adapter.cc -@@ -154,7 +154,7 @@ VideoEncodeAccelerator::Config SetUpVeaConfig( +@@ -160,7 +160,7 @@ VideoEncodeAccelerator::Config SetUpVeaConfig( if (is_rgb) config.input_format = PIXEL_FORMAT_I420; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (format != PIXEL_FORMAT_I420 || !VideoFrame::IsStorageTypeMappable(storage_type)) { // ChromeOS/Linux hardware video encoders supports I420 on-memory -@@ -479,7 +479,7 @@ void VideoEncodeAcceleratorAdapter::InitializeInternal +@@ -485,7 +485,7 @@ void VideoEncodeAcceleratorAdapter::InitializeInternal SetUpVeaConfig(profile_, options_, format, first_frame->storage_type(), supported_rc_modes_, required_encoder_type_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Linux/ChromeOS require a special configuration to use dmabuf storage. // We need to keep sending frames the same way the first frame was sent. // Other platforms will happily mix GpuMemoryBuffer storage with regular diff --git a/www/chromium/files/patch-media_webrtc_audio__processor.cc b/www/chromium/files/patch-media_webrtc_audio__processor.cc index c4128131bb0b..b24aa3a9e894 100644 --- a/www/chromium/files/patch-media_webrtc_audio__processor.cc +++ b/www/chromium/files/patch-media_webrtc_audio__processor.cc @@ -1,11 +1,11 @@ ---- media/webrtc/audio_processor.cc.orig 2023-03-09 06:31:50 UTC +--- media/webrtc/audio_processor.cc.orig 2024-03-22 08:19:40 UTC +++ media/webrtc/audio_processor.cc -@@ -513,7 +513,7 @@ absl::optional AudioProcessor::ProcessData( +@@ -513,7 +513,7 @@ std::optional AudioProcessor::ProcessData( #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) DCHECK_LE(volume, 1.0); #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_OPENBSD) + BUILDFLAG(IS_BSD) // We have a special situation on Linux where the microphone volume can be // "higher than maximum". The input volume slider in the sound preference // allows the user to set a scaling that is higher than 100%. It means that diff --git a/www/chromium/files/patch-media_webrtc_helpers.cc b/www/chromium/files/patch-media_webrtc_helpers.cc index a2ca0ddebbdc..4cef2cca5ca8 100644 --- a/www/chromium/files/patch-media_webrtc_helpers.cc +++ b/www/chromium/files/patch-media_webrtc_helpers.cc @@ -1,11 +1,28 @@ ---- media/webrtc/helpers.cc.orig 2023-02-08 09:03:45 UTC +--- media/webrtc/helpers.cc.orig 2024-03-22 08:19:40 UTC +++ media/webrtc/helpers.cc -@@ -40,7 +40,7 @@ void ConfigAutomaticGainControl(const AudioProcessingS - apm_config.gain_controller2.enabled = false; +@@ -41,14 +41,14 @@ void ConfigAutomaticGainControl(const AudioProcessingS return; } + -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Use the Hybrid AGC setup, which combines the AGC1 input volume controller - // and the AGC2 digital adaptive controller. + const bool kInputVolumeAdjustmentOverrideAllowed = true; + #elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + const bool kInputVolumeAdjustmentOverrideAllowed = false; + #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) + // Use AGC2 digital and input volume controller. + // TODO(crbug.com/1375239): Remove `kWebRtcAllowInputVolumeAdjustment` safely. + if (kInputVolumeAdjustmentOverrideAllowed && +@@ -161,7 +161,7 @@ rtc::scoped_refptr CreateWebR + #endif + #if !(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \ +- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)) || BUILDFLAG(IS_BSD) + apm_config.transient_suppression.enabled = + settings.transient_noise_suppression; + #endif diff --git a/www/chromium/files/patch-media_webrtc_helpers__unittests.cc b/www/chromium/files/patch-media_webrtc_helpers__unittests.cc index 0cf160f71490..bb8d9560d238 100644 --- a/www/chromium/files/patch-media_webrtc_helpers__unittests.cc +++ b/www/chromium/files/patch-media_webrtc_helpers__unittests.cc @@ -1,29 +1,56 @@ ---- media/webrtc/helpers_unittests.cc.orig 2023-02-08 09:03:45 UTC +--- media/webrtc/helpers_unittests.cc.orig 2024-03-22 08:19:40 UTC +++ media/webrtc/helpers_unittests.cc -@@ -39,7 +39,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau - EXPECT_FALSE(config.pre_amplifier.enabled); +@@ -40,7 +40,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau EXPECT_TRUE(config.echo_canceller.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_controller1.enabled); + #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) + EXPECT_FALSE(config.gain_controller1.enabled); EXPECT_TRUE(config.gain_controller2.enabled); - #elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -@@ -77,7 +77,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, - EXPECT_EQ(config.gain_controller2, kDefaultApmConfig.gain_controller2); + #elif BUILDFLAG(IS_CASTOS) || BUILDFLAG(IS_CAST_ANDROID) +@@ -58,7 +58,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau + webrtc::AudioProcessing::Config::NoiseSuppression::kHigh); + + #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) + EXPECT_FALSE(config.transient_suppression.enabled); + #elif BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) + // Android and iOS use echo cancellation optimized for mobiles, and does not +@@ -79,7 +79,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, } + #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) + TEST(CreateWebRtcAudioProcessingModuleTest, + InputVolumeAdjustmentEnabledWithAgc2) { + ::base::test::ScopedFeatureList feature_list; +@@ -95,7 +95,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) TEST(CreateWebRtcAudioProcessingModuleTest, - InputVolumeAdjustmentEnabledWithHybridAgc) { + CanDisableInputVolumeAdjustmentWithAgc2) { ::base::test::ScopedFeatureList feature_list; -@@ -103,7 +103,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, +@@ -112,7 +112,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) TEST(CreateWebRtcAudioProcessingModuleTest, OnlyOneInputVolumeControllerEnabledOnDesktopPlatforms) { auto config = CreateApmGetConfig( +@@ -197,7 +197,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, ToggleTran + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \ +- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) + // Transient suppression is not supported (nor useful) on mobile platforms. + EXPECT_FALSE(config.transient_suppression.enabled); + #else diff --git a/www/chromium/files/patch-mojo_public_c_system_thunks.cc b/www/chromium/files/patch-mojo_public_c_system_thunks.cc index 142eabafabf9..fc8468610cda 100644 --- a/www/chromium/files/patch-mojo_public_c_system_thunks.cc +++ b/www/chromium/files/patch-mojo_public_c_system_thunks.cc @@ -1,38 +1,38 @@ ---- mojo/public/c/system/thunks.cc.orig 2024-02-23 21:04:38 UTC +--- mojo/public/c/system/thunks.cc.orig 2024-03-22 08:19:40 UTC +++ mojo/public/c/system/thunks.cc -@@ -24,7 +24,7 @@ +@@ -25,7 +25,7 @@ #include "mojo/public/c/system/message_pipe.h" #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - #include #include "base/environment.h" #include "base/files/file_path.h" + #include "base/scoped_native_library.h" @@ -72,7 +72,7 @@ class CoreLibraryInitializer { MojoResult LoadLibrary(base::FilePath library_path) { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (library_ && library_->is_valid()) return MOJO_RESULT_OK; @@ -86,7 +86,7 @@ class CoreLibraryInitializer { if (library_path.empty()) { // Default to looking for the library in the current working directory. -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::FilePath::CharType kDefaultLibraryPathValue[] = FILE_PATH_LITERAL("./libmojo_core.so"); #elif BUILDFLAG(IS_FUCHSIA) @@ -142,7 +142,7 @@ class CoreLibraryInitializer { private: #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) std::optional library_; #endif }; diff --git a/www/chromium/files/patch-net_BUILD.gn b/www/chromium/files/patch-net_BUILD.gn index c3a1c175f1c1..eb3604339ce5 100644 --- a/www/chromium/files/patch-net_BUILD.gn +++ b/www/chromium/files/patch-net_BUILD.gn @@ -1,78 +1,78 @@ ---- net/BUILD.gn.orig 2024-02-23 21:04:38 UTC +--- net/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ net/BUILD.gn @@ -122,7 +122,7 @@ net_configs = [ "//build/config/compiler:wexit_time_destructors", ] -if (is_linux || is_chromeos) { +if ((is_linux || is_chromeos) && !is_bsd) { net_configs += [ "//build/config/linux:libresolv" ] } -@@ -1172,6 +1172,19 @@ component("net") { +@@ -1174,6 +1174,19 @@ component("net") { ] } + if (is_bsd) { + sources -= [ + "base/address_map_cache_linux.cc", + "base/address_map_cache_linux.h", + "base/address_map_linux.cc", + "base/address_map_linux.h", + "base/address_tracker_linux.cc", + "base/address_tracker_linux.h", + "base/network_change_notifier_linux.cc", + "base/network_interfaces_linux.cc", + ] + } + if (is_mac) { sources += [ "base/network_notification_thread_mac.cc", -@@ -1329,7 +1342,7 @@ component("net") { +@@ -1330,7 +1343,7 @@ component("net") { } # Use getifaddrs() on POSIX platforms, except Linux. - if (is_posix && !is_linux && !is_chromeos) { + if ((is_posix && !is_linux && !is_chromeos) || is_bsd) { sources += [ "base/network_interfaces_getifaddrs.cc", "base/network_interfaces_getifaddrs.h", -@@ -2799,7 +2812,7 @@ test("net_unittests") { +@@ -2796,7 +2809,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "base/address_tracker_linux_unittest.cc", "base/network_interfaces_linux_unittest.cc", -@@ -2887,6 +2900,10 @@ test("net_unittests") { +@@ -2884,6 +2897,10 @@ test("net_unittests") { ] } + if (is_bsd) { + deps += [ "//sandbox/policy" ] + } + if (enable_websockets) { deps += [ "//net/server:tests" ] } -@@ -2957,7 +2974,7 @@ test("net_unittests") { +@@ -2944,7 +2961,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "tools/quic/quic_simple_server_test.cc" ] } -@@ -3092,7 +3109,7 @@ test("net_unittests") { +@@ -3076,7 +3093,7 @@ test("net_unittests") { } # Use getifaddrs() on POSIX platforms, except Linux. - if (is_posix && !is_linux && !is_chromeos) { + if (is_posix && !is_linux && !is_chromeos && !is_bsd) { sources += [ "base/network_interfaces_getifaddrs_unittest.cc" ] } diff --git a/www/chromium/files/patch-net_base_features.cc b/www/chromium/files/patch-net_base_features.cc index c503eb836480..b62bfa09d479 100644 --- a/www/chromium/files/patch-net_base_features.cc +++ b/www/chromium/files/patch-net_base_features.cc @@ -1,15 +1,24 @@ ---- net/base/features.cc.orig 2024-02-23 21:04:38 UTC +--- net/base/features.cc.orig 2024-03-22 08:19:40 UTC +++ net/base/features.cc -@@ -500,7 +500,12 @@ BASE_FEATURE(kSpdyHeadersToHttpResponseUseBuilder, +@@ -26,7 +26,7 @@ BASE_FEATURE(kCapReferrerToOriginOnCrossOrigin, + BASE_FEATURE(kAsyncDns, + "AsyncDns", + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || \ +- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + #else + base::FEATURE_DISABLED_BY_DEFAULT +@@ -510,7 +510,12 @@ BASE_FEATURE(kSpdyHeadersToHttpResponseUseBuilder, "SpdyHeadersToHttpResponseUseBuilder", base::FEATURE_DISABLED_BY_DEFAULT); +#if BUILDFLAG(IS_OPENBSD) +// No IP_RECVTOS support BASE_FEATURE(kReceiveEcn, "ReceiveEcn", base::FEATURE_DISABLED_BY_DEFAULT); +#else +BASE_FEATURE(kReceiveEcn, "ReceiveEcn", base::FEATURE_DISABLED_BY_DEFAULT); +#endif // TODO(crbug.com/634470): Remove this feature flag in January 2024 if the new // limit sticks. diff --git a/www/chromium/files/patch-net_http_http__auth__handler__negotiate.cc b/www/chromium/files/patch-net_http_http__auth__handler__negotiate.cc index 9b3ecc491ead..225ab8115d3d 100644 --- a/www/chromium/files/patch-net_http_http__auth__handler__negotiate.cc +++ b/www/chromium/files/patch-net_http_http__auth__handler__negotiate.cc @@ -1,11 +1,11 @@ ---- net/http/http_auth_handler_negotiate.cc.orig 2023-10-11 18:22:24 UTC +--- net/http/http_auth_handler_negotiate.cc.orig 2024-03-22 08:19:40 UTC +++ net/http/http_auth_handler_negotiate.cc -@@ -121,7 +121,7 @@ int HttpAuthHandlerNegotiate::Factory::CreateAuthHandl +@@ -120,7 +120,7 @@ int HttpAuthHandlerNegotiate::Factory::CreateAuthHandl #elif BUILDFLAG(IS_POSIX) if (is_unsupported_) return ERR_UNSUPPORTED_AUTH_SCHEME; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Note: Don't set is_unsupported_ = true here. AllowGssapiLibraryLoad() // might change to true during a session. if (!http_auth_preferences() || diff --git a/www/chromium/files/patch-net_socket_udp__socket__posix.cc b/www/chromium/files/patch-net_socket_udp__socket__posix.cc index 191706df3bf5..ecbd99d249da 100644 --- a/www/chromium/files/patch-net_socket_udp__socket__posix.cc +++ b/www/chromium/files/patch-net_socket_udp__socket__posix.cc @@ -1,39 +1,39 @@ ---- net/socket/udp_socket_posix.cc.orig 2024-02-23 21:04:38 UTC +--- net/socket/udp_socket_posix.cc.orig 2024-03-22 08:19:40 UTC +++ net/socket/udp_socket_posix.cc -@@ -592,12 +592,17 @@ int UDPSocketPosix::SetRecvEcn() { +@@ -592,12 +592,17 @@ int UDPSocketPosix::SetRecvTos() { } } +#ifdef IP_RECVTOS int rv = setsockopt(socket_, IPPROTO_IP, IP_RECVTOS, &ecn, sizeof(ecn)); +#else + int rv = -1; + errno = EOPNOTSUPP; +#endif return rv == 0 ? OK : MapSystemError(errno); } void UDPSocketPosix::SetMsgConfirm(bool confirm) { -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) if (confirm) { sendto_flags_ |= MSG_CONFIRM; } else { @@ -618,7 +623,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); int value = broadcast ? 1 : 0; int rv; -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) // SO_REUSEPORT on OSX permits multiple processes to each receive // UDP multicast or broadcast datagrams destined for the bound // port. -@@ -931,7 +936,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) +@@ -959,7 +964,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) #if BUILDFLAG(IS_CHROMEOS_ASH) if (last_error == EINVAL) return ERR_ADDRESS_IN_USE; -#elif BUILDFLAG(IS_APPLE) +#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) if (last_error == EADDRNOTAVAIL) return ERR_ADDRESS_IN_USE; #endif diff --git a/www/chromium/files/patch-net_socket_udp__socket__unittest.cc b/www/chromium/files/patch-net_socket_udp__socket__unittest.cc index e2a7687051b1..460834fc87c3 100644 --- a/www/chromium/files/patch-net_socket_udp__socket__unittest.cc +++ b/www/chromium/files/patch-net_socket_udp__socket__unittest.cc @@ -1,47 +1,47 @@ ---- net/socket/udp_socket_unittest.cc.orig 2024-01-30 07:53:34 UTC +--- net/socket/udp_socket_unittest.cc.orig 2024-03-22 08:19:40 UTC +++ net/socket/udp_socket_unittest.cc -@@ -344,7 +344,7 @@ TEST_F(UDPSocketTest, PartialRecv) { +@@ -352,7 +352,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). -@@ -655,7 +655,7 @@ TEST_F(UDPSocketTest, ClientSetDoNotFragment) { +@@ -663,7 +663,7 @@ TEST_F(UDPSocketTest, ClientSetDoNotFragment) { EXPECT_THAT(rv, IsOk()); rv = client.SetDoNotFragment(); -#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // TODO(crbug.com/945590): IP_MTU_DISCOVER is not implemented on Fuchsia. EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED)); #elif BUILDFLAG(IS_MAC) -@@ -683,7 +683,7 @@ TEST_F(UDPSocketTest, ServerSetDoNotFragment) { +@@ -691,7 +691,7 @@ TEST_F(UDPSocketTest, ServerSetDoNotFragment) { EXPECT_THAT(rv, IsOk()); rv = server.SetDoNotFragment(); -#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // TODO(crbug.com/945590): IP_MTU_DISCOVER is not implemented on Fuchsia. EXPECT_THAT(rv, IsError(ERR_NOT_IMPLEMENTED)); #elif BUILDFLAG(IS_MAC) -@@ -748,7 +748,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup) { +@@ -756,7 +756,7 @@ TEST_F(UDPSocketTest, JoinMulticastGroup) { // TODO(https://crbug.com/947115): failing on device on iOS 12.2. // TODO(https://crbug.com/1227554): flaky on Mac 11. -#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #define MAYBE_SharedMulticastAddress DISABLED_SharedMulticastAddress #else #define MAYBE_SharedMulticastAddress SharedMulticastAddress -@@ -802,7 +802,7 @@ TEST_F(UDPSocketTest, MAYBE_SharedMulticastAddress) { +@@ -810,7 +810,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/chromium/files/patch-net_url__request_url__request__context__builder.cc b/www/chromium/files/patch-net_url__request_url__request__context__builder.cc index 7d1e0add547b..6ecf24c32358 100644 --- a/www/chromium/files/patch-net_url__request_url__request__context__builder.cc +++ b/www/chromium/files/patch-net_url__request_url__request__context__builder.cc @@ -1,11 +1,11 @@ ---- net/url_request/url_request_context_builder.cc.orig 2024-02-23 21:04:38 UTC +--- net/url_request/url_request_context_builder.cc.orig 2024-03-22 08:19:40 UTC +++ net/url_request/url_request_context_builder.cc -@@ -434,7 +434,7 @@ std::unique_ptr URLRequestContextBu +@@ -428,7 +428,7 @@ std::unique_ptr URLRequestContextBu } if (!proxy_resolution_service_) { -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) // TODO(willchan): Switch to using this code when // ProxyConfigService::CreateSystemProxyConfigService()'s // signature doesn't suck. diff --git a/www/chromium/files/patch-remoting_host_policy__watcher.cc b/www/chromium/files/patch-remoting_host_policy__watcher.cc index 1a994664f6de..b336657e2dd6 100644 --- a/www/chromium/files/patch-remoting_host_policy__watcher.cc +++ b/www/chromium/files/patch-remoting_host_policy__watcher.cc @@ -1,11 +1,11 @@ ---- remoting/host/policy_watcher.cc.orig 2023-12-10 06:10:27 UTC +--- remoting/host/policy_watcher.cc.orig 2024-03-22 08:19:40 UTC +++ remoting/host/policy_watcher.cc -@@ -191,7 +191,7 @@ base::Value::Dict PolicyWatcher::GetDefaultPolicies() +@@ -192,7 +192,7 @@ base::Value::Dict PolicyWatcher::GetDefaultPolicies() true); result.Set(key::kRemoteAccessHostAllowEnterpriseFileTransfer, false); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) result.Set(key::kRemoteAccessHostMatchUsername, false); #endif #if !BUILDFLAG(IS_CHROMEOS) diff --git a/www/chromium/files/patch-remoting_host_remoting__me2me__host.cc b/www/chromium/files/patch-remoting_host_remoting__me2me__host.cc index 1b1ce3de87a6..b39c76fa1244 100644 --- a/www/chromium/files/patch-remoting_host_remoting__me2me__host.cc +++ b/www/chromium/files/patch-remoting_host_remoting__me2me__host.cc @@ -1,169 +1,169 @@ ---- remoting/host/remoting_me2me_host.cc.orig 2024-02-23 21:04:38 UTC +--- remoting/host/remoting_me2me_host.cc.orig 2024-03-22 08:19:40 UTC +++ remoting/host/remoting_me2me_host.cc -@@ -127,7 +127,7 @@ +@@ -131,7 +131,7 @@ #include "remoting/host/mac/permission_utils.h" #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(REMOTING_USE_X11) #include #endif // defined(REMOTING_USE_X11) -@@ -138,13 +138,13 @@ +@@ -142,13 +142,13 @@ #endif // defined(REMOTING_USE_X11) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/linux_util.h" #include "remoting/host/audio_capturer_linux.h" #include "remoting/host/linux/certificate_watcher.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/host_utmp_logger.h" #endif -@@ -157,7 +157,7 @@ +@@ -161,7 +161,7 @@ #include "remoting/host/win/session_desktop_environment.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/linux/wayland_manager.h" #include "remoting/host/linux/wayland_utils.h" #endif // BUILDFLAG(IS_LINUX) -@@ -187,7 +187,7 @@ const char kApplicationName[] = "chromoting"; +@@ -191,7 +191,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"; -@@ -394,7 +394,7 @@ class HostProcess : public ConfigWatcher::Delegate, +@@ -400,7 +400,7 @@ class HostProcess : public ConfigWatcher::Delegate, std::unique_ptr context_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Watch for certificate changes and kill the host when changes occur std::unique_ptr cert_watcher_; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -463,7 +463,7 @@ class HostProcess : public ConfigWatcher::Delegate, +@@ -470,7 +470,7 @@ class HostProcess : public ConfigWatcher::Delegate, std::unique_ptr host_status_logger_; std::unique_ptr host_event_logger_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::unique_ptr host_utmp_logger_; #endif std::unique_ptr power_save_blocker_; -@@ -772,7 +772,7 @@ void HostProcess::StartOnNetworkThread() { +@@ -779,7 +779,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) } -@@ -833,7 +833,7 @@ void HostProcess::CreateAuthenticatorFactory() { +@@ -845,7 +845,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, -@@ -952,13 +952,13 @@ void HostProcess::StartOnUiThread() { +@@ -970,13 +970,13 @@ void HostProcess::StartOnUiThread() { base::BindRepeating(&HostProcess::OnPolicyUpdate, base::Unretained(this)), base::BindRepeating(&HostProcess::OnPolicyError, base::Unretained(this))); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { WaylandManager::Get()->Init(context_->ui_task_runner()); } #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If an audio pipe is specific on the command-line then initialize // AudioCapturerLinux to capture from it. base::FilePath audio_pipe_name = -@@ -1030,7 +1030,7 @@ void HostProcess::ShutdownOnUiThread() { +@@ -1048,7 +1048,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. -@@ -1038,7 +1038,7 @@ void HostProcess::ShutdownOnUiThread() { +@@ -1056,7 +1056,7 @@ void HostProcess::ShutdownOnUiThread() { AudioCapturerLinux::InitializePipeReader(nullptr, base::FilePath()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) context_->input_task_runner()->PostTask( FROM_HERE, base::BindOnce([]() { delete ui::X11EventSource::GetInstance(); })); -@@ -1394,7 +1394,7 @@ bool HostProcess::OnUsernamePolicyUpdate(const base::V +@@ -1414,7 +1414,7 @@ bool HostProcess::OnUsernamePolicyUpdate(const base::V // Returns false: never restart the host after this policy update. DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) std::optional host_username_match_required = policies.FindBool(policy::key::kRemoteAccessHostMatchUsername); if (!host_username_match_required.has_value()) { -@@ -1803,7 +1803,7 @@ void HostProcess::StartHost() { - // won't be advertised if it's missing a registry key or something. - desktop_environment_options_.set_enable_remote_open_url(true); +@@ -1874,7 +1874,7 @@ void HostProcess::StartHost() { + enable_user_interface_); + } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) desktop_environment_options_.set_enable_remote_webauthn(is_googler_); #endif -@@ -1836,7 +1836,7 @@ void HostProcess::StartHost() { +@@ -1907,7 +1907,7 @@ void HostProcess::StartHost() { host_status_logger_ = std::make_unique( host_->status_monitor(), log_to_server_.get()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); if (cmd_line->HasSwitch(kEnableUtempter)) { host_utmp_logger_ = -@@ -1868,7 +1868,7 @@ void HostProcess::StartHost() { +@@ -1939,7 +1939,7 @@ void HostProcess::StartHost() { host_->Start(host_owner_); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // For Windows, ChromotingHostServices connections are handled by the daemon // process, then the message pipe is forwarded to the network process. host_->StartChromotingHostServices(); -@@ -2001,7 +2001,7 @@ int HostProcessMain() { +@@ -2072,7 +2072,7 @@ int HostProcessMain() { HOST_LOG << "Starting host process: version " << STRINGIZE(VERSION); const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(REMOTING_USE_X11) // Initialize Xlib for multi-threaded use, allowing non-Chromium code to // use X11 safely (such as the WebRTC capturer, GTK ...) -@@ -2050,7 +2050,7 @@ int HostProcessMain() { +@@ -2121,7 +2121,7 @@ int HostProcessMain() { std::unique_ptr network_change_notifier( net::NetworkChangeNotifier::CreateIfNeeded()); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) // Create an X11EventSource on all UI threads, so the global X11 connection // (x11::Connection::Get()) can dispatch X events. auto event_source = diff --git a/www/chromium/files/patch-sandbox_policy_features.cc b/www/chromium/files/patch-sandbox_policy_features.cc index c00e7506f06d..6c8e61c97185 100644 --- a/www/chromium/files/patch-sandbox_policy_features.cc +++ b/www/chromium/files/patch-sandbox_policy_features.cc @@ -1,23 +1,23 @@ ---- sandbox/policy/features.cc.orig 2024-01-30 07:53:34 UTC +--- sandbox/policy/features.cc.orig 2024-03-22 08:19:40 UTC +++ sandbox/policy/features.cc @@ -20,7 +20,11 @@ namespace sandbox::policy::features { // (Only causes an effect when feature kNetworkServiceInProcess is disabled.) BASE_FEATURE(kNetworkServiceSandbox, "NetworkServiceSandbox", +#if BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT); +#else base::FEATURE_DISABLED_BY_DEFAULT); +#endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) // Enables a fine-grained seccomp-BPF syscall filter for the network service. -@@ -128,7 +132,7 @@ BASE_FEATURE(kForceSpectreVariant2Mitigation, +@@ -117,7 +121,7 @@ BASE_FEATURE(kForceSpectreVariant2Mitigation, base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Enabling the kNetworkServiceSandbox feature automatically enables Spectre // variant 2 mitigations in the network service. This can lead to performance // regressions, so enabling this feature will turn off the Spectre Variant 2 diff --git a/www/chromium/files/patch-sandbox_policy_features.h b/www/chromium/files/patch-sandbox_policy_features.h index f5f07022267a..dcab6f1050f8 100644 --- a/www/chromium/files/patch-sandbox_policy_features.h +++ b/www/chromium/files/patch-sandbox_policy_features.h @@ -1,11 +1,11 @@ ---- sandbox/policy/features.h.orig 2024-01-30 07:53:34 UTC +--- sandbox/policy/features.h.orig 2024-03-22 08:19:40 UTC +++ sandbox/policy/features.h -@@ -44,7 +44,7 @@ SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE(kSpectreVar +@@ -42,7 +42,7 @@ SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE(kSpectreVar SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE(kForceSpectreVariant2Mitigation); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SANDBOX_POLICY_EXPORT BASE_DECLARE_FEATURE( kForceDisableSpectreVariant2MitigationInNetworkService); diff --git a/www/chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc b/www/chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc index a90b2f468e71..499f85ee6120 100644 --- a/www/chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc +++ b/www/chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc @@ -1,423 +1,427 @@ ---- sandbox/policy/openbsd/sandbox_openbsd.cc.orig 2023-04-28 17:01:32 UTC +--- sandbox/policy/openbsd/sandbox_openbsd.cc.orig 2024-03-22 08:19:40 UTC +++ sandbox/policy/openbsd/sandbox_openbsd.cc -@@ -0,0 +1,420 @@ +@@ -0,0 +1,424 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "sandbox/policy/openbsd/sandbox_openbsd.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "base/command_line.h" +#include "base/debug/stack_trace.h" +#include "base/feature_list.h" +#include "base/files/file_path.h" +#include "base/files/file_util.h" +#include "base/files/scoped_file.h" +#include "base/logging.h" +#include "base/memory/singleton.h" +#include "base/path_service.h" +#include "base/posix/eintr_wrapper.h" +#include "base/strings/string_number_conversions.h" +#include "base/system/sys_info.h" +#include "base/threading/thread.h" +#include "base/time/time.h" +#include "build/build_config.h" +#include "crypto/crypto_buildflags.h" +#include "ppapi/buildflags/buildflags.h" +#include "sandbox/constants.h" +#include "sandbox/linux/services/credentials.h" +#include "sandbox/linux/services/namespace_sandbox.h" +#include "sandbox/linux/services/proc_util.h" +#include "sandbox/linux/services/resource_limits.h" +#include "sandbox/linux/services/thread_helpers.h" +#include "sandbox/linux/syscall_broker/broker_command.h" +#include "sandbox/linux/syscall_broker/broker_process.h" +#include "sandbox/policy/sandbox.h" +#include "sandbox/policy/sandbox_type.h" +#include "sandbox/policy/mojom/sandbox.mojom.h" +#include "sandbox/policy/switches.h" +#include "sandbox/sandbox_buildflags.h" + +#if BUILDFLAG(USING_SANITIZER) +#include +#endif + +#if BUILDFLAG(USE_NSS_CERTS) +#include "crypto/nss_util.h" +#endif + +#include "third_party/boringssl/src/include/openssl/crypto.h" + -+#include "ui/gfx/font_util.h" ++#include ++#include "ui/gfx/linux/fontconfig_util.h" + +#define MAXTOKENS 3 + +#define _UNVEIL_MAIN "/etc/chromium/unveil.main"; +#define _UNVEIL_GPU "/etc/chromium/unveil.gpu"; +#define _UNVEIL_UTILITY_NETWORK "/etc/chromium/unveil.utility_network"; +#define _UNVEIL_UTILITY_AUDIO "/etc/chromium/unveil.utility_audio"; +#define _UNVEIL_UTILITY_VIDEO "/etc/chromium/unveil.utility_video"; + +namespace sandbox { +namespace policy { + +SandboxLinux::SandboxLinux() + : unveil_initialized_(false), + sandbox_status_flags_(kInvalid), + pre_initialized_(false), + initialize_sandbox_ran_(false), + broker_process_(nullptr) { +} + +SandboxLinux::~SandboxLinux() { + if (pre_initialized_) { + CHECK(initialize_sandbox_ran_); + } +} + +SandboxLinux* SandboxLinux::GetInstance() { + SandboxLinux* instance = base::Singleton::get(); + CHECK(instance); + return instance; +} + +void SandboxLinux::StopThread(base::Thread* thread) { + DCHECK(thread); + thread->Stop(); +} + +void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) { + CHECK(!pre_initialized_); +#if BUILDFLAG(USING_SANITIZER) + // Sanitizers need to open some resources before the sandbox is enabled. + // This should not fork, not launch threads, not open a directory. + __sanitizer_sandbox_on_notify(sanitizer_args()); + sanitizer_args_.reset(); +#endif + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + const std::string process_type = + command_line->GetSwitchValueASCII(switches::kProcessType); + + base::SysInfo::AmountOfPhysicalMemory(); + base::SysInfo::NumberOfProcessors(); + base::SysInfo::CPUModelName(); + + switch (sandbox_type) { + case sandbox::mojom::Sandbox::kNoSandbox: + { +#if BUILDFLAG(USE_NSS_CERTS) + // The main process has to initialize the ~/.pki dir which won't work + // after unveil(2). + crypto::EnsureNSSInit(); +#endif + CRYPTO_pre_sandbox_init(); + + base::FilePath cache_directory, local_directory; + + base::PathService::Get(base::DIR_CACHE, &cache_directory); + base::PathService::Get(base::DIR_HOME, &local_directory); + + cache_directory = cache_directory.AppendASCII("chromium"); + local_directory = local_directory.AppendASCII(".local").AppendASCII("share").AppendASCII("applications"); + + if (!base::CreateDirectory(cache_directory)) { + LOG(ERROR) << "Failed to create " << cache_directory.value() << " directory."; + } + + if (!base::CreateDirectory(local_directory)) { + LOG(ERROR) << "Failed to create " << local_directory.value() << " directory."; + } + + break; + } + case sandbox::mojom::Sandbox::kRenderer: -+ gfx::InitializeFonts(); ++ { ++ FcConfig* config = gfx::GetGlobalFontConfig(); ++ DCHECK(config); + break; ++ } + default: + break; + } + + pre_initialized_ = true; +} + +bool SandboxLinux::SetPledge(const char *pstring, const char *ppath) { + FILE *fp; + char *s = NULL; + size_t len = 0; + ssize_t read; + + if (pstring != NULL) { + if (pledge(pstring, NULL) == -1) + goto err; + VLOG(5) << "pledge " << pstring; + } else if (ppath != NULL) { + fp = fopen(ppath, "r"); + if (fp != NULL) { + while ((read = getline(&s, &len, fp)) != -1 ) { + if (s[strlen(s)-1] == '\n') + s[strlen(s)-1] = '\0'; + if (pledge(s, NULL) == -1) + goto err; + VLOG(5) << "pledge " << s; + } + fclose(fp); + } else { + LOG(ERROR) << "fopen(" << ppath << ") failed, errno: " << errno; + return false; + } + } + return true; +err: + LOG(ERROR) << "pledge() failed, errno: " << errno; + return false; +} + +bool SandboxLinux::SetUnveil(const std::string process_type, sandbox::mojom::Sandbox sandbox_type) { + FILE *fp; + char *s = NULL, *cp = NULL, *home = NULL, **ap, *tokens[MAXTOKENS]; + char path[PATH_MAX]; + const char *ufile; + size_t len = 0, lineno = 0; + + switch (sandbox_type) { + case sandbox::mojom::Sandbox::kNoSandbox: + ufile = _UNVEIL_MAIN; + break; + case sandbox::mojom::Sandbox::kGpu: + ufile = _UNVEIL_GPU; + break; + case sandbox::mojom::Sandbox::kNetwork: + ufile = _UNVEIL_UTILITY_NETWORK; + break; + case sandbox::mojom::Sandbox::kAudio: + ufile = _UNVEIL_UTILITY_AUDIO; + break; + case sandbox::mojom::Sandbox::kVideoCapture: + ufile = _UNVEIL_UTILITY_VIDEO; + break; + default: + unveil("/dev/null", "r"); + goto done; + } + + fp = fopen(ufile, "r"); + if (fp != NULL) { + while (!feof(fp)) { + if ((s = fparseln(fp, &len, &lineno, NULL, + FPARSELN_UNESCCOMM | FPARSELN_UNESCCONT)) == NULL) { + if (ferror(fp)) { + LOG(ERROR) << "ferror(), errno: " << errno; + _exit(1); + } else { + continue; + } + } + cp = s; + cp += strspn(cp, " \t\n"); /* eat whitespace */ + if (cp[0] == '\0') + continue; + + for (ap = tokens; ap < &tokens[MAXTOKENS - 1] && + (*ap = strsep(&cp, " \t")) != NULL;) { + if (**ap != '\0') + ap++; + } + *ap = NULL; + + if (tokens[1] == NULL) { + LOG(ERROR) << ufile << ": line " << lineno << ": must supply value to " << s; + _exit(1); + } + + if (tokens[0][0] == '~') { + if ((home = getenv("HOME")) == NULL || *home == '\0') { + LOG(ERROR) << "failed to get home"; + _exit(1); + } + memmove(tokens[0], tokens[0] + 1, strlen(tokens[0])); + strncpy(path, home, sizeof(path) - 1); + path[sizeof(path) - 1] = '\0'; + strncat(path, tokens[0], sizeof(path) - 1 - strlen(path)); + } else { + strncpy(path, tokens[0], sizeof(path) - 1); + path[sizeof(path) - 1] = '\0'; + } + + if (unveil(path, tokens[1]) == -1) { + LOG(ERROR) << "failed unveiling " << path << " with permissions " << tokens[1]; + _exit(1); + } else { + VLOG(5) << "unveiling " << path << " with permissions " << tokens[1]; + } + } + fclose(fp); + } else { + LOG(ERROR) << "failed to open " << ufile << " errno: " << errno; + _exit(1); + } + +done: + unveil_initialized_ = true; + + return true; +} + +bool SandboxLinux::unveil_initialized() const { + return unveil_initialized_; +} + +bool SandboxLinux::InitializeSandbox(sandbox::mojom::Sandbox sandbox_type, + SandboxLinux::PreSandboxHook hook, + const Options& options) { + DCHECK(!initialize_sandbox_ran_); + initialize_sandbox_ran_ = true; + + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + const std::string process_type = + command_line->GetSwitchValueASCII(switches::kProcessType); + + if (command_line->HasSwitch(switches::kNoSandbox)) + return true; + + VLOG(1) << "SandboxLinux::InitializeSandbox: process_type=" + << process_type << " sandbox_type=" << GetSandboxTypeInEnglish(sandbox_type); + + // Only one thread is running, pre-initialize if not already done. + if (!pre_initialized_) + PreinitializeSandbox(sandbox_type); + + // Attempt to limit the future size of the address space of the process. + int error = 0; + const bool limited_as = LimitAddressSpace(&error); + if (error) { + // Restore errno. Internally to |LimitAddressSpace|, the errno due to + // setrlimit may be lost. + errno = error; + PCHECK(limited_as); + } + + if (hook) + CHECK(std::move(hook).Run(options)); + + if (!command_line->HasSwitch(switches::kDisableUnveil)) + SetUnveil(process_type, sandbox_type); + + switch(sandbox_type) { + case sandbox::mojom::Sandbox::kNoSandbox: + SetPledge(NULL, "/etc/chromium/pledge.main"); + break; + case sandbox::mojom::Sandbox::kRenderer: + // prot_exec needed by v8 + // flock needed by sqlite3 locking + SetPledge("stdio rpath flock prot_exec recvfd sendfd ps", NULL); + break; + case sandbox::mojom::Sandbox::kGpu: + SetPledge("stdio drm rpath flock cpath wpath prot_exec recvfd sendfd tmppath", NULL); + break; +#if BUILDFLAG(ENABLE_PPAPI) + case sandbox::mojom::Sandbox::kPpapi: + // prot_exec needed by v8 + SetPledge("stdio rpath prot_exec recvfd sendfd", NULL); + break; +#endif + case sandbox::mojom::Sandbox::kAudio: + SetPledge(NULL, "/etc/chromium/pledge.utility_audio"); + break; + case sandbox::mojom::Sandbox::kNetwork: + SetPledge(NULL, "/etc/chromium/pledge.utility_network"); + break; + case sandbox::mojom::Sandbox::kVideoCapture: + SetPledge(NULL, "/etc/chromium/pledge.utility_video"); + break; + case sandbox::mojom::Sandbox::kUtility: + case sandbox::mojom::Sandbox::kService: + SetPledge("stdio rpath cpath wpath fattr flock sendfd recvfd prot_exec", NULL); + break; + default: + LOG(ERROR) << "non-pledge()'d process: " << GetSandboxTypeInEnglish(sandbox_type); + break; + } + + return true; +} + +bool SandboxLinux::LimitAddressSpace(int* error) { +#if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \ + !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER) + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + if (SandboxTypeFromCommandLine(*command_line) == sandbox::mojom::Sandbox::kNoSandbox) { + return false; + } + + // Unfortunately, it does not appear possible to set RLIMIT_AS such that it + // will both (a) be high enough to support V8's and WebAssembly's address + // space requirements while also (b) being low enough to mitigate exploits + // using integer overflows that require large allocations, heap spray, or + // other memory-hungry attack modes. + + *error = sandbox::ResourceLimits::Lower( + RLIMIT_DATA, static_cast(sandbox::kDataSizeLimit)); + + // Cache the resource limit before turning on the sandbox. + base::SysInfo::AmountOfVirtualMemory(); + base::SysInfo::MaxSharedMemorySize(); + + return *error == 0; +#else + base::SysInfo::AmountOfVirtualMemory(); + return false; +#endif // !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && + // !defined(THREAD_SANITIZER) && !defined(LEAK_SANITIZER) +} + +// static +std::string SandboxLinux::GetSandboxTypeInEnglish(sandbox::mojom::Sandbox sandbox_type) { + switch (sandbox_type) { + case sandbox::mojom::Sandbox::kNoSandbox: + return "Unsandboxed"; + case sandbox::mojom::Sandbox::kRenderer: + return "Renderer"; + case sandbox::mojom::Sandbox::kUtility: + return "Utility"; + case sandbox::mojom::Sandbox::kGpu: + return "GPU"; +#if BUILDFLAG(ENABLE_PPAPI) + case sandbox::mojom::Sandbox::kPpapi: + return "PPAPI"; +#endif + case sandbox::mojom::Sandbox::kNetwork: + return "Network"; + case sandbox::mojom::Sandbox::kCdm: + return "CDM"; + case sandbox::mojom::Sandbox::kPrintCompositor: + return "Print Compositor"; + case sandbox::mojom::Sandbox::kAudio: + return "Audio"; + case sandbox::mojom::Sandbox::kSpeechRecognition: + return "Speech Recognition"; + case sandbox::mojom::Sandbox::kService: + return "Service"; + case sandbox::mojom::Sandbox::kVideoCapture: + return "Video Capture"; + default: + return "Unknown"; + } +} + +} // namespace policy +} // namespace sandbox diff --git a/www/chromium/files/patch-services_device_compute__pressure_cpu__probe.cc b/www/chromium/files/patch-services_device_compute__pressure_cpu__probe.cc deleted file mode 100644 index 12ac2281525d..000000000000 --- a/www/chromium/files/patch-services_device_compute__pressure_cpu__probe.cc +++ /dev/null @@ -1,10 +0,0 @@ ---- services/device/compute_pressure/cpu_probe.cc.orig 2024-01-30 07:53:34 UTC -+++ services/device/compute_pressure/cpu_probe.cc -@@ -60,6 +60,7 @@ std::unique_ptr CpuProbe::Create( - #elif BUILDFLAG(IS_MAC) - return CpuProbeMac::Create(sampling_interval, std::move(sampling_callback)); - #else -+ NOTIMPLEMENTED(); - return nullptr; - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - } diff --git a/www/chromium/files/patch-services_device_public_mojom_BUILD.gn b/www/chromium/files/patch-services_device_public_mojom_BUILD.gn index 0afd028fbb1c..0ac7ec78f373 100644 --- a/www/chromium/files/patch-services_device_public_mojom_BUILD.gn +++ b/www/chromium/files/patch-services_device_public_mojom_BUILD.gn @@ -1,11 +1,11 @@ ---- services/device/public/mojom/BUILD.gn.orig 2023-10-11 18:22:24 UTC +--- services/device/public/mojom/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ services/device/public/mojom/BUILD.gn -@@ -97,7 +97,7 @@ mojom("device_service") { +@@ -96,7 +96,7 @@ mojom("device_service") { enable_js_fuzzing = false enabled_features = [] - if ((is_linux || is_chromeos) && use_udev) { + if ((is_linux || is_chromeos) && !is_bsd && use_udev) { enabled_features += [ "enable_input_device_manager" ] } diff --git a/www/chromium/files/patch-services_network_BUILD.gn b/www/chromium/files/patch-services_network_BUILD.gn index a3cce95ab711..b233e89a2a9e 100644 --- a/www/chromium/files/patch-services_network_BUILD.gn +++ b/www/chromium/files/patch-services_network_BUILD.gn @@ -1,10 +1,10 @@ ---- services/network/BUILD.gn.orig 2024-01-30 07:53:34 UTC +--- services/network/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ services/network/BUILD.gn -@@ -397,7 +397,6 @@ if (is_linux || is_chromeos) { +@@ -402,7 +402,6 @@ if (is_linux || is_chromeos) { ] deps = [ "//base:base", - "//sandbox/linux:sandbox_services", "//sandbox/policy:policy", ] configs += [ "//build/config/compiler:wexit_time_destructors" ] diff --git a/www/chromium/files/patch-services_network_network__context.cc b/www/chromium/files/patch-services_network_network__context.cc index 8bb90b7aa920..e8d54c86ac4b 100644 --- a/www/chromium/files/patch-services_network_network__context.cc +++ b/www/chromium/files/patch-services_network_network__context.cc @@ -1,20 +1,20 @@ ---- services/network/network_context.cc.orig 2024-02-23 21:04:38 UTC +--- services/network/network_context.cc.orig 2024-03-22 08:19:40 UTC +++ services/network/network_context.cc @@ -522,7 +522,7 @@ NetworkContext::NetworkContextHttpAuthPreferences:: NetworkContext::NetworkContextHttpAuthPreferences:: ~NetworkContextHttpAuthPreferences() = default; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool NetworkContext::NetworkContextHttpAuthPreferences::AllowGssapiLibraryLoad() const { if (network_service_) { -@@ -2260,7 +2260,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( +@@ -2276,7 +2276,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( http_auth_dynamic_network_service_params->android_negotiate_account_type); #endif // BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) http_auth_merged_preferences_.set_allow_gssapi_library_load( http_auth_dynamic_network_service_params->allow_gssapi_library_load); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) diff --git a/www/chromium/files/patch-services_network_network__sandbox__hook__linux.cc b/www/chromium/files/patch-services_network_network__sandbox__hook__linux.cc index f415276d159b..43bc6e25360b 100644 --- a/www/chromium/files/patch-services_network_network__sandbox__hook__linux.cc +++ b/www/chromium/files/patch-services_network_network__sandbox__hook__linux.cc @@ -1,37 +1,37 @@ ---- services/network/network_sandbox_hook_linux.cc.orig 2023-05-31 08:12:17 UTC +--- services/network/network_sandbox_hook_linux.cc.orig 2024-03-22 08:19:40 UTC +++ services/network/network_sandbox_hook_linux.cc -@@ -14,11 +14,14 @@ +@@ -15,11 +15,14 @@ + #include "sandbox/linux/syscall_broker/broker_file_permission.h" #include "sandbox/policy/features.h" - #include "third_party/abseil-cpp/absl/types/optional.h" +#if !BUILDFLAG(IS_BSD) using sandbox::syscall_broker::BrokerFilePermission; using sandbox::syscall_broker::MakeBrokerCommandSet; +#endif namespace network { +#if !BUILDFLAG(IS_BSD) sandbox::syscall_broker::BrokerCommandSet GetNetworkBrokerCommandSet() { return MakeBrokerCommandSet({ sandbox::syscall_broker::COMMAND_ACCESS, -@@ -102,9 +105,11 @@ void LoadNetworkLibraries() { +@@ -103,9 +106,11 @@ void LoadNetworkLibraries() { } } #endif // BUILDFLAG(IS_CHROMEOS) +#endif bool NetworkPreSandboxHook(std::vector network_context_parent_dirs, sandbox::policy::SandboxLinux::Options options) { +#if !BUILDFLAG(IS_BSD) #if BUILDFLAG(IS_CHROMEOS) LoadNetworkLibraries(); #endif -@@ -117,6 +122,7 @@ bool NetworkPreSandboxHook(std::vector ne +@@ -118,6 +123,7 @@ bool NetworkPreSandboxHook(std::vector ne GetNetworkBrokerCommandSet(), GetNetworkFilePermissions(std::move(network_context_parent_dirs)), sandbox::policy::SandboxLinux::PreSandboxHook(), options); +#endif return true; } diff --git a/www/chromium/files/patch-services_network_network__service.cc b/www/chromium/files/patch-services_network_network__service.cc index efa33cdc3f64..cb6a8d92120c 100644 --- a/www/chromium/files/patch-services_network_network__service.cc +++ b/www/chromium/files/patch-services_network_network__service.cc @@ -1,29 +1,29 @@ ---- services/network/network_service.cc.orig 2024-02-23 21:04:38 UTC +--- services/network/network_service.cc.orig 2024-03-22 08:19:40 UTC +++ services/network/network_service.cc -@@ -96,7 +96,7 @@ +@@ -97,7 +97,7 @@ #include "third_party/boringssl/src/include/openssl/cpu.h" #endif -#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || \ +#if ((BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD)) || \ BUILDFLAG(IS_CHROMEOS_LACROS) #include "components/os_crypt/sync/key_storage_config_linux.h" -@@ -963,7 +963,7 @@ void NetworkService::SetExplicitlyAllowedPorts( +@@ -979,7 +979,7 @@ void NetworkService::SetExplicitlyAllowedPorts( net::SetExplicitlyAllowedPorts(ports); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void NetworkService::SetGssapiLibraryLoadObserver( mojo::PendingRemote gssapi_library_load_observer) { -@@ -1045,7 +1045,7 @@ NetworkService::CreateHttpAuthHandlerFactory(NetworkCo +@@ -1061,7 +1061,7 @@ NetworkService::CreateHttpAuthHandlerFactory(NetworkCo ); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void NetworkService::OnBeforeGssapiLibraryLoad() { if (gssapi_library_load_observer_.is_bound()) { gssapi_library_load_observer_->OnBeforeGssapiLibraryLoad(); diff --git a/www/chromium/files/patch-services_network_network__service.h b/www/chromium/files/patch-services_network_network__service.h index 9a11d6d4c3f2..82dbaa840395 100644 --- a/www/chromium/files/patch-services_network_network__service.h +++ b/www/chromium/files/patch-services_network_network__service.h @@ -1,29 +1,29 @@ ---- services/network/network_service.h.orig 2024-02-23 21:04:38 UTC +--- services/network/network_service.h.orig 2024-03-22 08:19:40 UTC +++ services/network/network_service.h -@@ -221,7 +221,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService +@@ -230,7 +230,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService mojo::PendingReceiver receiver) override; void SetFirstPartySets(net::GlobalFirstPartySets sets) override; void SetExplicitlyAllowedPorts(const std::vector& ports) override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void SetGssapiLibraryLoadObserver( mojo::PendingRemote gssapi_library_load_observer) override; -@@ -247,7 +247,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService +@@ -256,7 +256,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService std::unique_ptr CreateHttpAuthHandlerFactory( NetworkContext* network_context); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // This is called just before a GSSAPI library may be loaded. void OnBeforeGssapiLibraryLoad(); #endif // BUILDFLAG(IS_LINUX) -@@ -477,7 +477,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService +@@ -489,7 +489,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService // leaking stale listeners between tests. std::unique_ptr mock_network_change_notifier_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) mojo::Remote gssapi_library_load_observer_; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/chromium/files/patch-services_network_public_cpp_BUILD.gn b/www/chromium/files/patch-services_network_public_cpp_BUILD.gn index 8ad07d240f5e..198adb12be4e 100644 --- a/www/chromium/files/patch-services_network_public_cpp_BUILD.gn +++ b/www/chromium/files/patch-services_network_public_cpp_BUILD.gn @@ -1,11 +1,11 @@ ---- services/network/public/cpp/BUILD.gn.orig 2024-02-23 21:04:38 UTC +--- services/network/public/cpp/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ services/network/public/cpp/BUILD.gn -@@ -488,7 +488,7 @@ component("cpp_base") { +@@ -491,7 +491,7 @@ component("cpp_base") { sources += [ "transferable_directory_fuchsia.cc" ] } - if (is_linux) { + if (is_linux && !is_bsd) { sources += [ "network_interface_change_listener_mojom_traits.cc", "network_interface_change_listener_mojom_traits.h", diff --git a/www/chromium/files/patch-services_network_public_mojom_BUILD.gn b/www/chromium/files/patch-services_network_public_mojom_BUILD.gn index 1164131837ae..ede585d4704d 100644 --- a/www/chromium/files/patch-services_network_public_mojom_BUILD.gn +++ b/www/chromium/files/patch-services_network_public_mojom_BUILD.gn @@ -1,25 +1,25 @@ ---- services/network/public/mojom/BUILD.gn.orig 2024-02-23 21:04:38 UTC +--- services/network/public/mojom/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ services/network/public/mojom/BUILD.gn @@ -522,11 +522,11 @@ mojom("url_loader_base") { } enabled_features = [] - if (is_android || is_chromeos || is_linux) { + if (!is_bsd && (is_android || is_chromeos || is_linux)) { enabled_features += [ "network_change_notifier_in_browser" ] } - if (is_linux) { + if (is_linux && !is_bsd) { # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does # not include lacros. enabled_features += [ "use_network_interface_change_listener" ] -@@ -1443,7 +1443,7 @@ mojom("mojom") { +@@ -1447,7 +1447,7 @@ mojom("mojom") { } } - if (is_linux) { + if (is_linux && !is_bsd) { # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does # not include lacros. enabled_features += [ "use_network_interface_change_listener" ] diff --git a/www/chromium/files/patch-services_on__device__model_on__device__model__service.h b/www/chromium/files/patch-services_on__device__model_on__device__model__service.h index 980c28eb63d4..134640cdf676 100644 --- a/www/chromium/files/patch-services_on__device__model_on__device__model__service.h +++ b/www/chromium/files/patch-services_on__device__model_on__device__model__service.h @@ -1,22 +1,22 @@ ---- services/on_device_model/on_device_model_service.h.orig 2024-01-30 07:53:34 UTC +--- services/on_device_model/on_device_model_service.h.orig 2024-03-22 08:19:40 UTC +++ services/on_device_model/on_device_model_service.h -@@ -18,6 +18,10 @@ +@@ -20,6 +20,10 @@ #include "sandbox/policy/linux/sandbox_linux.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + namespace on_device_model { class COMPONENT_EXPORT(ON_DEVICE_MODEL) OnDeviceModelService -@@ -27,7 +31,7 @@ class COMPONENT_EXPORT(ON_DEVICE_MODEL) OnDeviceModelS +@@ -29,7 +33,7 @@ class COMPONENT_EXPORT(ON_DEVICE_MODEL) OnDeviceModelS // These are defined separately in pre_sandbox_init.cc for explicit security // review coverage. [[nodiscard]] static bool PreSandboxInit(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) static void AddSandboxLinuxOptions( sandbox::policy::SandboxLinux::Options& options); #endif diff --git a/www/chromium/files/patch-third__party_abseil-cpp_absl_base_config.h b/www/chromium/files/patch-third__party_abseil-cpp_absl_base_config.h index b44895b6cc47..1b735cf9bda2 100644 --- a/www/chromium/files/patch-third__party_abseil-cpp_absl_base_config.h +++ b/www/chromium/files/patch-third__party_abseil-cpp_absl_base_config.h @@ -1,21 +1,21 @@ ---- third_party/abseil-cpp/absl/base/config.h.orig 2023-10-11 18:22:24 UTC +--- third_party/abseil-cpp/absl/base/config.h.orig 2024-03-22 08:19:40 UTC +++ third_party/abseil-cpp/absl/base/config.h -@@ -450,7 +450,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != +@@ -448,7 +448,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != #ifdef ABSL_HAVE_SCHED_YIELD #error ABSL_HAVE_SCHED_YIELD cannot be directly set #elif defined(__linux__) || defined(__ros__) || defined(__native_client__) || \ - defined(__VXWORKS__) + defined(__VXWORKS__) || defined(__OpenBSD__) || defined(__FreeBSD__) #define ABSL_HAVE_SCHED_YIELD 1 #endif -@@ -465,7 +465,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != +@@ -463,7 +463,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != // platforms. #ifdef ABSL_HAVE_SEMAPHORE_H #error ABSL_HAVE_SEMAPHORE_H cannot be directly set -#elif defined(__linux__) || defined(__ros__) || defined(__VXWORKS__) +#elif defined(__linux__) || defined(__ros__) || defined(__VXWORKS__) || \ + defined(__OpenBSD__) || defined(__FreeBSD__) #define ABSL_HAVE_SEMAPHORE_H 1 #endif diff --git a/www/chromium/files/patch-third__party_angle_BUILD.gn b/www/chromium/files/patch-third__party_angle_BUILD.gn index 2e783f8c326e..c9a25ba9b50e 100644 --- a/www/chromium/files/patch-third__party_angle_BUILD.gn +++ b/www/chromium/files/patch-third__party_angle_BUILD.gn @@ -1,29 +1,29 @@ ---- third_party/angle/BUILD.gn.orig 2024-02-23 21:04:38 UTC +--- third_party/angle/BUILD.gn.orig 2024-03-22 08:19:40 UTC +++ third_party/angle/BUILD.gn -@@ -316,7 +316,6 @@ config("extra_warnings") { +@@ -331,7 +331,6 @@ config("extra_warnings") { "-Wtautological-type-limit-compare", "-Wundefined-reinterpret-cast", "-Wunneeded-internal-declaration", - "-Wunused-but-set-variable", "-Wsuggest-destructor-override", "-Wsuggest-override", -@@ -487,7 +486,7 @@ template("angle_common_lib") { +@@ -502,7 +501,7 @@ template("angle_common_lib") { all_dependent_configs = [ ":angle_disable_pool_alloc" ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { libs = [ "dl" ] } -@@ -642,6 +641,9 @@ angle_static_library("angle_gpu_info_util") { +@@ -657,6 +656,9 @@ angle_static_library("angle_gpu_info_util") { "Xi", "Xext", ] + if (is_bsd) { + libs += [ "GL" ] + } } if (angle_use_wayland && angle_has_build) { diff --git a/www/chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp b/www/chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp index 3f4dc55b104b..42c398484d14 100644 --- a/www/chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp +++ b/www/chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp @@ -1,47 +1,47 @@ ---- third_party/angle/src/libANGLE/Display.cpp.orig 2024-02-23 21:04:38 UTC +--- third_party/angle/src/libANGLE/Display.cpp.orig 2024-03-22 08:19:40 UTC +++ third_party/angle/src/libANGLE/Display.cpp @@ -60,7 +60,7 @@ # include "libANGLE/renderer/gl/cgl/DisplayCGL.h" # elif ANGLE_ENABLE_EAGL # include "libANGLE/renderer/gl/eagl/DisplayEAGL.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_X11) - # include "libANGLE/renderer/gl/glx/DisplayGLX.h" -@@ -408,7 +408,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di + # include "libANGLE/renderer/gl/glx/DisplayGLX_api.h" +@@ -419,7 +419,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di impl = new rx::DisplayEAGL(state); break; -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) if (platformType == 0) { -@@ -454,7 +454,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -465,7 +465,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) { -@@ -505,7 +505,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -516,7 +516,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_GBM) if (platformType == EGL_PLATFORM_GBM_KHR && rx::IsVulkanGbmDisplayAvailable()) { -@@ -2130,7 +2130,7 @@ static ClientExtensions GenerateClientExtensions() +@@ -2152,7 +2152,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/chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h b/www/chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h index a6db7f15ac0e..9aa5fadb915f 100644 --- a/www/chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences.h +++ b/www/chromium/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 2024-01-30 07:53:34 UTC +--- third_party/blink/public/common/renderer_preferences/renderer_preferences.h.orig 2024-03-22 08:19:40 UTC +++ third_party/blink/public/common/renderer_preferences/renderer_preferences.h -@@ -63,7 +63,7 @@ struct BLINK_COMMON_EXPORT RendererPreferences { +@@ -65,7 +65,7 @@ struct BLINK_COMMON_EXPORT RendererPreferences { UserAgentOverride user_agent_override; std::string accept_languages; bool send_subresource_notification{false}; -#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 BUILDFLAG(IS_WIN) diff --git a/www/chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h b/www/chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h index d2d0b49b529c..938f441c0ba2 100644 --- a/www/chromium/files/patch-third__party_blink_public_common_renderer__preferences_renderer__preferences__mojom__traits.h +++ b/www/chromium/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 2024-01-30 07:53:34 UTC +--- third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h.orig 2024-03-22 08:19:40 UTC +++ third_party/blink/public/common/renderer_preferences/renderer_preferences_mojom_traits.h -@@ -157,7 +157,7 @@ struct BLINK_COMMON_EXPORT +@@ -165,7 +165,7 @@ struct BLINK_COMMON_EXPORT return data.send_subresource_notification; } -#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/chromium/files/patch-third__party_blink_public_platform_platform.h b/www/chromium/files/patch-third__party_blink_public_platform_platform.h index f509d9717766..816ae8b18444 100644 --- a/www/chromium/files/patch-third__party_blink_public_platform_platform.h +++ b/www/chromium/files/patch-third__party_blink_public_platform_platform.h @@ -1,11 +1,11 @@ ---- third_party/blink/public/platform/platform.h.orig 2024-02-23 21:04:38 UTC +--- third_party/blink/public/platform/platform.h.orig 2024-03-22 08:19:40 UTC +++ third_party/blink/public/platform/platform.h -@@ -348,7 +348,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -351,7 +351,7 @@ class BLINK_PLATFORM_EXPORT Platform { return nullptr; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // This is called after the thread is created, so the embedder // can initiate an IPC to change its thread type (on Linux we can't // increase the nice value, so we need to ask the browser process). This diff --git a/www/chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc b/www/chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc index 7f0da65af550..08827888cd0d 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc +++ b/www/chromium/files/patch-third__party_blink_renderer_core_exported_web__view__impl.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2024-02-23 21:04:38 UTC +--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2024-03-22 08:19:40 UTC +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -425,7 +425,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' -@@ -3368,7 +3368,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3376,7 +3376,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/chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc b/www/chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc index ceff1dbfdb1a..f8ccf482fb24 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc +++ b/www/chromium/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2024-02-23 21:04:38 UTC +--- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2024-03-22 08:19:40 UTC +++ third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -6468,7 +6468,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { +@@ -6469,7 +6469,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { } #if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // TODO(crbug.com/1090246): Fix these tests on Fuchsia and re-enable. // TODO(crbug.com/1317375): Build these tests on all platforms. #define MAYBE_SelectRangeStaysHorizontallyAlignedWhenMoved \ -@@ -6877,7 +6877,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc +@@ -6878,7 +6878,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc TEST_F(CompositedSelectionBoundsTest, LargeSelectionNoScroll) { RunTest("composited_selection_bounds_large_selection_noscroll.html"); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if !BUILDFLAG(IS_ANDROID) TEST_F(CompositedSelectionBoundsTest, Input) { web_view_helper_.GetWebView()->GetSettings()->SetDefaultFontSize(16); diff --git a/www/chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc b/www/chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc index 31bd33b83892..4da43c989664 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc +++ b/www/chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/layout/layout_view.cc.orig 2024-01-30 07:53:34 UTC +--- third_party/blink/renderer/core/layout/layout_view.cc.orig 2024-03-22 08:19:40 UTC +++ third_party/blink/renderer/core/layout/layout_view.cc -@@ -72,7 +72,7 @@ +@@ -71,7 +71,7 @@ #include "ui/gfx/geometry/quad_f.h" #include "ui/gfx/geometry/size_conversions.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/platform/fonts/font_cache.h" #endif -@@ -813,7 +813,7 @@ void LayoutView::UpdateLayout() { +@@ -811,7 +811,7 @@ void LayoutView::UpdateLayout() { intrinsic_logical_widths_ = LogicalWidth(); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The font code in FontPlatformData does not have a direct connection to the // document, the frame or anything from which we could retrieve the device // scale factor. After using zoom for DSF, the GraphicsContext does only ever diff --git a/www/chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc b/www/chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc index 9bf5aa842eb0..f8cef9710413 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc +++ b/www/chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc @@ -1,20 +1,20 @@ ---- third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2024-02-23 21:04:38 UTC +--- third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2024-03-22 08:19:40 UTC +++ third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc -@@ -150,7 +150,7 @@ bool ScrollbarThemeAura::SupportsDragSnapBack() const +@@ -149,7 +149,7 @@ bool ScrollbarThemeAura::SupportsDragSnapBack() const // is true for at least GTK and QT apps). // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) return false; #else return true; -@@ -363,7 +363,7 @@ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scr +@@ -368,7 +368,7 @@ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scr const WebMouseEvent& event) { // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (event.button == WebPointerProperties::Button::kMiddle) return true; #endif diff --git a/www/chromium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc b/www/chromium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc index 9bbbbed271b0..c56ccbcf5421 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc +++ b/www/chromium/files/patch-third__party_blink_renderer_modules_media_audio_audio__renderer__mixer__manager__test.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc.orig 2024-02-23 21:04:38 UTC +--- third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc.orig 2024-03-22 08:19:40 UTC +++ third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager_test.cc -@@ -742,7 +742,7 @@ TEST_F(AudioRendererMixerManagerTest, MixerParamsLaten +@@ -726,7 +726,7 @@ TEST_F(AudioRendererMixerManagerTest, MixerParamsLaten mixer->get_output_params_for_testing().sample_rate()); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Use 10 ms buffer (441 frames per buffer). EXPECT_EQ(output_sample_rate / 100, mixer->get_output_params_for_testing().frames_per_buffer()); diff --git a/www/chromium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc b/www/chromium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc index fb194acbe579..6af7b58b929d 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc +++ b/www/chromium/files/patch-third__party_blink_renderer_modules_peerconnection_webrtc__audio__renderer__test.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc.orig 2024-02-23 21:04:38 UTC +--- third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc.orig 2024-03-22 08:19:40 UTC +++ third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc -@@ -300,7 +300,7 @@ TEST_F(WebRtcAudioRendererTest, DISABLED_VerifySinkPar +@@ -301,7 +301,7 @@ TEST_F(WebRtcAudioRendererTest, DISABLED_VerifySinkPar SetupRenderer(kDefaultOutputDeviceId); renderer_proxy_->Start(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) static const int kExpectedBufferSize = kHardwareSampleRate / 100; #elif BUILDFLAG(IS_ANDROID) static const int kExpectedBufferSize = 2 * kHardwareSampleRate / 100; diff --git a/www/chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc b/www/chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc index 337c07875489..1fee087bd399 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc +++ b/www/chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2024-02-23 21:04:38 UTC +--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2024-03-22 08:19:40 UTC +++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -6364,7 +6364,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid +@@ -6363,7 +6363,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid constexpr bool kAllowZeroCopyImages = true; #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1175907): Only TexImage2D seems to work with the GPU path on // Android M -- appears to work fine on R, but to avoid regressions in