diff --git a/www/chromium/Makefile b/www/chromium/Makefile index 72c0c5de909a..7b8097604181 100644 --- a/www/chromium/Makefile +++ b/www/chromium/Makefile @@ -1,382 +1,388 @@ PORTNAME= chromium -PORTVERSION= 126.0.6478.126 -PORTREVISION= 1 +PORTVERSION= 127.0.6533.119 PULSEMV= 16 PULSEV= ${PULSEMV}.1 CATEGORIES= www wayland MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ https://nerd.hu/distfiles/:external \ https://freedesktop.org/software/pulseaudio/releases/:pulseaudio DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ chrome-linux-${PORTVERSION}-llvm17.profdata${EXTRACT_SUFX}:external \ pulseaudio-${PULSEV}.tar.gz:pulseaudio 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} \ + bindgen:devel/rust-bindgen-cli \ 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 \ - libasound.so:audio/alsa-lib \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ - libsndio.so:audio/sndio \ 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_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} -I${WRKDIR}/pulseaudio-${PULSEV}/src -DPA_MAJOR=${PULSEMV}" \ + extra_cxxflags="${CXXFLAGS} ${PINCLUDES}" \ extra_ldflags="${LDFLAGS}" \ ffmpeg_branding="${FFMPEG_BRAND}" -# Audio backends -GN_ARGS+= use_alsa=true \ - use_pulseaudio=true \ - use_sndio=true - # 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 +OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS PIPEWIRE SNDIO ALSA PULSEAUDIO 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_VARS= GN_ARGS+=use_pulseaudio=true \ + PINCLUDES="-I${WRKDIR}/pulseaudio-${PULSEV}/src -DPA_MAJOR=${PULSEMV}" +PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false + +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} < 180 LLVM_DEFAULT= 18 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}/third_party/ffmpeg/build.${FFMPEG_TARGET}.freebsd/${FFMPEG_BRAND} FFMPEG_CDIR= ${WRKSRC}/third_party/ffmpeg/chromium/config/${FFMPEG_BRAND}/freebsd/${FFMPEG_TARGET} # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include # 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}/media/ffmpeg && \ ${PYTHON_CMD} 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 touch ${WRKDIR}/pulseaudio-${PULSEV}/src/pulse/version.h + @${REINPLACE_CMD} -e 's|$${LOCALBASE}|${LOCALBASE}|;s|$${MODCLANG_VERSION}|${LLVM_DEFAULT}|' \ + ${WRKSRC}/build/rust/rust_bindgen.gni 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 f8f63c1c2c2b..5d01778409ae 100644 --- a/www/chromium/distinfo +++ b/www/chromium/distinfo @@ -1,11 +1,11 @@ -TIMESTAMP = 1719308067 -SHA256 (chromium-126.0.6478.126.tar.xz) = 5d5206637e659f03e006cd8b6b269c49c0c2c697d10517e14dbcea851831e143 -SIZE (chromium-126.0.6478.126.tar.xz) = 4166142564 -SHA256 (chrome-linux-126.0.6478.126-llvm17.profdata.tar.xz) = daa5caa2a8dd8790c46c35cd37ed7ada57ceb6e9533bccc225c64d45a60d4422 -SIZE (chrome-linux-126.0.6478.126-llvm17.profdata.tar.xz) = 30502872 +TIMESTAMP = 1723633404 +SHA256 (chromium-127.0.6533.119.tar.xz) = acc9e3f9fd2d180b8831865a1ac4f5cdd9ffe6211f47f467296d9ee1be2a577e +SIZE (chromium-127.0.6533.119.tar.xz) = 6621220264 +SHA256 (chrome-linux-127.0.6533.119-llvm17.profdata.tar.xz) = 49b0f3d4e454ba40edde96db9d4fe2bde78872309464f92b2122afeebc685f7d +SIZE (chrome-linux-127.0.6533.119-llvm17.profdata.tar.xz) = 30457300 SHA256 (pulseaudio-16.1.tar.gz) = 027266c62f2a84422ac45fa721a649508f0f1628fb1fd9242315ac54ce2d7c92 SIZE (pulseaudio-16.1.tar.gz) = 2763111 -SHA256 (chromium-126.0.6478.126-testdata.tar.xz) = a25a71bff83a0185dabef2237ad09cfaf367f023a2b650f7dafc79c794cc6bd7 -SIZE (chromium-126.0.6478.126-testdata.tar.xz) = 281163232 +SHA256 (chromium-127.0.6533.119-testdata.tar.xz) = a539a94ce99f6ed058db9106f56069786a911a8b39db677b3d3a78f5b582a743 +SIZE (chromium-127.0.6533.119-testdata.tar.xz) = 280109172 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 6df3122a0e71..c394db98d5d3 100644 --- a/www/chromium/files/patch-BUILD.gn +++ b/www/chromium/files/patch-BUILD.gn @@ -1,89 +1,89 @@ ---- BUILD.gn.orig 2024-06-17 12:56:06 UTC +--- BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ BUILD.gn -@@ -65,7 +65,7 @@ declare_args() { +@@ -66,7 +66,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) -@@ -97,7 +97,6 @@ group("gn_all") { +@@ -98,7 +98,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", -@@ -428,7 +427,7 @@ group("gn_all") { +@@ -433,7 +432,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", -@@ -624,6 +623,15 @@ group("gn_all") { +@@ -629,6 +628,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", -@@ -670,7 +678,7 @@ group("gn_all") { +@@ -675,7 +683,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)" ] } -@@ -1090,7 +1098,7 @@ if (use_blink && !is_cronet_build) { +@@ -1101,7 +1109,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 = [ -@@ -1185,7 +1193,7 @@ if (use_blink && !is_cronet_build) { +@@ -1194,7 +1202,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)" ] } -@@ -1194,7 +1202,7 @@ if (use_blink && !is_cronet_build) { +@@ -1203,7 +1211,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)" ] } -@@ -1654,7 +1662,7 @@ group("chromium_builder_perf") { +@@ -1667,7 +1675,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 73cfec037691..3a8367fe0b42 100644 --- a/www/chromium/files/patch-base_BUILD.gn +++ b/www/chromium/files/patch-base_BUILD.gn @@ -1,156 +1,156 @@ ---- base/BUILD.gn.orig 2024-06-17 12:56:06 UTC +--- base/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ base/BUILD.gn -@@ -200,7 +200,7 @@ buildflag_header("ios_cronet_buildflags") { +@@ -182,7 +182,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" -@@ -1142,11 +1142,23 @@ component("base") { +@@ -1119,11 +1119,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" ] -@@ -1166,7 +1178,7 @@ component("base") { +@@ -1143,7 +1155,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" ] } -@@ -2126,6 +2138,22 @@ component("base") { +@@ -2110,6 +2122,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 += [ -@@ -2271,6 +2299,33 @@ component("base") { +@@ -2255,6 +2283,33 @@ component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/scoped_file_linux.cc", + "process/set_process_title_linux.cc", + "process/set_process_title_linux.h", + "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", -@@ -2281,7 +2336,7 @@ component("base") { +@@ -2265,7 +2320,7 @@ component("base") { } if (dep_libevent) { - deps += [ "//third_party/libevent" ] + public_deps += [ "//third_party/libevent" ] } if (use_libevent) { -@@ -3094,7 +3149,7 @@ if (is_apple) { +@@ -3062,7 +3117,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 -@@ -3743,7 +3798,7 @@ test("base_unittests") { +@@ -3711,7 +3766,7 @@ test("base_unittests") { ] } - if (is_linux || is_chromeos) { + if (!is_bsd && (is_linux || is_chromeos)) { sources += [ "debug/proc_maps_linux_unittest.cc", "files/scoped_file_linux_unittest.cc", -@@ -3770,7 +3825,7 @@ test("base_unittests") { +@@ -3738,7 +3793,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", -@@ -3781,7 +3836,7 @@ test("base_unittests") { +@@ -3749,7 +3804,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" ] } -@@ -4049,7 +4104,7 @@ test("base_unittests") { +@@ -4017,7 +4072,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 48db51a06ad6..2e90443f5636 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-06-17 12:56:06 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/partition_alloc.gni -@@ -33,7 +33,7 @@ if (is_nacl) { +@@ -31,7 +31,7 @@ if (is_nacl) { use_large_empty_slot_span_ring = is_mac 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, -@@ -373,7 +373,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 +@@ -360,7 +360,7 @@ assert(!use_asan_backup_ref_ptr || use_raw_ptr_hookabl + # dependencies that use partition_allocator are compiled in AOSP against a + # version of glibc that does not include pkeys syscall numbers. + is_pkeys_available = +- (is_linux || is_chromeos) && current_cpu == "x64" && !is_cronet_build ++ !is_bsd && (is_linux || is_chromeos) && current_cpu == "x64" && !is_cronet_build + declare_args() { + enable_pkeys = is_pkeys_available } - 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 8826075eedc3..ac4483834cbc 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-06-17 12:56:06 UTC +--- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/BUILD.gn -@@ -884,7 +884,7 @@ if (is_clang_or_gcc) { - configs -= [ "//build/config/compiler:enable_arc" ] +@@ -863,7 +863,7 @@ if (is_clang_or_gcc) { + configs -= [ partition_alloc_enable_arc_config ] } } - 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_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h index 2c2562fa05d4..a91fb1bc8acf 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h.orig 2024-05-21 18:07:39 UTC +--- base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h @@ -38,7 +38,7 @@ AslrMask(uintptr_t bits) { - #if defined(ARCH_CPU_64_BITS) + #if PA_BUILDFLAG(PA_ARCH_CPU_64_BITS) - #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) -+ #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && !BUILDFLAG(IS_BSD) ++ #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && !PA_BUILDFLAG(IS_BSD) // We shouldn't allocate system pages at all for sanitizer builds. However, // we do, and if random hint addresses interfere with address ranges @@ -125,7 +125,7 @@ AslrMask(uintptr_t bits) { return AslrAddress(0x20000000ULL); } - #elif defined(ARCH_CPU_ARM64) -- #if BUILDFLAG(IS_LINUX) -+ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #elif PA_BUILDFLAG(PA_ARCH_CPU_ARM64) +- #if PA_BUILDFLAG(IS_LINUX) ++ #if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD) // Linux on arm64 can use 39, 42, 48, or 52-bit user space, depending on // page size and number of levels of translation pages used. We use diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h index 2b8e04c5b547..635f05dddb18 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/page_allocator.h.orig 2024-04-19 13:02:56 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator.h.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator.h @@ -259,7 +259,7 @@ bool DecommitAndZeroSystemPages(void* address, // recommitted. Do not assume that this will not change over time. constexpr PA_COMPONENT_EXPORT( PARTITION_ALLOC) bool DecommittedMemoryIsAlwaysZeroed() { --#if BUILDFLAG(IS_APPLE) -+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) +-#if PA_BUILDFLAG(IS_APPLE) ++#if PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_BSD) return false; #else return true; diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h index e3693583741a..adc1cadac766 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h.orig 2024-04-19 13:02:56 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h @@ -26,7 +26,7 @@ #define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) - #elif (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS)) || \ -- (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) -+ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) + #elif (PA_BUILDFLAG(IS_ANDROID) && PA_BUILDFLAG(PA_ARCH_CPU_64_BITS)) || \ +- (PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) ++ ((PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) // This should work for all POSIX (if needed), but currently all other // supported OS/architecture combinations use either hard-coded values // (such as x86) or have means to determine these values without needing diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h index 3f74e4127498..bf5d79ad9e46 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h @@ -1,16 +1,16 @@ ---- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h.orig 2024-02-23 21:04:38 UTC +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h @@ -411,8 +411,12 @@ bool TryRecommitSystemPagesInternal( void DiscardSystemPagesInternal(uintptr_t address, size_t length) { void* ptr = reinterpret_cast(address); --#if BUILDFLAG(IS_APPLE) -+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) -+#if BUILDFLAG(IS_BSD) +-#if PA_BUILDFLAG(IS_APPLE) ++#if PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_BSD) ++#if PA_BUILDFLAG(IS_BSD) + int ret = madvise(ptr, length, MADV_FREE); +#else int ret = madvise(ptr, length, MADV_FREE_REUSABLE); +#endif if (ret) { // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED. ret = madvise(ptr, length, MADV_DONTNEED); diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc index d3aa9f9ef802..dc95a41a0378 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc @@ -1,34 +1,34 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc.orig 2024-02-23 21:04:38 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc @@ -13,11 +13,11 @@ #include "partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" #include "partition_alloc/partition_alloc_base/strings/safe_sprintf.h" --#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_APPLE) -+#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) +-#if !PA_BUILDFLAG(IS_ANDROID) && !PA_BUILDFLAG(IS_APPLE) ++#if !PA_BUILDFLAG(IS_ANDROID) && !PA_BUILDFLAG(IS_APPLE) && !PA_BUILDFLAG(IS_BSD) #include // For ElfW() macro. #endif --#if BUILDFLAG(IS_APPLE) -+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) +-#if PA_BUILDFLAG(IS_APPLE) ++#if PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_BSD) #include #endif @@ -25,7 +25,7 @@ namespace partition_alloc::internal::base::debug { namespace { --#if !BUILDFLAG(IS_APPLE) -+#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) +-#if !PA_BUILDFLAG(IS_APPLE) ++#if !PA_BUILDFLAG(IS_APPLE) && !PA_BUILDFLAG(IS_BSD) // On Android the 'open' function has two versions: // int open(const char *pathname, int flags); @@ -369,7 +369,7 @@ void PrintStackTraceInternal(const void** trace, size_ } - #endif // !BUILDFLAG(IS_APPLE) + #endif // !PA_BUILDFLAG(IS_APPLE) --#if BUILDFLAG(IS_APPLE) -+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) +-#if PA_BUILDFLAG(IS_APPLE) ++#if PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_BSD) // Since /proc/self/maps is not available, use dladdr() to obtain module // names and offsets inside the modules from the given addresses. void PrintStackTraceInternal(const void* const* trace, size_t size) { diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc index e9d1cc9df848..e24b29f35988 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc @@ -1,13 +1,13 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc.orig 2024-02-23 21:04:38 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc @@ -102,6 +102,10 @@ void RandBytes(void* output, size_t output_length) { if (getentropy(output, output_length) == 0) { return; } -+#elif BUILDFLAG(IS_BSD) ++#elif PA_BUILDFLAG(IS_BSD) + if (getentropy(output, output_length) == 0) { + return; + } #endif // If getrandom(2) above returned with an error and the /dev/urandom fallback // took place on Linux/ChromeOS bots, they would fail with a CHECK in diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h index 4fa07f52d169..10a2c6a426b3 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h.orig 2024-02-23 21:04:38 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h @@ -37,6 +37,8 @@ typedef DWORD PlatformThreadId; typedef zx_handle_t PlatformThreadId; - #elif BUILDFLAG(IS_APPLE) + #elif PA_BUILDFLAG(IS_APPLE) typedef mach_port_t PlatformThreadId; -+#elif BUILDFLAG(IS_BSD) ++#elif PA_BUILDFLAG(IS_BSD) +typedef uint64_t PlatformThreadId; - #elif BUILDFLAG(IS_POSIX) + #elif PA_BUILDFLAG(IS_POSIX) typedef pid_t PlatformThreadId; #endif diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h index d84248567e0d..0fc3aad100bb 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h.orig 2023-12-10 06:10:27 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h @@ -10,7 +10,7 @@ namespace partition_alloc::internal::base::internal { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) ++#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD) // Current thread id is cached in thread local storage for performance reasons. // In some rare cases it's important to invalidate that cache explicitly (e.g. // after going through clone() syscall which does not call pthread_atfork() diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc index b311bc492836..8f3639f95b55 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc.orig 2024-02-23 21:04:38 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc @@ -18,7 +18,7 @@ #include "partition_alloc/partition_alloc_base/logging.h" #include "partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h" --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) ++#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD) #include #include #endif diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h index 18f8d7b14143..4f6538f806ea 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2024-06-17 12:56:06 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h -@@ -232,7 +232,7 @@ constexpr bool kUseLazyCommit = false; - // On these platforms, lock all the partitions before fork(), and unlock after. +@@ -236,7 +236,7 @@ constexpr bool kUseLazyCommit = false; // This may be required on more platforms in the future. - #define PA_CONFIG_HAS_ATFORK_HANDLER() \ -- (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) -+ (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) + #define PA_CONFIG_HAS_ATFORK_HANDLER() \ + (PA_BUILDFLAG(IS_APPLE) || PA_BUILDFLAG(IS_LINUX) || \ +- PA_BUILDFLAG(IS_CHROMEOS)) ++ PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD)) // PartitionAlloc uses PartitionRootEnumerator to acquire all // PartitionRoots at BeforeFork and to release at AfterFork. -@@ -279,7 +279,7 @@ constexpr bool kUseLazyCommit = false; - // +@@ -284,7 +284,7 @@ constexpr bool kUseLazyCommit = false; // Also enabled on ARM64 macOS and iOS, as the 16kiB pages on this platform lead // to larger slot spans. --#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_ARM64)) -+#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD) + #if PA_BUILDFLAG(IS_LINUX) || \ +- (PA_BUILDFLAG(IS_APPLE) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) ++ (PA_BUILDFLAG(IS_APPLE) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)) || PA_BUILDFLAG(IS_BSD) #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 1 #else #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() 0 diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h index ad2ec7e02089..a173e021e5bf 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig 2024-06-17 12:56:06 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h -@@ -316,7 +316,7 @@ constexpr size_t kNumPools = kMaxPoolHandle - 1; +@@ -329,7 +329,7 @@ PA_DEFINE_OPERATORS_FOR_FLAGS(PoolHandleMask); // 8GB for each of the glued pools). #if PA_BUILDFLAG(HAS_64_BIT_POINTERS) - #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || \ + #if PA_BUILDFLAG(IS_ANDROID) || PA_BUILDFLAG(IS_IOS) || \ - PA_BUILDFLAG(ENABLE_POINTER_COMPRESSION) -+ PA_BUILDFLAG(ENABLE_POINTER_COMPRESSION) || BUILDFLAG(IS_BSD) ++ PA_BUILDFLAG(ENABLE_POINTER_COMPRESSION) || PA_BUILDFLAG(IS_BSD) constexpr size_t kPoolMaxSize = 8 * kGiB; #else constexpr size_t kPoolMaxSize = 16 * kGiB; diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc index 2ada1677d2fc..8c9e225f4237 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc @@ -1,29 +1,29 @@ ---- base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig 2024-06-17 12:56:06 UTC +--- base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/partition_root.cc @@ -48,7 +48,7 @@ #include "wow64apiset.h" #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) ++#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD) #include #endif -@@ -280,7 +280,7 @@ void PartitionAllocMallocInitOnce() { +@@ -282,7 +282,7 @@ void PartitionAllocMallocInitOnce() { return; } --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) ++#if PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_CHROMEOS) || PA_BUILDFLAG(IS_BSD) // When fork() is called, only the current thread continues to execute in the // child process. If the lock is held, but *not* by this thread when fork() is // called, we have a deadlock. -@@ -957,7 +957,7 @@ void PartitionRoot::Init(PartitionOptions opts) { +@@ -1079,7 +1079,7 @@ void PartitionRoot::Init(PartitionOptions opts) { // apple OSes. PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) || (internal::SystemPageSize() == (size_t{1} << 14))); --#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) -+#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) +-#elif PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64) ++#elif (PA_BUILDFLAG(IS_LINUX) || PA_BUILDFLAG(IS_BSD)) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64) // Check runtime pagesize. Though the code is currently the same, it is // not merged with the IS_APPLE case above as a 1 << 16 case needs to be // added here in the future, to allow 64 kiB pagesize. That is only diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_stack_stack.cc b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_stack_stack.cc index 076da69d662f..9663a41a0c99 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_stack_stack.cc +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_stack_stack.cc @@ -1,50 +1,50 @@ ---- base/allocator/partition_allocator/src/partition_alloc/stack/stack.cc.orig 2024-05-21 18:07:39 UTC +--- base/allocator/partition_allocator/src/partition_alloc/stack/stack.cc.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/stack/stack.cc @@ -18,6 +18,10 @@ #include #endif -+#if BUILDFLAG(IS_BSD) ++#if PA_BUILDFLAG(IS_BSD) +#include +#endif + - #if defined(LIBC_GLIBC) + #if PA_BUILDFLAG(PA_LIBC_GLIBC) extern "C" void* __libc_stack_end; #endif @@ -48,6 +52,36 @@ void* GetStackTop() { void* GetStackTop() { return pthread_get_stackaddr_np(pthread_self()); +} + -+#elif defined(OS_OPENBSD) ++#elif PA_BUILDFLAG(IS_OPENBSD) + +void* GetStackTop() { + stack_t ss; + if (pthread_stackseg_np(pthread_self(), &ss) != 0) + return nullptr; + return reinterpret_cast(ss.ss_sp); +} + -+#elif defined(OS_FREEBSD) ++#elif PA_BUILDFLAG(IS_FREEBSD) + +void* GetStackTop() { + pthread_attr_t attr; + int error = pthread_attr_init(&attr); + if (error) { + return nullptr; + } + error = pthread_attr_get_np(pthread_self(), &attr); + if (!error) { + void* base; + size_t size; + error = pthread_attr_getstack(&attr, &base, &size); + PA_CHECK(!error); + pthread_attr_destroy(&attr); + return reinterpret_cast(base) + size; + } + pthread_attr_destroy(&attr); + return nullptr; } - #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) + #elif PA_BUILDFLAG(IS_POSIX) || PA_BUILDFLAG(IS_FUCHSIA) diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc index eb1225a8f769..ece8431f1d85 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_thread__isolation_pkey.cc @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc.orig 2024-02-23 21:04:38 UTC +--- base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc.orig 2024-07-30 11:12:21 UTC +++ base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc @@ -16,7 +16,7 @@ #include "partition_alloc/partition_alloc_check.h" #include "partition_alloc/thread_isolation/thread_isolation.h" --#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) +-#if !PA_BUILDFLAG(IS_LINUX) && !PA_BUILDFLAG(IS_CHROMEOS) ++#if !PA_BUILDFLAG(IS_LINUX) && !PA_BUILDFLAG(IS_CHROMEOS) && !PA_BUILDFLAG(IS_BSD) #error "This pkey code is currently only supported on Linux and ChromeOS" #endif diff --git a/www/chromium/files/patch-base_debug_stack__trace.cc b/www/chromium/files/patch-base_debug_stack__trace.cc index 2baef4126059..c19fc3aa9d64 100644 --- a/www/chromium/files/patch-base_debug_stack__trace.cc +++ b/www/chromium/files/patch-base_debug_stack__trace.cc @@ -1,29 +1,29 @@ ---- base/debug/stack_trace.cc.orig 2024-06-17 12:56:06 UTC +--- base/debug/stack_trace.cc.orig 2024-07-30 11:12:21 UTC +++ base/debug/stack_trace.cc -@@ -254,7 +254,7 @@ bool StackTrace::WillSymbolizeToStreamForTesting() { +@@ -255,7 +255,7 @@ bool StackTrace::WillSymbolizeToStreamForTesting() { // Symbols are not expected to be reliable when gn args specifies // symbol_level=0. return false; -#elif defined(__UCLIBC__) || defined(_AIX) +#elif defined(__UCLIBC__) || defined(_AIX) || BUILDFLAG(IS_BSD) // StackTrace::OutputToStream() is not implemented under uclibc, nor AIX. // See https://crbug.com/706728 return false; -@@ -316,7 +316,7 @@ std::string StackTrace::ToString() const { +@@ -317,7 +317,7 @@ std::string StackTrace::ToString() const { std::string StackTrace::ToStringWithPrefix(cstring_view prefix_string) const { std::stringstream stream; -#if !defined(__UCLIBC__) && !defined(_AIX) +#if !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD) OutputToStreamWithPrefix(&stream, prefix_string); #endif return stream.str(); -@@ -340,7 +340,7 @@ bool StackTrace::ShouldSuppressOutput() { +@@ -341,7 +341,7 @@ bool StackTrace::ShouldSuppressOutput() { } std::ostream& operator<<(std::ostream& os, const StackTrace& s) { -#if !defined(__UCLIBC__) && !defined(_AIX) +#if !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD) s.OutputToStream(&os); #else os << "StackTrace::OutputToStream not implemented."; diff --git a/www/chromium/files/patch-base_debug_stack__trace__posix.cc b/www/chromium/files/patch-base_debug_stack__trace__posix.cc index 7bd5a05630c1..8d10e2218c3d 100644 --- a/www/chromium/files/patch-base_debug_stack__trace__posix.cc +++ b/www/chromium/files/patch-base_debug_stack__trace__posix.cc @@ -1,101 +1,101 @@ ---- base/debug/stack_trace_posix.cc.orig 2024-06-17 12:56:06 UTC +--- base/debug/stack_trace_posix.cc.orig 2024-07-30 11:12:21 UTC +++ base/debug/stack_trace_posix.cc @@ -46,7 +46,7 @@ // execinfo.h and backtrace(3) are really only present in glibc and in macOS // libc. #if BUILDFLAG(IS_APPLE) || \ - (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX)) + (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX) && !BUILDFLAG(IS_BSD)) #define HAVE_BACKTRACE #include #endif @@ -64,8 +64,10 @@ #include #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +#if !BUILDFLAG(IS_BSD) #include +#endif #include "base/debug/proc_maps_linux.h" #endif -@@ -306,7 +308,7 @@ void PrintToStderr(const char* output) { +@@ -307,7 +309,7 @@ void PrintToStderr(const char* output) { std::ignore = HANDLE_EINTR(write(STDERR_FILENO, output, strlen(output))); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void AlarmSignalHandler(int signal, siginfo_t* info, void* void_context) { // We have seen rare cases on AMD linux where the default signal handler // either does not run or a thread (Probably an AMD driver thread) prevents -@@ -323,7 +325,11 @@ void AlarmSignalHandler(int signal, siginfo_t* info, v +@@ -324,7 +326,11 @@ void AlarmSignalHandler(int signal, siginfo_t* info, v "Warning: Default signal handler failed to terminate process.\n"); PrintToStderr("Calling exit_group() directly to prevent timeout.\n"); // See: https://man7.org/linux/man-pages/man2/exit_group.2.html +#if BUILDFLAG(IS_BSD) + _exit(EXIT_FAILURE); +#else syscall(SYS_exit_group, EXIT_FAILURE); +#endif } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || // BUILDFLAG(IS_CHROMEOS) -@@ -540,7 +546,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -541,7 +547,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf _exit(EXIT_FAILURE); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Set an alarm to trigger in case the default handler does not terminate // the process. See 'AlarmSignalHandler' for more details. struct sigaction action; -@@ -565,6 +571,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -566,6 +572,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf // signals that do not re-raise autonomously), such as signals delivered via // kill() and asynchronous hardware faults such as SEGV_MTEAERR, which would // otherwise be lost when re-raising the signal via raise(). +#if !BUILDFLAG(IS_BSD) long retval = syscall(SYS_rt_tgsigqueueinfo, getpid(), syscall(SYS_gettid), info->si_signo, info); if (retval == 0) { -@@ -579,6 +586,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf +@@ -580,6 +587,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf if (errno != EPERM) { _exit(EXIT_FAILURE); } +#endif #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || // BUILDFLAG(IS_CHROMEOS) -@@ -768,6 +776,7 @@ class SandboxSymbolizeHelper { +@@ -769,6 +777,7 @@ class SandboxSymbolizeHelper { return -1; } +#if !BUILDFLAG(IS_BSD) // This class is copied from // third_party/crashpad/crashpad/util/linux/scoped_pr_set_dumpable.h. // It aims at ensuring the process is dumpable before opening /proc/self/mem. -@@ -860,11 +869,15 @@ class SandboxSymbolizeHelper { +@@ -861,11 +870,15 @@ class SandboxSymbolizeHelper { r.base = cur_base; } } +#endif // Parses /proc/self/maps in order to compile a list of all object file names // for the modules that are loaded in the current process. // Returns true on success. bool CacheMemoryRegions() { +#if BUILDFLAG(IS_BSD) + return false; +#else // Reads /proc/self/maps. std::string contents; if (!ReadProcMaps(&contents)) { -@@ -882,6 +895,7 @@ class SandboxSymbolizeHelper { +@@ -883,6 +896,7 @@ class SandboxSymbolizeHelper { is_initialized_ = true; return true; +#endif } // Opens all object files and caches their file descriptors. diff --git a/www/chromium/files/patch-base_features.cc b/www/chromium/files/patch-base_features.cc index 21d6f98ec048..b63201213cbf 100644 --- a/www/chromium/files/patch-base_features.cc +++ b/www/chromium/files/patch-base_features.cc @@ -1,20 +1,27 @@ ---- base/features.cc.orig 2024-05-21 18:07:39 UTC +--- base/features.cc.orig 2024-07-30 11:12:21 UTC +++ base/features.cc -@@ -9,7 +9,7 @@ +@@ -9,8 +9,10 @@ #include "base/threading/platform_thread.h" #include "build/buildflag.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) ++#if !BUILDFLAG(IS_BSD) + #include "base/message_loop/message_pump_epoll.h" ++#endif #include "base/message_loop/message_pump_libevent.h" #endif -@@ -98,7 +98,7 @@ void Init(EmitThreadControllerProfilerMetadata +@@ -97,9 +99,11 @@ void Init(EmitThreadControllerProfilerMetadata sequence_manager::internal::ThreadController::InitializeFeatures( emit_thread_controller_profiler_metadata); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) MessagePumpLibevent::InitializeFeatures(); ++#if !BUILDFLAG(IS_BSD) + MessagePumpEpoll::InitializeFeatures(); ++#endif #endif + #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/chromium/files/patch-base_files_file__path__watcher__unittest.cc b/www/chromium/files/patch-base_files_file__path__watcher__unittest.cc index 74298079a794..dc5237479bba 100644 --- a/www/chromium/files/patch-base_files_file__path__watcher__unittest.cc +++ b/www/chromium/files/patch-base_files_file__path__watcher__unittest.cc @@ -1,29 +1,29 @@ ---- base/files/file_path_watcher_unittest.cc.orig 2024-06-17 12:56:06 UTC +--- base/files/file_path_watcher_unittest.cc.orig 2024-07-30 11:12:21 UTC +++ base/files/file_path_watcher_unittest.cc -@@ -847,7 +847,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { +@@ -902,7 +902,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { } delegate.RunUntilEventsMatch(event_expecter); -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && BUILDFLAG(IS_BSD) ASSERT_TRUE(WriteFile(file1, "content v2")); // Mac implementation does not detect files modified in a directory. // TODO(crbug.com/40263777): Expect that no events are fired on Mac. -@@ -1783,7 +1783,7 @@ namespace { +@@ -1848,7 +1848,7 @@ namespace { enum Permission { Read, Write, Execute }; -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) bool ChangeFilePermissions(const FilePath& path, Permission perm, bool allow) { struct stat stat_buf; -@@ -1817,7 +1817,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi +@@ -1882,7 +1882,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi } // namespace -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) && BUILDFLAG(IS_BSD) // Linux implementation of FilePathWatcher doesn't catch attribute changes. // http://crbug.com/78043 // Windows implementation of FilePathWatcher catches attribute changes that diff --git a/www/chromium/files/patch-base_files_file__util__posix.cc b/www/chromium/files/patch-base_files_file__util__posix.cc index 6559c3c4f202..8ba56e1a0f99 100644 --- a/www/chromium/files/patch-base_files_file__util__posix.cc +++ b/www/chromium/files/patch-base_files_file__util__posix.cc @@ -1,53 +1,55 @@ ---- base/files/file_util_posix.cc.orig 2024-06-17 12:56:06 UTC +--- base/files/file_util_posix.cc.orig 2024-07-30 11:12:21 UTC +++ base/files/file_util_posix.cc -@@ -819,33 +819,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p - File::Error* error) { +@@ -889,36 +889,33 @@ bool CreateNewTempDirectory(const FilePath::StringType + bool CreateDirectoryAndGetError(const FilePath& full_path, File::Error* error) { ScopedBlockingCall scoped_blocking_call( FROM_HERE, BlockingType::MAY_BLOCK); // For call to mkdir(). + const FilePath kFileSystemRoot("/"); std::vector subpaths; // Collect a list of all parent directories. FilePath last_path = full_path; - subpaths.push_back(full_path); +- for (FilePath path = full_path.DirName(); path.value() != last_path.value(); +- path = path.DirName()) { + if (full_path != kFileSystemRoot) + subpaths.push_back(full_path); - for (FilePath path = full_path.DirName(); -- path.value() != last_path.value(); path = path.DirName()) { -+ (path.value() != last_path.value() && ++ for (FilePath path = full_path.DirName(); (path.value() != last_path.value() && + (path != kFileSystemRoot)); path = path.DirName()) { subpaths.push_back(path); last_path = path; } // Iterate through the parents and create the missing ones. for (const FilePath& subpath : base::Reversed(subpaths)) { -- if (DirectoryExists(subpath)) +- if (DirectoryExists(subpath)) { - continue; -- if (mkdir(subpath.value().c_str(), 0700) == 0) +- } +- if (mkdir(subpath.value().c_str(), 0700) == 0) { - continue; +- } - // Mkdir failed, but it might have failed with EEXIST, or some other error - // due to the directory appearing out of thin air. This can occur if - // two processes are trying to create the same file system tree at the same - // time. Check to see if it exists and make sure it is a directory. - int saved_errno = errno; - if (!DirectoryExists(subpath)) { -- if (error) +- if (error) { - *error = File::OSErrorToFileError(saved_errno); -- errno = saved_errno; -- return false; + if (!PathExists(subpath)) { + if ((mkdir(subpath.value().c_str(), 0700) == -1) && + ((full_path != subpath) ? (errno != ENOENT) : (-1))) { -+ int saved_errno = errno; ++ int saved_errno = errno; + if (error) + *error = File::OSErrorToFileError(saved_errno); + return false; -+ } + } +- errno = saved_errno; +- return false; + } else if (!DirectoryExists(subpath)) { + if (error) + *error = File::OSErrorToFileError(ENOTDIR); + return false; } } return true; diff --git a/www/chromium/files/patch-base_files_file__util__unittest.cc b/www/chromium/files/patch-base_files_file__util__unittest.cc index 3f99964a4440..4adec64caf38 100644 --- a/www/chromium/files/patch-base_files_file__util__unittest.cc +++ b/www/chromium/files/patch-base_files_file__util__unittest.cc @@ -1,20 +1,20 @@ ---- base/files/file_util_unittest.cc.orig 2024-06-17 12:56:06 UTC +--- base/files/file_util_unittest.cc.orig 2024-07-30 11:12:21 UTC +++ base/files/file_util_unittest.cc -@@ -3835,7 +3835,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { +@@ -3903,7 +3903,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { } #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) TEST_F(FileUtilTest, ReadFileToStringWithProcFileSystem) { FilePath file_path("/proc/cpuinfo"); std::string data = "temp"; -@@ -4568,7 +4568,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles +@@ -4620,7 +4620,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles NULL); #else size_t bytes_written = - ::write(::fileno(output_file.get()), content.c_str(), content.length()); + ::write(fileno(output_file.get()), content.c_str(), content.length()); #endif EXPECT_EQ(content.length(), bytes_written); ::fflush(output_file.get()); diff --git a/www/chromium/files/patch-base_files_scoped__file.cc b/www/chromium/files/patch-base_files_scoped__file.cc index 350c73cc76e7..1ea60790510a 100644 --- a/www/chromium/files/patch-base_files_scoped__file.cc +++ b/www/chromium/files/patch-base_files_scoped__file.cc @@ -1,11 +1,11 @@ ---- base/files/scoped_file.cc.orig 2022-02-28 16:54:41 UTC +--- base/files/scoped_file.cc.orig 2024-07-30 11:12:21 UTC +++ base/files/scoped_file.cc -@@ -31,7 +31,7 @@ void ScopedFDCloseTraits::Free(int fd) { +@@ -32,7 +32,7 @@ void ScopedFDCloseTraits::Free(int fd) { int ret = IGNORE_EINTR(close(fd)); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_APPLE) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // NB: Some file descriptors can return errors from close() e.g. network // filesystems such as NFS and Linux input devices. On Linux, macOS, and // Fuchsia's POSIX layer, errors from close other than EBADF do not indicate diff --git a/www/chromium/files/patch-base_process_memory__linux.cc b/www/chromium/files/patch-base_process_memory__linux.cc index 8d493b02d714..b387eeabc9d7 100644 --- a/www/chromium/files/patch-base_process_memory__linux.cc +++ b/www/chromium/files/patch-base_process_memory__linux.cc @@ -1,44 +1,44 @@ ---- base/process/memory_linux.cc.orig 2024-06-17 12:56:06 UTC +--- base/process/memory_linux.cc.orig 2024-07-30 11:12:21 UTC +++ base/process/memory_linux.cc @@ -28,6 +28,7 @@ void __libc_free(void*); namespace base { +#if !BUILDFLAG(IS_BSD) namespace { void ReleaseReservationOrTerminate() { @@ -37,12 +38,14 @@ void ReleaseReservationOrTerminate() { } } // namespace +#endif void EnableTerminationOnHeapCorruption() { // On Linux, there nothing to do AFAIK. } void EnableTerminationOnOutOfMemory() { +#if !BUILDFLAG(IS_BSD) // Set the new-out of memory handler. std::set_new_handler(&ReleaseReservationOrTerminate); // If we're using glibc's allocator, the above functions will override @@ -51,8 +54,10 @@ void EnableTerminationOnOutOfMemory() { #if PA_BUILDFLAG(USE_ALLOCATOR_SHIM) allocator_shim::SetCallNewHandlerOnMallocFailure(true); #endif +#endif } +#if !BUILDFLAG(IS_BSD) // ScopedAllowBlocking() has private constructor and it can only be used in // friend classes/functions. Declaring a class is easier in this situation to // avoid adding more dependency to thread_restrictions.h because of the -@@ -112,6 +117,7 @@ bool AdjustOOMScoreHelper::AdjustOOMScore(ProcessId pr +@@ -110,6 +115,7 @@ bool AdjustOOMScoreHelper::AdjustOOMScore(ProcessId pr bool AdjustOOMScore(ProcessId process, int score) { return AdjustOOMScoreHelper::AdjustOOMScore(process, score); } +#endif bool UncheckedMalloc(size_t size, void** result) { #if PA_BUILDFLAG(USE_ALLOCATOR_SHIM) diff --git a/www/chromium/files/patch-base_threading_hang__watcher.cc b/www/chromium/files/patch-base_threading_hang__watcher.cc index a32aef72b4d9..dbd9804afc30 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 2024-03-22 08:19:40 UTC +--- base/threading/hang_watcher.cc.orig 2024-07-30 11:12:21 UTC +++ base/threading/hang_watcher.cc -@@ -332,7 +332,7 @@ void HangWatcher::InitializeOnMainThread(ProcessType p +@@ -354,7 +354,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-build_config_BUILD.gn b/www/chromium/files/patch-build_config_BUILD.gn index 2722052c9507..6f5f04cf9e25 100644 --- a/www/chromium/files/patch-build_config_BUILD.gn +++ b/www/chromium/files/patch-build_config_BUILD.gn @@ -1,13 +1,13 @@ ---- build/config/BUILD.gn.orig 2023-08-17 07:33:31 UTC +--- build/config/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ build/config/BUILD.gn -@@ -214,6 +214,10 @@ config("default_libs") { +@@ -213,6 +213,10 @@ config("default_libs") { # Targets should choose to explicitly link frameworks they require. Since # linking can have run-time side effects, nothing should be listed here. libs = [] + } else if (is_bsd) { + libs = [ + "pthread", + ] } else if (is_linux || is_chromeos) { libs = [ "dl", diff --git a/www/chromium/files/patch-build_config_clang_BUILD.gn b/www/chromium/files/patch-build_config_clang_BUILD.gn index 6cc0ef6ff99b..b80b574e0b32 100644 --- a/www/chromium/files/patch-build_config_clang_BUILD.gn +++ b/www/chromium/files/patch-build_config_clang_BUILD.gn @@ -1,11 +1,11 @@ ---- build/config/clang/BUILD.gn.orig 2024-06-17 12:56:06 UTC +--- build/config/clang/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ build/config/clang/BUILD.gn -@@ -214,7 +214,7 @@ template("clang_lib") { +@@ -230,7 +230,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 096b85a28469..73834c76367e 100644 --- a/www/chromium/files/patch-build_config_compiler_BUILD.gn +++ b/www/chromium/files/patch-build_config_compiler_BUILD.gn @@ -1,132 +1,132 @@ ---- build/config/compiler/BUILD.gn.orig 2024-06-18 16:34:35 UTC +--- build/config/compiler/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ build/config/compiler/BUILD.gn @@ -199,7 +199,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() { @@ -251,13 +251,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", "-Wl,--strip-all" ] + } } # compiler --------------------------------------------------------------------- @@ -499,6 +502,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_icf && (!is_apple || use_lld)) { -@@ -545,7 +552,7 @@ config("compiler") { +@@ -552,7 +559,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 += [ -@@ -1173,7 +1180,7 @@ config("compiler_cpu_abi") { +@@ -1195,7 +1202,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" ] -@@ -1188,7 +1195,7 @@ config("compiler_cpu_abi") { +@@ -1210,7 +1217,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" ] -@@ -1523,7 +1530,7 @@ config("compiler_deterministic") { +@@ -1545,7 +1552,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", -@@ -1575,7 +1582,7 @@ config("compiler_deterministic") { +@@ -1597,7 +1604,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", -@@ -1889,9 +1896,6 @@ config("default_warnings") { +@@ -1908,9 +1915,6 @@ config("default_warnings") { # TODO(crbug.com/40286317): Evaluate and possibly enable. "-Wno-vla-extension", - - # TODO(crbug.com/40284799): Fix and re-enable. - "-Wno-thread-safety-reference-return", ] cflags_cc += [ -@@ -1899,7 +1903,7 @@ config("default_warnings") { +@@ -1918,7 +1922,7 @@ config("default_warnings") { "-Wenum-compare-conditional", ] - if (!is_nacl) { + if (!is_nacl && !is_openbsd) { cflags_cc += [ # TODO(crbug.com/41486292): Fix and re-enable. "-Wno-c++11-narrowing-const-reference", -@@ -2616,7 +2620,7 @@ config("afdo_optimize_size") { +@@ -2640,7 +2644,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. -@@ -2643,7 +2647,7 @@ config("afdo") { +@@ -2667,7 +2671,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 ] } -@@ -2808,7 +2812,8 @@ config("symbols") { +@@ -2832,7 +2836,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(crbug.com/40117949): 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 index 01d2b5e47998..4e4f8639e37a 100644 --- a/www/chromium/files/patch-build_config_rust.gni +++ b/www/chromium/files/patch-build_config_rust.gni @@ -1,13 +1,13 @@ ---- build/config/rust.gni.orig 2024-05-21 18:07:39 UTC +--- build/config/rust.gni.orig 2024-07-30 11:12:21 UTC +++ build/config/rust.gni -@@ -272,6 +272,10 @@ if (is_linux || is_chromeos) { +@@ -270,6 +270,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_linux_unbundle_dav1d.gn b/www/chromium/files/patch-build_linux_unbundle_dav1d.gn new file mode 100644 index 000000000000..523f5c878631 --- /dev/null +++ b/www/chromium/files/patch-build_linux_unbundle_dav1d.gn @@ -0,0 +1,25 @@ +--- build/linux/unbundle/dav1d.gn.orig 2024-07-30 11:12:21 UTC ++++ build/linux/unbundle/dav1d.gn +@@ -1,11 +1,11 @@ + import("//build/config/linux/pkg_config.gni") + import("//build/shim_headers.gni") + +-pkg_config("system_dav1d") { ++pkg_config("dav1d_config") { + packages = [ "dav1d" ] + } + +-shim_headers("dav1d_shim") { ++shim_headers("dav1d_headers") { + root_path = "libdav1d/include" + headers = [ + "dav1d/common.h", +@@ -18,6 +18,6 @@ shim_headers("dav1d_shim") { + } + + source_set("dav1d") { +- deps = [ ":dav1d_shim" ] +- public_configs = [ ":system_dav1d" ] ++ deps = [ ":dav1d_headers" ] ++ public_configs = [ ":dav1d_config" ] + } diff --git a/www/chromium/files/patch-build_linux_unbundle_icu.gn b/www/chromium/files/patch-build_linux_unbundle_icu.gn index 8f61fffcf46b..cdcc382c6ad5 100644 --- a/www/chromium/files/patch-build_linux_unbundle_icu.gn +++ b/www/chromium/files/patch-build_linux_unbundle_icu.gn @@ -1,18 +1,29 @@ ---- build/linux/unbundle/icu.gn.orig 2023-04-13 18:16:16 UTC +--- build/linux/unbundle/icu.gn.orig 2024-07-30 11:12:21 UTC +++ build/linux/unbundle/icu.gn @@ -17,6 +17,15 @@ config("icu_config") { "USING_SYSTEM_ICU=1", "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC", + # As of icu 73 C++ nullptr, char16_t, override, final and noexcept are used + # instead of defines. These definitions can be removed when the bundled icu + # gets updated to 73. For more details, see: + # https://unicode-org.atlassian.net/browse/ICU-21833 and + # https://github.com/unicode-org/icu/commit/28643799377ecf654564f6f31854b02788cebe33 + "U_FINAL=final", + "U_NOEXCEPT=noexcept", + "U_OVERRIDE=override", + # U_EXPORT (defined in unicode/platform.h) is used to set public visibility # on classes through the U_COMMON_API and U_I18N_API macros (among others). # When linking against the system ICU library, we want its symbols to have +@@ -59,6 +68,10 @@ source_set("icuuc") { + ":icu_config", + ":system_icuuc", + ] ++} ++ ++group("icuuc_public") { ++ public_deps = [ ":icuuc" ] + } + + shim_headers("icui18n_shim") { diff --git a/www/chromium/files/patch-build_rust_rust__bindgen.gni b/www/chromium/files/patch-build_rust_rust__bindgen.gni new file mode 100644 index 000000000000..41ce8114edd8 --- /dev/null +++ b/www/chromium/files/patch-build_rust_rust__bindgen.gni @@ -0,0 +1,19 @@ +--- build/rust/rust_bindgen.gni.orig 2024-07-30 19:22:51 UTC ++++ build/rust/rust_bindgen.gni +@@ -11,14 +11,14 @@ if (is_win) { + import("//build/toolchain/win/win_toolchain_data.gni") + } + +-_bindgen_path = "${rust_bindgen_root}/bin/bindgen" ++_bindgen_path = "${LOCALBASE}/bin/bindgen" + if (host_os == "win") { + _bindgen_path = "${_bindgen_path}.exe" + } + + # On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in + # ../lib. +-_libclang_path = rust_bindgen_root ++_libclang_path = "${LOCALBASE}/llvm${MODCLANG_VERSION}" + if (host_os == "win") { + _libclang_path += "/bin" + } else { diff --git a/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni b/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni index cc391fbfe404..6fd7d35fbaeb 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-06-17 12:56:06 UTC +--- build/toolchain/gcc_toolchain.gni.orig 2024-07-30 11:12:21 UTC +++ build/toolchain/gcc_toolchain.gni -@@ -57,6 +57,13 @@ if (enable_resource_allowlist_generation) { +@@ -56,6 +56,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). # -@@ -878,22 +885,12 @@ template("gcc_toolchain") { +@@ -864,22 +871,12 @@ template("gcc_toolchain") { # actually just be doing a native compile. 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-cc_BUILD.gn b/www/chromium/files/patch-cc_BUILD.gn index 5cfcc2b55e09..1345e84f9013 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-05-21 18:07:39 UTC +--- cc/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ cc/BUILD.gn -@@ -677,7 +677,7 @@ cc_test_static_library("test_support") { +@@ -686,7 +686,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) { -@@ -936,7 +936,6 @@ cc_test("cc_unittests") { +@@ -945,7 +945,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-cc_base_features.cc b/www/chromium/files/patch-cc_base_features.cc index acb4b05a37a8..7ec5e8082a7c 100644 --- a/www/chromium/files/patch-cc_base_features.cc +++ b/www/chromium/files/patch-cc_base_features.cc @@ -1,11 +1,11 @@ ---- cc/base/features.cc.orig 2024-01-30 07:53:34 UTC +--- cc/base/features.cc.orig 2024-07-30 11:12:21 UTC +++ cc/base/features.cc -@@ -88,7 +88,7 @@ BASE_FEATURE(kNormalPriorityImageDecoding, +@@ -86,7 +86,7 @@ BASE_FEATURE(kNormalPriorityImageDecoding, // be using a separate flag to control the launch on GL. BASE_FEATURE(kUseDMSAAForTiles, "UseDMSAAForTiles", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT 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 46365f7478ac..71912488f3a1 100644 --- a/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc +++ b/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc @@ -1,154 +1,154 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/app/chrome_main_delegate.cc -@@ -137,7 +137,7 @@ +@@ -138,7 +138,7 @@ #include "components/about_ui/credit_utils.h" #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) #include "components/nacl/common/nacl_paths.h" #include "components/nacl/zygote/nacl_fork_delegate_linux.h" #endif -@@ -180,21 +180,21 @@ +@@ -182,21 +182,21 @@ #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) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/nix/scoped_xdg_activation_token_injector.h" #include "ui/linux/display_server_utils.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 -@@ -241,7 +241,7 @@ +@@ -243,7 +243,7 @@ #include "base/scoped_add_feature_flags.h" #include "ui/base/ui_base_features.h" #include "ui/ozone/public/ozone_platform.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_extra_parts_linux.h" #endif #endif // BUILDFLAG(IS_OZONE) -@@ -341,7 +341,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -343,7 +343,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 -@@ -426,7 +426,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -428,7 +428,7 @@ bool HandleVersionSwitches(const base::CommandLine& co // TODO(crbug.com/40118868): 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) || -@@ -472,7 +472,7 @@ void SetCrashpadUploadConsentPostLogin() { +@@ -474,7 +474,7 @@ void SetCrashpadUploadConsentPostLogin() { } #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; -@@ -554,7 +554,7 @@ std::optional AcquireProcessSingleton( +@@ -556,7 +556,7 @@ std::optional AcquireProcessSingleton( // process can be exited. ChromeProcessSingleton::CreateInstance(user_data_dir); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Read the xdg-activation token and set it in the command line for the // duration of the notification in order to ensure this is propagated to an // already running browser process if it exists. -@@ -638,7 +638,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -640,7 +640,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 +@@ -767,7 +767,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( -@@ -957,7 +957,7 @@ std::optional ChromeMainDelegate::PostEarlyInitia +@@ -959,7 +959,7 @@ std::optional ChromeMainDelegate::PostEarlyInitia #if BUILDFLAG(IS_OZONE) // Initialize Ozone platform and add required feature flags as per platform's // properties. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ui::SetOzonePlatformForLinuxIfNeeded(*base::CommandLine::ForCurrentProcess()); #endif ui::OzonePlatform::PreEarlyInitialization(); -@@ -1150,7 +1150,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv +@@ -1154,7 +1154,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv const bool is_canary_dev = IsCanaryDev(); const bool emit_crashes = #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) is_canary_dev; #else false; -@@ -1305,7 +1305,7 @@ std::optional ChromeMainDelegate::BasicStartupCom +@@ -1309,7 +1309,7 @@ std::optional ChromeMainDelegate::BasicStartupCom // TODO(crbug.com/40118868): 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 -@@ -1335,7 +1335,7 @@ std::optional ChromeMainDelegate::BasicStartupCom +@@ -1339,7 +1339,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 -@@ -1722,7 +1722,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1726,7 +1726,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)) { -@@ -1821,7 +1821,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 +@@ -1827,7 +1827,7 @@ absl::variant Chrome + {switches::kRelauncherProcess, mac_relauncher::internal::RelauncherMain}, + {switches::kCodeSignCloneCleanupProcess, + code_sign_clone_manager::internal::ChromeCodeSignCloneCleanupMain}, +-#elif BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) + // This entry is not needed on Linux, where the NaCl loader + // process is launched via nacl_helper instead. + {switches::kNaClLoaderProcess, NaClMain}, diff --git a/www/chromium/files/patch-chrome_browser_BUILD.gn b/www/chromium/files/patch-chrome_browser_BUILD.gn index d18f857d1600..7e857d6efd40 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-06-17 12:56:06 UTC +--- chrome/browser/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/BUILD.gn -@@ -6708,6 +6708,13 @@ static_library("browser") { +@@ -6672,6 +6672,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 af8c638ff9e5..651de21c0625 100644 --- a/www/chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/chromium/files/patch-chrome_browser_about__flags.cc @@ -1,218 +1,266 @@ ---- chrome/browser/about_flags.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/about_flags.cc.orig 2024-08-14 11:02:58 UTC +++ chrome/browser/about_flags.cc @@ -238,7 +238,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 -@@ -328,7 +328,7 @@ +@@ -332,7 +332,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) -@@ -337,7 +337,7 @@ - #include "chrome/browser/win/titlebar_config.h" +@@ -341,7 +341,7 @@ + #include "chrome/browser/win/mica_titlebar.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) -@@ -482,7 +482,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap +@@ -476,7 +476,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, -@@ -1265,7 +1265,7 @@ const FeatureEntry::FeatureVariation kPageContentAnnot +@@ -847,6 +847,26 @@ const FeatureEntry::FeatureVariation + std::size(kWebIdentityDigitalIdentityCredentialHighRiskDialogParam), + nullptr}}; + ++#if BUILDFLAG(IS_BSD) ++const FeatureEntry::FeatureParam kAudioBackendPulseAudio[] = { ++ { "audio-backend", "pulseaudio" }}; ++const FeatureEntry::FeatureParam kAudioBackendSndio[] = { ++ { "audio-backend", "sndio" }}; ++const FeatureEntry::FeatureParam kAudioBackendAlsa[] = { ++ { "audio-backend", "alsa" }}; ++const FeatureEntry::FeatureVariation ++ kAudioBackendVariations[] = { ++ {"using PulseAudio by default if available", kAudioBackendPulseAudio, ++ std::size(kAudioBackendPulseAudio), ++ nullptr}, ++ {"using sndio by default if available", kAudioBackendSndio, ++ std::size(kAudioBackendSndio), ++ nullptr}, ++ {"using ALSA by default if available", kAudioBackendAlsa, ++ std::size(kAudioBackendAlsa), ++ nullptr}}; ++#endif ++ + const FeatureEntry::FeatureParam kClipboardMaximumAge60Seconds[] = { + {"UIClipboardMaximumAge", "60"}}; + const FeatureEntry::FeatureParam kClipboardMaximumAge90Seconds[] = { +@@ -1260,7 +1280,7 @@ const FeatureEntry::FeatureVariation kPageContentAnnot }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kHistoryEmbeddingsAtKeywordAcceleration[]{ {"AtKeywordAcceleration", "true"}, }; -@@ -1328,7 +1328,7 @@ const FeatureEntry::FeatureVariation +@@ -1323,7 +1343,7 @@ const FeatureEntry::FeatureVariation }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kShortcutBoostSingleUrl[] = { {"ShortcutBoostSearchScore", "0"}, {"ShortcutBoostNonTopHitThreshold", "0"}, -@@ -3679,7 +3679,7 @@ const flags_ui::FeatureEntry::FeatureVariation +@@ -3827,7 +3847,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 -@@ -4511,7 +4511,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4800,7 +4820,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, -@@ -4947,7 +4947,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5216,7 +5236,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kWebAppUniversalInstallDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kWebAppUniversalInstall)}, #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"shortcuts-not-apps", flag_descriptions::kShortcutsNotAppsName, flag_descriptions::kShortcutsNotAppsDescription, kOsMac | kOsWin | kOsLinux, -@@ -5074,7 +5074,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5348,7 +5368,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) || BUILDFLAG(IS_BSD) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"pulseaudio-loopback-for-cast", flag_descriptions::kPulseaudioLoopbackForCastName, flag_descriptions::kPulseaudioLoopbackForCastDescription, kOsLinux, -@@ -5090,7 +5090,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5362,9 +5382,19 @@ const FeatureEntry kFeatureEntries[] = { + {"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName, + flag_descriptions::kOzonePlatformHintDescription, kOsLinux, MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, ++ ++#if BUILDFLAG(IS_BSD) ++ {"audio-backend", ++ flag_descriptions::kAudioBackendName, ++ flag_descriptions::kAudioBackendDescription, kOsLinux, ++ FEATURE_WITH_PARAMS_VALUE_TYPE( ++ media::kAudioBackend, ++ kAudioBackendVariations, ++ "AudioBackend")}, ++#endif #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, -@@ -6011,7 +6011,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6304,7 +6334,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"omnibox-domain-suggestions", flag_descriptions::kOmniboxDomainSuggestionsName, flag_descriptions::kOmniboxDomainSuggestionsDescription, kOsDesktop, -@@ -6331,7 +6331,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6638,7 +6668,7 @@ const FeatureEntry kFeatureEntries[] = { "OrganicRepeatableQueries")}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"history-embeddings", flag_descriptions::kHistoryEmbeddingsName, flag_descriptions::kHistoryEmbeddingsDescription, kOsDesktop, FEATURE_WITH_PARAMS_VALUE_TYPE(history_embeddings::kHistoryEmbeddings, -@@ -7949,7 +7949,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7328,7 +7358,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(printing::features::kAddPrinterViaPrintscanmgr)}, + #endif // BUILDFLAG(IS_CHROMEOS) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + {"cups-ipp-printing-backend", + flag_descriptions::kCupsIppPrintingBackendName, + flag_descriptions::kCupsIppPrintingBackendDescription, kOsDesktop, +@@ -8327,7 +8357,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kCooperativeSchedulingDescription, kOsAll, FEATURE_VALUE_TYPE(features::kCooperativeScheduling)}, -#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, -@@ -7973,7 +7973,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8351,7 +8381,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(media::kV4L2FlatStatefulVideoDecoder)}, #endif -#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, -@@ -8810,7 +8810,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9213,7 +9243,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, -@@ -8849,7 +8849,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9252,7 +9282,7 @@ const FeatureEntry kFeatureEntries[] = { #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { "ui-debug-tools", flag_descriptions::kUIDebugToolsName, -@@ -9086,7 +9086,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9494,7 +9524,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, -@@ -9393,7 +9393,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9807,7 +9837,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {"media-session-enter-picture-in-picture", flag_descriptions::kMediaSessionEnterPictureInPictureName, flag_descriptions::kMediaSessionEnterPictureInPictureDescription, -@@ -10303,7 +10303,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10702,7 +10732,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), -@@ -10341,7 +10341,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10740,7 +10770,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kSiteInstanceGroupsForDataUrls)}, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - {"show-featured-enterprise-site-search", - flag_descriptions::kShowFeaturedEnterpriseSiteSearchName, - flag_descriptions::kShowFeaturedEnterpriseSiteSearchDescription, kOsAll, -@@ -10456,7 +10456,7 @@ const FeatureEntry kFeatureEntries[] = { + {"site-search-settings-policy", + flag_descriptions::kSiteSearchSettingsPolicyName, + flag_descriptions::kSiteSearchSettingsPolicyDescription, kOsAll, +@@ -10864,7 +10894,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kHideIncognitoMediaMetadataDescription, kOsAll, FEATURE_VALUE_TYPE(media::kHideIncognitoMediaMetadata)}, -#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, -@@ -10805,7 +10805,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -11200,7 +11230,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, -@@ -11086,7 +11086,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -11487,7 +11517,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_after__startup__task__utils.cc b/www/chromium/files/patch-chrome_browser_after__startup__task__utils.cc index 2c5887ba8034..6b393074c5f3 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 2024-03-22 08:19:40 UTC +--- chrome/browser/after_startup_task_utils.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/after_startup_task_utils.cc -@@ -115,7 +115,7 @@ void SetBrowserStartupIsComplete() { +@@ -117,7 +117,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_browser__features.cc b/www/chromium/files/patch-chrome_browser_browser__features.cc index 6a8f7d66b356..534d274abda4 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-06-17 12:56:06 UTC +--- chrome/browser/browser_features.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/browser_features.cc -@@ -82,7 +82,7 @@ const base::FeatureParam kSpareRendererWarmupDel +@@ -61,7 +61,7 @@ BASE_FEATURE(kClosedTabCache, 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); -@@ -354,7 +354,7 @@ BASE_FEATURE(kSandboxExternalProtocolBlockedWarning, +@@ -330,7 +330,7 @@ BASE_FEATURE(kSandboxExternalProtocolBlockedWarning, 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 8a28bb08769a..6e397cc01925 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-06-17 12:56:06 UTC +--- chrome/browser/browser_process_impl.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/browser_process_impl.cc -@@ -229,7 +229,7 @@ +@@ -228,7 +228,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 -@@ -1284,7 +1284,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1282,7 +1282,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 -@@ -1617,7 +1617,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1615,7 +1615,7 @@ void BrowserProcessImpl::Unpin() { // Mac is currently not supported. // TODO(crbug.com/40118868): 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 a857cf7e71d5..c434c54befb7 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,71 +1,89 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -132,12 +132,12 @@ +@@ -134,12 +134,12 @@ #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) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || 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 -@@ -228,7 +228,7 @@ +@@ -230,7 +230,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" -@@ -854,7 +854,7 @@ void BindScreen2xMainContentExtractor( +@@ -241,7 +241,7 @@ + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || + // BUILDFLAG(IS_CHROMEOS) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/webui/whats_new/whats_new_ui.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + +@@ -865,7 +865,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< -@@ -1050,7 +1050,7 @@ void PopulateChromeFrameBinders( +@@ -1061,7 +1061,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 (base::FeatureList::IsEnabled(blink::features::kDesktopPWAsSubApps) && !render_frame_host->GetParentOrOuterDocument()) { // The service binder will reject non-primary main frames, but we still need -@@ -1137,7 +1137,7 @@ void PopulateChromeWebUIFrameBinders( - commerce::CommerceInternalsUI>(map); +@@ -1152,7 +1152,7 @@ void PopulateChromeWebUIFrameBinders( + DataSharingInternalsUI>(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); -@@ -1148,7 +1148,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1163,7 +1163,7 @@ void PopulateChromeWebUIFrameBinders( policy::DlpInternalsUI>(map); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map); #endif -@@ -1759,7 +1759,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1256,7 +1256,7 @@ void PopulateChromeWebUIFrameBinders( + + RegisterWebUIControllerInterfaceBinder< + browser_command::mojom::CommandHandlerFactory, +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + WhatsNewUI, + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + NewTabPageUI>(map); +@@ -1797,7 +1797,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 eb488c766105..cf3611b0cbe1 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc +++ b/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc @@ -1,118 +1,118 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/chrome_browser_main.cc @@ -247,15 +247,15 @@ // TODO(crbug.com/40118868): 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 -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/nix/xdg_util.h" #endif @@ -288,14 +288,14 @@ // TODO(crbug.com/40118868): 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) #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" @@ -367,14 +367,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"); @@ -539,7 +539,7 @@ void ProcessSingletonNotificationCallbackImpl( } #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Set the global activation token sent as a command line switch by another // browser process. This also removes the switch after use to prevent any side // effects of leaving it in the command line after this point. -@@ -1100,7 +1100,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1101,7 +1101,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 . -@@ -1148,7 +1148,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1149,7 +1149,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { // TODO(crbug.com/40118868): 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) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::Initialize(); TouchModeStatsTracker::Initialize( -@@ -1333,7 +1333,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1336,7 +1336,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/40177301): Remove this. base::ThreadPool::PostTask( -@@ -1382,7 +1382,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1385,7 +1385,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(); } -@@ -1492,7 +1492,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( +@@ -1495,7 +1495,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(); } -@@ -2043,7 +2043,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat +@@ -2046,7 +2046,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__content__browser__client.cc b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc index 805202b52e4d..10a73c517cf8 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,161 +1,161 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -468,7 +468,7 @@ +@@ -469,7 +469,7 @@ #include "storage/browser/file_system/external_mount_points.h" // TODO(crbug.com/40118868): 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) -@@ -578,12 +578,12 @@ +@@ -585,12 +585,12 @@ // TODO(crbug.com/40118868): 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 -@@ -594,7 +594,7 @@ +@@ -601,7 +601,7 @@ #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/oidc_auth_response_capture_navigation_throttle.h" #include "chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.h" -@@ -602,7 +602,7 @@ +@@ -609,7 +609,7 @@ #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) -@@ -617,7 +617,7 @@ - #include "chrome/browser/ui/lens/lens_side_panel_navigation_helper.h" +@@ -624,7 +624,7 @@ + #include "chrome/browser/ui/views/lens/lens_side_panel_navigation_helper.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" -@@ -1516,7 +1516,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre +@@ -1538,7 +1538,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) -@@ -1640,7 +1640,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1669,7 +1669,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) -@@ -1674,7 +1674,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1703,7 +1703,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo std::make_unique()); // TODO(crbug.com/40118868): 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 -@@ -1695,7 +1695,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1724,7 +1724,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()); -@@ -1714,7 +1714,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1743,7 +1743,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>()); -@@ -2551,7 +2551,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2577,7 +2577,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin client_info->client_id); } #elif BUILDFLAG(IS_POSIX) -#if !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) pid_t pid; if (crash_reporter::GetHandlerSocket(nullptr, &pid)) { command_line->AppendSwitchASCII( -@@ -2886,7 +2886,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2923,7 +2923,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin } } -#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)) { -@@ -4651,7 +4651,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4698,7 +4698,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, -@@ -5205,7 +5205,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5266,7 +5266,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); -@@ -5219,7 +5219,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5280,7 +5280,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); -@@ -5258,7 +5258,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5319,7 +5319,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); -@@ -7243,7 +7243,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS +@@ -7292,7 +7292,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 cdebb12053a0..9f3282de5b4c 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-06-17 12:56:06 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -507,7 +507,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -513,7 +513,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_device__identity_device__oauth2__token__service__factory.cc b/www/chromium/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc index 0c2fbf343089..d146e3da3496 100644 --- a/www/chromium/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc +++ b/www/chromium/files/patch-chrome_browser_device__identity_device__oauth2__token__service__factory.cc @@ -1,11 +1,11 @@ ---- chrome/browser/device_identity/device_oauth2_token_service_factory.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/device_identity/device_oauth2_token_service_factory.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/device_identity/device_oauth2_token_service_factory.cc @@ -28,7 +28,7 @@ std::unique_ptr CreatePlatform return std::make_unique( local_state); #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) return std::make_unique(local_state); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); 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 d27e83c460d2..715ec94e405b 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-06-17 12:56:06 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1714,7 +1714,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1729,7 +1729,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(); } -@@ -1860,7 +1860,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -1875,7 +1875,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()) { -@@ -1906,7 +1906,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl +@@ -1939,7 +1939,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 290acf7d02e3..7b087caa67cb 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-06-17 12:56:06 UTC +--- chrome/browser/download/download_item_model.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/download/download_item_model.cc @@ -799,7 +799,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(); @@ -847,7 +847,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); -@@ -1236,7 +1236,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1245,7 +1245,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_connectors__service.cc b/www/chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc index fcb9573085cc..7824c73a72c6 100644 --- a/www/chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc +++ b/www/chromium/files/patch-chrome_browser_enterprise_connectors_connectors__service.cc @@ -1,11 +1,11 @@ ---- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/enterprise/connectors/connectors_service.cc -@@ -565,7 +565,7 @@ bool ConnectorsService::ConnectorsEnabled() const { +@@ -568,7 +568,7 @@ bool ConnectorsService::ConnectorsEnabled() const { Profile* profile = Profile::FromBrowserContext(context_); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On desktop, the guest profile is actually the primary OTR profile of // the "regular" guest profile. The regular guest profile is never used // directly by users. Also, user are not able to create child OTR profiles diff --git a/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc b/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc index fb6820846a59..cd612fb0c226 100644 --- a/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc +++ b/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_key__management_core_persistence_key__persistence__delegate__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/key_persistence_delegate_factory.cc.orig 2023-08-17 07:33:31 UTC +--- chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/key_persistence_delegate_factory.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/key_persistence_delegate_factory.cc @@ -13,7 +13,7 @@ #include "chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/win_key_persistence_delegate.h" #elif BUILDFLAG(IS_MAC) #include "chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/mac_key_persistence_delegate.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/key_management/core/persistence/linux_key_persistence_delegate.h" #endif @@ -45,7 +45,7 @@ KeyPersistenceDelegateFactory::CreateKeyPersistenceDel return std::make_unique(); #elif BUILDFLAG(IS_MAC) return std::make_unique(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return std::make_unique(); #else - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); diff --git a/www/chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc b/www/chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc index b274583f3a8f..924660afcabc 100644 --- a/www/chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc +++ b/www/chromium/files/patch-chrome_browser_enterprise_connectors_reporting_realtime__reporting__client.cc @@ -1,38 +1,47 @@ ---- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc.orig 2024-04-19 13:02:56 UTC +--- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc @@ -58,7 +58,7 @@ #include "base/strings/utf_string_conversions.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/signals/signals_aggregator_factory.h" + #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #include "components/device_signals/core/browser/signals_aggregator.h" - #include "components/device_signals/core/common/signals_constants.h" -@@ -132,7 +132,7 @@ void UploadSecurityEventReport(base::Value::Dict event +@@ -133,7 +133,7 @@ void UploadSecurityEventReport(base::Value::Dict event std::move(upload_callback)); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void PopulateSignals(base::Value::Dict event, policy::CloudPolicyClient* client, std::string name, -@@ -420,7 +420,7 @@ void RealtimeReportingClient::ReportPastEvent(const st +@@ -421,7 +421,7 @@ void RealtimeReportingClient::ReportPastEvent(const st /*include_profile_user_name=*/false); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void AddCrowdstrikeSignalsToEvent( base::Value::Dict& event, -@@ -479,7 +479,7 @@ void RealtimeReportingClient::ReportEventWithTimestamp +@@ -480,7 +480,7 @@ void RealtimeReportingClient::ReportEventWithTimestamp if (include_profile_user_name) { event.Set(kKeyProfileUserName, GetProfileUserName()); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context_); device_signals::SignalsAggregator* signals_aggregator = enterprise_signals::SignalsAggregatorFactory::GetForProfile(profile); +@@ -505,7 +505,7 @@ std::string RealtimeReportingClient::GetProfileUserNam + ? safe_browsing::GetProfileEmail(identity_manager_) + : std::string(); + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (username.empty()) { + username = Profile::FromBrowserContext(context_)->GetPrefs()->GetString( + enterprise_signin::prefs::kProfileUserEmail); diff --git a/www/chromium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher__linux.cc b/www/chromium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher__linux.cc index e24ecb3238a2..a8bec3b7befe 100644 --- a/www/chromium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher__linux.cc +++ b/www/chromium/files/patch-chrome_browser_enterprise_signals_device__info__fetcher__linux.cc @@ -1,78 +1,78 @@ ---- chrome/browser/enterprise/signals/device_info_fetcher_linux.cc.orig 2023-09-13 12:11:42 UTC +--- chrome/browser/enterprise/signals/device_info_fetcher_linux.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/enterprise/signals/device_info_fetcher_linux.cc @@ -4,12 +4,23 @@ #include "chrome/browser/enterprise/signals/device_info_fetcher_linux.h" +#include "build/build_config.h" + #if defined(USE_GIO) #include #endif // defined(USE_GIO) #include +#if !BUILDFLAG(IS_BSD) #include +#endif +#if BUILDFLAG(IS_BSD) +#include +#include +#include +#include +#endif + #include #include "base/environment.h" -@@ -118,6 +129,7 @@ SettingValue GetScreenlockSecured() { +@@ -117,6 +128,7 @@ SettingValue GetScreenlockSecured() { // Implements the logic from the native host installation script. First find the // root device identifier, then locate its parent and get its type. SettingValue GetDiskEncrypted() { +#if !BUILDFLAG(IS_BSD) struct stat info; // First figure out the device identifier. Fail fast if this fails. if (stat("/", &info) != 0) -@@ -139,11 +151,35 @@ SettingValue GetDiskEncrypted() { +@@ -138,11 +150,35 @@ SettingValue GetDiskEncrypted() { } return SettingValue::UNKNOWN; } +#endif return SettingValue::DISABLED; } std::vector GetMacAddresses() { std::vector result; +#if BUILDFLAG(IS_BSD) + struct ifaddrs* ifa = nullptr; + + if (getifaddrs(&ifa) != 0) + return result; + + struct ifaddrs* interface = ifa; + for (; interface != nullptr; interface = interface->ifa_next) { + if (interface->ifa_addr == nullptr || + interface->ifa_addr->sa_family != AF_LINK) { + continue; + } + struct sockaddr_dl* sdl = + reinterpret_cast(interface->ifa_addr); + if (!sdl || sdl->sdl_alen != 6) + continue; + char* link_address = static_cast(LLADDR(sdl)); + result.push_back(base::StringPrintf( + "%02x:%02x:%02x:%02x:%02x:%02x", link_address[0] & 0xff, + link_address[1] & 0xff, link_address[2] & 0xff, link_address[3] & 0xff, + link_address[4] & 0xff, link_address[5] & 0xff)); + } +#else base::DirReaderPosix reader("/sys/class/net"); if (!reader.IsValid()) return result; -@@ -166,6 +202,7 @@ std::vector GetMacAddresses() { +@@ -165,6 +201,7 @@ std::vector GetMacAddresses() { &address); result.push_back(address); } +#endif return result; } diff --git a/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn b/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn index e9b3f4a32e26..f6d44c8b18da 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-06-17 12:56:06 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1391,6 +1391,10 @@ static_library("extensions") { +@@ -1415,6 +1415,10 @@ source_set("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_api__browser__context__keyed__service__factories.cc b/www/chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc index ce01047a2f5e..2ebbc96965e2 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2024-04-19 13:02:56 UTC +--- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc -@@ -45,7 +45,7 @@ +@@ -44,7 +44,7 @@ + #include "pdf/buildflags.h" #include "printing/buildflags/buildflags.h" - #include "services/screen_ai/buildflags/buildflags.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h" #endif -@@ -128,7 +128,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt +@@ -120,7 +120,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt extensions::SettingsPrivateEventRouterFactory::GetInstance(); extensions::SettingsOverridesAPI::GetFactoryInstance(); extensions::SidePanelService::GetFactoryInstance(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extensions::SystemIndicatorManagerFactory::GetInstance(); #endif extensions::TabGroupsEventRouterFactory::GetInstance(); diff --git a/www/chromium/files/patch-chrome_browser_extensions_api_management_chrome__management__api__delegate.cc b/www/chromium/files/patch-chrome_browser_extensions_api_management_chrome__management__api__delegate.cc index b77998ba58fb..b6464978e6f0 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_management_chrome__management__api__delegate.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_api_management_chrome__management__api__delegate.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/management/chrome_management_api_delegate.cc.orig 2024-05-21 18:07:39 UTC +--- chrome/browser/extensions/api/management/chrome_management_api_delegate.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/extensions/api/management/chrome_management_api_delegate.cc -@@ -405,7 +405,7 @@ bool ChromeManagementAPIDelegate::LaunchAppFunctionDel +@@ -414,7 +414,7 @@ bool ChromeManagementAPIDelegate::LaunchAppFunctionDel apps::LaunchContainer launch_container = GetLaunchContainer(extensions::ExtensionPrefs::Get(context), extension); Profile* profile = Profile::FromBrowserContext(context); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (extensions::IsExtensionUnsupportedDeprecatedApp(profile, extension->id())) { return false; 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 6ad32153f215..15d4b175f352 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-06-17 12:56:06 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -610,7 +610,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem +@@ -611,7 +611,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 a5967f4300ca..adfb7b271d0e 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 2024-06-17 12:56:06 UTC +--- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc @@ -284,7 +284,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 { - NOTREACHED() << "Platform not supported: " << os; + NOTREACHED_IN_MIGRATION() << "Platform not supported: " << os; return false; 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 845800df52a4..0854ac85afda 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-06-17 12:56:06 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -197,7 +197,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist - (*s_allowlist)[::prefs::kSidePanelHorizontalAlignment] = +@@ -202,7 +202,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist + (*s_allowlist)[tab_groups::prefs::kAutoPinNewTabGroups] = settings_api::PrefType::kBoolean; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::kBoolean; #endif -@@ -208,7 +208,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -213,7 +213,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 14cf501e9fa6..e465a8665bd4 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-06-17 12:56:06 UTC +--- chrome/browser/extensions/api/tabs/tabs_api.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/extensions/api/tabs/tabs_api.cc -@@ -890,7 +890,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio +@@ -892,7 +892,7 @@ ExtensionFunction::ResponseAction WindowsCreateFunctio // minimized. // TODO(crbug.com/40254339): Remove this workaround when linux is fixed. // TODO(crbug.com/40254339): 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_extensions_api_webstore__private_webstore__private__api.cc b/www/chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc index 0792af53ceea..cb039ab9261d 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_api_webstore__private_webstore__private__api.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/extensions/api/webstore_private/webstore_private_api.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/extensions/api/webstore_private/webstore_private_api.cc -@@ -897,7 +897,7 @@ void WebstorePrivateBeginInstallWithManifest3Function: +@@ -907,7 +907,7 @@ void WebstorePrivateBeginInstallWithManifest3Function: #if BUILDFLAG(IS_CHROMEOS) RequestExtensionApproval(contents); return; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Shows a parental permission dialog directly bypassing the extension // install dialog view. The parental permission dialog contains a superset // of data from the extension install dialog: requested extension diff --git a/www/chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc b/www/chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc index 041eaa13dfc7..09cb78ab198c 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/external_provider_impl.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/extensions/external_provider_impl.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/extensions/external_provider_impl.cc -@@ -831,7 +831,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -834,7 +834,7 @@ void ExternalProviderImpl::CreateExternalProviders( if (!profile->GetPrefs()->GetBoolean(pref_names::kBlockExternalExtensions)) { // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) provider_list->push_back(std::make_unique( service, base::MakeRefCounted( -@@ -859,7 +859,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -862,7 +862,7 @@ void ExternalProviderImpl::CreateExternalProviders( bundled_extension_creation_flags)); // Define a per-user source of external extensions. -#if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ BUILDFLAG(CHROMIUM_BRANDING)) provider_list->push_back(std::make_unique( service, diff --git a/www/chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc b/www/chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc index 81227df0c407..2da53070b4f9 100644 --- a/www/chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc +++ b/www/chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc @@ -1,11 +1,11 @@ ---- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -315,7 +315,7 @@ const struct { +@@ -318,7 +318,7 @@ const struct { FILE_PATH_LITERAL("Library/Mobile Documents/com~apple~CloudDocs"), kDontBlockChildren}, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux also block access to devices via /dev. {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren}, // And security sensitive data in /proc and /sys. diff --git a/www/chromium/files/patch-chrome_browser_flag__descriptions.cc b/www/chromium/files/patch-chrome_browser_flag__descriptions.cc index 2d2d74b36a40..0e3a8a5390c1 100644 --- a/www/chromium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/chromium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,91 +1,109 @@ ---- chrome/browser/flag_descriptions.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/flag_descriptions.cc.orig 2024-08-14 11:02:58 UTC +++ chrome/browser/flag_descriptions.cc -@@ -2923,7 +2923,7 @@ const char kCbdTimeframeRequiredDescription[] = +@@ -2969,7 +2969,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[] = -@@ -3220,7 +3220,7 @@ const char kShowAutofillTypePredictionsDescription[] = +@@ -3287,7 +3287,7 @@ const char kShowAutofillTypePredictionsDescription[] = "text."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kShowFeaturedEnterpriseSiteSearchName[] = "Show featured Enterprise site search engines in Omnibox"; const char kShowFeaturedEnterpriseSiteSearchDescription[] = -@@ -3245,7 +3245,7 @@ const char kSiteInstanceGroupsForDataUrlsDescription[] +@@ -3324,7 +3324,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) + 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."; -@@ -7485,7 +7485,7 @@ const char kLacrosMergeIcuDataFileDescription[] = +@@ -7725,7 +7725,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 " -@@ -7753,7 +7753,7 @@ const char kV4L2FlatStatefulVideoDecoderDescription[] +@@ -7976,7 +7976,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"; -@@ -7801,14 +7801,14 @@ const char kZeroCopyVideoCaptureDescription[] = +@@ -7998,6 +7998,17 @@ const char kPulseaudioLoopbackForScreenShareName[] = + const char kPulseaudioLoopbackForScreenShareDescription[] = + "Enable system audio sharing when screen sharing on Linux with pulseaudio."; + ++#if BUILDFLAG(IS_BSD) ++const char kAudioBackendName[] = ++ "Audio Backend"; ++const char kAudioBackendDescription[] = ++#if BUILDFLAG(IS_OPENBSD) ++ "Select the desired audio backend to use. The default is sndio."; ++#elif BUILDFLAG(IS_FREEBSD) ++ "Select the desired audio backend to use. The default will automatically " ++ "enumerate through the supported backends."; ++#endif ++#endif + #endif // BUILDFLAG(IS_LINUX) + + // All views-based platforms -------------------------------------------------- +@@ -8024,14 +8035,14 @@ 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_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kFollowingFeedSidepanelName[] = "Following feed in the sidepanel"; const char kFollowingFeedSidepanelDescription[] = "Enables the following feed in the sidepanel."; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -#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[] = -@@ -7840,7 +7840,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -8063,7 +8074,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."; -@@ -7980,7 +7980,7 @@ const char kElementCaptureDescription[] = +@@ -8213,7 +8224,7 @@ const char kElementCaptureDescription[] = #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kUIDebugToolsName[] = "Debugging tools for UI"; const char kUIDebugToolsDescription[] = "Enables additional keyboard shortcuts to help debugging."; -@@ -8041,7 +8041,7 @@ const char kComposeNudgeAtCursorDescription[] = - "Shows the Compose proactive nudge at the cursor location"; +@@ -8280,7 +8291,7 @@ const char kComposePoliteNudgeDescription[] = + "available to interact with."; #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 5b37626cc3de..ff4548181489 100644 --- a/www/chromium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/chromium/files/patch-chrome_browser_flag__descriptions.h @@ -1,90 +1,100 @@ ---- chrome/browser/flag_descriptions.h.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/flag_descriptions.h.orig 2024-08-14 11:02:58 UTC +++ chrome/browser/flag_descriptions.h -@@ -1702,7 +1702,7 @@ extern const char kCbdTimeframeRequiredName[]; +@@ -1722,7 +1722,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 -@@ -1873,7 +1873,7 @@ extern const char kShowAutofillTypePredictionsName[]; +@@ -1906,7 +1906,7 @@ extern const char kShowAutofillTypePredictionsName[]; extern const char kShowAutofillTypePredictionsDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kShowFeaturedEnterpriseSiteSearchName[]; extern const char kShowFeaturedEnterpriseSiteSearchDescription[]; - #endif -@@ -1888,7 +1888,7 @@ extern const char kSiteInstanceGroupsForDataUrlsName[] + +@@ -1928,7 +1928,7 @@ extern const char kSiteInstanceGroupsForDataUrlsName[] extern const char kSiteInstanceGroupsForDataUrlsDescription[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kSiteSearchSettingsPolicyName[]; extern const char kSiteSearchSettingsPolicyDescription[]; #endif -@@ -4347,7 +4347,7 @@ extern const char kLacrosMergeIcuDataFileName[]; +@@ -4487,7 +4487,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) -@@ -4502,7 +4502,7 @@ extern const char kV4L2FlatStatefulVideoDecoderDescrip +@@ -4633,7 +4633,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[]; -@@ -4544,7 +4544,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa +@@ -4646,6 +4646,9 @@ extern const char kPulseaudioLoopbackForCastName[]; + extern const char kPulseaudioLoopbackForCastDescription[]; + extern const char kPulseaudioLoopbackForScreenShareName[]; + extern const char kPulseaudioLoopbackForScreenShareDescription[]; ++ ++extern const char kAudioBackendName[]; ++extern const char kAudioBackendDescription[]; + #endif // BUILDFLAG(IS_LINUX) + + // All views-based platforms -------------------------------------------------- +@@ -4675,7 +4678,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[]; -@@ -4556,13 +4556,13 @@ extern const char kRestartToGainAccessToKeychainDescri - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +@@ -4694,13 +4697,13 @@ extern const char kScreenlockReauthPromoCardDescriptio + #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kFollowingFeedSidepanelName[]; extern const char kFollowingFeedSidepanelDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) -#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[]; -@@ -4658,7 +4658,7 @@ extern const char kElementCaptureDescription[]; +@@ -4796,7 +4799,7 @@ extern const char kElementCaptureDescription[]; #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kUIDebugToolsName[]; extern const char kUIDebugToolsDescription[]; - -@@ -4701,7 +4701,7 @@ extern const char kComposeNudgeAtCursorName[]; - extern const char kComposeNudgeAtCursorDescription[]; + #endif +@@ -4844,7 +4847,7 @@ extern const char kComposePoliteNudgeName[]; + extern const char kComposePoliteNudgeDescription[]; #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_metrics_chrome__browser__main__extra__parts__metrics.cc b/www/chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc index 8f1688bee047..219e6f671413 100644 --- a/www/chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc +++ b/www/chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc @@ -1,55 +1,55 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -81,8 +81,10 @@ +@@ -83,8 +83,10 @@ // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) +#if !BUILDFLAG(IS_BSD) #include +#endif #include "base/linux_util.h" #include "base/strings/string_split.h" -@@ -106,7 +108,7 @@ +@@ -108,7 +110,7 @@ #include "chromeos/crosapi/cpp/crosapi_constants.h" #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/pressure/pressure_metrics_reporter.h" #endif // BUILDFLAG(IS_LINUX) -@@ -115,7 +117,7 @@ +@@ -117,7 +119,7 @@ #include "components/user_manager/user_manager.h" #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/power_metrics/system_power_monitor.h" #endif -@@ -862,7 +864,7 @@ void RecordStartupMetrics() { +@@ -864,7 +866,7 @@ void RecordStartupMetrics() { // Record whether Chrome is the default browser or not. // Disabled on Linux due to hanging browser tests, see crbug.com/1216328. -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) shell_integration::DefaultWebClientState default_state = shell_integration::GetDefaultBrowser(); base::UmaHistogramEnumeration("DefaultBrowser.State", default_state, -@@ -1154,11 +1156,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt +@@ -1163,11 +1165,11 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt } #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) pressure_metrics_reporter_ = std::make_unique(); #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::trace_event::TraceLog::GetInstance()->AddEnabledStateObserver( power_metrics::SystemPowerMonitor::GetInstance()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h b/www/chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h index 193b5133c7b2..782b3e4ad67b 100644 --- a/www/chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h +++ b/www/chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.h @@ -1,20 +1,20 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h -@@ -28,7 +28,7 @@ class PowerMetricsReporter; +@@ -29,7 +29,7 @@ class PowerMetricsReporter; class ProcessMonitor; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class PressureMetricsReporter; #endif // BUILDFLAG(IS_LINUX) -@@ -115,7 +115,7 @@ class ChromeBrowserMainExtraPartsMetrics : public Chro - std::unique_ptr battery_discharge_reporter_; +@@ -119,7 +119,7 @@ class ChromeBrowserMainExtraPartsMetrics : public Chro + performance_intervention_metrics_reporter_; #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Reports pressure metrics. std::unique_ptr pressure_metrics_reporter_; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/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 b137d2c357be..1dbeb8c7f670 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,83 +1,88 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -195,7 +195,7 @@ +@@ -195,11 +195,11 @@ #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 +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + #include "chrome/browser/metrics/chrome_metrics_service_crash_reporter.h" + #endif + @@ -212,7 +212,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) @@ -534,7 +534,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) @@ -706,7 +706,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 @@ -757,7 +757,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 @@ -842,7 +842,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic // TODO(crbug.com/40118868): 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) || @@ -944,7 +944,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) @@ -1131,7 +1131,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve // TODO(crbug.com/40118868): 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( @@ -1465,7 +1465,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_metrics_perf_cpu__identity.cc b/www/chromium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc index b8ffdaaa9d17..d32c9fb36402 100644 --- a/www/chromium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc +++ b/www/chromium/files/patch-chrome_browser_metrics_perf_cpu__identity.cc @@ -1,11 +1,11 @@ ---- chrome/browser/metrics/perf/cpu_identity.cc.orig 2024-05-21 18:07:39 UTC +--- chrome/browser/metrics/perf/cpu_identity.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/metrics/perf/cpu_identity.cc -@@ -142,7 +142,7 @@ CPUIdentity GetCPUIdentity() { +@@ -147,7 +147,7 @@ CPUIdentity GetCPUIdentity() { result.release = #if BUILDFLAG(IS_CHROMEOS_ASH) base::SysInfo::KernelVersion(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::SysInfo::OperatingSystemVersion(); #else #error "Unsupported configuration" diff --git a/www/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 f2751c8149c5..8fc4a9e037ec 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-06-17 12:56:06 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/net/system_network_context_manager.cc @@ -97,7 +97,7 @@ // TODO(crbug.com/40118868): 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" @@ -141,7 +141,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; @@ -149,7 +149,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) @@ -195,7 +195,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) @@ -210,7 +210,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) @@ -220,7 +220,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 @@ -262,11 +262,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 || @@ -282,7 +282,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) @@ -512,7 +512,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) {} @@ -570,7 +570,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) @@ -584,7 +584,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) @@ -610,7 +610,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:: @@ -665,7 +665,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) @@ -689,7 +689,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, @@ -698,11 +698,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) @@ -755,7 +755,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) -@@ -972,7 +972,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; } -@@ -1059,7 +1059,7 @@ void SystemNetworkContextManager::UpdateExplicitlyAllo +@@ -1057,7 +1057,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_password__manager_chrome__password__manager__client.cc b/www/chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc index 005dd58be256..c7accb30a281 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,20 +1,20 @@ ---- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/password_manager/chrome_password_manager_client.cc -@@ -488,7 +488,7 @@ bool ChromePasswordManagerClient::ShowKeyboardReplacin +@@ -560,7 +560,7 @@ void ChromePasswordManagerClient:: bool ChromePasswordManagerClient::CanUseBiometricAuthForFilling( device_reauth::DeviceAuthenticator* authenticator) { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!GetLocalStatePrefs() || !GetPrefs() || !authenticator) { return false; } -@@ -712,7 +712,7 @@ void ChromePasswordManagerClient::NotifyUserCredential +@@ -786,7 +786,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 38c618548d81..35f443e448a6 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-06-17 12:56:06 UTC +--- chrome/browser/password_manager/password_reuse_manager_factory.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/password_manager/password_reuse_manager_factory.cc -@@ -137,7 +137,7 @@ PasswordReuseManagerFactory::BuildServiceInstanceForBr +@@ -138,7 +138,7 @@ PasswordReuseManagerFactory::BuildServiceInstanceForBr // TODO(crbug.com/40118868): 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)); + std::unique_ptr + notifier = std::make_unique< + password_manager::PasswordReuseManagerSigninNotifierImpl>( 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 856fec1a3cc6..6e8bfd545151 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,254 +1,254 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2024-08-14 11:02:58 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -234,19 +234,19 @@ +@@ -235,19 +235,19 @@ #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_ANDROID) + BUILDFLAG(IS_CHROMEOS) || 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_ANDROID) -@@ -260,13 +260,13 @@ - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +@@ -261,13 +261,13 @@ + #endif // BUILDFLAG(ENTERPRISE_CLIENT_CERTIFICATES) #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) #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) -@@ -871,7 +871,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -872,7 +872,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kManagedDefaultGeolocationSetting, base::Value::Type::INTEGER }, #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_MAC) + || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { key::kRequireOnlineRevocationChecksForLocalAnchors, prefs::kCertRevocationCheckingRequiredLocalAnchors, base::Value::Type::BOOLEAN }, -@@ -880,7 +880,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -881,7 +881,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) // || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) { key::kFullscreenAllowed, prefs::kFullscreenAllowed, base::Value::Type::BOOLEAN }, -@@ -1664,7 +1664,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - base::Value::Type::BOOLEAN }, +@@ -1695,7 +1695,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + base::Value::Type::STRING }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGSSAPILibraryName, prefs::kGSSAPILibraryName, base::Value::Type::STRING }, -@@ -1715,7 +1715,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1749,7 +1749,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 }, -@@ -1741,12 +1741,12 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1775,12 +1775,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 }, -@@ -1754,7 +1754,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1788,7 +1788,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kProfileSeparationDomainExceptionList, base::Value::Type::LIST }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || 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::kDefaultBrowserSettingEnabled, prefs::kDefaultBrowserSettingEnabled, base::Value::Type::BOOLEAN }, -@@ -1766,7 +1766,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1800,7 +1800,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ - || BUILDFLAG(IS_CHROMEOS) + || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { key::kAutoplayAllowed, prefs::kAutoplayAllowed, base::Value::Type::BOOLEAN }, -@@ -1867,7 +1867,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1901,7 +1901,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 }, -@@ -1972,7 +1972,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2006,7 +2006,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::LIST }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#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 }, -@@ -1997,7 +1997,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2031,7 +2031,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 }, -@@ -2055,7 +2055,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2089,7 +2089,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 }, -@@ -2084,7 +2084,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2118,7 +2118,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kUiAutomationProviderEnabled, base::Value::Type::BOOLEAN }, #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 }, -@@ -2118,7 +2118,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2158,7 +2158,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::INTEGER }, #endif #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}, -@@ -2139,7 +2139,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2179,7 +2179,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 }, -@@ -2267,7 +2267,7 @@ std::unique_ptr BuildH +@@ -2307,7 +2307,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( key::kMemorySaverModeSavings, performance_manager::user_tuning::prefs::kMemorySaverModeAggressiveness, -@@ -2283,7 +2283,7 @@ std::unique_ptr BuildH +@@ -2323,7 +2323,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)); -@@ -2489,7 +2489,7 @@ std::unique_ptr BuildH +@@ -2529,7 +2529,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( -@@ -2547,7 +2547,7 @@ std::unique_ptr BuildH +@@ -2587,7 +2587,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( -@@ -2661,7 +2661,7 @@ std::unique_ptr BuildH +@@ -2701,7 +2701,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)); -@@ -3018,7 +3018,7 @@ std::unique_ptr BuildH +@@ -3058,7 +3058,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( -@@ -3026,7 +3026,7 @@ std::unique_ptr BuildH +@@ -3066,7 +3066,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)); -@@ -3044,7 +3044,7 @@ std::unique_ptr BuildH +@@ -3084,7 +3084,7 @@ std::unique_ptr BuildH first_party_sets::FirstPartySetsOverridesPolicyHandler>( key::kRelatedWebsiteSetsOverrides, chrome_schema))); #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) handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -@@ -3067,7 +3067,7 @@ std::unique_ptr BuildH +@@ -3107,7 +3107,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 12b6c2071fdc..e66f40cc5b41 100644 --- a/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc +++ b/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -1,57 +1,57 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/prefs/browser_prefs.cc @@ -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/40118868): 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 @@ -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 -@@ -1861,7 +1861,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) +@@ -1953,7 +1953,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) true); #endif // BUILDFLAG(ENABLE_PDF) -#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 -@@ -2213,12 +2213,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -2309,12 +2309,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 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 1ef535cc7643..df059d03d0d6 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 2024-06-17 12:56:06 UTC +--- chrome/browser/prefs/pref_service_incognito_allowlist.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/prefs/pref_service_incognito_allowlist.cc -@@ -184,7 +184,7 @@ const char* const kPersistentPrefNames[] = { +@@ -186,7 +186,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 e2b4846052ba..5e3da6da91e1 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,117 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -329,7 +329,7 @@ +@@ -335,7 +335,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 -@@ -413,18 +413,18 @@ +@@ -420,18 +420,18 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.h" #include "chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.h" #include "chrome/browser/enterprise/signals/user_permission_service_factory.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/idle_service_factory.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_switcher/browser_switcher_service_factory.h" #include "chrome/browser/enterprise/client_certificates/certificate_provisioning_service_factory.h" #include "chrome/browser/enterprise/client_certificates/certificate_store_factory.h" -@@ -660,7 +660,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -671,7 +671,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(); -@@ -785,29 +785,29 @@ void ChromeBrowserMainExtraPartsProfiles:: - enterprise_commands::UserRemoteCommandsServiceFactory::GetInstance(); +@@ -799,32 +799,32 @@ void ChromeBrowserMainExtraPartsProfiles:: + enterprise_connectors::ConnectorsServiceFactory::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(ENTERPRISE_CONTENT_ANALYSIS) + enterprise_connectors::ExtensionInstallEventRouterFactory::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) -@@ -933,7 +933,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -952,7 +952,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif // TODO(crbug.com/40118868): 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 -@@ -1038,7 +1038,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1058,7 +1058,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(); policy::UserPolicyOidcSigninServiceFactory::GetInstance(); #endif -@@ -1080,7 +1080,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1101,7 +1101,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(); OidcAuthenticationSigninInterceptorFactory::GetInstance(); #endif -@@ -1099,7 +1099,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1120,7 +1120,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 7f5a6d67e465..e624eb3e17d1 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-06-17 12:56:06 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -262,6 +262,10 @@ +@@ -265,6 +265,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; -@@ -596,7 +600,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async +@@ -600,7 +604,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() -@@ -890,7 +894,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -901,7 +905,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_profiles_profiles__state.cc b/www/chromium/files/patch-chrome_browser_profiles_profiles__state.cc index a57a58b41513..48fb82f712bf 100644 --- a/www/chromium/files/patch-chrome_browser_profiles_profiles__state.cc +++ b/www/chromium/files/patch-chrome_browser_profiles_profiles__state.cc @@ -1,11 +1,29 @@ ---- chrome/browser/profiles/profiles_state.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/profiles/profiles_state.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/profiles/profiles_state.cc -@@ -195,7 +195,7 @@ bool IsGuestModeRequested(const base::CommandLine& com +@@ -196,7 +196,7 @@ bool IsGuestModeRequested(const base::CommandLine& com PrefService* local_state, bool show_warning) { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) DCHECK(local_state); // Check if guest mode enforcement commandline switch or policy are provided. +@@ -243,7 +243,7 @@ bool IsGuestModeEnabled() { + return false; + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // If there are any supervised profiles, disable guest mode. + if (base::FeatureList::IsEnabled( + supervised_user::kHideGuestModeForSupervisedUsers) && +@@ -259,7 +259,7 @@ bool IsGuestModeEnabled() { + } + + bool IsGuestModeEnabled(const Profile& profile) { +-#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::kHideGuestModeForSupervisedUsers)) { + ProfileAttributesEntry* profile_attributes = diff --git a/www/chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_deep__scanning__utils.cc b/www/chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_deep__scanning__utils.cc new file mode 100644 index 000000000000..7e776cbb54f4 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_safe__browsing_cloud__content__scanning_deep__scanning__utils.cc @@ -0,0 +1,20 @@ +--- chrome/browser/safe_browsing/cloud_content_scanning/deep_scanning_utils.cc.orig 2024-07-30 11:12:21 UTC ++++ chrome/browser/safe_browsing/cloud_content_scanning/deep_scanning_utils.cc +@@ -16,7 +16,7 @@ + #include "components/crash/core/common/crash_key.h" + #include "components/signin/public/identity_manager/identity_manager.h" + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" + #include "components/prefs/pref_service.h" + #endif +@@ -416,7 +416,7 @@ std::string GetProfileEmail(Profile* profile) { + std::string email = + GetProfileEmail(IdentityManagerFactory::GetForProfile(profile)); + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (email.empty()) { + email = profile->GetPrefs()->GetString( + enterprise_signin::prefs::kProfileUserEmail); 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 deleted file mode 100644 index 4ea5ef08be3d..000000000000 --- a/www/chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- 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 && - !base::FeatureList::IsEnabled(kMaldocaSkipCheck)) { - StartExtractDocumentFeatures(); -@@ -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_safe__browsing_download__protection_file__analyzer.h b/www/chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.h deleted file mode 100644 index 3469ee44763d..000000000000 --- a/www/chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.h +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/safe_browsing/download_protection/file_analyzer.h.orig 2023-12-10 06:10:27 UTC -+++ chrome/browser/safe_browsing/download_protection/file_analyzer.h -@@ -18,7 +18,7 @@ - #include "components/safe_browsing/core/common/proto/csd.pb.h" - #include "third_party/protobuf/src/google/protobuf/repeated_field.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - #include "chrome/services/file_util/public/cpp/sandboxed_document_analyzer.h" - #endif - -@@ -110,7 +110,7 @@ class FileAnalyzer { - const safe_browsing::ArchiveAnalyzerResults& archive_results); - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - void StartExtractDocumentFeatures(); - void OnDocumentAnalysisFinished( - const DocumentAnalyzerResults& document_results); -@@ -141,7 +141,7 @@ class FileAnalyzer { - dmg_analyzer_{nullptr, base::OnTaskRunnerDeleter(nullptr)}; - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) - std::unique_ptr - document_analyzer_{nullptr, base::OnTaskRunnerDeleter(nullptr)}; - base::TimeTicks document_analysis_start_time_; 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 e0021e464432..e5398efea0ba 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,20 +1,20 @@ ---- chrome/browser/screen_ai/screen_ai_install_state.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/screen_ai/screen_ai_install_state.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/screen_ai/screen_ai_install_state.cc -@@ -22,7 +22,7 @@ +@@ -17,7 +17,7 @@ #include "services/screen_ai/public/cpp/utilities.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 -@@ -32,7 +32,7 @@ const int kScreenAICleanUpDelayInDays = 30; - const char kMinExpectedVersion[] = "123.1"; +@@ -27,7 +27,7 @@ const int kScreenAICleanUpDelayInDays = 30; + const char kMinExpectedVersion[] = "124.2"; bool IsDeviceCompatible() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #if defined(ARCH_CPU_X86_FAMILY) // Check if the CPU has the required instruction set to run the Screen AI // library. diff --git a/www/chromium/files/patch-chrome_browser_screen__ai_screen__ai__service__router.cc b/www/chromium/files/patch-chrome_browser_screen__ai_screen__ai__service__router.cc index 02340336a6e4..b31a02dc5857 100644 --- a/www/chromium/files/patch-chrome_browser_screen__ai_screen__ai__service__router.cc +++ b/www/chromium/files/patch-chrome_browser_screen__ai_screen__ai__service__router.cc @@ -1,20 +1,20 @@ ---- chrome/browser/screen_ai/screen_ai_service_router.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/screen_ai/screen_ai_service_router.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/screen_ai/screen_ai_service_router.cc -@@ -280,7 +280,7 @@ void ScreenAIServiceRouter::LaunchIfNotRunning() { +@@ -284,7 +284,7 @@ void ScreenAIServiceRouter::LaunchIfNotRunning() { base::FilePath binary_path = state_instance->get_component_binary_path(); #if BUILDFLAG(IS_WIN) std::vector preload_libraries = {binary_path}; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::vector extra_switches = { base::StringPrintf("--%s=%s", screen_ai::GetBinaryPathSwitch(), binary_path.MaybeAsASCII().c_str())}; -@@ -294,7 +294,7 @@ void ScreenAIServiceRouter::LaunchIfNotRunning() { +@@ -298,7 +298,7 @@ void ScreenAIServiceRouter::LaunchIfNotRunning() { .WithPreloadedLibraries( preload_libraries, content::ServiceProcessHostPreloadLibraries::GetPassKey()) -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) .WithExtraCommandLineSwitches(extra_switches) #endif // BUILDFLAG(IS_WIN) .Pass()); diff --git a/www/chromium/files/patch-chrome_browser_sessions_session__restore.cc b/www/chromium/files/patch-chrome_browser_sessions_session__restore.cc new file mode 100644 index 000000000000..2382e3703ad4 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_sessions_session__restore.cc @@ -0,0 +1,20 @@ +--- chrome/browser/sessions/session_restore.cc.orig 2024-07-30 11:12:21 UTC ++++ chrome/browser/sessions/session_restore.cc +@@ -99,7 +99,7 @@ + #include "chrome/browser/web_applications/web_app_registrar.h" + #endif // BUILDFLAG(IS_CHROMEOS) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/webui/whats_new/whats_new_fetcher.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + +@@ -1040,7 +1040,7 @@ class SessionRestoreImpl : public BrowserListObserver + bool is_first_tab = true; + for (const auto& startup_tab : startup_tabs) { + const GURL& url = startup_tab.url; +-#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 == whats_new::GetWebUIStartupURL()) { + whats_new::StartWhatsNewFetch(browser); + continue; diff --git a/www/chromium/files/patch-chrome_browser_sharing_sharing__device__registration.cc b/www/chromium/files/patch-chrome_browser_sharing_sharing__device__registration.cc index 095ab6780e60..c8287f3897ec 100644 --- a/www/chromium/files/patch-chrome_browser_sharing_sharing__device__registration.cc +++ b/www/chromium/files/patch-chrome_browser_sharing_sharing__device__registration.cc @@ -1,11 +1,11 @@ ---- chrome/browser/sharing/sharing_device_registration.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/sharing/sharing_device_registration.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/sharing/sharing_device_registration.cc -@@ -328,7 +328,7 @@ bool SharingDeviceRegistration::IsSmsFetcherSupported( +@@ -331,7 +331,7 @@ bool SharingDeviceRegistration::IsSmsFetcherSupported( bool SharingDeviceRegistration::IsRemoteCopySupported() const { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/chromium/files/patch-chrome_browser_signin_signin__util.cc b/www/chromium/files/patch-chrome_browser_signin_signin__util.cc index ed0df4cb6f7f..583339c80ca9 100644 --- a/www/chromium/files/patch-chrome_browser_signin_signin__util.cc +++ b/www/chromium/files/patch-chrome_browser_signin_signin__util.cc @@ -1,11 +1,11 @@ ---- chrome/browser/signin/signin_util.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/signin/signin_util.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/signin/signin_util.cc -@@ -80,7 +80,7 @@ CookiesMover::CookiesMover(base::WeakPtr sour +@@ -81,7 +81,7 @@ CookiesMover::CookiesMover(base::WeakPtr sour CookiesMover::~CookiesMover() = default; void CookiesMover::StartMovingCookies() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) bool allow_cookies_to_be_moved = base::FeatureList::IsEnabled( profile_management::features::kThirdPartyProfileManagement); #else diff --git a/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc b/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc index 68e314fac116..03f6c18670b3 100644 --- a/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc +++ b/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__delegate__impl.cc @@ -1,11 +1,11 @@ ---- chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.cc -@@ -185,7 +185,7 @@ void SupervisedUserExtensionsDelegateImpl::RequestExte +@@ -196,7 +196,7 @@ void SupervisedUserExtensionsDelegateImpl::RequestExte return; } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) CHECK(contents.value()); content::WebContents* web_contents = contents.value().get(); if (CanInstallExtensions()) { diff --git a/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc b/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc index 89e2f9d279a9..a4ed9b7c4548 100644 --- a/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc +++ b/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.cc @@ -1,20 +1,20 @@ ---- chrome/browser/supervised_user/supervised_user_extensions_manager.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/supervised_user/supervised_user_extensions_manager.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/supervised_user/supervised_user_extensions_manager.cc -@@ -353,7 +353,7 @@ void SupervisedUserExtensionsManager:: +@@ -359,7 +359,7 @@ void SupervisedUserExtensionsManager:: ActivateManagementPolicyAndUpdateRegistration() { SetActiveForSupervisedUsers(); UpdateManagementPolicyRegistration(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MaybeMarkExtensionsLocallyParentApproved(); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) } -@@ -470,7 +470,7 @@ bool SupervisedUserExtensionsManager::ShouldBlockExten +@@ -476,7 +476,7 @@ bool SupervisedUserExtensionsManager::ShouldBlockExten return false; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void SupervisedUserExtensionsManager:: MaybeMarkExtensionsLocallyParentApproved() { supervised_user::LocallyParentApprovedExtensionsMigrationState diff --git a/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h b/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h index 4ec79e3cd212..a9d7b86ac92b 100644 --- a/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h +++ b/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__extensions__manager.h @@ -1,11 +1,11 @@ ---- chrome/browser/supervised_user/supervised_user_extensions_manager.h.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/supervised_user/supervised_user_extensions_manager.h.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/supervised_user/supervised_user_extensions_manager.h -@@ -147,7 +147,7 @@ class SupervisedUserExtensionsManager : public Extensi +@@ -154,7 +154,7 @@ class SupervisedUserExtensionsManager : public Extensi // launched. bool ShouldBlockExtension(const std::string& extension_id) const; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Triggers an one-time migration of the present extensions as parent-approved // when the feature // `kEnableSupervisedUserSkipParentApprovalToInstallExtensions` becomes diff --git a/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__metrics__service__factory.cc b/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__metrics__service__factory.cc new file mode 100644 index 000000000000..4b861237fdc6 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_supervised__user_supervised__user__metrics__service__factory.cc @@ -0,0 +1,20 @@ +--- chrome/browser/supervised_user/supervised_user_metrics_service_factory.cc.orig 2024-07-30 11:12:21 UTC ++++ chrome/browser/supervised_user/supervised_user_metrics_service_factory.cc +@@ -14,7 +14,7 @@ + #include "components/supervised_user/core/browser/supervised_user_service.h" + #include "content/public/browser/browser_context.h" + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/supervised_user/linux_mac_windows/supervised_user_extensions_metrics_delegate_impl.h" + #endif + +@@ -55,7 +55,7 @@ KeyedService* SupervisedUserMetricsServiceFactory::Bui + std::unique_ptr + extensions_metrics_delegate = nullptr; +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + extensions_metrics_delegate = + std::make_unique( + extensions::ExtensionRegistry::Get(profile), *profile->GetPrefs()); 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 a01a56ffc0fc..9faf2fd981aa 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 2024-06-17 12:56:06 UTC +--- chrome/browser/sync/chrome_sync_client.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/sync/chrome_sync_client.cc @@ -116,7 +116,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" #elif BUILDFLAG(IS_ANDROID) -@@ -474,7 +474,7 @@ ChromeSyncClient::CreateModelTypeControllers( +@@ -475,7 +475,7 @@ ChromeSyncClient::CreateModelTypeControllers( // platforms. bool enable_tab_group_sync = false; #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) enable_tab_group_sync = true; #elif BUILDFLAG(IS_ANDROID) - enable_tab_group_sync = tab_groups::IsTabGroupSyncEnabled(GetPrefService()); -@@ -506,7 +506,7 @@ ChromeSyncClient::CreateModelTypeControllers( + enable_tab_group_sync = +@@ -514,7 +514,7 @@ ChromeSyncClient::CreateModelTypeControllers( // 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( -@@ -663,7 +663,7 @@ ChromeSyncClient::GetControllerDelegateForModelType(sy +@@ -671,7 +671,7 @@ ChromeSyncClient::GetControllerDelegateForModelType(sy switch (type) { case syncer::SAVED_TAB_GROUP: { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) auto* keyed_service = tab_groups::SavedTabGroupServiceFactory::GetForProfile(profile_); CHECK(keyed_service); 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 63ec3bba7f69..562c77663b58 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-06-17 12:56:06 UTC +--- chrome/browser/sync/sync_service_factory.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/sync/sync_service_factory.cc -@@ -82,7 +82,7 @@ +@@ -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" #elif BUILDFLAG(IS_ANDROID) #include "chrome/browser/tab_group_sync/tab_group_sync_service_factory.h" -@@ -133,7 +133,7 @@ std::unique_ptr BuildSyncService( +@@ -135,7 +135,7 @@ std::unique_ptr BuildSyncService( // TODO(crbug.com/40118868): 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(); -@@ -269,7 +269,7 @@ SyncServiceFactory::SyncServiceFactory() +@@ -274,7 +274,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(tab_groups::SavedTabGroupServiceFactory::GetInstance()); #elif BUILDFLAG(IS_ANDROID) DependsOn(tab_groups::TabGroupSyncServiceFactory::GetInstance()); diff --git a/www/chromium/files/patch-chrome_browser_themes_theme__service.cc b/www/chromium/files/patch-chrome_browser_themes_theme__service.cc index 8cf6eed26a2f..2f2896f4971c 100644 --- a/www/chromium/files/patch-chrome_browser_themes_theme__service.cc +++ b/www/chromium/files/patch-chrome_browser_themes_theme__service.cc @@ -1,20 +1,20 @@ ---- chrome/browser/themes/theme_service.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/themes/theme_service.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/themes/theme_service.cc -@@ -73,7 +73,7 @@ +@@ -70,7 +70,7 @@ #include "extensions/browser/extension_registry_observer.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui.h" - #include "ui/ozone/public/ozone_platform.h" + #include "ui/ozone/public/ozone_platform.h" // nogncheck #endif -@@ -329,7 +329,7 @@ CustomThemeSupplier* ThemeService::GetThemeSupplier() +@@ -326,7 +326,7 @@ CustomThemeSupplier* ThemeService::GetThemeSupplier() } bool ThemeService::ShouldUseCustomFrame() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_server_side_window_decorations) { 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 f9514f08390a..25a9d51741f1 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-06-17 12:56:06 UTC +--- chrome/browser/ui/actions/chrome_action_id.h.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/actions/chrome_action_id.h -@@ -518,7 +518,7 @@ +@@ -515,7 +515,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_autofill_payments_desktop__payments__window__manager.cc b/www/chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc index 6bf2a58e2bb6..041bfe73b67d 100644 --- a/www/chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc +++ b/www/chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/autofill/payments/desktop_payments_window_manager.cc -@@ -47,7 +47,7 @@ gfx::Rect GetPopupSizeForVcn3ds() { +@@ -49,7 +49,7 @@ gfx::Rect GetPopupSizeForVcn3ds() { DesktopPaymentsWindowManager::DesktopPaymentsWindowManager( ContentAutofillClient* client) : client_(CHECK_DEREF(client)) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) scoped_observation_.Observe(BrowserList::GetInstance()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) } -@@ -90,7 +90,7 @@ void DesktopPaymentsWindowManager::WebContentsDestroye +@@ -109,7 +109,7 @@ void DesktopPaymentsWindowManager::WebContentsDestroye } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) void DesktopPaymentsWindowManager::OnBrowserSetLastActive(Browser* browser) { // If there is an ongoing payments window manager pop-up flow, and the // original tab's WebContents become active, activate the pop-up's diff --git a/www/chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h b/www/chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h index 1de1c40d6338..88bac97fc323 100644 --- a/www/chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h +++ b/www/chromium/files/patch-chrome_browser_ui_autofill_payments_desktop__payments__window__manager.h @@ -1,38 +1,38 @@ ---- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.h.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/autofill/payments/desktop_payments_window_manager.h.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/autofill/payments/desktop_payments_window_manager.h @@ -14,7 +14,7 @@ #include "components/autofill/core/browser/payments/payments_window_manager.h" #include "content/public/browser/web_contents_observer.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "base/scoped_observation.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_list_observer.h" @@ -39,7 +39,7 @@ class PaymentsWindowUserConsentDialogControllerImpl; // WebContents of the original tab that the pop-up is created in. If there is a // pop-up currently present, `this` will observe the WebContents of that pop-up. class DesktopPaymentsWindowManager : public PaymentsWindowManager, -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) public BrowserListObserver, #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) public content::WebContentsObserver { @@ -58,7 +58,7 @@ class DesktopPaymentsWindowManager : public PaymentsWi content::NavigationHandle* navigation_handle) override; void WebContentsDestroyed() override; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // BrowserListObserver: void OnBrowserSetLastActive(Browser* browser) override; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -@@ -132,7 +132,7 @@ class DesktopPaymentsWindowManager : public PaymentsWi +@@ -136,7 +136,7 @@ class DesktopPaymentsWindowManager : public PaymentsWi std::unique_ptr payments_window_user_consent_dialog_controller_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::ScopedObservation scoped_observation_{ this}; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) diff --git a/www/chromium/files/patch-chrome_browser_ui_browser.h b/www/chromium/files/patch-chrome_browser_ui_browser.h index 77557745810b..128039bba3d3 100644 --- a/www/chromium/files/patch-chrome_browser_ui_browser.h +++ b/www/chromium/files/patch-chrome_browser_ui_browser.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/browser.h.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/browser.h.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/browser.h -@@ -329,7 +329,7 @@ class Browser : public TabStripModelObserver, +@@ -339,7 +339,7 @@ class Browser : public TabStripModelObserver, std::optional display_id; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // When the browser window is shown, the desktop environment is notified // using this ID. In response, the desktop will stop playing the "waiting // for startup" animation (if any). 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 757bcb39376f..1db7d5addf0c 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,62 +1,80 @@ ---- chrome/browser/ui/browser_command_controller.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/browser_command_controller.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/browser_command_controller.cc -@@ -127,7 +127,7 @@ +@@ -129,7 +129,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 -@@ -309,7 +309,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( +@@ -138,7 +138,7 @@ + #include "ui/ozone/public/ozone_platform.h" + #endif + +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/shortcuts/desktop_shortcuts_utils.h" + #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) + +@@ -315,7 +315,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(); -@@ -561,7 +561,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -567,7 +567,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo // TODO(crbug.com/40118868): 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; -@@ -573,7 +573,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -579,7 +579,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, -@@ -767,7 +767,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -773,7 +773,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo break; case IDC_CREATE_SHORTCUT: base::RecordAction(base::UserMetricsAction("CreateShortcut")); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kShortcutsNotApps)) { chrome::CreateDesktopShortcutForActiveWebContents(browser_); } else { -@@ -1270,12 +1270,12 @@ void BrowserCommandController::InitCommandState() { +@@ -1282,12 +1282,12 @@ void BrowserCommandController::InitCommandState() { #endif // TODO(crbug.com/40118868): 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() +@@ -1602,7 +1602,7 @@ void BrowserCommandController::UpdateCommandsForTabSta + bool can_create_web_app = web_app::CanCreateWebApp(browser_); + command_updater_.UpdateCommandEnabled(IDC_INSTALL_PWA, can_create_web_app); + +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + if (base::FeatureList::IsEnabled(features::kShortcutsNotApps)) { + command_updater_.UpdateCommandEnabled( + IDC_CREATE_SHORTCUT, shortcuts::CanCreateDesktopShortcut(browser_)); diff --git a/www/chromium/files/patch-chrome_browser_ui_browser__commands.cc b/www/chromium/files/patch-chrome_browser_ui_browser__commands.cc new file mode 100644 index 000000000000..9d457235e21c --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_ui_browser__commands.cc @@ -0,0 +1,11 @@ +--- chrome/browser/ui/browser_commands.cc.orig 2024-07-30 11:12:21 UTC ++++ chrome/browser/ui/browser_commands.cc +@@ -2001,7 +2001,7 @@ void OpenUpdateChromeDialog(Browser* browser) { + } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { + UpgradeDetector::GetInstance()->NotifyOutdatedInstallNoAutoUpdate(); + } else { +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (base::FeatureList::IsEnabled(features::kFewerUpdateConfirmations)) { + chrome::AttemptRelaunch(); + return; 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 3406b0710a3c..9b23b468b1fb 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,29 @@ ---- chrome/browser/ui/chrome_pages.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/chrome_pages.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/chrome_pages.cc @@ -86,7 +86,7 @@ #include "components/signin/public/identity_manager/identity_manager.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/web_app_utils.h" #endif -@@ -719,7 +719,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -379,7 +379,7 @@ void ShowChromeTips(Browser* browser) { + ShowSingletonTab(browser, GURL(kChromeTipsURL)); + } + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + void ShowChromeWhatsNew(Browser* browser) { + ShowSingletonTab(browser, GURL(kChromeUIWhatsNewURL)); + } +@@ -721,7 +721,7 @@ void ShowShortcutCustomizationApp(Profile* profile, #endif // BUILDFLAG(IS_CHROMEOS_ASH) } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void 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 f91070cd4d5e..8fa9edd86110 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-06-17 12:56:06 UTC +--- chrome/browser/ui/passwords/manage_passwords_ui_controller.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/passwords/manage_passwords_ui_controller.cc -@@ -92,7 +92,7 @@ int ManagePasswordsUIController::save_fallback_timeout +@@ -97,7 +97,7 @@ namespace { - namespace { + using Logger = autofill::SavePasswordProgressLogger; -#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; -@@ -475,7 +475,7 @@ void ManagePasswordsUIController::OnBiometricAuthBefor +@@ -504,7 +504,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_signin_signin__view__controller.cc b/www/chromium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc index 648b44499e2b..16b338d68f63 100644 --- a/www/chromium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc +++ b/www/chromium/files/patch-chrome_browser_ui_signin_signin__view__controller.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/signin/signin_view_controller.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/signin/signin_view_controller.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/signin/signin_view_controller.cc -@@ -334,7 +334,7 @@ void SigninViewController::ShowModalManagedUserNoticeD - bool show_link_data_option, - signin::SigninChoiceCallback callback) { +@@ -492,7 +492,7 @@ void SigninViewController::ShowModalManagedUserNoticeD + signin::SigninChoiceCallback process_user_choice_callback, + base::OnceClosure done_callback) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CloseModalSignin(); dialog_ = std::make_unique( SigninViewControllerDelegate::CreateManagedUserNoticeDelegate( diff --git a/www/chromium/files/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h b/www/chromium/files/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h index df5cd37418fe..e395b613af22 100644 --- a/www/chromium/files/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h +++ b/www/chromium/files/patch-chrome_browser_ui_signin_signin__view__controller__delegate.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/signin/signin_view_controller_delegate.h.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/signin/signin_view_controller_delegate.h.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/signin/signin_view_controller_delegate.h -@@ -81,7 +81,7 @@ class SigninViewControllerDelegate { +@@ -83,7 +83,7 @@ class SigninViewControllerDelegate { #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) || BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Returns a platform-specific SigninViewContolllerDelegate instance that // displays the managed user notice modal dialog. The returned object // should delete itself when the window it's managing is closed. 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 5cad80d82139..11c262325b78 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-06-17 12:56:06 UTC +--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/startup/startup_browser_creator.cc -@@ -136,7 +136,7 @@ +@@ -137,7 +137,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" -@@ -965,7 +965,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -966,7 +966,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())) { -@@ -1078,7 +1078,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1079,7 +1079,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) && -@@ -1288,7 +1288,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1289,7 +1289,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 39052199a21b..38429e348b9a 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,29 @@ ---- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/startup/startup_browser_creator_impl.cc -@@ -233,7 +233,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser( +@@ -86,7 +86,7 @@ + #include "chromeos/startup/browser_params_proxy.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/ui/webui/whats_new/whats_new_fetcher.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + +@@ -237,7 +237,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 +@@ -267,7 +267,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser( + continue; + } + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Start the What's New fetch but don't add the tab at this point. The tab + // will open as the foreground tab only if the remote content can be + // retrieved successfully. This prevents needing to automatically close the 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 60bf751d5449..1a7e37544697 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-06-17 12:56:06 UTC +--- chrome/browser/ui/tab_helpers.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/tab_helpers.cc -@@ -241,7 +241,7 @@ +@@ -243,7 +243,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || 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" -@@ -696,12 +696,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -721,12 +721,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con // TODO(crbug.com/40118868): 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_tabs_features.cc b/www/chromium/files/patch-chrome_browser_ui_tabs_features.cc new file mode 100644 index 000000000000..bdd03c2b17a1 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_ui_tabs_features.cc @@ -0,0 +1,11 @@ +--- chrome/browser/ui/tabs/features.cc.orig 2024-07-30 11:12:21 UTC ++++ chrome/browser/ui/tabs/features.cc +@@ -16,7 +16,7 @@ BASE_FEATURE(kTabSearchPositionSetting, + bool CanShowTabSearchPositionSetting() { + // Mac and other platforms will always have the tab search position in the + // correct location, cros/linux/win git the user the option to change. +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + return base::FeatureList::IsEnabled(kTabSearchPositionSetting); + #else + return false; diff --git a/www/chromium/files/patch-chrome_browser_ui_tabs_tab__strip__prefs.cc b/www/chromium/files/patch-chrome_browser_ui_tabs_tab__strip__prefs.cc new file mode 100644 index 000000000000..169000a0895c --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_ui_tabs_tab__strip__prefs.cc @@ -0,0 +1,11 @@ +--- chrome/browser/ui/tabs/tab_strip_prefs.cc.orig 2024-07-30 11:12:21 UTC ++++ chrome/browser/ui/tabs/tab_strip_prefs.cc +@@ -20,7 +20,7 @@ namespace tabs { + + bool GetDefaultTabSearchRightAligned() { + // These platforms are all left aligned, the others should be right. +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + return false; + #else + return true; 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 132a00e6f70b..3705729007a6 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,20 @@ ---- chrome/browser/ui/ui_features.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/ui_features.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/ui_features.cc -@@ -446,7 +446,7 @@ BASE_FEATURE(kTopChromeWebUIUsesSpareRenderer, +@@ -120,7 +120,7 @@ BASE_FEATURE(kEvDetailsInPageInfo, + "EvDetailsInPageInfo", + 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 the feature to remove the last confirmation dialog when relaunching + // to update Chrome. + BASE_FEATURE(kFewerUpdateConfirmations, +@@ -426,7 +426,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 3eeb0c2d7b72..c11e91a1595f 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,20 @@ ---- chrome/browser/ui/ui_features.h.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/ui_features.h.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/ui_features.h -@@ -288,7 +288,7 @@ bool IsToolbarPinningEnabled(); +@@ -85,7 +85,7 @@ BASE_DECLARE_FEATURE(kAccessCodeCastUI); + + BASE_DECLARE_FEATURE(kEvDetailsInPageInfo); + +-#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(kFewerUpdateConfirmations); + #endif + +@@ -256,7 +256,7 @@ bool IsToolbarPinningEnabled(); 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_frame_browser__view.cc b/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc index 24fdcfd6f2f2..70ca71b54cea 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-06-17 12:56:06 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -2220,7 +2220,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra +@@ -2240,7 +2240,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra // CrOS cleanup is done. // TODO(crbug.com/40118868): 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_opaque__browser__frame__view.cc b/www/chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc index 6c2de655970b..4c7697b6d679 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc @@ -1,38 +1,38 @@ ---- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/frame/opaque_browser_frame_view.cc @@ -54,7 +54,7 @@ #include "ui/views/window/vector_icons/vector_icons.h" #include "ui/views/window/window_shape.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "ui/views/controls/menu/menu_runner.h" #endif -@@ -566,7 +566,7 @@ OpaqueBrowserFrameView::FrameButtonStyle +@@ -564,7 +564,7 @@ OpaqueBrowserFrameView::FrameButtonStyle OpaqueBrowserFrameView::GetFrameButtonStyle() const { // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) return FrameButtonStyle::kMdButton; #else return FrameButtonStyle::kImageButton; -@@ -585,7 +585,7 @@ bool OpaqueBrowserFrameView::ShouldDrawRestoredFrameSh +@@ -583,7 +583,7 @@ bool OpaqueBrowserFrameView::ShouldDrawRestoredFrameSh return false; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool OpaqueBrowserFrameView::IsTiled() const { return frame()->tiled(); } -@@ -783,7 +783,7 @@ gfx::Rect OpaqueBrowserFrameView::GetIconBounds() cons +@@ -782,7 +782,7 @@ gfx::Rect OpaqueBrowserFrameView::GetIconBounds() cons } void OpaqueBrowserFrameView::WindowIconPressed() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Chrome OS doesn't show the window icon, and Windows handles this on its own // due to the hit test being HTSYSMENU. menu_runner_ = std::make_unique( 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 3c32bd36da5d..0a53f8fbac17 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-06-17 12:56:06 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc @@ -58,7 +58,7 @@ #include "ui/aura/window.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" #include "chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.h" -@@ -88,7 +88,7 @@ constexpr int kContentSettingIconSize = 16; +@@ -90,7 +90,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 -@@ -180,7 +180,7 @@ class WindowEventObserver : public ui::EventObserver { +@@ -182,7 +182,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()) { -@@ -579,7 +579,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow +@@ -578,7 +578,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow AddChildView(std::move(auto_pip_setting_overlay)); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* profile = browser_view->browser()->profile(); auto* linux_ui_theme = ui::LinuxUiTheme::GetForProfile(profile); auto* theme_service_factory = ThemeServiceFactory::GetForProfile(profile); -@@ -798,7 +798,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( +@@ -800,7 +800,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))); -@@ -880,7 +880,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg +@@ -882,7 +882,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(); -@@ -1136,7 +1136,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre +@@ -1138,7 +1138,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_) { -@@ -1270,7 +1270,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie +@@ -1272,7 +1272,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(); -@@ -1288,7 +1288,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor +@@ -1290,7 +1290,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(kResizeBorder); -@@ -1309,7 +1309,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie +@@ -1311,7 +1311,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie top_height + border_thickness.bottom()); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool PictureInPictureBrowserFrameView::ShouldDrawFrameShadow() const { return static_cast( frame()->native_browser_frame()) diff --git a/www/chromium/files/patch-chrome_browser_ui_views_frame_tab__strip__region__view.cc b/www/chromium/files/patch-chrome_browser_ui_views_frame_tab__strip__region__view.cc index 4425f7112468..3a45d1eedda9 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_frame_tab__strip__region__view.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_frame_tab__strip__region__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/frame/tab_strip_region_view.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/views/frame/tab_strip_region_view.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/frame/tab_strip_region_view.cc -@@ -193,7 +193,7 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr +@@ -200,7 +200,7 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr // TODO(crbug.com/40118868): 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) // The New Tab Button can be middle-clicked on Linux. new_tab_button_->SetTriggerableEventFlags( new_tab_button_->GetTriggerableEventFlags() | diff --git a/www/chromium/files/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc b/www/chromium/files/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc index 928670cb1235..e8545de5e0bc 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_omnibox_omnibox__view__views.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/omnibox/omnibox_view_views.cc.orig 2024-05-21 18:07:39 UTC +--- chrome/browser/ui/views/omnibox/omnibox_view_views.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/omnibox/omnibox_view_views.cc -@@ -1951,7 +1951,7 @@ void OmniboxViewViews::MaybeAddSendTabToSelfItem( +@@ -1962,7 +1962,7 @@ void OmniboxViewViews::MaybeAddSendTabToSelfItem( } void OmniboxViewViews::OnPopupOpened() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // It's not great for promos to overlap the omnibox if the user opens the // drop-down after showing the promo. This especially causes issues on Mac and // Linux due to z-order/rendering issues, see crbug.com/1225046 and 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 e7984ff0b9aa..45022e267fa6 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-06-17 12:56:06 UTC +--- chrome/browser/ui/views/passwords/password_bubble_view_base.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/passwords/password_bubble_view_base.cc @@ -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 -@@ -132,7 +132,7 @@ PasswordBubbleViewBase* PasswordBubbleViewBase::Create +@@ -133,7 +133,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.cc b/www/chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc index 60e6e5366bdb..1a6c9436d42c 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_profiles_profile__menu__view.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/profiles/profile_menu_view.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/views/profiles/profile_menu_view.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/profiles/profile_menu_view.cc @@ -83,7 +83,7 @@ #include "ui/strings/grit/ui_strings.h" #include "ui/views/accessibility/view_accessibility.h" -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #endif -@@ -589,7 +589,7 @@ void ProfileMenuView::BuildIdentity() { +@@ -577,7 +577,7 @@ void ProfileMenuView::BuildIdentity() { badge_image_model, menu_title_, menu_subtitle_, management_label); } else { std::string profile_user_display_name, profile_user_email; -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) profile_user_display_name = profile->GetPrefs()->GetString( enterprise_signin::prefs::kProfileUserDisplayName); profile_user_email = profile->GetPrefs()->GetString( 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 d5aca4153b06..91608c1434e8 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-06-17 12:56:06 UTC +--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc -@@ -723,7 +723,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( +@@ -687,7 +687,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( // TODO(crbug.com/40118868): 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_profiles_signin__view__controller__delegate__views.cc b/www/chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc index ca5c0c2991c9..d9fdc0f08980 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc @@ -1,47 +1,47 @@ ---- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc @@ -58,7 +58,7 @@ namespace { const int kModalDialogWidth = 448; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) const int kManagedUserNoticeConfirmationDialogWidth = 512; const int kManagedUserNoticeConfirmationDialogHeight = 576; const int kManagedUserNoticeConfirmationUpdatedDialogWidth = 900; -@@ -187,7 +187,7 @@ SigninViewControllerDelegateViews::CreateProfileCustom +@@ -184,7 +184,7 @@ SigninViewControllerDelegateViews::CreateProfileCustom #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) || BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // static std::unique_ptr SigninViewControllerDelegateViews::CreateManagedUserNoticeConfirmationWebView( -@@ -348,7 +348,7 @@ SigninViewControllerDelegateViews::SigninViewControlle +@@ -346,7 +346,7 @@ SigninViewControllerDelegateViews::SigninViewControlle SetButtons(ui::DIALOG_BUTTON_NONE); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // On the local profile creation dialog, cancelling the dialog (for instance // through the VKEY_ESCAPE accelerator) should delete the profile. if (delete_profile_on_cancel) { -@@ -438,7 +438,7 @@ void SigninViewControllerDelegateViews::DisplayModal() +@@ -436,7 +436,7 @@ void SigninViewControllerDelegateViews::DisplayModal() } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) void SigninViewControllerDelegateViews::DeleteProfileOnCancel() { ProfileAttributesEntry* entry = g_browser_process->profile_manager() -@@ -511,7 +511,7 @@ SigninViewControllerDelegate::CreateProfileCustomizati +@@ -510,7 +510,7 @@ SigninViewControllerDelegate::CreateProfileCustomizati #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) || BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // static SigninViewControllerDelegate* SigninViewControllerDelegate::CreateManagedUserNoticeDelegate( diff --git a/www/chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h b/www/chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h index 015cabd5d7fa..7bd3242298bb 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h +++ b/www/chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h.orig 2024-05-21 18:07:39 UTC +--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h -@@ -73,7 +73,7 @@ class SigninViewControllerDelegateViews +@@ -75,7 +75,7 @@ class SigninViewControllerDelegateViews #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) || BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) static std::unique_ptr CreateManagedUserNoticeConfirmationWebView( Browser* browser, -@@ -139,7 +139,7 @@ class SigninViewControllerDelegateViews +@@ -141,7 +141,7 @@ class SigninViewControllerDelegateViews InitializeSigninWebDialogUI initialize_signin_web_dialog_ui); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Deletes the ephemeral profile when cancelling the local profile creation // dialog. void DeleteProfileOnCancel(); 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 deleted file mode 100644 index 87d99e62caec..000000000000 --- a/www/chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/ui/views/tab_search_bubble_host.cc.orig 2024-05-21 18:07:39 UTC -+++ chrome/browser/ui/views/tab_search_bubble_host.cc -@@ -268,7 +268,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.cc b/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc index 8051814f0b23..788f2cad8106 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tabs/tab.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/views/tabs/tab.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/tabs/tab.cc -@@ -629,7 +629,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& +@@ -611,7 +611,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Move the hit test area for hovering up so that it is not overlapped by tab // hover cards when they are shown. // TODO(crbug.com/41467565): Once Linux/CrOS widget transparency is solved, 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 a413148332a0..0254fbe92440 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-06-17 12:56:06 UTC +--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/tabs/tab_drag_controller.cc @@ -95,7 +95,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 @@ -215,7 +215,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)) { @@ -405,7 +405,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) ref->can_release_capture_ = false; #endif ref->start_point_in_screen_ = -@@ -1069,7 +1069,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon +@@ -1070,7 +1070,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon // TODO(crbug.com/40118868): 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. -@@ -2151,7 +2151,7 @@ void TabDragController::CompleteDrag() { +@@ -2179,7 +2179,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 -@@ -2581,7 +2581,7 @@ TabDragController::Liveness TabDragController::GetLoca +@@ -2608,7 +2608,7 @@ TabDragController::Liveness TabDragController::GetLoca } // TODO(crbug.com/40118868): 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 07e18e7205b0..fe2a45c3bde8 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-06-17 12:56:06 UTC +--- chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc -@@ -375,7 +375,7 @@ TabHoverCardBubbleView::TabHoverCardBubbleView(Tab* ta +@@ -374,7 +374,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) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) set_accept_events(false); #endif diff --git a/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab__style__views.cc b/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab__style__views.cc index 98b3c483863e..c338d9ff6647 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab__style__views.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab__style__views.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tabs/tab_style_views.cc.orig 2023-10-11 18:22:24 UTC +--- chrome/browser/ui/views/tabs/tab_style_views.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/tabs/tab_style_views.cc -@@ -490,7 +490,7 @@ float GM2TabStyleViews::GetCurrentActiveOpacity() cons +@@ -502,7 +502,7 @@ float GM2TabStyleViews::GetCurrentActiveOpacity() cons if (!IsHoverAnimationActive()) { return base_opacity; } - return std::lerp(base_opacity, GetHoverOpacity(), GetHoverAnimationValue()); + return std::lerp(base_opacity, GetHoverOpacity(), static_cast(GetHoverAnimationValue())); } TabActive GM2TabStyleViews::GetApparentActiveState() const { 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 0c7922d3d485..93a65ae7e07b 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-06-17 12:56:06 UTC +--- chrome/browser/ui/views/user_education/browser_user_education_service.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/user_education/browser_user_education_service.cc -@@ -992,7 +992,7 @@ void MaybeRegisterChromeFeaturePromos( +@@ -1007,7 +1007,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 4f658ba959ea..2864e2f61e53 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-06-17 12:56:06 UTC +--- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc @@ -515,7 +515,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) SiteConfig GetSiteConfigurationFromAppName(const std::string& app_name) { SiteConfig config; bool is_app_found = false; -@@ -2096,7 +2096,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc +@@ -2103,7 +2103,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( -@@ -3410,7 +3410,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna +@@ -3433,7 +3433,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 -@@ -3425,7 +3425,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3448,7 +3448,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 -@@ -3435,7 +3435,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3458,7 +3458,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; } -@@ -3451,7 +3451,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile +@@ -3474,7 +3474,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; } -@@ -4265,7 +4265,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu +@@ -4288,7 +4288,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 -@@ -4465,7 +4465,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre +@@ -4488,7 +4488,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); -@@ -4509,7 +4509,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr +@@ -4532,7 +4532,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_web__applications_web__app__ui__manager__impl.cc b/www/chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc index da946e509acd..e6244957a6dc 100644 --- a/www/chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc +++ b/www/chromium/files/patch-chrome_browser_ui_web__applications_web__app__ui__manager__impl.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc.orig 2024-05-21 18:07:39 UTC +--- chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc -@@ -578,7 +578,7 @@ void WebAppUiManagerImpl::MaybeShowIPHPromoForAppsLaun +@@ -577,7 +577,7 @@ void WebAppUiManagerImpl::MaybeShowIPHPromoForAppsLaun content::WebContents* web_contents, Profile* profile, const std::string& app_id) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) WebAppProvider* provider = WebAppProvider::GetForWebApps(profile); CHECK(provider); -@@ -798,7 +798,7 @@ void WebAppUiManagerImpl::ClearWebAppSiteDataIfNeeded( +@@ -797,7 +797,7 @@ void WebAppUiManagerImpl::ClearWebAppSiteDataIfNeeded( } } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void WebAppUiManagerImpl::ShowIPHPromoForAppsLaunchedViaLinkCapturing( const Browser* browser, const webapps::AppId& app_id, 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 2a43bc3153db..8f45a588efe5 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,11 @@ ---- chrome/browser/ui/webui/app_home/app_home_page_handler.cc.orig 2024-05-21 18:07:39 UTC +--- chrome/browser/ui/webui/app_home/app_home_page_handler.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/webui/app_home/app_home_page_handler.cc -@@ -376,7 +376,7 @@ app_home::mojom::AppInfoPtr AppHomePageHandler::Create - app_info->start_url = start_url; +@@ -61,7 +61,7 @@ + #include "ui/base/window_open_disposition_utils.h" + #include "url/gurl.h" - bool deprecated_app = false; --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - auto* context = extension_system_->extension_service()->GetBrowserContext(); - deprecated_app = - extensions::IsExtensionUnsupportedDeprecatedApp(context, extension->id()); -@@ -439,7 +439,7 @@ void AppHomePageHandler::FillExtensionInfoList( - continue; - } +-static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)); ++static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)); --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - auto* context = extension_system_->extension_service()->GetBrowserContext(); - const bool is_deprecated_app = - extensions::IsExtensionUnsupportedDeprecatedApp(context, + using content::WebUI; + using extensions::Extension; diff --git a/www/chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.h b/www/chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.h new file mode 100644 index 000000000000..14eacdc19043 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_ui_webui_app__home_app__home__page__handler.h @@ -0,0 +1,11 @@ +--- chrome/browser/ui/webui/app_home/app_home_page_handler.h.orig 2024-07-30 11:12:21 UTC ++++ chrome/browser/ui/webui/app_home/app_home_page_handler.h +@@ -24,7 +24,7 @@ + #include "mojo/public/cpp/bindings/receiver.h" + #include "mojo/public/cpp/bindings/remote.h" + +-static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)); ++static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)); + + class ExtensionEnableFlow; + 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 a19372e4e37d..064695a59115 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,91 +1,114 @@ ---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2024-06-20 12:56:26 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -196,7 +196,7 @@ +@@ -191,7 +191,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 -@@ -221,17 +221,17 @@ +@@ -216,21 +216,21 @@ #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 -@@ -375,7 +375,7 @@ bool IsAboutUI(const GURL& url) { +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/browser/ui/webui/whats_new/whats_new_ui.h" + #include "chrome/browser/ui/webui/whats_new/whats_new_util.h" + #endif +@@ -384,7 +384,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) -@@ -582,7 +582,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -591,7 +591,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 -@@ -638,7 +638,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -647,7 +647,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) -@@ -686,26 +686,26 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -678,7 +678,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we + if (url.host_piece() == chrome::kChromeUIWebuiGalleryHost) { + return &NewWebUI; + } +-#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::kChromeUIWhatsNewHost && + whats_new::IsEnabled()) { + return &NewWebUI; +@@ -697,26 +697,26 @@ 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) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIWebAppSettingsHost) return &NewWebUI; #endif +@@ -955,7 +955,7 @@ base::RefCountedMemory* ChromeWebUIControllerFactory:: + if (page_url.host_piece() == chrome::kChromeUINewTabPageHost) + return NewTabPageUI::GetFaviconResourceBytes(scale_factor); + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (page_url.host_piece() == chrome::kChromeUIWhatsNewHost) + return WhatsNewUI::GetFaviconResourceBytes(scale_factor); + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/chromium/files/patch-chrome_browser_ui_webui_management_management__ui.cc b/www/chromium/files/patch-chrome_browser_ui_webui_management_management__ui.cc index 2742bed924c7..52b226acccc3 100644 --- a/www/chromium/files/patch-chrome_browser_ui_webui_management_management__ui.cc +++ b/www/chromium/files/patch-chrome_browser_ui_webui_management_management__ui.cc @@ -1,16 +1,16 @@ ---- chrome/browser/ui/webui/management/management_ui.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/webui/management/management_ui.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/webui/management/management_ui.cc -@@ -99,11 +99,11 @@ content::WebUIDataSource* CreateAndAddManagementUIHtml +@@ -100,11 +100,11 @@ content::WebUIDataSource* CreateAndAddManagementUIHtml {kManagementOnFileTransferVisibleData, IDS_MANAGEMENT_FILE_TRANSFER_VISIBLE_DATA}, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {kManagementScreenCaptureEvent, IDS_MANAGEMENT_SCREEN_CAPTURE_EVENT}, {kManagementScreenCaptureData, IDS_MANAGEMENT_SCREEN_CAPTURE_DATA}, #endif // BUILDFLAG(IS_CHROMEOS) || 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) {kManagementDeviceSignalsDisclosure, IDS_MANAGEMENT_DEVICE_SIGNALS_DISCLOSURE}, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/chromium/files/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc b/www/chromium/files/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc index 9da8f22966d5..657953d3d9a2 100644 --- a/www/chromium/files/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc +++ b/www/chromium/files/patch-chrome_browser_ui_webui_searchbox_searchbox__handler.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/searchbox/searchbox_handler.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/webui/searchbox/searchbox_handler.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/webui/searchbox/searchbox_handler.cc @@ -105,7 +105,7 @@ const char* kMacShareIconResourceName = #elif BUILDFLAG(IS_WIN) const char* kWinShareIconResourceName = "//resources/cr_components/searchbox/icons/win_share.svg"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char* kLinuxShareIconResourceName = "//resources/cr_components/searchbox/icons/share.svg"; #else @@ -165,7 +165,7 @@ static void DefineChromeRefreshRealboxIcons() { #elif BUILDFLAG(IS_WIN) kWinShareIconResourceName = "//resources/cr_components/searchbox/icons/win_share_cr23.svg"; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) kLinuxShareIconResourceName = "//resources/cr_components/searchbox/icons/share_cr23.svg"; #else -@@ -670,7 +670,7 @@ std::string SearchboxHandler::ActionVectorIconToResour +@@ -671,7 +671,7 @@ std::string SearchboxHandler::ActionVectorIconToResour 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_accessibility__main__handler.cc b/www/chromium/files/patch-chrome_browser_ui_webui_settings_accessibility__main__handler.cc index 754f256ed6a3..f7c27c32d677 100644 --- a/www/chromium/files/patch-chrome_browser_ui_webui_settings_accessibility__main__handler.cc +++ b/www/chromium/files/patch-chrome_browser_ui_webui_settings_accessibility__main__handler.cc @@ -1,46 +1,46 @@ ---- chrome/browser/ui/webui/settings/accessibility_main_handler.cc.orig 2024-02-23 21:04:38 UTC +--- chrome/browser/ui/webui/settings/accessibility_main_handler.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/webui/settings/accessibility_main_handler.cc @@ -19,7 +19,7 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "ui/accessibility/accessibility_features.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) @@ -39,7 +39,7 @@ void AccessibilityMainHandler::RegisterMessages() { base::BindRepeating( &AccessibilityMainHandler::HandleCheckAccessibilityImageLabels, base::Unretained(this))); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) web_ui()->RegisterMessageCallback( "getScreenAiInstallState", base::BindRepeating( @@ -56,7 +56,7 @@ void AccessibilityMainHandler::OnJavascriptAllowed() { base::Unretained(this))); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - if (features::IsPdfOcrEnabled()) { + if (features::IsPdfOcrEnabled() || features::IsMainNodeAnnotationsEnabled()) { CHECK(!component_ready_observer_.IsObserving()); component_ready_observer_.Observe( @@ -70,14 +70,14 @@ void AccessibilityMainHandler::OnJavascriptDisallowed( accessibility_subscription_ = {}; #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - if (features::IsPdfOcrEnabled()) { + if (features::IsPdfOcrEnabled() || features::IsMainNodeAnnotationsEnabled()) { component_ready_observer_.Reset(); } #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) void AccessibilityMainHandler::DownloadProgressChanged(double progress) { CHECK_GE(progress, 0.0); CHECK_LE(progress, 1.0); 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 a740c5ce0038..78d225b51a1c 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,56 +1,65 @@ ---- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -136,7 +136,7 @@ +@@ -142,7 +142,7 @@ #include "chrome/browser/ui/chrome_pages.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 -@@ -155,7 +155,7 @@ +@@ -161,7 +161,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 -@@ -272,7 +272,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou +@@ -280,7 +280,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", -@@ -412,7 +412,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -303,7 +303,7 @@ void AddA11yStrings(content::WebUIDataSource* html_sou + html_source->AddLocalizedStrings(kLocalizedStrings); + + #if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)) && \ +- BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) ++ BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) || BUILDFLAG(IS_BSD) + html_source->AddBoolean( + "mainNodeAnnotationsEnabled", + base::FeatureList::IsEnabled(features::kMainNodeAnnotations)); +@@ -422,7 +422,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}, + {"uiFeatureAlignLeft", IDS_SETTINGS_UI_FEATURE_ALIGN_LEFT}, + {"uiFeatureAlignRight", IDS_SETTINGS_UI_FEATURE_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}, -@@ -422,7 +422,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -432,7 +432,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) -@@ -445,7 +445,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -458,7 +458,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht // TODO(crbug.com/40118868): 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_visited__url__ranking_visited__url__ranking__service__factory.cc b/www/chromium/files/patch-chrome_browser_visited__url__ranking_visited__url__ranking__service__factory.cc index 63b3e1b78bf7..720a960a5fae 100644 --- a/www/chromium/files/patch-chrome_browser_visited__url__ranking_visited__url__ranking__service__factory.cc +++ b/www/chromium/files/patch-chrome_browser_visited__url__ranking_visited__url__ranking__service__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/visited_url_ranking/visited_url_ranking_service_factory.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/visited_url_ranking/visited_url_ranking_service_factory.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/visited_url_ranking/visited_url_ranking_service_factory.cc -@@ -35,7 +35,7 @@ +@@ -39,7 +39,7 @@ #include "components/visited_url_ranking/public/visited_url_ranking_service.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/visited_url_ranking/desktop_tab_model_url_visit_data_fetcher.h" - #endif - -@@ -80,7 +80,7 @@ VisitedURLRankingServiceFactory::BuildServiceInstanceF + #elif BUILDFLAG(IS_ANDROID) + #include "chrome/browser/visited_url_ranking/android_tab_model_url_visit_data_fetcher.h" +@@ -99,7 +99,7 @@ VisitedURLRankingServiceFactory::BuildServiceInstanceF std::map> data_fetchers; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) data_fetchers.emplace( Fetcher::kTabModel, std::make_unique( 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_os__integration__manager.cc similarity index 51% rename from www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut__manager.cc rename to www/chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__manager.cc index 80cf5431f7c3..31cf15bd8307 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_os__integration__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/web_app_shortcut_manager.cc.orig 2024-04-19 13:02:56 UTC -+++ chrome/browser/web_applications/os_integration/web_app_shortcut_manager.cc -@@ -441,7 +441,7 @@ std::unique_ptr WebAppShortcutManager::B +--- chrome/browser/web_applications/os_integration/os_integration_manager.cc.orig 2024-07-30 11:12:21 UTC ++++ chrome/browser/web_applications/os_integration/os_integration_manager.cc +@@ -651,7 +651,7 @@ std::unique_ptr OsIntegrationManager::Bu } } -#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_os__integration_shortcut__sub__manager.cc b/www/chromium/files/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc index 358621e94919..a36e1ae0c180 100644 --- a/www/chromium/files/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc +++ b/www/chromium/files/patch-chrome_browser_web__applications_os__integration_shortcut__sub__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/shortcut_sub_manager.cc.orig 2023-10-11 18:22:24 UTC +--- chrome/browser/web_applications/os_integration/shortcut_sub_manager.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/web_applications/os_integration/shortcut_sub_manager.cc -@@ -182,7 +182,7 @@ void ShortcutSubManager::Execute( +@@ -186,7 +186,7 @@ void ShortcutSubManager::Execute( return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Protocol handler update detection. Shortcuts need to be updated in this // case on Linux & Mac because the shortcut itself includes the protocol // handling metadata. diff --git a/www/chromium/files/patch-chrome_browser_web__applications_web__app__install__info.h b/www/chromium/files/patch-chrome_browser_web__applications_web__app__install__info.h index d72d40c99aa1..adb4b9c0a4ee 100644 --- a/www/chromium/files/patch-chrome_browser_web__applications_web__app__install__info.h +++ b/www/chromium/files/patch-chrome_browser_web__applications_web__app__install__info.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/web_app_install_info.h.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/web_applications/web_app_install_info.h.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/web_applications/web_app_install_info.h -@@ -35,7 +35,7 @@ +@@ -38,7 +38,7 @@ #include "url/gurl.h" static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - BUILDFLAG(IS_CHROMEOS)); + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)); namespace web_app { 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 23d573f51614..cd485d915d56 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-06-17 12:56:06 UTC +--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc -@@ -916,7 +916,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureDisc +@@ -972,7 +972,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_browser_webauthn_enclave__manager.cc b/www/chromium/files/patch-chrome_browser_webauthn_enclave__manager.cc index cf0e06893b36..cc768be1a3fe 100644 --- a/www/chromium/files/patch-chrome_browser_webauthn_enclave__manager.cc +++ b/www/chromium/files/patch-chrome_browser_webauthn_enclave__manager.cc @@ -1,20 +1,20 @@ ---- chrome/browser/webauthn/enclave_manager.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/browser/webauthn/enclave_manager.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/browser/webauthn/enclave_manager.cc -@@ -652,7 +652,7 @@ base::flat_set GetGaiaIDs( +@@ -646,7 +646,7 @@ base::flat_set GetGaiaIDs( } std::string UserVerifyingLabelToString(crypto::UserVerifyingKeyLabel label) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return label; #else return std::string("placeholder"); -@@ -661,7 +661,7 @@ std::string UserVerifyingLabelToString(crypto::UserVer +@@ -655,7 +655,7 @@ std::string UserVerifyingLabelToString(crypto::UserVer std::optional UserVerifyingKeyLabelFromString( std::string saved_label) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return saved_label; #else return std::nullopt; diff --git a/www/chromium/files/patch-chrome_common_chrome__features.cc b/www/chromium/files/patch-chrome_common_chrome__features.cc index ad14eab4f557..2d560c6f1987 100644 --- a/www/chromium/files/patch-chrome_common_chrome__features.cc +++ b/www/chromium/files/patch-chrome_common_chrome__features.cc @@ -1,74 +1,56 @@ ---- chrome/common/chrome_features.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/common/chrome_features.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/common/chrome_features.cc @@ -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_CHROMEOS) || BUILDFLAG(IS_BSD) // Enables or disables the Autofill survey triggered by opening a prompt to // save address info. BASE_FEATURE(kAutofillAddressSurvey, @@ -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. -@@ -282,7 +282,7 @@ BASE_FEATURE(kDesktopPWAsElidedExtensionsMenu, +@@ -277,7 +277,7 @@ BASE_FEATURE(kDesktopPWAsElidedExtensionsMenu, 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 -@@ -324,7 +324,7 @@ BASE_FEATURE(kDesktopPWAsTabStripSettings, +@@ -319,7 +319,7 @@ BASE_FEATURE(kDesktopPWAsTabStripSettings, "DesktopPWAsTabStripSettings", base::FEATURE_DISABLED_BY_DEFAULT); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Controls whether Chrome Apps are supported. See https://crbug.com/1221251. // If the feature is disabled, Chrome Apps continue to work. If enabled, Chrome // Apps will not launch and will be marked in the UI as deprecated. -@@ -346,7 +346,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 -@@ -362,7 +362,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 -@@ -887,7 +887,7 @@ BASE_FEATURE(kKAnonymityServiceStorage, +@@ -876,7 +876,7 @@ BASE_FEATURE(kKAnonymityServiceStorage, "KAnonymityServiceStorage", base::FEATURE_ENABLED_BY_DEFAULT); -#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); -@@ -900,7 +900,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -889,7 +889,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 b8451a087c3b..e37c9d6776fa 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-06-17 12:56:06 UTC +--- chrome/common/chrome_features.h.orig 2024-07-30 11:12:21 UTC +++ chrome/common/chrome_features.h @@ -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_CHROMEOS) || 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) -@@ -197,7 +197,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsPreventClose); +@@ -193,7 +193,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsPreventClose); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kChromeAppsDeprecation); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kShortcutsNotApps); -@@ -527,7 +527,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceOHTTPRequests); +@@ -529,7 +529,7 @@ BASE_DECLARE_FEATURE(kKAnonymityServiceOHTTPRequests); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kKAnonymityServiceStorage); -#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; -@@ -535,7 +535,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -537,7 +537,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__switches.cc b/www/chromium/files/patch-chrome_common_chrome__switches.cc index 20bdbd7e1980..8a663cee6cde 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-06-17 12:56:06 UTC +--- chrome/common/chrome_switches.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/common/chrome_switches.cc -@@ -863,14 +863,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- +@@ -867,14 +867,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || 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 f4f1712721a6..14cf6e911416 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-06-17 12:56:06 UTC +--- chrome/common/chrome_switches.h.orig 2024-07-30 11:12:21 UTC +++ chrome/common/chrome_switches.h -@@ -273,12 +273,12 @@ extern const char kAllowNaClSocketAPI[]; +@@ -274,12 +274,12 @@ extern const char kAllowNaClSocketAPI[]; #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || 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 6945c94ffe6e..fcca44a4ae7e 100644 --- a/www/chromium/files/patch-chrome_common_media_cdm__registration.cc +++ b/www/chromium/files/patch-chrome_common_media_cdm__registration.cc @@ -1,61 +1,56 @@ ---- chrome/common/media/cdm_registration.cc.orig 2024-05-21 18:07:39 UTC +--- chrome/common/media/cdm_registration.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/common/media/cdm_registration.cc -@@ -30,11 +30,11 @@ - +@@ -33,7 +33,7 @@ #if BUILDFLAG(ENABLE_WIDEVINE) + #include "components/cdm/common/cdm_manifest.h" #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 "base/native_library.h" + #include "chrome/common/chrome_paths.h" #include "chrome/common/media/component_widevine_cdm_hint_file_linux.h" - #include "media/cdm/supported_audio_codecs.h" -@@ -60,7 +60,7 @@ using Robustness = content::CdmInfo::Robustness; - #if BUILDFLAG(ENABLE_WIDEVINE) +@@ -86,7 +86,7 @@ void ReportLacrosUMA(LacrosBundledWidevine value) { + #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( -@@ -105,7 +105,7 @@ std::unique_ptr CreateCdmInfoFromWid +@@ -131,7 +131,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, 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)) +@@ -185,7 +185,7 @@ std::unique_ptr GetAshBundledWidevin + #endif // BUILDFLAG(IS_CHROMEOS_LACROS) - #if BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) && \ -- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) -+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) + #if (BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) && \ +- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH))) || \ ++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD))) || \ + BUILDFLAG(IS_CHROMEOS_LACROS) // This code checks to see if Component Updater picked a version of the Widevine // CDM to be used last time it ran. (Component Updater may choose the bundled - // CDM if there is not a new version available for download.) If there is one -@@ -171,7 +171,7 @@ void AddSoftwareSecureWidevine(std::vector* cd - DVLOG(3) << __func__ << " done with " << cdms->size() << " cdms"; +@@ -493,7 +493,7 @@ void RegisterCdmInfo(std::vector* cd } --#if BUILDFLAG(ENABLE_WIDEVINE) && BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(ENABLE_WIDEVINE) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) - std::vector GetSoftwareSecureWidevineForTesting() { + #if BUILDFLAG(ENABLE_WIDEVINE) && \ +- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) ++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) + std::vector GetSoftwareSecureWidevine() { 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 index a5290b75d0cd..5ddad13c42b5 100644 --- a/www/chromium/files/patch-chrome_common_media_cdm__registration.h +++ b/www/chromium/files/patch-chrome_common_media_cdm__registration.h @@ -1,11 +1,11 @@ ---- chrome/common/media/cdm_registration.h.orig 2024-05-21 18:07:39 UTC +--- chrome/common/media/cdm_registration.h.orig 2024-07-30 11:12:21 UTC +++ chrome/common/media/cdm_registration.h -@@ -14,7 +14,7 @@ - // Register CdmInfo for Content Decryption Modules (CDM) supported. +@@ -16,7 +16,7 @@ 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(); + #if BUILDFLAG(ENABLE_WIDEVINE) && \ +- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) ++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) + // Returns the software secure Widevine CDM, if one exists. + std::vector GetSoftwareSecureWidevine(); #endif diff --git a/www/chromium/files/patch-chrome_common_pref__names.h b/www/chromium/files/patch-chrome_common_pref__names.h index 2b7d42e752b2..ed773cfae3b3 100644 --- a/www/chromium/files/patch-chrome_common_pref__names.h +++ b/www/chromium/files/patch-chrome_common_pref__names.h @@ -1,91 +1,91 @@ ---- chrome/common/pref_names.h.orig 2024-06-17 12:56:06 UTC +--- chrome/common/pref_names.h.orig 2024-07-30 11:12:21 UTC +++ chrome/common/pref_names.h -@@ -1313,7 +1313,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u +@@ -1340,7 +1340,7 @@ inline constexpr char kUseAshProxy[] = "lacros.proxy.u // TODO(crbug.com/40118868): 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 -@@ -1457,7 +1457,7 @@ inline constexpr char kShowUpdatePromotionInfoBar[] = +@@ -1483,7 +1483,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"; -@@ -2069,7 +2069,7 @@ inline constexpr char kDownloadDefaultDirectory[] = +@@ -2088,7 +2088,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 -@@ -2505,14 +2505,14 @@ inline constexpr char kMediaStorageIdSalt[] = "media.s +@@ -2528,14 +2528,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"; -@@ -2590,7 +2590,7 @@ inline constexpr char kAmbientAuthenticationInPrivateM +@@ -2613,7 +2613,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[] = -@@ -3104,7 +3104,7 @@ inline constexpr char kDeviceWeeklyScheduledSuspend[] +@@ -3133,7 +3133,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 -@@ -3673,7 +3673,7 @@ inline constexpr char kFileOrDirectoryPickerWithoutGes +@@ -3706,7 +3706,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[] = -@@ -3722,7 +3722,7 @@ inline constexpr char kCACertificateManagementAllowed[ +@@ -3755,7 +3755,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 -@@ -4021,7 +4021,7 @@ inline constexpr char kPrintingOAuth2AuthorizationServ +@@ -4063,7 +4063,7 @@ inline constexpr char kPrintingOAuth2AuthorizationServ "printing.oauth2_authorization_servers"; #endif -#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 e10ec8e52b3c..9353b149ebdd 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-06-17 12:56:06 UTC +--- chrome/common/url_constants.h.orig 2024-07-30 11:12:21 UTC +++ chrome/common/url_constants.h -@@ -888,7 +888,7 @@ inline constexpr char kOutdatedPluginLearnMoreURL[] = +@@ -907,7 +907,7 @@ inline constexpr char kOutdatedPluginLearnMoreURL[] = inline constexpr char kPhoneHubPermissionLearnMoreURL[] = "https://support.google.com/chromebook?p=multidevice"; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || 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 ac1ad914bb41..276d71e70641 100644 --- a/www/chromium/files/patch-chrome_common_webui__url__constants.cc +++ b/www/chromium/files/patch-chrome_common_webui__url__constants.cc @@ -1,94 +1,103 @@ ---- chrome/common/webui_url_constants.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/common/webui_url_constants.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/common/webui_url_constants.cc -@@ -518,18 +518,18 @@ const char kOsUISystemURL[] = "os://system"; +@@ -259,7 +259,7 @@ const char kChromeUIVersionURL[] = "chrome://version/" + const char kChromeUIWelcomeHost[] = "welcome"; + const char kChromeUIWelcomeURL[] = "chrome://welcome/"; + +-#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 kChromeUIWhatsNewHost[] = "whats-new"; + const char kChromeUIWhatsNewURL[] = "chrome://whats-new/"; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +@@ -523,18 +523,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 -@@ -544,14 +544,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr +@@ -549,14 +549,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/40118868): 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)) const char kChromeUIBrowserSwitchHost[] = "browser-switch"; const char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/"; const char kChromeUIIntroHost[] = "intro"; -@@ -570,7 +570,7 @@ const char kChromeUIProfilePickerUrl[] = "chrome://pro +@@ -575,7 +575,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"; -@@ -649,7 +649,7 @@ const char kTrackingProtectionSubPagePath[] = "/tracki +@@ -654,7 +654,7 @@ const char kTrackingProtectionSubPagePath[] = "/tracki const char kCookiesSubPagePath[] = "/cookies"; #endif -#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 kChromeUIWebAppSettingsURL[] = "chrome://app-settings/"; const char kChromeUIWebAppSettingsHost[] = "app-settings"; #endif -@@ -795,21 +795,21 @@ const char* const kChromeHostURLs[] = { +@@ -802,21 +802,21 @@ const char* const kChromeHostURLs[] = { kChromeUIAssistantOptInHost, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) kChromeUIConnectorsInternalsHost, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) kChromeUIDiscardsHost, #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) kChromeUIWebAppSettingsHost, #endif #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) kChromeUILinuxProxyConfigHost, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) kChromeUISandboxHost, #endif #if BUILDFLAG(IS_WIN) -@@ -876,7 +876,7 @@ const char* const kChromeDebugURLs[] = { +@@ -883,7 +883,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 16d7ec4f5bdd..76a123635366 100644 --- a/www/chromium/files/patch-chrome_common_webui__url__constants.h +++ b/www/chromium/files/patch-chrome_common_webui__url__constants.h @@ -1,56 +1,56 @@ ---- chrome/common/webui_url_constants.h.orig 2024-06-17 12:56:06 UTC +--- chrome/common/webui_url_constants.h.orig 2024-07-30 11:12:21 UTC +++ chrome/common/webui_url_constants.h -@@ -437,23 +437,23 @@ extern const char kOsUISystemURL[]; +@@ -438,23 +438,23 @@ 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_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kChromeUIDiscardsHost[]; extern const char kChromeUIDiscardsURL[]; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kChromeUIWebAppSettingsURL[]; extern const char kChromeUIWebAppSettingsHost[]; - #endif -@@ -468,14 +468,14 @@ extern const char kChromeUILinuxProxyConfigHost[]; + extern const char kChromeUIWhatsNewHost[]; +@@ -471,14 +471,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/40118868): 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)) extern const char kChromeUIBrowserSwitchHost[]; extern const char kChromeUIBrowserSwitchURL[]; extern const char kChromeUIIntroHost[]; -@@ -491,7 +491,7 @@ extern const char kChromeUIProfilePickerUrl[]; +@@ -494,7 +494,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_enterprise__companion_enterprise__companion__client.cc b/www/chromium/files/patch-chrome_enterprise__companion_enterprise__companion__client.cc new file mode 100644 index 000000000000..28114f43a6ec --- /dev/null +++ b/www/chromium/files/patch-chrome_enterprise__companion_enterprise__companion__client.cc @@ -0,0 +1,11 @@ +--- chrome/enterprise_companion/enterprise_companion_client.cc.orig 2024-07-30 11:12:21 UTC ++++ chrome/enterprise_companion/enterprise_companion_client.cc +@@ -9,7 +9,7 @@ namespace enterprise_companion { + mojo::NamedPlatformChannel::ServerName GetServerName() { + #if BUILDFLAG(IS_MAC) + return "org.chromium.ChromeEnterpriseCompanion.service"; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return "/run/Chromium/ChromeEnterpriseCompanion/service.sk"; + #elif BUILDFLAG(IS_WIN) + return L"ChromeEnterpriseCompanionService"; diff --git a/www/chromium/files/patch-chrome_enterprise__companion_lock.cc b/www/chromium/files/patch-chrome_enterprise__companion_lock.cc new file mode 100644 index 000000000000..1a7c1ec67e20 --- /dev/null +++ b/www/chromium/files/patch-chrome_enterprise__companion_lock.cc @@ -0,0 +1,20 @@ +--- chrome/enterprise_companion/lock.cc.orig 2024-07-30 11:12:21 UTC ++++ chrome/enterprise_companion/lock.cc +@@ -16,7 +16,7 @@ + + namespace { + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + constexpr char kLockName[] = "/ChromeEnterpriseCompanion.lock"; + #elif BUILDFLAG(IS_MAC) + constexpr char kLockName[] = "org.chromium.ChromeEnterpriseCompanion.lock"; +@@ -41,7 +41,7 @@ CSecurityDesc GetAdminDaclSecurityDescriptor() { + namespace enterprise_companion { + + std::unique_ptr CreateScopedLock() { +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return named_system_lock::ScopedLock::Create(kLockName, base::Seconds(0)); + #elif BUILDFLAG(IS_WIN) + CSecurityAttributes sa = diff --git a/www/chromium/files/patch-chrome_services_file__util_public_mojom_safe__document__analyzer__mojom__traits.h b/www/chromium/files/patch-chrome_services_file__util_public_mojom_safe__document__analyzer__mojom__traits.h deleted file mode 100644 index c4e1b4444b49..000000000000 --- a/www/chromium/files/patch-chrome_services_file__util_public_mojom_safe__document__analyzer__mojom__traits.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/services/file_util/public/mojom/safe_document_analyzer_mojom_traits.h.orig 2024-06-17 12:56:06 UTC -+++ chrome/services/file_util/public/mojom/safe_document_analyzer_mojom_traits.h -@@ -17,7 +17,7 @@ - #include "mojo/public/cpp/bindings/struct_traits.h" - - #if !BUILDFLAG(FULL_SAFE_BROWSING) || \ -- (!BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_WIN)) -+ (!BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD)) - #error FULL_SAFE_BROWSING should be set and either IS_LINUX or IS_WIN set. - #endif - diff --git a/www/chromium/files/patch-chrome_updater_lock.cc b/www/chromium/files/patch-chrome_updater_lock.cc new file mode 100644 index 000000000000..ecd75e63de6c --- /dev/null +++ b/www/chromium/files/patch-chrome_updater_lock.cc @@ -0,0 +1,11 @@ +--- chrome/updater/lock.cc.orig 2024-07-30 11:12:21 UTC ++++ chrome/updater/lock.cc +@@ -26,7 +26,7 @@ namespace updater { + std::unique_ptr CreateScopedLock(const std::string& name, + UpdaterScope scope, + base::TimeDelta timeout) { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return named_system_lock::ScopedLock::Create( + base::StrCat({"/" PRODUCT_FULLNAME_STRING, name, + UpdaterScopeToString(scope), ".lock"}), diff --git a/www/chromium/files/patch-chrome_utility_services.cc b/www/chromium/files/patch-chrome_utility_services.cc index 13beda7a8ae4..c0f0da5c1dc1 100644 --- a/www/chromium/files/patch-chrome_utility_services.cc +++ b/www/chromium/files/patch-chrome_utility_services.cc @@ -1,65 +1,29 @@ ---- chrome/utility/services.cc.orig 2024-06-17 12:56:06 UTC +--- chrome/utility/services.cc.orig 2024-07-30 11:12:21 UTC +++ chrome/utility/services.cc -@@ -38,7 +38,7 @@ - #include "services/screen_ai/screen_ai_service_impl.h" // nogncheck - #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 "services/passage_embeddings/passage_embeddings_service.h" - #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(LINUX) - -@@ -61,7 +61,7 @@ +@@ -57,7 +57,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) -@@ -82,7 +82,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 - -@@ -221,7 +221,7 @@ auto RunMacNotificationService( +@@ -214,7 +214,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 RunPassageEmbeddingsService( - mojo::PendingReceiver + auto RunSystemSignalsService( + mojo::PendingReceiver receiver) { -@@ -288,7 +288,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)); -@@ -494,7 +494,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -481,7 +481,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(RunPassageEmbeddingsService); services.Add(RunSystemSignalsService); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -511,7 +511,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_cast__core_runtime_browser_runtime__application__service__impl.cc b/www/chromium/files/patch-chromecast_cast__core_runtime_browser_runtime__application__service__impl.cc index 3455960e8260..769ad26c85f6 100644 --- a/www/chromium/files/patch-chromecast_cast__core_runtime_browser_runtime__application__service__impl.cc +++ b/www/chromium/files/patch-chromecast_cast__core_runtime_browser_runtime__application__service__impl.cc @@ -1,11 +1,11 @@ ---- chromecast/cast_core/runtime/browser/runtime_application_service_impl.cc.orig 2024-06-17 12:56:06 UTC +--- chromecast/cast_core/runtime/browser/runtime_application_service_impl.cc.orig 2024-07-30 11:12:21 UTC +++ chromecast/cast_core/runtime/browser/runtime_application_service_impl.cc -@@ -335,7 +335,7 @@ CastWebView::Scoped RuntimeApplicationServiceImpl::Cre +@@ -336,7 +336,7 @@ CastWebView::Scoped RuntimeApplicationServiceImpl::Cre GetFlagEntry(feature::kCastCoreIsRemoteControlMode, config_.extra_features(), /*default_value=*/false); params->enabled_for_dev = IsEnabledForDev(); -#if BUILDFLAG(ENABLE_CAST_RECEIVER) && BUILDFLAG(IS_LINUX) +#if BUILDFLAG(ENABLE_CAST_RECEIVER) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) // cast_receiver::ApplicationControlsImpl constructs an instance of // url_rewrite::UrlRequestRewriteRulesManager. CastWebContentsImpl should NOT // construct its own instance, or UrlRequestRulesReceiver will crash when a diff --git a/www/chromium/files/patch-components_autofill_core_browser_payments__data__manager.cc b/www/chromium/files/patch-components_autofill_core_browser_payments__data__manager.cc index 38208f60a6f8..0d9503ca2570 100644 --- a/www/chromium/files/patch-components_autofill_core_browser_payments__data__manager.cc +++ b/www/chromium/files/patch-components_autofill_core_browser_payments__data__manager.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/browser/payments_data_manager.cc.orig 2024-06-17 12:56:06 UTC +--- components/autofill/core/browser/payments_data_manager.cc.orig 2024-07-30 11:12:21 UTC +++ components/autofill/core/browser/payments_data_manager.cc -@@ -1064,7 +1064,7 @@ bool PaymentsDataManager::ShouldShowCardsFromAccountOp +@@ -1065,7 +1065,7 @@ bool PaymentsDataManager::ShouldShowCardsFromAccountOp // The feature is only for Linux, Windows, Mac, and Fuchsia. // TODO(crbug.com/40118868): 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) || \ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) // This option should only be shown for users that have not enabled the Sync // Feature and that have server credit cards available. diff --git a/www/chromium/files/patch-components_autofill_core_common_autofill__features.cc b/www/chromium/files/patch-components_autofill_core_common_autofill__features.cc new file mode 100644 index 000000000000..abccaaff3499 --- /dev/null +++ b/www/chromium/files/patch-components_autofill_core_common_autofill__features.cc @@ -0,0 +1,11 @@ +--- components/autofill/core/common/autofill_features.cc.orig 2024-07-30 11:12:21 UTC ++++ components/autofill/core/common/autofill_features.cc +@@ -661,7 +661,7 @@ BASE_FEATURE(kAutofillTextAreaChangeEvents, + // Enabled by default for Mac and Windows platforms. + BASE_FEATURE(kAutofillContentEditableChangeEvents, + "AutofillContentEditableChangeEvents", +-#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 diff --git a/www/chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc b/www/chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc index f9278b461321..83c478e86c9b 100644 --- a/www/chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc +++ b/www/chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/common/autofill_payments_features.cc.orig 2024-06-17 12:56:06 UTC +--- components/autofill/core/common/autofill_payments_features.cc.orig 2024-07-30 11:12:21 UTC +++ components/autofill/core/common/autofill_payments_features.cc -@@ -257,7 +257,7 @@ BASE_FEATURE(kAutofillEnableVirtualCards, +@@ -248,7 +248,7 @@ BASE_FEATURE(kAutofillSyncEwalletAccounts, bool ShouldShowImprovedUserConsentForCreditCardSave() { // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // The new user consent UI is fully launched on MacOS, Windows and Linux. return true; diff --git a/www/chromium/files/patch-components_commerce_core_commerce__feature__list.cc b/www/chromium/files/patch-components_commerce_core_commerce__feature__list.cc index ea25995c547a..8695fcec4492 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-05-21 18:07:39 UTC +--- components/commerce/core/commerce_feature_list.cc.orig 2024-07-30 11:12:21 UTC +++ components/commerce/core/commerce_feature_list.cc @@ -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); -@@ -248,7 +248,7 @@ const base::FeatureParam kDeleteAllMerchantsOnCl +@@ -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 index 9595cefb0ed1..e2283ed78db4 100644 --- a/www/chromium/files/patch-components_constrained__window_constrained__window__views.cc +++ b/www/chromium/files/patch-components_constrained__window_constrained__window__views.cc @@ -1,11 +1,11 @@ ---- components/constrained_window/constrained_window_views.cc.orig 2024-06-17 12:56:06 UTC +--- components/constrained_window/constrained_window_views.cc.orig 2024-07-30 11:12:21 UTC +++ components/constrained_window/constrained_window_views.cc -@@ -350,7 +350,7 @@ bool SupportsGlobalScreenCoordinates() { +@@ -360,7 +360,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_device__signals_core_browser_user__permission__service__impl.cc b/www/chromium/files/patch-components_device__signals_core_browser_user__permission__service__impl.cc index ac1e11d23458..0b379b47a2a2 100644 --- a/www/chromium/files/patch-components_device__signals_core_browser_user__permission__service__impl.cc +++ b/www/chromium/files/patch-components_device__signals_core_browser_user__permission__service__impl.cc @@ -1,11 +1,11 @@ ---- components/device_signals/core/browser/user_permission_service_impl.cc.orig 2024-05-21 18:07:39 UTC +--- components/device_signals/core/browser/user_permission_service_impl.cc.orig 2024-07-30 11:12:21 UTC +++ components/device_signals/core/browser/user_permission_service_impl.cc -@@ -93,7 +93,7 @@ bool UserPermissionServiceImpl::ShouldCollectConsent() +@@ -87,7 +87,7 @@ bool UserPermissionServiceImpl::ShouldCollectConsent() consent_required_by_dependent_policy; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) UserPermission UserPermissionServiceImpl::CanUserCollectSignals( const UserContext& user_context) const { // Return "unknown user" if no user ID was given. diff --git a/www/chromium/files/patch-components_device__signals_core_browser_user__permission__service__impl.h b/www/chromium/files/patch-components_device__signals_core_browser_user__permission__service__impl.h index 8bdca220f354..ab0dfa7da42a 100644 --- a/www/chromium/files/patch-components_device__signals_core_browser_user__permission__service__impl.h +++ b/www/chromium/files/patch-components_device__signals_core_browser_user__permission__service__impl.h @@ -1,11 +1,11 @@ ---- components/device_signals/core/browser/user_permission_service_impl.h.orig 2023-07-16 15:47:57 UTC +--- components/device_signals/core/browser/user_permission_service_impl.h.orig 2024-07-30 11:12:21 UTC +++ components/device_signals/core/browser/user_permission_service_impl.h -@@ -39,7 +39,7 @@ class UserPermissionServiceImpl : public UserPermissio +@@ -38,7 +38,7 @@ class UserPermissionServiceImpl : public UserPermissio // UserPermissionService: bool ShouldCollectConsent() const override; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) UserPermission CanUserCollectSignals( const UserContext& user_context) const override; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX diff --git a/www/chromium/files/patch-chrome_browser_enterprise_watermark_watermark__view.cc b/www/chromium/files/patch-components_enterprise_watermarking_watermark.cc similarity index 65% rename from www/chromium/files/patch-chrome_browser_enterprise_watermark_watermark__view.cc rename to www/chromium/files/patch-components_enterprise_watermarking_watermark.cc index 196c2b1d0f53..03e670c4ca78 100644 --- a/www/chromium/files/patch-chrome_browser_enterprise_watermark_watermark__view.cc +++ b/www/chromium/files/patch-components_enterprise_watermarking_watermark.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/watermark/watermark_view.cc.orig 2024-05-21 18:07:39 UTC -+++ chrome/browser/enterprise/watermark/watermark_view.cc -@@ -36,7 +36,7 @@ gfx::Font WatermarkFont() { +--- components/enterprise/watermarking/watermark.cc.orig 2024-07-30 11:12:21 UTC ++++ components/enterprise/watermarking/watermark.cc +@@ -23,7 +23,7 @@ gfx::Font WatermarkFont() { "Segoe UI", #elif BUILDFLAG(IS_MAC) "SF Pro Text", -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) "Ubuntu", #elif BUILDFLAG(IS_CHROMEOS) "Google Sans", -@@ -47,7 +47,7 @@ gfx::Font WatermarkFont() { +@@ -34,7 +34,7 @@ gfx::Font WatermarkFont() { } gfx::Font::Weight WatermarkFontWeight() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return gfx::Font::Weight::SEMIBOLD; #else return gfx::Font::Weight::MEDIUM; diff --git a/www/chromium/files/patch-components_eye__dropper_eye__dropper__view.cc b/www/chromium/files/patch-components_eye__dropper_eye__dropper__view.cc index cb9a5ac584e7..c80e5453e13e 100644 --- a/www/chromium/files/patch-components_eye__dropper_eye__dropper__view.cc +++ b/www/chromium/files/patch-components_eye__dropper_eye__dropper__view.cc @@ -1,11 +1,11 @@ ---- components/eye_dropper/eye_dropper_view.cc.orig 2024-06-17 12:56:06 UTC +--- components/eye_dropper/eye_dropper_view.cc.orig 2024-07-30 11:12:21 UTC +++ components/eye_dropper/eye_dropper_view.cc @@ -202,7 +202,7 @@ EyeDropperView::EyeDropperView(gfx::NativeView parent, // EyeDropper/WidgetDelegate. set_owned_by_client(); SetPreferredSize(GetSize()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Use TYPE_MENU for Linux to ensure that the eye dropper view is displayed // above the color picker. - views::Widget::InitParams params(views::Widget::InitParams::TYPE_MENU); + views::Widget::InitParams params( 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 69383154fad3..3dadfd25620d 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,29 +1,29 @@ ---- components/feature_engagement/public/feature_configurations.cc.orig 2024-06-17 12:56:06 UTC +--- components/feature_engagement/public/feature_configurations.cc.orig 2024-07-30 11:12:21 UTC +++ components/feature_engagement/public/feature_configurations.cc -@@ -94,7 +94,7 @@ std::optional CreateNewUserGestureInPro +@@ -99,7 +99,7 @@ std::optional CreateNewUserGestureInPro 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 -@@ -113,7 +113,7 @@ std::optional GetClientSideFeatureConfi +@@ -118,7 +118,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) { std::optional config = FeatureConfig(); config->valid = true; -@@ -1498,7 +1498,7 @@ std::optional GetClientSideFeatureConfi +@@ -1607,7 +1607,7 @@ std::optional GetClientSideFeatureConfi #endif // BUILDFLAG(IS_ANDROID) -#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 (kIPHAutofillCreditCardBenefitFeature.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 cf17680e5fe7..09f916a8bbf3 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,30 +1,30 @@ ---- components/feature_engagement/public/feature_constants.cc.orig 2024-06-17 12:56:06 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2024-07-30 11:12:21 UTC +++ components/feature_engagement/public/feature_constants.cc @@ -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(kEsbDownloadRowPromoFeature, "EsbDownloadRowPromo", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -605,7 +605,8 @@ BASE_FEATURE(kDefaultBrowserTriggerCriteriaExperiment, +@@ -626,7 +626,8 @@ BASE_FEATURE(kDefaultBrowserTriggerCriteriaExperiment, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) BASE_FEATURE(kIPHAutofillCreditCardBenefitFeature, "IPH_AutofillCreditCardBenefit", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -736,7 +737,7 @@ BASE_FEATURE(kIPHScalableIphGamingFeature, +@@ -757,7 +758,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. 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 612f6ef60a59..ce12983ef21a 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,30 +1,30 @@ ---- components/feature_engagement/public/feature_constants.h.orig 2024-06-17 12:56:06 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2024-07-30 11:12:21 UTC +++ components/feature_engagement/public/feature_constants.h @@ -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(kEsbDownloadRowPromoFeature); BASE_DECLARE_FEATURE(kIPHBatterySaverModeFeature); BASE_DECLARE_FEATURE(kIPHCompanionSidePanelFeature); -@@ -252,7 +252,8 @@ BASE_DECLARE_FEATURE(kDefaultBrowserTriggerCriteriaExp +@@ -259,7 +259,8 @@ BASE_DECLARE_FEATURE(kDefaultBrowserTriggerCriteriaExp #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kIPHAutofillCreditCardBenefitFeature); BASE_DECLARE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature); BASE_DECLARE_FEATURE(kIPHAutofillManualFallbackFeature); -@@ -301,7 +302,7 @@ BASE_DECLARE_FEATURE(kIPHScalableIphHelpAppBasedTenFea +@@ -308,7 +309,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 1fa49ffeb834..f50254639ef7 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,30 +1,30 @@ ---- components/feature_engagement/public/feature_list.cc.orig 2024-06-17 12:56:06 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2024-07-30 11:12:21 UTC +++ components/feature_engagement/public/feature_list.cc -@@ -148,7 +148,7 @@ const base::Feature* const kAllFeatures[] = { - &kIPHiOSInlineEnhancedSafeBrowsingPromoFeature, +@@ -152,7 +152,7 @@ const base::Feature* const kAllFeatures[] = { + &kIPHiOSSavedTabGroupClosed, #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) &kEsbDownloadRowPromoFeature, &kIPHBatterySaverModeFeature, &kIPHCompanionSidePanelFeature, -@@ -211,7 +211,8 @@ const base::Feature* const kAllFeatures[] = { +@@ -218,7 +218,8 @@ const base::Feature* const kAllFeatures[] = { // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) &kIPHAutofillCreditCardBenefitFeature, &kIPHAutofillExternalAccountProfileSuggestionFeature, &kIPHAutofillManualFallbackFeature, -@@ -260,7 +261,7 @@ const base::Feature* const kAllFeatures[] = { +@@ -267,7 +268,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 93cf26689186..9830fb0910b2 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,58 +1,58 @@ ---- components/feature_engagement/public/feature_list.h.orig 2024-06-17 12:56:06 UTC +--- components/feature_engagement/public/feature_list.h.orig 2024-07-30 11:12:21 UTC +++ components/feature_engagement/public/feature_list.h -@@ -266,7 +266,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSInlineEnhancedSafeBrowsi +@@ -273,7 +273,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSSavedTabGroupClosed, #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(kEsbDownloadRowPromoFeature, "EsbDownloadRowPromo"); DEFINE_VARIATION_PARAM(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode"); DEFINE_VARIATION_PARAM(kIPHCompanionSidePanelFeature, "IPH_CompanionSidePanel"); -@@ -370,7 +370,8 @@ DEFINE_VARIATION_PARAM(kIPHBackNavigationMenuFeature, +@@ -383,7 +383,8 @@ DEFINE_VARIATION_PARAM(kIPHTabGroupsSaveV2CloseGroupFe // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHAutofillCreditCardBenefitFeature, "IPH_AutofillCreditCardBenefit"); DEFINE_VARIATION_PARAM(kIPHAutofillExternalAccountProfileSuggestionFeature, -@@ -457,7 +458,7 @@ DEFINE_VARIATION_PARAM(kIPHScalableIphHelpAppBasedTenF +@@ -470,7 +471,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) -@@ -606,7 +607,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation - VARIATION_ENTRY(kIPHiOSPromoGenericDefaultBrowserFeature), +@@ -626,7 +627,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation VARIATION_ENTRY(kIPHiOSOverflowMenuCustomizationFeature), + VARIATION_ENTRY(kIPHiOSSavedTabGroupClosed), #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), -@@ -665,7 +666,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -686,7 +687,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHAutofillCreditCardBenefitFeature), VARIATION_ENTRY(kIPHAutofillExternalAccountProfileSuggestionFeature), VARIATION_ENTRY(kIPHAutofillManualFallbackFeature), -@@ -714,7 +716,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -735,7 +737,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_flags__ui_flags__state.cc b/www/chromium/files/patch-components_flags__ui_flags__state.cc index 881eddd1ed45..f32ea0d3fdd2 100644 --- a/www/chromium/files/patch-components_flags__ui_flags__state.cc +++ b/www/chromium/files/patch-components_flags__ui_flags__state.cc @@ -1,11 +1,11 @@ ---- components/flags_ui/flags_state.cc.orig 2023-09-13 12:11:42 UTC +--- components/flags_ui/flags_state.cc.orig 2024-07-30 11:12:21 UTC +++ components/flags_ui/flags_state.cc -@@ -741,7 +741,7 @@ unsigned short FlagsState::GetCurrentPlatform() { +@@ -749,7 +749,7 @@ unsigned short FlagsState::GetCurrentPlatform() { return kOsCrOS; #elif BUILDFLAG(IS_CHROMEOS_LACROS) return kOsLacros; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kOsLinux; #elif BUILDFLAG(IS_ANDROID) return kOsAndroid; diff --git a/www/chromium/files/patch-components_named__system__lock_lock.h b/www/chromium/files/patch-components_named__system__lock_lock.h new file mode 100644 index 000000000000..113783611cd1 --- /dev/null +++ b/www/chromium/files/patch-components_named__system__lock_lock.h @@ -0,0 +1,11 @@ +--- components/named_system_lock/lock.h.orig 2024-07-30 11:12:21 UTC ++++ components/named_system_lock/lock.h +@@ -38,7 +38,7 @@ class ScopedLock { + // may acquire that lock. The lock name has different meanings per platform: + // Linux: A shared memory object name starting with `/`. E.g. `/MyApp.lock`. + // Mac: A bootstrap service name (see `man bootstrap_check_in`). +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + static std::unique_ptr Create(const std::string& name, + base::TimeDelta timeout); + #elif BUILDFLAG(IS_WIN) diff --git a/www/chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc b/www/chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc index 1651356289ac..515b7da9085d 100644 --- a/www/chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc +++ b/www/chromium/files/patch-components_optimization__guide_core_optimization__guide__util.cc @@ -1,11 +1,11 @@ ---- components/optimization_guide/core/optimization_guide_util.cc.orig 2024-05-21 18:07:39 UTC +--- components/optimization_guide/core/optimization_guide_util.cc.orig 2024-07-30 11:12:21 UTC +++ components/optimization_guide/core/optimization_guide_util.cc -@@ -40,7 +40,7 @@ optimization_guide::proto::Platform GetPlatform() { +@@ -35,7 +35,7 @@ optimization_guide::proto::Platform GetPlatform() { return optimization_guide::proto::PLATFORM_CHROMEOS; #elif BUILDFLAG(IS_ANDROID) return optimization_guide::proto::PLATFORM_ANDROID; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return optimization_guide::proto::PLATFORM_LINUX; #else return optimization_guide::proto::PLATFORM_UNDEFINED; 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 53252d469fc1..0b145b63cc1f 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,29 @@ ---- components/password_manager/core/browser/features/password_features.cc.orig 2024-06-17 12:56:06 UTC +--- components/password_manager/core/browser/features/password_features.cc.orig 2024-07-31 19:26:21 UTC +++ components/password_manager/core/browser/features/password_features.cc -@@ -36,7 +36,7 @@ BASE_FEATURE(kClearUndecryptablePasswords, - +@@ -33,7 +33,7 @@ BASE_FEATURE(kBiometricTouchToFill, + #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) // Desktop + BASE_FEATURE(kButterOnDesktopFollowup, + "ButterOnDesktopFollowup", +-#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_ENABLED_BY_DEFAULT); + #else + base::FEATURE_DISABLED_BY_DEFAULT); +@@ -47,7 +47,7 @@ BASE_FEATURE(kClearUndecryptablePasswords, 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) + #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -98,7 +98,7 @@ BASE_FEATURE(kPasswordManualFallbackAvailable, +@@ -109,7 +109,7 @@ BASE_FEATURE(kPasswordManualFallbackAvailable, "PasswordManualFallbackAvailable", 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", #if BUILDFLAG(IS_MAC) 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 7969327a5e5d..b9bc36e72f9b 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-06-17 12:56:06 UTC +--- components/password_manager/core/browser/features/password_features.h.orig 2024-07-30 11:12:21 UTC +++ components/password_manager/core/browser/features/password_features.h -@@ -82,7 +82,7 @@ BASE_DECLARE_FEATURE(kPasswordManagerLogToTerminal); +@@ -93,7 +93,7 @@ BASE_DECLARE_FEATURE(kPasswordManagerLogToTerminal); // Enables triggering password suggestions through the context menu. BASE_DECLARE_FEATURE(kPasswordManualFallbackAvailable); -#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) || 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 6400703ffaa5..e16c6467075e 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-06-17 12:56:06 UTC +--- components/password_manager/core/browser/password_form_manager.cc.orig 2024-07-30 11:12:21 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 -@@ -227,7 +227,7 @@ bool ShouldUploadCrowdsourcingVotes(const FormOrDigest +@@ -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( std::optional backend_error) { if (!backend_error.has_value()) { -@@ -869,7 +869,7 @@ void PasswordFormManager::OnFetchCompleted() { +@@ -880,7 +880,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 99e341525f90..0a047c118c00 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-05-21 18:07:39 UTC +--- components/password_manager/core/browser/password_manager.cc.orig 2024-07-30 11:12:21 UTC +++ components/password_manager/core/browser/password_manager.cc -@@ -373,7 +373,7 @@ void PasswordManager::RegisterProfilePrefs( - registry->RegisterListPref(prefs::kPasswordManagerPromoCardsList); +@@ -386,7 +386,7 @@ void PasswordManager::RegisterProfilePrefs( + prefs::kAutofillableCredentialsAccountStoreLoginDatabase, false); #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__manager__client.h b/www/chromium/files/patch-components_password__manager_core_browser_password__manager__client.h index 1c0cb39eb403..441187c24da3 100644 --- a/www/chromium/files/patch-components_password__manager_core_browser_password__manager__client.h +++ b/www/chromium/files/patch-components_password__manager_core_browser_password__manager__client.h @@ -1,20 +1,20 @@ ---- components/password_manager/core/browser/password_manager_client.h.orig 2024-06-17 12:56:06 UTC +--- components/password_manager/core/browser/password_manager_client.h.orig 2024-07-30 11:12:21 UTC +++ components/password_manager/core/browser/password_manager_client.h @@ -30,7 +30,7 @@ #include "net/cert/cert_status_flags.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/i18n/rtl.h" #include "components/password_manager/core/browser/password_cross_domain_confirmation_popup_controller.h" #include "ui/gfx/geometry/rect_f.h" -@@ -505,7 +505,7 @@ class PasswordManagerClient { +@@ -517,7 +517,7 @@ class PasswordManagerClient { virtual void RefreshPasswordManagerSettingsIfNeeded() const; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Creates and show the cross domain confirmation popup. virtual std::unique_ptr ShowCrossDomainConfirmationPopup(const gfx::RectF& element_bounds, diff --git a/www/chromium/files/patch-components_password__manager_core_browser_password__manager__switches.h b/www/chromium/files/patch-components_password__manager_core_browser_password__manager__switches.h index ece4c189c495..80beeb77d92c 100644 --- a/www/chromium/files/patch-components_password__manager_core_browser_password__manager__switches.h +++ b/www/chromium/files/patch-components_password__manager_core_browser_password__manager__switches.h @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/password_manager_switches.h.orig 2024-06-17 12:56:06 UTC +--- components/password_manager/core/browser/password_manager_switches.h.orig 2024-07-30 11:12:21 UTC +++ components/password_manager/core/browser/password_manager_switches.h @@ -10,7 +10,7 @@ namespace password_manager { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kPasswordStore[]; extern const char kEnableEncryptionSelection[]; - #endif + #endif // BUILDFLAG(IS_LINUX) diff --git a/www/chromium/files/patch-components_password__manager_core_browser_password__store_login__database.cc b/www/chromium/files/patch-components_password__manager_core_browser_password__store_login__database.cc new file mode 100644 index 000000000000..43a2d1b9c0ff --- /dev/null +++ b/www/chromium/files/patch-components_password__manager_core_browser_password__store_login__database.cc @@ -0,0 +1,20 @@ +--- components/password_manager/core/browser/password_store/login_database.cc.orig 2024-07-30 11:12:21 UTC ++++ components/password_manager/core/browser/password_store/login_database.cc +@@ -1020,7 +1020,7 @@ void RecordShouldDeleteUndecryptablePasswordsMetric( + } + + bool ShouldDeleteUndecryptablePasswords() { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + std::string user_data_dir_string; + std::unique_ptr environment(base::Environment::Create()); + // On Linux user data directory ca be specified using an env variable. If it +@@ -1039,7 +1039,7 @@ bool ShouldDeleteUndecryptablePasswords() { + return false; + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (command_line->HasSwitch(password_manager::kPasswordStore)) { + RecordShouldDeleteUndecryptablePasswordsMetric( + ShouldDeleteUndecryptablePasswordsResult:: 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 40dd4fa34c88..547594963c54 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-06-17 12:56:06 UTC +--- components/password_manager/core/browser/password_store/login_database_unittest.cc.orig 2024-07-30 11:12:21 UTC +++ components/password_manager/core/browser/password_store/login_database_unittest.cc -@@ -2132,7 +2132,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, - LoginDatabaseMigrationTestBroken, +@@ -2141,7 +2141,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, 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) + #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || 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 deleted file mode 100644 index e7fff686b84d..000000000000 --- a/www/chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/password_manager/core/browser/sync/password_sync_bridge.cc.orig 2024-06-17 12:56:06 UTC -+++ components/password_manager/core/browser/sync/password_sync_bridge.cc -@@ -196,7 +196,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__features.cc b/www/chromium/files/patch-components_password__manager_core_common_password__manager__features.cc deleted file mode 100644 index 969ecb439ebe..000000000000 --- a/www/chromium/files/patch-components_password__manager_core_common_password__manager__features.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/password_manager/core/common/password_manager_features.cc.orig 2023-10-27 05:38:38 UTC -+++ components/password_manager/core/common/password_manager_features.cc -@@ -18,7 +18,7 @@ BASE_FEATURE(kEnableOverwritingPlaceholderUsernames, - "EnableOverwritingPlaceholderUsernames", - base::FEATURE_DISABLED_BY_DEFAULT); - --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // When enabled, initial sync will be forced during startup if the password - // store has encryption service failures. - BASE_FEATURE(kForceInitialSyncWhenDecryptionFails, diff --git a/www/chromium/files/patch-components_password__manager_core_common_password__manager__features.h b/www/chromium/files/patch-components_password__manager_core_common_password__manager__features.h deleted file mode 100644 index 857af97aa0e4..000000000000 --- a/www/chromium/files/patch-components_password__manager_core_common_password__manager__features.h +++ /dev/null @@ -1,11 +0,0 @@ ---- components/password_manager/core/common/password_manager_features.h.orig 2023-12-10 06:10:27 UTC -+++ components/password_manager/core/common/password_manager_features.h -@@ -19,7 +19,7 @@ namespace password_manager::features { - // alongside the definition of their values in the .cc file. - BASE_DECLARE_FEATURE(kEnableOverwritingPlaceholderUsernames); - --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - BASE_DECLARE_FEATURE(kForceInitialSyncWhenDecryptionFails); - #endif - BASE_DECLARE_FEATURE(kForgotPasswordFormSupport); 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 710e900fb846..b5449eb3cc1a 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-06-17 12:56:06 UTC +--- components/password_manager/core/common/password_manager_pref_names.h.orig 2024-07-30 11:12:21 UTC +++ components/password_manager/core/common/password_manager_pref_names.h -@@ -327,7 +327,7 @@ inline constexpr char kPasswordManagerPromoCardsList[] +@@ -358,7 +358,7 @@ inline constexpr char kAutofillableCredentialsAccountS 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_performance__manager_public_features.h b/www/chromium/files/patch-components_performance__manager_public_features.h index 130dd84e7838..99908eed5fea 100644 --- a/www/chromium/files/patch-components_performance__manager_public_features.h +++ b/www/chromium/files/patch-components_performance__manager_public_features.h @@ -1,11 +1,11 @@ ---- components/performance_manager/public/features.h.orig 2024-05-21 18:07:39 UTC +--- components/performance_manager/public/features.h.orig 2024-07-30 11:12:21 UTC +++ components/performance_manager/public/features.h -@@ -28,7 +28,7 @@ BASE_DECLARE_FEATURE(kRunOnMainThreadSync); +@@ -21,7 +21,7 @@ BASE_DECLARE_FEATURE(kRunOnMainThreadSync); #if !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define URGENT_DISCARDING_FROM_PERFORMANCE_MANAGER() false #else #define URGENT_DISCARDING_FROM_PERFORMANCE_MANAGER() true diff --git a/www/chromium/files/patch-components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc b/www/chromium/files/patch-components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc index 93c14e64b7f7..c460b66347bf 100644 --- a/www/chromium/files/patch-components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc +++ b/www/chromium/files/patch-components_safe__browsing_core_browser_realtime_url__lookup__service__base.cc @@ -1,11 +1,11 @@ ---- components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc.orig 2022-02-28 16:54:41 UTC +--- components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc.orig 2024-07-30 11:12:21 UTC +++ components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc -@@ -109,7 +109,7 @@ RTLookupRequest::OSType GetRTLookupRequestOSType() { +@@ -108,7 +108,7 @@ RTLookupRequest::OSType GetRTLookupRequestOSType() { return RTLookupRequest::OS_TYPE_FUCHSIA; #elif BUILDFLAG(IS_IOS) return RTLookupRequest::OS_TYPE_IOS; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return RTLookupRequest::OS_TYPE_LINUX; #elif BUILDFLAG(IS_MAC) return RTLookupRequest::OS_TYPE_MAC; 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 d5f7f803273a..456b69f3eaf2 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,20 @@ ---- components/safe_browsing/core/common/features.cc.orig 2024-06-17 12:56:06 UTC +--- components/safe_browsing/core/common/features.cc.orig 2024-07-30 11:12:21 UTC +++ components/safe_browsing/core/common/features.cc -@@ -160,7 +160,7 @@ BASE_FEATURE(kFriendlierSafeBrowsingSettingsStandardPr +@@ -168,7 +168,7 @@ BASE_FEATURE(kGooglePlayProtectPrompt, BASE_FEATURE(kHashPrefixRealTimeLookups, "SafeBrowsingHashPrefixRealTimeLookups", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT +@@ -253,7 +253,7 @@ constexpr base::FeatureParam kReferrerChainEventM + BASE_FEATURE(kSafeBrowsingAsyncRealTimeCheck, + "SafeBrowsingAsyncRealTimeCheck", + #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 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 484afca2fe38..48a10067e914 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-05-21 18:07:39 UTC +--- components/search_engines/search_engine_choice/search_engine_choice_service.cc.orig 2024-07-30 11:12:21 UTC +++ components/search_engines/search_engine_choice/search_engine_choice_service.cc -@@ -539,7 +539,7 @@ void SearchEngineChoiceService::ProcessPendingChoiceSc +@@ -580,7 +580,7 @@ void SearchEngineChoiceService::ProcessPendingChoiceSc 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 10ed92bc683e..b289af9b4a33 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-06-17 12:56:06 UTC +--- components/search_engines/template_url_service.cc.orig 2024-07-30 11:12:21 UTC +++ components/search_engines/template_url_service.cc -@@ -3096,7 +3096,7 @@ bool TemplateURLService::MatchesDefaultSearchProvider( +@@ -3121,7 +3121,7 @@ bool TemplateURLService::MatchesDefaultSearchProvider( std::unique_ptr TemplateURLService::GetEnterpriseSiteSearchManager(PrefService* prefs) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - 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_signin_public_base_signin__switches.cc b/www/chromium/files/patch-components_signin_public_base_signin__switches.cc index 9b43d0429e1d..6dfc78d0e605 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,20 +1,25 @@ ---- components/signin/public/base/signin_switches.cc.orig 2024-06-17 12:56:06 UTC +--- components/signin/public/base/signin_switches.cc.orig 2024-07-30 11:12:21 UTC +++ components/signin/public/base/signin_switches.cc -@@ -135,7 +135,7 @@ bool IsExplicitBrowserSigninUIOnDesktopEnabled() { +@@ -129,11 +129,11 @@ 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); -@@ -144,7 +144,7 @@ constexpr int kMinorModeRestrictionsFetchDeadlineDefau + + // Desktop and Android are being launched (enabled by default), iOS is pending. + #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + #define MINOR_MODE_FEATURE_DEFAULT_STATUS base::FEATURE_ENABLED_BY_DEFAULT + #else + #define MINOR_MODE_FEATURE_DEFAULT_STATUS base::FEATURE_DISABLED_BY_DEFAULT +@@ -147,7 +147,7 @@ constexpr int kMinorModeRestrictionsFetchDeadlineDefau #if BUILDFLAG(IS_ANDROID) // Based on Signin.AccountCapabilities.UserVisibleLatency - 400; + 1000; -#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; + 1000; #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 c62b8f7d06b6..f8601d37d8fc 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-06-17 12:56:06 UTC +--- components/signin/public/base/signin_switches.h.orig 2024-07-30 11:12:21 UTC +++ components/signin/public/base/signin_switches.h -@@ -115,7 +115,7 @@ bool IsExplicitBrowserSigninUIOnDesktopEnabled(); +@@ -112,7 +112,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); diff --git a/www/chromium/files/patch-components_supervised__user_core_browser_supervised__user__metrics__service.cc b/www/chromium/files/patch-components_supervised__user_core_browser_supervised__user__metrics__service.cc new file mode 100644 index 000000000000..9239ced9307f --- /dev/null +++ b/www/chromium/files/patch-components_supervised__user_core_browser_supervised__user__metrics__service.cc @@ -0,0 +1,11 @@ +--- components/supervised_user/core/browser/supervised_user_metrics_service.cc.orig 2024-07-30 11:12:21 UTC ++++ components/supervised_user/core/browser/supervised_user_metrics_service.cc +@@ -47,7 +47,7 @@ SupervisedUserMetricsService::SupervisedUserMetricsSer + extensions_metrics_delegate_(std::move(extensions_metrics_delegate)) { + DCHECK(pref_service_); + DCHECK(url_filter_); +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + CHECK(extensions_metrics_delegate_) + << "Extensions metrics delegate must exist on Win/Linux/Mac"; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) 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 f72c5df95bee..bc763b1e555d 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,20 +1,29 @@ ---- components/supervised_user/core/common/features.cc.orig 2024-06-17 12:56:06 UTC +--- components/supervised_user/core/common/features.cc.orig 2024-07-30 11:12:21 UTC +++ components/supervised_user/core/common/features.cc @@ -59,7 +59,7 @@ BASE_FEATURE(kUpdatedSupervisedUserExtensionApprovalSt "UpdatedSupervisedUserExtensionApprovalStrings", 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); -@@ -70,7 +70,7 @@ bool IsSupervisedUserSkipParentApprovalToInstallExtens +@@ -74,7 +74,7 @@ bool IsSupervisedUserSkipParentApprovalToInstallExtens #if BUILDFLAG(IS_CHROMEOS) return base::FeatureList::IsEnabled( kEnableSupervisedUserSkipParentApprovalToInstallExtensions); -#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) bool skipParentApprovalEnabled = base::FeatureList::IsEnabled( kEnableSupervisedUserSkipParentApprovalToInstallExtensions); bool permissionExtensionsForSupervisedUsersEnabled = +@@ -101,7 +101,7 @@ BASE_FEATURE(kCustomWebSignInInterceptForSupervisedUse + "CustomWebSignInInterceptForSupervisedUsers", + base::FEATURE_DISABLED_BY_DEFAULT); + +-#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(kHideGuestModeForSupervisedUsers, + "HideGuestModeForSupervisedUsers", + base::FEATURE_DISABLED_BY_DEFAULT); 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 f10afdc03bc1..274b18632655 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,20 @@ ---- components/supervised_user/core/common/features.h.orig 2024-06-17 12:56:06 UTC +--- components/supervised_user/core/common/features.h.orig 2024-07-30 11:12:21 UTC +++ components/supervised_user/core/common/features.h @@ -25,7 +25,7 @@ BASE_DECLARE_FEATURE( // Applies new informative strings during the parental extension approval flow. BASE_DECLARE_FEATURE(kUpdatedSupervisedUserExtensionApprovalStrings); -#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 +@@ -53,7 +53,7 @@ bool IsSupervisedUserSkipParentApprovalToInstallExtens + // Only affects Desktop platforms. + BASE_DECLARE_FEATURE(kCustomWebSignInInterceptForSupervisedUsers); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // This hides the following guest mode entry points for supervised users: + // + // * In the Profile menu for supervised profiles diff --git a/www/chromium/files/patch-components_supervised__user_core_common_pref__names.h b/www/chromium/files/patch-components_supervised__user_core_common_pref__names.h index 69bf55119eec..050e041ebd74 100644 --- a/www/chromium/files/patch-components_supervised__user_core_common_pref__names.h +++ b/www/chromium/files/patch-components_supervised__user_core_common_pref__names.h @@ -1,11 +1,11 @@ ---- components/supervised_user/core/common/pref_names.h.orig 2024-06-17 12:56:06 UTC +--- components/supervised_user/core/common/pref_names.h.orig 2024-07-30 11:12:21 UTC +++ components/supervised_user/core/common/pref_names.h -@@ -136,7 +136,7 @@ inline constexpr char kFirstTimeInterstitialBannerStat +@@ -137,7 +137,7 @@ inline constexpr char kFirstTimeInterstitialBannerStat "profile.managed.banner_state"; #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) // An integer pref that stores the current state of the local extension // parent approval migration when the feature // `kEnableSupervisedUserSkipParentApprovalToInstallExtensions` becomes enabled. 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 f839f89f0cae..8242ecea800c 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-06-17 12:56:06 UTC +--- components/user_education/views/help_bubble_view.cc.orig 2024-07-30 11:12:21 UTC +++ components/user_education/views/help_bubble_view.cc @@ -997,7 +997,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. + // crbug.com/1445770 for details. This also applies to bubbles anchored to 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 ab6858c04cc7..dfd5486e70d8 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-03-22 08:19:40 UTC +--- components/variations/service/variations_service.cc.orig 2024-07-30 11:12:21 UTC +++ components/variations/service/variations_service.cc -@@ -99,7 +99,7 @@ std::string GetPlatformString() { +@@ -101,7 +101,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_visited__url__ranking_public_url__visit__util.cc b/www/chromium/files/patch-components_visited__url__ranking_public_url__visit__util.cc new file mode 100644 index 000000000000..bcfe39d54c8c --- /dev/null +++ b/www/chromium/files/patch-components_visited__url__ranking_public_url__visit__util.cc @@ -0,0 +1,11 @@ +--- components/visited_url_ranking/public/url_visit_util.cc.orig 2024-07-30 11:12:21 UTC ++++ components/visited_url_ranking/public/url_visit_util.cc +@@ -54,7 +54,7 @@ PlatformType GetPlatformInput() { + return PlatformType::kWindows; + #elif BUILDFLAG(IS_MAC) + return PlatformType::kMac; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + return PlatformType::kLinux; + #elif BUILDFLAG(IS_IOS) + return PlatformType::kIos; diff --git a/www/chromium/files/patch-components_viz_common_features.cc b/www/chromium/files/patch-components_viz_common_features.cc index abcd386b161a..9169966a9979 100644 --- a/www/chromium/files/patch-components_viz_common_features.cc +++ b/www/chromium/files/patch-components_viz_common_features.cc @@ -1,20 +1,20 @@ ---- components/viz/common/features.cc.orig 2024-06-17 12:56:06 UTC +--- components/viz/common/features.cc.orig 2024-07-30 11:12:21 UTC +++ components/viz/common/features.cc -@@ -251,7 +251,7 @@ BASE_FEATURE(kBufferQueueImageSetPurgeable, +@@ -263,7 +263,7 @@ BASE_FEATURE(kBufferQueueImageSetPurgeable, "BufferQueueImageSetPurgeable", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On platforms using SkiaOutputDeviceBufferQueue and not yet universally using // SkiaRenderer-allocated images, when this is true SkiaRenderer will allocate // and maintain a buffer queue of images for the root render pass, instead of -@@ -535,7 +535,7 @@ bool ShouldOnBeginFrameThrottleVideo() { +@@ -559,7 +559,7 @@ bool ShouldOnBeginFrameThrottleVideo() { return base::FeatureList::IsEnabled(features::kOnBeginFrameThrottleVideo); } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool ShouldRendererAllocateImages() { return base::FeatureList::IsEnabled(kRendererAllocatesImages); } diff --git a/www/chromium/files/patch-components_viz_common_features.h b/www/chromium/files/patch-components_viz_common_features.h index 148812e7fada..c5a909cfb7db 100644 --- a/www/chromium/files/patch-components_viz_common_features.h +++ b/www/chromium/files/patch-components_viz_common_features.h @@ -1,20 +1,20 @@ ---- components/viz/common/features.h.orig 2024-06-17 12:56:06 UTC +--- components/viz/common/features.h.orig 2024-07-30 11:12:21 UTC +++ components/viz/common/features.h -@@ -74,7 +74,7 @@ VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kDrawPredictedI +@@ -75,7 +75,7 @@ VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kDrawPredictedI VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kAllowUndamagedNonrootRenderPassToSkip); VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE( kAllowForceMergeRenderPassWithRequireOverlayQuads); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kRendererAllocatesImages); #endif VIZ_COMMON_EXPORT BASE_DECLARE_FEATURE(kBufferQueueImageSetPurgeable); -@@ -134,7 +134,7 @@ VIZ_COMMON_EXPORT std::optional IsDynamicSched +@@ -136,7 +136,7 @@ VIZ_COMMON_EXPORT std::optional IsDynamicSched VIZ_COMMON_EXPORT std::optional IsDynamicSchedulerEnabledForClients(); VIZ_COMMON_EXPORT int MaxOverlaysConsidered(); VIZ_COMMON_EXPORT bool ShouldOnBeginFrameThrottleVideo(); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) VIZ_COMMON_EXPORT bool ShouldRendererAllocateImages(); #endif VIZ_COMMON_EXPORT bool IsOnBeginFrameAcksEnabled(); diff --git a/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__device__buffer__queue.cc b/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__device__buffer__queue.cc index a4d900371c75..83ec58f5b321 100644 --- a/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__device__buffer__queue.cc +++ b/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__device__buffer__queue.cc @@ -1,11 +1,11 @@ ---- components/viz/service/display_embedder/skia_output_device_buffer_queue.cc.orig 2024-06-17 12:56:06 UTC +--- components/viz/service/display_embedder/skia_output_device_buffer_queue.cc.orig 2024-07-30 11:12:21 UTC +++ components/viz/service/display_embedder/skia_output_device_buffer_queue.cc -@@ -197,7 +197,7 @@ SkiaOutputDeviceBufferQueue::SkiaOutputDeviceBufferQue +@@ -174,7 +174,7 @@ SkiaOutputDeviceBufferQueue::SkiaOutputDeviceBufferQue capabilities_.only_invalidates_damage_rect = false; capabilities_.number_of_buffers = 3; -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) capabilities_.renderer_allocates_images = ::features::ShouldRendererAllocateImages(); #else 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 7860e8272dc0..b71c19d682b7 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-06-17 12:56:06 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2024-07-30 11:12:21 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl.cc -@@ -1522,7 +1522,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor - ->GetVulkanPhysicalDevice(), - VK_IMAGE_TILING_OPTIMAL, vk_format, - si_format, yuv_color_space, ycbcr_info); +@@ -1546,7 +1546,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor + ->GetVulkanPhysicalDevice(), + VK_IMAGE_TILING_OPTIMAL, vk_format, + si_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 2ee5b455ba88..84b896f6ebb1 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-06-17 12:56:06 UTC +--- components/viz/service/display/skia_renderer.cc.orig 2024-07-30 11:12:21 UTC +++ components/viz/service/display/skia_renderer.cc -@@ -1442,7 +1442,7 @@ void SkiaRenderer::ClearFramebuffer() { +@@ -1422,7 +1422,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-content_app_BUILD.gn b/www/chromium/files/patch-content_app_BUILD.gn new file mode 100644 index 000000000000..58053dfa8f76 --- /dev/null +++ b/www/chromium/files/patch-content_app_BUILD.gn @@ -0,0 +1,15 @@ +--- content/app/BUILD.gn.orig 2024-07-30 11:12:21 UTC ++++ content/app/BUILD.gn +@@ -96,9 +96,9 @@ source_set("content_main_runner_app") { + "//chromeos/startup:constants", + ] + } +- if (build_tflite_with_xnnpack) { +- deps += [ "//third_party/cpuinfo" ] +- } ++# if (build_tflite_with_xnnpack) { ++# deps += [ "//third_party/cpuinfo" ] ++# } + } + + source_set("app") { 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 6a8c4ce0ff03..098a912e4169 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,129 +1,129 @@ ---- content/app/content_main_runner_impl.cc.orig 2024-06-17 12:56:06 UTC +--- content/app/content_main_runner_impl.cc.orig 2024-07-30 11:12:21 UTC +++ content/app/content_main_runner_impl.cc -@@ -144,18 +144,20 @@ +@@ -149,18 +149,20 @@ #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" #include "content/public/common/zygote/sandbox_support_linux.h" +#if !BUILDFLAG(IS_BSD) #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "third_party/boringssl/src/include/openssl/crypto.h" #include "third_party/webrtc_overrides/init_webrtc.h" // nogncheck -@@ -189,6 +191,10 @@ +@@ -194,6 +196,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" -@@ -384,7 +390,7 @@ void InitializeZygoteSandboxForBrowserProcess( +@@ -389,7 +395,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 -@@ -422,7 +428,10 @@ void PreloadLibraryCdms() { +@@ -427,7 +433,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. -@@ -434,9 +443,16 @@ void PreSandboxInit() { +@@ -439,9 +448,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. -@@ -847,11 +863,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -889,11 +905,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) -@@ -1038,8 +1053,20 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -1041,8 +1056,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) @@ -1114,7 +1141,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 @@ -1149,6 +1176,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 ef185a30f35f..38d14935be20 100644 --- a/www/chromium/files/patch-content_browser_BUILD.gn +++ b/www/chromium/files/patch-content_browser_BUILD.gn @@ -1,16 +1,33 @@ ---- content/browser/BUILD.gn.orig 2024-06-17 12:56:06 UTC +--- content/browser/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ content/browser/BUILD.gn -@@ -2408,6 +2408,13 @@ source_set("browser") { - deps += [ "//media/mojo/mojom/stable:stable_video_decoder" ] +@@ -2375,6 +2375,14 @@ source_set("browser") { + ] } ++ if (is_bsd) { ++ sources += [ ++ "file_system_access/file_path_watcher/file_path_watcher_bsd.cc", ++ "file_system_access/file_path_watcher/file_path_watcher_kqueue.cc", ++ "file_system_access/file_path_watcher/file_path_watcher_kqueue.h", ++ ] ++ } ++ + if (is_linux || is_chromeos) { + sources += [ + "child_process_launcher_helper_linux.cc", +@@ -2411,6 +2419,15 @@ source_set("browser") { + if (allow_oop_video_decoder) { + sources += [ "media/stable_video_decoder_factory.cc" ] + deps += [ "//media/mojo/mojom/stable:stable_video_decoder" ] ++ } ++ + if (is_bsd) { + sources -= [ ++ "file_system_access/file_path_watcher/file_path_watcher_inotify.cc", ++ "file_system_access/file_path_watcher/file_path_watcher_inotify.h", + "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__main__loop.cc b/www/chromium/files/patch-content_browser_browser__main__loop.cc index 4716e44a05a4..19b9aac77f9e 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-05-21 18:07:39 UTC +--- content/browser/browser_main_loop.cc.orig 2024-07-30 11:12:21 UTC +++ content/browser/browser_main_loop.cc -@@ -249,6 +249,12 @@ +@@ -251,6 +251,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() { +@@ -546,6 +552,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() { +@@ -583,7 +595,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_compositor_viz__process__transport__factory.cc b/www/chromium/files/patch-content_browser_compositor_viz__process__transport__factory.cc index 2d1843fe277c..5040fdc387f0 100644 --- a/www/chromium/files/patch-content_browser_compositor_viz__process__transport__factory.cc +++ b/www/chromium/files/patch-content_browser_compositor_viz__process__transport__factory.cc @@ -1,11 +1,11 @@ ---- content/browser/compositor/viz_process_transport_factory.cc.orig 2024-04-19 13:02:56 UTC +--- content/browser/compositor/viz_process_transport_factory.cc.orig 2024-07-30 11:12:21 UTC +++ content/browser/compositor/viz_process_transport_factory.cc -@@ -105,7 +105,7 @@ class HostDisplayClient : public viz::HostDisplayClien +@@ -110,7 +110,7 @@ class HostDisplayClient : public viz::HostDisplayClien HostDisplayClient& operator=(const HostDisplayClient&) = delete; // viz::HostDisplayClient: -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(IS_OZONE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(IS_OZONE_X11) void DidCompleteSwapWithNewSize(const gfx::Size& size) override { compositor_->OnCompleteSwapWithNewSize(size); } diff --git a/www/chromium/files/patch-content_browser_devtools_devtools__frontend__host__impl.cc b/www/chromium/files/patch-content_browser_devtools_devtools__frontend__host__impl.cc index 40151b5c65d2..2bcaf3e720bb 100644 --- a/www/chromium/files/patch-content_browser_devtools_devtools__frontend__host__impl.cc +++ b/www/chromium/files/patch-content_browser_devtools_devtools__frontend__host__impl.cc @@ -1,38 +1,38 @@ ---- content/browser/devtools/devtools_frontend_host_impl.cc.orig 2023-11-03 10:09:45 UTC +--- content/browser/devtools/devtools_frontend_host_impl.cc.orig 2024-07-30 11:12:21 UTC +++ content/browser/devtools/devtools_frontend_host_impl.cc -@@ -22,7 +22,7 @@ +@@ -27,7 +27,7 @@ #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "ui/base/webui/resource_path.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/content/browser/error_reporting/javascript_error_report.h" // nogncheck #include "components/crash/content/browser/error_reporting/js_error_report_processor.h" // nogncheck #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -37,7 +37,7 @@ const char kCompatibilityScriptSourceURL[] = +@@ -42,7 +42,7 @@ const char kCompatibilityScriptSourceURL[] = "\n//# " "sourceURL=devtools://devtools/bundled/devtools_compatibility.js"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Remove the pieces of the URL we don't want to send back with the error // reports. In particular, do not send query or fragments as those can have // privacy-sensitive information in them. -@@ -107,7 +107,7 @@ DevToolsFrontendHostImpl::DevToolsFrontendHostImpl( +@@ -112,7 +112,7 @@ DevToolsFrontendHostImpl::DevToolsFrontendHostImpl( const HandleMessageCallback& handle_message_callback) : web_contents_(WebContents::FromRenderFrameHost(frame_host)), handle_message_callback_(handle_message_callback) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) Observe(web_contents_); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) mojo::AssociatedRemote frontend; -@@ -132,7 +132,7 @@ void DevToolsFrontendHostImpl::DispatchEmbedderMessage +@@ -137,7 +137,7 @@ void DevToolsFrontendHostImpl::DispatchEmbedderMessage handle_message_callback_.Run(std::move(message)); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void DevToolsFrontendHostImpl::OnDidAddMessageToConsole( RenderFrameHost* source_frame, blink::mojom::ConsoleMessageLevel log_level, diff --git a/www/chromium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher.h b/www/chromium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher.h new file mode 100644 index 000000000000..dca4bdd02952 --- /dev/null +++ b/www/chromium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher.h @@ -0,0 +1,11 @@ +--- content/browser/file_system_access/file_path_watcher/file_path_watcher.h.orig 2024-07-30 11:12:21 UTC ++++ content/browser/file_system_access/file_path_watcher/file_path_watcher.h +@@ -125,7 +125,7 @@ class CONTENT_EXPORT FilePathWatcher { + Type type = Type::kNonRecursive; + + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ +- BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // The callback will return the full path to a changed file instead of + // the watched path supplied as |path| when Watch is called. + // So the full path can be different from the watched path when a folder is diff --git a/www/chromium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__bsd.cc b/www/chromium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__bsd.cc new file mode 100644 index 000000000000..c04ec6e62679 --- /dev/null +++ b/www/chromium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__bsd.cc @@ -0,0 +1,58 @@ +--- content/browser/file_system_access/file_path_watcher/file_path_watcher_bsd.cc.orig 2024-07-30 11:12:21 UTC ++++ content/browser/file_system_access/file_path_watcher/file_path_watcher_bsd.cc +@@ -0,0 +1,55 @@ ++// Copyright 2024 The Chromium Authors ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "content/browser/file_system_access/file_path_watcher/file_path_watcher.h" ++ ++#include ++ ++#include "base/memory/ptr_util.h" ++#include "build/build_config.h" ++#include "content/browser/file_system_access/file_path_watcher/file_path_watcher_kqueue.h" ++ ++namespace content { ++ ++namespace { ++ ++class FilePathWatcherImpl : public FilePathWatcher::PlatformDelegate { ++ public: ++ FilePathWatcherImpl() = default; ++ FilePathWatcherImpl(const FilePathWatcherImpl&) = delete; ++ FilePathWatcherImpl& operator=(const FilePathWatcherImpl&) = delete; ++ ~FilePathWatcherImpl() override = default; ++ ++ bool Watch(const base::FilePath& path, ++ Type type, ++ const FilePathWatcher::Callback& callback) override { ++ DCHECK(!impl_.get()); ++ if (type == Type::kRecursive) { ++ if (!FilePathWatcher::RecursiveWatchAvailable()) { ++ return false; ++ } ++ } else { ++ impl_ = std::make_unique(); ++ } ++ DCHECK(impl_.get()); ++ return impl_->Watch(path, type, callback); ++ } ++ ++ void Cancel() override { ++ if (impl_.get()) { ++ impl_->Cancel(); ++ } ++ set_cancelled(); ++ } ++ ++ private: ++ std::unique_ptr impl_; ++}; ++ ++} // namespace ++ ++FilePathWatcher::FilePathWatcher() ++ : FilePathWatcher(std::make_unique()) {} ++ ++} // namespace content diff --git a/www/chromium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__kqueue.h b/www/chromium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__kqueue.h new file mode 100644 index 000000000000..1a59af20c1ba --- /dev/null +++ b/www/chromium/files/patch-content_browser_file__system__access_file__path__watcher_file__path__watcher__kqueue.h @@ -0,0 +1,10 @@ +--- content/browser/file_system_access/file_path_watcher/file_path_watcher_kqueue.h.orig 2024-07-30 11:12:21 UTC ++++ content/browser/file_system_access/file_path_watcher/file_path_watcher_kqueue.h +@@ -5,6 +5,7 @@ + #ifndef CONTENT_BROWSER_FILE_SYSTEM_ACCESS_FILE_PATH_WATCHER_FILE_PATH_WATCHER_KQUEUE_H_ + #define CONTENT_BROWSER_FILE_SYSTEM_ACCESS_FILE_PATH_WATCHER_FILE_PATH_WATCHER_KQUEUE_H_ + ++#include + #include + + #include diff --git a/www/chromium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc b/www/chromium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc index c2ba6f4d490a..0dae2a252c31 100644 --- a/www/chromium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc +++ b/www/chromium/files/patch-content_browser_file__system__access_file__system__access__local__path__watcher.cc @@ -1,11 +1,11 @@ ---- content/browser/file_system_access/file_system_access_local_path_watcher.cc.orig 2024-06-17 12:56:06 UTC +--- content/browser/file_system_access/file_system_access_local_path_watcher.cc.orig 2024-07-30 11:12:21 UTC +++ content/browser/file_system_access/file_system_access_local_path_watcher.cc -@@ -64,7 +64,7 @@ void FileSystemAccessLocalPathWatcher::Initialize( - .type = scope().IsRecursive() - ? base::FilePathWatcher::Type::kRecursive - : base::FilePathWatcher::Type::kNonRecursive, --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +@@ -62,7 +62,7 @@ void FileSystemAccessLocalPathWatcher::Initialize( + FilePathWatcher::WatchOptions watch_options{ + .type = scope().IsRecursive() ? FilePathWatcher::Type::kRecursive + : FilePathWatcher::Type::kNonRecursive, +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Note: `report_modified_path` is also present on Android // and Fuchsia. Update this switch if support for watching // the local file system is added on those platforms. diff --git a/www/chromium/files/patch-content_browser_gpu_compositor__util.cc b/www/chromium/files/patch-content_browser_gpu_compositor__util.cc index d9084c632939..223435712a2f 100644 --- a/www/chromium/files/patch-content_browser_gpu_compositor__util.cc +++ b/www/chromium/files/patch-content_browser_gpu_compositor__util.cc @@ -1,20 +1,20 @@ ---- content/browser/gpu/compositor_util.cc.orig 2024-04-19 13:02:56 UTC +--- content/browser/gpu/compositor_util.cc.orig 2024-07-30 11:12:21 UTC +++ content/browser/gpu/compositor_util.cc -@@ -149,7 +149,7 @@ std::vector GetGpuFeatureData( +@@ -154,7 +154,7 @@ std::vector GetGpuFeatureData( "video_decode", SafeGetFeatureStatus( gpu_feature_info, gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) !base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) || #endif // BUILDFLAG(IS_LINUX) command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode)), -@@ -161,7 +161,7 @@ std::vector GetGpuFeatureData( +@@ -166,7 +166,7 @@ std::vector GetGpuFeatureData( "video_encode", SafeGetFeatureStatus( gpu_feature_info, gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE, -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) !base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux)), #else command_line.HasSwitch(switches::kDisableAcceleratedVideoEncode)), 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 cf5fe9ff5b13..b888d8263ca3 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 2024-06-17 12:56:06 UTC +--- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2024-07-30 11:12:21 UTC +++ content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1692,7 +1692,7 @@ void GpuDataManagerImplPrivate::RecordCompositingMode( +@@ -1697,7 +1697,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 b127d3d90cce..d6b52ec8026c 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-06-17 12:56:06 UTC +--- content/browser/gpu/gpu_process_host.cc.orig 2024-07-30 11:12:21 UTC +++ content/browser/gpu/gpu_process_host.cc -@@ -268,6 +268,7 @@ static const char* const kSwitchNames[] = { +@@ -273,6 +273,7 @@ static const char* const kSwitchNames[] = { switches::kEnableLowEndDeviceMode, switches::kDisableSkiaGraphite, switches::kDisableLowEndDeviceMode, + switches::kDisableUnveil, switches::kProfilingAtStart, switches::kProfilingFile, switches::kProfilingFlush, -@@ -295,7 +296,7 @@ static const char* const kSwitchNames[] = { +@@ -300,7 +301,7 @@ static const char* const kSwitchNames[] = { switches::kOzoneDumpFile, switches::kEnableNativeGpuMemoryBuffers, #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 d3eba0b54393..05c2aea45b8a 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-03-22 08:19:40 UTC +--- content/browser/media/media_keys_listener_manager_impl.cc.orig 2024-07-30 11:12:21 UTC +++ content/browser/media/media_keys_listener_manager_impl.cc -@@ -334,7 +334,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMe +@@ -333,7 +333,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMe + return; } - #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ -- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) +-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_WIN) ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) || BUILDFLAG(IS_WIN) // 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_render__process__host__impl.cc b/www/chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc index 4e8a066eb092..3b11d1ce5b77 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-06-17 12:56:06 UTC +--- content/browser/renderer_host/render_process_host_impl.cc.orig 2024-07-30 11:12:21 UTC +++ content/browser/renderer_host/render_process_host_impl.cc -@@ -223,7 +223,7 @@ +@@ -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 -@@ -964,7 +964,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = +@@ -965,7 +965,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; -@@ -1150,7 +1150,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1151,7 +1151,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) } -@@ -1167,7 +1167,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1172,7 +1172,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; -@@ -1261,7 +1261,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1266,7 +1266,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_; -@@ -3379,7 +3379,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( +@@ -3429,7 +3429,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 +@@ -3487,6 +3487,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 f42d828bd1e9..528e1424af65 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-06-17 12:56:06 UTC +--- content/browser/renderer_host/render_process_host_impl.h.orig 2024-07-30 11:12:21 UTC +++ content/browser/renderer_host/render_process_host_impl.h -@@ -599,7 +599,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -594,7 +594,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__view__host__impl.cc b/www/chromium/files/patch-content_browser_renderer__host_render__view__host__impl.cc index ee0fe06c2ad7..5e720c5e2d19 100644 --- a/www/chromium/files/patch-content_browser_renderer__host_render__view__host__impl.cc +++ b/www/chromium/files/patch-content_browser_renderer__host_render__view__host__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/renderer_host/render_view_host_impl.cc.orig 2024-06-17 12:56:06 UTC +--- content/browser/renderer_host/render_view_host_impl.cc.orig 2024-07-30 11:12:21 UTC +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -271,7 +271,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( +@@ -273,7 +273,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( display::win::ScreenWin::GetSystemMetricsInDIP(SM_CYVSCROLL); prefs->arrow_bitmap_width_horizontal_scroll_bar_in_dips = display::win::ScreenWin::GetSystemMetricsInDIP(SM_CXHSCROLL); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kSystemFontFamily)) { prefs->system_font_family_name = 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 7c1ba368b913..d3e95e1b23e1 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-06-17 12:56:06 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2024-08-07 08:11:50 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -120,7 +120,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" @@ -469,7 +469,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()) -@@ -1730,7 +1730,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { +@@ -1731,7 +1731,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { return host() && host()->delegate() && host()->delegate()->ShouldDoLearning(); } -#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) { -@@ -2561,7 +2561,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -2559,7 +2559,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; -@@ -2745,7 +2745,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -2743,7 +2743,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 ad519c87a011..b8da48ab520e 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-04-19 13:02:56 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.h.orig 2024-08-07 08:11:50 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.h -@@ -259,7 +259,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura +@@ -261,7 +261,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_scheduler_responsiveness_jank__monitor__impl.cc b/www/chromium/files/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc index b1b0b461936c..af1dba60de1b 100644 --- a/www/chromium/files/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc +++ b/www/chromium/files/patch-content_browser_scheduler_responsiveness_jank__monitor__impl.cc @@ -1,11 +1,11 @@ ---- content/browser/scheduler/responsiveness/jank_monitor_impl.cc.orig 2024-06-17 12:56:06 UTC +--- content/browser/scheduler/responsiveness/jank_monitor_impl.cc.orig 2024-07-30 11:12:21 UTC +++ content/browser/scheduler/responsiveness/jank_monitor_impl.cc -@@ -339,7 +339,7 @@ void JankMonitorImpl::ThreadExecutionState::DidRunTask +@@ -340,7 +340,7 @@ void JankMonitorImpl::ThreadExecutionState::DidRunTask // in context menus, among others). Simply ignore the mismatches for now. // See https://crbug.com/929813 for the details of why the mismatch // happens. -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) && \ BUILDFLAG(IS_OZONE) task_execution_metadata_.clear(); #endif 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 412d78a43d7d..cc0620539d91 100644 --- a/www/chromium/files/patch-content_browser_utility__process__host.cc +++ b/www/chromium/files/patch-content_browser_utility__process__host.cc @@ -1,82 +1,72 @@ ---- content/browser/utility_process_host.cc.orig 2024-06-17 12:56:06 UTC +--- content/browser/utility_process_host.cc.orig 2024-07-30 11:12:21 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" @@ -74,7 +74,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" @@ -85,7 +85,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) allowed_gpu_(false), gpu_client_(nullptr, base::OnTaskRunnerDeleter(nullptr)), #endif @@ -209,7 +209,7 @@ void UtilityProcessHost::SetPreloadLibraries( #endif // BUILDFLAG(IS_WIN) void UtilityProcessHost::SetAllowGpuClient() { -#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) allowed_gpu_ = true; #endif } -@@ -349,6 +349,9 @@ bool UtilityProcessHost::StartProcess() { - switches::kFailAudioStreamCreation, - switches::kMuteAudio, - switches::kUseFileForFakeAudioCapture, -+#if BUILDFLAG(IS_BSD) -+ switches::kAudioBackend, -+#endif - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \ - BUILDFLAG(IS_SOLARIS) - switches::kAlsaInputDevice, -@@ -409,7 +412,7 @@ bool UtilityProcessHost::StartProcess() { +@@ -408,7 +408,7 @@ bool UtilityProcessHost::StartProcess() { file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload(*cmd_line)); #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) { -@@ -420,13 +423,13 @@ bool UtilityProcessHost::StartProcess() { +@@ -419,13 +419,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_utility__sandbox__delegate.cc b/www/chromium/files/patch-content_browser_utility__sandbox__delegate.cc index a5906276e719..5bb22a51d98b 100644 --- a/www/chromium/files/patch-content_browser_utility__sandbox__delegate.cc +++ b/www/chromium/files/patch-content_browser_utility__sandbox__delegate.cc @@ -1,28 +1,28 @@ ---- content/browser/utility_sandbox_delegate.cc.orig 2024-01-30 07:53:34 UTC +--- content/browser/utility_sandbox_delegate.cc.orig 2024-07-30 11:12:21 UTC +++ content/browser/utility_sandbox_delegate.cc @@ -67,10 +67,10 @@ UtilitySandboxedProcessLauncherDelegate:: #if BUILDFLAG(IS_FUCHSIA) sandbox_type_ == sandbox::mojom::Sandbox::kVideoCapture || #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoDecoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoEncoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -126,10 +126,10 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe +@@ -127,10 +127,10 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe // process upon startup. if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork || sandbox_type_ == sandbox::mojom::Sandbox::kOnDeviceModelExecution || -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoDecoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoEncoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/www/chromium/files/patch-content_child_child__process.cc b/www/chromium/files/patch-content_child_child__process.cc index 2f0bbf2bcac0..acb683bd0b8d 100644 --- a/www/chromium/files/patch-content_child_child__process.cc +++ b/www/chromium/files/patch-content_child_child__process.cc @@ -1,11 +1,29 @@ ---- content/child/child_process.cc.orig 2023-11-03 10:09:45 UTC +--- content/child/child_process.cc.orig 2024-07-30 11:12:21 UTC +++ content/child/child_process.cc -@@ -66,7 +66,7 @@ ChildProcess::ChildProcess(base::ThreadType io_thread_ +@@ -35,7 +35,7 @@ + #include "content/common/android/cpu_time_metrics.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" + #endif + +@@ -70,7 +70,7 @@ ChildProcess::ChildProcess(base::ThreadType io_thread_ thread_pool_init_params) : resetter_(&child_process, this, nullptr), io_thread_(std::make_unique()) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); const bool is_embedded_in_browser_process = +@@ -199,7 +199,7 @@ void ChildProcess::set_main_thread(ChildThreadImpl* th + main_thread_.reset(thread); + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + void ChildProcess::SetIOThreadType(base::ThreadType thread_type) { + if (!io_thread_) { + return; diff --git a/www/chromium/files/patch-content_child_child__process.h b/www/chromium/files/patch-content_child_child__process.h new file mode 100644 index 000000000000..8b7c855a26a3 --- /dev/null +++ b/www/chromium/files/patch-content_child_child__process.h @@ -0,0 +1,11 @@ +--- content/child/child_process.h.orig 2024-07-30 11:12:21 UTC ++++ content/child/child_process.h +@@ -79,7 +79,7 @@ class CONTENT_EXPORT ChildProcess { + return io_thread_runner_.get(); + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Changes the thread type of the child process IO thread. + void SetIOThreadType(base::ThreadType thread_type); + #endif diff --git a/www/chromium/files/patch-content_common_BUILD.gn b/www/chromium/files/patch-content_common_BUILD.gn index cc827b224fc2..db5d0e046dc6 100644 --- a/www/chromium/files/patch-content_common_BUILD.gn +++ b/www/chromium/files/patch-content_common_BUILD.gn @@ -1,36 +1,36 @@ ---- content/common/BUILD.gn.orig 2024-06-17 12:56:06 UTC +--- content/common/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ content/common/BUILD.gn -@@ -448,19 +448,28 @@ source_set("common") { +@@ -421,19 +421,28 @@ source_set("common") { } if (is_linux || is_chromeos) { - sources += [ - "gpu_pre_sandbox_hook_linux.cc", - "gpu_pre_sandbox_hook_linux.h", - ] + if (is_bsd) { + sources += [ + "gpu_pre_sandbox_hook_bsd.cc", + "gpu_pre_sandbox_hook_bsd.h", + ] + } else { + sources += [ + "gpu_pre_sandbox_hook_linux.cc", + "gpu_pre_sandbox_hook_linux.h", + ] + } public_deps += [ "//sandbox/policy" ] deps += [ ":sandbox_support_linux", "//media/gpu:buildflags", "//sandbox/linux:sandbox_services", - "//sandbox/linux:seccomp_bpf", "//sandbox/policy:chromecast_sandbox_allowlist_buildflags", "//third_party/fontconfig", ] + if (use_seccomp_bpf) { + deps += [ "//sandbox/linux:seccomp_bpf" ] + } if (use_v4l2_codec) { deps += [ "//media/gpu/v4l2" ] } diff --git a/www/chromium/files/patch-content_common_features.cc b/www/chromium/files/patch-content_common_features.cc index 063b67ce091e..f07d5ac74ed8 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-06-17 12:56:06 UTC +--- content/common/features.cc.orig 2024-07-30 11:12:21 UTC +++ content/common/features.cc -@@ -164,7 +164,7 @@ BASE_FEATURE(kEnableBackForwardCacheForOngoingSubframe +@@ -173,7 +173,7 @@ BASE_FEATURE(kEnableBackForwardCacheForOngoingSubframe base::FEATURE_ENABLED_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); -@@ -253,7 +253,7 @@ BASE_FEATURE(kGroupNIKByJoiningOrigin, +@@ -294,7 +294,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 85032f202964..667f4e33c8ec 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-06-17 12:56:06 UTC +--- content/common/features.h.orig 2024-07-30 11:12:21 UTC +++ content/common/features.h -@@ -36,7 +36,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kDocumentPolicyNeg +@@ -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(kEmbeddingRequiresOptIn); -@@ -59,7 +59,7 @@ CONTENT_EXPORT extern const base::FeatureParam +@@ -71,7 +71,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 #if BUILDFLAG(IS_ANDROID) diff --git a/www/chromium/files/patch-content_gpu_gpu__main.cc b/www/chromium/files/patch-content_gpu_gpu__main.cc index 781f7631daa7..ab84c6334c9b 100644 --- a/www/chromium/files/patch-content_gpu_gpu__main.cc +++ b/www/chromium/files/patch-content_gpu_gpu__main.cc @@ -1,73 +1,73 @@ ---- content/gpu/gpu_main.cc.orig 2024-06-17 12:56:06 UTC +--- content/gpu/gpu_main.cc.orig 2024-07-30 11:12:21 UTC +++ content/gpu/gpu_main.cc @@ -94,10 +94,14 @@ #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" +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#else #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "sandbox/policy/sandbox_type.h" #endif -@@ -117,7 +121,7 @@ namespace content { +@@ -116,7 +120,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&); -@@ -182,7 +186,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel +@@ -174,7 +178,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 +295,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -283,7 +287,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 -@@ -313,7 +317,8 @@ int GpuMain(MainFunctionParams parameters) { +@@ -305,7 +309,8 @@ int GpuMain(MainFunctionParams parameters) { base::PlatformThread::SetName("CrGpuMain"); -#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 // thread type change below for the main thread and for thread pool in // ChildProcess constructor. -@@ -443,7 +448,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -435,7 +440,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) { -@@ -483,7 +488,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo +@@ -475,7 +480,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_ppapi__plugin_ppapi__blink__platform__impl.h b/www/chromium/files/patch-content_ppapi__plugin_ppapi__blink__platform__impl.h index cd0f7746c10c..5143ca044cb9 100644 --- a/www/chromium/files/patch-content_ppapi__plugin_ppapi__blink__platform__impl.h +++ b/www/chromium/files/patch-content_ppapi__plugin_ppapi__blink__platform__impl.h @@ -1,11 +1,11 @@ ---- content/ppapi_plugin/ppapi_blink_platform_impl.h.orig 2024-02-23 21:04:38 UTC +--- content/ppapi_plugin/ppapi_blink_platform_impl.h.orig 2024-07-30 11:12:21 UTC +++ content/ppapi_plugin/ppapi_blink_platform_impl.h -@@ -34,7 +34,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImp +@@ -36,7 +36,7 @@ class PpapiBlinkPlatformImpl : public BlinkPlatformImp blink::WebString DefaultLocale() override; private: -#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_ppapi__plugin_ppapi__plugin__main.cc b/www/chromium/files/patch-content_ppapi__plugin_ppapi__plugin__main.cc index 3ec8cccf14fd..1d6f5e0cf92a 100644 --- a/www/chromium/files/patch-content_ppapi__plugin_ppapi__plugin__main.cc +++ b/www/chromium/files/patch-content_ppapi__plugin_ppapi__plugin__main.cc @@ -1,23 +1,23 @@ ---- content/ppapi_plugin/ppapi_plugin_main.cc.orig 2023-08-17 07:33:31 UTC +--- content/ppapi_plugin/ppapi_plugin_main.cc.orig 2024-07-30 11:12:21 UTC +++ content/ppapi_plugin/ppapi_plugin_main.cc -@@ -54,6 +54,11 @@ +@@ -52,6 +52,11 @@ #include "gin/v8_initializer.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#include "sandbox/policy/sandbox_type.h" +#endif + #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) #include #endif -@@ -150,7 +155,7 @@ int PpapiPluginMain(MainFunctionParams parameters) { +@@ -141,7 +146,7 @@ int PpapiPluginMain(MainFunctionParams parameters) { gin::V8Initializer::LoadV8Snapshot(); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox( sandbox::policy::SandboxTypeFromCommandLine(command_line), sandbox::policy::SandboxLinux::PreSandboxHook(), diff --git a/www/chromium/files/patch-content_public_browser_content__browser__client.cc b/www/chromium/files/patch-content_public_browser_content__browser__client.cc index 940b89527f67..bd0bbe1c4c82 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-06-17 12:56:06 UTC +--- content/public/browser/content_browser_client.cc.orig 2024-07-30 11:12:21 UTC +++ content/public/browser/content_browser_client.cc -@@ -1303,7 +1303,7 @@ bool ContentBrowserClient::ShouldRunOutOfProcessSystem +@@ -1307,7 +1307,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 a72b0886b91b..b5c93a3fcc09 100644 --- a/www/chromium/files/patch-content_public_common_content__features.cc +++ b/www/chromium/files/patch-content_public_common_content__features.cc @@ -1,35 +1,35 @@ ---- content/public/common/content_features.cc.orig 2024-06-17 12:56:06 UTC +--- content/public/common/content_features.cc.orig 2024-07-30 11:12:21 UTC +++ content/public/common/content_features.cc -@@ -29,7 +29,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, +@@ -36,7 +36,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, // TODO(crbug.com/40118868): Remove !IS_CHROMEOS_LACROS once lacros starts being // built with OS_CHROMEOS instead of OS_LINUX. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -1076,9 +1076,9 @@ BASE_FEATURE(kWebAssemblyTiering, +@@ -1090,9 +1090,9 @@ 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_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)) && \ + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) && \ defined(ARCH_CPU_ARM64)) base::FEATURE_ENABLED_BY_DEFAULT #else -@@ -1115,7 +1115,11 @@ BASE_FEATURE(kWebUICodeCache, +@@ -1129,7 +1129,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_public_common_content__switches.cc b/www/chromium/files/patch-content_public_common_content__switches.cc index 8877edbd1fcc..f48fd63654c9 100644 --- a/www/chromium/files/patch-content_public_common_content__switches.cc +++ b/www/chromium/files/patch-content_public_common_content__switches.cc @@ -1,20 +1,20 @@ ---- content/public/common/content_switches.cc.orig 2024-06-17 12:56:06 UTC +--- content/public/common/content_switches.cc.orig 2024-07-30 11:12:21 UTC +++ content/public/common/content_switches.cc @@ -352,6 +352,8 @@ const char kEnableIsolatedWebAppsInRenderer[] = // builds. const char kEnableLogging[] = "enable-logging"; +const char kDisableUnveil[] = "disable-unveil"; + // Enables the type, downlinkMax attributes of the NetInfo API. Also, enables // triggering of change attribute of the NetInfo API when there is a change in // the connection type. -@@ -990,7 +992,7 @@ const char kPreventResizingContentsForTesting[] = +@@ -993,7 +995,7 @@ const char kPreventResizingContentsForTesting[] = // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Allows sending text-to-speech requests to speech-dispatcher, a common // Linux speech service. Because it's buggy, the user must explicitly // enable it so that visiting a random webpage can't cause instability. diff --git a/www/chromium/files/patch-content_public_common_content__switches.h b/www/chromium/files/patch-content_public_common_content__switches.h index d084b4eb7764..d6625dc9201b 100644 --- a/www/chromium/files/patch-content_public_common_content__switches.h +++ b/www/chromium/files/patch-content_public_common_content__switches.h @@ -1,19 +1,19 @@ ---- content/public/common/content_switches.h.orig 2024-06-17 12:56:06 UTC +--- content/public/common/content_switches.h.orig 2024-07-30 11:12:21 UTC +++ content/public/common/content_switches.h @@ -111,6 +111,7 @@ CONTENT_EXPORT extern const char kEnableGpuMemoryBuffe CONTENT_EXPORT extern const char kEnableIsolatedWebAppsInRenderer[]; CONTENT_EXPORT extern const char kEnableLCDText[]; CONTENT_EXPORT extern const char kEnableLogging[]; +CONTENT_EXPORT extern const char kDisableUnveil[]; CONTENT_EXPORT extern const char kEnableNetworkInformationDownlinkMax[]; CONTENT_EXPORT extern const char kEnableCanvas2DLayers[]; CONTENT_EXPORT extern const char kEnablePluginPlaceholderTesting[]; -@@ -268,7 +269,7 @@ CONTENT_EXPORT extern const char kPreventResizingConte +@@ -270,7 +271,7 @@ CONTENT_EXPORT extern const char kPreventResizingConte // TODO(crbug.com/40118868): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT extern const char kEnableSpeechDispatcher[]; CONTENT_EXPORT extern const char kLLVMProfileFile[]; #endif 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 8de7b5617061..b38386267590 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-06-17 12:56:06 UTC +--- content/renderer/render_thread_impl.cc.orig 2024-07-30 11:12:21 UTC +++ content/renderer/render_thread_impl.cc -@@ -206,6 +206,8 @@ +@@ -213,6 +213,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif -@@ -1000,7 +1002,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -999,7 +1001,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) && -@@ -1009,7 +1011,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1008,7 +1010,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) && -@@ -1752,7 +1754,7 @@ std::unique_ptr RenderThreadImpl::Create +@@ -1760,7 +1762,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 9b30b60d6a92..ec0d51fa4b2c 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-04-12 16:47:14 UTC +--- content/renderer/renderer_blink_platform_impl.cc.orig 2024-07-30 11:12:21 UTC +++ content/renderer/renderer_blink_platform_impl.cc -@@ -115,7 +115,7 @@ +@@ -120,7 +120,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 -@@ -185,13 +185,13 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -190,13 +190,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()); -@@ -200,7 +200,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -205,7 +205,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( #endif } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (sandboxEnabled()) { #if BUILDFLAG(IS_MAC) sandbox_support_ = std::make_unique(); -@@ -261,7 +261,7 @@ void RendererBlinkPlatformImpl::SetThreadType(base::Pl +@@ -266,7 +266,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 a96e1594ad1d..e063d8cffe7a 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-04-12 16:47:14 UTC +--- content/renderer/renderer_blink_platform_impl.h.orig 2024-07-30 11:12:21 UTC +++ content/renderer/renderer_blink_platform_impl.h -@@ -246,7 +246,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -248,7 +248,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 d217b05156fc..dafb805259d0 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-06-17 12:56:06 UTC +--- content/shell/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ content/shell/BUILD.gn -@@ -1094,7 +1094,7 @@ group("content_shell_crash_test") { +@@ -1099,7 +1099,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_utility_utility__main.cc b/www/chromium/files/patch-content_utility_utility__main.cc index 39ffbfe8fa16..cc6d3d7a61fe 100644 --- a/www/chromium/files/patch-content_utility_utility__main.cc +++ b/www/chromium/files/patch-content_utility_utility__main.cc @@ -1,128 +1,128 @@ ---- content/utility/utility_main.cc.orig 2024-06-17 12:56:06 UTC +--- content/utility/utility_main.cc.orig 2024-07-30 11:12:21 UTC +++ content/utility/utility_main.cc -@@ -38,17 +38,21 @@ - #include "third_party/icu/source/common/unicode/unistr.h" - #include "third_party/icu/source/i18n/unicode/timezone.h" +@@ -36,17 +36,21 @@ + #include "services/screen_ai/buildflags/buildflags.h" + #include "services/tracing/public/cpp/trace_startup.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/file_descriptor_store.h" #include "base/files/file_util.h" #include "base/pickle.h" #include "content/child/sandboxed_process_thread_type_handler.h" +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/common/gpu_pre_sandbox_hook_linux.h" +#endif #include "content/public/common/content_descriptor_keys.h" #include "content/utility/speech/speech_recognition_sandbox_hook_linux.h" #include "gpu/config/gpu_info_collector.h" #include "media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h" +#if !BUILDFLAG(IS_BSD) #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "services/audio/audio_sandbox_hook_linux.h" #include "services/network/network_sandbox_hook_linux.h" // gn check is not smart enough to realize that this include only applies to -@@ -60,10 +64,15 @@ +@@ -58,10 +62,15 @@ #endif #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#include "content/common/gpu_pre_sandbox_hook_bsd.h" +#endif + #if BUILDFLAG(IS_CHROMEOS_ASH) #include "chromeos/ash/components/assistant/buildflags.h" #include "chromeos/ash/services/ime/ime_sandbox_hook.h" -@@ -75,7 +84,7 @@ +@@ -73,7 +82,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if (BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))) #include "services/screen_ai/public/cpp/utilities.h" // nogncheck #include "services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h" // nogncheck #endif -@@ -102,7 +111,7 @@ namespace content { +@@ -100,7 +109,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::vector GetNetworkContextsParentDirectories() { base::MemoryMappedFile::Region region; base::ScopedFD read_pipe_fd = base::FileDescriptorStore::GetInstance().TakeFD( -@@ -129,9 +138,10 @@ std::vector GetNetworkContextsParentDirec +@@ -127,9 +136,10 @@ std::vector GetNetworkContextsParentDirec return dirs; } +#if !BUILDFLAG(IS_BSD) bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox sandbox_type) { const bool obtain_gpu_info = -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoDecoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoEncoding; -@@ -146,6 +156,7 @@ bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox san +@@ -144,6 +154,7 @@ bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox san return false; } +#endif #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) -@@ -250,7 +261,8 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -241,7 +252,8 @@ int UtilityMain(MainFunctionParams parameters) { CHECK(on_device_model::OnDeviceModelService::PreSandboxInit()); } -#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, which may race with -@@ -262,7 +274,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -253,7 +265,7 @@ int UtilityMain(MainFunctionParams parameters) { } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Initializes the sandbox before any threads are created. // TODO(jorgelo): move this after GTK initialization when we enable a strict // Seccomp-BPF policy. -@@ -300,7 +312,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -291,7 +303,7 @@ int UtilityMain(MainFunctionParams parameters) { screen_ai::GetBinaryPathSwitch())); break; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case sandbox::mojom::Sandbox::kHardwareVideoDecoding: pre_sandbox_hook = base::BindOnce(&media::HardwareVideoDecodingPreSandboxHook); -@@ -327,6 +339,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -318,6 +330,7 @@ int UtilityMain(MainFunctionParams parameters) { default: break; } +#if !BUILDFLAG(IS_BSD) if (!sandbox::policy::IsUnsandboxedSandboxType(sandbox_type) && (parameters.zygote_child || !pre_sandbox_hook.is_null())) { sandbox_options.use_amd_specific_policies = -@@ -334,6 +347,11 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -325,6 +338,11 @@ int UtilityMain(MainFunctionParams parameters) { sandbox::policy::Sandbox::Initialize( sandbox_type, std::move(pre_sandbox_hook), sandbox_options); } +#else + sandbox::policy::Sandbox::Initialize( + sandbox_type, std::move(pre_sandbox_hook), + sandbox::policy::SandboxLinux::Options()); +#endif // Start the HangWatcher now that the sandbox is engaged, if it hasn't // already been started. diff --git a/www/chromium/files/patch-content_zygote_zygote__linux.cc b/www/chromium/files/patch-content_zygote_zygote__linux.cc index e93e1f4aabe8..7b96a699367e 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-06-17 12:56:06 UTC +--- content/zygote/zygote_linux.cc.orig 2024-07-30 11:12:21 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" - -@@ -718,3 +719,4 @@ void Zygote::HandleReinitializeLoggingRequest(base::Pi + #ifdef UNSAFE_BUFFERS_BUILD + // TODO(crbug.com/342213636): Remove this and spanify to fix the errors. +@@ -723,3 +724,4 @@ void Zygote::HandleReinitializeLoggingRequest(base::Pi } } // namespace content +#endif 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 de598ab829f8..cd3e51be614d 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-06-17 12:56:06 UTC +--- gpu/command_buffer/service/shared_image/external_vk_image_backing.cc.orig 2024-07-30 11:12:21 UTC +++ gpu/command_buffer/service/shared_image/external_vk_image_backing.cc -@@ -50,7 +50,7 @@ +@@ -51,7 +51,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" -@@ -695,7 +695,7 @@ std::unique_ptr ExternalVkIma +@@ -696,7 +696,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_shared__image__factory.cc b/www/chromium/files/patch-gpu_command__buffer_service_shared__image_shared__image__factory.cc index 7485b7a79566..406a6a5fd467 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-03-22 08:19:40 UTC +--- gpu/command_buffer/service/shared_image/shared_image_factory.cc.orig 2024-07-30 11:12:21 UTC +++ gpu/command_buffer/service/shared_image/shared_image_factory.cc -@@ -144,7 +144,7 @@ gfx::GpuMemoryBufferType GetNativeBufferType() { +@@ -160,7 +160,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 10e09f14f16f..6c5159eec797 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-06-17 12:56:06 UTC +--- gpu/command_buffer/service/shared_image/shared_image_manager.cc.orig 2024-07-30 11:12:21 UTC +++ gpu/command_buffer/service/shared_image/shared_image_manager.cc -@@ -570,7 +570,7 @@ bool SharedImageManager::SupportsScanoutImages() { +@@ -571,7 +571,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_webgpu__decoder__impl.cc b/www/chromium/files/patch-gpu_command__buffer_service_webgpu__decoder__impl.cc index 893b39a18b0e..0e5fd2b92587 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-06-17 12:56:06 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2024-07-30 11:12:21 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1249,7 +1249,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( +@@ -1294,7 +1294,7 @@ WGPUFuture 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) { -@@ -1915,7 +1915,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( +@@ -1967,7 +1967,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__control__list.cc b/www/chromium/files/patch-gpu_config_gpu__control__list.cc index 2308ff445660..10267b587c37 100644 --- a/www/chromium/files/patch-gpu_config_gpu__control__list.cc +++ b/www/chromium/files/patch-gpu_config_gpu__control__list.cc @@ -1,20 +1,20 @@ ---- gpu/config/gpu_control_list.cc.orig 2024-01-30 07:53:34 UTC +--- gpu/config/gpu_control_list.cc.orig 2024-07-30 11:12:21 UTC +++ gpu/config/gpu_control_list.cc @@ -276,7 +276,7 @@ bool GpuControlList::More::GLVersionInfoMismatch( GpuControlList::GLType GpuControlList::More::GetDefaultGLType() { #if BUILDFLAG(IS_CHROMEOS) return kGLTypeGL; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kGLTypeGL; #elif BUILDFLAG(IS_MAC) return kGLTypeGL; -@@ -811,7 +811,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { +@@ -810,7 +810,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { return kOsAndroid; #elif BUILDFLAG(IS_FUCHSIA) return kOsFuchsia; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kOsLinux; #elif BUILDFLAG(IS_MAC) return kOsMacosx; 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 5d162879e0e5..18d5e36e27e2 100644 --- a/www/chromium/files/patch-gpu_config_gpu__finch__features.cc +++ b/www/chromium/files/patch-gpu_config_gpu__finch__features.cc @@ -1,20 +1,20 @@ ---- gpu/config/gpu_finch_features.cc.orig 2024-06-17 12:56:06 UTC +--- gpu/config/gpu_finch_features.cc.orig 2024-07-30 11:12:21 UTC +++ gpu/config/gpu_finch_features.cc -@@ -137,7 +137,7 @@ const base::FeatureParam +@@ -157,7 +157,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) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -150,7 +150,7 @@ BASE_FEATURE(kCanvasOopRasterization, +@@ -170,7 +170,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 0a61f247b75d..41b6e8d15aae 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-05-21 18:07:39 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2024-07-30 11:12:21 UTC +++ gpu/ipc/service/gpu_init.cc @@ -398,7 +398,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 @@ -435,7 +435,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. -@@ -544,7 +544,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -542,7 +542,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 -@@ -626,7 +626,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -624,7 +624,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; -@@ -782,7 +782,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -780,7 +780,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. -@@ -837,7 +837,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -835,7 +835,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 -@@ -1025,7 +1025,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -1023,7 +1023,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 -@@ -1085,7 +1085,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -1083,7 +1083,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-gpu_vulkan_vulkan__device__queue.cc b/www/chromium/files/patch-gpu_vulkan_vulkan__device__queue.cc index 461f5cf700d7..c756abd2c4d6 100644 --- a/www/chromium/files/patch-gpu_vulkan_vulkan__device__queue.cc +++ b/www/chromium/files/patch-gpu_vulkan_vulkan__device__queue.cc @@ -1,20 +1,20 @@ ---- gpu/vulkan/vulkan_device_queue.cc.orig 2024-06-17 12:56:06 UTC +--- gpu/vulkan/vulkan_device_queue.cc.orig 2024-07-30 11:12:21 UTC +++ gpu/vulkan/vulkan_device_queue.cc -@@ -125,7 +125,7 @@ bool VulkanDeviceQueue::Initialize( +@@ -149,7 +149,7 @@ bool VulkanDeviceQueue::Initialize( // In dual-CPU cases, we cannot detect the active GPU correctly on Linux, // so don't select GPU device based on the |gpu_info|. -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) // If gpu_info is provided, the device should match it. if (gpu_info && (device_properties.vendorID != gpu_info->gpu.vendor_id || device_properties.deviceID != gpu_info->gpu.device_id)) { -@@ -268,7 +268,7 @@ bool VulkanDeviceQueue::Initialize( +@@ -292,7 +292,7 @@ bool VulkanDeviceQueue::Initialize( // Android, Fuchsia, Linux, and CrOS (VaapiVideoDecoder) need YCbCr sampler // support. #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!physical_device_info.feature_sampler_ycbcr_conversion) { LOG(ERROR) << "samplerYcbcrConversion is not supported."; return false; diff --git a/www/chromium/files/patch-gpu_vulkan_vulkan__device__queue.h b/www/chromium/files/patch-gpu_vulkan_vulkan__device__queue.h index c50d6fe2c19f..79a8de3dc3df 100644 --- a/www/chromium/files/patch-gpu_vulkan_vulkan__device__queue.h +++ b/www/chromium/files/patch-gpu_vulkan_vulkan__device__queue.h @@ -1,11 +1,11 @@ ---- gpu/vulkan/vulkan_device_queue.h.orig 2024-02-23 21:04:38 UTC +--- gpu/vulkan/vulkan_device_queue.h.orig 2024-07-30 11:12:21 UTC +++ gpu/vulkan/vulkan_device_queue.h -@@ -169,7 +169,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanDeviceQueue - bool allow_protected_memory_ = false; +@@ -179,7 +179,7 @@ class COMPONENT_EXPORT(VULKAN) VulkanDeviceQueue + #endif #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VkPhysicalDeviceSamplerYcbcrConversionFeatures sampler_ycbcr_conversion_features_{ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES}; diff --git a/www/chromium/files/patch-headless_lib_headless__content__main__delegate.cc b/www/chromium/files/patch-headless_lib_headless__content__main__delegate.cc index a595e30a8c47..4e6a3b582d7f 100644 --- a/www/chromium/files/patch-headless_lib_headless__content__main__delegate.cc +++ b/www/chromium/files/patch-headless_lib_headless__content__main__delegate.cc @@ -1,11 +1,11 @@ ---- headless/lib/headless_content_main_delegate.cc.orig 2024-06-17 12:56:06 UTC +--- headless/lib/headless_content_main_delegate.cc.orig 2024-07-30 11:12:21 UTC +++ headless/lib/headless_content_main_delegate.cc -@@ -371,7 +371,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( +@@ -408,7 +408,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( if (process_type != ::switches::kZygoteProcess) { g_headless_crash_client.Pointer()->set_crash_dumps_dir( command_line.GetSwitchValuePath(switches::kCrashDumpsDir)); -#if !BUILDFLAG(IS_WIN) +#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_BSD) crash_reporter::InitializeCrashpad(process_type.empty(), process_type); #endif // !BUILDFLAG(IS_WIN) crash_keys::SetSwitchesFromCommandLine(command_line, nullptr); diff --git a/www/chromium/files/patch-media_audio_BUILD.gn b/www/chromium/files/patch-media_audio_BUILD.gn index 724df812a7e7..fe71e86e7828 100644 --- a/www/chromium/files/patch-media_audio_BUILD.gn +++ b/www/chromium/files/patch-media_audio_BUILD.gn @@ -1,24 +1,27 @@ ---- media/audio/BUILD.gn.orig 2024-02-23 21:04:38 UTC +--- media/audio/BUILD.gn.orig 2024-08-05 14:59:35 UTC +++ media/audio/BUILD.gn -@@ -270,9 +270,20 @@ source_set("audio") { +@@ -270,9 +270,23 @@ source_set("audio") { deps += [ "//media/base/android:media_jni_headers" ] } - if (is_linux || is_chromeos) { -+ if ((is_linux || is_chromeos) && !use_sndio) { ++ if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "linux/audio_manager_linux.cc" ] } + ++ if (is_bsd) { ++ sources += [ "sndio/audio_manager_sndio.cc" ] ++ } ++ + if (use_sndio) { + libs += [ "sndio" ] + sources += [ -+ "sndio/audio_manager_sndio.cc", + "sndio/sndio_input.cc", + "sndio/sndio_input.h", + "sndio/sndio_output.cc", + "sndio/sndio_output.h" + ] + } if (use_alsa) { libs += [ "asound" ] diff --git a/www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc b/www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc index a26dd20d89cf..13d95aa58ba6 100644 --- a/www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc +++ b/www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc @@ -1,54 +1,54 @@ ---- media/audio/alsa/audio_manager_alsa.cc.orig 2022-04-21 18:48:31 UTC +--- media/audio/alsa/audio_manager_alsa.cc.orig 2024-07-30 11:12:21 UTC +++ media/audio/alsa/audio_manager_alsa.cc -@@ -88,7 +88,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType +@@ -95,7 +95,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType int card = -1; - // Loop through the sound cards to get ALSA device hints. -+#if !BUILDFLAG(IS_BSD) + // Loop through the physical sound cards to get ALSA device hints. ++#if !BUILDFLAG(IS_BSD) while (!wrapper_->CardNext(&card) && card >= 0) { +#endif void** hints = NULL; int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); if (!error) { -@@ -100,7 +102,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType +@@ -107,7 +109,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: " << wrapper_->StrError(error); } -+#if !BUILDFLAG(IS_BSD) ++#if !BUILDFLAG(IS_BSD) } +#endif } void AudioManagerAlsa::GetAlsaDevicesInfo(AudioManagerAlsa::StreamType type, -@@ -183,7 +187,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvailable( +@@ -190,7 +194,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvailable( // goes through software conversion if needed (e.g. incompatible // sample rate). // TODO(joi): Should we prefer "hw" instead? +#if BUILDFLAG(IS_BSD) + static const char kDeviceTypeDesired[] = "plug"; +#else static const char kDeviceTypeDesired[] = "plughw"; +#endif return strncmp(kDeviceTypeDesired, device_name, std::size(kDeviceTypeDesired) - 1) == 0; } -@@ -205,7 +213,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( +@@ -242,7 +250,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( // Loop through the sound cards. // Don't use snd_device_name_hint(-1,..) since there is an access violation // inside this ALSA API with libasound.so.2.0.0. +#if !BUILDFLAG(IS_BSD) while (!wrapper_->CardNext(&card) && (card >= 0) && !has_device) { +#endif int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); if (!error) { for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) { -@@ -229,7 +239,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( +@@ -266,7 +276,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: " << wrapper_->StrError(error); } +#if !BUILDFLAG(IS_BSD) } +#endif return has_device; } diff --git a/www/chromium/files/patch-media_audio_sndio_audio__manager__sndio.cc b/www/chromium/files/patch-media_audio_sndio_audio__manager__sndio.cc index e0c9e4d79afa..67902e92d5c1 100644 --- a/www/chromium/files/patch-media_audio_sndio_audio__manager__sndio.cc +++ b/www/chromium/files/patch-media_audio_sndio_audio__manager__sndio.cc @@ -1,244 +1,216 @@ ---- media/audio/sndio/audio_manager_sndio.cc.orig 2024-06-26 15:43:18 UTC +--- media/audio/sndio/audio_manager_sndio.cc.orig 2024-07-30 11:12:21 UTC +++ media/audio/sndio/audio_manager_sndio.cc -@@ -0,0 +1,241 @@ +@@ -0,0 +1,213 @@ +// 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 "base/command_line.h" +#include "base/metrics/histogram_macros.h" +#include "base/memory/ptr_util.h" + +#include "media/audio/sndio/audio_manager_sndio.h" + +#include "media/audio/audio_device_description.h" +#include "media/audio/audio_output_dispatcher.h" +#if defined(USE_SNDIO) +#include "media/audio/sndio/sndio_input.h" +#include "media/audio/sndio/sndio_output.h" +#endif +#if defined(USE_PULSEAUDIO) +#include "media/audio/pulse/audio_manager_pulse.h" +#include "media/audio/pulse/pulse_util.h" +#endif +#if defined(USE_ALSA) +#include "media/audio/alsa/audio_manager_alsa.h" +#endif +#include "media/audio/fake_audio_manager.h" +#include "media/base/limits.h" +#include "media/base/media_switches.h" + +namespace media { + +#if defined(USE_SNDIO) +// Maximum number of output streams that can be open simultaneously. +static const int kMaxOutputStreams = 50; + +// Default sample rate for input and output streams. +static const int kDefaultSampleRate = 48000; + -+#if BUILDFLAG(IS_OPENBSD) -+static const std::string kDefaultAudioBackend = "sndio"; -+#else -+static const std::string kDefaultAudioBackend = "auto"; -+#endif -+ +void AddDefaultDevice(AudioDeviceNames* device_names) { + DCHECK(device_names->empty()); + device_names->push_front(AudioDeviceName::CreateDefault()); +} + +bool AudioManagerSndio::HasAudioOutputDevices() { + return true; +} + +bool AudioManagerSndio::HasAudioInputDevices() { + return true; +} + +void AudioManagerSndio::GetAudioInputDeviceNames( + AudioDeviceNames* device_names) { + DCHECK(device_names->empty()); + AddDefaultDevice(device_names); +} + +void AudioManagerSndio::GetAudioOutputDeviceNames( + AudioDeviceNames* device_names) { + AddDefaultDevice(device_names); +} + +#if defined(USE_SNDIO) +const char* AudioManagerSndio::GetName() { + return "SNDIO"; +} +#endif + +AudioParameters AudioManagerSndio::GetInputStreamParameters( + const std::string& device_id) { + static const int kDefaultInputBufferSize = 1024; + + int user_buffer_size = GetUserBufferSize(); + int buffer_size = user_buffer_size ? + user_buffer_size : kDefaultInputBufferSize; + + return AudioParameters( + AudioParameters::AUDIO_PCM_LOW_LATENCY, ChannelLayoutConfig::Stereo(), + kDefaultSampleRate, buffer_size); +} + +AudioManagerSndio::AudioManagerSndio(std::unique_ptr audio_thread, + AudioLogFactory* audio_log_factory) + : AudioManagerBase(std::move(audio_thread), + audio_log_factory) { + DLOG(WARNING) << "AudioManagerSndio"; + SetMaxOutputStreamsAllowed(kMaxOutputStreams); +} + +AudioManagerSndio::~AudioManagerSndio() = default; + +AudioOutputStream* AudioManagerSndio::MakeLinearOutputStream( + const AudioParameters& params, + const LogCallback& log_callback) { + DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); + return MakeOutputStream(params); +} + +AudioOutputStream* AudioManagerSndio::MakeLowLatencyOutputStream( + const AudioParameters& params, + const std::string& device_id, + const LogCallback& log_callback) { + DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!"; + DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); + return MakeOutputStream(params); +} + +AudioInputStream* AudioManagerSndio::MakeLinearInputStream( + const AudioParameters& params, + const std::string& device_id, + const LogCallback& log_callback) { + DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format()); + return MakeInputStream(params); +} + +AudioInputStream* AudioManagerSndio::MakeLowLatencyInputStream( + const AudioParameters& params, + const std::string& device_id, + const LogCallback& log_callback) { + DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); + return MakeInputStream(params); +} + +AudioParameters AudioManagerSndio::GetPreferredOutputStreamParameters( + const std::string& output_device_id, + const AudioParameters& input_params) { + // TODO(tommi): Support |output_device_id|. + DLOG_IF(ERROR, !output_device_id.empty()) << "Not implemented!"; + static const int kDefaultOutputBufferSize = 2048; + + ChannelLayoutConfig channel_layout_config = ChannelLayoutConfig::Stereo(); + int sample_rate = kDefaultSampleRate; + int buffer_size = kDefaultOutputBufferSize; + if (input_params.IsValid()) { + sample_rate = input_params.sample_rate(); + channel_layout_config = input_params.channel_layout_config(); + buffer_size = std::min(buffer_size, input_params.frames_per_buffer()); + } + + int user_buffer_size = GetUserBufferSize(); + if (user_buffer_size) + buffer_size = user_buffer_size; + + return AudioParameters( + AudioParameters::AUDIO_PCM_LOW_LATENCY, + channel_layout_config, sample_rate, buffer_size); +} + +AudioInputStream* AudioManagerSndio::MakeInputStream( + const AudioParameters& params) { + DLOG(WARNING) << "MakeInputStream"; + return new SndioAudioInputStream(this, + AudioDeviceDescription::kDefaultDeviceId, params); +} + +AudioOutputStream* AudioManagerSndio::MakeOutputStream( + const AudioParameters& params) { + DLOG(WARNING) << "MakeOutputStream"; + return new SndioAudioOutputStream(params, this); +} +#endif + +std::unique_ptr CreateAudioManager( + std::unique_ptr audio_thread, + AudioLogFactory* audio_log_factory) { + DLOG(WARNING) << "CreateAudioManager"; -+ std::string audio_backend = kDefaultAudioBackend; -+ -+ std::vector kSupportedAudioBackends = {"auto"}; -+ -+#if defined(USE_SNDIO) -+ kSupportedAudioBackends.push_back(std::string("sndio")); -+#endif -+#if defined(USE_PULSEAUDIO) -+ kSupportedAudioBackends.push_back(std::string("pulse")); -+#endif -+#if defined(USE_ALSA) -+ kSupportedAudioBackends.push_back(std::string("alsa")); -+#endif + -+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( -+ switches::kAudioBackend)) { -+ audio_backend = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( -+ switches::kAudioBackend); -+ } ++ auto _ab = kAudioBackendParam.Get(); + + // For testing allow audio output to be disabled. + if (base::CommandLine::ForCurrentProcess()->HasSwitch( -+ switches::kDisableAudioOutput)) { ++ switches::kDisableAudioOutput) || ++ !base::FeatureList::IsEnabled(media::kAudioBackend)) { + return std::make_unique(std::move(audio_thread), + audio_log_factory); + } + -+ if (std::find(std::begin(kSupportedAudioBackends), std::end(kSupportedAudioBackends), -+ audio_backend) == std::end(kSupportedAudioBackends)) { -+ LOG(ERROR) << "Unsupported audio backend specified. Falling back to " << kDefaultAudioBackend; -+ audio_backend = kDefaultAudioBackend; -+ } -+ +#if defined(USE_PULSEAUDIO) + pa_threaded_mainloop* pa_mainloop = nullptr; + pa_context* pa_context = nullptr; -+ if ((audio_backend != "sndio" && audio_backend != "alsa") && -+ pulse::InitPulse(&pa_mainloop, &pa_context)) { ++ if (_ab != AudioBackend::kSndio && _ab != AudioBackend::kAlsa && ++ pulse::InitPulse(&pa_mainloop, &pa_context)) { + return std::make_unique( + std::move(audio_thread), audio_log_factory, pa_mainloop, pa_context); -+ } else if (audio_backend == "auto") { ++ } else if (_ab == AudioBackend::kAuto) { + LOG(WARNING) << "Falling back to SNDIO for audio output. PulseAudio is not " + "available or could not be initialized."; + } +#endif + +#if defined(USE_SNDIO) -+ if (audio_backend != "pulse" && audio_backend != "alsa") { ++ if (_ab != AudioBackend::kPulseAudio && _ab != AudioBackend::kAlsa) { + return std::make_unique(std::move(audio_thread), + audio_log_factory); -+ } else if (audio_backend == "auto") { ++ } else if (_ab == AudioBackend::kAuto) { + LOG(WARNING) << "Falling back to ALSA audio output. SNDIO is not " + "available or could not be initialized."; + } +#endif + +#if defined(USE_ALSA) -+ if (audio_backend != "pulse" && audio_backend != "sndio") { ++ if (_ab != AudioBackend::kPulseAudio && _ab != AudioBackend::kSndio) { + return std::make_unique(std::move(audio_thread), + audio_log_factory); -+ } else if (audio_backend == "auto") { ++ } else if (_ab == AudioBackend::kAuto) { + LOG(WARNING) << "Falling back to fake audio output. ALSA is not " + "available or could not be initialized."; + } +#endif + + return std::make_unique(std::move(audio_thread), + audio_log_factory); +} + +} // 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 5f76a6831de6..e53b006a996a 100644 --- a/www/chromium/files/patch-media_base_media__switches.cc +++ b/www/chromium/files/patch-media_base_media__switches.cc @@ -1,114 +1,132 @@ ---- media/base/media_switches.cc.orig 2024-06-18 16:34:35 UTC +--- media/base/media_switches.cc.orig 2024-07-30 11:12:21 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 -@@ -60,6 +60,10 @@ const char kDisableBackgroundMediaSuspend[] = - const char kReportVp9AsAnUnsupportedMimeType[] = - "report-vp9-as-an-unsupported-mime-type"; - -+#if BUILDFLAG(IS_BSD) -+const char kAudioBackend[] = "audio-backend"; -+#endif -+ - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \ - BUILDFLAG(IS_SOLARIS) - // The Alsa device to use when opening an audio input stream. -@@ -368,8 +372,8 @@ BASE_FEATURE(kMacLoopbackAudioForScreenShare, +@@ -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", -@@ -688,7 +692,7 @@ BASE_FEATURE(kFallbackAfterDecodeError, +@@ -379,6 +379,28 @@ BASE_FEATURE(kPulseaudioLoopbackForCast, + BASE_FEATURE(kPulseaudioLoopbackForScreenShare, + "PulseaudioLoopbackForScreenShare", + base::FEATURE_DISABLED_BY_DEFAULT); ++ ++BASE_FEATURE(kAudioBackend, ++ "AudioBackend", ++ base::FEATURE_ENABLED_BY_DEFAULT); ++ ++constexpr base::FeatureParam::Option ++ kAudioBackendOptions[] = { ++ {AudioBackend::kAuto, ++ "auto"}, ++ {AudioBackend::kPulseAudio, "pulseaudio"}, ++ {AudioBackend::kSndio, "sndio"}, ++ {AudioBackend::kAlsa, "alsa"}}; ++ ++const base::FeatureParam ++ kAudioBackendParam{ ++ &kAudioBackend, "audio-backend", ++#if BUILDFLAG(IS_OPENBSD) ++ AudioBackend::kSndio, ++#elif BUILDFLAG(IS_FREEBSD) ++ AudioBackend::kAuto, ++#endif ++ &kAudioBackendOptions}; + #endif // BUILDFLAG(IS_LINUX) + + // When enabled, MediaCapabilities will check with GPU Video Accelerator +@@ -677,7 +699,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 -@@ -716,7 +720,7 @@ BASE_FEATURE(kGlobalMediaControlsUpdatedUI, +@@ -705,7 +727,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 -@@ -728,7 +732,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, +@@ -717,7 +739,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 -@@ -757,7 +761,7 @@ BASE_FEATURE(kUnifiedAutoplay, +@@ -746,7 +768,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, -@@ -848,7 +852,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, +@@ -837,7 +859,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, "VaapiVp9SModeHWEncoding", base::FEATURE_ENABLED_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 V4L2 flat video decoder clients instead of V4L2VideoDecoder. // Owners: frkoenig@chromium.org, mcasas@chromium.org // Expiry: When flat decoders are supported on all platforms and the legacy -@@ -978,7 +982,7 @@ BASE_FEATURE(kLiveCaptionUseWaitK, +@@ -963,7 +985,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 -@@ -1008,7 +1012,7 @@ BASE_FEATURE(kLiveCaptionWebAudio, +@@ -993,7 +1015,7 @@ BASE_FEATURE(kLiveCaptionWebAudio, // Live Translate translates captions generated by Live Caption. BASE_FEATURE(kLiveTranslate, "LiveTranslate", -#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 -@@ -1472,7 +1476,7 @@ BASE_FEATURE(kUseGTFOOutOfProcessVideoDecoding, +@@ -1457,7 +1479,7 @@ BASE_FEATURE(kUseGTFOOutOfProcessVideoDecoding, base::FEATURE_DISABLED_BY_DEFAULT); #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, -@@ -1552,7 +1556,7 @@ BASE_FEATURE(kRecordWebAudioEngagement, +@@ -1537,7 +1559,7 @@ BASE_FEATURE(kRecordWebAudioEngagement, "RecordWebAudioEngagement", base::FEATURE_ENABLED_BY_DEFAULT); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Reduces the number of buffers needed in the output video frame pool to // populate the Renderer pipeline for hardware accelerated VideoDecoder in // non-low latency scenarios. diff --git a/www/chromium/files/patch-media_base_media__switches.h b/www/chromium/files/patch-media_base_media__switches.h index c631bc427942..81972de20dd7 100644 --- a/www/chromium/files/patch-media_base_media__switches.h +++ b/www/chromium/files/patch-media_base_media__switches.h @@ -1,56 +1,57 @@ ---- media/base/media_switches.h.orig 2024-06-18 16:34:35 UTC +--- media/base/media_switches.h.orig 2024-07-30 11:12:21 UTC +++ media/base/media_switches.h -@@ -43,6 +43,10 @@ MEDIA_EXPORT extern const char kDisableBackgroundMedia - - MEDIA_EXPORT extern const char kReportVp9AsAnUnsupportedMimeType[]; - -+#if BUILDFLAG(IS_BSD) -+MEDIA_EXPORT extern const char kAudioBackend[]; -+#endif -+ - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FREEBSD) || \ - BUILDFLAG(IS_SOLARIS) - MEDIA_EXPORT extern const char kAlsaInputDevice[]; -@@ -324,13 +328,13 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kPlatformHEVCEncoder +@@ -325,13 +325,25 @@ 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); ++ ++enum class AudioBackend { ++ kAuto, ++ kPulseAudio, ++ kSndio, ++ kAlsa ++}; ++ ++MEDIA_EXPORT BASE_DECLARE_FEATURE(kAudioBackend); ++MEDIA_EXPORT extern const base::FeatureParam< ++ AudioBackend> ++ kAudioBackendParam; #endif // BUILDFLAG(IS_LINUX) MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordMediaEngagementScores); MEDIA_EXPORT BASE_DECLARE_FEATURE(kRecordWebAudioEngagement); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kReduceHardwareVideoDecoderBuffers); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) MEDIA_EXPORT BASE_DECLARE_FEATURE(kResumeBackgroundVideo); -@@ -345,7 +349,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUnifiedAutoplay); +@@ -346,7 +358,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); -@@ -364,7 +368,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLa +@@ -365,7 +377,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(kV4L2FlatVideoDecoder); MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -506,7 +510,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVide +@@ -504,7 +516,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVide MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseGTFOOutOfProcessVideoDecoding); #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 cdcc6ce06f92..a76e1278d40c 100644 --- a/www/chromium/files/patch-media_base_video__frame.cc +++ b/www/chromium/files/patch-media_base_video__frame.cc @@ -1,74 +1,56 @@ ---- media/base/video_frame.cc.orig 2024-06-17 12:56:06 UTC +--- media/base/video_frame.cc.orig 2024-07-30 11:12:21 UTC +++ media/base/video_frame.cc -@@ -80,7 +80,7 @@ std::string VideoFrame::StorageTypeToString( +@@ -81,7 +81,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( +@@ -96,7 +96,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 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 -@@ -440,7 +440,7 @@ scoped_refptr VideoFrame::CreateFrameForGp +@@ -432,7 +432,7 @@ scoped_refptr VideoFrame::CreateFrameForGp 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() || -@@ -778,7 +778,7 @@ scoped_refptr VideoFrame::WrapExternalGpuM +@@ -806,7 +806,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( + scoped_refptr VideoFrame::WrapUnownedExternalDmabufs( const VideoFrameLayout& layout, -@@ -997,7 +997,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_; -@@ -1471,7 +1471,7 @@ scoped_refptr VideoFrame::shar +@@ -1555,7 +1555,7 @@ scoped_refptr VideoFrame::shar : shared_images_[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(); - } -@@ -1588,7 +1588,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 (wrapped_frame_) { + return wrapped_frame_->NumDmabufFds(); +@@ -1699,7 +1699,7 @@ VideoFrame::~VideoFrame() { + // Prevents dangling raw ptr, see https://docs.google.com/document/d/156O7kBZqIhe1dUcqTMcN5T-6YEAcg0yNnj5QlnZu9xU/edit?usp=sharing. + shm_region_ = nullptr; + -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - dmabuf_fds_(base::MakeRefCounted()), + // Prevents dangling dmabuf fds. + dmabuf_fds_.clear(); #endif - timestamp_(timestamp), diff --git a/www/chromium/files/patch-media_base_video__frame.h b/www/chromium/files/patch-media_base_video__frame.h index 3e551dd31588..03210cab3bce 100644 --- a/www/chromium/files/patch-media_base_video__frame.h +++ b/www/chromium/files/patch-media_base_video__frame.h @@ -1,47 +1,47 @@ ---- media/base/video_frame.h.orig 2024-06-17 12:56:06 UTC +--- media/base/video_frame.h.orig 2024-07-30 11:12:21 UTC +++ media/base/video_frame.h @@ -45,7 +45,7 @@ #include "base/apple/scoped_cftyperef.h" #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/files/scoped_file.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -111,7 +111,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte STORAGE_UNOWNED_MEMORY = 2, // External, non owned data pointers. STORAGE_OWNED_MEMORY = 3, // VideoFrame has allocated its own data buffer. STORAGE_SHMEM = 4, // Backed by read-only shared memory. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(mcasas): Consider turning this type into STORAGE_NATIVE // based on the idea of using this same enum value for both DMA // buffers on Linux and CVPixelBuffers on Mac (which currently use -@@ -341,7 +341,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte +@@ -386,7 +386,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte ReleaseMailboxAndGpuMemoryBufferCB mailbox_holder_and_gmb_release_cb, base::TimeDelta timestamp); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Wraps provided dmabufs // (https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html) with a - // VideoFrame. The frame will take ownership of |dmabuf_fds|, and will -@@ -650,7 +650,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte + // VideoFrame. +@@ -719,7 +719,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte scoped_refptr shared_image( size_t texture_index) const; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The number of DmaBufs will be equal or less than the number of planes of // the frame. If there are less, this means that the last FD contains the // remaining planes. Should be > 0 for STORAGE_DMABUFS. -@@ -886,7 +886,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte - // GPU memory buffer, if this frame is STORAGE_GPU_MEMORY_BUFFER. - std::unique_ptr gpu_memory_buffer_; +@@ -950,7 +950,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCounte + // For now it's set to false always until clients starts using it. + const bool is_mappable_si_enabled_ = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - class DmabufHolder; // Dmabufs for the frame, used when storage is STORAGE_DMABUFS. Size is either + // equal or less than the number of planes of the frame. If it is less, then diff --git a/www/chromium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc b/www/chromium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc index 21a637af00b0..8af6d80221d6 100644 --- a/www/chromium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc +++ b/www/chromium/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc @@ -1,156 +1,156 @@ ---- media/capture/video/linux/v4l2_capture_delegate.cc.orig 2024-02-23 21:04:38 UTC +--- media/capture/video/linux/v4l2_capture_delegate.cc.orig 2024-07-30 11:12:21 UTC +++ media/capture/video/linux/v4l2_capture_delegate.cc @@ -5,8 +5,10 @@ #include "media/capture/video/linux/v4l2_capture_delegate.h" #include +#if !BUILDFLAG(IS_BSD) #include #include +#endif #include #include #include @@ -27,17 +29,19 @@ #include "media/capture/video/blob_utils.h" #include "media/capture/video/linux/video_capture_device_linux.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "media/capture/capture_switches.h" #include "media/capture/video/linux/v4l2_capture_delegate_gpu_helper.h" #endif // BUILDFLAG(IS_LINUX) using media::mojom::MeteringMode; +#if !BUILDFLAG(IS_BSD) #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) // 16 bit depth, Realsense F200. #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') #endif +#endif // TODO(aleksandar.stojiljkovic): Wrap this with kernel version check once the // format is introduced to kernel. @@ -47,6 +51,14 @@ using media::mojom::MeteringMode; #define V4L2_PIX_FMT_INVZ v4l2_fourcc('I', 'N', 'V', 'Z') #endif +#ifndef V4L2_COLORSPACE_OPRGB +#define V4L2_COLORSPACE_OPRGB V4L2_COLORSPACE_ADOBERGB +#endif + +#ifndef V4L2_XFER_FUNC_OPRGB +#define V4L2_XFER_FUNC_OPRGB V4L2_XFER_FUNC_ADOBERGB +#endif + namespace media { namespace { @@ -264,7 +276,7 @@ bool V4L2CaptureDelegate::IsBlockedControl(int control // static bool V4L2CaptureDelegate::IsControllableControl( int control_id, - const base::RepeatingCallback& do_ioctl) { + const base::RepeatingCallback& do_ioctl) { const int special_control_id = GetControllingSpecialControl(control_id); if (!special_control_id) { // The control is not controlled by a special control thus the control is @@ -320,7 +332,7 @@ V4L2CaptureDelegate::V4L2CaptureDelegate( is_capturing_(false), timeout_count_(0), rotation_(rotation) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) use_gpu_buffer_ = switches::IsVideoCaptureUseGpuMemoryBufferEnabled(); #endif // BUILDFLAG(IS_LINUX) } @@ -447,7 +459,7 @@ void V4L2CaptureDelegate::AllocateAndStart( client_->OnStarted(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (use_gpu_buffer_) { v4l2_gpu_helper_ = std::make_unique( std::move(gmb_support_test_)); @@ -797,7 +809,7 @@ void V4L2CaptureDelegate::SetGPUEnvironmentForTesting( V4L2CaptureDelegate::~V4L2CaptureDelegate() = default; -bool V4L2CaptureDelegate::RunIoctl(int request, void* argp) { +bool V4L2CaptureDelegate::RunIoctl(unsigned int request, void* argp) { int num_retries = 0; for (; DoIoctl(request, argp) < 0 && num_retries < kMaxIOCtrlRetries; ++num_retries) { @@ -807,7 +819,7 @@ bool V4L2CaptureDelegate::RunIoctl(int request, void* return num_retries != kMaxIOCtrlRetries; } -int V4L2CaptureDelegate::DoIoctl(int request, void* argp) { +int V4L2CaptureDelegate::DoIoctl(unsigned int request, void* argp) { return HANDLE_EINTR(v4l2_->ioctl(device_fd_.get(), request, argp)); } @@ -818,6 +830,7 @@ bool V4L2CaptureDelegate::IsControllableControl(int co } void V4L2CaptureDelegate::ReplaceControlEventSubscriptions() { +#if !BUILDFLAG(IS_BSD) constexpr uint32_t kControlIds[] = {V4L2_CID_AUTO_EXPOSURE_BIAS, V4L2_CID_AUTO_WHITE_BALANCE, V4L2_CID_BRIGHTNESS, @@ -845,6 +858,7 @@ void V4L2CaptureDelegate::ReplaceControlEventSubscript << ", {type = V4L2_EVENT_CTRL, id = " << control_id << "}"; } } +#endif } mojom::RangePtr V4L2CaptureDelegate::RetrieveUserControlRange(int control_id) { @@ -1025,7 +1039,11 @@ void V4L2CaptureDelegate::DoCapture() { pollfd device_pfd = {}; device_pfd.fd = device_fd_.get(); +#if !BUILDFLAG(IS_BSD) device_pfd.events = POLLIN | POLLPRI; +#else + device_pfd.events = POLLIN; +#endif const int result = HANDLE_EINTR(v4l2_->poll(&device_pfd, 1, kCaptureTimeoutMs)); @@ -1063,6 +1081,7 @@ void V4L2CaptureDelegate::DoCapture() { timeout_count_ = 0; } +#if !BUILDFLAG(IS_BSD) // Dequeue events if the driver has filled in some. if (device_pfd.revents & POLLPRI) { bool controls_changed = false; -@@ -1097,6 +1116,7 @@ void V4L2CaptureDelegate::DoCapture() { +@@ -1098,6 +1117,7 @@ void V4L2CaptureDelegate::DoCapture() { client_->OnCaptureConfigurationChanged(); } } +#endif // Deenqueue, send and reenqueue a buffer if the driver has filled one in. if (device_pfd.revents & POLLIN) { -@@ -1150,7 +1170,7 @@ void V4L2CaptureDelegate::DoCapture() { +@@ -1151,7 +1171,7 @@ void V4L2CaptureDelegate::DoCapture() { // workable on Linux. // See http://crbug.com/959919. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (use_gpu_buffer_) { v4l2_gpu_helper_->OnIncomingCapturedData( client_.get(), buffer_tracker->start(), -@@ -1223,7 +1243,7 @@ void V4L2CaptureDelegate::SetErrorState(VideoCaptureEr +@@ -1224,7 +1244,7 @@ void V4L2CaptureDelegate::SetErrorState(VideoCaptureEr client_->OnError(error, from_here, reason); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::ColorSpace V4L2CaptureDelegate::BuildColorSpaceFromv4l2() { v4l2_colorspace v4l2_primary = (v4l2_colorspace)video_fmt_.fmt.pix.colorspace; v4l2_quantization v4l2_range = diff --git a/www/chromium/files/patch-media_ffmpeg_scripts_build__ffmpeg.py b/www/chromium/files/patch-media_ffmpeg_scripts_build__ffmpeg.py index 7a1005537338..fa92847848e2 100644 --- a/www/chromium/files/patch-media_ffmpeg_scripts_build__ffmpeg.py +++ b/www/chromium/files/patch-media_ffmpeg_scripts_build__ffmpeg.py @@ -1,83 +1,66 @@ ---- media/ffmpeg/scripts/build_ffmpeg.py.orig 2024-05-27 14:01:28 UTC +--- media/ffmpeg/scripts/build_ffmpeg.py.orig 2024-07-30 11:12:21 UTC +++ media/ffmpeg/scripts/build_ffmpeg.py @@ -33,7 +33,7 @@ NDK_ROOT_DIR = os.path.abspath( SUCCESS_TOKEN = 'THIS_BUILD_WORKED' sys.path.append(os.path.join(CHROMIUM_ROOT_DIR, 'build')) -import gn_helpers +#import gn_helpers BRANDINGS = [ 'Chrome', -@@ -44,6 +44,8 @@ BRANDINGS = [ +@@ -43,6 +43,8 @@ BRANDINGS = [ ARCH_MAP = { 'android': ['ia32', 'x64', 'arm-neon', 'arm64'], 'linux': ['ia32', 'x64', 'noasm-x64', 'arm', 'arm-neon', 'arm64'], + 'openbsd': ['x64', 'arm64', 'ia32'], + 'freebsd': ['x64', 'arm64', 'ia32'], 'mac': ['x64', 'arm64'], 'win': ['ia32', 'x64', 'arm64'], } -@@ -123,7 +125,7 @@ def PrintAndCheckCall(argv, *args, **kwargs): +@@ -122,7 +124,7 @@ def PrintAndCheckCall(argv, *args, **kwargs): def GetDsoName(target_os, dso_name, dso_version): - if target_os in ('linux', 'linux-noasm', 'android'): + if target_os in ('linux', 'linux-noasm', 'android', 'openbsd', 'freebsd'): return 'lib%s.so.%s' % (dso_name, dso_version) elif target_os == 'mac': return 'lib%s.%s.dylib' % (dso_name, dso_version) -@@ -476,7 +478,7 @@ def BuildFFmpeg(target_os, target_arch, host_os, host_ +@@ -475,7 +477,7 @@ def BuildFFmpeg(target_os, target_arch, host_os, host_ # removing soon, so this is needed to silence a deprecation # #warning which will be converted to an error via -Werror. # There is also no prctl.h - if target_os in ['linux', 'linux-noasm']: + if target_os in ['linux', 'linux-noasm', 'openbsd', 'freebsd']: pre_make_rewrites += [ (r'(#define HAVE_SYSCTL [01])', r'#define HAVE_SYSCTL 0 /* \1 -- forced to 0 for Fuchsia */'), -@@ -599,7 +601,7 @@ def main(argv): +@@ -598,7 +600,7 @@ def main(argv): configure_args = args[2:] if target_os not in ('android', 'linux', 'linux-noasm', 'mac', 'win', - 'all'): + 'all', 'openbsd', 'freebsd'): parser.print_help() return 1 -@@ -672,7 +674,6 @@ def ConfigureAndBuild(target_arch, target_os, host_os, - '--disable-securetransport', - '--disable-faan', - '--disable-alsa', -- '--disable-iamf', - - # Disable automatically detected external libraries. This prevents - # automatic inclusion of things like hardware decoders. Each roll should -@@ -713,7 +714,7 @@ def ConfigureAndBuild(target_arch, target_os, host_os, +@@ -712,7 +714,7 @@ def ConfigureAndBuild(target_arch, target_os, host_os, '--optflags="-O2"', ]) - if target_os in ('linux', 'linux-noasm', 'android'): + if target_os in ('linux', 'linux-noasm', 'android', 'openbsd', 'freebsd'): if target_arch == 'x64': if target_os == 'android': configure_flags['Common'].extend([ -@@ -828,9 +829,6 @@ def ConfigureAndBuild(target_arch, target_os, host_os, +@@ -827,9 +829,6 @@ def ConfigureAndBuild(target_arch, target_os, host_os, configure_flags['Common'].extend([ '--target-os=linux', - '--sysroot=' + - os.path.join(CHROMIUM_ROOT_DIR, - 'build/linux/debian_bullseye_arm64-sysroot'), # See crbug.com/1467681. These could be removed eventually '--disable-dotprod', '--disable-i8mm', -@@ -1034,7 +1032,7 @@ def ConfigureAndBuild(target_arch, target_os, host_os, - 'Chrome', configure_flags['Common'] + - configure_flags['ChromeAndroid'] + configure_args) - -- if target_os in ['linux', 'linux-noasm']: -+ if target_os in ['linux', 'linux-noasm', 'openbsd', 'freebsd']: - # ChromeOS enables MPEG4 which requires error resilience :( - chrome_os_flags = (configure_flags['Common'] + - configure_flags['Chrome'] + 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 523578c98f7c..2f5daaf3c5d6 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-05-21 18:07:39 UTC +--- media/gpu/chromeos/mailbox_video_frame_converter.cc.orig 2024-07-30 11:12:21 UTC +++ media/gpu/chromeos/mailbox_video_frame_converter.cc -@@ -65,7 +65,7 @@ viz::SharedImageFormat GetSharedImageFormat(gfx::Buffe +@@ -67,7 +67,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_video__decoder__pipeline.cc b/www/chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc index 962075437728..f67e5a91b2b3 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,29 +1,29 @@ ---- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2024-06-17 12:56:06 UTC +--- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2024-07-30 11:12:21 UTC +++ media/gpu/chromeos/video_decoder_pipeline.cc -@@ -1097,7 +1097,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1098,7 +1098,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()); -@@ -1106,7 +1106,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1107,7 +1107,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( // VideoFrame::StorageType of VideoFrame::STORAGE_DMABUFS. main_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator( *allocator, VideoFrame::STORAGE_DMABUFS); -#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 -@@ -1294,7 +1294,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1295,7 +1295,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) // The custom allocator creates frames backed by NativePixmap, which uses a // VideoFrame::StorageType of VideoFrame::STORAGE_DMABUFS. auxiliary_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator( 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 d74f6268ac80..8f7bfcdd704d 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-06-17 12:56:06 UTC +--- media/gpu/vaapi/vaapi_wrapper.cc.orig 2024-07-30 11:12:21 UTC +++ media/gpu/vaapi/vaapi_wrapper.cc -@@ -71,7 +71,7 @@ +@@ -72,7 +72,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 797279e08afe..716b0e5549db 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-06-17 12:56:06 UTC +--- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2024-07-30 11:12:21 UTC +++ media/video/gpu_memory_buffer_video_frame_pool.cc -@@ -758,7 +758,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa +@@ -107,7 +107,7 @@ class GpuMemoryBufferVideoFramePool::PoolImpl + gpu::SHARED_IMAGE_USAGE_RASTER_READ | + 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/40194712): Always add the flag once the + // OzoneImageBacking is by default turned on. + if (base::CommandLine::ForCurrentProcess()->HasSwitch( +@@ -802,7 +802,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 -@@ -1234,7 +1234,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo - gpu_memory_buffer->CloneHandle().io_surface.get()); +@@ -1347,7 +1347,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo + media::IOSurfaceIsWebGPUCompatible(handle.io_surface.get()); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) is_webgpu_compatible = - gpu_memory_buffer->CloneHandle() - .native_pixmap_handle.supports_zero_copy_webgpu_import; -@@ -1250,7 +1250,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/40194712): Always add the flag once the - // OzoneImageBacking is by default turned on. - if (base::CommandLine::ForCurrentProcess()->HasSwitch( + handle.native_pixmap_handle.supports_zero_copy_webgpu_import; + #endif 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 391655c3ac5c..a81ae0833bfe 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-04-19 13:02:56 UTC +--- media/video/video_encode_accelerator_adapter.cc.orig 2024-07-30 11:12:21 UTC +++ media/video/video_encode_accelerator_adapter.cc -@@ -157,7 +157,7 @@ VideoEncodeAccelerator::Config SetUpVeaConfig( +@@ -158,7 +158,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 -@@ -482,7 +482,7 @@ void VideoEncodeAcceleratorAdapter::InitializeInternal +@@ -486,7 +486,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_video_video__encode__accelerator__adapter__test.cc b/www/chromium/files/patch-media_video_video__encode__accelerator__adapter__test.cc index de70bfd36b2b..33183f054a80 100644 --- a/www/chromium/files/patch-media_video_video__encode__accelerator__adapter__test.cc +++ b/www/chromium/files/patch-media_video_video__encode__accelerator__adapter__test.cc @@ -1,11 +1,11 @@ ---- media/video/video_encode_accelerator_adapter_test.cc.orig 2023-08-17 07:33:31 UTC +--- media/video/video_encode_accelerator_adapter_test.cc.orig 2024-07-30 11:12:21 UTC +++ media/video/video_encode_accelerator_adapter_test.cc -@@ -459,7 +459,7 @@ TEST_P(VideoEncodeAcceleratorAdapterTest, TwoFramesRes +@@ -461,7 +461,7 @@ TEST_P(VideoEncodeAcceleratorAdapterTest, TwoFramesRes CreateGreenFrame(large_size, pixel_format, base::Milliseconds(2)); VideoPixelFormat expected_input_format = PIXEL_FORMAT_I420; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (pixel_format != PIXEL_FORMAT_I420 || !small_frame->IsMappable()) expected_input_format = PIXEL_FORMAT_NV12; #endif diff --git a/www/chromium/files/patch-mojo_public_tools_bindings_mojom.gni b/www/chromium/files/patch-mojo_public_tools_bindings_mojom.gni index c78747196976..db621c027216 100644 --- a/www/chromium/files/patch-mojo_public_tools_bindings_mojom.gni +++ b/www/chromium/files/patch-mojo_public_tools_bindings_mojom.gni @@ -1,19 +1,19 @@ ---- mojo/public/tools/bindings/mojom.gni.orig 2024-06-17 12:56:06 UTC +--- mojo/public/tools/bindings/mojom.gni.orig 2024-07-30 11:12:21 UTC +++ mojo/public/tools/bindings/mojom.gni -@@ -746,6 +746,16 @@ template("mojom") { +@@ -762,6 +762,16 @@ template("mojom") { enabled_features += [ "is_apple" ] } + if (is_openbsd) { + enabled_features += [ "is_openbsd" ] + enabled_features += [ "is_bsd" ] + } + + if (is_freebsd) { + enabled_features += [ "is_freebsd" ] + enabled_features += [ "is_bsd" ] + } + action(parser_target_name) { allow_remote = true diff --git a/www/chromium/files/patch-net_BUILD.gn b/www/chromium/files/patch-net_BUILD.gn index 52e9970b826c..aea82fadef1a 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-06-17 12:56:06 UTC +--- net/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ net/BUILD.gn @@ -123,7 +123,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" ] } -@@ -1200,6 +1200,19 @@ component("net") { +@@ -1212,6 +1212,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", -@@ -1357,7 +1370,7 @@ component("net") { +@@ -1371,7 +1384,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", -@@ -2846,7 +2859,7 @@ test("net_unittests") { +@@ -2860,7 +2873,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", -@@ -2934,6 +2947,10 @@ test("net_unittests") { +@@ -2948,6 +2961,10 @@ test("net_unittests") { ] } + if (is_bsd) { + deps += [ "//sandbox/policy" ] + } + if (enable_websockets) { deps += [ "//net/server:tests" ] } -@@ -2994,7 +3011,7 @@ test("net_unittests") { +@@ -3008,7 +3025,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "tools/quic/quic_simple_server_test.cc" ] } -@@ -3130,7 +3147,7 @@ test("net_unittests") { +@@ -3147,7 +3164,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 a81c542552ed..2e13f8223fa5 100644 --- a/www/chromium/files/patch-net_base_features.cc +++ b/www/chromium/files/patch-net_base_features.cc @@ -1,24 +1,24 @@ ---- net/base/features.cc.orig 2024-06-17 12:56:06 UTC +--- net/base/features.cc.orig 2024-07-30 11:12:21 UTC +++ net/base/features.cc @@ -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 -@@ -516,7 +516,12 @@ BASE_FEATURE(kSpdyHeadersToHttpResponseUseBuilder, +@@ -505,7 +505,12 @@ BASE_FEATURE(kSpdyHeadersToHttpResponseUseBuilder, "SpdyHeadersToHttpResponseUseBuilder", base::FEATURE_DISABLED_BY_DEFAULT); +#if BUILDFLAG(IS_OPENBSD) +// No IP_RECVTOS support BASE_FEATURE(kReportEcn, "ReportEcn", base::FEATURE_DISABLED_BY_DEFAULT); +#else +BASE_FEATURE(kReportEcn, "ReportEcn", base::FEATURE_DISABLED_BY_DEFAULT); +#endif BASE_FEATURE(kUseNewAlpsCodepointHttp2, "UseNewAlpsCodepointHttp2", diff --git a/www/chromium/files/patch-net_base_network__change__notifier.cc b/www/chromium/files/patch-net_base_network__change__notifier.cc index 562dfc71ba47..19c31e115778 100644 --- a/www/chromium/files/patch-net_base_network__change__notifier.cc +++ b/www/chromium/files/patch-net_base_network__change__notifier.cc @@ -1,21 +1,21 @@ ---- net/base/network_change_notifier.cc.orig 2024-02-23 21:04:38 UTC +--- net/base/network_change_notifier.cc.orig 2024-07-30 11:12:21 UTC +++ net/base/network_change_notifier.cc -@@ -37,7 +37,7 @@ +@@ -42,7 +42,7 @@ #include "net/base/network_change_notifier_linux.h" #elif BUILDFLAG(IS_APPLE) #include "net/base/network_change_notifier_apple.h" -#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "net/base/network_change_notifier_passive.h" #elif BUILDFLAG(IS_FUCHSIA) #include "net/base/network_change_notifier_fuchsia.h" -@@ -329,6 +329,9 @@ std::unique_ptr NetworkChangeNo +@@ -334,6 +334,9 @@ std::unique_ptr NetworkChangeNo #elif BUILDFLAG(IS_FUCHSIA) return std::make_unique( /*require_wlan=*/false); +#elif BUILDFLAG(IS_BSD) + return std::make_unique( + /*dns_config_notifier*/nullptr); #else NOTIMPLEMENTED(); return nullptr; diff --git a/www/chromium/files/patch-net_base_sockaddr__util__posix.cc b/www/chromium/files/patch-net_base_sockaddr__util__posix.cc index 825c0490c3f1..29b5c6b2b6db 100644 --- a/www/chromium/files/patch-net_base_sockaddr__util__posix.cc +++ b/www/chromium/files/patch-net_base_sockaddr__util__posix.cc @@ -1,12 +1,12 @@ ---- net/base/sockaddr_util_posix.cc.orig 2022-07-22 17:30:31 UTC +--- net/base/sockaddr_util_posix.cc.orig 2024-07-30 11:12:21 UTC +++ net/base/sockaddr_util_posix.cc -@@ -41,7 +41,8 @@ bool FillUnixAddress(const std::string& socket_path, +@@ -46,7 +46,8 @@ bool FillUnixAddress(const std::string& socket_path, return true; } -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // XXX ? // Convert the path given into abstract socket name. It must start with // the '\0' character, so we are adding it. |addr_len| must specify the // length of the structure exactly, as potentially the socket name may diff --git a/www/chromium/files/patch-net_base_sockaddr__util__posix__unittest.cc b/www/chromium/files/patch-net_base_sockaddr__util__posix__unittest.cc index 50ed6dc7f90d..7014693faa3a 100644 --- a/www/chromium/files/patch-net_base_sockaddr__util__posix__unittest.cc +++ b/www/chromium/files/patch-net_base_sockaddr__util__posix__unittest.cc @@ -1,12 +1,12 @@ ---- net/base/sockaddr_util_posix_unittest.cc.orig 2022-06-17 14:20:10 UTC +--- net/base/sockaddr_util_posix_unittest.cc.orig 2024-07-30 11:12:21 UTC +++ net/base/sockaddr_util_posix_unittest.cc -@@ -83,7 +83,8 @@ TEST(FillUnixAddressTest, AbstractLinuxAddress) { +@@ -88,7 +88,8 @@ TEST(FillUnixAddressTest, AbstractLinuxAddress) { size_t path_max = MaxPathLength(&storage); std::string path(path_max, '0'); -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // XXX? EXPECT_TRUE(FillUnixAddress(path, /*use_abstract_namespace=*/true, &storage)); EXPECT_EQ(path.size() + 1U + offsetof(struct sockaddr_un, sun_path), diff --git a/www/chromium/files/patch-net_disk__cache_simple_simple__file__tracker.cc b/www/chromium/files/patch-net_disk__cache_simple_simple__file__tracker.cc index ea6580b0cab2..7d8d2d5701bd 100644 --- a/www/chromium/files/patch-net_disk__cache_simple_simple__file__tracker.cc +++ b/www/chromium/files/patch-net_disk__cache_simple_simple__file__tracker.cc @@ -1,20 +1,20 @@ ---- net/disk_cache/simple/simple_file_tracker.cc.orig 2022-06-17 14:20:10 UTC +--- net/disk_cache/simple/simple_file_tracker.cc.orig 2024-07-30 11:12:21 UTC +++ net/disk_cache/simple/simple_file_tracker.cc -@@ -29,7 +29,17 @@ void RecordFileDescripterLimiterOp(FileDescriptorLimit +@@ -34,7 +34,17 @@ void RecordFileDescripterLimiterOp(FileDescriptorLimit } // namespace SimpleFileTracker::SimpleFileTracker(int file_limit) +#if defined(OS_OPENBSD) +{ + // cap the file descriptor limit at 85% of the size of the + // file descriptor table and also substract the amount of + // currently used file descriptors as this should give us + // enough reserve to avoid hitting the limit + file_limit_ = (getdtablesize() * 0.85) - getdtablecount(); +} +#else : file_limit_(file_limit) {} +#endif SimpleFileTracker::~SimpleFileTracker() { DCHECK(lru_.empty()); diff --git a/www/chromium/files/patch-net_dns_address__info.cc b/www/chromium/files/patch-net_dns_address__info.cc index b783821589e4..af69bca18aed 100644 --- a/www/chromium/files/patch-net_dns_address__info.cc +++ b/www/chromium/files/patch-net_dns_address__info.cc @@ -1,16 +1,16 @@ ---- net/dns/address_info.cc.orig 2024-02-23 21:04:38 UTC +--- net/dns/address_info.cc.orig 2024-07-30 11:12:21 UTC +++ net/dns/address_info.cc -@@ -78,8 +78,12 @@ AddressInfo::AddressInfoAndResult AddressInfo::Get( +@@ -83,8 +83,12 @@ AddressInfo::AddressInfoAndResult AddressInfo::Get( // error. // http://crbug.com/134142 err = ERR_NAME_NOT_RESOLVED; -#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_FREEBSD) +#elif BUILDFLAG(IS_POSIX) +#ifdef EAI_NODATA if (os_error != EAI_NONAME && os_error != EAI_NODATA) +#else + if (os_error != EAI_NONAME) +#endif err = ERR_NAME_RESOLUTION_FAILED; #endif diff --git a/www/chromium/files/patch-net_dns_address__sorter__posix.cc b/www/chromium/files/patch-net_dns_address__sorter__posix.cc index ae7045b502f9..974c87f29130 100644 --- a/www/chromium/files/patch-net_dns_address__sorter__posix.cc +++ b/www/chromium/files/patch-net_dns_address__sorter__posix.cc @@ -1,10 +1,10 @@ ---- net/dns/address_sorter_posix.cc.orig 2024-04-19 13:02:56 UTC +--- net/dns/address_sorter_posix.cc.orig 2024-07-30 11:12:21 UTC +++ net/dns/address_sorter_posix.cc -@@ -27,6 +27,7 @@ +@@ -32,6 +32,7 @@ #include "net/dns/netinet_in_var_ios.h" #else #include +#include #endif // BUILDFLAG(IS_IOS) #endif #include diff --git a/www/chromium/files/patch-net_dns_dns__config__service__posix.cc b/www/chromium/files/patch-net_dns_dns__config__service__posix.cc index a1cd09892744..cc2598368fc2 100644 --- a/www/chromium/files/patch-net_dns_dns__config__service__posix.cc +++ b/www/chromium/files/patch-net_dns_dns__config__service__posix.cc @@ -1,26 +1,26 @@ ---- net/dns/dns_config_service_posix.cc.orig 2022-08-31 12:19:35 UTC +--- net/dns/dns_config_service_posix.cc.orig 2024-07-30 11:12:21 UTC +++ net/dns/dns_config_service_posix.cc -@@ -34,6 +34,11 @@ +@@ -39,6 +39,11 @@ #include "net/dns/dns_config_watcher_mac.h" #endif +#if BUILDFLAG(IS_BSD) +#include "base/command_line.h" +#include "sandbox/policy/switches.h" +#endif + namespace net { namespace internal { -@@ -130,6 +135,11 @@ class DnsConfigServicePosix::Watcher : public DnsConfi +@@ -135,6 +140,11 @@ class DnsConfigServicePosix::Watcher : public DnsConfi bool Watch() override { CheckOnCorrectSequence(); + +// pledge + unveil + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + if (!command_line->HasSwitch(sandbox::policy::switches::kNoSandbox)) + return false; bool success = true; if (!config_watcher_.Watch(base::BindRepeating(&Watcher::OnConfigChanged, diff --git a/www/chromium/files/patch-net_http_http__auth__gssapi__posix.cc b/www/chromium/files/patch-net_http_http__auth__gssapi__posix.cc index 3978e7db98e0..9da5491ded69 100644 --- a/www/chromium/files/patch-net_http_http__auth__gssapi__posix.cc +++ b/www/chromium/files/patch-net_http_http__auth__gssapi__posix.cc @@ -1,14 +1,14 @@ ---- net/http/http_auth_gssapi_posix.cc.orig 2023-04-28 17:01:32 UTC +--- net/http/http_auth_gssapi_posix.cc.orig 2024-07-30 11:12:21 UTC +++ net/http/http_auth_gssapi_posix.cc -@@ -370,8 +370,9 @@ base::NativeLibrary GSSAPISharedLibrary::LoadSharedLib +@@ -375,8 +375,9 @@ base::NativeLibrary GSSAPISharedLibrary::LoadSharedLib static const char* const kDefaultLibraryNames[] = { #if BUILDFLAG(IS_APPLE) "/System/Library/Frameworks/GSS.framework/GSS" -#elif BUILDFLAG(IS_OPENBSD) - "libgssapi.so" // Heimdal - OpenBSD +#elif BUILDFLAG(IS_BSD) + "libgssapi_krb5.so.2", // MIT Kerberos - FreeBSD + "libgssapi.so" // Heimdal - OpenBSD, FreeBSD #else "libgssapi_krb5.so.2", // MIT Kerberos - FC, Suse10, Debian "libgssapi.so.4", // Heimdal - Suse10, MDK diff --git a/www/chromium/files/patch-net_proxy__resolution_proxy__config__service__linux.cc b/www/chromium/files/patch-net_proxy__resolution_proxy__config__service__linux.cc index 44b113c835e2..b5bfecaefcd0 100644 --- a/www/chromium/files/patch-net_proxy__resolution_proxy__config__service__linux.cc +++ b/www/chromium/files/patch-net_proxy__resolution_proxy__config__service__linux.cc @@ -1,40 +1,40 @@ ---- net/proxy_resolution/proxy_config_service_linux.cc.orig 2024-05-21 18:07:39 UTC +--- net/proxy_resolution/proxy_config_service_linux.cc.orig 2024-07-30 11:12:21 UTC +++ net/proxy_resolution/proxy_config_service_linux.cc -@@ -6,7 +6,9 @@ +@@ -11,7 +11,9 @@ #include #include +#if !BUILDFLAG(IS_BSD) #include +#endif #include #include -@@ -505,6 +507,7 @@ bool SettingGetterImplGSettings::CheckVersion( +@@ -510,6 +512,7 @@ bool SettingGetterImplGSettings::CheckVersion( } #endif // defined(USE_GIO) +#if !BUILDFLAG(IS_BSD) // Converts |value| from a decimal string to an int. If there was a failure // parsing, returns |default_value|. int StringToIntOrDefault(std::string_view value, int default_value) { -@@ -1033,6 +1036,7 @@ class SettingGetterImplKDE : public ProxyConfigService +@@ -1038,6 +1041,7 @@ class SettingGetterImplKDE : public ProxyConfigService // events on. scoped_refptr file_task_runner_; }; +#endif } // namespace -@@ -1251,9 +1255,11 @@ ProxyConfigServiceLinux::Delegate::Delegate( +@@ -1256,9 +1260,11 @@ ProxyConfigServiceLinux::Delegate::Delegate( case base::nix::DESKTOP_ENVIRONMENT_KDE4: case base::nix::DESKTOP_ENVIRONMENT_KDE5: case base::nix::DESKTOP_ENVIRONMENT_KDE6: +#if !BUILDFLAG(IS_BSD) setting_getter_ = std::make_unique(env_var_getter_.get()); break; +#endif case base::nix::DESKTOP_ENVIRONMENT_XFCE: case base::nix::DESKTOP_ENVIRONMENT_LXQT: case base::nix::DESKTOP_ENVIRONMENT_OTHER: diff --git a/www/chromium/files/patch-net_socket_socks5__client__socket.cc b/www/chromium/files/patch-net_socket_socks5__client__socket.cc index d80844cdf1be..a43297cb7056 100644 --- a/www/chromium/files/patch-net_socket_socks5__client__socket.cc +++ b/www/chromium/files/patch-net_socket_socks5__client__socket.cc @@ -1,12 +1,12 @@ ---- net/socket/socks5_client_socket.cc.orig 2022-04-21 18:48:31 UTC +--- net/socket/socks5_client_socket.cc.orig 2024-07-30 11:12:21 UTC +++ net/socket/socks5_client_socket.cc -@@ -19,6 +19,9 @@ +@@ -24,6 +24,9 @@ #include "net/log/net_log_event_type.h" #include "net/traffic_annotation/network_traffic_annotation.h" +#include +#include + namespace net { const unsigned int SOCKS5ClientSocket::kGreetReadHeaderSize = 2; diff --git a/www/chromium/files/patch-net_socket_tcp__socket__posix.cc b/www/chromium/files/patch-net_socket_tcp__socket__posix.cc index ed7253f313a8..b7fd04b068eb 100644 --- a/www/chromium/files/patch-net_socket_tcp__socket__posix.cc +++ b/www/chromium/files/patch-net_socket_tcp__socket__posix.cc @@ -1,20 +1,20 @@ ---- net/socket/tcp_socket_posix.cc.orig 2023-05-31 08:12:17 UTC +--- net/socket/tcp_socket_posix.cc.orig 2024-07-30 11:12:21 UTC +++ net/socket/tcp_socket_posix.cc -@@ -98,6 +98,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { +@@ -97,6 +97,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { PLOG(ERROR) << "Failed to set TCP_KEEPALIVE on fd: " << fd; return false; } +#elif BUILDFLAG(IS_FREEBSD) + // Set seconds until first TCP keep alive. + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &delay, sizeof(delay))) { + PLOG(ERROR) << "Failed to set TCP_KEEPIDLE on fd: " << fd; + return false; + } + // Set seconds between TCP keep alives. + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &delay, sizeof(delay))) { + PLOG(ERROR) << "Failed to set TCP_KEEPINTVL on fd: " << fd; + return false; + } #endif } 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 79b7322996b4..87067b71beb2 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-06-17 12:56:06 UTC +--- net/socket/udp_socket_posix.cc.orig 2024-07-30 11:12:21 UTC +++ net/socket/udp_socket_posix.cc -@@ -516,12 +516,17 @@ int UDPSocketPosix::SetRecvTos() { +@@ -521,12 +521,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 { -@@ -542,7 +547,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { +@@ -547,7 +552,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. -@@ -880,7 +885,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) +@@ -885,7 +890,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_tools_cert__verify__tool_cert__verify__tool.cc b/www/chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc index dca6b3f5a6e7..3e6349d5a2c4 100644 --- a/www/chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc +++ b/www/chromium/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc @@ -1,29 +1,29 @@ ---- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2024-06-17 12:56:06 UTC +--- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2024-07-30 11:12:21 UTC +++ net/tools/cert_verify_tool/cert_verify_tool.cc @@ -34,7 +34,7 @@ #include "third_party/boringssl/src/pki/trust_store.h" #include "third_party/boringssl/src/pki/trust_store_collection.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "net/proxy_resolution/proxy_config.h" #include "net/proxy_resolution/proxy_config_service_fixed.h" #endif @@ -66,7 +66,7 @@ void SetUpOnNetworkThread( base::WaitableEvent* initialization_complete_event) { net::URLRequestContextBuilder url_request_context_builder; url_request_context_builder.set_user_agent(GetUserAgent()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux, use a fixed ProxyConfigService, since the default one // depends on glib. // -@@ -571,7 +571,7 @@ int main(int argc, char** argv) { +@@ -576,7 +576,7 @@ int main(int argc, char** argv) { std::string impls_str = command_line.GetSwitchValueASCII("impls"); if (impls_str.empty()) { // Default value. -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || \ +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(CHROME_ROOT_STORE_ONLY)) impls_str = "platform,"; #endif diff --git a/www/chromium/files/patch-net_traffic__annotation_network__traffic__annotation.h b/www/chromium/files/patch-net_traffic__annotation_network__traffic__annotation.h index cb135f6afe1a..83c9f1dec5f4 100644 --- a/www/chromium/files/patch-net_traffic__annotation_network__traffic__annotation.h +++ b/www/chromium/files/patch-net_traffic__annotation_network__traffic__annotation.h @@ -1,20 +1,20 @@ ---- net/traffic_annotation/network_traffic_annotation.h.orig 2024-06-17 12:56:06 UTC +--- net/traffic_annotation/network_traffic_annotation.h.orig 2024-07-30 11:12:21 UTC +++ net/traffic_annotation/network_traffic_annotation.h -@@ -373,7 +373,7 @@ struct MutablePartialNetworkTrafficAnnotationTag { +@@ -378,7 +378,7 @@ struct MutablePartialNetworkTrafficAnnotationTag { } // namespace net // Placeholder for unannotated usages. -#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) #define TRAFFIC_ANNOTATION_WITHOUT_PROTO(ANNOTATION_ID) \ net::DefineNetworkTrafficAnnotation(ANNOTATION_ID, "No proto yet.") #endif -@@ -387,7 +387,7 @@ struct MutablePartialNetworkTrafficAnnotationTag { +@@ -392,7 +392,7 @@ struct MutablePartialNetworkTrafficAnnotationTag { // TODO(crbug.com/40118868): Revisit once build flag switch of lacros-chrome is // complete. #if !BUILDFLAG(IS_WIN) && \ - !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) #define NO_TRAFFIC_ANNOTATION_YET \ net::DefineNetworkTrafficAnnotation("undefined", "Nothing here yet.") diff --git a/www/chromium/files/patch-pdf_pdfium_pdfium__engine.cc b/www/chromium/files/patch-pdf_pdfium_pdfium__engine.cc index 157e7d232b56..919edaf56b05 100644 --- a/www/chromium/files/patch-pdf_pdfium_pdfium__engine.cc +++ b/www/chromium/files/patch-pdf_pdfium_pdfium__engine.cc @@ -1,20 +1,20 @@ ---- pdf/pdfium/pdfium_engine.cc.orig 2024-06-17 12:56:06 UTC +--- pdf/pdfium/pdfium_engine.cc.orig 2024-07-30 11:12:21 UTC +++ pdf/pdfium/pdfium_engine.cc -@@ -87,7 +87,7 @@ +@@ -92,7 +92,7 @@ #include "gin/public/cppgc.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "pdf/pdfium/pdfium_font_linux.h" #endif -@@ -512,7 +512,7 @@ void InitializeSDK(bool enable_v8, +@@ -517,7 +517,7 @@ void InitializeSDK(bool enable_v8, FPDF_InitLibraryWithConfig(&config); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) g_font_mapping_mode = font_mapping_mode; InitializeLinuxFontMapper(); #endif diff --git a/www/chromium/files/patch-printing_backend_print__backend__cups.cc b/www/chromium/files/patch-printing_backend_print__backend__cups.cc new file mode 100644 index 000000000000..7a4bda54a229 --- /dev/null +++ b/www/chromium/files/patch-printing_backend_print__backend__cups.cc @@ -0,0 +1,20 @@ +--- printing/backend/print_backend_cups.cc.orig 2024-07-30 11:12:21 UTC ++++ printing/backend/print_backend_cups.cc +@@ -27,7 +27,7 @@ + #include "printing/mojom/print.mojom.h" + #include "url/gurl.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + #include "base/feature_list.h" + #include "printing/backend/cups_connection.h" + #include "printing/backend/print_backend_cups_ipp.h" +@@ -278,7 +278,7 @@ bool PrintBackendCUPS::IsValidPrinter(const std::strin + #if !BUILDFLAG(IS_CHROMEOS) + scoped_refptr PrintBackend::CreateInstanceImpl( + const std::string& locale) { +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + if (base::FeatureList::IsEnabled(features::kCupsIppPrintingBackend)) { + return base::MakeRefCounted(CupsConnection::Create()); + } diff --git a/www/chromium/files/patch-printing_printing__features.cc b/www/chromium/files/patch-printing_printing__features.cc new file mode 100644 index 000000000000..d590a3a1ceb5 --- /dev/null +++ b/www/chromium/files/patch-printing_printing__features.cc @@ -0,0 +1,17 @@ +--- printing/printing_features.cc.orig 2024-07-30 11:12:21 UTC ++++ printing/printing_features.cc +@@ -21,12 +21,12 @@ BASE_FEATURE(kAddPrinterViaPrintscanmgr, + base::FEATURE_DISABLED_BY_DEFAULT); + #endif // BUILDFLAG(IS_CHROMEOS) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + // Use the CUPS IPP printing backend instead of the original CUPS backend that + // calls the deprecated PPD API. + BASE_FEATURE(kCupsIppPrintingBackend, + "CupsIppPrintingBackend", +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::FEATURE_DISABLED_BY_DEFAULT + #else + base::FEATURE_ENABLED_BY_DEFAULT diff --git a/www/chromium/files/patch-printing_printing__features.h b/www/chromium/files/patch-printing_printing__features.h new file mode 100644 index 000000000000..5d412bcef048 --- /dev/null +++ b/www/chromium/files/patch-printing_printing__features.h @@ -0,0 +1,11 @@ +--- printing/printing_features.h.orig 2024-07-30 11:12:21 UTC ++++ printing/printing_features.h +@@ -22,7 +22,7 @@ COMPONENT_EXPORT(PRINTING_BASE) + BASE_DECLARE_FEATURE(kAddPrinterViaPrintscanmgr); + #endif // BUILDFLAG(IS_CHROMEOS) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + COMPONENT_EXPORT(PRINTING_BASE) BASE_DECLARE_FEATURE(kCupsIppPrintingBackend); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) + diff --git a/www/chromium/files/patch-remoting_host_crash_crash__file__uploader.cc b/www/chromium/files/patch-remoting_host_crash_crash__file__uploader.cc new file mode 100644 index 000000000000..fcbb2aea270b --- /dev/null +++ b/www/chromium/files/patch-remoting_host_crash_crash__file__uploader.cc @@ -0,0 +1,11 @@ +--- remoting/host/crash/crash_file_uploader.cc.orig 2024-07-30 11:12:21 UTC ++++ remoting/host/crash/crash_file_uploader.cc +@@ -44,7 +44,7 @@ constexpr char kMinidumpFileName[] = "dump"; + + #if BUILDFLAG(IS_WIN) + constexpr char kProductNameValue[] = "Chromoting"; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + constexpr char kProductNameValue[] = "Chromoting_Linux"; + #elif BUILDFLAG(IS_MAC) + constexpr char kProductNameValue[] = "Chromoting_Mac"; diff --git a/www/chromium/files/patch-remoting_host_host__main.cc b/www/chromium/files/patch-remoting_host_host__main.cc index da41449af3a3..7ba199a578ca 100644 --- a/www/chromium/files/patch-remoting_host_host__main.cc +++ b/www/chromium/files/patch-remoting_host_host__main.cc @@ -1,29 +1,38 @@ ---- remoting/host/host_main.cc.orig 2023-03-09 06:31:50 UTC +--- remoting/host/host_main.cc.orig 2024-07-30 11:12:21 UTC +++ remoting/host/host_main.cc @@ -50,7 +50,7 @@ int FileChooserMain(); int RdpDesktopSessionMain(); int UrlForwarderConfiguratorMain(); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) int XSessionChooserMain(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -63,7 +63,7 @@ const char kUsageMessage[] = "\n" "Options:\n" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) " --audio-pipe-name= - Sets the pipe name to capture audio on " "Linux.\n" #endif // BUILDFLAG(IS_LINUX) @@ -156,7 +156,7 @@ MainRoutineFn SelectMainRoutine(const std::string& pro } else if (process_type == kProcessTypeUrlForwarderConfigurator) { main_routine = &UrlForwarderConfiguratorMain; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) } else if (process_type == kProcessTypeXSessionChooser) { main_routine = &XSessionChooserMain; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -222,7 +222,7 @@ int HostMain(int argc, char** argv) { + // be initialized first, so that the preference for crash-reporting can be + // looked up in the config file. + if (IsUsageStatsAllowed()) { +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + InitializeCrashReporting(); + #elif BUILDFLAG(IS_WIN) + // TODO: joedow - Enable crash reporting for the RDP process. diff --git a/www/chromium/files/patch-remoting_host_it2me_it2me__host.cc b/www/chromium/files/patch-remoting_host_it2me_it2me__host.cc index fbe62316c189..5cbd6330fa26 100644 --- a/www/chromium/files/patch-remoting_host_it2me_it2me__host.cc +++ b/www/chromium/files/patch-remoting_host_it2me_it2me__host.cc @@ -1,29 +1,29 @@ ---- remoting/host/it2me/it2me_host.cc.orig 2024-01-30 07:53:34 UTC +--- remoting/host/it2me/it2me_host.cc.orig 2024-07-30 11:12:21 UTC +++ remoting/host/it2me/it2me_host.cc @@ -52,7 +52,7 @@ #include "remoting/host/chromeos/features.h" #endif -#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) -@@ -178,7 +178,7 @@ void It2MeHost::Connect( +@@ -180,7 +180,7 @@ void It2MeHost::Connect( OnPolicyUpdate(std::move(policies)); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { WaylandManager::Get()->Init(host_context_->ui_task_runner()); } -@@ -338,7 +338,7 @@ void It2MeHost::ConnectOnNetworkThread( +@@ -340,7 +340,7 @@ void It2MeHost::ConnectOnNetworkThread( // Set up the desktop environment options. DesktopEnvironmentOptions options(DesktopEnvironmentOptions::CreateDefault()); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { options.desktop_capture_options()->set_prefer_cursor_embedded(true); } diff --git a/www/chromium/files/patch-remoting_host_me2me__desktop__environment.cc b/www/chromium/files/patch-remoting_host_me2me__desktop__environment.cc index a001cb8d3812..d3b90f117c57 100644 --- a/www/chromium/files/patch-remoting_host_me2me__desktop__environment.cc +++ b/www/chromium/files/patch-remoting_host_me2me__desktop__environment.cc @@ -1,38 +1,38 @@ ---- remoting/host/me2me_desktop_environment.cc.orig 2024-05-21 18:07:39 UTC +--- remoting/host/me2me_desktop_environment.cc.orig 2024-07-30 11:12:21 UTC +++ remoting/host/me2me_desktop_environment.cc -@@ -125,7 +125,7 @@ std::string Me2MeDesktopEnvironment::GetCapabilities() +@@ -119,7 +119,7 @@ std::string Me2MeDesktopEnvironment::GetCapabilities() capabilities += protocol::kRemoteWebAuthnCapability; } -#if BUILDFLAG(IS_LINUX) && defined(REMOTING_USE_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(REMOTING_USE_X11) if (!IsRunningWayland()) { capabilities += " "; capabilities += protocol::kMultiStreamCapability; -@@ -167,7 +167,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( +@@ -161,7 +161,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( // properly under Xvfb. mutable_desktop_capture_options()->set_use_update_notifications(true); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Setting this option to false means that the capture differ wrapper will not // be used when the X11 capturer is selected. This reduces the X11 capture // time by a few milliseconds per frame and is safe because we can rely on -@@ -176,7 +176,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( +@@ -170,7 +170,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( mutable_desktop_capture_options()->set_detect_updated_region(false); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (IsRunningWayland()) { mutable_desktop_capture_options()->set_prefer_cursor_embedded(false); } -@@ -201,7 +201,7 @@ bool Me2MeDesktopEnvironment::InitializeSecurity( +@@ -195,7 +195,7 @@ bool Me2MeDesktopEnvironment::InitializeSecurity( // Otherwise, if the session is shared with the local user start monitoring // the local input and create the in-session UI. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool want_user_interface = false; #elif BUILDFLAG(IS_APPLE) // Don't try to display any UI on top of the system's login screen as this diff --git a/www/chromium/files/patch-remoting_host_remoting__me2me__host.cc b/www/chromium/files/patch-remoting_host_remoting__me2me__host.cc index cffbd690e459..63ed0c378429 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-04-19 13:02:56 UTC +--- remoting/host/remoting_me2me_host.cc.orig 2024-07-30 11:12:21 UTC +++ remoting/host/remoting_me2me_host.cc @@ -132,7 +132,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) @@ -143,13 +143,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 @@ -162,7 +162,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) @@ -192,7 +192,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"; @@ -401,7 +401,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) @@ -471,7 +471,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_; -@@ -783,7 +783,7 @@ void HostProcess::StartOnNetworkThread() { +@@ -778,7 +778,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) } -@@ -849,7 +849,7 @@ void HostProcess::CreateAuthenticatorFactory() { +@@ -844,7 +844,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, -@@ -974,13 +974,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 = -@@ -1052,7 +1052,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. -@@ -1060,7 +1060,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(); })); -@@ -1418,7 +1418,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()) { -@@ -1882,7 +1882,7 @@ void HostProcess::StartHost() { +@@ -1878,7 +1878,7 @@ void HostProcess::StartHost() { corp_host_status_logger_->StartObserving(*session_manager); } -#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 -@@ -1915,7 +1915,7 @@ void HostProcess::StartHost() { +@@ -1911,7 +1911,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_ = -@@ -1947,7 +1947,7 @@ void HostProcess::StartHost() { +@@ -1943,7 +1943,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(); -@@ -2081,7 +2081,7 @@ int HostProcessMain() { +@@ -2077,7 +2077,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 ...) -@@ -2130,7 +2130,7 @@ int HostProcessMain() { +@@ -2126,7 +2126,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_sandbox__type.cc b/www/chromium/files/patch-sandbox_policy_sandbox__type.cc index 23c5e7819928..6ed737ee2075 100644 --- a/www/chromium/files/patch-sandbox_policy_sandbox__type.cc +++ b/www/chromium/files/patch-sandbox_policy_sandbox__type.cc @@ -1,115 +1,115 @@ ---- sandbox/policy/sandbox_type.cc.orig 2023-12-10 06:10:27 UTC +--- sandbox/policy/sandbox_type.cc.orig 2024-07-30 11:12:21 UTC +++ sandbox/policy/sandbox_type.cc @@ -38,7 +38,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { #endif case Sandbox::kAudio: return false; -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) case Sandbox::kVideoCapture: return false; #endif @@ -63,7 +63,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { case Sandbox::kMirroring: case Sandbox::kNaClLoader: #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case Sandbox::kHardwareVideoDecoding: #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -73,7 +73,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { +@@ -74,7 +74,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { case Sandbox::kLibassistant: #endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT) #endif // // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) | BUILDFLAG(IS_BSD) case Sandbox::kZygoteIntermediateSandbox: case Sandbox::kHardwareVideoEncoding: #endif -@@ -130,7 +130,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -131,7 +131,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi #endif case Sandbox::kPrintCompositor: case Sandbox::kAudio: -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) case Sandbox::kVideoCapture: #endif #if BUILDFLAG(IS_WIN) -@@ -141,10 +141,10 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -142,10 +142,10 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi case Sandbox::kMediaFoundationCdm: case Sandbox::kWindowsSystemProxyResolver: #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case Sandbox::kHardwareVideoDecoding: #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case Sandbox::kHardwareVideoEncoding: #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -172,7 +172,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -174,7 +174,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi case Sandbox::kNaClLoader: break; #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case Sandbox::kZygoteIntermediateSandbox: break; #endif -@@ -216,7 +216,7 @@ sandbox::mojom::Sandbox SandboxTypeFromCommandLine( +@@ -218,7 +218,7 @@ sandbox::mojom::Sandbox SandboxTypeFromCommandLine( #endif } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Intermediate process gains a sandbox later. if (process_type == switches::kZygoteProcessType) return Sandbox::kZygoteIntermediateSandbox; -@@ -262,7 +262,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -266,7 +266,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb return switches::kUtilitySandbox; case Sandbox::kAudio: return switches::kAudioSandbox; -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) case Sandbox::kVideoCapture: return switches::kVideoCaptureSandbox; #endif -@@ -292,11 +292,11 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -296,11 +296,11 @@ std::string StringFromUtilitySandboxType(Sandbox sandb case Sandbox::kMirroring: return switches::kMirroringSandbox; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) case Sandbox::kHardwareVideoDecoding: return switches::kHardwareVideoDecodingSandbox; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case Sandbox::kHardwareVideoEncoding: return switches::kHardwareVideoEncodingSandbox; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -316,7 +316,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -322,7 +322,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb #if BUILDFLAG(IS_MAC) case Sandbox::kNaClLoader: #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case Sandbox::kZygoteIntermediateSandbox: #endif - NOTREACHED(); -@@ -388,11 +388,11 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( + NOTREACHED_IN_MIGRATION(); +@@ -394,11 +394,11 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( if (sandbox_string == switches::kScreenAISandbox) return Sandbox::kScreenAI; #endif -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (sandbox_string == switches::kVideoCaptureSandbox) return Sandbox::kVideoCapture; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) if (sandbox_string == switches::kHardwareVideoDecodingSandbox) return Sandbox::kHardwareVideoDecoding; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/www/chromium/files/patch-sandbox_policy_switches.cc b/www/chromium/files/patch-sandbox_policy_switches.cc index e8b567b18b5e..cf15e9bc9cc2 100644 --- a/www/chromium/files/patch-sandbox_policy_switches.cc +++ b/www/chromium/files/patch-sandbox_policy_switches.cc @@ -1,26 +1,26 @@ ---- sandbox/policy/switches.cc.orig 2023-12-10 06:10:27 UTC +--- sandbox/policy/switches.cc.orig 2024-07-30 11:12:21 UTC +++ sandbox/policy/switches.cc @@ -54,10 +54,10 @@ const char kWindowsSystemProxyResolverSandbox[] = "pro const char kMirroringSandbox[] = "mirroring"; #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) const char kHardwareVideoDecodingSandbox[] = "hardware_video_decoding"; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kHardwareVideoEncodingSandbox[] = "hardware_video_encoding"; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -96,7 +96,9 @@ const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-f +@@ -97,7 +97,9 @@ const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-f // Meant to be used as a browser-level switch for testing purposes only. const char kNoSandbox[] = "no-sandbox"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +const char kDisableUnveil[] = "disable-unveil"; + +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Instructs the zygote to launch without a sandbox. Processes forked from this // type of zygote will apply their own custom sandboxes later. const char kNoZygoteSandbox[] = "no-zygote-sandbox"; diff --git a/www/chromium/files/patch-sandbox_policy_switches.h b/www/chromium/files/patch-sandbox_policy_switches.h index b84e7d2213eb..3296847119ed 100644 --- a/www/chromium/files/patch-sandbox_policy_switches.h +++ b/www/chromium/files/patch-sandbox_policy_switches.h @@ -1,25 +1,25 @@ ---- sandbox/policy/switches.h.orig 2023-12-10 06:10:27 UTC +--- sandbox/policy/switches.h.orig 2024-07-30 11:12:21 UTC +++ sandbox/policy/switches.h @@ -57,10 +57,10 @@ SANDBOX_POLICY_EXPORT extern const char kWindowsSystem SANDBOX_POLICY_EXPORT extern const char kMirroringSandbox[]; #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) SANDBOX_POLICY_EXPORT extern const char kHardwareVideoDecodingSandbox[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SANDBOX_POLICY_EXPORT extern const char kHardwareVideoEncodingSandbox[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -81,7 +81,8 @@ SANDBOX_POLICY_EXPORT extern const char kDisableSetuid +@@ -82,7 +82,8 @@ SANDBOX_POLICY_EXPORT extern const char kDisableSetuid SANDBOX_POLICY_EXPORT extern const char kGpuSandboxAllowSysVShm[]; SANDBOX_POLICY_EXPORT extern const char kGpuSandboxFailuresFatal[]; SANDBOX_POLICY_EXPORT extern const char kNoSandbox[]; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +SANDBOX_POLICY_EXPORT extern const char kDisableUnveil[]; +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) SANDBOX_POLICY_EXPORT extern const char kNoZygoteSandbox[]; #endif #if BUILDFLAG(IS_WIN) diff --git a/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.cc b/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.cc index fc09862fe901..873867ee5d70 100644 --- a/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.cc +++ b/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.cc @@ -1,243 +1,243 @@ ---- services/device/hid/hid_connection_freebsd.cc.orig 2024-06-18 16:34:35 UTC +--- services/device/hid/hid_connection_freebsd.cc.orig 2024-07-30 19:22:51 UTC +++ services/device/hid/hid_connection_freebsd.cc @@ -0,0 +1,240 @@ +// Copyright (c) 2014 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 "services/device/hid/hid_connection_freebsd.h" + +#include +#include + +#include "base/files/file_descriptor_watcher_posix.h" +#include "base/location.h" +#include "base/numerics/safe_math.h" +#include "base/posix/eintr_wrapper.h" +#include "base/strings/stringprintf.h" +#include "base/task/single_thread_task_runner.h" +#include "base/threading/scoped_blocking_call.h" +#include "base/threading/thread_restrictions.h" +#include "components/device_event_log/device_event_log.h" +#include "services/device/hid/hid_service.h" + +namespace device { + +class HidConnectionFreeBSD::BlockingTaskRunnerHelper { + public: + BlockingTaskRunnerHelper(base::ScopedFD fd, + scoped_refptr device_info, + base::WeakPtr connection) + : fd_(std::move(fd)), + connection_(connection), + origin_task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) { + DETACH_FROM_SEQUENCE(sequence_checker_); + // Report buffers must always have room for the report ID. + report_buffer_size_ = device_info->max_input_report_size() + 1; + has_report_id_ = device_info->has_report_id(); + } + + BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete; + BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete; + + ~BlockingTaskRunnerHelper() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } + + // Starts the FileDescriptorWatcher that reads input events from the device. + // Must be called on a thread that has a base::MessageLoopForIO. + void Start() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::internal::AssertBlockingAllowed(); + + file_watcher_ = base::FileDescriptorWatcher::WatchReadable( + fd_.get(), base::BindRepeating(&BlockingTaskRunnerHelper::OnFileCanReadWithoutBlocking, + base::Unretained(this))); + } + + void Write(scoped_refptr buffer, + WriteCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + + auto data = buffer->as_vector().data(); + size_t size = buffer->size(); + // if report id is 0, it shouldn't be included + if (data[0] == 0) { + data++; + size--; + } + + ssize_t result = HANDLE_EINTR(write(fd_.get(), data, size)); + if (result < 0) { + HID_PLOG(EVENT) << "Write failed"; + origin_task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), false)); + } else { + if (static_cast(result) != size) + HID_LOG(EVENT) << "Incomplete HID write: " << result << " != " << size; + origin_task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), true)); + } + } + + void GetFeatureReport(uint8_t report_id, + scoped_refptr buffer, + ReadCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + struct usb_gen_descriptor ugd; + ugd.ugd_report_type = UHID_FEATURE_REPORT; + ugd.ugd_data = buffer->as_vector().data(); + ugd.ugd_maxlen = buffer->size(); + int result = HANDLE_EINTR( + ioctl(fd_.get(), USB_GET_REPORT, &ugd)); + if (result < 0) { + HID_PLOG(EVENT) << "Failed to get feature report"; + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), false, nullptr, 0)); + } else if (result == 0) { + HID_LOG(EVENT) << "Get feature result too short."; + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), false, nullptr, 0)); + } else { + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), true, buffer, result)); + } + } + + void SendFeatureReport(scoped_refptr buffer, + WriteCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + struct usb_gen_descriptor ugd; + ugd.ugd_report_type = UHID_FEATURE_REPORT; + ugd.ugd_data = buffer->as_vector().data(); + ugd.ugd_maxlen = buffer->size(); + // FreeBSD does not require report id if it's not used + if (buffer->data()[0] == 0) { + ugd.ugd_data = buffer->as_vector().data() + 1; + ugd.ugd_maxlen = buffer->size() - 1; + } else { + ugd.ugd_data = buffer->as_vector().data(); + ugd.ugd_maxlen = buffer->size(); + } + int result = HANDLE_EINTR( + ioctl(fd_.get(), USB_SET_REPORT, &ugd)); + if (result < 0) { + HID_PLOG(EVENT) << "Failed to send feature report"; + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), false)); + } else { + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), true)); + } + } + + private: + void OnFileCanReadWithoutBlocking() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + scoped_refptr buffer(new base::RefCountedBytes(report_buffer_size_)); + unsigned char* data = buffer->as_vector().data(); + size_t length = report_buffer_size_; + if (!has_report_id_) { + // FreeBSD will not prefix the buffer with a report ID if report IDs are not + // used by the device. Prefix the buffer with 0. + *data++ = 0; + length--; + } + + ssize_t bytes_read = HANDLE_EINTR(read(fd_.get(), data, length)); + if (bytes_read < 0) { + if (errno != EAGAIN) { + HID_PLOG(EVENT) << "Read failed"; + // This assumes that the error is unrecoverable and disables reading + // from the device until it has been re-opened. + // TODO(reillyg): Investigate starting and stopping the file descriptor + // watcher in response to pending read requests so that per-request + // errors can be returned to the client. + file_watcher_.reset(); + } + return; + } + if (!has_report_id_) { + // Behave as if the byte prefixed above as the the report ID was read. + bytes_read++; + } + + origin_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&HidConnectionFreeBSD::ProcessInputReport, + connection_, buffer, bytes_read)); + } + + SEQUENCE_CHECKER(sequence_checker_); + base::ScopedFD fd_; + size_t report_buffer_size_; + bool has_report_id_; + base::WeakPtr connection_; + const scoped_refptr origin_task_runner_; + std::unique_ptr file_watcher_; +}; + +HidConnectionFreeBSD::HidConnectionFreeBSD( + scoped_refptr device_info, + base::ScopedFD fd, + scoped_refptr blocking_task_runner, + bool allow_protected_reports, + bool allow_fido_reports) + : HidConnection(device_info, allow_protected_reports, allow_fido_reports), + helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner)), + blocking_task_runner_(std::move(blocking_task_runner)) { + helper_.reset(new BlockingTaskRunnerHelper(std::move(fd), device_info, + weak_factory_.GetWeakPtr())); + blocking_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::Start, + base::Unretained(helper_.get()))); +} + +HidConnectionFreeBSD::~HidConnectionFreeBSD() {} + +void HidConnectionFreeBSD::PlatformClose() { + // By closing the device on the blocking task runner 1) the requirement that + // base::ScopedFD is destroyed on a thread where I/O is allowed is satisfied + // and 2) any tasks posted to this task runner that refer to this file will + // complete before it is closed. + blocking_task_runner_->DeleteSoon(FROM_HERE, helper_.release()); +} + +void HidConnectionFreeBSD::PlatformWrite(scoped_refptr buffer, + WriteCallback callback) { + + blocking_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&BlockingTaskRunnerHelper::Write, base::Unretained(helper_.get()), + buffer, std::move(callback))); +} + +void HidConnectionFreeBSD::PlatformGetFeatureReport(uint8_t report_id, + ReadCallback callback) { + // The first byte of the destination buffer is the report ID being requested + // and is overwritten by the feature report. + DCHECK_GT(device_info()->max_feature_report_size(), 0u); + scoped_refptr buffer( + new base::RefCountedBytes(device_info()->max_feature_report_size() + 1)); + if (report_id != 0) + buffer->as_vector().data()[0] = report_id; + + blocking_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&BlockingTaskRunnerHelper::GetFeatureReport, + base::Unretained(helper_.get()), report_id, + buffer, std::move(callback))); +} + +void HidConnectionFreeBSD::PlatformSendFeatureReport( + scoped_refptr buffer, + WriteCallback callback) { + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + blocking_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&BlockingTaskRunnerHelper::SendFeatureReport, + base::Unretained(helper_.get()), buffer, std::move(callback))); +} + +} // namespace device diff --git a/www/chromium/files/patch-services_network_BUILD.gn b/www/chromium/files/patch-services_network_BUILD.gn index f42211c4a2ad..6b6361c7e0a9 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-05-21 18:07:39 UTC +--- services/network/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ services/network/BUILD.gn -@@ -412,7 +412,6 @@ if (is_linux || is_chromeos) { +@@ -418,7 +418,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 c179c05e3fd3..a9ec70b5fedc 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-06-17 12:56:06 UTC +--- services/network/network_context.cc.orig 2024-07-30 11:12:21 UTC +++ services/network/network_context.cc -@@ -527,7 +527,7 @@ NetworkContext::NetworkContextHttpAuthPreferences:: +@@ -589,7 +589,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_) { -@@ -2294,7 +2294,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( +@@ -2355,7 +2355,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__context.h b/www/chromium/files/patch-services_network_network__context.h index edb5e8bdf17b..ec0cfb76e7c1 100644 --- a/www/chromium/files/patch-services_network_network__context.h +++ b/www/chromium/files/patch-services_network_network__context.h @@ -1,11 +1,11 @@ ---- services/network/network_context.h.orig 2024-06-17 12:56:06 UTC +--- services/network/network_context.h.orig 2024-07-30 11:12:21 UTC +++ services/network/network_context.h -@@ -677,7 +677,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -685,7 +685,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext public: explicit NetworkContextHttpAuthPreferences(NetworkService* network_service); ~NetworkContextHttpAuthPreferences() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool AllowGssapiLibraryLoad() const override; #endif // BUILDFLAG(IS_LINUX) private: diff --git a/www/chromium/files/patch-services_network_public_cpp_features.cc b/www/chromium/files/patch-services_network_public_cpp_features.cc index bd768ce9937e..45e43dec5a59 100644 --- a/www/chromium/files/patch-services_network_public_cpp_features.cc +++ b/www/chromium/files/patch-services_network_public_cpp_features.cc @@ -1,11 +1,11 @@ ---- services/network/public/cpp/features.cc.orig 2023-12-10 06:10:27 UTC +--- services/network/public/cpp/features.cc.orig 2024-07-30 11:12:21 UTC +++ services/network/public/cpp/features.cc -@@ -98,7 +98,7 @@ BASE_FEATURE(kSplitAuthCacheByNetworkIsolationKey, +@@ -120,7 +120,7 @@ BASE_FEATURE(kSplitAuthCacheByNetworkIsolationKey, BASE_FEATURE(kDnsOverHttpsUpgrade, "DnsOverHttpsUpgrade", #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 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 c99a235595ce..7e381ef98166 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-06-17 12:56:06 UTC +--- services/network/public/mojom/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ services/network/public/mojom/BUILD.gn -@@ -524,11 +524,11 @@ mojom("url_loader_base") { +@@ -529,11 +529,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/40263697): Remove this once is_linux in the mojom IDL does # not include lacros. enabled_features += [ "use_network_interface_change_listener" ] -@@ -1489,7 +1489,7 @@ mojom("mojom") { +@@ -1495,7 +1495,7 @@ mojom("mojom") { } } - if (is_linux) { + if (is_linux && !is_bsd) { # TODO(crbug.com/40263697): 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-third__party_abseil-cpp_absl_base_config.h b/www/chromium/files/patch-third__party_abseil-cpp_absl_base_config.h index 1b735cf9bda2..cce87c58ceba 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 2024-03-22 08:19:40 UTC +--- third_party/abseil-cpp/absl/base/config.h.orig 2024-07-30 11:12:21 UTC +++ third_party/abseil-cpp/absl/base/config.h -@@ -448,7 +448,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != +@@ -412,7 +412,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 -@@ -463,7 +463,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != +@@ -427,7 +427,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 08ab41b43218..49e5aade1c73 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-06-17 12:56:06 UTC +--- third_party/angle/BUILD.gn.orig 2024-07-30 11:12:21 UTC +++ third_party/angle/BUILD.gn -@@ -339,7 +339,6 @@ config("extra_warnings") { +@@ -347,7 +347,6 @@ config("extra_warnings") { "-Wtautological-type-limit-compare", "-Wundefined-reinterpret-cast", "-Wunneeded-internal-declaration", - "-Wunused-but-set-variable", "-Wsuggest-destructor-override", "-Wsuggest-override", -@@ -516,7 +515,7 @@ template("angle_common_lib") { +@@ -524,7 +523,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" ] } -@@ -671,6 +670,9 @@ angle_static_library("angle_gpu_info_util") { +@@ -679,6 +678,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 1efaa5b7a797..c558774b5c7e 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-04-19 13:02:56 UTC +--- third_party/angle/src/libANGLE/Display.cpp.orig 2024-07-30 11:12:21 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_api.h" -@@ -419,7 +419,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -416,7 +416,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) { -@@ -465,7 +465,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -462,7 +462,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) { -@@ -516,7 +516,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -513,7 +513,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()) { -@@ -2158,7 +2158,7 @@ static ClientExtensions GenerateClientExtensions() +@@ -2157,7 +2157,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_platform_platform.h b/www/chromium/files/patch-third__party_blink_public_platform_platform.h index 9f079a88b353..a68528980834 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-04-12 16:47:14 UTC +--- third_party/blink/public/platform/platform.h.orig 2024-07-30 11:12:21 UTC +++ third_party/blink/public/platform/platform.h -@@ -347,7 +347,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -354,7 +354,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 03a7e6b3c6ae..6a2d6feae664 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-06-17 12:56:06 UTC +--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2024-07-30 11:12:21 UTC +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -425,7 +425,7 @@ SkFontHinting RendererPreferencesToSkiaHinting( +@@ -427,7 +427,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' -@@ -3388,7 +3388,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3380,7 +3380,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 9f0544eb398b..bd2f795c385f 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-05-21 18:07:39 UTC +--- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2024-07-30 11:12:21 UTC +++ third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -6472,7 +6472,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { +@@ -6471,7 +6471,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 \ -@@ -6881,7 +6881,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc +@@ -6880,7 +6880,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 0d00b733a18e..41e219120dbf 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-06-17 12:56:06 UTC +--- third_party/blink/renderer/core/layout/layout_view.cc.orig 2024-07-30 11:12:21 UTC +++ third_party/blink/renderer/core/layout/layout_view.cc @@ -72,7 +72,7 @@ #include "ui/display/screen_info.h" #include "ui/gfx/geometry/quad_f.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/platform/fonts/font_cache.h" #endif -@@ -799,7 +799,7 @@ void LayoutView::LayoutRoot() { +@@ -775,7 +775,7 @@ void LayoutView::LayoutRoot() { 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 7296016caceb..999b99c2c6f9 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-05-21 18:07:39 UTC +--- third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2024-07-30 11:12:21 UTC +++ third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc @@ -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; -@@ -370,7 +370,7 @@ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scr - const WebMouseEvent& event) { +@@ -371,7 +371,7 @@ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scr + const WebMouseEvent& event) const { // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (event.button == WebPointerProperties::Button::kMiddle) return true; #endif diff --git a/www/chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_features.gni b/www/chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_features.gni deleted file mode 100644 index 96fd2b54cc2a..000000000000 --- a/www/chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_features.gni +++ /dev/null @@ -1,10 +0,0 @@ ---- third_party/blink/renderer/modules/ml/webnn/features.gni.orig 2024-06-17 12:56:06 UTC -+++ third_party/blink/renderer/modules/ml/webnn/features.gni -@@ -7,6 +7,6 @@ declare_args() { - # This enables building WebNN with XNNPACK. Currently only available for - # Windows and macOS on x64, x86 and arm64. - build_webnn_with_xnnpack = -- (is_win || is_mac) && -+ !is_bsd && (is_win || is_mac) && - (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm64") - } diff --git a/www/chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc b/www/chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc deleted file mode 100644 index 52afa88caa76..000000000000 --- a/www/chromium/files/patch-third__party_blink_renderer_modules_ml_webnn_ml__graph__xnnpack.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc.orig 2024-04-19 13:02:56 UTC -+++ third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc -@@ -204,7 +204,7 @@ class SharedXnnpackContext : public ThreadSafeRefCount - - ~SharedXnnpackContext() { - base::AutoLock auto_lock(SharedXnnpackContextLock()); --#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) -+#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) - // For Linux and ChromeOS, cpuinfo needs to parse /proc/cpuinfo to - // initialize in pre sandbox stage. Calling xnn_deinitialize() here will - // deinitialize cpuinfo within sandbox and cannot access /proc/cpuinfo 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 e91c9e0ba6f4..e4d414563e6a 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-05-21 18:07:39 UTC +--- third_party/blink/renderer/modules/peerconnection/webrtc_audio_renderer_test.cc.orig 2024-07-30 11:12:21 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 03563be0cb7a..98789bf30a16 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-06-17 12:56:06 UTC +--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2024-07-30 11:12:21 UTC +++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -6353,7 +6353,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid +@@ -6310,7 +6310,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