diff --git a/www/chromium/Makefile b/www/chromium/Makefile index 2f3d576f644d..ec97861b4347 100644 --- a/www/chromium/Makefile +++ b/www/chromium/Makefile @@ -1,380 +1,380 @@ PORTNAME= chromium -PORTVERSION= 119.0.6045.199 +PORTVERSION= 120.0.6099.71 CATEGORIES= www wayland MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ https://nerd.hu/distfiles/:external DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ chrome-linux-${PORTVERSION}-llvm16.profdata${EXTRACT_SUFX}:external MAINTAINER= chromium@FreeBSD.org COMMENT= Google web browser based on WebKit WWW= https://www.chromium.org/Home LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi ONLY_FOR_ARCHS= aarch64 amd64 i386 BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ gperf:devel/gperf \ flock:sysutils/flock \ node:www/node \ xcb-proto>0:x11/xcb-proto \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} \ ${LOCALBASE}/include/va/va.h:multimedia/libva \ ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri \ ${LOCALBASE}/libdata/pkgconfig/Qt5Core.pc:devel/qt5-core \ ${LOCALBASE}/libdata/pkgconfig/Qt5Widgets.pc:x11-toolkits/qt5-widgets LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libepoll-shim.so:devel/libepoll-shim \ libevent.so:devel/libevent \ libffi.so:devel/libffi \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libdav1d.so:multimedia/dav1d \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic USES= bison compiler:c++17-lang cpe desktop-file-utils gl 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_nacl=false \ enable_remoting=false \ enable_rust=false \ enable_widevine=true \ fatal_linker_warnings=false \ icu_use_data_file=false \ is_clang=true \ optimize_webui=true \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=false \ use_lld=true \ use_partition_alloc=true \ use_partition_alloc_as_malloc=false \ use_sysroot=false \ use_system_freetype=false \ use_system_harfbuzz=true \ use_system_libffi=true \ use_system_libjpeg=true \ use_udev=false \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" \ ffmpeg_branding="${FFMPEG_BRAND}" # TODO: investigate building with these options: # use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles # FreeBSD Chromium Api Key # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . # Note: these are for FreeBSD use ONLY. For your own distribution, # please get your own set of keys. GN_ARGS+= google_api_key="AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8" SUB_FILES= chromium-browser.desktop chrome SUB_LIST+= COMMENT="${COMMENT}" OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS LTO PIPEWIRE TEST WIDEVINE OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS PIPEWIRE SNDIO OPTIONS_EXCLUDE_aarch64=LTO OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO OPTIONS_RADIO= KERBEROS OPTIONS_RADIO_KERBEROS= HEIMDAL HEIMDAL_BASE MIT OPTIONS_SUB= yes CODECS_DESC= Compile and enable patented codecs like H.264 DRIVER_DESC= Install chromedriver HEIMDAL_BASE_DESC= Heimdal Kerberos (base) HEIMDAL_DESC= Heimdal Kerberos (security/heimdal) MIT_DESC= MIT Kerberos (security/krb5) ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ alsa-lib>=1.1.1_1:audio/alsa-lib ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CODECS_VARS= GN_ARGS+=proprietary_codecs=true \ FFMPEG_BRAND="Chrome" CODECS_VARS_OFF= GN_ARGS+=proprietary_codecs=false \ FFMPEG_BRAND="Chromium" CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_BUILD_DEPENDS= esbuild:devel/esbuild DEBUG_VARS= BUILDTYPE=Debug \ GN_ARGS+=is_debug=true \ GN_ARGS+=is_component_build=false \ GN_ARGS+=symbol_level=1 \ GN_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="21 GB" DEBUG_VARS_OFF= BUILDTYPE=Release \ GN_ARGS+=blink_symbol_level=0 \ GN_ARGS+=is_debug=false \ GN_ARGS+=is_official_build=true \ GN_ARGS+=symbol_level=0 \ WANTSPACE="14 GB" DRIVER_MAKE_ARGS= chromedriver HEIMDAL_LIB_DEPENDS= libkrb.so.26:security/heimdal KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false LTO_VARS= GN_ARGS+=use_thin_lto=true \ GN_ARGS+=thin_lto_enable_optimizations=true \ WANTSPACE="14 GB" LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false MIT_LIB_DEPENDS= libkrb.so.3:security/krb5 PIPEWIRE_DESC= Screen capture via PipeWire PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire PIPEWIRE_VARS= GN_ARGS+=rtc_use_pipewire=true \ GN_ARGS+=rtc_link_pipewire=true PIPEWIRE_VARS_OFF= GN_ARGS+=rtc_use_pipewire=false \ GN_ARGS+=rtc_link_pipewire=false PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false # With SNDIO=on we exclude audio_manager_linux from the build (see # media/audio/BUILD.gn) and use audio_manager_openbsd which does not # support falling back to ALSA or PulseAudio. SNDIO_PREVENTS= ALSA PULSEAUDIO SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false WIDEVINE_DESC= Depend on foreign-cdm to enable playback of DRM content WIDEVINE_RUN_DEPENDS= foreign-cdm>0:www/foreign-cdm .include "Makefile.tests" TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX} \ test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz:external TEST_ALL_TARGET= ${TEST_TARGETS} .include .include # for COMPILER_VERSION .if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base .endif .if ${COMPILER_VERSION} < 160 LLVM_DEFAULT= 16 BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} BINARY_ALIAS+= cpp=${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} \ cc=${LOCALBASE}/bin/clang${LLVM_DEFAULT} \ c++=${LOCALBASE}/bin/clang++${LLVM_DEFAULT} \ ar=${LOCALBASE}/bin/llvm-ar${LLVM_DEFAULT} \ nm=${LOCALBASE}/bin/llvm-nm${LLVM_DEFAULT} \ ld=${LOCALBASE}/bin/ld.lld${LLVM_DEFAULT} .else BINARY_ALIAS+= ar=/usr/bin/llvm-ar \ nm=/usr/bin/llvm-nm .endif # - swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only # - map ffmpeg target to ${ARCH} .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " FFMPEG_TARGET= arm64 .elif ${ARCH} == amd64 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= x64 .elif ${ARCH} == i386 BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" FFMPEG_TARGET= ia32 .endif FFMPEG_BDIR= ${WRKSRC}/build.${FFMPEG_TARGET}.freebsd/${FFMPEG_BRAND} FFMPEG_CDIR= ${WRKSRC}/third_party/ffmpeg/chromium/config/${FFMPEG_BRAND}/freebsd/${FFMPEG_TARGET} # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include 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 snappy || ${FALSE} # Chromium uses an unreleased version of FFmpeg, so configure it cd ${WRKSRC}/third_party/ffmpeg && \ ${PYTHON_CMD} chromium/scripts/build_ffmpeg.py freebsd ${FFMPEG_TARGET} \ --config-only --branding=${FFMPEG_BRAND} cd ${FFMPEG_BDIR} && ${GMAKE} ffversion.h ${MKDIR} ${FFMPEG_CDIR} .for _e in config.h config.asm config_components.h libavcodec libavformat libavutil -${CP} -pR ${FFMPEG_BDIR}/${_e} ${FFMPEG_CDIR} .endfor do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin/node # Setup buildtools/freebsd @${MKDIR} ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKSRC}/buildtools/freebsd ${LN} -sf /usr/bin/strip ${WRKSRC}/buildtools/freebsd/strip do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ ${STAGEDIR}${MANPREFIX}/man/man1/chrome.1 @${SED} -i "" -e 's,\@\@PACKAGE\@\@,chromium,g;s,\@\@MENUNAME\@\@,Chromium Web Browser,g' \ ${STAGEDIR}${MANPREFIX}/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} .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 e7e1d4f098da..a1015b488604 100644 --- a/www/chromium/distinfo +++ b/www/chromium/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1701265076 -SHA256 (chromium-119.0.6045.199.tar.xz) = b1ae62beb7907d99802b74821d5198bd54a7456df1116d317da653bde8ce6388 -SIZE (chromium-119.0.6045.199.tar.xz) = 3324886804 -SHA256 (chrome-linux-119.0.6045.199-llvm16.profdata.tar.xz) = 534694b0e451aab2f19b7985d8084408587361ecf572d5b3924d731d434e4c75 -SIZE (chrome-linux-119.0.6045.199-llvm16.profdata.tar.xz) = 29275596 -SHA256 (chromium-119.0.6045.199-testdata.tar.xz) = e71ca534121263aa89b2d91823aada57fa16e4ccf2cf61dadbba53c06f453757 -SIZE (chromium-119.0.6045.199-testdata.tar.xz) = 271055096 +TIMESTAMP = 1702283408 +SHA256 (chromium-120.0.6099.71.tar.xz) = 604755e5838ef0fd1bff4d6c5023cdda2d42ce982dda2c4be44cce487d3dd8d8 +SIZE (chromium-120.0.6099.71.tar.xz) = 3283091280 +SHA256 (chrome-linux-120.0.6099.71-llvm16.profdata.tar.xz) = 64a9b67b85c2dadb712ef4cd3bd69beebaade0e5bce76d7fcf34076998ae222c +SIZE (chrome-linux-120.0.6099.71-llvm16.profdata.tar.xz) = 29574668 +SHA256 (chromium-120.0.6099.71-testdata.tar.xz) = b53c041f23afc082000c9779fa9e85a5ff61085219cf4642f860ef41118bb737 +SIZE (chromium-120.0.6099.71-testdata.tar.xz) = 268437032 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 f5eeec0d0910..baf600624b7b 100644 --- a/www/chromium/files/patch-BUILD.gn +++ b/www/chromium/files/patch-BUILD.gn @@ -1,89 +1,89 @@ ---- BUILD.gn.orig 2023-11-03 10:09:45 UTC +--- BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ BUILD.gn @@ -61,7 +61,7 @@ declare_args() { root_extra_deps = [] } -if (is_official_build) { +if (is_official_build && !is_bsd) { # An official (maximally optimized!) component (optimized for build times) # build doesn't make sense and usually doesn't work. assert(!is_component_build) @@ -95,7 +95,6 @@ group("gn_all") { "//codelabs", "//components:components_unittests", "//components/gwp_asan:gwp_asan_unittests", - "//infra/orchestrator:orchestrator_all", "//net:net_unittests", "//sandbox:sandbox_unittests", "//services:services_unittests", -@@ -417,7 +416,7 @@ group("gn_all") { +@@ -415,7 +414,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", -@@ -617,6 +616,15 @@ group("gn_all") { +@@ -615,6 +614,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", -@@ -666,7 +674,7 @@ group("gn_all") { +@@ -664,7 +672,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)" ] } -@@ -1094,7 +1102,7 @@ if (use_blink && !is_cronet_build) { +@@ -1085,7 +1093,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 = [ -@@ -1167,7 +1175,7 @@ if (use_blink && !is_cronet_build) { +@@ -1158,7 +1166,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)" ] } -@@ -1176,7 +1184,7 @@ if (use_blink && !is_cronet_build) { +@@ -1167,7 +1175,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)" ] } -@@ -1637,7 +1645,7 @@ group("chromium_builder_perf") { +@@ -1632,7 +1640,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-apps_ui_views_app__window__frame__view.cc b/www/chromium/files/patch-apps_ui_views_app__window__frame__view.cc index 2ac2dff2a8b1..5a5c36cb56ea 100644 --- a/www/chromium/files/patch-apps_ui_views_app__window__frame__view.cc +++ b/www/chromium/files/patch-apps_ui_views_app__window__frame__view.cc @@ -1,11 +1,11 @@ ---- apps/ui/views/app_window_frame_view.cc.orig 2022-07-22 17:30:31 UTC +--- apps/ui/views/app_window_frame_view.cc.orig 2023-12-10 06:10:27 UTC +++ apps/ui/views/app_window_frame_view.cc -@@ -137,7 +137,7 @@ gfx::Rect AppWindowFrameView::GetWindowBoundsForClient +@@ -149,7 +149,7 @@ gfx::Rect AppWindowFrameView::GetWindowBoundsForClient gfx::Rect window_bounds = client_bounds; // 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) // Get the difference between the widget's client area bounds and window // bounds, and grow |window_bounds| by that amount. gfx::Insets native_frame_insets = diff --git a/www/chromium/files/patch-base_BUILD.gn b/www/chromium/files/patch-base_BUILD.gn index 5b963cf8b0ce..2b75b819fc0b 100644 --- a/www/chromium/files/patch-base_BUILD.gn +++ b/www/chromium/files/patch-base_BUILD.gn @@ -1,143 +1,143 @@ ---- base/BUILD.gn.orig 2023-11-03 10:09:45 UTC +--- base/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ base/BUILD.gn @@ -186,7 +186,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" -@@ -1101,11 +1101,23 @@ component("base") { +@@ -1105,11 +1105,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" ] -@@ -1125,7 +1137,7 @@ component("base") { +@@ -1129,7 +1141,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" ] } -@@ -2077,6 +2089,22 @@ component("base") { +@@ -2088,6 +2100,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 += [ -@@ -2209,6 +2237,29 @@ component("base") { +@@ -2220,6 +2248,29 @@ component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/scoped_file_linux.cc", + "system/sys_info_linux.cc", + "process/process_iterator_linux.cc", + "process/process_linux.cc", + "process/process_metrics_linux.cc", + "process/process_handle_linux.cc", + "profiler/stack_copier_signal.cc", + "profiler/stack_copier_signal.h", + "profiler/thread_delegate_posix.cc", + "profiler/thread_delegate_posix.h", + "threading/platform_thread_linux.cc", + ] + 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", -@@ -2219,7 +2270,7 @@ component("base") { +@@ -2230,7 +2281,7 @@ component("base") { } if (dep_libevent) { - deps += [ "//third_party/libevent" ] + public_deps += [ "//third_party/libevent" ] } if (use_libevent) { -@@ -3599,7 +3650,7 @@ test("base_unittests") { +@@ -3619,7 +3670,7 @@ test("base_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "debug/proc_maps_linux_unittest.cc", "files/scoped_file_linux_unittest.cc", -@@ -3620,7 +3671,7 @@ test("base_unittests") { +@@ -3640,7 +3691,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", -@@ -3631,7 +3682,7 @@ test("base_unittests") { +@@ -3651,7 +3702,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" ] } -@@ -3892,7 +3943,7 @@ test("base_unittests") { +@@ -3913,7 +3964,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__base_threading_platform__thread__posix.cc b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__posix.cc deleted file mode 100644 index 16c4bd4b3273..000000000000 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__posix.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix.cc.orig 2022-07-22 17:30:31 UTC -+++ base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix.cc -@@ -17,7 +17,7 @@ - #include "base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_internal_posix.h" - #include "build/build_config.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include - #include - #endif diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_BUILD.gn b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn similarity index 57% rename from www/chromium/files/patch-base_allocator_partition__allocator_BUILD.gn rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn index 6e536995020b..6992e20bcc87 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_BUILD.gn +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_BUILD.gn @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/BUILD.gn.orig 2023-11-03 10:09:45 UTC -+++ base/allocator/partition_allocator/BUILD.gn -@@ -569,7 +569,7 @@ source_set("allocator_shim") { +--- base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/BUILD.gn +@@ -582,7 +582,7 @@ source_set("allocator_shim") { ] configs += [ ":mac_no_default_new_delete_symbols" ] } - if (is_chromeos || is_linux) { + if ((is_chromeos || is_linux) && !is_bsd) { sources += [ "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_address__space__randomization.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h similarity index 77% rename from www/chromium/files/patch-base_allocator_partition__allocator_address__space__randomization.h rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_address__space__randomization.h index f0c73dce41c5..4b346bf37208 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_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/address_space_randomization.h.orig 2023-09-13 12:11:42 UTC -+++ base/allocator/partition_allocator/address_space_randomization.h +--- base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h.orig 2023-12-10 06:10:27 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 defined(MEMORY_TOOL_REPLACES_ALLOCATOR) + #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && !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 @@ -124,7 +124,7 @@ AslrMask(uintptr_t bits) { return AslrAddress(0x20000000ULL); } - #elif BUILDFLAG(IS_LINUX) + #elif BUILDFLAG(IS_LINUX) || 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_page__allocator.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h similarity index 65% rename from www/chromium/files/patch-base_allocator_partition__allocator_page__allocator.h rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator.h index 8726436650ff..9111045d8c2a 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_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/page_allocator.h.orig 2023-09-13 12:11:42 UTC -+++ base/allocator/partition_allocator/page_allocator.h +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator.h.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/page_allocator.h @@ -258,7 +258,7 @@ void 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) return false; #else return true; diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__constants.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h similarity index 90% rename from www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__constants.h rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h index 145f377eb0dd..ddd3c1b7a34b 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__constants.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__constants.h @@ -1,38 +1,38 @@ ---- base/allocator/partition_allocator/page_allocator_constants.h.orig 2023-09-13 12:11:42 UTC -+++ base/allocator/partition_allocator/page_allocator_constants.h +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h @@ -25,7 +25,7 @@ // elimination. #define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // This should work for all POSIX (if needed), but currently all other // supported OS/architecture combinations use either hard-coded values // (such as x86) or have means to determine these values without needing @@ -92,7 +92,7 @@ PageAllocationGranularityShift() { return 14; // 16kB #elif BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS) return static_cast(vm_page_shift); -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16) // page sizes. Retrieve from or initialize cache. size_t shift = page_characteristics.shift.load(std::memory_order_relaxed); @@ -113,7 +113,7 @@ PageAllocationGranularity() { // This is literally equivalent to |1 << PageAllocationGranularityShift()| // below, but was separated out for IS_APPLE to avoid << on a non-constexpr. return vm_page_size; -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // arm64 supports 4kb, 16kb, and 64kb page sizes. Retrieve from or // initialize cache. size_t size = page_characteristics.size.load(std::memory_order_relaxed); @@ -152,7 +152,7 @@ SystemPageShift() { PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t SystemPageSize() { #if (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ - (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) // This is literally equivalent to |1 << SystemPageShift()| below, but was // separated out for 64-bit IS_APPLE and arm64 on Linux to avoid << on a // non-constexpr. diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h similarity index 71% rename from www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_page__allocator__internals__posix.h index 8ebb534e492c..b8293b574e93 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_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/page_allocator_internals_posix.h.orig 2023-09-13 12:11:42 UTC -+++ base/allocator/partition_allocator/page_allocator_internals_posix.h +--- base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h @@ -403,8 +403,12 @@ bool TryRecommitSystemPagesInternal( void DiscardSystemPagesInternal(uintptr_t address, size_t length) { void* ptr = reinterpret_cast(address); -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) +#if BUILDFLAG(IS_BSD) + int ret = madvise(ptr, length, MADV_FREE); +#else int ret = madvise(ptr, length, MADV_FREE_REUSABLE); +#endif if (ret) { // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED. ret = madvise(ptr, length, MADV_DONTNEED); diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__address__space.cc similarity index 56% rename from www/chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__address__space.cc index 64902138740f..8839689ed93f 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__address__space.cc @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/partition_address_space.cc.orig 2023-07-16 15:47:57 UTC -+++ base/allocator/partition_allocator/partition_address_space.cc +--- base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc @@ -420,7 +420,7 @@ void PartitionAddressSpace::UninitThreadIsolatedPoolFo } #endif -#if BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) PageCharacteristics page_characteristics; diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_compiler__specific.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_compiler__specific.h similarity index 85% rename from www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_compiler__specific.h rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_compiler__specific.h index dc3afba1a5f2..11f8157622fd 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_compiler__specific.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_compiler__specific.h @@ -1,32 +1,32 @@ ---- base/allocator/partition_allocator/partition_alloc_base/compiler_specific.h.orig 2023-04-28 17:01:32 UTC -+++ base/allocator/partition_allocator/partition_alloc_base/compiler_specific.h +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h @@ -24,9 +24,9 @@ // Annotate a function indicating it should not be inlined. // Use like: // NOINLINE void DoStuff() { ... } -#if defined(__clang__) && PA_HAS_ATTRIBUTE(noinline) +#if defined(__clang__) && (__clang_major__ >= 15) && PA_HAS_ATTRIBUTE(noinline) #define PA_NOINLINE [[clang::noinline]] -#elif defined(COMPILER_GCC) && PA_HAS_ATTRIBUTE(noinline) +#elif (defined(COMPILER_GCC) || defined(__clang__)) && PA_HAS_ATTRIBUTE(noinline) #define PA_NOINLINE __attribute__((noinline)) #elif defined(COMPILER_MSVC) #define PA_NOINLINE __declspec(noinline) @@ -34,7 +34,7 @@ #define PA_NOINLINE #endif -#if defined(__clang__) && defined(NDEBUG) && PA_HAS_ATTRIBUTE(always_inline) +#if defined(__clang__) && (__clang_major__ >= 15) && defined(NDEBUG) && PA_HAS_ATTRIBUTE(always_inline) #define PA_ALWAYS_INLINE [[clang::always_inline]] inline #elif defined(COMPILER_GCC) && defined(NDEBUG) && \ PA_HAS_ATTRIBUTE(always_inline) @@ -53,7 +53,7 @@ // prevent code folding, see NO_CODE_FOLDING() in base/debug/alias.h. // Use like: // void NOT_TAIL_CALLED FooBar(); -#if defined(__clang__) && PA_HAS_ATTRIBUTE(not_tail_called) +#if defined(__clang__) && (__clang_major__ >= 15) && PA_HAS_ATTRIBUTE(not_tail_called) #define PA_NOT_TAIL_CALLED [[clang::not_tail_called]] #else #define PA_NOT_TAIL_CALLED diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_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 similarity index 79% rename from www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_debug_stack__trace__posix.cc rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_debug_stack__trace__posix.cc index 0ece3b6b4ed4..22626a8ed63b 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_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/partition_alloc_base/debug/stack_trace_posix.cc.orig 2023-11-03 10:09:45 UTC -+++ base/allocator/partition_allocator/partition_alloc_base/debug/stack_trace_posix.cc +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc @@ -12,11 +12,11 @@ #include #include -#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) #include // For ElfW() macro. #endif -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) #define HAVE_DLADDR #include #endif @@ -25,7 +25,7 @@ namespace partition_alloc::internal::base::debug { namespace { -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) constexpr size_t kBufferSize = 4096u; @@ -359,7 +359,7 @@ void PrintStackTraceInternal(const void** trace, size_ } #endif // !BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || 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_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 similarity index 63% rename from www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_rand__util__posix.cc index 4037fa16ac16..0f9f18c3a666 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_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/partition_alloc_base/rand_util_posix.cc.orig 2023-09-13 12:11:42 UTC -+++ base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc @@ -90,6 +90,10 @@ void RandBytes(void* output, size_t output_length) { if (getentropy(output, output_length) == 0) { return; } +#elif 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_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 similarity index 61% rename from www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__internal__posix.h rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__internal__posix.h index dfe57178caab..d84248567e0d 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_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/partition_alloc_base/threading/platform_thread_internal_posix.h.orig 2022-07-22 17:30:31 UTC -+++ base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_internal_posix.h +--- 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 @@ -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) // 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 new file mode 100644 index 000000000000..8b6869e4e508 --- /dev/null +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__base_threading_platform__thread__posix.cc @@ -0,0 +1,11 @@ +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc +@@ -17,7 +17,7 @@ + #include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h" + #include "build/build_config.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include + #include + #endif diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h similarity index 81% rename from www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h index 76697bda70fb..3b80c68f3ac5 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__config.h @@ -1,29 +1,29 @@ ---- base/allocator/partition_allocator/partition_alloc_config.h.orig 2023-10-11 18:22:24 UTC -+++ base/allocator/partition_allocator/partition_alloc_config.h +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h @@ -94,7 +94,7 @@ static_assert(sizeof(void*) != 8, ""); // POSIX is not only UNIX, e.g. macOS and other OSes. We do use Linux-specific // features such as futex(2). #define PA_CONFIG_HAS_LINUX_KERNEL() \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)) // On some platforms, we implement locking by spinning in userspace, then going // into the kernel only if there is contention. This requires platform support, -@@ -237,7 +237,7 @@ constexpr bool kUseLazyCommit = false; +@@ -241,7 +241,7 @@ constexpr bool kUseLazyCommit = false; // On these platforms, lock all the partitions before fork(), and unlock after. // This may be required on more platforms in the future. #define PA_CONFIG_HAS_ATFORK_HANDLER() \ - (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // PartitionAlloc uses PartitionRootEnumerator to acquire all // PartitionRoots at BeforeFork and to release at AfterFork. -@@ -284,7 +284,7 @@ constexpr bool kUseLazyCommit = false; +@@ -288,7 +288,7 @@ constexpr bool kUseLazyCommit = false; // Also enabled on ARM64 macOS, as the 16kiB pages on this platform lead to // larger slot spans. #define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() \ - (BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64))) + (BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD)) // Enable shadow metadata. // diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h similarity index 79% rename from www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h index 5c447ca562b3..8c10b4910410 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__constants.h @@ -1,21 +1,21 @@ ---- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2023-11-03 10:09:45 UTC -+++ base/allocator/partition_allocator/partition_alloc_constants.h +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h @@ -107,7 +107,7 @@ PartitionPageShift() { return 18; // 256 KiB } #elif (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ - (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t PartitionPageShift() { return PageAllocationGranularityShift() + 2; @@ -309,7 +309,8 @@ constexpr size_t kNumPools = kMaxPoolHandle - 1; // 8GB for each of the glued pools). #if BUILDFLAG(HAS_64_BIT_POINTERS) #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || \ - BUILDFLAG(ENABLE_POINTER_COMPRESSION) + BUILDFLAG(ENABLE_POINTER_COMPRESSION) || \ + BUILDFLAG(IS_BSD) constexpr size_t kPoolMaxSize = 8 * kGiB; #else constexpr size_t kPoolMaxSize = 16 * kGiB; diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__forward.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h similarity index 76% rename from www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__forward.h rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h index 54cb3fd3b9f8..f6a75c332ad9 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__forward.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__alloc__forward.h @@ -1,16 +1,16 @@ ---- base/allocator/partition_allocator/partition_alloc_forward.h.orig 2023-08-17 07:33:31 UTC -+++ base/allocator/partition_allocator/partition_alloc_forward.h +--- base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h @@ -28,9 +28,13 @@ namespace internal { // the second one 16. We could technically return something different for // malloc() and operator new(), but this would complicate things, and most of // our allocations are presumably coming from operator new() anyway. +#if defined(__i386__) && defined(OS_FREEBSD) +constexpr size_t kAlignment = 8; +#else constexpr size_t kAlignment = std::max(alignof(max_align_t), static_cast(__STDCPP_DEFAULT_NEW_ALIGNMENT__)); +#endif static_assert(kAlignment <= 16, "PartitionAlloc doesn't support a fundamental alignment larger " "than 16 bytes."); diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__page__constants.h b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__page__constants.h similarity index 74% rename from www/chromium/files/patch-base_allocator_partition__allocator_partition__page__constants.h rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__page__constants.h index 894474e95464..6039cc6249dd 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__page__constants.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__page__constants.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/partition_page_constants.h.orig 2023-08-17 07:33:31 UTC -+++ base/allocator/partition_allocator/partition_page_constants.h +--- base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h @@ -16,7 +16,7 @@ namespace partition_alloc::internal { // (1 << 12 or 1 << 14), as checked in PartitionRoot::Init(). And // PartitionPageSize() is 4 times the OS page size. static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 14) / kSmallestBucket; -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // System page size can be 4, 16, or 64 kiB on Linux on arm64. 64 kiB is // currently (kMaxSlotsPerSlotSpanBits == 13) not supported by the code, // so we use the 16 kiB maximum (64 kiB will crash). diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__root.cc b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc similarity index 90% rename from www/chromium/files/patch-base_allocator_partition__allocator_partition__root.cc rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc index 81eda43af37c..5f8b8f572389 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__root.cc +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc @@ -1,38 +1,38 @@ ---- base/allocator/partition_allocator/partition_root.cc.orig 2023-10-11 18:22:24 UTC -+++ base/allocator/partition_allocator/partition_root.cc +--- base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/partition_root.cc @@ -47,7 +47,7 @@ #include "wow64apiset.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #endif @@ -281,7 +281,7 @@ void PartitionAllocMallocInitOnce() { return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // When fork() is called, only the current thread continues to execute in the // child process. If the lock is held, but *not* by this thread when fork() is // called, we have a deadlock. @@ -379,7 +379,7 @@ static size_t PartitionPurgeSlotSpan(PartitionRoot* ro constexpr size_t kMaxSlotCount = (PartitionPageSize() * kMaxPartitionPagesPerRegularSlotSpan) / MinPurgeableSlotSize(); -#elif BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) +#elif BUILDFLAG(IS_APPLE) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) // It's better for slot_usage to be stack-allocated and fixed-size, which // demands that its size be constexpr. On IS_APPLE and Linux on arm64, // PartitionPageSize() is always SystemPageSize() << 2, so regardless of @@ -948,7 +948,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) // 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_spinning__mutex.cc b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc similarity index 91% rename from www/chromium/files/patch-base_allocator_partition__allocator_spinning__mutex.cc rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc index 18e218951b18..0f223a7fbc08 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_spinning__mutex.cc +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_spinning__mutex.cc @@ -1,53 +1,53 @@ ---- base/allocator/partition_allocator/spinning_mutex.cc.orig 2023-04-28 17:01:32 UTC -+++ base/allocator/partition_allocator/spinning_mutex.cc +--- base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc @@ -18,7 +18,16 @@ #if PA_CONFIG(HAS_LINUX_KERNEL) #include +#if defined(OS_OPENBSD) +#include +#include +#elif defined(OS_FREEBSD) +#include +#include +#include +#else #include +#endif #include #include #endif // PA_CONFIG(HAS_LINUX_KERNEL) @@ -108,8 +117,16 @@ void SpinningMutex::FutexWait() { // |kLockedContended| anymore. Note that even without spurious wakeups, the // value of |state_| is not guaranteed when this returns, as another thread // may get the lock before we get to run. +#if defined(OS_FREEBSD) + int err = _umtx_op(&state_, UMTX_OP_WAIT_UINT_PRIVATE, + kLockedContended, nullptr, nullptr); +#elif defined(OS_OPENBSD) + int err = futex(reinterpret_cast(&state_), FUTEX_WAIT | FUTEX_PRIVATE_FLAG, + kLockedContended, nullptr, nullptr); +#else int err = syscall(SYS_futex, &state_, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, kLockedContended, nullptr, nullptr, 0); +#endif if (err) { // These are programming error, check them. @@ -121,8 +138,16 @@ void SpinningMutex::FutexWait() { void SpinningMutex::FutexWake() { int saved_errno = errno; +#if defined(OS_FREEBSD) + long retval = _umtx_op(&state_, UMTX_OP_WAKE_PRIVATE, + 1 /* wake up a single waiter */, nullptr, nullptr); +#elif defined(OS_OPENBSD) + long retval = futex(reinterpret_cast(&state_), FUTEX_WAKE | FUTEX_PRIVATE_FLAG, + 1 /* wake up a single waiter */, nullptr, nullptr); +#else long retval = syscall(SYS_futex, &state_, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1 /* wake up a single waiter */, nullptr, nullptr, 0); +#endif PA_CHECK(retval != -1); errno = saved_errno; } diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_starscan_stack_stack.cc b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_starscan_stack_stack.cc similarity index 84% rename from www/chromium/files/patch-base_allocator_partition__allocator_starscan_stack_stack.cc rename to www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_starscan_stack_stack.cc index b23fc020f238..55e38ef752fd 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_starscan_stack_stack.cc +++ b/www/chromium/files/patch-base_allocator_partition__allocator_src_partition__alloc_starscan_stack_stack.cc @@ -1,50 +1,50 @@ ---- base/allocator/partition_allocator/starscan/stack/stack.cc.orig 2023-09-13 12:11:42 UTC -+++ base/allocator/partition_allocator/starscan/stack/stack.cc +--- base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.cc.orig 2023-12-10 06:10:27 UTC ++++ base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.cc @@ -18,6 +18,10 @@ #include #endif +#if BUILDFLAG(IS_BSD) +#include +#endif + #if defined(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) + +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) + +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) diff --git a/www/chromium/files/patch-base_debug_stack__trace.cc b/www/chromium/files/patch-base_debug_stack__trace.cc index 4b542b972e47..7d4f7d7b5772 100644 --- a/www/chromium/files/patch-base_debug_stack__trace.cc +++ b/www/chromium/files/patch-base_debug_stack__trace.cc @@ -1,21 +1,21 @@ ---- base/debug/stack_trace.cc.orig 2023-03-09 06:31:50 UTC +--- base/debug/stack_trace.cc.orig 2023-12-10 06:10:27 UTC +++ base/debug/stack_trace.cc -@@ -273,7 +273,9 @@ void StackTrace::Print() const { +@@ -266,7 +266,9 @@ void StackTrace::Print() const { } void StackTrace::OutputToStream(std::ostream* os) const { +#if !BUILDFLAG(IS_BSD) OutputToStreamWithPrefix(os, nullptr); +#endif } std::string StackTrace::ToString() const { -@@ -281,7 +283,7 @@ std::string StackTrace::ToString() const { +@@ -274,7 +276,7 @@ std::string StackTrace::ToString() const { } std::string StackTrace::ToStringWithPrefix(const char* 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(); 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 e53f2a38c872..d6e40245206e 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 2023-11-03 10:09:45 UTC +--- base/files/file_path_watcher_unittest.cc.orig 2023-12-10 06:10:27 UTC +++ base/files/file_path_watcher_unittest.cc -@@ -705,7 +705,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { +@@ -703,7 +703,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(https://crbug.com/1432064): Expect that no events are fired on Mac. -@@ -1641,7 +1641,7 @@ namespace { +@@ -1639,7 +1639,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; -@@ -1675,7 +1675,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi +@@ -1673,7 +1673,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__unittest.cc b/www/chromium/files/patch-base_files_file__util__unittest.cc index 7c9e00b671a6..570787738725 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 2023-05-31 08:12:17 UTC +--- base/files/file_util_unittest.cc.orig 2023-12-10 06:10:27 UTC +++ base/files/file_util_unittest.cc -@@ -3871,7 +3871,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { +@@ -3878,7 +3878,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"; -@@ -4594,7 +4594,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles +@@ -4601,7 +4601,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_linux__util.cc b/www/chromium/files/patch-base_linux__util.cc index 11c5c85b2388..ed2de441c529 100644 --- a/www/chromium/files/patch-base_linux__util.cc +++ b/www/chromium/files/patch-base_linux__util.cc @@ -1,28 +1,25 @@ ---- base/linux_util.cc.orig 2023-09-13 12:11:42 UTC +--- base/linux_util.cc.orig 2023-12-10 06:10:27 UTC +++ base/linux_util.cc @@ -15,6 +15,7 @@ #include #include +#include #include "base/base_export.h" #include "base/files/dir_reader_posix.h" -@@ -135,6 +136,9 @@ void SetLinuxDistro(const std::string& distro) { +@@ -153,10 +154,14 @@ void SetLinuxDistro(const std::string& distro) { } bool GetThreadsForProcess(pid_t pid, std::vector* tids) { +#if BUILDFLAG(IS_BSD) + return false; +#else // 25 > strlen("/proc//task") + strlen(std::to_string(INT_MAX)) + 1 = 22 char buf[25]; strings::SafeSPrintf(buf, "/proc/%d/task", pid); -@@ -152,6 +156,7 @@ bool GetThreadsForProcess(pid_t pid, std::vector* tids) { diff --git a/www/chromium/files/patch-base_posix_sysctl.cc b/www/chromium/files/patch-base_posix_sysctl.cc deleted file mode 100644 index 369f0aca416b..000000000000 --- a/www/chromium/files/patch-base_posix_sysctl.cc +++ /dev/null @@ -1,10 +0,0 @@ ---- base/posix/sysctl.cc.orig 2023-11-06 14:11:03 UTC -+++ base/posix/sysctl.cc -@@ -4,6 +4,7 @@ - - #include "base/posix/sysctl.h" - -+#include - #include - - #include diff --git a/www/chromium/files/patch-base_process_process__metrics.h b/www/chromium/files/patch-base_process_process__metrics.h index 155f9908a1f8..6401065f7738 100644 --- a/www/chromium/files/patch-base_process_process__metrics.h +++ b/www/chromium/files/patch-base_process_process__metrics.h @@ -1,120 +1,120 @@ ---- base/process/process_metrics.h.orig 2023-09-13 12:11:42 UTC +--- base/process/process_metrics.h.orig 2023-12-10 06:10:27 UTC +++ base/process/process_metrics.h @@ -37,7 +37,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) #include #include #include @@ -50,7 +50,7 @@ namespace base { // Full declaration is in process_metrics_iocounters.h. struct IoCounters; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Minor and major page fault counts since the process creation. // Both counts are process-wide, and exclude child processes. // @@ -105,7 +105,7 @@ class BASE_EXPORT ProcessMetrics { // convenience wrapper for CreateProcessMetrics(). static std::unique_ptr CreateCurrentProcessMetrics(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Resident Set Size is a Linux/Android specific memory concept. Do not // attempt to extend this to other platforms. BASE_EXPORT size_t GetResidentSetSize() const; @@ -163,7 +163,7 @@ class BASE_EXPORT ProcessMetrics { #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Emits the cumulative CPU usage for all currently active threads since they // were started into the output parameter (replacing its current contents). // Threads that have already terminated will not be reported. Thus, the sum of -@@ -223,7 +223,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -219,7 +219,7 @@ class BASE_EXPORT ProcessMetrics { int GetOpenFdSoftLimit() const; #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Bytes of swap as reported by /proc/[pid]/status. uint64_t GetVmSwapBytes() const; -@@ -244,7 +244,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -240,7 +240,7 @@ class BASE_EXPORT ProcessMetrics { #endif // !BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups); #endif #if BUILDFLAG(IS_APPLE) -@@ -266,9 +266,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -262,9 +262,7 @@ class BASE_EXPORT ProcessMetrics { // Used to store the previous times and CPU usage counts so we can // compute the CPU usage between calls. TimeTicks last_cpu_time_; -#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) TimeDelta last_cumulative_cpu_; -#endif #if BUILDFLAG(IS_WIN) TimeTicks last_cpu_time_for_precise_cpu_usage_; -@@ -276,7 +274,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -272,7 +270,7 @@ class BASE_EXPORT ProcessMetrics { #endif #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Same thing for idle wakeups. TimeTicks last_idle_wakeups_time_; uint64_t last_absolute_idle_wakeups_; -@@ -316,7 +314,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de +@@ -313,7 +311,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Data about system-wide memory consumption. Values are in KB. Available on // Windows, Mac, Linux, Android and Chrome OS. // -@@ -351,7 +349,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -348,7 +346,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // This provides an estimate of available memory as described here: // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773 // NOTE: this is ONLY valid in kernels 3.14 and up. Its value will always -@@ -366,7 +364,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -363,7 +361,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { #endif #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) int buffers = 0; int cached = 0; int active_anon = 0; -@@ -403,7 +401,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK +@@ -400,7 +398,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK // BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Parse the data found in /proc//stat and return the sum of the // CPU-related ticks. Returns -1 on parse error. // Exposed for testing. -@@ -591,7 +589,7 @@ class BASE_EXPORT SystemMetrics { +@@ -588,7 +586,7 @@ class BASE_EXPORT SystemMetrics { FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics); size_t committed_memory_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) SystemMemoryInfoKB memory_info_; VmStatInfo vmstat_info_; SystemDiskInfo disk_info_; diff --git a/www/chromium/files/patch-base_process_process__metrics__unittest.cc b/www/chromium/files/patch-base_process_process__metrics__unittest.cc index 1e4ff0087053..76c4bee3e7de 100644 --- a/www/chromium/files/patch-base_process_process__metrics__unittest.cc +++ b/www/chromium/files/patch-base_process_process__metrics__unittest.cc @@ -1,20 +1,18 @@ ---- base/process/process_metrics_unittest.cc.orig 2022-09-24 10:57:32 UTC +--- base/process/process_metrics_unittest.cc.orig 2023-12-10 06:10:27 UTC +++ base/process/process_metrics_unittest.cc -@@ -44,7 +44,7 @@ namespace debug { +@@ -35,13 +35,13 @@ + #include + #endif - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - - namespace { - -@@ -347,7 +347,7 @@ TEST_F(SystemMetricsTest, ParseVmstat) { +-#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/process/internal_linux.h" + #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || \ -- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - - // Test that ProcessMetrics::GetPlatformIndependentCPUUsage() doesn't return - // negative values when the number of threads running on the process decreases +- BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) ++ BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) + #define ENABLE_CPU_TESTS 1 + #else + #define ENABLE_CPU_TESTS 0 diff --git a/www/chromium/files/patch-base_profiler_module__cache.cc b/www/chromium/files/patch-base_profiler_module__cache.cc index d2fcd1f8f6a2..303168351150 100644 --- a/www/chromium/files/patch-base_profiler_module__cache.cc +++ b/www/chromium/files/patch-base_profiler_module__cache.cc @@ -1,11 +1,11 @@ ---- base/profiler/module_cache.cc.orig 2023-09-13 12:11:42 UTC +--- base/profiler/module_cache.cc.orig 2023-12-10 06:10:27 UTC +++ base/profiler/module_cache.cc -@@ -52,7 +52,7 @@ std::string TransformModuleIDToSymbolServerFormat(Stri +@@ -37,7 +37,7 @@ std::string TransformModuleIDToSymbolServerFormat(Stri // Android and Linux Chrome builds use the "breakpad" format to index their // build id, so we transform the build id for these platforms. All other // platforms keep their symbols indexed by the original build ID. -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux ELF module IDs are 160bit integers, which we need to mangle // down to 128bit integers to match the id that Breakpad outputs. // Example on version '66.0.3359.170' x64: diff --git a/www/chromium/files/patch-base_rand__util.h b/www/chromium/files/patch-base_rand__util.h index f3cfae0331e7..a1c4ee0e99d8 100644 --- a/www/chromium/files/patch-base_rand__util.h +++ b/www/chromium/files/patch-base_rand__util.h @@ -1,11 +1,11 @@ ---- base/rand_util.h.orig 2023-05-31 08:12:17 UTC +--- base/rand_util.h.orig 2023-12-10 06:10:27 UTC +++ base/rand_util.h -@@ -121,7 +121,7 @@ void RandomShuffle(Itr first, Itr last) { +@@ -136,7 +136,7 @@ void RandomShuffle(Itr first, Itr last) { std::shuffle(first, last, RandomBitGenerator()); } -#if BUILDFLAG(IS_POSIX) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_BSD) BASE_EXPORT int GetUrandomFD(); #endif diff --git a/www/chromium/files/patch-base_system_sys__info.cc b/www/chromium/files/patch-base_system_sys__info.cc index 82261072f1b8..99d66657e417 100644 --- a/www/chromium/files/patch-base_system_sys__info.cc +++ b/www/chromium/files/patch-base_system_sys__info.cc @@ -1,11 +1,11 @@ ---- base/system/sys_info.cc.orig 2023-09-13 12:11:42 UTC +--- base/system/sys_info.cc.orig 2023-12-10 06:10:27 UTC +++ base/system/sys_info.cc -@@ -166,7 +166,7 @@ std::string SysInfo::HardwareModelName() { +@@ -225,7 +225,7 @@ std::string SysInfo::HardwareModelName() { #endif void SysInfo::GetHardwareInfo(base::OnceCallback callback) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) constexpr base::TaskTraits kTraits = {base::MayBlock()}; #else constexpr base::TaskTraits kTraits = {}; diff --git a/www/chromium/files/patch-base_system_sys__info.h b/www/chromium/files/patch-base_system_sys__info.h index de4a240b92d3..a843f72d860a 100644 --- a/www/chromium/files/patch-base_system_sys__info.h +++ b/www/chromium/files/patch-base_system_sys__info.h @@ -1,20 +1,20 @@ ---- base/system/sys_info.h.orig 2023-11-03 10:09:45 UTC +--- base/system/sys_info.h.orig 2023-12-10 06:10:27 UTC +++ base/system/sys_info.h -@@ -304,6 +304,8 @@ class BASE_EXPORT SysInfo { +@@ -321,6 +321,8 @@ class BASE_EXPORT SysInfo { static void ResetCpuSecurityMitigationsEnabledForTesting(); #endif + static uint64_t MaxSharedMemorySize(); + private: friend class test::ScopedAmountOfPhysicalMemoryOverride; FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory); -@@ -316,7 +318,7 @@ class BASE_EXPORT SysInfo { +@@ -333,7 +335,7 @@ class BASE_EXPORT SysInfo { static HardwareInfo GetHardwareInfoSync(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) static uint64_t AmountOfAvailablePhysicalMemory( const SystemMemoryInfoKB& meminfo); #endif diff --git a/www/chromium/files/patch-base_system_sys__info__posix.cc b/www/chromium/files/patch-base_system_sys__info__posix.cc index 53dab4f47d3d..2334fe9e6157 100644 --- a/www/chromium/files/patch-base_system_sys__info__posix.cc +++ b/www/chromium/files/patch-base_system_sys__info__posix.cc @@ -1,29 +1,29 @@ ---- base/system/sys_info_posix.cc.orig 2023-08-17 07:33:31 UTC +--- base/system/sys_info_posix.cc.orig 2023-12-10 06:10:27 UTC +++ base/system/sys_info_posix.cc @@ -117,7 +117,7 @@ bool GetDiskSpaceInfo(const base::FilePath& path, namespace base { -#if !BUILDFLAG(IS_OPENBSD) +#if !BUILDFLAG(IS_BSD) + // static int SysInfo::NumberOfProcessors() { #if BUILDFLAG(IS_MAC) - absl::optional number_of_physical_cores = -@@ -161,7 +161,7 @@ int SysInfo::NumberOfProcessors() { +@@ -174,7 +174,7 @@ int SysInfo::NumberOfProcessors() { - return num_cpus; + return cached_num_cpus; } -#endif // !BUILDFLAG(IS_OPENBSD) +#endif // !BUILDFLAG(IS_BSD) // static uint64_t SysInfo::AmountOfVirtualMemory() { -@@ -251,6 +251,8 @@ std::string SysInfo::OperatingSystemArchitecture() { +@@ -264,6 +264,8 @@ std::string SysInfo::OperatingSystemArchitecture() { arch = "x86"; } else if (arch == "amd64") { arch = "x86_64"; + } else if (arch == "arm64") { + arch = "aarch64"; } else if (std::string(info.sysname) == "AIX") { arch = "ppc64"; } diff --git a/www/chromium/files/patch-build_config_compiler_BUILD.gn b/www/chromium/files/patch-build_config_compiler_BUILD.gn index 454356a5c483..389ee5fdc99e 100644 --- a/www/chromium/files/patch-build_config_compiler_BUILD.gn +++ b/www/chromium/files/patch-build_config_compiler_BUILD.gn @@ -1,140 +1,140 @@ ---- build/config/compiler/BUILD.gn.orig 2023-11-03 10:09:45 UTC +--- build/config/compiler/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ build/config/compiler/BUILD.gn -@@ -196,7 +196,7 @@ declare_args() { +@@ -202,7 +202,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() { -@@ -260,13 +260,16 @@ config("default_include_dirs") { +@@ -266,13 +266,16 @@ config("default_include_dirs") { # Compiler instrumentation can introduce dependencies in DSOs to symbols in # the executable they are loaded into, so they are unresolved at link-time. config("no_unresolved_symbols") { - if (!using_sanitizer && + if (!using_sanitizer && !is_bsd && (is_linux || is_chromeos || is_android || is_fuchsia)) { ldflags = [ "-Wl,-z,defs", "-Wl,--as-needed", ] } + if (current_cpu == "x86" && is_openbsd) { + ldflags = [ "-Wl,-z,notext" ] + } } # compiler --------------------------------------------------------------------- -@@ -507,6 +510,10 @@ config("compiler") { +@@ -518,6 +521,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_gold) { -@@ -582,7 +589,7 @@ config("compiler") { +@@ -593,7 +600,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 += [ -@@ -768,7 +775,7 @@ config("compiler") { - - ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ] - +@@ -800,7 +807,7 @@ config("compiler") { + if (is_apple) { + ldflags += [ "-Wcrl,object_path_lto" ] + } - if (!is_chromeos) { + if (!is_chromeos && !is_bsd) { # TODO(https://crbug.com/972449): turn on for ChromeOS when that # toolchain has this flag. # We only use one version of LLVM within a build so there's no need to -@@ -1133,7 +1140,7 @@ config("compiler_cpu_abi") { +@@ -1173,7 +1180,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" ] -@@ -1148,7 +1155,7 @@ config("compiler_cpu_abi") { +@@ -1188,7 +1195,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" ] -@@ -1483,7 +1490,7 @@ config("compiler_deterministic") { +@@ -1523,7 +1530,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", -@@ -1535,7 +1542,7 @@ config("compiler_deterministic") { +@@ -1575,7 +1582,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", -@@ -1828,7 +1835,7 @@ config("default_warnings") { - ] - } +@@ -1860,7 +1867,7 @@ config("default_warnings") { + "-Wno-ignored-pragma-optimize", + ] - if (!is_nacl) { + if (!is_nacl && !is_bsd) { cflags += [ # TODO(crbug.com/1343975) Evaluate and possibly enable. "-Wno-deprecated-builtins", -@@ -2021,7 +2028,7 @@ config("no_chromium_code") { +@@ -2066,7 +2073,7 @@ config("no_chromium_code") { # third-party libraries. "-Wno-c++11-narrowing", ] - if (!is_nacl) { + if (!is_nacl && !is_freebsd) { cflags += [ # Disabled for similar reasons as -Wunused-variable. "-Wno-unused-but-set-variable", -@@ -2550,7 +2557,7 @@ config("afdo_optimize_size") { +@@ -2595,7 +2602,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. -@@ -2577,7 +2584,7 @@ config("afdo") { +@@ -2622,7 +2629,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 ] } -@@ -2741,7 +2748,8 @@ config("symbols") { +@@ -2786,7 +2793,8 @@ config("symbols") { configs += [ "//build/config:compress_debug_sections" ] } - if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") { + if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos" && + !is_bsd) { if (is_apple) { # TODO(https://crbug.com/1050118): Investigate missing debug info on mac. # Make sure we don't use constructor homing on mac. diff --git a/www/chromium/files/patch-build_linux_unbundle_libusb.gn b/www/chromium/files/patch-build_linux_unbundle_libusb.gn index db96d613cad6..906d413939c3 100644 --- a/www/chromium/files/patch-build_linux_unbundle_libusb.gn +++ b/www/chromium/files/patch-build_linux_unbundle_libusb.gn @@ -1,27 +1,30 @@ ---- build/linux/unbundle/libusb.gn.orig 2021-04-15 08:12:30 UTC +--- build/linux/unbundle/libusb.gn.orig 2023-12-10 06:10:27 UTC +++ build/linux/unbundle/libusb.gn -@@ -0,0 +1,24 @@ +@@ -1,3 +1,27 @@ +# Copyright 2016 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. + +import("//build/config/linux/pkg_config.gni") +import("//build/shim_headers.gni") + +pkg_config("system_libusb") { + packages = [ "libusb-1.0" ] +} + +shim_headers("libusb_shim") { + root_path = "src/libusb" + headers = [ + "libusb.h", + ] +} + +source_set("libusb") { + deps = [ + ":libusb_shim", + ] + public_configs = [ ":system_libusb" ] +} + import("//build/config/linux/pkg_config.gni") + import("//build/shim_headers.gni") + diff --git a/www/chromium/files/patch-build_linux_unbundle_replace__gn__files.py b/www/chromium/files/patch-build_linux_unbundle_replace__gn__files.py deleted file mode 100644 index 028c588943d5..000000000000 --- a/www/chromium/files/patch-build_linux_unbundle_replace__gn__files.py +++ /dev/null @@ -1,10 +0,0 @@ ---- build/linux/unbundle/replace_gn_files.py.orig 2023-02-08 09:03:45 UTC -+++ build/linux/unbundle/replace_gn_files.py -@@ -54,6 +54,7 @@ REPLACEMENTS = { - 'libevent': 'third_party/libevent/BUILD.gn', - 'libjpeg': 'third_party/libjpeg.gni', - 'libpng': 'third_party/libpng/BUILD.gn', -+ 'libusb': 'third_party/libusb/BUILD.gn', - 'libvpx': 'third_party/libvpx/BUILD.gn', - 'libwebp': 'third_party/libwebp/BUILD.gn', - 'libxml': 'third_party/libxml/BUILD.gn', diff --git a/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni b/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni index 85f8a1bb5b26..a84ce85cb7d3 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 2023-11-03 10:09:45 UTC +--- build/toolchain/gcc_toolchain.gni.orig 2023-12-10 06:10:27 UTC +++ build/toolchain/gcc_toolchain.gni @@ -53,6 +53,13 @@ if (enable_resource_allowlist_generation) { "enable_resource_allowlist_generation=true does not work for target_os=$target_os") } +declare_args() { + extra_cflags = "" + extra_cppflags = "" + extra_cxxflags = "" + extra_ldflags = "" +} + # This template defines a toolchain for something that works like gcc # (including clang). # -@@ -875,22 +882,12 @@ template("gcc_toolchain") { +@@ -878,22 +885,12 @@ template("gcc_toolchain") { # use_gold too. template("clang_toolchain") { gcc_toolchain(target_name) { - _path = "$clang_base_path/bin" - _is_path_absolute = get_path_info(_path, "abspath") == _path - - # Preserve absolute paths for tools like distcc. - if (_is_path_absolute && filter_include([ _path ], [ "//*" ]) == []) { - prefix = _path - } else { - prefix = rebase_path(_path, root_build_dir) - } - - cc = "${prefix}/clang" - cxx = "${prefix}/clang++" + cc = "cc" + cxx = "c++" ld = cxx - readelf = "${prefix}/llvm-readelf" - ar = "${prefix}/llvm-ar" - nm = "${prefix}/llvm-nm" + readelf = "readelf" + ar = "ar" + nm = "nm" forward_variables_from(invoker, "*", [ "toolchain_args" ]) diff --git a/www/chromium/files/patch-cc_BUILD.gn b/www/chromium/files/patch-cc_BUILD.gn index 407a72a26735..b71630e9d9c7 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 2023-11-03 10:09:45 UTC +--- cc/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ cc/BUILD.gn -@@ -675,7 +675,7 @@ cc_test_static_library("test_support") { +@@ -676,7 +676,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) { -@@ -930,7 +930,6 @@ cc_test("cc_unittests") { +@@ -931,7 +931,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_paint_paint__op__writer.h b/www/chromium/files/patch-cc_paint_paint__op__writer.h index c82f3aa3b09a..92b0e96da01c 100644 --- a/www/chromium/files/patch-cc_paint_paint__op__writer.h +++ b/www/chromium/files/patch-cc_paint_paint__op__writer.h @@ -1,41 +1,41 @@ ---- cc/paint/paint_op_writer.h.orig 2023-08-17 07:33:31 UTC +--- cc/paint/paint_op_writer.h.orig 2023-12-10 06:10:27 UTC +++ cc/paint/paint_op_writer.h -@@ -114,10 +114,17 @@ class CC_PAINT_EXPORT PaintOpWriter { +@@ -122,10 +122,17 @@ class CC_PAINT_EXPORT PaintOpWriter { // easier to keep serialized size calculation in sync with serialization and // deserialization, and make it possible to allow dynamic sizing for some // data types (see the specialized/overloaded functions). +#if defined(__clang__) && (__clang_major__ >= 15) template static constexpr size_t SerializedSize(); template static constexpr size_t SerializedSize(const T& data); +#else + template + static size_t SerializedSize(); + template + static size_t SerializedSize(const T& data); +#endif static size_t SerializedSize(const PaintImage& image); static size_t SerializedSize(const PaintRecord& record); static size_t SerializedSize(const SkHighContrastConfig& config); -@@ -386,12 +393,20 @@ constexpr size_t PaintOpWriter::SerializedSize +#if defined(__clang__) && (__clang_major__ >= 15) constexpr size_t PaintOpWriter::SerializedSize() { +#else +size_t PaintOpWriter::SerializedSize() { +#endif static_assert(std::is_arithmetic_v || std::is_enum_v); return SerializedSizeSimple(); } template +#if defined(__clang__) && (__clang_major__ >= 15) constexpr size_t PaintOpWriter::SerializedSize(const T& data) { +#else +size_t PaintOpWriter::SerializedSize(const T& data) { +#endif return SerializedSizeSimple(); } diff --git a/www/chromium/files/patch-chrome_app_app__management__strings.grdp b/www/chromium/files/patch-chrome_app_app__management__strings.grdp index 983101648e83..97de1cd3f17f 100644 --- a/www/chromium/files/patch-chrome_app_app__management__strings.grdp +++ b/www/chromium/files/patch-chrome_app_app__management__strings.grdp @@ -1,11 +1,11 @@ ---- chrome/app/app_management_strings.grdp.orig 2023-09-13 12:11:42 UTC +--- chrome/app/app_management_strings.grdp.orig 2023-12-10 06:10:27 UTC +++ chrome/app/app_management_strings.grdp -@@ -188,7 +188,7 @@ +@@ -194,7 +194,7 @@ You can open and edit supported files with this app from Finder or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. - + You can open and edit supported files with this app from your file browser or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. diff --git a/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc b/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc index cfbd31a02bcf..9cf2125b2701 100644 --- a/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc +++ b/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc @@ -1,112 +1,112 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/app/chrome_main_delegate.cc @@ -145,7 +145,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 -@@ -188,16 +188,16 @@ +@@ -189,16 +189,16 @@ #include "v8/include/v8.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/environment.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "base/message_loop/message_pump_libevent.h" #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/policy_path_parser.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -336,7 +336,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -337,7 +337,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty // and resources loaded. bool SubprocessNeedsResourceBundle(const std::string& process_type) { return -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The zygote process opens the resources for the renderers. process_type == switches::kZygoteProcess || #endif -@@ -421,7 +421,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -422,7 +422,7 @@ bool HandleVersionSwitches(const base::CommandLine& co // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Show the man page if --help or -h is on the command line. void HandleHelpSwitches(const base::CommandLine& command_line) { if (command_line.HasSwitch(switches::kHelp) || -@@ -593,7 +593,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -600,7 +600,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. -@@ -683,7 +683,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat +@@ -690,7 +690,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( -@@ -1012,7 +1012,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv +@@ -1044,7 +1044,7 @@ void ChromeMainDelegate::CommonEarlyInitialization(Inv base::InitializeCpuReductionExperiment(); base::sequence_manager::internal::SequenceManagerImpl::InitializeFeatures(); base::sequence_manager::internal::ThreadController::InitializeFeatures(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::MessagePumpLibevent::InitializeFeatures(); #elif BUILDFLAG(IS_MAC) base::PlatformThread::InitFeaturesPostFieldTrial(); -@@ -1159,7 +1159,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1196,7 +1196,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo // TODO(crbug.com/1052397): Revisit the macro expression once build flag // switch of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // This will directly exit if the user asked for help. HandleHelpSwitches(command_line); #endif -@@ -1189,7 +1189,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1226,7 +1226,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo #if BUILDFLAG(IS_CHROMEOS) chromeos::dbus_paths::RegisterPathProvider(); #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) nacl::RegisterPathProvider(); #endif -@@ -1589,7 +1589,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1637,7 +1637,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)) { -@@ -1691,7 +1691,7 @@ absl::variant Chrome +@@ -1746,7 +1746,7 @@ absl::variant Chrome // This entry is not needed on Linux, where the NaCl loader // process is launched via nacl_helper instead. -#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(ENABLE_NACL) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) {switches::kNaClLoaderProcess, NaClMain}, #else {"", nullptr}, // To avoid constant array of size 0 diff --git a/www/chromium/files/patch-chrome_app_chromium__strings.grd b/www/chromium/files/patch-chrome_app_chromium__strings.grd index 4e49e1126da5..4b57d6644fbb 100644 --- a/www/chromium/files/patch-chrome_app_chromium__strings.grd +++ b/www/chromium/files/patch-chrome_app_chromium__strings.grd @@ -1,38 +1,38 @@ ---- chrome/app/chromium_strings.grd.orig 2023-11-03 10:09:45 UTC +--- chrome/app/chromium_strings.grd.orig 2023-12-10 06:10:27 UTC +++ chrome/app/chromium_strings.grd @@ -315,7 +315,7 @@ If you update this file, be sure also to update google Welcome to Chromium; new browser window opened - + Welcome to Chromium @@ -465,7 +465,7 @@ If you update this file, be sure also to update google To get future Chromium updates, you'll need Windows 10 or later. This computer is using Windows 8.1. - + Chromium may not function correctly because it is no longer supported on this Linux distribution -@@ -896,7 +896,7 @@ Permissions you've already given to websites and apps +@@ -892,7 +892,7 @@ Permissions you've already given to websites and apps - + Not used in Chromium. Placeholder to keep resource maps in sync. -@@ -1272,7 +1272,7 @@ Permissions you've already given to websites and apps +@@ -1277,7 +1277,7 @@ Permissions you've already given to websites and apps - + Not used in Chromium. Placeholder to keep resource maps in sync. diff --git a/www/chromium/files/patch-chrome_app_generated__resources.grd b/www/chromium/files/patch-chrome_app_generated__resources.grd index 2d4c437935d6..9f6b80c5d6ef 100644 --- a/www/chromium/files/patch-chrome_app_generated__resources.grd +++ b/www/chromium/files/patch-chrome_app_generated__resources.grd @@ -1,92 +1,92 @@ ---- chrome/app/generated_resources.grd.orig 2023-11-03 10:09:45 UTC +--- chrome/app/generated_resources.grd.orig 2023-12-10 06:10:27 UTC +++ chrome/app/generated_resources.grd @@ -2,7 +2,7 @@ -@@ -3605,7 +3605,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -3609,7 +3609,7 @@ are declared in tools/grit/grit_rule.gni. - + Device Credentials -@@ -5445,7 +5445,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -5494,7 +5494,7 @@ are declared in tools/grit/grit_rule.gni. Read information about your browser, OS, device, installed software, registry values and files - + Read information about your browser, OS, device, installed software and files -@@ -6158,7 +6158,7 @@ Keep your key file in a safe place. You will need it t +@@ -6207,7 +6207,7 @@ Keep your key file in a safe place. You will need it t Old versions of Chrome Apps won't open on Windows devices after December 2022. Contact your administrator to update to a new version or remove this app. - + Old versions of Chrome Apps won't open on Linux devices after December 2022. Contact your administrator to update to a new version or remove this app. -@@ -6204,7 +6204,7 @@ Keep your key file in a safe place. You will need it t +@@ -6253,7 +6253,7 @@ Keep your key file in a safe place. You will need it t Old versions of Chrome apps won't open on Windows devices after December 2022. You can check if there's a new version available. - + Old versions of Chrome apps won't open on Linux devices after December 2022. You can check if there's a new version available. -@@ -10396,7 +10396,7 @@ Check your passwords anytime in Update - + Finish update -@@ -10743,7 +10743,7 @@ Check your passwords anytime in - + Use system title bar and borders -@@ -11734,7 +11734,7 @@ Check your passwords anytime in - + Share information about your device? -@@ -12142,7 +12142,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -12364,7 +12364,7 @@ Please help our engineers fix this problem. Tell us wh Set as default - + Minimize -@@ -14349,7 +14349,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -14571,7 +14571,7 @@ Please help our engineers fix this problem. Tell us wh Open Anyway - + System Signals Utilities diff --git a/www/chromium/files/patch-chrome_app_google__chrome__strings.grd b/www/chromium/files/patch-chrome_app_google__chrome__strings.grd index 141ef641e87b..f330ee3c76fc 100644 --- a/www/chromium/files/patch-chrome_app_google__chrome__strings.grd +++ b/www/chromium/files/patch-chrome_app_google__chrome__strings.grd @@ -1,38 +1,38 @@ ---- chrome/app/google_chrome_strings.grd.orig 2023-11-03 10:09:45 UTC +--- chrome/app/google_chrome_strings.grd.orig 2023-12-10 06:10:27 UTC +++ chrome/app/google_chrome_strings.grd @@ -301,7 +301,7 @@ chromium_strings.grd. --> Welcome to Chrome; new browser window opened - + Welcome to Google Chrome @@ -453,7 +453,7 @@ chromium_strings.grd. --> To get future Google Chrome updates, you'll need Windows 10 or later. This computer is using Windows 8.1. - + Google Chrome may not function correctly because it is no longer supported on this Linux distribution -@@ -881,7 +881,7 @@ Permissions you've already given to websites and apps +@@ -877,7 +877,7 @@ Permissions you've already given to websites and apps - + Relaunch to Update - Your tabs will reopen -@@ -1297,7 +1297,7 @@ Permissions you've already given to websites and apps +@@ -1302,7 +1302,7 @@ Permissions you've already given to websites and apps - + Relaunch to finish Chrome update diff --git a/www/chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd b/www/chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd index 4472deb583d7..bcd3de844c94 100644 --- a/www/chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd +++ b/www/chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd @@ -1,29 +1,29 @@ ---- chrome/app/theme/chrome_unscaled_resources.grd.orig 2023-07-16 15:47:57 UTC +--- chrome/app/theme/chrome_unscaled_resources.grd.orig 2023-12-10 06:10:27 UTC +++ chrome/app/theme/chrome_unscaled_resources.grd @@ -16,7 +16,7 @@ - + -@@ -61,7 +61,7 @@ +@@ -63,7 +63,7 @@ - + -@@ -75,7 +75,7 @@ +@@ -77,7 +77,7 @@ - + diff --git a/www/chromium/files/patch-chrome_browser_BUILD.gn b/www/chromium/files/patch-chrome_browser_BUILD.gn index 0c019ba55f65..fb2a1455c1ce 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 2023-11-03 10:09:45 UTC +--- chrome/browser/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/BUILD.gn -@@ -6486,6 +6486,13 @@ static_library("browser") { +@@ -6528,6 +6528,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 2f3924027a2c..5881f7deee0f 100644 --- a/www/chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/chromium/files/patch-chrome_browser_about__flags.cc @@ -1,171 +1,180 @@ ---- chrome/browser/about_flags.cc.orig 2023-11-08 17:48:01 UTC +--- chrome/browser/about_flags.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/about_flags.cc -@@ -226,7 +226,7 @@ +@@ -231,7 +231,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 -@@ -326,7 +326,7 @@ +@@ -330,7 +330,7 @@ #include "device/vr/public/cpp/features.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "ui/ozone/buildflags.h" #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -@@ -340,7 +340,7 @@ +@@ -344,7 +344,7 @@ #include "chrome/browser/win/titlebar_config.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/profile_management/profile_management_features.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -470,7 +470,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap +@@ -474,7 +474,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, -@@ -1562,7 +1562,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 +@@ -1463,7 +1463,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 nullptr}}; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kShortcutBoostSearchAndUrl1414[] = { {"ShortcutBoostSearchScore", "1414"}, {"ShortcutBoostUrlScore", "1414"}}; -@@ -5312,13 +5312,13 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5295,13 +5295,13 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWebShare)}, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName, flag_descriptions::kOzonePlatformHintDescription, kOsLinux, MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"skip-undecryptable-passwords", flag_descriptions::kSkipUndecryptablePasswordsName, flag_descriptions::kSkipUndecryptablePasswordsDescription, -@@ -5629,7 +5629,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5612,7 +5612,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(feed::kFeedSportsCard)}, #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"following-feed-sidepanel", flag_descriptions::kFollowingFeedSidepanelName, flag_descriptions::kFollowingFeedSidepanelDescription, kOsDesktop, FEATURE_VALUE_TYPE(feed::kWebUiFeed)}, -@@ -6296,7 +6296,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6251,7 +6251,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"omnibox-actions-ui-simplification", flag_descriptions::kOmniboxActionsUISimplificationName, flag_descriptions::kOmniboxActionsUISimplificationDescription, kOsDesktop, -@@ -7131,7 +7131,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7087,7 +7087,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kParallelDownloadingDescription, kOsAll, FEATURE_VALUE_TYPE(download::features::kParallelDownloading)}, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"enable-async-dns", flag_descriptions::kAsyncDnsName, flag_descriptions::kAsyncDnsDescription, kOsWin | kOsLinux, FEATURE_VALUE_TYPE(features::kAsyncDns)}, -@@ -8143,7 +8143,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8122,7 +8122,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(supervised_user::kEnableProtoApiForClassifyUrl)}, #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) -#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, -@@ -8836,7 +8836,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8147,7 +8147,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE( + supervised_user::kFilterWebsitesForSupervisedUsersOnDesktopAndIOS)}, + +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + {"enable-family-link-extensions-permissions", + flag_descriptions:: + kEnableExtensionsPermissionsForSupervisedUsersOnDesktopName, +@@ -8817,7 +8817,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"quick-commands", flag_descriptions::kQuickCommandsName, flag_descriptions::kQuickCommandsDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kQuickCommands)}, -@@ -9140,7 +9140,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(ash::features::kWallpaperRefreshRevamp)}, +@@ -9088,7 +9088,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, -@@ -9196,7 +9196,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9130,7 +9130,7 @@ const FeatureEntry kFeatureEntries[] = { #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { "ui-debug-tools", flag_descriptions::kUIDebugToolsName, -@@ -9760,7 +9760,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -9688,7 +9688,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) {"document-picture-in-picture-api", flag_descriptions::kDocumentPictureInPictureApiName, flag_descriptions::kDocumentPictureInPictureApiDescription, -@@ -10359,7 +10359,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kWebUIOmniboxPopupDescription, kOsDesktop, - FEATURE_VALUE_TYPE(omnibox::kWebUIOmniboxPopup)}, - --#if !BUILDFLAG(IS_LINUX) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) - {"webui-system-font", flag_descriptions::kWebUiSystemFontName, - flag_descriptions::kWebUiSystemFontDescription, kOsAll, - FEATURE_VALUE_TYPE(features::kWebUiSystemFont)}, -@@ -10560,7 +10560,7 @@ const FeatureEntry kFeatureEntries[] = { - #endif - - #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - {"data-retention-policies-disable-sync-types-needed", - flag_descriptions::kDataRetentionPoliciesDisableSyncTypesNeededName, - flag_descriptions::kDataRetentionPoliciesDisableSyncTypesNeededDescription, -@@ -10966,7 +10966,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -10795,7 +10795,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kProcessPerSiteUpToMainFrameThreshold)}, #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"camera-mic-effects", flag_descriptions::kCameraMicEffectsName, flag_descriptions::kCameraMicEffectsDescription, static_cast(kOsMac | kOsWin | kOsLinux | kOsFuchsia), -@@ -11153,7 +11153,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kDigestAuthEnableSecureAlgorithmsDescription, kOsAll, - FEATURE_VALUE_TYPE(net::features::kDigestAuthEnableSecureAlgorithms)}, +@@ -10977,7 +10977,7 @@ const FeatureEntry kFeatureEntries[] = { + password_manager::features::kFillingAcrossAffiliatedWebsitesAndroid)}, + #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {"third-party-profile-management", flag_descriptions::kThirdPartyProfileManagementName, flag_descriptions::kThirdPartyProfileManagementDescription, +@@ -11291,7 +11291,7 @@ const FeatureEntry kFeatureEntries[] = { + kOsDesktop, FEATURE_VALUE_TYPE(blink::features::kPasswordStrongLabel)}, + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + {"attach-logs-to-autofill-rater-extentsion-report", + flag_descriptions::kAttachLogsToAutofillRaterExtensionReportName, + flag_descriptions::kAttachLogsToAutofillRaterExtensionReportDescription, +@@ -11300,7 +11300,7 @@ const FeatureEntry kFeatureEntries[] = { + kAttachLogsToAutofillRaterExtensionReport)}, + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + {"fill-multi-line", flag_descriptions::kFillMultiLineName, + flag_descriptions::kFillMultiLineDescription, kOsWin | kOsLinux | kOsMac, + FEATURE_VALUE_TYPE(compose::features::kFillMultiLine)}, diff --git a/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc b/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc index 11ff07a15410..00caea43beba 100644 --- a/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc +++ b/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/background/background_mode_manager.cc.orig 2023-08-17 07:33:31 UTC +--- chrome/browser/background/background_mode_manager.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/background/background_mode_manager.cc -@@ -870,7 +870,7 @@ gfx::ImageSkia GetStatusTrayIcon() { +@@ -869,7 +869,7 @@ gfx::ImageSkia GetStatusTrayIcon() { return gfx::ImageSkia(); return family->CreateExact(size).AsImageSkia(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( IDR_PRODUCT_LOGO_128); #elif BUILDFLAG(IS_MAC) diff --git a/www/chromium/files/patch-chrome_browser_browser__features.cc b/www/chromium/files/patch-chrome_browser_browser__features.cc index eb7bfafdd149..94e72d5ade44 100644 --- a/www/chromium/files/patch-chrome_browser_browser__features.cc +++ b/www/chromium/files/patch-chrome_browser_browser__features.cc @@ -1,11 +1,20 @@ ---- chrome/browser/browser_features.cc.orig 2023-09-13 12:11:42 UTC +--- chrome/browser/browser_features.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/browser_features.cc @@ -28,7 +28,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); +@@ -292,7 +292,7 @@ BASE_FEATURE(kOmniboxTriggerForNoStatePrefetch, + "OmniboxTriggerForNoStatePrefetch", + 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(kPayloadTestComponent, + "PayloadTestComponent", + base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/www/chromium/files/patch-chrome_browser_browser__features.h b/www/chromium/files/patch-chrome_browser_browser__features.h new file mode 100644 index 000000000000..ac690246c81d --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_browser__features.h @@ -0,0 +1,11 @@ +--- chrome/browser/browser_features.h.orig 2023-12-10 06:10:27 UTC ++++ chrome/browser/browser_features.h +@@ -121,7 +121,7 @@ BASE_DECLARE_FEATURE(kAutocompleteActionPredictorConfi + + BASE_DECLARE_FEATURE(kOmniboxTriggerForNoStatePrefetch); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + BASE_DECLARE_FEATURE(kPayloadTestComponent); + #endif + 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 3a091e46f389..58a5c9ce95cb 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 2023-11-03 10:09:45 UTC +--- chrome/browser/browser_process_impl.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/browser_process_impl.cc -@@ -216,7 +216,7 @@ +@@ -215,7 +215,7 @@ #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/error_reporting/chrome_js_error_report_processor.h" // nogncheck #endif -@@ -1208,7 +1208,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1212,7 +1212,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 -@@ -1462,7 +1462,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1477,7 +1477,7 @@ void BrowserProcessImpl::Unpin() { // Mac is currently not supported. // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) bool BrowserProcessImpl::IsRunningInBackground() const { // Check if browser is in the background. diff --git a/www/chromium/files/patch-chrome_browser_browser__process__impl.h b/www/chromium/files/patch-chrome_browser_browser__process__impl.h index f2683265f964..61e1a03479f3 100644 --- a/www/chromium/files/patch-chrome_browser_browser__process__impl.h +++ b/www/chromium/files/patch-chrome_browser_browser__process__impl.h @@ -1,11 +1,11 @@ ---- chrome/browser/browser_process_impl.h.orig 2023-09-13 12:11:42 UTC +--- chrome/browser/browser_process_impl.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/browser_process_impl.h -@@ -382,7 +382,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -388,7 +388,7 @@ class BrowserProcessImpl : public BrowserProcess, // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) base::RepeatingTimer autoupdate_timer_; // Gets called by autoupdate timer to see if browser needs restart and can be diff --git a/www/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc b/www/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc index 8927cfe343a9..854d5fc7a33c 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc +++ b/www/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc @@ -1,81 +1,81 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -129,13 +129,13 @@ +@@ -130,13 +130,13 @@ #endif // BUILDFLAG(FULL_SAFE_BROWSING) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/connectors_internals/connectors_internals.mojom.h" #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/app_settings/web_app_settings_ui.h" #include "ui/webui/resources/cr_components/app_management/app_management.mojom.h" #endif -@@ -218,7 +218,7 @@ +@@ -224,7 +224,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_search/visual_search_suggestions_service_factory.h" #include "chrome/browser/ui/web_applications/sub_apps_service_impl.h" #include "chrome/browser/ui/webui/discards/discards.mojom.h" -@@ -841,7 +841,7 @@ void BindScreen2xMainContentExtractor( +@@ -863,7 +863,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< -@@ -988,7 +988,7 @@ void PopulateChromeFrameBinders( +@@ -1009,7 +1009,7 @@ void PopulateChromeFrameBinders( #endif // BUILDFLAG(ENABLE_SPEECH_SERVICE) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!render_frame_host->GetParent()) { map->Add( base::BindRepeating(&DraggableRegionsHostImpl::CreateIfAllowed)); -@@ -996,7 +996,7 @@ void PopulateChromeFrameBinders( +@@ -1017,7 +1017,7 @@ void PopulateChromeFrameBinders( #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(blink::features::kDesktopPWAsSubApps) && !render_frame_host->GetParentOrOuterDocument()) { // The service binder will reject non-primary main frames, but we still need -@@ -1076,7 +1076,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1097,7 +1097,7 @@ void PopulateChromeWebUIFrameBinders( commerce::CommerceInternalsUI>(map); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< connectors_internals::mojom::PageHandler, enterprise_connectors::ConnectorsInternalsUI>(map); -@@ -1092,7 +1092,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1118,7 +1118,7 @@ void PopulateChromeWebUIFrameBinders( #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map); #endif -@@ -1601,7 +1601,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1651,7 +1651,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 24cb5cca0d88..ea2675eb2a7a 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc +++ b/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc @@ -1,78 +1,78 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -248,11 +248,11 @@ +@@ -246,11 +246,11 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/first_run/upgrade_util_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/core/app/crashpad.h" #endif -@@ -287,14 +287,14 @@ +@@ -284,14 +284,14 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" #include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h" #include "chrome/browser/profiles/profile_activity_metrics_recorder.h" #include "ui/base/pointer/touch_ui_controller.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/headless/headless_mode_metrics.h" // nogncheck #include "chrome/browser/headless/headless_mode_util.h" // nogncheck #include "components/headless/select_file_dialog/headless_select_file_dialog.h" -@@ -1040,7 +1040,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1041,7 +1041,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 . -@@ -1096,7 +1096,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1097,7 +1097,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::Initialize(); TouchModeStatsTracker::Initialize( -@@ -1332,7 +1332,7 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* +@@ -1333,7 +1333,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(); } -@@ -1438,7 +1438,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl( +@@ -1439,7 +1439,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(); } -@@ -2024,7 +2024,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat +@@ -1971,7 +1971,7 @@ bool ChromeBrowserMainParts::ProcessSingletonNotificat // Drop the request if headless mode is in effect or the request is from // a headless Chrome process. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (headless::IsHeadlessMode() || command_line.HasSwitch(switches::kHeadless)) { return false; diff --git a/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc b/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc index 8ff4c05148f3..a8ef5a332af8 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc +++ b/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc @@ -1,28 +1,21 @@ ---- chrome/browser/chrome_browser_main_linux.cc.orig 2023-08-17 07:33:31 UTC +--- chrome/browser/chrome_browser_main_linux.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/chrome_browser_main_linux.cc -@@ -53,13 +53,15 @@ ChromeBrowserMainPartsLinux::~ChromeBrowserMainPartsLi - } - - void ChromeBrowserMainPartsLinux::PostCreateMainMessageLoop() { --#if BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // No-op: Ash and Lacros Bluetooth DBusManager initialization depend on - // FeatureList, and is done elsewhere. +@@ -67,7 +67,9 @@ void ChromeBrowserMainPartsLinux::PostCreateMainMessag #endif // BUILDFLAG(IS_CHROMEOS) #if !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_BSD) bluez::BluezDBusManager::Initialize(nullptr /* system_bus */); +#endif // Set up crypt config. This needs to be done before anything starts the // network service, as the raw encryption key needs to be shared with the -@@ -117,7 +119,7 @@ void ChromeBrowserMainPartsLinux::PostBrowserStart() { +@@ -124,7 +126,7 @@ void ChromeBrowserMainPartsLinux::PostBrowserStart() { #endif // defined(USE_DBUS) && !BUILDFLAG(IS_CHROMEOS) void ChromeBrowserMainPartsLinux::PostDestroyThreads() { -#if BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // No-op; per PostBrowserStart() comment, this is done elsewhere. #else bluez::BluezDBusManager::Shutdown(); diff --git a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc index af7781c0acf3..6b95eaec5681 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc +++ b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc @@ -1,160 +1,160 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -443,7 +443,7 @@ +@@ -447,7 +447,7 @@ #include "storage/browser/file_system/external_mount_points.h" // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_linux.h" #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" #elif BUILDFLAG(IS_ANDROID) -@@ -543,12 +543,12 @@ +@@ -548,12 +548,12 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/core/app/crash_switches.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -559,14 +559,14 @@ +@@ -564,14 +564,14 @@ #include "chrome/browser/apps/link_capturing/web_app_link_capturing_delegate.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.h" #include "chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.h" #include "chrome/browser/ui/webui/app_settings/web_app_settings_navigation_throttle.h" #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -582,7 +582,7 @@ +@@ -587,7 +587,7 @@ #include "components/lens/lens_features.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_extra_parts_linux.h" #elif BUILDFLAG(IS_OZONE) #include "chrome/browser/chrome_browser_main_extra_parts_ozone.h" -@@ -1598,7 +1598,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre +@@ -1591,7 +1591,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre registry->RegisterBooleanPref(prefs::kNativeClientForceAllowed, false); registry->RegisterBooleanPref( policy::policy_prefs::kPPAPISharedImagesForVideoDecoderAllowed, true); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOutOfProcessSystemDnsResolutionEnabled, true); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) -@@ -1720,7 +1720,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1715,7 +1715,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) -@@ -1757,7 +1757,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1752,7 +1752,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo std::make_unique()); // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) main_parts->AddParts( std::make_unique()); #else -@@ -1778,7 +1778,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1773,7 +1773,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()); -@@ -1797,7 +1797,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1792,7 +1792,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>()); -@@ -2627,6 +2627,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2625,6 +2625,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin #elif BUILDFLAG(IS_POSIX) #if BUILDFLAG(IS_ANDROID) bool enable_crash_reporter = true; +#elif BUILDFLAG(IS_BSD) + bool enable_crash_reporter = false; #elif BUILDFLAG(IS_CHROMEOS) bool enable_crash_reporter = false; if (crash_reporter::IsCrashpadEnabled()) { -@@ -3010,7 +3012,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2990,7 +2992,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin ThreadProfilerConfiguration::Get()->AppendCommandLineSwitchForChildProcess( command_line); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) // Opt into a hardened stack canary mitigation if it hasn't already been // force-disabled. if (!browser_command_line.HasSwitch(switches::kChangeStackGuardOnFork)) { -@@ -4641,7 +4643,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4661,7 +4663,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, -@@ -5188,7 +5190,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5221,7 +5223,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); -@@ -5198,7 +5200,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5231,7 +5233,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); -@@ -5237,7 +5239,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5270,7 +5272,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); -@@ -7124,7 +7126,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS - } - +@@ -7164,7 +7166,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 c4dfff33843e..5c5a33c6c7f3 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 2023-11-03 10:09:45 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -482,7 +482,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -484,7 +484,7 @@ class ChromeContentBrowserClient : public content::Con void OverridePageVisibilityState( content::RenderFrameHost* render_frame_host, content::PageVisibilityState* visibility_state) override; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, diff --git a/www/chromium/files/patch-chrome_browser_component__updater_registration.cc b/www/chromium/files/patch-chrome_browser_component__updater_registration.cc new file mode 100644 index 000000000000..31d798fd1c66 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_component__updater_registration.cc @@ -0,0 +1,11 @@ +--- chrome/browser/component_updater/registration.cc.orig 2023-12-10 06:10:27 UTC ++++ chrome/browser/component_updater/registration.cc +@@ -223,7 +223,7 @@ void RegisterComponentsForUpdate() { + + RegisterTpcdMetadataComponent(cus); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // TODO(crbug.com/1490685): Remove this test component once the + // experiment has concluded. + if (base::FeatureList::IsEnabled(features::kPayloadTestComponent)) { diff --git a/www/chromium/files/patch-chrome_browser_download_bubble_download__bubble__update__service.cc b/www/chromium/files/patch-chrome_browser_download_bubble_download__bubble__update__service.cc index f81687a4b782..8c422381d997 100644 --- a/www/chromium/files/patch-chrome_browser_download_bubble_download__bubble__update__service.cc +++ b/www/chromium/files/patch-chrome_browser_download_bubble_download__bubble__update__service.cc @@ -1,32 +1,32 @@ ---- chrome/browser/download/bubble/download_bubble_update_service.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/download/bubble/download_bubble_update_service.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/download/bubble/download_bubble_update_service.cc @@ -89,7 +89,11 @@ ItemSortKey GetSortKey(const Item& item) { // Helper to get an iterator to the last element in the cache. The cache // must not be empty. template +#if defined(__clang__) && (__clang_major__ >= 16) SortedItems::const_iterator GetLastIter(const SortedItems& cache) { +#else +typename SortedItems::const_iterator GetLastIter(const SortedItems& cache) { +#endif CHECK(!cache.empty()); auto it = cache.end(); return std::prev(it); -@@ -1029,9 +1033,17 @@ bool DownloadBubbleUpdateService::CacheManager::Remove +@@ -1089,9 +1093,17 @@ bool DownloadBubbleUpdateService::CacheManager::Remove } template +#if defined(__clang__) && (__clang_major__ >= 16) SortedItems::iterator +#else +typename SortedItems::iterator +#endif DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter( +#if defined(__clang__) && (__clang_major__ >= 16) SortedItems::iterator iter, +#else + typename SortedItems::iterator iter, +#endif SortedItems& cache, IterMap& iter_map) { CHECK(iter != cache.end()); 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 9fa37e307e7e..9e257bb7220a 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 2023-10-11 18:22:24 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1611,7 +1611,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1623,7 +1623,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile( const base::FilePath& path) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) { return !download_prefs_->ShouldOpenPdfInSystemReader(); } -@@ -1730,7 +1730,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -1742,7 +1742,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()) { -@@ -1776,7 +1776,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl +@@ -1788,7 +1788,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl DCHECK(download_item->IsSavePackageDownload()); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) absl::optional settings = safe_browsing::DeepScanningRequest::ShouldUploadBinary(download_item); diff --git a/www/chromium/files/patch-chrome_browser_download_download__commands.h b/www/chromium/files/patch-chrome_browser_download_download__commands.h index aaca46d2099d..edbc1392ce5a 100644 --- a/www/chromium/files/patch-chrome_browser_download_download__commands.h +++ b/www/chromium/files/patch-chrome_browser_download_download__commands.h @@ -1,11 +1,11 @@ ---- chrome/browser/download/download_commands.h.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/download/download_commands.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/download/download_commands.h -@@ -62,7 +62,7 @@ class DownloadCommands { +@@ -63,7 +63,7 @@ class DownloadCommands { void ExecuteCommand(Command command); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) bool IsDownloadPdf() const; bool CanOpenPdfInSystemViewer() const; Browser* GetBrowser() const; 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 c30e17f27890..66713e5c5d86 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 2023-11-03 10:09:45 UTC +--- chrome/browser/download/download_item_model.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/download/download_item_model.cc -@@ -757,7 +757,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -755,7 +755,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(); -@@ -803,7 +803,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand +@@ -801,7 +801,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); -@@ -1174,7 +1174,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1170,7 +1170,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_download_download__prefs.cc b/www/chromium/files/patch-chrome_browser_download_download__prefs.cc index 359f6d01d1a9..e2ab894e33f5 100644 --- a/www/chromium/files/patch-chrome_browser_download_download__prefs.cc +++ b/www/chromium/files/patch-chrome_browser_download_download__prefs.cc @@ -1,90 +1,90 @@ ---- chrome/browser/download/download_prefs.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/download/download_prefs.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/download/download_prefs.cc @@ -11,6 +11,7 @@ #include #include "base/check.h" +#include "base/command_line.h" #include "base/feature_list.h" #include "base/files/file_util.h" #include "base/functional/bind.h" @@ -63,6 +64,10 @@ #include "chrome/browser/download/bubble/download_bubble_prefs.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; @@ -73,7 +78,7 @@ namespace { // Consider downloads 'dangerous' if they go to the home directory on Linux and // to the desktop on any platform. bool DownloadPathIsDangerous(const base::FilePath& download_path) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath home_dir = base::GetHomeDir(); if (download_path == home_dir) { return true; @@ -181,7 +186,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) should_open_pdf_in_system_reader_ = prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader); #endif -@@ -312,7 +317,7 @@ void DownloadPrefs::RegisterProfilePrefs( - registry->RegisterTimePref(prefs::kDownloadLastCompleteTime, - /*default_value=*/base::Time()); +@@ -310,7 +315,7 @@ void DownloadPrefs::RegisterProfilePrefs( + registry->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory, + default_download_path); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false); #endif #if BUILDFLAG(IS_ANDROID) -@@ -485,7 +490,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens +@@ -474,7 +479,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) void DownloadPrefs::SetShouldOpenPdfInSystemReader(bool should_open) { if (should_open_pdf_in_system_reader_ == should_open) return; -@@ -517,7 +522,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons +@@ -506,7 +511,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons void DownloadPrefs::ResetAutoOpenByUser() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) SetShouldOpenPdfInSystemReader(false); #endif auto_open_by_user_.clear(); -@@ -548,7 +553,7 @@ void DownloadPrefs::SaveAutoOpenState() { +@@ -537,7 +542,7 @@ void DownloadPrefs::SaveAutoOpenState() { bool DownloadPrefs::CanPlatformEnableAutoOpenForPdf() const { #if BUILDFLAG(IS_CHROMEOS) return false; // There is no UI for auto-open on ChromeOS. -#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return ShouldOpenPdfInSystemReader(); #else return false; -@@ -672,7 +677,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa +@@ -661,7 +666,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa #else // If the stored download directory is an absolute path, we presume it's // correct; there's not really much more validation we can do here. +#if BUILDFLAG(IS_OPENBSD) + // If unveil(2) is used, force the file dialog directory to something we + // know is available. + auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); + if (!sandbox->unveil_initialized() && path.IsAbsolute()) +#else if (path.IsAbsolute()) +#endif return path; // When the default download directory is *not* an absolute path, we use the diff --git a/www/chromium/files/patch-chrome_browser_download_download__prefs.h b/www/chromium/files/patch-chrome_browser_download_download__prefs.h index 998d9c2432bc..2e348b1e453b 100644 --- a/www/chromium/files/patch-chrome_browser_download_download__prefs.h +++ b/www/chromium/files/patch-chrome_browser_download_download__prefs.h @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_prefs.h.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/download/download_prefs.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/download/download_prefs.h -@@ -118,7 +118,7 @@ class DownloadPrefs { +@@ -115,7 +115,7 @@ class DownloadPrefs { void DisableAutoOpenByUserBasedOnExtension(const base::FilePath& file_name); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Store the user preference to disk. If |should_open| is true, also disable // the built-in PDF plugin. If |should_open| is false, enable the PDF plugin. void SetShouldOpenPdfInSystemReader(bool should_open); -@@ -182,7 +182,7 @@ class DownloadPrefs { +@@ -179,7 +179,7 @@ class DownloadPrefs { std::unique_ptr auto_open_allowed_by_urls_; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) bool should_open_pdf_in_system_reader_; #endif 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 e9ca3270ad9f..0f58d02aa7fc 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 2023-11-03 10:09:45 UTC +--- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/enterprise/connectors/connectors_service.cc -@@ -548,7 +548,7 @@ bool ConnectorsService::ConnectorsEnabled() const { +@@ -560,7 +560,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_device__trust__connector__service__factory.cc b/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc index e6fa06d7e530..f0e0ac80b052 100644 --- a/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc +++ b/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__connector__service__factory.cc @@ -1,29 +1,29 @@ ---- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig 2023-10-11 18:22:24 UTC +--- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc -@@ -11,7 +11,7 @@ +@@ -10,7 +10,7 @@ #include "chrome/browser/profiles/profile.h" #include "components/keyed_service/core/keyed_service.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_process.h" #include "chrome/browser/enterprise/connectors/device_trust/browser/signing_key_policy_observer.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h" -@@ -42,7 +42,7 @@ DeviceTrustConnectorService* DeviceTrustConnectorServi +@@ -40,7 +40,7 @@ DeviceTrustConnectorService* DeviceTrustConnectorServi bool DeviceTrustConnectorServiceFactory::ServiceIsCreatedWithBrowserContext() const { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - return IsDeviceTrustConnectorFeatureEnabled(); + return true; #else return false; -@@ -80,7 +80,7 @@ DeviceTrustConnectorServiceFactory::BuildServiceInstan +@@ -79,7 +79,7 @@ DeviceTrustConnectorServiceFactory::BuildServiceInstan std::unique_ptr service = std::make_unique(profile->GetPrefs()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - if (IsDeviceTrustConnectorFeatureEnabled()) { - auto* key_manager = g_browser_process->browser_policy_connector() - ->chrome_browser_cloud_management_controller() + auto* key_manager = g_browser_process->browser_policy_connector() + ->chrome_browser_cloud_management_controller() + ->GetDeviceTrustKeyManager(); diff --git a/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc b/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc index e3f65f0e319f..4eb285d38ba2 100644 --- a/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc +++ b/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_device__trust__service__factory.cc @@ -1,29 +1,29 @@ ---- chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc.orig 2023-09-13 12:11:42 UTC +--- chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.cc @@ -23,7 +23,7 @@ #include "components/policy/core/common/management/management_service.h" #include "content/public/browser/browser_context.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_process.h" #include "chrome/browser/enterprise/connectors/device_trust/attestation/browser/browser_attestation_service.h" #include "chrome/browser/enterprise/connectors/device_trust/attestation/browser/device_attester.h" -@@ -56,7 +56,7 @@ bool IsProfileManaged(Profile* profile) { +@@ -54,7 +54,7 @@ bool IsProfileManaged(Profile* profile) { return management_service && management_service->IsManaged(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) policy::CloudPolicyStore* GetUserCloudPolicyStore(Profile* profile) { policy::CloudPolicyManager* user_policy_manager = profile->GetUserCloudPolicyManager(); -@@ -106,7 +106,7 @@ DeviceTrustServiceFactory::DeviceTrustServiceFactory() +@@ -104,7 +104,7 @@ DeviceTrustServiceFactory::DeviceTrustServiceFactory() DependsOn(DeviceTrustConnectorServiceFactory::GetInstance()); DependsOn(policy::ManagementServiceFactory::GetInstance()); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Depends on this service via the SignalsService having a dependency on it. DependsOn(enterprise_signals::SignalsAggregatorFactory::GetInstance()); // Depends on this service via the ProfileAttester having a dependency on it 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 382d645232fd..07702bf6ee26 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,38 @@ ---- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.cc -@@ -55,7 +55,7 @@ +@@ -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 "components/device_signals/core/browser/signals_aggregator.h" #include "components/device_signals/core/common/signals_constants.h" -@@ -129,7 +129,7 @@ void UploadSecurityEventReport(base::Value::Dict event +@@ -132,7 +132,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, -@@ -416,7 +416,7 @@ void RealtimeReportingClient::ReportPastEvent(const st +@@ -427,7 +427,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, -@@ -475,7 +475,7 @@ void RealtimeReportingClient::ReportEventWithTimestamp +@@ -486,7 +486,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); diff --git a/www/chromium/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc b/www/chromium/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc index c79dc71aa426..92373602e9f8 100644 --- a/www/chromium/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc +++ b/www/chromium/files/patch-chrome_browser_enterprise_remote__commands_cbcm__remote__commands__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/remote_commands/cbcm_remote_commands_factory.cc.orig 2023-08-17 07:33:31 UTC +--- chrome/browser/enterprise/remote_commands/cbcm_remote_commands_factory.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/enterprise/remote_commands/cbcm_remote_commands_factory.cc @@ -11,7 +11,7 @@ #include "chrome/browser/profiles/profile_manager.h" #include "components/policy/core/common/remote_commands/remote_command_job.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - #include "chrome/browser/enterprise/connectors/device_trust/device_trust_features.h" // nogncheck #include "chrome/browser/enterprise/remote_commands/rotate_attestation_credential_job.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h" -@@ -31,7 +31,7 @@ CBCMRemoteCommandsFactory::BuildJobForType( + #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" +@@ -30,7 +30,7 @@ CBCMRemoteCommandsFactory::BuildJobForType( g_browser_process->profile_manager()); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - if (enterprise_connectors::IsDeviceTrustConnectorFeatureEnabled() && - type == enterprise_management:: + if (type == enterprise_management:: RemoteCommand_Type_BROWSER_ROTATE_ATTESTATION_CREDENTIAL) { + return std::make_unique( diff --git a/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn b/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn index 9cc2279784d5..019c85b969ae 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 2023-11-03 10:09:45 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1375,6 +1375,10 @@ static_library("extensions") { +@@ -1372,6 +1372,10 @@ static_library("extensions") { deps += [ "//chrome/services/printing/public/mojom" ] } + if (is_bsd) { + sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ] + } + if (enable_service_discovery) { sources += [ "api/mdns/mdns_api.cc", diff --git a/www/chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc b/www/chromium/files/patch-chrome_browser_extensions_api_api__browser__context__keyed__service__factories.cc index 6ea8bb7bd33f..875bfa1e60fb 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 2023-11-03 10:09:45 UTC +--- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc @@ -43,7 +43,7 @@ #include "extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h" #include "extensions/browser/api/networking_private/networking_private_delegate_factory.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h" #endif -@@ -115,7 +115,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt +@@ -119,7 +119,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_messaging_native__process__launcher__posix.cc b/www/chromium/files/patch-chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc index 657717257a26..835ab8925c96 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_api_messaging_native__process__launcher__posix.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc -@@ -82,7 +82,7 @@ bool NativeProcessLauncher::LaunchNativeProcess( +@@ -84,7 +84,7 @@ bool NativeProcessLauncher::LaunchNativeProcess( // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Don't use no_new_privs mode, e.g. in case the host needs to use sudo. options.allow_new_privs = true; #endif 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 857a3a5c9045..4694b834053c 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 2023-11-03 10:09:45 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -605,7 +605,7 @@ void PasswordsPrivateDelegateImpl::OnFetchingFamilyMem +@@ -601,7 +601,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 ac5b348a935c..54ae28702f81 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc @@ -1,13 +1,13 @@ ---- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2023-09-29 10:14:06 UTC +--- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc -@@ -280,7 +280,9 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor +@@ -279,7 +279,9 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor } else if (strcmp(os, "linux") == 0) { info->os = extensions::api::runtime::PlatformOs::kLinux; } else if (strcmp(os, "openbsd") == 0) { - info->os = extensions::api::runtime::PlatformOs::kOpenbsd; + info->os = extensions::api::runtime::PlatformOs::kLinux; + } else if (strcmp(os, "freebsd") == 0) { + info->os = extensions::api::runtime::PlatformOs::kLinux; } else if (strcmp(os, "fuchsia") == 0) { info->os = extensions::api::runtime::PlatformOs::kFuchsia; } else { diff --git a/www/chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc b/www/chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc index f57d014bdaf0..a8f648531454 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 2023-07-16 15:47:57 UTC +--- chrome/browser/extensions/external_provider_impl.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/extensions/external_provider_impl.cc -@@ -829,7 +829,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -830,7 +830,7 @@ void ExternalProviderImpl::CreateExternalProviders( if (!profile->GetPrefs()->GetBoolean(pref_names::kBlockExternalExtensions)) { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) provider_list->push_back(std::make_unique( service, base::MakeRefCounted( -@@ -857,7 +857,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -858,7 +858,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 788c596dc6b4..befcbcfa26ca 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 2023-11-03 10:09:45 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -324,7 +324,7 @@ const struct { +@@ -322,7 +322,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 b3b974c262b7..da62c6934b67 100644 --- a/www/chromium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/chromium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,101 +1,83 @@ ---- chrome/browser/flag_descriptions.cc.orig 2023-11-08 17:48:01 UTC +--- chrome/browser/flag_descriptions.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/flag_descriptions.cc -@@ -2599,7 +2599,7 @@ const char kWebUIOmniboxPopupName[] = "WebUI Omnibox P - const char kWebUIOmniboxPopupDescription[] = - "If enabled, shows the omnibox suggestions popup in WebUI."; - --#if !BUILDFLAG(IS_LINUX) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) - const char kWebUiSystemFontName[] = "WebUI System font"; - const char kWebUiSystemFontDescription[] = - "If enabled, all WebUI surfaces will use the default UI font of the " -@@ -7264,7 +7264,7 @@ const char kLacrosMergeIcuDataFileDescription[] = +@@ -7251,7 +7251,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 " -@@ -7481,7 +7481,7 @@ const char kSearchWebInSidePanelDescription[] = +@@ -7490,7 +7490,7 @@ const char kSearchWebInSidePanelDescription[] = // Random platform combinations ----------------------------------------------- #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kQuickCommandsName[] = "Quick Commands"; const char kQuickCommandsDescription[] = "Enable a text interface to browser features. Invoke with Ctrl-Space."; -@@ -7490,7 +7490,7 @@ const char kQuickCommandsDescription[] = +@@ -7499,7 +7499,7 @@ const char kQuickCommandsDescription[] = // BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kFollowingFeedSidepanelName[] = "Following feed in the sidepanel"; const char kFollowingFeedSidepanelDescription[] = "Enables the following feed in the sidepanel."; -@@ -7505,7 +7505,7 @@ const char kEnableProtoApiForClassifyUrlDescription[] +@@ -7514,7 +7514,7 @@ const char kEnableProtoApiForClassifyUrlDescription[] "instead of JSON."; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kEnableNetworkServiceSandboxName[] = "Enable the network service sandbox."; const char kEnableNetworkServiceSandboxDescription[] = -@@ -7529,7 +7529,7 @@ const char kWebShareDescription[] = +@@ -7538,7 +7538,7 @@ const char kWebShareDescription[] = "platforms."; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) const char kOzonePlatformHintChoiceDefault[] = "Default"; const char kOzonePlatformHintChoiceAuto[] = "Auto"; const char kOzonePlatformHintChoiceX11[] = "X11"; -@@ -7549,7 +7549,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -7558,7 +7558,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."; -@@ -7563,7 +7563,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail +@@ -7572,7 +7572,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail "storage and requests initial sync."; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kAsyncDnsName[] = "Async DNS resolver"; const char kAsyncDnsDescription[] = "Enables the built-in DNS resolver."; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -@@ -7662,7 +7662,7 @@ const char kElasticOverscrollDescription[] = +@@ -7671,7 +7671,7 @@ const char kElasticOverscrollDescription[] = #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kUIDebugToolsName[] = "Debugging tools for UI"; const char kUIDebugToolsDescription[] = "Enables additional keyboard shortcuts to help debugging."; -@@ -7674,7 +7674,7 @@ const char kSyncPollImmediatelyOnEveryStartupDescripti - #endif - - #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - const char kDataRetentionPoliciesDisableSyncTypesNeededName[] = - "Data Retention Policies Disable Sync Types"; - const char kDataRetentionPoliciesDisableSyncTypesNeededDescription[] = -@@ -7719,7 +7719,7 @@ const char kEnableAudioFocusEnforcementDescription[] = +@@ -7717,7 +7717,7 @@ const char kEnableAudioFocusEnforcementDescription[] = "any one time. Requires #enable-media-session-service to be enabled too."; #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#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 04eb999ac9f2..9640e94643b8 100644 --- a/www/chromium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/chromium/files/patch-chrome_browser_flag__descriptions.h @@ -1,107 +1,89 @@ ---- chrome/browser/flag_descriptions.h.orig 2023-11-08 17:48:01 UTC +--- chrome/browser/flag_descriptions.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/flag_descriptions.h -@@ -1485,7 +1485,7 @@ extern const char kOmnibox2023RefreshConnectionSecurit - extern const char kWebUIOmniboxPopupName[]; - extern const char kWebUIOmniboxPopupDescription[]; - --#if !BUILDFLAG(IS_LINUX) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) - extern const char kWebUiSystemFontName[]; - extern const char kWebUiSystemFontDescription[]; - #endif -@@ -4172,7 +4172,7 @@ extern const char kLacrosMergeIcuDataFileName[]; +@@ -4169,7 +4169,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) -@@ -4302,14 +4302,14 @@ extern const char kSearchWebInSidePanelDescription[]; +@@ -4309,14 +4309,14 @@ extern const char kSearchWebInSidePanelDescription[]; // Random platform combinations ----------------------------------------------- #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kQuickCommandsName[]; extern const char kQuickCommandsDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // defined (OS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kWebShareName[]; extern const char kWebShareDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -@@ -4319,7 +4319,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa +@@ -4326,7 +4326,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa extern const char kWebBluetoothConfirmPairingSupportDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kOzonePlatformHintChoiceDefault[]; extern const char kOzonePlatformHintChoiceAuto[]; extern const char kOzonePlatformHintChoiceX11[]; -@@ -4329,7 +4329,7 @@ extern const char kOzonePlatformHintName[]; +@@ -4336,7 +4336,7 @@ extern const char kOzonePlatformHintName[]; extern const char kOzonePlatformHintDescription[]; #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kSkipUndecryptablePasswordsName[]; extern const char kSkipUndecryptablePasswordsDescription[]; -@@ -4337,13 +4337,13 @@ extern const char kForcePasswordInitialSyncWhenDecrypt +@@ -4344,13 +4344,13 @@ extern const char kForcePasswordInitialSyncWhenDecrypt extern const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kAsyncDnsName[]; extern const char kAsyncDnsDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kFollowingFeedSidepanelName[]; extern const char kFollowingFeedSidepanelDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -4354,7 +4354,7 @@ extern const char kEnableProtoApiForClassifyUrlName[]; +@@ -4361,7 +4361,7 @@ extern const char kEnableProtoApiForClassifyUrlName[]; extern const char kEnableProtoApiForClassifyUrlDescription[]; #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kEnableNetworkServiceSandboxName[]; extern const char kEnableNetworkServiceSandboxDescription[]; -@@ -4431,7 +4431,7 @@ extern const char kElasticOverscrollDescription[]; +@@ -4438,7 +4438,7 @@ extern const char kElasticOverscrollDescription[]; #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kUIDebugToolsName[]; extern const char kUIDebugToolsDescription[]; -@@ -4440,7 +4440,7 @@ extern const char kSyncPollImmediatelyOnEveryStartupDe - #endif - - #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ -- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - extern const char kDataRetentionPoliciesDisableSyncTypesNeededName[]; - extern const char kDataRetentionPoliciesDisableSyncTypesNeededDescription[]; - #endif -@@ -4467,7 +4467,7 @@ extern const char kEnableAudioFocusEnforcementName[]; +@@ -4468,7 +4468,7 @@ extern const char kEnableAudioFocusEnforcementName[]; extern const char kEnableAudioFocusEnforcementDescription[]; #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#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[]; - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + diff --git a/www/chromium/files/patch-chrome_browser_intranet__redirect__detector.h b/www/chromium/files/patch-chrome_browser_intranet__redirect__detector.h index cb20abe773a3..1a16f17b16d4 100644 --- a/www/chromium/files/patch-chrome_browser_intranet__redirect__detector.h +++ b/www/chromium/files/patch-chrome_browser_intranet__redirect__detector.h @@ -1,11 +1,11 @@ ---- chrome/browser/intranet_redirect_detector.h.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/intranet_redirect_detector.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/intranet_redirect_detector.h -@@ -27,7 +27,7 @@ class SimpleURLLoader; +@@ -25,7 +25,7 @@ class SimpleURLLoader; class PrefRegistrySimple; #if !(BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)) #error "IntranetRedirectDetector should only be built on Desktop platforms." #endif diff --git a/www/chromium/files/patch-chrome_browser_media_router_discovery_BUILD.gn b/www/chromium/files/patch-chrome_browser_media_router_discovery_BUILD.gn index ebaf501970b5..d6993459de66 100644 --- a/www/chromium/files/patch-chrome_browser_media_router_discovery_BUILD.gn +++ b/www/chromium/files/patch-chrome_browser_media_router_discovery_BUILD.gn @@ -1,11 +1,11 @@ ---- chrome/browser/media/router/discovery/BUILD.gn.orig 2022-10-24 13:33:33 UTC +--- chrome/browser/media/router/discovery/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/media/router/discovery/BUILD.gn -@@ -80,7 +80,7 @@ static_library("discovery") { - "media_sink_discovery_metrics.h", +@@ -81,7 +81,7 @@ static_library("discovery") { ] + configs += [ "//build/config/compiler:wexit_time_destructors" ] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "discovery_network_list_wifi_linux.cc" ] } diff --git a/www/chromium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc b/www/chromium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc index e5f1c6f4bef3..dcb207ae1d52 100644 --- a/www/chromium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc +++ b/www/chromium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc @@ -1,20 +1,20 @@ ---- chrome/browser/media/webrtc/capture_policy_utils.cc.orig 2023-08-17 07:33:31 UTC +--- chrome/browser/media/webrtc/capture_policy_utils.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/media/webrtc/capture_policy_utils.cc -@@ -139,7 +139,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry +@@ -140,7 +140,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry } bool IsGetAllScreensMediaAllowedForAnySite(content::BrowserContext* context) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context); if (!profile) { return false; -@@ -174,7 +174,7 @@ bool IsGetAllScreensMediaAllowedForAnySite(content::Br +@@ -175,7 +175,7 @@ bool IsGetAllScreensMediaAllowedForAnySite(content::Br bool IsGetAllScreensMediaAllowed(content::BrowserContext* context, const GURL& url) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context); if (!profile) { return false; diff --git a/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc b/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc index 2200e315e7f5..a441cb120a1b 100644 --- a/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc +++ b/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc @@ -1,13 +1,13 @@ ---- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2023-08-17 07:33:31 UTC +--- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/media/webrtc/webrtc_log_uploader.cc -@@ -373,6 +373,10 @@ void WebRtcLogUploader::SetupMultipart( +@@ -374,6 +374,10 @@ void WebRtcLogUploader::SetupMultipart( const char product[] = "Chrome_ChromeOS"; #elif BUILDFLAG(IS_FUCHSIA) const char product[] = "Chrome_Fuchsia"; +#elif defined(OS_OPENBSD) + const char product[] = "Chrome_OpenBSD"; +#elif defined(OS_FREEBSD) + const char product[] = "Chrome_FreeBSD"; #else #error Platform not supported. #endif diff --git a/www/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 517e50b15c26..9f573c706c55 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,56 +1,56 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc @@ -184,7 +184,7 @@ #include "chrome/notification_helper/notification_helper_constants.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/metrics/motherboard_metrics_provider.h" #endif @@ -210,7 +210,7 @@ #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/family_link_user_metrics_provider.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_LACROS))||BUILDFLAG(IS_ANDROID)) @@ -810,7 +810,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 -@@ -892,7 +892,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -894,7 +894,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) metrics_service_->RegisterMetricsProvider( std::make_unique()); -@@ -1011,7 +1011,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -1013,7 +1013,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) -@@ -1210,7 +1210,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1212,7 +1212,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // This creates the DesktopProfileSessionDurationsServices if it didn't exist // already. diff --git a/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc b/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc index b765fa9f44fb..947bf233eb33 100644 --- a/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc +++ b/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc @@ -1,29 +1,29 @@ ---- chrome/browser/metrics/power/process_monitor.cc.orig 2023-09-13 12:11:42 UTC +--- chrome/browser/metrics/power/process_monitor.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/metrics/power/process_monitor.cc @@ -65,7 +65,7 @@ ProcessMonitor::Metrics SampleMetrics(base::ProcessMet #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) metrics.idle_wakeups = process_metrics.GetIdleWakeupsPerSecond(); #endif #if BUILDFLAG(IS_MAC) -@@ -82,7 +82,7 @@ void ScaleMetrics(ProcessMonitor::Metrics* metrics, do +@@ -81,7 +81,7 @@ void ScaleMetrics(ProcessMonitor::Metrics* metrics, do metrics->cpu_usage *= factor; #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) metrics->idle_wakeups *= factor; #endif -@@ -174,7 +174,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me +@@ -172,7 +172,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me lhs.cpu_usage += rhs.cpu_usage; #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) lhs.idle_wakeups += rhs.idle_wakeups; #endif diff --git a/www/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 d5e849f1c08e..1c4fa3acbb4b 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,156 +1,174 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/net/system_network_context_manager.cc @@ -92,7 +92,7 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/common/chrome_paths_internal.h" #include "chrome/grit/branded_strings.h" #include "ui/base/l10n/l10n_util.h" @@ -136,7 +136,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; @@ -144,7 +144,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) @@ -190,7 +190,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) @@ -205,7 +205,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) @@ -215,7 +215,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 @@ -257,11 +257,11 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() if (g_previously_failed_to_launch_sandboxed_service) { return NetworkSandboxState::kDisabledBecauseOfFailedLaunch; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* local_state = g_browser_process->local_state(); #endif -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The network service sandbox and the kerberos library are incompatible. // If kerberos is enabled by policy, disable the network service sandbox. if (g_network_service_will_allow_gssapi_library_load || -@@ -278,7 +278,7 @@ NetworkSandboxState IsNetworkSandboxEnabledInternal() +@@ -277,7 +277,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) -@@ -473,7 +473,7 @@ void SystemNetworkContextManager::DeleteInstance() { +@@ -472,7 +472,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) {} -@@ -531,7 +531,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -530,7 +530,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) -@@ -578,7 +578,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -544,7 +544,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) + +@@ -577,7 +577,7 @@ SystemNetworkContextManager::SystemNetworkContextManag #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) pref_change_registrar_.Add( prefs::kEnforceLocalAnchorConstraintsEnabled, base::BindRepeating(&SystemNetworkContextManager:: -@@ -627,7 +627,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -632,7 +632,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) -@@ -656,7 +656,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -661,7 +661,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterBooleanPref(prefs::kChromeRootStoreEnabled, false); #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Note that the default value is not relevant because the pref is only // evaluated when it is managed. registry->RegisterBooleanPref(prefs::kEnforceLocalAnchorConstraintsEnabled, -@@ -665,11 +665,11 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -670,11 +670,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) -@@ -720,7 +720,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea +@@ -727,7 +727,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) -@@ -1028,7 +1028,7 @@ void SystemNetworkContextManager::UpdateChromeRootStor +@@ -938,7 +938,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; + } +@@ -1052,7 +1052,7 @@ void SystemNetworkContextManager::UpdateChromeRootStor #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) void SystemNetworkContextManager::UpdateEnforceLocalAnchorConstraintsEnabled() { const PrefService::Preference* enforce_local_anchor_constraints_enabled_pref = local_state_->FindPreference( diff --git a/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.h b/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.h index 6b521bb05fc2..de02abbb7461 100644 --- a/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.h +++ b/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.h @@ -1,29 +1,29 @@ ---- chrome/browser/net/system_network_context_manager.h.orig 2023-10-11 18:22:24 UTC +--- chrome/browser/net/system_network_context_manager.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/net/system_network_context_manager.h @@ -185,7 +185,7 @@ class SystemNetworkContextManager { class URLLoaderFactoryForSystem; class NetworkProcessLaunchWatcher; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class GssapiLibraryLoadObserver : public network::mojom::GssapiLibraryLoadObserver { public: @@ -229,7 +229,7 @@ class SystemNetworkContextManager { #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Applies the current value of the kEnforceLocalAnchorConstraintsEnabled // pref to the enforcement state. void UpdateEnforceLocalAnchorConstraintsEnabled(); -@@ -275,7 +275,7 @@ class SystemNetworkContextManager { +@@ -277,7 +277,7 @@ class SystemNetworkContextManager { static absl::optional certificate_transparency_enabled_for_testing_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) GssapiLibraryLoadObserver gssapi_library_loader_observer_{this}; #endif // BUILDFLAG(IS_LINUX) }; diff --git a/www/chromium/files/patch-chrome_browser_performance__manager_metrics_cpu__probe_cpu__probe.cc b/www/chromium/files/patch-chrome_browser_performance__manager_metrics_cpu__probe_cpu__probe.cc new file mode 100644 index 000000000000..350e3e61130d --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_performance__manager_metrics_cpu__probe_cpu__probe.cc @@ -0,0 +1,12 @@ +--- chrome/browser/performance_manager/metrics/cpu_probe/cpu_probe.cc.orig 2023-12-10 06:10:27 UTC ++++ chrome/browser/performance_manager/metrics/cpu_probe/cpu_probe.cc +@@ -30,6 +30,9 @@ std::unique_ptr CpuProbe::Create() { + return CpuProbeWin::Create(); + #elif BUILDFLAG(IS_MAC) + return CpuProbeMac::Create(); ++#elif BUILDFLAG(IS_BSD) ++ NOTIMPLEMENTED(); ++ return nullptr; + #else + return nullptr; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc b/www/chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc index 409486be5a88..7a59a6fe4c9a 100644 --- a/www/chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc +++ b/www/chromium/files/patch-chrome_browser_policy_chrome__browser__cloud__management__controller__desktop.cc @@ -1,38 +1,38 @@ ---- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig 2023-10-11 18:22:24 UTC +--- chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/policy/chrome_browser_cloud_management_controller_desktop.cc @@ -49,7 +49,7 @@ #include "chrome/browser/policy/browser_dm_token_storage_mac.h" #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/browser_dm_token_storage_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -58,7 +58,7 @@ #include "chrome/install_static/install_util.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - #include "chrome/browser/enterprise/connectors/device_trust/device_trust_features.h" // nogncheck #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/device_trust_key_manager_impl.h" #include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/key_rotation_launcher.h" -@@ -91,7 +91,7 @@ void ChromeBrowserCloudManagementControllerDesktop:: + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +@@ -90,7 +90,7 @@ void ChromeBrowserCloudManagementControllerDesktop:: #if BUILDFLAG(IS_MAC) storage_delegate = std::make_unique(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) storage_delegate = std::make_unique(); #elif BUILDFLAG(IS_WIN) storage_delegate = std::make_unique(); -@@ -246,7 +246,7 @@ ChromeBrowserCloudManagementControllerDesktop::CreateC +@@ -245,7 +245,7 @@ ChromeBrowserCloudManagementControllerDesktop::CreateC std::unique_ptr ChromeBrowserCloudManagementControllerDesktop::CreateDeviceTrustKeyManager() { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - if (enterprise_connectors::IsDeviceTrustConnectorFeatureEnabled()) { - auto* browser_dm_token_storage = BrowserDMTokenStorage::Get(); - auto* device_management_service = GetDeviceManagementService(); + auto* browser_dm_token_storage = BrowserDMTokenStorage::Get(); + auto* device_management_service = GetDeviceManagementService(); + auto shared_url_loader_factory = GetSharedURLLoaderFactory(); 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 301e699e0c3d..2bd2471c2da5 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,212 +1,221 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc @@ -218,19 +218,20 @@ #include "components/spellcheck/browser/pref_names.h" #endif // BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/action.h" #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "components/enterprise/idle/idle_timeout_policy_handler.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) || \ + BUILDFLAG(IS_BSD) #include "chrome/browser/privacy_sandbox/privacy_sandbox_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || -@@ -816,7 +817,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -827,7 +828,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kManagedDefaultGeolocationSetting, base::Value::Type::INTEGER }, #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { key::kRequireOnlineRevocationChecksForLocalAnchors, prefs::kCertRevocationCheckingRequiredLocalAnchors, base::Value::Type::BOOLEAN }, -@@ -826,7 +827,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -837,7 +838,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) // || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kFullscreenAllowed, prefs::kFullscreenAllowed, base::Value::Type::BOOLEAN }, -@@ -1546,7 +1547,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - base::Value::Type::INTEGER }, +@@ -1569,7 +1570,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + base::Value::Type::LIST }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGSSAPILibraryName, prefs::kGSSAPILibraryName, base::Value::Type::STRING }, -@@ -1588,7 +1589,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1614,7 +1615,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 }, -@@ -1614,12 +1615,12 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1640,12 +1641,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 }, -@@ -1628,7 +1629,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1654,7 +1655,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::LIST }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ - || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kDefaultBrowserSettingEnabled, prefs::kDefaultBrowserSettingEnabled, base::Value::Type::BOOLEAN }, -@@ -1641,7 +1642,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1667,7 +1668,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) // || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ - || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kAutoplayAllowed, prefs::kAutoplayAllowed, base::Value::Type::BOOLEAN }, -@@ -1745,7 +1746,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1768,7 +1769,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 }, -@@ -1841,7 +1842,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1870,7 +1871,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1454054): replace the // kGetDisplayMediaSetSelectAllScreensAllowedForUrls policy by a policy that // matches the name of the new `getAllScreensMedia` API. -@@ -1850,7 +1851,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1879,7 +1880,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::LIST }, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { key::kAuthNegotiateDelegateByKdcPolicy, prefs::kAuthNegotiateDelegateByKdcPolicy, base::Value::Type::BOOLEAN }, -@@ -1881,7 +1882,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1910,7 +1911,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) { key::kEnforceLocalAnchorConstraintsEnabled, prefs::kEnforceLocalAnchorConstraintsEnabled, base::Value::Type::BOOLEAN }, -@@ -1957,7 +1958,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1986,7 +1987,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::kBatterySaverModeAvailability, performance_manager::user_tuning::prefs::kBatterySaverModeState, base::Value::Type::INTEGER }, -@@ -1988,7 +1989,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -2017,7 +2018,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kCloudApAuthEnabled, base::Value::Type::INTEGER }, #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kOutOfProcessSystemDnsResolutionEnabled, prefs::kOutOfProcessSystemDnsResolutionEnabled, base::Value::Type::BOOLEAN }, -@@ -2112,7 +2113,7 @@ std::unique_ptr BuildH +@@ -2057,7 +2058,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + prefs::kManagedPrivateNetworkAccessRestrictionsEnabled, + base::Value::Type::BOOLEAN }, + #if BUILDFLAG(ENABLE_EXTENSIONS) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + { key::kExtensionInstallTypeBlocklist, + extensions::pref_names::kExtensionInstallTypeBlocklist, + base::Value::Type::LIST}, +@@ -2154,7 +2155,7 @@ std::unique_ptr BuildH // Policies for all platforms - End #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -2314,7 +2315,7 @@ std::unique_ptr BuildH +@@ -2350,7 +2351,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( -@@ -2372,7 +2373,7 @@ std::unique_ptr BuildH +@@ -2408,7 +2409,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( -@@ -2433,7 +2434,7 @@ std::unique_ptr BuildH +@@ -2472,7 +2473,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)); -@@ -2795,7 +2796,7 @@ std::unique_ptr BuildH +@@ -2834,7 +2835,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( -@@ -2803,7 +2804,7 @@ std::unique_ptr BuildH +@@ -2842,7 +2843,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)); -@@ -2816,7 +2817,7 @@ std::unique_ptr BuildH - handlers->AddHandler( - std::make_unique( - chrome_schema)); +@@ -2859,7 +2860,7 @@ std::unique_ptr BuildH + /*new_policy_handler=*/std::make_unique< + first_party_sets::FirstPartySetsOverridesPolicyHandler>( + policy::key::kRelatedWebsiteSetsOverrides, chrome_schema))); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || 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 2426d93a6e79..9faf52c3aed7 100644 --- a/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc +++ b/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -1,75 +1,75 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/prefs/browser_prefs.cc @@ -485,18 +485,18 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "components/device_signals/core/browser/pref_names.h" // nogncheck due to crbug.com/1125897 #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/browser_switcher/browser_switcher_prefs.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/signin/enterprise_signin_prefs.h" #endif @@ -528,7 +528,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 -@@ -674,7 +674,7 @@ const char kPluginsPluginsList[] = "plugins.plugins_li +@@ -652,7 +652,7 @@ const char kPluginsPluginsList[] = "plugins.plugins_li const char kPluginsShowDetails[] = "plugins.show_details"; // Deprecated 02/2023. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kWebAppsUrlHandlerInfo[] = "web_apps.url_handler_info"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -995,7 +995,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistryS +@@ -982,7 +982,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistryS #endif // BUILDFLAG(IS_CHROMEOS_ASH) // Deprecated 02/2023. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterDictionaryPref(kWebAppsUrlHandlerInfo); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -1950,12 +1950,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -1959,12 +1959,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 -@@ -2110,7 +2110,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local +@@ -2121,7 +2121,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local #endif // BUILDFLAG(IS_CHROMEOS_ASH) // Added 02/2023 -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) local_state->ClearPref(kWebAppsUrlHandlerInfo); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) diff --git a/www/chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc b/www/chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc index e7c05a2cd53f..f079aece12d5 100644 --- a/www/chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc +++ b/www/chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc @@ -1,29 +1,29 @@ ---- chrome/browser/printing/print_backend_service_manager.cc.orig 2023-09-13 12:11:42 UTC +--- chrome/browser/printing/print_backend_service_manager.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/printing/print_backend_service_manager.cc @@ -33,7 +33,7 @@ #include "printing/buildflags/buildflags.h" #include "printing/printing_features.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/public/common/content_switches.h" #endif -@@ -851,7 +851,7 @@ PrintBackendServiceManager::GetServiceFromBundle( +@@ -849,7 +849,7 @@ PrintBackendServiceManager::GetServiceFromBundle( host.BindNewPipeAndPassReceiver(), content::ServiceProcessHost::Options() .WithDisplayName(IDS_UTILITY_PROCESS_PRINT_BACKEND_SERVICE_NAME) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) .WithExtraCommandLineSwitches({switches::kMessageLoopTypeUi}) #endif .Pass()); -@@ -1024,7 +1024,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate +@@ -1022,7 +1022,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate return kNoClientsRegisteredResetOnIdleTimeout; case ClientType::kQueryWithUi: -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No need to update if there were other query with UI clients. if (HasQueryWithUiClientForRemoteId(remote_id)) { return absl::nullopt; diff --git a/www/chromium/files/patch-chrome_browser_printing_printer__query.cc b/www/chromium/files/patch-chrome_browser_printing_printer__query.cc index ff226678e5f6..5556f36f2bf8 100644 --- a/www/chromium/files/patch-chrome_browser_printing_printer__query.cc +++ b/www/chromium/files/patch-chrome_browser_printing_printer__query.cc @@ -1,11 +1,11 @@ ---- chrome/browser/printing/printer_query.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/printing/printer_query.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/printing/printer_query.cc -@@ -339,7 +339,7 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Di +@@ -341,7 +341,7 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Di crash_key = std::make_unique( print_backend->GetPrinterDriverInfo(printer_name)); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) +#if (BUILDFLAG(IS_BSD) || BUILDFLAG(IS_LINUX)) && BUILDFLAG(USE_CUPS) PrinterBasicInfo basic_info; if (print_backend->GetPrinterBasicInfo(printer_name, &basic_info) == mojom::ResultCode::kSuccess) { diff --git a/www/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 9c8478f851d0..9ec764934202 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,96 +1,96 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -393,18 +393,18 @@ +@@ -401,18 +401,18 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.h" #include "chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.h" #include "chrome/browser/enterprise/signals/user_permission_service_factory.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/idle_service_factory.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_switcher/browser_switcher_service_factory.h" #include "chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_factory.h" #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" -@@ -607,7 +607,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -621,7 +621,7 @@ void ChromeBrowserMainExtraPartsProfiles:: if (breadcrumbs::IsEnabled()) { BreadcrumbManagerKeyedServiceFactory::GetInstance(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherServiceFactory::GetInstance(); #endif browser_sync::UserEventServiceFactory::GetInstance(); -@@ -707,29 +707,29 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -727,29 +727,29 @@ void ChromeBrowserMainExtraPartsProfiles:: enterprise_commands::UserRemoteCommandsServiceFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) enterprise_connectors::DeviceTrustConnectorServiceFactory::GetInstance(); enterprise_connectors::DeviceTrustServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_connectors::LocalBinaryUploadServiceFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) enterprise_idle::IdleServiceFactory::GetInstance(); #endif #if !BUILDFLAG(IS_CHROMEOS_ASH) enterprise_reporting::CloudProfileReportingServiceFactory::GetInstance(); #endif enterprise_reporting::LegacyTechServiceFactory::GetInstance(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_signals::SignalsAggregatorFactory::GetInstance(); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) enterprise_signals::UserPermissionServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_signin::EnterpriseSigninServiceFactory::GetInstance(); #endif #if BUILDFLAG(ENABLE_SESSION_SERVICE) -@@ -844,7 +844,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -865,7 +865,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance(); #endif -@@ -940,7 +940,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -963,7 +963,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if BUILDFLAG(IS_CHROMEOS) policy::PolicyCertServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) policy::ProfileTokenPolicyWebSigninServiceFactory::GetInstance(); #endif policy::UserCloudPolicyInvalidatorFactory::GetInstance(); -@@ -981,7 +981,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1007,7 +1007,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if !BUILDFLAG(IS_ANDROID) ProfileThemeUpdateServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileTokenWebSigninInterceptorFactory::GetInstance(); #endif #if !BUILDFLAG(IS_ANDROID) 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 1b75cc793206..4c09d75ecf98 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 2023-09-13 12:11:42 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -258,6 +258,10 @@ +@@ -260,6 +260,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; -@@ -600,7 +604,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async +@@ -605,7 +609,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async #else { #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileManager* profile_manager = g_browser_process->profile_manager(); ProfileAttributesEntry* entry = profile_manager->GetProfileAttributesStorage() -@@ -873,7 +877,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -884,7 +888,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_resources_settings_route.ts b/www/chromium/files/patch-chrome_browser_resources_settings_route.ts index 0e9552dcae11..8167fcbdc309 100644 --- a/www/chromium/files/patch-chrome_browser_resources_settings_route.ts +++ b/www/chromium/files/patch-chrome_browser_resources_settings_route.ts @@ -1,11 +1,11 @@ ---- chrome/browser/resources/settings/route.ts.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/resources/settings/route.ts.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/resources/settings/route.ts -@@ -240,7 +240,7 @@ function createBrowserSettingsRoutes(): SettingsRoutes +@@ -242,7 +242,7 @@ function createBrowserSettingsRoutes(): SettingsRoutes r.ACCESSIBILITY = r.ADVANCED.createSection( '/accessibility', 'a11y', loadTimeData.getString('a11yPageTitle')); - // + // r.CAPTIONS = r.ACCESSIBILITY.createChild('/captions'); // diff --git a/www/chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc b/www/chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc index 1af71da5fec9..0723ad0cbba0 100644 --- a/www/chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc +++ b/www/chromium/files/patch-chrome_browser_safe__browsing_download__protection_file__analyzer.cc @@ -1,29 +1,29 @@ ---- chrome/browser/safe_browsing/download_protection/file_analyzer.cc.orig 2023-10-11 18:22:24 UTC +--- chrome/browser/safe_browsing/download_protection/file_analyzer.cc.orig 2023-12-10 06:10:27 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 -@@ -83,7 +83,7 @@ void FileAnalyzer::Start(const base::FilePath& target_ +@@ -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) { StartExtractDocumentFeatures(); #endif @@ -314,7 +314,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 index fdd114ec76f3..3469ee44763d 100644 --- 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 @@ -1,29 +1,29 @@ ---- chrome/browser/safe_browsing/download_protection/file_analyzer.h.orig 2023-10-11 18:22:24 UTC +--- 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 -@@ -109,7 +109,7 @@ class FileAnalyzer { +@@ -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); -@@ -139,7 +139,7 @@ class FileAnalyzer { +@@ -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_safe__browsing_incident__reporting_incident__reporting__service.cc b/www/chromium/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc index fb76734a5a1e..0d4abf133c4f 100644 --- a/www/chromium/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc +++ b/www/chromium/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc @@ -1,11 +1,11 @@ ---- chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc.orig 2023-02-08 09:03:45 UTC +--- chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc -@@ -705,7 +705,7 @@ void IncidentReportingService::OnEnvironmentDataCollec +@@ -694,7 +694,7 @@ void IncidentReportingService::OnEnvironmentDataCollec // Process::Current().CreationTime() is missing on some platforms. #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::TimeDelta uptime = first_incident_time_ - base::Process::Current().CreationTime(); environment_data->mutable_process()->set_uptime_msec(uptime.InMilliseconds()); 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 a69322f8f6b7..02cf0e369e68 100644 --- a/www/chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc +++ b/www/chromium/files/patch-chrome_browser_sync_chrome__sync__client.cc @@ -1,38 +1,38 @@ ---- chrome/browser/sync/chrome_sync_client.cc.orig 2023-09-13 12:11:42 UTC +--- chrome/browser/sync/chrome_sync_client.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/sync/chrome_sync_client.cc -@@ -110,7 +110,7 @@ +@@ -111,7 +111,7 @@ #endif // BUILDFLAG(ENABLE_SPELLCHECK) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service.h" #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h" #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || -@@ -440,7 +440,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy +@@ -441,7 +441,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy #endif // !BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kTabGroupsSave)) { controllers.push_back(std::make_unique( syncer::SAVED_TAB_GROUP, -@@ -453,7 +453,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy +@@ -454,7 +454,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy // Chrome prefers OS provided spell checkers where they exist. So only sync the // custom dictionary on platforms that typically don't provide one. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Dictionary sync is enabled by default. if (GetPrefService()->GetBoolean(spellcheck::prefs::kSpellCheckEnable)) { controllers.push_back( -@@ -609,7 +609,7 @@ base::WeakPtr +@@ -610,7 +610,7 @@ base::WeakPtr ChromeSyncClient::GetControllerDelegateForModelType(syncer::ModelType type) { switch (type) { #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) case syncer::SAVED_TAB_GROUP: { DCHECK(base::FeatureList::IsEnabled(features::kTabGroupsSave)); return SavedTabGroupServiceFactory::GetForProfile(profile_) diff --git a/www/chromium/files/patch-chrome_browser_sync_sync__service__factory.cc b/www/chromium/files/patch-chrome_browser_sync_sync__service__factory.cc index 6703e4ce4494..dac5d4eb703a 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 2023-11-03 10:09:45 UTC +--- chrome/browser/sync/sync_service_factory.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/sync/sync_service_factory.cc -@@ -81,7 +81,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" #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || // BUILDFLAG(IS_WIN) -@@ -126,7 +126,7 @@ std::unique_ptr BuildSyncService( +@@ -131,7 +131,7 @@ std::unique_ptr BuildSyncService( // TODO(crbug.com/1052397): Reassess whether the following block needs to be // included in lacros-chrome once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) syncer::SyncPrefs prefs(profile->GetPrefs()); local_sync_backend_enabled = prefs.IsLocalSyncEnabled(); -@@ -252,7 +252,7 @@ SyncServiceFactory::SyncServiceFactory() - DependsOn(PasswordStoreFactory::GetInstance()); +@@ -258,7 +258,7 @@ SyncServiceFactory::SyncServiceFactory() + DependsOn(ProfilePasswordStoreFactory::GetInstance()); DependsOn(PowerBookmarkServiceFactory::GetInstance()); #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) DependsOn(SavedTabGroupServiceFactory::GetInstance()); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || // BUILDFLAG(IS_WIN) diff --git a/www/chromium/files/patch-chrome_browser_sync_sync__service__util.cc b/www/chromium/files/patch-chrome_browser_sync_sync__service__util.cc new file mode 100644 index 000000000000..466910d9f989 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_sync_sync__service__util.cc @@ -0,0 +1,20 @@ +--- chrome/browser/sync/sync_service_util.cc.orig 2023-12-10 06:10:27 UTC ++++ chrome/browser/sync/sync_service_util.cc +@@ -9,7 +9,7 @@ + #include "components/sync/base/features.h" + + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "components/variations/service/variations_service.h" + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || + // BUILDFLAG(IS_WIN) +@@ -22,7 +22,7 @@ bool IsDesktopEnUSLocaleOnlySyncPollFeatureEnabled() { + } + + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + std::string country_code; + auto* variations_service = g_browser_process->variations_service(); + if (variations_service) { 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 32c7da251e21..2b148dfd9876 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 2023-11-03 10:09:45 UTC +--- chrome/browser/themes/theme_service.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/themes/theme_service.cc -@@ -75,7 +75,7 @@ +@@ -74,7 +74,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" #endif -@@ -331,7 +331,7 @@ CustomThemeSupplier* ThemeService::GetThemeSupplier() +@@ -330,7 +330,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 d250c5c0787b..820547336989 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 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/actions/chrome_action_id.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/actions/chrome_action_id.h -@@ -542,7 +542,7 @@ +@@ -526,7 +526,7 @@ IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_ANSWER) \ E(kActionContentContextQuickAnswersInlineQuery, \ IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_QUERY) -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #define CHROME_PLATFORM_SPECIFIC_ACTION_IDS \ E(kUseSystemTitleBar, IDC_USE_SYSTEM_TITLE_BAR) \ E(kRestoreWindow, IDC_RESTORE_WINDOW) diff --git a/www/chromium/files/patch-chrome_browser_ui_browser__command__controller.cc b/www/chromium/files/patch-chrome_browser_ui_browser__command__controller.cc index e814ee65c6b3..c13e8710bdbc 100644 --- a/www/chromium/files/patch-chrome_browser_ui_browser__command__controller.cc +++ b/www/chromium/files/patch-chrome_browser_ui_browser__command__controller.cc @@ -1,53 +1,53 @@ ---- chrome/browser/ui/browser_command_controller.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/browser_command_controller.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/browser_command_controller.cc -@@ -125,7 +125,7 @@ +@@ -121,7 +121,7 @@ #include "components/user_manager/user_manager.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/base/ime/text_input_flags.h" #include "ui/linux/linux_ui.h" #endif - -@@ -306,7 +306,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( +@@ -303,7 +303,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( #endif } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If this key was registered by the user as a content editing hotkey, then // it is not reserved. auto* linux_ui = ui::LinuxUi::instance(); -@@ -557,7 +557,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -555,7 +555,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) case IDC_MINIMIZE_WINDOW: browser_->window()->Minimize(); break; -@@ -569,7 +569,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -567,7 +567,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo break; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) case IDC_USE_SYSTEM_TITLE_BAR: { PrefService* prefs = profile()->GetPrefs(); prefs->SetBoolean(prefs::kUseCustomChromeFrame, -@@ -1215,12 +1215,12 @@ void BrowserCommandController::InitCommandState() { +@@ -1234,12 +1234,12 @@ void BrowserCommandController::InitCommandState() { #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_MAXIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_RESTORE_WINDOW, true); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool use_system_title_bar = true; #if BUILDFLAG(IS_OZONE) use_system_title_bar = ui::OzonePlatform::GetInstance() diff --git a/www/chromium/files/patch-chrome_browser_ui_browser__dialogs.h b/www/chromium/files/patch-chrome_browser_ui_browser__dialogs.h deleted file mode 100644 index 70f1f04b6c41..000000000000 --- a/www/chromium/files/patch-chrome_browser_ui_browser__dialogs.h +++ /dev/null @@ -1,29 +0,0 @@ ---- chrome/browser/ui/browser_dialogs.h.orig 2023-11-03 10:09:45 UTC -+++ chrome/browser/ui/browser_dialogs.h -@@ -26,7 +26,7 @@ - #include "ui/gfx/native_widget_types.h" - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - #include "chrome/browser/web_applications/web_app_callback_app_identity.h" - #include "chrome/browser/web_applications/web_app_id.h" - #include "chrome/browser/web_applications/web_app_install_info.h" -@@ -84,7 +84,7 @@ class Widget; - } // namespace views - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - namespace webapps { - class MlInstallOperationTracker; - struct Screenshot; -@@ -162,7 +162,7 @@ void ShowBluetoothDevicePairConfirmDialog( - #endif // PAIR_BLUETOOTH_ON_DEMAND() - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - // Callback used to indicate whether a user has accepted the installation of a - // web app. The boolean parameter is true when the user accepts the dialog. The - // WebAppInstallInfo parameter contains the information about the app, 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 c763dffb4652..fc64faedbcb5 100644 --- a/www/chromium/files/patch-chrome_browser_ui_chrome__pages.cc +++ b/www/chromium/files/patch-chrome_browser_ui_chrome__pages.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/chrome_pages.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/chrome_pages.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/chrome_pages.cc @@ -79,7 +79,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/web_app_utils.h" #endif -@@ -674,7 +674,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -672,7 +672,7 @@ void ShowShortcutCustomizationApp(Profile* profile, } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) void ShowWebAppSettingsImpl(Browser* browser, Profile* profile, const std::string& app_id, diff --git a/www/chromium/files/patch-chrome_browser_ui_chrome__pages.h b/www/chromium/files/patch-chrome_browser_ui_chrome__pages.h index 28f19be78051..3e4ea8296df4 100644 --- a/www/chromium/files/patch-chrome_browser_ui_chrome__pages.h +++ b/www/chromium/files/patch-chrome_browser_ui_chrome__pages.h @@ -1,20 +1,20 @@ ---- chrome/browser/ui/chrome_pages.h.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/chrome_pages.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/chrome_pages.h @@ -38,7 +38,7 @@ enum class ConsentLevel; } // namespace signin #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) namespace web_app { enum class AppSettingsPageEntryPoint; } // namespace web_app -@@ -250,7 +250,7 @@ void ShowShortcutCustomizationApp(Profile* profile, +@@ -255,7 +255,7 @@ void ShowShortcutCustomizationApp(Profile* profile, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Show chrome://app-settings/ page. void ShowWebAppSettings(Browser* browser, const std::string& app_id, diff --git a/www/chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc b/www/chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc index bcf943832f98..1bf1be049723 100644 --- a/www/chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc +++ b/www/chromium/files/patch-chrome_browser_ui_omnibox_omnibox__pedal__implementations.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc -@@ -1981,7 +1981,7 @@ const gfx::VectorIcon& GetSharingHubVectorIcon() { +@@ -1995,7 +1995,7 @@ const gfx::VectorIcon& GetSharingHubVectorIcon() { OmniboxFieldTrial::IsChromeRefreshActionChipIconsEnabled() ? omnibox::kShareWinChromeRefreshIcon : omnibox::kShareWinIcon; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return OmniboxFieldTrial::IsChromeRefreshIconsEnabled() || OmniboxFieldTrial::IsChromeRefreshActionChipIconsEnabled() ? omnibox::kShareLinuxChromeRefreshIcon 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 173a532c0676..7f3cada9cd20 100644 --- a/www/chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc +++ b/www/chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator__impl.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig 2023-07-16 15:47:57 UTC +--- chrome/browser/ui/startup/startup_browser_creator_impl.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/startup/startup_browser_creator_impl.cc -@@ -260,7 +260,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser( +@@ -255,7 +255,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser( // at the state of the MessageLoop. Browser::CreateParams params = Browser::CreateParams(profile_, false); params.creation_source = Browser::CreationSource::kStartupCreator; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) params.startup_id = command_line_->GetSwitchValueASCII("desktop-startup-id"); #endif diff --git a/www/chromium/files/patch-chrome_browser_ui_tab__helpers.cc b/www/chromium/files/patch-chrome_browser_ui_tab__helpers.cc index 2492b4516cd3..dc207cc6aceb 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 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/tab_helpers.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/tab_helpers.cc -@@ -224,7 +224,7 @@ +@@ -225,7 +225,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/blocked_content/framebust_block_tab_helper.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/hats/hats_helper.h" -@@ -629,12 +629,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -658,12 +658,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( features::kHappinessTrackingSurveysForDesktopDemo) || base::FeatureList::IsEnabled(features::kTrustSafetySentimentSurvey) || diff --git a/www/chromium/files/patch-chrome_browser_ui_tabs_organization_trigger__observer.h b/www/chromium/files/patch-chrome_browser_ui_tabs_organization_trigger__observer.h new file mode 100644 index 000000000000..335829b76dcf --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_ui_tabs_organization_trigger__observer.h @@ -0,0 +1,10 @@ +--- chrome/browser/ui/tabs/organization/trigger_observer.h.orig 2023-12-10 06:10:27 UTC ++++ chrome/browser/ui/tabs/organization/trigger_observer.h +@@ -6,6 +6,7 @@ + #define CHROME_BROWSER_UI_TABS_ORGANIZATION_TRIGGER_OBSERVER_H_ + + #include ++#include + + #include "base/functional/callback.h" + #include "chrome/browser/ui/browser_list_observer.h" diff --git a/www/chromium/files/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc b/www/chromium/files/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc index a3c53bca6cc2..5e5fa24fb11f 100644 --- a/www/chromium/files/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc +++ b/www/chromium/files/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/task_manager/task_manager_table_model.cc.orig 2023-03-09 06:31:50 UTC +--- chrome/browser/ui/task_manager/task_manager_table_model.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/task_manager/task_manager_table_model.cc @@ -454,7 +454,7 @@ std::u16string TaskManagerTableModel::GetText(size_t r ? stringifier_->backgrounded_string() : stringifier_->foregrounded_string(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN: { const int fd_count = observed_task_manager()->GetOpenFdCount(tasks_[row]); return fd_count >= 0 ? base::FormatNumber(fd_count) @@ -621,7 +621,7 @@ int TaskManagerTableModel::CompareValues(size_t row1, return BooleanCompare(is_proc1_bg, is_proc2_bg); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN: { const int proc1_fd_count = observed_task_manager()->GetOpenFdCount(tasks_[row1]); -@@ -795,7 +795,7 @@ void TaskManagerTableModel::UpdateRefreshTypes(int col +@@ -799,7 +799,7 @@ void TaskManagerTableModel::UpdateRefreshTypes(int col type = REFRESH_TYPE_KEEPALIVE_COUNT; break; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN: type = REFRESH_TYPE_FD_COUNT; break; 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 868472a75204..9250164b274d 100644 --- a/www/chromium/files/patch-chrome_browser_ui_ui__features.cc +++ b/www/chromium/files/patch-chrome_browser_ui_ui__features.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/ui_features.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/ui_features.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/ui_features.cc -@@ -311,7 +311,7 @@ BASE_FEATURE(kTopChromeWebUIUsesSpareRenderer, +@@ -300,7 +300,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 27541d8c188c..a6a370e10a42 100644 --- a/www/chromium/files/patch-chrome_browser_ui_ui__features.h +++ b/www/chromium/files/patch-chrome_browser_ui_ui__features.h @@ -1,11 +1,11 @@ ---- chrome/browser/ui/ui_features.h.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/ui_features.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/ui_features.h -@@ -195,7 +195,7 @@ BASE_DECLARE_FEATURE(kToolbarUseHardwareBitmapDraw); +@@ -191,7 +191,7 @@ BASE_DECLARE_FEATURE(kToolbarUseHardwareBitmapDraw); BASE_DECLARE_FEATURE(kTopChromeWebUIUsesSpareRenderer); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kUpdateTextOptions); extern const base::FeatureParam kUpdateTextOptionNumber; #endif diff --git a/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc b/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__view.cc index 18f0847ab193..8d081c48d551 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 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -2134,7 +2134,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra +@@ -2167,7 +2167,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra // CrOS cleanup is done. // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) contents_web_view_->SetFastResize(is_dragging); if (!is_dragging) { // When tab dragging is ended, we need to make sure the web contents get diff --git a/www/chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc b/www/chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.cc index f1a40b746f63..3af4cec7cdb8 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 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc @@ -55,7 +55,7 @@ #include "ui/aura/window.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/views/frame/browser_frame_view_paint_utils_linux.h" #include "chrome/browser/ui/views/frame/desktop_browser_frame_aura_linux.h" #endif -@@ -82,7 +82,7 @@ constexpr int kBackToTabImageSize = 16; +@@ -83,7 +83,7 @@ constexpr int kContentSettingIconSize = 16; // The height of the controls bar at the top of the window. constexpr int kTopControlsHeight = 30; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Frame border when window shadow is not drawn. constexpr int kFrameBorderThickness = 4; #endif -@@ -177,7 +177,7 @@ class WindowEventObserver : public ui::EventObserver { +@@ -178,7 +178,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()) { -@@ -558,7 +558,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow +@@ -560,7 +560,7 @@ PictureInPictureBrowserFrameView::PictureInPictureBrow AddChildView(std::move(auto_pip_setting_overlay)); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) frame_background_ = std::make_unique(); #endif -@@ -734,7 +734,7 @@ void PictureInPictureBrowserFrameView::OnThemeChanged( +@@ -736,7 +736,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))); -@@ -803,7 +803,7 @@ void PictureInPictureBrowserFrameView::RemovedFromWidg +@@ -811,7 +811,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(); -@@ -1052,7 +1052,7 @@ void PictureInPictureBrowserFrameView::AnimationProgre +@@ -1058,7 +1058,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_) { -@@ -1176,7 +1176,7 @@ void PictureInPictureBrowserFrameView::UpdateTopBarVie +@@ -1182,7 +1182,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 auto tiled_edges = frame()->tiled_edges(); -@@ -1197,7 +1197,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor +@@ -1203,7 +1203,7 @@ gfx::Insets PictureInPictureBrowserFrameView::FrameBor } gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return FrameBorderInsets(); #elif BUILDFLAG(IS_CHROMEOS_ASH) return gfx::Insets(chromeos::kResizeInsideBoundsSize); -@@ -1218,7 +1218,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie +@@ -1224,7 +1224,7 @@ gfx::Size PictureInPictureBrowserFrameView::GetNonClie top_height + border_thickness.bottom()); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void PictureInPictureBrowserFrameView::SetWindowFrameProvider( ui::WindowFrameProvider* window_frame_provider) { DCHECK(window_frame_provider); diff --git a/www/chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h b/www/chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h index bfc3828c295b..ce0863199aee 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h +++ b/www/chromium/files/patch-chrome_browser_ui_views_frame_picture__in__picture__browser__frame__view.h @@ -1,47 +1,47 @@ ---- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h @@ -24,7 +24,7 @@ #include "ui/views/controls/image_view.h" #include "ui/views/widget/widget_observer.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/window_frame_provider.h" #endif @@ -32,7 +32,7 @@ // window, so to prevent cutting off important dialogs we resize the // picture-in-picture window to fit them. While ChromeOS also uses Aura, it does // not have this issue so we do not resize on ChromeOS. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #define RESIZE_DOCUMENT_PICTURE_IN_PICTURE_TO_DIALOG 1 #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) @@ -97,7 +97,7 @@ class PictureInPictureBrowserFrameView void Layout() override; void AddedToWidget() override; void RemovedFromWidget() override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) gfx::Insets MirroredFrameBorderInsets() const override; gfx::Insets GetInputInsets() const override; SkRRect GetRestoredClipRegion() const override; -@@ -188,7 +188,7 @@ class PictureInPictureBrowserFrameView - // Called when mouse entered or exited the pip window. - void OnMouseEnteredOrExitedWindow(bool entered); +@@ -191,7 +191,7 @@ class PictureInPictureBrowserFrameView + // Returns true if there's an overlay view that's currently shown. + bool IsOverlayViewVisible() const; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Sets the window frame provider so that it will be used for drawing. void SetWindowFrameProvider(ui::WindowFrameProvider* window_frame_provider); -@@ -355,7 +355,7 @@ class PictureInPictureBrowserFrameView +@@ -358,7 +358,7 @@ class PictureInPictureBrowserFrameView // `top_bar_color_animation_`. absl::optional current_foreground_color_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Used to draw window frame borders and shadow on Linux when GTK theme is // enabled. raw_ptr window_frame_provider_ = nullptr; diff --git a/www/chromium/files/patch-chrome_browser_ui_views_hung__renderer__view.cc b/www/chromium/files/patch-chrome_browser_ui_views_hung__renderer__view.cc index 92d21d084615..d4221010469b 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_hung__renderer__view.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_hung__renderer__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/hung_renderer_view.cc.orig 2023-02-08 09:03:45 UTC +--- chrome/browser/ui/views/hung_renderer_view.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/views/hung_renderer_view.cc -@@ -404,7 +404,7 @@ void HungRendererDialogView::ForceCrashHungRenderer() +@@ -405,7 +405,7 @@ void HungRendererDialogView::ForceCrashHungRenderer() content::RenderProcessHost* rph = hung_pages_table_model_->GetRenderWidgetHost()->GetProcess(); if (rph) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // A generic |CrashDumpHungChildProcess()| is not implemented for Linux. // Instead we send an explicit IPC to crash on the renderer's IO thread. rph->ForceCrash(); 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 240ee58e1a10..28a18dcd2aad 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 2023-10-11 18:22:24 UTC +--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc -@@ -652,7 +652,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( +@@ -660,7 +660,7 @@ void ProfileMenuViewBase::SetProfileIdentityInfo( // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // crbug.com/1161166: Orca does not read the accessible window title of the // bubble, so we duplicate it in the top-level menu item. To be revisited // after considering other options, including fixes on the AT side. diff --git a/www/chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc b/www/chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc index 085ca06d3ec5..855f85df1cf0 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_tab__search__bubble__host.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/tab_search_bubble_host.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/views/tab_search_bubble_host.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/views/tab_search_bubble_host.cc -@@ -186,7 +186,7 @@ bool TabSearchBubbleHost::ShouldTabSearchRenderBeforeT +@@ -222,7 +222,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 bbfe971da5f9..88a539d23489 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 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/views/tabs/tab.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/views/tabs/tab.cc -@@ -610,7 +610,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& +@@ -611,7 +611,7 @@ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& if (mouse_hovered_ || !GetWidget()->IsMouseEventsEnabled()) return; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Move the hit test area for hovering up so that it is not overlapped by tab // hover cards when they are shown. // TODO(crbug.com/978134): Once Linux/CrOS widget transparency is solved, diff --git a/www/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 ec96efabdc3b..7b5ac9ff2039 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 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/views/tabs/tab_drag_controller.cc -@@ -91,7 +91,7 @@ +@@ -89,7 +89,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 -@@ -208,7 +208,7 @@ bool IsWindowDragUsingSystemDragDropAllowed() { +@@ -206,7 +206,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)) { -@@ -388,7 +388,7 @@ void TabDragController::Init(TabDragContext* source_co +@@ -386,7 +386,7 @@ void TabDragController::Init(TabDragContext* source_co // synchronous on desktop Linux, so use that. // - ChromeOS Ash // Releasing capture on Ash cancels gestures so avoid it. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) can_release_capture_ = false; #endif start_point_in_screen_ = gfx::Point(source_view_offset, mouse_offset.y()); -@@ -1013,7 +1013,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon +@@ -1011,7 +1011,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) // EndMoveLoop is going to snap the window back to its original location. // Hide it so users don't see this. Hiding a window in Linux aura causes // it to lose capture so skip it. -@@ -2053,7 +2053,7 @@ void TabDragController::CompleteDrag() { +@@ -2059,7 +2059,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 -@@ -2485,7 +2485,7 @@ TabDragController::Liveness TabDragController::GetLoca +@@ -2483,7 +2483,7 @@ TabDragController::Liveness TabDragController::GetLoca } // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Exclude windows which are pending deletion via Browser::TabStripEmpty(). // These windows can be returned in the Linux Aura port because the browser // window which was used for dragging is not hidden once all of its tabs are diff --git a/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc b/www/chromium/files/patch-chrome_browser_ui_views_tabs_tab__hover__card__bubble__view.cc index 6137e1995bc1..ba5ff2d3f27a 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 2023-09-13 12:11:42 UTC +--- chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc -@@ -372,7 +372,7 @@ TabHoverCardBubbleView::TabHoverCardBubbleView(Tab* ta +@@ -376,7 +376,7 @@ TabHoverCardBubbleView::TabHoverCardBubbleView(Tab* ta // not become active. Setting this to false creates the need to explicitly // hide the hovercard on press, touch, and keyboard events. SetCanActivate(false); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) set_accept_events(false); #endif diff --git a/www/chromium/files/patch-chrome_browser_ui_views_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 2dc8ef430563..086710108bf4 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 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc -@@ -464,7 +464,7 @@ std::string GetFileExtension(FileExtension file_extens +@@ -463,7 +463,7 @@ std::string GetFileExtension(FileExtension file_extens } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_BSD) SiteConfig GetSiteConfigurationFromAppName(const std::string& app_name) { SiteConfig config; bool is_app_found = false; -@@ -1936,7 +1936,7 @@ void WebAppIntegrationTestDriver::DeletePlatformShortc +@@ -1924,7 +1924,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( -@@ -3253,7 +3253,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginEna +@@ -3243,7 +3243,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 -@@ -3268,7 +3268,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3258,7 +3258,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 -@@ -3278,7 +3278,7 @@ void WebAppIntegrationTestDriver::CheckRunOnOsLoginDis +@@ -3268,7 +3268,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; } -@@ -3294,7 +3294,7 @@ void WebAppIntegrationTestDriver::CheckSiteHandlesFile +@@ -3284,7 +3284,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; } -@@ -4079,7 +4079,7 @@ base::FilePath WebAppIntegrationTestDriver::GetShortcu +@@ -4077,7 +4077,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 -@@ -4273,7 +4273,7 @@ bool WebAppIntegrationTestDriver::IsShortcutAndIconCre +@@ -4271,7 +4271,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); -@@ -4317,7 +4317,7 @@ bool WebAppIntegrationTestDriver::DoIconColorsMatch(Pr +@@ -4315,7 +4315,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; absl::optional actual_color_install_icon_size = diff --git a/www/chromium/files/patch-chrome_browser_web__applications_web__app__install__info.h b/www/chromium/files/patch-chrome_browser_ui_web__applications_web__app__dialogs.h similarity index 50% copy from www/chromium/files/patch-chrome_browser_web__applications_web__app__install__info.h copy to www/chromium/files/patch-chrome_browser_ui_web__applications_web__app__dialogs.h index d0a52aa2c8d3..d00574e9b304 100644 --- a/www/chromium/files/patch-chrome_browser_web__applications_web__app__install__info.h +++ b/www/chromium/files/patch-chrome_browser_ui_web__applications_web__app__dialogs.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/web_app_install_info.h.orig 2023-11-03 10:09:45 UTC -+++ chrome/browser/web_applications/web_app_install_info.h -@@ -36,7 +36,7 @@ - #include "url/gurl.h" +--- chrome/browser/ui/web_applications/web_app_dialogs.h.orig 2023-12-10 06:10:27 UTC ++++ chrome/browser/ui/web_applications/web_app_dialogs.h +@@ -20,7 +20,7 @@ + #include "ui/gfx/native_widget_types.h" static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)); + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)); - class SkBitmap; - + class GURL; + class Profile; 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 18ae5a2e4f0e..0a8ea1bb658a 100644 --- a/www/chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc +++ b/www/chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc @@ -1,92 +1,92 @@ ---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -212,7 +212,7 @@ +@@ -210,7 +210,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 -@@ -238,17 +238,17 @@ +@@ -236,17 +236,17 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/discards/discards_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/sandbox/sandbox_internals_ui.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/connectors_internals/connectors_internals_ui.h" #endif -@@ -401,7 +401,7 @@ bool IsAboutUI(const GURL& url) { +@@ -403,7 +403,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) -@@ -660,7 +660,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -667,7 +667,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 -@@ -723,7 +723,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -730,7 +730,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) -@@ -794,27 +794,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -791,27 +791,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUISandboxHost) { return &NewWebUI; } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIConnectorsInternalsHost) return &NewWebUI; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIDiscardsHost) return &NewWebUI; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIBrowserSwitchHost) return &NewWebUI; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIWebAppSettingsHost) return &NewWebUI; #endif diff --git a/www/chromium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc b/www/chromium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc index c6b53070341f..ddd6a971c25a 100644 --- a/www/chromium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc +++ b/www/chromium/files/patch-chrome_browser_ui_webui_ntp_app__launcher__handler.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/webui/ntp/app_launcher_handler.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/ui/webui/ntp/app_launcher_handler.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/ui/webui/ntp/app_launcher_handler.cc -@@ -312,7 +312,7 @@ base::Value::Dict AppLauncherHandler::CreateExtensionI +@@ -311,7 +311,7 @@ base::Value::Dict AppLauncherHandler::CreateExtensionI bool is_deprecated_app = false; auto* context = extension_service_->GetBrowserContext(); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) is_deprecated_app = extensions::IsExtensionUnsupportedDeprecatedApp(context, extension->id()); #endif diff --git a/www/chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h b/www/chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h index c1370559aed8..34caa5afede8 100644 --- a/www/chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h +++ b/www/chromium/files/patch-chrome_browser_web__applications_os__integration_os__integration__test__override.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/os_integration_test_override.h.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/web_applications/os_integration/os_integration_test_override.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/web_applications/os_integration/os_integration_test_override.h -@@ -93,7 +93,7 @@ class OsIntegrationTestOverride +@@ -92,7 +92,7 @@ class OsIntegrationTestOverride virtual const base::FilePath& chrome_apps_folder() = 0; virtual void EnableOrDisablePathOnLogin(const base::FilePath& file_path, bool enable_on_login) = 0; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) virtual const base::FilePath& desktop() = 0; virtual const base::FilePath& startup() = 0; virtual const base::FilePath& applications_dir() = 0; diff --git a/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h b/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h index 35ea4a26b90f..9b3ac83248ce 100644 --- a/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h +++ b/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__file__handler__registration.h @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/web_applications/os_integration/web_app_file_handler_registration.h -@@ -44,7 +44,7 @@ void UnregisterFileHandlersWithOs(const webapps::AppId +@@ -43,7 +43,7 @@ void UnregisterFileHandlersWithOs(const webapps::AppId const base::FilePath& profile_path, ResultCallback callback); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Exposed for testing purposes. Register the set of // MIME-type-to-file-extensions mappings corresponding to |file_handlers|. File // I/O and callouts to the Linux shell are performed asynchronously. diff --git a/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h b/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h index b3d1ca0b9872..bbeea69bfa93 100644 --- a/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h +++ b/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.h @@ -1,20 +1,20 @@ ---- chrome/browser/web_applications/os_integration/web_app_shortcut.h.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/web_applications/os_integration/web_app_shortcut.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/web_applications/os_integration/web_app_shortcut.h -@@ -22,7 +22,7 @@ +@@ -21,7 +21,7 @@ #include "ui/gfx/image/image_family.h" #include "url/gurl.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/os_integration/web_app_shortcut_linux.h" #endif // BUILDFLAG(IS_LINUX) -@@ -71,7 +71,7 @@ struct ShortcutInfo { +@@ -70,7 +70,7 @@ struct ShortcutInfo { std::set file_handler_extensions; std::set file_handler_mime_types; std::set protocol_handlers; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::set actions; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h b/www/chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h index 96d3b3b29d04..1b98f5226b73 100644 --- a/www/chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h +++ b/www/chromium/files/patch-chrome_browser_web__applications_test_os__integration__test__override__impl.h @@ -1,38 +1,38 @@ ---- chrome/browser/web_applications/test/os_integration_test_override_impl.h.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/web_applications/test/os_integration_test_override_impl.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/web_applications/test/os_integration_test_override_impl.h -@@ -39,7 +39,7 @@ class ShellLinkItem; +@@ -38,7 +38,7 @@ class ShellLinkItem; namespace web_app { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) struct LinuxFileRegistration { base::FilePath file_name; std::string xdg_command; -@@ -113,7 +113,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra +@@ -112,7 +112,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra bool DeleteApplicationMenuDirOnWin(); #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool DeleteDesktopDirOnLinux(); #endif // BUILDFLAG(IS_LINUX) -@@ -232,7 +232,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra +@@ -231,7 +231,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra const base::FilePath& chrome_apps_folder() override; void EnableOrDisablePathOnLogin(const base::FilePath& file_path, bool enable_on_login) override; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const base::FilePath& desktop() override; const base::FilePath& startup() override; const base::FilePath& applications_dir() override; -@@ -279,7 +279,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra +@@ -278,7 +278,7 @@ class OsIntegrationTestOverrideImpl : public OsIntegra base::ScopedTempDir chrome_apps_folder_; std::map startup_enabled_; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::ScopedTempDir desktop_; base::ScopedTempDir startup_; base::ScopedTempDir applications_dir_; 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 d0a52aa2c8d3..df98f637be12 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 2023-11-03 10:09:45 UTC +--- chrome/browser/web_applications/web_app_install_info.h.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/web_applications/web_app_install_info.h -@@ -36,7 +36,7 @@ +@@ -35,7 +35,7 @@ #include "url/gurl.h" static_assert(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)); + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)); - class SkBitmap; + 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 5eaa21631553..e8975a17f072 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,20 +1,11 @@ ---- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc -@@ -672,7 +672,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureDisc +@@ -677,7 +677,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, -@@ -879,7 +879,7 @@ void ChromeAuthenticatorRequestDelegate::OnTransportAv - device::FidoRequestHandlerBase::TransportAvailabilityInfo data) { - if (base::FeatureList::IsEnabled(device::kWebAuthnFilterGooglePasskeys) && - dialog_model()->relying_party_id() == kGoogleRpId && -- std::ranges::any_of(data.recognized_credentials, -+ base::ranges::any_of(data.recognized_credentials, - IsCredentialFromPlatformAuthenticator)) { - // Regrettably, Chrome will create webauthn credentials for things other - // than authentication (e.g. credit card autofill auth) under the rp id diff --git a/www/chromium/files/patch-chrome_common_chrome__features.cc b/www/chromium/files/patch-chrome_common_chrome__features.cc index d0905a6a4b7c..82c567e2b1db 100644 --- a/www/chromium/files/patch-chrome_common_chrome__features.cc +++ b/www/chromium/files/patch-chrome_common_chrome__features.cc @@ -1,83 +1,83 @@ ---- chrome/common/chrome_features.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/common/chrome_features.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/common/chrome_features.cc @@ -76,7 +76,7 @@ BASE_FEATURE(kAppShimNotificationAttribution, BASE_FEATURE(kAsyncDns, "AsyncDns", #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT @@ -84,7 +84,7 @@ BASE_FEATURE(kAsyncDns, ); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Enables or disables the Autofill survey triggered by opening a prompt to // save address info. BASE_FEATURE(kAutofillAddressSurvey, @@ -102,7 +102,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. @@ -304,7 +304,7 @@ BASE_FEATURE(kDesktopPWAsEnforceWebAppSettingsPolicy, BASE_FEATURE(kDesktopPWAsRunOnOsLogin, "DesktopPWAsRunOnOsLogin", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT @@ -338,7 +338,7 @@ BASE_FEATURE(kDesktopPWAsWebBundles, base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Controls whether Chrome Apps are supported. See https://crbug.com/1221251. // If the feature is disabled, Chrome Apps continue to work. If enabled, Chrome // Apps will not launch and will be marked in the UI as deprecated. -@@ -371,7 +371,7 @@ BASE_FEATURE(kDisruptiveNotificationPermissionRevocati +@@ -366,7 +366,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 -@@ -387,7 +387,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa +@@ -382,7 +382,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 -@@ -894,7 +894,7 @@ BASE_FEATURE(kLacrosSharedComponentsDir, - base::FEATURE_DISABLED_BY_DEFAULT); +@@ -912,7 +912,7 @@ BASE_FEATURE(kLacrosSharedComponentsDir, + base::FEATURE_ENABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) BASE_FEATURE(kLinuxLowMemoryMonitor, "LinuxLowMemoryMonitor", base::FEATURE_DISABLED_BY_DEFAULT); -@@ -907,7 +907,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -925,7 +925,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 c395ac0b40d8..f9e79e04f095 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 2023-11-03 10:09:45 UTC +--- chrome/common/chrome_features.h.orig 2023-12-10 06:10:27 UTC +++ chrome/common/chrome_features.h @@ -61,13 +61,13 @@ BASE_DECLARE_FEATURE(kAppShimNotificationAttribution); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kAsyncDns); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) 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) @@ -204,7 +204,7 @@ BASE_DECLARE_FEATURE(kDesktopPWAsTabStripSettings); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kDesktopPWAsWebBundles); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kChromeAppsDeprecation); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kKeepForceInstalledPreinstalledApps); -@@ -508,7 +508,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -523,7 +523,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kLacrosSharedComponentsDir); #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kLinuxLowMemoryMonitor); COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam kLinuxLowMemoryMonitorModerateLevel; -@@ -516,7 +516,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -531,7 +531,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam kLinuxLowMemoryMonitorCriticalLevel; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kListWebAppsSwitch); #endif diff --git a/www/chromium/files/patch-chrome_common_chrome__paths.cc b/www/chromium/files/patch-chrome_common_chrome__paths.cc index cef76f3a8dec..b6d5a18ea6c0 100644 --- a/www/chromium/files/patch-chrome_common_chrome__paths.cc +++ b/www/chromium/files/patch-chrome_common_chrome__paths.cc @@ -1,84 +1,84 @@ ---- chrome/common/chrome_paths.cc.orig 2023-11-03 10:09:45 UTC +--- chrome/common/chrome_paths.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/common/chrome_paths.cc @@ -30,7 +30,7 @@ #include "base/apple/foundation_util.h" #endif -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) #include "components/policy/core/common/policy_paths.h" #endif -@@ -51,14 +51,14 @@ +@@ -52,14 +52,14 @@ namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The path to the external extension .json files. // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/ const base::FilePath::CharType kFilepathSinglePrefExtensions[] = #if BUILDFLAG(GOOGLE_CHROME_BRANDING) - FILE_PATH_LITERAL("/usr/share/google-chrome/extensions"); + FILE_PATH_LITERAL("/usr/local/share/chromium/extensions"); #else - FILE_PATH_LITERAL("/usr/share/chromium/extensions"); + FILE_PATH_LITERAL("/usr/local/share/chromium/extensions"); #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -213,7 +213,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -220,7 +220,7 @@ bool PathProvider(int key, base::FilePath* result) { } break; case chrome::DIR_DEFAULT_DOWNLOADS_SAFE: -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!GetUserDownloadsDirectorySafe(&cur)) { return false; } -@@ -516,7 +516,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -523,7 +523,7 @@ bool PathProvider(int key, base::FilePath* result) { return false; } break; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) case chrome::DIR_POLICY_FILES: { cur = base::FilePath(policy::kPolicyPath); break; -@@ -527,7 +527,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -534,7 +534,7 @@ bool PathProvider(int key, base::FilePath* result) { #if BUILDFLAG(IS_CHROMEOS_ASH) || \ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ BUILDFLAG(CHROMIUM_BRANDING)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case chrome::DIR_USER_EXTERNAL_EXTENSIONS: { if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) { return false; -@@ -536,7 +536,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -543,7 +543,7 @@ bool PathProvider(int key, base::FilePath* result) { break; } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: { cur = base::FilePath(kFilepathSinglePrefExtensions); break; -@@ -583,7 +583,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -590,7 +590,7 @@ bool PathProvider(int key, base::FilePath* result) { break; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) case chrome::DIR_NATIVE_MESSAGING: #if BUILDFLAG(IS_MAC) #if BUILDFLAG(GOOGLE_CHROME_BRANDING) -@@ -597,6 +597,9 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -604,6 +604,9 @@ bool PathProvider(int key, base::FilePath* result) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) cur = base::FilePath( FILE_PATH_LITERAL("/etc/opt/chrome/native-messaging-hosts")); +#elif BUILDFLAG(IS_FREEBSD) + cur = base::FilePath(FILE_PATH_LITERAL( + "/usr/local/etc/chromium/native-messaging-hosts")); #else cur = base::FilePath( FILE_PATH_LITERAL("/etc/chromium/native-messaging-hosts")); diff --git a/www/chromium/files/patch-chrome_common_chrome__switches.cc b/www/chromium/files/patch-chrome_common_chrome__switches.cc index 8ebc67828c8d..7fdabc24338c 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 2023-11-03 10:09:45 UTC +--- chrome/common/chrome_switches.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/common/chrome_switches.cc -@@ -861,14 +861,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- +@@ -857,14 +857,14 @@ const char kAllowNaClSocketAPI[] = "allow-nacl-socket- #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon"; // Causes the browser to launch directly in guest mode. const char kGuest[] = "guest"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Writes open and installed web apps for each profile to the specified file // without launching a new browser window or tab. Pass a absolute file path to // specify where to output the information. Can be used together with optional diff --git a/www/chromium/files/patch-chrome_common_chrome__switches.h b/www/chromium/files/patch-chrome_common_chrome__switches.h index ba3afa9963c0..395244a660db 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 2023-11-03 10:09:45 UTC +--- chrome/common/chrome_switches.h.orig 2023-12-10 06:10:27 UTC +++ chrome/common/chrome_switches.h -@@ -273,12 +273,12 @@ extern const char kAllowNaClSocketAPI[]; +@@ -272,12 +272,12 @@ extern const char kAllowNaClSocketAPI[]; #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kEnableNewAppMenuIcon[]; extern const char kGuest[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extern const char kListApps[]; extern const char kProfileBaseName[]; extern const char kProfileManagementAttributes[]; diff --git a/www/chromium/files/patch-chrome_common_media_cdm__registration.cc b/www/chromium/files/patch-chrome_common_media_cdm__registration.cc index adf6d3145679..8e14904bc5dd 100644 --- a/www/chromium/files/patch-chrome_common_media_cdm__registration.cc +++ b/www/chromium/files/patch-chrome_common_media_cdm__registration.cc @@ -1,52 +1,52 @@ ---- chrome/common/media/cdm_registration.cc.orig 2023-10-11 18:22:24 UTC +--- chrome/common/media/cdm_registration.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/common/media/cdm_registration.cc -@@ -25,11 +25,11 @@ +@@ -26,11 +26,11 @@ #if BUILDFLAG(ENABLE_WIDEVINE) #include "third_party/widevine/cdm/widevine_cdm_common.h" // nogncheck -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "base/native_library.h" #include "chrome/common/chrome_paths.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/no_destructor.h" #include "chrome/common/media/component_widevine_cdm_hint_file_linux.h" - #include "components/cdm/common/cdm_manifest.h" + #include "media/cdm/supported_audio_codecs.h" @@ -56,7 +56,7 @@ using Robustness = content::CdmInfo::Robustness; #if BUILDFLAG(ENABLE_WIDEVINE) #if (BUILDFLAG(BUNDLE_WIDEVINE_CDM) || \ BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // Create a CdmInfo for a Widevine CDM, using |version|, |cdm_library_path|, and // |capability|. std::unique_ptr CreateWidevineCdmInfo( @@ -101,7 +101,7 @@ std::unique_ptr CreateCdmInfoFromWid // BUILDFLAG(IS_CHROMEOS)) #if BUILDFLAG(BUNDLE_WIDEVINE_CDM) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // On Linux/ChromeOS we have to preload the CDM since it uses the zygote // sandbox. On Windows and Mac, the bundled CDM is handled by the component // updater. @@ -125,7 +125,7 @@ content::CdmInfo* GetBundledWidevine() { // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) #if BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) && \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // This code checks to see if a component updated Widevine CDM can be found. If // there is one and it looks valid, return the CdmInfo for that CDM. Otherwise // return nullptr. @@ -160,7 +160,7 @@ void AddSoftwareSecureWidevine(std::vector GetPrintingTaskRunner() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Use task runner associated with equivalent of UI thread. Needed for calls // made through `PrintDialogLinuxInterface` to properly execute. CHECK(base::SequencedTaskRunner::HasCurrentDefault()); @@ -460,7 +460,7 @@ void PrintBackendServiceImpl::Init( // `InitCommon()`. InitializeProcessForPrinting(); print_backend_ = PrintBackend::CreateInstance(locale); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Test framework already initializes the UI, so this should not go in // `InitCommon()`. Additionally, low-level Linux UI is not needed when tests // are using `TestPrintingContext`. -@@ -680,7 +680,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( +@@ -681,7 +681,7 @@ void PrintBackendServiceImpl::UpdatePrintSettings( crash_keys_ = std::make_unique( print_backend_->GetPrinterDriverInfo(*printer_name)); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_CUPS) // Try to fill in advanced settings based upon basic info options. PrinterBasicInfo basic_info; if (print_backend_->GetPrinterBasicInfo(*printer_name, &basic_info) == diff --git a/www/chromium/files/patch-chrome_test_BUILD.gn b/www/chromium/files/patch-chrome_test_BUILD.gn index 8f8eaec52c41..5fb6f3448f6e 100644 --- a/www/chromium/files/patch-chrome_test_BUILD.gn +++ b/www/chromium/files/patch-chrome_test_BUILD.gn @@ -1,11 +1,11 @@ ---- chrome/test/BUILD.gn.orig 2023-11-03 10:09:45 UTC +--- chrome/test/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ chrome/test/BUILD.gn -@@ -11055,7 +11055,7 @@ test("chrome_app_unittests") { +@@ -11239,7 +11239,7 @@ test("chrome_app_unittests") { "//components/heap_profiling/in_process", "//components/safe_browsing:buildflags", ] - if (!is_fuchsia && !is_mac) { + if (!is_fuchsia && !is_mac && !is_bsd) { deps += [ "//third_party/breakpad:client" ] } if (is_android) { diff --git a/www/chromium/files/patch-chrome_test_chromedriver_chrome__launcher.cc b/www/chromium/files/patch-chrome_test_chromedriver_chrome__launcher.cc index cbd963a9c0fb..c4d029edcf6d 100644 --- a/www/chromium/files/patch-chrome_test_chromedriver_chrome__launcher.cc +++ b/www/chromium/files/patch-chrome_test_chromedriver_chrome__launcher.cc @@ -1,10 +1,10 @@ ---- chrome/test/chromedriver/chrome_launcher.cc.orig 2023-09-13 12:11:42 UTC +--- chrome/test/chromedriver/chrome_launcher.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/test/chromedriver/chrome_launcher.cc -@@ -69,6 +69,7 @@ +@@ -73,6 +73,7 @@ #include #include #include +#include #include #elif BUILDFLAG(IS_WIN) #include diff --git a/www/chromium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc b/www/chromium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc index 720aabc1a1a5..7cd002633b15 100644 --- a/www/chromium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc +++ b/www/chromium/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc @@ -1,20 +1,29 @@ ---- chrome/test/chromedriver/chrome/chrome_finder.cc.orig 2023-08-04 12:03:57 UTC +--- chrome/test/chromedriver/chrome/chrome_finder.cc.orig 2023-12-10 06:10:27 UTC +++ chrome/test/chromedriver/chrome/chrome_finder.cc -@@ -57,7 +57,7 @@ void GetApplicationDirs(std::vector* l +@@ -58,7 +58,7 @@ void GetApplicationDirs(std::vector* l installation_locations[i].Append(L"Chromium\\Application")); } } -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void GetApplicationDirs(std::vector* locations) { // TODO: Respect users' PATH variables. // Until then, we use an approximation of the most common defaults. -@@ -157,7 +157,7 @@ bool FindChrome(base::FilePath* browser_exe) { - base::FilePath(chrome::kGoogleChromeForTestingBrowserProcessExecutablePath), - base::FilePath(chrome::kGoogleChromeBrowserProcessExecutablePath), - base::FilePath(chrome::kChromiumBrowserProcessExecutablePath), +@@ -125,7 +125,7 @@ std::vector GetChromeProgramNames() { + chrome::kGoogleChromeForTestingBrowserProcessExecutablePath), + base::FilePath(chrome::kGoogleChromeBrowserProcessExecutablePath), + base::FilePath(chrome::kChromiumBrowserProcessExecutablePath), -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath(chrome::kBrowserProcessExecutablePath), - base::FilePath("chrome"), // Chrome for Testing or Google Chrome - base::FilePath("google-chrome"), + base::FilePath("chrome"), // Chrome for Testing or Google Chrome + base::FilePath("google-chrome"), base::FilePath("chromium"), +@@ -141,7 +141,7 @@ std::vector GetHeadlessShellProgramNam + return { + #if BUILDFLAG(IS_WIN) + base::FilePath(FILE_PATH_LITERAL("chrome-headless-shell.exe")), +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + base::FilePath("chrome-headless-shell"), + #else + // it will compile but won't work on other OSes diff --git a/www/chromium/files/patch-components_autofill_core_browser_data__model_autofill__i18n__api.h b/www/chromium/files/patch-components_autofill_core_browser_data__model_autofill__i18n__api.h new file mode 100644 index 000000000000..62d80cd02a5c --- /dev/null +++ b/www/chromium/files/patch-components_autofill_core_browser_data__model_autofill__i18n__api.h @@ -0,0 +1,16 @@ +--- components/autofill/core/browser/data_model/autofill_i18n_api.h.orig 2023-12-10 06:10:27 UTC ++++ components/autofill/core/browser/data_model/autofill_i18n_api.h +@@ -15,9 +15,13 @@ namespace autofill::i18n_model_definition { + // Country code that represents autofill's legacy address hierarchy model as + // stored `kAutofillModelRules`. As a workaround for GCC we declare the + // std::string constexpr first. ++// XXX ++#if 0 + constexpr inline std::string kLegacyHierarchyCountryCodeString{"XX"}; + constexpr AddressCountryCode kLegacyHierarchyCountryCode = + AddressCountryCode(kLegacyHierarchyCountryCodeString); ++#endif ++inline AddressCountryCode kLegacyHierarchyCountryCode = AddressCountryCode("XX"); + + // Creates an instance of the address hierarchy model corresponding to the + // provided country. All the nodes have empty values, except for the country diff --git a/www/chromium/files/patch-components_autofill_core_browser_payments_iban__save__manager.cc b/www/chromium/files/patch-components_autofill_core_browser_payments_iban__save__manager.cc index 38be5e037940..ce467c5f9c6f 100644 --- a/www/chromium/files/patch-components_autofill_core_browser_payments_iban__save__manager.cc +++ b/www/chromium/files/patch-components_autofill_core_browser_payments_iban__save__manager.cc @@ -1,14 +1,14 @@ ---- components/autofill/core/browser/payments/iban_save_manager.cc.orig 2023-11-03 10:09:45 UTC +--- components/autofill/core/browser/payments/iban_save_manager.cc.orig 2023-12-10 06:10:27 UTC +++ components/autofill/core/browser/payments/iban_save_manager.cc -@@ -63,7 +63,11 @@ bool IbanSaveManager::AttemptToOfferIbanLocalSave( - bool IbanSaveManager::ShouldOfferLocalSave(const Iban& iban_import_candidate) { - // Only offer to save new IBANs. Users can go to the payment methods settings - // page to update existing IBANs if desired. +@@ -123,7 +123,11 @@ bool IbanSaveManager::ShouldOfferUploadSave( + + // Offer server save for this IBAN if it doesn't already match an existing + // server IBAN. +#if (_LIBCPP_VERSION >= 160000) return std::ranges::none_of( +#else + return base::ranges::none_of( +#endif - personal_data_manager_->GetLocalIbans(), [&](const auto& iban) { - return iban->value() == iban_import_candidate.value(); - }); + personal_data_manager_->GetServerIbans(), + [&iban_import_candidate](const auto& iban) { + return iban->MatchesPrefixSuffixAndLength(iban_import_candidate); diff --git a/www/chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc b/www/chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc index 52969cfc8fec..980b62b691fd 100644 --- a/www/chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc +++ b/www/chromium/files/patch-components_autofill_core_browser_personal__data__manager.cc @@ -1,12 +1,12 @@ ---- components/autofill/core/browser/personal_data_manager.cc.orig 2023-11-03 10:09:45 UTC +--- components/autofill/core/browser/personal_data_manager.cc.orig 2023-12-10 06:10:27 UTC +++ components/autofill/core/browser/personal_data_manager.cc -@@ -2384,7 +2384,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp +@@ -2397,7 +2397,8 @@ bool PersonalDataManager::ShouldShowCardsFromAccountOp // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) // This option should only be shown for users that have not enabled the Sync // Feature and that have server credit cards available. // TODO(crbug.com/1462552): Simplify once ConsentLevel::kSync and 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 239f2d6b4394..5012e42e1236 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 2023-11-03 10:09:45 UTC +--- components/autofill/core/common/autofill_payments_features.cc.orig 2023-12-10 06:10:27 UTC +++ components/autofill/core/common/autofill_payments_features.cc -@@ -292,7 +292,7 @@ BASE_FEATURE(kEnablePixPayments, +@@ -261,7 +261,7 @@ BASE_FEATURE(kEnablePixPayments, bool ShouldShowImprovedUserConsentForCreditCardSave() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // The new user consent UI is fully launched on MacOS, Windows and Linux. return true; diff --git a/www/chromium/files/patch-components_autofill_core_common_autofill__util.cc b/www/chromium/files/patch-components_autofill_core_common_autofill__util.cc index 2b8266217d46..c8161b13c850 100644 --- a/www/chromium/files/patch-components_autofill_core_common_autofill__util.cc +++ b/www/chromium/files/patch-components_autofill_core_common_autofill__util.cc @@ -1,11 +1,11 @@ ---- components/autofill/core/common/autofill_util.cc.orig 2023-11-03 10:09:45 UTC +--- components/autofill/core/common/autofill_util.cc.orig 2023-12-10 06:10:27 UTC +++ components/autofill/core/common/autofill_util.cc -@@ -133,7 +133,7 @@ bool SanitizedFieldIsEmpty(const std::u16string& value +@@ -207,7 +207,7 @@ size_t LevenshteinDistance(std::u16string_view a, bool ShouldAutoselectFirstSuggestionOnArrowDown() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return true; #else return false; diff --git a/www/chromium/files/patch-components_commerce_core_commerce__feature__list.cc b/www/chromium/files/patch-components_commerce_core_commerce__feature__list.cc new file mode 100644 index 000000000000..43c17f612eb1 --- /dev/null +++ b/www/chromium/files/patch-components_commerce_core_commerce__feature__list.cc @@ -0,0 +1,11 @@ +--- components/commerce/core/commerce_feature_list.cc.orig 2023-12-10 06:10:27 UTC ++++ components/commerce/core/commerce_feature_list.cc +@@ -225,7 +225,7 @@ BASE_FEATURE(kShoppingCollection, + + 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_crash_core_app_BUILD.gn b/www/chromium/files/patch-components_crash_core_app_BUILD.gn index 6cf299c91586..8f754cfa9a9d 100644 --- a/www/chromium/files/patch-components_crash_core_app_BUILD.gn +++ b/www/chromium/files/patch-components_crash_core_app_BUILD.gn @@ -1,43 +1,43 @@ ---- components/crash/core/app/BUILD.gn.orig 2023-09-13 12:11:42 UTC +--- components/crash/core/app/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ components/crash/core/app/BUILD.gn -@@ -72,7 +72,7 @@ static_library("app") { +@@ -76,7 +76,7 @@ static_library("app") { "crashpad.h", ] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "crashpad_linux.cc" ] } -@@ -85,6 +85,10 @@ static_library("app") { +@@ -89,6 +89,10 @@ static_library("app") { ] } + if (is_bsd) { + sources -= [ "crashpad.cc" ] + } + defines = [ "CRASH_IMPLEMENTATION" ] public_deps = [ ":lib" ] -@@ -113,7 +117,7 @@ static_library("app") { +@@ -117,7 +121,7 @@ static_library("app") { libs = [ "log" ] } - if (is_android || is_linux || is_chromeos) { + if ((is_android || is_linux || is_chromeos) && !is_bsd) { deps += [ "//base:base_static", "//components/crash/core/common", -@@ -241,11 +245,6 @@ if (is_mac || is_android || is_linux || is_chromeos) { +@@ -245,11 +249,6 @@ if (is_mac || is_android || is_linux || is_chromeos) { # define custom UserStreamDataSources. executable("chrome_crashpad_handler") { sources = [ "chrome_crashpad_handler.cc" ] - - deps = [ - ":crashpad_handler_main", - "//third_party/crashpad/crashpad/handler", - ] if (is_mac && (is_component_build || is_asan)) { ldflags = [ diff --git a/www/chromium/files/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc b/www/chromium/files/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc index 7e4770a332e8..9c336db88172 100644 --- a/www/chromium/files/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc +++ b/www/chromium/files/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc @@ -1,11 +1,11 @@ ---- components/discardable_memory/service/discardable_shared_memory_manager.cc.orig 2022-08-31 12:19:35 UTC +--- components/discardable_memory/service/discardable_shared_memory_manager.cc.orig 2023-12-10 06:10:27 UTC +++ components/discardable_memory/service/discardable_shared_memory_manager.cc -@@ -171,7 +171,7 @@ uint64_t GetDefaultMemoryLimit() { +@@ -172,7 +172,7 @@ uint64_t GetDefaultMemoryLimit() { // Limits the number of FDs used to 32, assuming a 4MB allocation size. uint64_t max_default_memory_limit = 128 * kMegabyte; #else - uint64_t max_default_memory_limit = 512 * kMegabyte; + uint64_t max_default_memory_limit = 128 * kMegabyte; #endif // Use 1/8th of discardable memory on low-end devices. diff --git a/www/chromium/files/patch-chrome_browser_ui_views_eye__dropper_eye__dropper__view.cc b/www/chromium/files/patch-components_eye__dropper_eye__dropper__view.cc similarity index 60% rename from www/chromium/files/patch-chrome_browser_ui_views_eye__dropper_eye__dropper__view.cc rename to www/chromium/files/patch-components_eye__dropper_eye__dropper__view.cc index 9b22f575aa8e..72ff6060af69 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_eye__dropper_eye__dropper__view.cc +++ b/www/chromium/files/patch-components_eye__dropper_eye__dropper__view.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/eye_dropper/eye_dropper_view.cc.orig 2023-10-11 18:22:24 UTC -+++ chrome/browser/ui/views/eye_dropper/eye_dropper_view.cc -@@ -178,7 +178,7 @@ EyeDropperView::EyeDropperView(content::RenderFrameHos +--- components/eye_dropper/eye_dropper_view.cc.orig 2023-12-10 06:10:27 UTC ++++ components/eye_dropper/eye_dropper_view.cc +@@ -196,7 +196,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); diff --git a/www/chromium/files/patch-chrome_browser_ui_views_eye__dropper_eye__dropper__view__aura.cc b/www/chromium/files/patch-components_eye__dropper_eye__dropper__view__aura.cc similarity index 57% rename from www/chromium/files/patch-chrome_browser_ui_views_eye__dropper_eye__dropper__view__aura.cc rename to www/chromium/files/patch-components_eye__dropper_eye__dropper__view__aura.cc index 82cc800d414b..9a62d5152620 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_eye__dropper_eye__dropper__view__aura.cc +++ b/www/chromium/files/patch-components_eye__dropper_eye__dropper__view__aura.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/eye_dropper/eye_dropper_view_aura.cc.orig 2023-10-11 18:22:24 UTC -+++ chrome/browser/ui/views/eye_dropper/eye_dropper_view_aura.cc -@@ -127,7 +127,7 @@ void EyeDropperView::MoveViewToFront() { +--- components/eye_dropper/eye_dropper_view_aura.cc.orig 2023-12-10 06:10:27 UTC ++++ components/eye_dropper/eye_dropper_view_aura.cc +@@ -129,7 +129,7 @@ void EyeDropperView::MoveViewToFront() { } void EyeDropperView::CaptureInputIfNeeded() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // The eye dropper needs to capture input since it is not activated // in order to avoid dismissing the color picker. GetWidget()->GetNativeWindow()->SetCapture(); 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 3fc2b9e9e8a2..4ee50e4432be 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,21 +1,21 @@ ---- components/feature_engagement/public/feature_configurations.cc.orig 2023-11-03 10:09:45 UTC +--- components/feature_engagement/public/feature_configurations.cc.orig 2023-12-10 06:10:27 UTC +++ components/feature_engagement/public/feature_configurations.cc -@@ -46,7 +46,7 @@ FeatureConfig CreateAlwaysTriggerConfig(const base::Fe +@@ -49,7 +49,7 @@ FeatureConfig CreateAlwaysTriggerConfig(const base::Fe absl::optional GetClientSideFeatureConfig( const base::Feature* feature) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (kIPHPasswordsAccountStorageFeature.name == feature->name) { absl::optional config = FeatureConfig(); config->valid = true; -@@ -1399,7 +1399,8 @@ absl::optional GetClientSideFeatureConf +@@ -1440,7 +1440,8 @@ absl::optional GetClientSideFeatureConf #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) if (kIPHAutofillExternalAccountProfileSuggestionFeature.name == feature->name) { diff --git a/www/chromium/files/patch-components_feature__engagement_public_feature__constants.cc b/www/chromium/files/patch-components_feature__engagement_public_feature__constants.cc index 7cdf59a9ba06..f8df20694cb7 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,20 +1,20 @@ ---- components/feature_engagement/public/feature_constants.cc.orig 2023-11-03 10:09:45 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2023-12-10 06:10:27 UTC +++ components/feature_engagement/public/feature_constants.cc @@ -21,7 +21,7 @@ BASE_FEATURE(kUseClientConfigIPH, BASE_FEATURE(kIPHDummyFeature, "IPH_Dummy", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) BASE_FEATURE(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode", base::FEATURE_ENABLED_BY_DEFAULT); -@@ -539,7 +539,7 @@ constexpr base::FeatureParam kDefaultBrowserEligi +@@ -560,7 +560,7 @@ constexpr base::FeatureParam kDefaultBrowserEligi /*default_value=*/365}; #endif // BUILDFLAG(IS_IOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) BASE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature, "IPH_AutofillExternalAccountProfileSuggestion", 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 b9dc0d59ea6a..57e0a32d9ec2 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,20 +1,20 @@ ---- components/feature_engagement/public/feature_constants.h.orig 2023-11-03 10:09:45 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2023-12-10 06:10:27 UTC +++ components/feature_engagement/public/feature_constants.h @@ -24,7 +24,7 @@ BASE_DECLARE_FEATURE(kUseClientConfigIPH); BASE_DECLARE_FEATURE(kIPHDummyFeature); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) BASE_DECLARE_FEATURE(kIPHBatterySaverModeFeature); BASE_DECLARE_FEATURE(kIPHCompanionSidePanelFeature); BASE_DECLARE_FEATURE(kIPHCompanionSidePanelRegionSearchFeature); -@@ -226,7 +226,7 @@ extern const base::FeatureParam +@@ -233,7 +233,7 @@ extern const base::FeatureParam kDefaultBrowserEligibilitySlidingWindowParam; #endif // BUILDFLAG(IS_IOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) BASE_DECLARE_FEATURE(kIPHAutofillExternalAccountProfileSuggestionFeature); BASE_DECLARE_FEATURE(kIPHAutofillVirtualCardCVCSuggestionFeature); 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 d9254ab5a9f3..023f5bba64a2 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,20 +1,20 @@ ---- components/feature_engagement/public/feature_list.cc.orig 2023-11-03 10:09:45 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2023-12-10 06:10:27 UTC +++ components/feature_engagement/public/feature_list.cc -@@ -143,7 +143,7 @@ const base::Feature* const kAllFeatures[] = { - &kIPHiOSChoiceScreenFeature, +@@ -146,7 +146,7 @@ const base::Feature* const kAllFeatures[] = { + &kIPHiOSParcelTrackingFeature, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) &kIPHBatterySaverModeFeature, &kIPHCompanionSidePanelFeature, &kIPHCompanionSidePanelRegionSearchFeature, -@@ -189,7 +189,7 @@ const base::Feature* const kAllFeatures[] = { +@@ -196,7 +196,7 @@ const base::Feature* const kAllFeatures[] = { #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) &kIPHAutofillExternalAccountProfileSuggestionFeature, &kIPHAutofillVirtualCardCVCSuggestionFeature, 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 a1680666ebf7..c52f92b2eb12 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,38 +1,38 @@ ---- components/feature_engagement/public/feature_list.h.orig 2023-11-03 10:09:45 UTC +--- components/feature_engagement/public/feature_list.h.orig 2023-12-10 06:10:27 UTC +++ components/feature_engagement/public/feature_list.h -@@ -265,7 +265,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSChoiceScreenFeature, +@@ -269,7 +269,7 @@ DEFINE_VARIATION_PARAM(kIPHiOSParcelTrackingFeature, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHBatterySaverModeFeature, "IPH_BatterySaverMode"); DEFINE_VARIATION_PARAM(kIPHCompanionSidePanelFeature, "IPH_CompanionSidePanel"); DEFINE_VARIATION_PARAM(kIPHCompanionSidePanelRegionSearchFeature, -@@ -340,7 +340,7 @@ DEFINE_VARIATION_PARAM(kIPHBackNavigationMenuFeature, +@@ -352,7 +352,7 @@ DEFINE_VARIATION_PARAM(kIPHBackNavigationMenuFeature, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) DEFINE_VARIATION_PARAM(kIPHAutofillExternalAccountProfileSuggestionFeature, "IPH_AutofillExternalAccountProfileSuggestion"); -@@ -552,7 +552,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation - VARIATION_ENTRY(kIPHiOSPromoPasswordManagerWidgetFeature), +@@ -567,7 +567,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation VARIATION_ENTRY(kIPHiOSChoiceScreenFeature), + VARIATION_ENTRY(kIPHiOSParcelTrackingFeature), #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), -@@ -599,7 +599,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -617,7 +617,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) VARIATION_ENTRY(kIPHAutofillExternalAccountProfileSuggestionFeature), VARIATION_ENTRY(kIPHAutofillVirtualCardCVCSuggestionFeature), diff --git a/www/chromium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc b/www/chromium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc index 484a835a0aba..444725e2acc4 100644 --- a/www/chromium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc +++ b/www/chromium/files/patch-components_feed_core_v2_feed__network__impl__unittest.cc @@ -1,13 +1,13 @@ ---- components/feed/core/v2/feed_network_impl_unittest.cc.orig 2023-10-11 18:22:24 UTC +--- components/feed/core/v2/feed_network_impl_unittest.cc.orig 2023-12-10 06:10:27 UTC +++ components/feed/core/v2/feed_network_impl_unittest.cc -@@ -753,8 +753,8 @@ TEST_F(FeedNetworkTest, SendApiRequest_DecodesClientIn +@@ -781,8 +781,8 @@ TEST_F(FeedNetworkTest, SendApiRequest_DecodesClientIn EXPECT_EQ(feedwire::ClientInfo::CHROME_ANDROID, client_info.app_type()); EXPECT_EQ(feedwire::Version::RELEASE, client_info.app_version().build_type()); - EXPECT_EQ(1, client_info.app_version().major()); - EXPECT_EQ(2, client_info.app_version().minor()); + EXPECT_EQ(1, client_info.app_version().gmajor()); + EXPECT_EQ(2, client_info.app_version().gminor()); EXPECT_EQ(3, client_info.app_version().build()); EXPECT_EQ(4, client_info.app_version().revision()); EXPECT_FALSE(client_info.chrome_client_info().start_surface()); diff --git a/www/chromium/files/patch-components_miracle__parameter_common_public_miracle__parameter.h b/www/chromium/files/patch-components_miracle__parameter_common_public_miracle__parameter.h deleted file mode 100644 index d6566b01ebd4..000000000000 --- a/www/chromium/files/patch-components_miracle__parameter_common_public_miracle__parameter.h +++ /dev/null @@ -1,12 +0,0 @@ ---- components/miracle_parameter/common/public/miracle_parameter.h.orig 2023-11-03 10:09:45 UTC -+++ components/miracle_parameter/common/public/miracle_parameter.h -@@ -93,7 +93,8 @@ class MiracleParameter { - template <> - class MiracleParameter : public MiracleParameterBase { - public: -- constexpr MiracleParameter(const base::Feature* feature, -+ // XXXROBERT -+ MiracleParameter(const base::Feature* feature, - const char* param_name, - std::string default_value) - : MiracleParameterBase(feature, param_name, std::move(default_value)) {} diff --git a/www/chromium/files/patch-components_neterror_resources_neterror.js b/www/chromium/files/patch-components_neterror_resources_neterror.js index 442584d3d936..37a7c9f5e136 100644 --- a/www/chromium/files/patch-components_neterror_resources_neterror.js +++ b/www/chromium/files/patch-components_neterror_resources_neterror.js @@ -1,11 +1,11 @@ ---- components/neterror/resources/neterror.js.orig 2023-02-08 09:03:45 UTC +--- components/neterror/resources/neterror.js.orig 2023-12-10 06:10:27 UTC +++ components/neterror/resources/neterror.js -@@ -137,7 +137,7 @@ function detailsButtonClick() { +@@ -141,7 +141,7 @@ function detailsButtonClick() { let primaryControlOnLeft = true; // clang-format off -// +// // clang-format on primaryControlOnLeft = false; // 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 a3511b5fdbf6..72683089a07b 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 2023-11-08 17:48:01 UTC +--- components/optimization_guide/core/optimization_guide_util.cc.orig 2023-12-10 06:10:27 UTC +++ components/optimization_guide/core/optimization_guide_util.cc @@ -34,7 +34,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_UNKNOWN; + 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 d75cb94d206b..c0d8e78a55e1 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,11 +1,20 @@ ---- components/password_manager/core/browser/features/password_features.cc.orig 2023-11-03 10:09:45 UTC +--- components/password_manager/core/browser/features/password_features.cc.orig 2023-12-10 06:10:27 UTC +++ components/password_manager/core/browser/features/password_features.cc -@@ -20,7 +20,7 @@ BASE_FEATURE(kBiometricTouchToFill, +@@ -8,7 +8,7 @@ + + namespace password_manager::features { + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + // Enables attaching password manager and autofill internals logs to an Autofill + // Rater Extension Report. + BASE_FEATURE(kAttachLogsToAutofillRaterExtensionReport, +@@ -30,7 +30,7 @@ BASE_FEATURE(kBiometricTouchToFill, // Delete undecryptable passwords from the store when Sync is active. BASE_FEATURE(kClearUndecryptablePasswordsOnSync, "ClearUndecryptablePasswordsInSync", --#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT 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 new file mode 100644 index 000000000000..cdfad755c0d2 --- /dev/null +++ b/www/chromium/files/patch-components_password__manager_core_browser_features_password__features.h @@ -0,0 +1,11 @@ +--- components/password_manager/core/browser/features/password_features.h.orig 2023-12-10 06:10:27 UTC ++++ components/password_manager/core/browser/features/password_features.h +@@ -15,7 +15,7 @@ namespace password_manager::features { + // All features in alphabetical order. The features should be documented + // alongside the definition of their values in the .cc file. + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + BASE_DECLARE_FEATURE(kAttachLogsToAutofillRaterExtensionReport); + #endif + diff --git a/www/chromium/files/patch-components_password__manager_core_browser_login__database__unittest.cc b/www/chromium/files/patch-components_password__manager_core_browser_login__database__unittest.cc index 4c5171ecd4fe..db777d7a05cb 100644 --- a/www/chromium/files/patch-components_password__manager_core_browser_login__database__unittest.cc +++ b/www/chromium/files/patch-components_password__manager_core_browser_login__database__unittest.cc @@ -1,11 +1,11 @@ ---- components/password_manager/core/browser/login_database_unittest.cc.orig 2023-11-03 10:09:45 UTC +--- components/password_manager/core/browser/login_database_unittest.cc.orig 2023-12-10 06:10:27 UTC +++ components/password_manager/core/browser/login_database_unittest.cc -@@ -2100,7 +2100,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, +@@ -2102,7 +2102,7 @@ INSTANTIATE_TEST_SUITE_P(MigrationToVCurrent, LoginDatabaseMigrationTestBroken, testing::Values(1, 2, 3, 24)); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) class LoginDatabaseUndecryptableLoginsTest : public testing::Test { protected: LoginDatabaseUndecryptableLoginsTest() = default; diff --git a/www/chromium/files/patch-components_password__manager_core_common_password__manager__features.h b/www/chromium/files/patch-components_password__manager_core_common_password__manager__features.h index 6cd1e06da6a5..857af97aa0e4 100644 --- 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 @@ -1,11 +1,11 @@ ---- components/password_manager/core/common/password_manager_features.h.orig 2023-10-27 05:38:38 UTC +--- 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 -@@ -24,7 +24,7 @@ namespace password_manager::features { +@@ -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_policy_core_common_cloud_cloud__policy__client.cc b/www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc index 42fd42938c85..e3d849d59069 100644 --- a/www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc +++ b/www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__client.cc @@ -1,11 +1,11 @@ ---- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2023-11-03 10:09:45 UTC +--- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2023-12-10 06:10:27 UTC +++ components/policy/core/common/cloud/cloud_policy_client.cc -@@ -507,7 +507,7 @@ void CloudPolicyClient::FetchPolicy(PolicyFetchReason +@@ -508,7 +508,7 @@ void CloudPolicyClient::FetchPolicy(PolicyFetchReason fetch_request->set_invalidation_payload(invalidation_payload_); } } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Only set browser device identifier for CBCM Chrome cloud policy on // desktop. if (type_to_fetch.first == diff --git a/www/chromium/files/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc b/www/chromium/files/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc index 471ed5f5c118..9025606b4732 100644 --- a/www/chromium/files/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc +++ b/www/chromium/files/patch-components_safe__browsing_core_browser_db_v4__protocol__manager__util.cc @@ -1,11 +1,11 @@ ---- components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc.orig 2023-04-28 17:01:32 UTC +--- components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc.orig 2023-12-10 06:10:27 UTC +++ components/safe_browsing/core/browser/db/v4_protocol_manager_util.cc -@@ -117,7 +117,7 @@ std::ostream& operator<<(std::ostream& os, const ListI +@@ -116,7 +116,7 @@ std::ostream& operator<<(std::ostream& os, const ListI PlatformType GetCurrentPlatformType() { #if BUILDFLAG(IS_WIN) return WINDOWS_PLATFORM; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return LINUX_PLATFORM; #elif BUILDFLAG(IS_IOS) return IOS_PLATFORM; diff --git a/www/chromium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc b/www/chromium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc index 0f3e8e39f215..b2fd83209929 100644 --- a/www/chromium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc +++ b/www/chromium/files/patch-components_supervised__user_core_browser_supervised__user__service.cc @@ -1,11 +1,11 @@ ---- components/supervised_user/core/browser/supervised_user_service.cc.orig 2023-10-11 18:22:24 UTC +--- components/supervised_user/core/browser/supervised_user_service.cc.orig 2023-12-10 06:10:27 UTC +++ components/supervised_user/core/browser/supervised_user_service.cc -@@ -206,7 +206,7 @@ FirstTimeInterstitialBannerState SupervisedUserService +@@ -212,7 +212,7 @@ FirstTimeInterstitialBannerState SupervisedUserService const FirstTimeInterstitialBannerState original_state) { FirstTimeInterstitialBannerState target_state = original_state; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_IOS) + BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD) if (supervised_user::CanDisplayFirstTimeInterstitialBanner()) { if (original_state != FirstTimeInterstitialBannerState::kSetupComplete && can_show_first_time_interstitial_banner_) { diff --git a/www/chromium/files/patch-components_supervised__user_core_common_features.cc b/www/chromium/files/patch-components_supervised__user_core_common_features.cc new file mode 100644 index 000000000000..81e9dff7550b --- /dev/null +++ b/www/chromium/files/patch-components_supervised__user_core_common_features.cc @@ -0,0 +1,20 @@ +--- components/supervised_user/core/common/features.cc.orig 2023-12-10 06:10:27 UTC ++++ components/supervised_user/core/common/features.cc +@@ -91,7 +91,7 @@ BASE_FEATURE(kEnableManagedByParentUi, + "EnableManagedByParentUi", + 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); +@@ -149,7 +149,7 @@ bool IsChildAccountSupervisionEnabled() { + return base::FeatureList::IsEnabled( + supervised_user:: + kFilterWebsitesForSupervisedUsersOnDesktopAndIOS) || +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + base::FeatureList::IsEnabled( + supervised_user:: + kEnableExtensionsPermissionsForSupervisedUsersOnDesktop) || diff --git a/www/chromium/files/patch-components_supervised__user_core_common_features.h b/www/chromium/files/patch-components_supervised__user_core_common_features.h new file mode 100644 index 000000000000..faf91dffd546 --- /dev/null +++ b/www/chromium/files/patch-components_supervised__user_core_common_features.h @@ -0,0 +1,11 @@ +--- components/supervised_user/core/common/features.h.orig 2023-12-10 06:10:27 UTC ++++ components/supervised_user/core/common/features.h +@@ -24,7 +24,7 @@ BASE_DECLARE_FEATURE(kEnableManagedByParentUi); + extern const base::FeatureParam kManagedByParentUiMoreInfoUrl; + BASE_DECLARE_FEATURE(kClearingCookiesKeepsSupervisedUsersSignedIn); + +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + BASE_DECLARE_FEATURE(kEnableExtensionsPermissionsForSupervisedUsersOnDesktop); + #endif + diff --git a/www/chromium/files/patch-components_sync_base_features.cc b/www/chromium/files/patch-components_sync_base_features.cc new file mode 100644 index 000000000000..dd99ff26a704 --- /dev/null +++ b/www/chromium/files/patch-components_sync_base_features.cc @@ -0,0 +1,11 @@ +--- components/sync/base/features.cc.orig 2023-12-10 06:10:27 UTC ++++ components/sync/base/features.cc +@@ -101,7 +101,7 @@ BASE_FEATURE(kEnablePreferencesAccountStorage, + BASE_FEATURE(kSyncPollImmediatelyOnEveryStartup, + "SyncPollImmediatelyOnEveryStartup", + #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ +- BUILDFLAG(IS_WIN) ++ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + base::FEATURE_ENABLED_BY_DEFAULT + #else + base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/chromium/files/patch-components_user__education_views_help__bubble__view.cc b/www/chromium/files/patch-components_user__education_views_help__bubble__view.cc index 65298059c896..c1f10bf974bc 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 2023-11-03 10:09:45 UTC +--- components/user_education/views/help_bubble_view.cc.orig 2023-12-10 06:10:27 UTC +++ components/user_education/views/help_bubble_view.cc -@@ -997,7 +997,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect() const { +@@ -1003,7 +1003,7 @@ gfx::Rect HelpBubbleView::GetAnchorRect() const { void HelpBubbleView::OnBeforeBubbleWidgetInit(views::Widget::InitParams* params, views::Widget* widget) const { BubbleDialogDelegateView::OnBeforeBubbleWidgetInit(params, widget); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Help bubbles anchored to menus may be clipped to their anchors' bounds, // resulting in visual errors, unless they use accelerated rendering. See // crbug.com/1445770 for details. diff --git a/www/chromium/files/patch-components_variations_service_variations__service.cc b/www/chromium/files/patch-components_variations_service_variations__service.cc index 2868af24ef63..1f99986bf844 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 2023-05-31 08:12:17 UTC +--- components/variations/service/variations_service.cc.orig 2023-12-10 06:10:27 UTC +++ components/variations/service/variations_service.cc -@@ -95,7 +95,7 @@ std::string GetPlatformString() { +@@ -96,7 +96,7 @@ std::string GetPlatformString() { return "android"; #elif BUILDFLAG(IS_FUCHSIA) return "fuchsia"; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_SOLARIS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || BUILDFLAG(IS_SOLARIS) || BUILDFLAG(IS_BSD) // Default BSD and SOLARIS to Linux to not break those builds, although these // platforms are not officially supported by Chrome. return "linux"; diff --git a/www/chromium/files/patch-components_viz_host_host__display__client.cc b/www/chromium/files/patch-components_viz_host_host__display__client.cc deleted file mode 100644 index 0e2ca329af42..000000000000 --- a/www/chromium/files/patch-components_viz_host_host__display__client.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/viz/host/host_display_client.cc.orig 2023-03-09 06:31:50 UTC -+++ components/viz/host/host_display_client.cc -@@ -67,7 +67,7 @@ void HostDisplayClient::AddChildWindowToBrowser( - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - void HostDisplayClient::DidCompleteSwapWithNewSize(const gfx::Size& size) { - NOTIMPLEMENTED(); - } diff --git a/www/chromium/files/patch-components_viz_host_host__display__client.h b/www/chromium/files/patch-components_viz_host_host__display__client.h deleted file mode 100644 index 68a053db5791..000000000000 --- a/www/chromium/files/patch-components_viz_host_host__display__client.h +++ /dev/null @@ -1,11 +0,0 @@ ---- components/viz/host/host_display_client.h.orig 2023-01-11 09:17:16 UTC -+++ components/viz/host/host_display_client.h -@@ -54,7 +54,7 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - void DidCompleteSwapWithNewSize(const gfx::Size& size) override; - #endif - diff --git a/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl__on__gpu.cc b/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl__on__gpu.cc index df55db419e27..e9670e1cb8ba 100644 --- a/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl__on__gpu.cc +++ b/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl__on__gpu.cc @@ -1,15 +1,15 @@ ---- components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.orig 2023-11-03 10:09:45 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.orig 2023-12-10 06:10:27 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc -@@ -1530,7 +1530,12 @@ void SkiaOutputSurfaceImplOnGpu::CopyOutputNV12( +@@ -1567,7 +1567,12 @@ void SkiaOutputSurfaceImplOnGpu::CopyOutputNV12( // Issue readbacks from the surfaces: for (size_t i = 0; i < CopyOutputResult::kNV12MaxPlanes; ++i) { +#if defined(__clang__) && (__clang_major__ >= 16) SkISize size(plane_surfaces[i]->width(), plane_surfaces[i]->height()); +#else + SkISize s = { plane_surfaces[i]->width(), plane_surfaces[i]->height() }; + SkISize size(s); +#endif SkImageInfo dst_info = SkImageInfo::Make( size, (i == 0) ? kAlpha_8_SkColorType : kR8G8_unorm_SkColorType, kUnpremul_SkAlphaType); diff --git a/www/chromium/files/patch-components_viz_service_display__embedder_software__output__surface.cc b/www/chromium/files/patch-components_viz_service_display__embedder_software__output__surface.cc index 0d307362a783..932210a9ce0d 100644 --- a/www/chromium/files/patch-components_viz_service_display__embedder_software__output__surface.cc +++ b/www/chromium/files/patch-components_viz_service_display__embedder_software__output__surface.cc @@ -1,20 +1,20 @@ ---- components/viz/service/display_embedder/software_output_surface.cc.orig 2023-02-08 09:03:45 UTC +--- components/viz/service/display_embedder/software_output_surface.cc.orig 2023-12-10 06:10:27 UTC +++ components/viz/service/display_embedder/software_output_surface.cc -@@ -98,7 +98,7 @@ void SoftwareOutputSurface::SwapBuffersCallback(base:: +@@ -124,7 +124,7 @@ void SoftwareOutputSurface::SwapBuffersCallback(base:: now.SnappedToNextTick(refresh_timebase_, refresh_interval_) - now; // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (needs_swap_size_notifications_) client_->DidSwapWithSize(pixel_size); #endif -@@ -125,7 +125,7 @@ gfx::OverlayTransform SoftwareOutputSurface::GetDispla +@@ -151,7 +151,7 @@ gfx::OverlayTransform SoftwareOutputSurface::GetDispla // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) void SoftwareOutputSurface::SetNeedsSwapSizeNotifications( bool needs_swap_size_notifications) { needs_swap_size_notifications_ = needs_swap_size_notifications; diff --git a/www/chromium/files/patch-components_viz_service_display__embedder_software__output__surface.h b/www/chromium/files/patch-components_viz_service_display__embedder_software__output__surface.h index fc2941684d49..3d8759e36eb0 100644 --- a/www/chromium/files/patch-components_viz_service_display__embedder_software__output__surface.h +++ b/www/chromium/files/patch-components_viz_service_display__embedder_software__output__surface.h @@ -1,20 +1,20 @@ ---- components/viz/service/display_embedder/software_output_surface.h.orig 2022-07-22 17:30:31 UTC +--- components/viz/service/display_embedder/software_output_surface.h.orig 2023-12-10 06:10:27 UTC +++ components/viz/service/display_embedder/software_output_surface.h @@ -47,7 +47,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputSurface : publi gfx::OverlayTransform GetDisplayTransform() override; // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) void SetNeedsSwapSizeNotifications( bool needs_swap_size_notifications) override; #endif -@@ -69,7 +69,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputSurface : publi +@@ -70,7 +70,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputSurface : publi // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) bool needs_swap_size_notifications_ = false; #endif diff --git a/www/chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc b/www/chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc deleted file mode 100644 index 0d1ae916db08..000000000000 --- a/www/chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc.orig 2023-11-03 10:09:45 UTC -+++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -@@ -110,7 +110,7 @@ RootCompositorFrameSinkImpl::Create( - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - // For X11, we need notify client about swap completion after resizing, so the - // client can use it for synchronize with X11 WM. - output_surface->SetNeedsSwapSizeNotifications(true); -@@ -714,7 +714,7 @@ void RootCompositorFrameSinkImpl::DisplayDidCompleteSw - display_client_->DidCompleteSwapWithSize(pixel_size); - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - if (display_client_ && pixel_size != last_swap_pixel_size_) { - last_swap_pixel_size_ = pixel_size; - display_client_->DidCompleteSwapWithNewSize(last_swap_pixel_size_); diff --git a/www/chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h b/www/chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h deleted file mode 100644 index 8ec8ab430f22..000000000000 --- a/www/chromium/files/patch-components_viz_service_frame__sinks_root__compositor__frame__sink__impl.h +++ /dev/null @@ -1,11 +0,0 @@ ---- components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h.orig 2023-11-03 10:09:45 UTC -+++ components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h -@@ -212,7 +212,7 @@ class VIZ_SERVICE_EXPORT RootCompositorFrameSinkImpl - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - gfx::Size last_swap_pixel_size_; - #endif - diff --git a/www/chromium/files/patch-components_viz_test_fake__display__client.cc b/www/chromium/files/patch-components_viz_test_fake__display__client.cc deleted file mode 100644 index 2ef3db027840..000000000000 --- a/www/chromium/files/patch-components_viz_test_fake__display__client.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- components/viz/test/fake_display_client.cc.orig 2023-01-11 09:17:16 UTC -+++ components/viz/test/fake_display_client.cc -@@ -27,7 +27,7 @@ void FakeDisplayClient::AddChildWindowToBrowser( - gpu::SurfaceHandle child_window) {} - #endif - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - void FakeDisplayClient::DidCompleteSwapWithNewSize(const gfx::Size& size) {} - #endif - diff --git a/www/chromium/files/patch-components_viz_test_fake__display__client.h b/www/chromium/files/patch-components_viz_test_fake__display__client.h deleted file mode 100644 index 539fa59083f9..000000000000 --- a/www/chromium/files/patch-components_viz_test_fake__display__client.h +++ /dev/null @@ -1,11 +0,0 @@ ---- components/viz/test/fake_display_client.h.orig 2023-01-11 09:17:16 UTC -+++ components/viz/test/fake_display_client.h -@@ -35,7 +35,7 @@ class FakeDisplayClient : public mojom::DisplayClient - void AddChildWindowToBrowser(gpu::SurfaceHandle child_window) override; - #endif - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - void DidCompleteSwapWithNewSize(const gfx::Size& size) override; - #endif - diff --git a/www/chromium/files/patch-components_viz_test_mock__display__client.h b/www/chromium/files/patch-components_viz_test_mock__display__client.h deleted file mode 100644 index dd0984e080fe..000000000000 --- a/www/chromium/files/patch-components_viz_test_mock__display__client.h +++ /dev/null @@ -1,11 +0,0 @@ ---- components/viz/test/mock_display_client.h.orig 2023-01-11 09:17:16 UTC -+++ components/viz/test/mock_display_client.h -@@ -45,7 +45,7 @@ class MockDisplayClient : public mojom::DisplayClient - #endif - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - MOCK_METHOD1(DidCompleteSwapWithNewSize, void(const gfx::Size&)); - #endif - diff --git a/www/chromium/files/patch-content_browser_BUILD.gn b/www/chromium/files/patch-content_browser_BUILD.gn index 3dbe96f39de2..78faa9719f45 100644 --- a/www/chromium/files/patch-content_browser_BUILD.gn +++ b/www/chromium/files/patch-content_browser_BUILD.gn @@ -1,16 +1,16 @@ ---- content/browser/BUILD.gn.orig 2023-11-03 10:09:45 UTC +--- content/browser/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ content/browser/BUILD.gn -@@ -2462,6 +2462,13 @@ source_set("browser") { +@@ -2474,6 +2474,13 @@ source_set("browser") { deps += [ "//media/mojo/mojom/stable:stable_video_decoder" ] } + if (is_bsd) { + sources -= [ + "sandbox_ipc_linux.cc", + "sandbox_ipc_linux.h", + ] + } + if (is_chromeos) { sources += [ "handwriting/handwriting_recognition_service_impl_cros.cc", diff --git a/www/chromium/files/patch-content_browser_browser__child__process__host__impl.cc b/www/chromium/files/patch-content_browser_browser__child__process__host__impl.cc index d98bbea8b0a7..96a1c789b668 100644 --- a/www/chromium/files/patch-content_browser_browser__child__process__host__impl.cc +++ b/www/chromium/files/patch-content_browser_browser__child__process__host__impl.cc @@ -1,10 +1,19 @@ ---- content/browser/browser_child_process_host_impl.cc.orig 2023-07-16 15:47:57 UTC +--- content/browser/browser_child_process_host_impl.cc.orig 2023-12-10 06:10:27 UTC +++ content/browser/browser_child_process_host_impl.cc @@ -321,6 +321,7 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo switches::kDisableBestEffortTasks, switches::kDisableLogging, switches::kEnableLogging, + switches::kDisableUnveil, switches::kIPCConnectionTimeout, switches::kLogBestEffortTasks, switches::kLogFile, +@@ -630,7 +631,7 @@ void BrowserChildProcessHostImpl::OnProcessLaunched() + ->child_process()); + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + child_thread_type_switcher_.SetPid(process.Pid()); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + diff --git a/www/chromium/files/patch-content_browser_browser__child__process__host__impl.h b/www/chromium/files/patch-content_browser_browser__child__process__host__impl.h new file mode 100644 index 000000000000..f8115382bd97 --- /dev/null +++ b/www/chromium/files/patch-content_browser_browser__child__process__host__impl.h @@ -0,0 +1,20 @@ +--- content/browser/browser_child_process_host_impl.h.orig 2023-12-10 06:10:27 UTC ++++ content/browser/browser_child_process_host_impl.h +@@ -33,7 +33,7 @@ + #include "base/win/object_watcher.h" + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "content/browser/child_thread_type_switcher_linux.h" + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + +@@ -261,7 +261,7 @@ class BrowserChildProcessHostImpl + std::unique_ptr system_tracing_service_; + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + ChildThreadTypeSwitcher child_thread_type_switcher_; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + diff --git a/www/chromium/files/patch-content_browser_browser__child__process__host__impl__receiver__bindings.cc b/www/chromium/files/patch-content_browser_browser__child__process__host__impl__receiver__bindings.cc new file mode 100644 index 000000000000..be6079ddca2f --- /dev/null +++ b/www/chromium/files/patch-content_browser_browser__child__process__host__impl__receiver__bindings.cc @@ -0,0 +1,11 @@ +--- content/browser/browser_child_process_host_impl_receiver_bindings.cc.orig 2023-12-10 06:10:27 UTC ++++ content/browser/browser_child_process_host_impl_receiver_bindings.cc +@@ -62,7 +62,7 @@ void BrowserChildProcessHostImpl::BindHostReceiver( + } + } + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + if (auto r = receiver.As()) { + child_thread_type_switcher_.Bind(std::move(r)); + return; 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 59112df2e812..8ecad9c78292 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 2023-11-03 10:09:45 UTC +--- content/browser/browser_main_loop.cc.orig 2023-12-10 06:10:27 UTC +++ content/browser/browser_main_loop.cc @@ -247,6 +247,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 -@@ -540,6 +546,12 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -552,6 +558,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 -@@ -577,7 +589,7 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -589,7 +601,7 @@ int BrowserMainLoop::EarlyInitialization() { base::PlatformThread::SetCurrentThreadType(base::ThreadType::kCompositing); #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // We use quite a few file descriptors for our IPC as well as disk the disk // cache, and the default limit on Apple is low (256), so bump it up. diff --git a/www/chromium/files/patch-content_browser_child__thread__type__switcher__linux.cc b/www/chromium/files/patch-content_browser_child__thread__type__switcher__linux.cc new file mode 100644 index 000000000000..88fa0d2ad071 --- /dev/null +++ b/www/chromium/files/patch-content_browser_child__thread__type__switcher__linux.cc @@ -0,0 +1,20 @@ +--- content/browser/child_thread_type_switcher_linux.cc.orig 2023-12-10 06:10:27 UTC ++++ content/browser/child_thread_type_switcher_linux.cc +@@ -20,6 +20,9 @@ void SetThreadTypeOnLauncherThread(base::ProcessId pee + base::ThreadType thread_type) { + DCHECK(CurrentlyOnProcessLauncherTaskRunner()); + ++#if BUILDFLAG(IS_BSD) ++ NOTIMPLEMENTED(); ++#else + bool ns_pid_supported = false; + pid_t peer_tid = base::FindThreadID(peer_pid, ns_tid, &ns_pid_supported); + if (peer_tid == -1) { +@@ -37,6 +40,7 @@ void SetThreadTypeOnLauncherThread(base::ProcessId pee + + base::PlatformThread::SetThreadType(peer_pid, peer_tid, thread_type, + base::IsViaIPC(true)); ++#endif + } + + } // namespace 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 deleted file mode 100644 index 837cd7799ffe..000000000000 --- a/www/chromium/files/patch-content_browser_compositor_viz__process__transport__factory.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- content/browser/compositor/viz_process_transport_factory.cc.orig 2023-10-11 18:22:24 UTC -+++ content/browser/compositor/viz_process_transport_factory.cc -@@ -108,7 +108,7 @@ class HostDisplayClient : public viz::HostDisplayClien - // viz::HostDisplayClient: - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - void DidCompleteSwapWithNewSize(const gfx::Size& size) override { - compositor_->OnCompleteSwapWithNewSize(size); - } diff --git a/www/chromium/files/patch-content_browser_download_save__package.cc b/www/chromium/files/patch-content_browser_download_save__package.cc index 12c76f1e5348..7a8958bcd900 100644 --- a/www/chromium/files/patch-content_browser_download_save__package.cc +++ b/www/chromium/files/patch-content_browser_download_save__package.cc @@ -1,16 +1,16 @@ ---- content/browser/download/save_package.cc.orig 2023-11-03 10:09:45 UTC +--- content/browser/download/save_package.cc.orig 2023-12-10 06:10:27 UTC +++ content/browser/download/save_package.cc -@@ -769,8 +769,13 @@ void SavePackage::Finish() { +@@ -767,8 +767,13 @@ void SavePackage::Finish() { if (download_) { std::vector files; for (auto& item : saved_success_items_) { +#if defined(__clang__) && (__clang_major__ >= 16) files.emplace_back(item.second->full_path(), item.second->url(), item.second->referrer().url); +#else + files.emplace_back(download::DownloadSaveItemData::ItemInfo{item.second->full_path(), item.second->url(), + item.second->referrer().url}); +#endif } download::DownloadSaveItemData::AttachItemData(download_, std::move(files)); } diff --git a/www/chromium/files/patch-content_browser_generic__sensor_frame__sensor__provider__proxy.cc b/www/chromium/files/patch-content_browser_generic__sensor_frame__sensor__provider__proxy.cc new file mode 100644 index 000000000000..915319b7b6eb --- /dev/null +++ b/www/chromium/files/patch-content_browser_generic__sensor_frame__sensor__provider__proxy.cc @@ -0,0 +1,14 @@ +--- content/browser/generic_sensor/frame_sensor_provider_proxy.cc.orig 2023-12-10 06:10:27 UTC ++++ content/browser/generic_sensor/frame_sensor_provider_proxy.cc +@@ -20,7 +20,11 @@ namespace content { + + namespace { + ++#if (_LIBCPP_VERSION >= 160000) + constexpr std::vector ++#else ++std::vector ++#endif + SensorTypeToPermissionsPolicyFeatures(SensorType type) { + switch (type) { + case SensorType::AMBIENT_LIGHT: 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 b26019984471..782c2f1566b6 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 2023-11-03 10:09:45 UTC +--- content/browser/gpu/gpu_process_host.cc.orig 2023-12-10 06:10:27 UTC +++ content/browser/gpu/gpu_process_host.cc -@@ -253,6 +253,7 @@ static const char* const kSwitchNames[] = { - switches::kEnableBackgroundThreadPool, +@@ -254,6 +254,7 @@ static const char* const kSwitchNames[] = { switches::kEnableGpuRasterization, + switches::kEnableSkiaGraphite, switches::kEnableLogging, + switches::kDisableUnveil, switches::kDoubleBufferCompositing, switches::kHeadless, switches::kLoggingLevel, -@@ -287,7 +288,7 @@ static const char* const kSwitchNames[] = { +@@ -289,7 +290,7 @@ static const char* const kSwitchNames[] = { switches::kOzoneDumpFile, switches::kDisableBufferBWCompression, #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 6462d17fa9a8..521040f303de 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 2023-08-17 07:33:31 UTC +--- content/browser/media/media_keys_listener_manager_impl.cc.orig 2023-12-10 06:10:27 UTC +++ content/browser/media/media_keys_listener_manager_impl.cc -@@ -234,7 +234,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMe +@@ -252,7 +252,7 @@ void MediaKeysListenerManagerImpl::StartListeningForMe // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) system_media_controls_ = system_media_controls::SystemMediaControls::Create( media::AudioManager::GetGlobalAppName()); #endif diff --git a/www/chromium/files/patch-content_browser_network__service__instance__impl.cc b/www/chromium/files/patch-content_browser_network__service__instance__impl.cc index 5781a54c004b..b14e753422ad 100644 --- a/www/chromium/files/patch-content_browser_network__service__instance__impl.cc +++ b/www/chromium/files/patch-content_browser_network__service__instance__impl.cc @@ -1,29 +1,29 @@ ---- content/browser/network_service_instance_impl.cc.orig 2023-11-03 10:09:45 UTC +--- content/browser/network_service_instance_impl.cc.orig 2023-12-10 06:10:27 UTC +++ content/browser/network_service_instance_impl.cc -@@ -81,7 +81,7 @@ +@@ -80,7 +80,7 @@ #include "content/browser/network/network_service_process_tracker_win.h" #endif -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/browser/system_dns_resolution/system_dns_resolver.h" #include "services/network/public/mojom/system_dns_resolution.mojom-forward.h" #endif -@@ -373,7 +373,7 @@ void CreateInProcessNetworkService( +@@ -357,7 +357,7 @@ void CreateInProcessNetworkService( std::move(receiver))); } -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Runs a self-owned SystemDnsResolverMojoImpl. This is meant to run on a // high-priority thread pool. void RunSystemDnsResolverOnThreadPool( -@@ -440,7 +440,7 @@ network::mojom::NetworkServiceParamsPtr CreateNetworkS +@@ -426,7 +426,7 @@ network::mojom::NetworkServiceParamsPtr CreateNetworkS } #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (GetContentClient() ->browser() ->ShouldRunOutOfProcessSystemDnsResolution() && diff --git a/www/chromium/files/patch-content_browser_renderer__host_media_service__video__capture__device__launcher.cc b/www/chromium/files/patch-content_browser_renderer__host_media_service__video__capture__device__launcher.cc index 3f4a04f6f8b3..8d485438562e 100644 --- a/www/chromium/files/patch-content_browser_renderer__host_media_service__video__capture__device__launcher.cc +++ b/www/chromium/files/patch-content_browser_renderer__host_media_service__video__capture__device__launcher.cc @@ -1,20 +1,20 @@ ---- content/browser/renderer_host/media/service_video_capture_device_launcher.cc.orig 2023-09-13 12:11:42 UTC +--- content/browser/renderer_host/media/service_video_capture_device_launcher.cc.orig 2023-12-10 06:10:27 UTC +++ content/browser/renderer_host/media/service_video_capture_device_launcher.cc -@@ -24,7 +24,7 @@ +@@ -25,7 +25,7 @@ #include "media/base/media_switches.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "content/browser/gpu/gpu_data_manager_impl.h" #endif -@@ -166,7 +166,7 @@ void ServiceVideoCaptureDeviceLauncher::LaunchDeviceAs +@@ -172,7 +172,7 @@ void ServiceVideoCaptureDeviceLauncher::LaunchDeviceAs } #else if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // On Linux, additionally check whether the NV12 GPU memory buffer is // supported. if (GpuDataManagerImpl::GetInstance()->IsGpuMemoryBufferNV12Supported()) 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 b49a8bf64c64..b1c0283cef80 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,55 +1,55 @@ ---- content/browser/renderer_host/render_process_host_impl.cc.orig 2023-11-03 10:09:45 UTC +--- content/browser/renderer_host/render_process_host_impl.cc.orig 2023-12-10 06:10:27 UTC +++ content/browser/renderer_host/render_process_host_impl.cc -@@ -220,7 +220,7 @@ +@@ -222,7 +222,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 -@@ -951,7 +951,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = +@@ -952,7 +952,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; -@@ -1094,7 +1094,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1159,7 +1159,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; -@@ -1183,7 +1183,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1253,7 +1253,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_; - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -3256,7 +3256,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( + ChildThreadTypeSwitcher child_thread_type_switcher_; +@@ -3330,7 +3330,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() && -@@ -3316,6 +3316,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin +@@ -3390,6 +3390,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, switches::kDisableTouchDragDrop, + switches::kDisableUnveil, switches::kDisableUseSharedImagesForPepperVideo, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, 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 cb0a91101013..b5c543d6c2ad 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 2023-11-03 10:09:45 UTC +--- content/browser/renderer_host/render_process_host_impl.h.orig 2023-12-10 06:10:27 UTC +++ content/browser/renderer_host/render_process_host_impl.h -@@ -541,7 +541,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -540,7 +540,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 81f96fa3ab88..deb6b0879d11 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 2023-10-11 18:22:24 UTC +--- content/browser/renderer_host/render_view_host_impl.cc.orig 2023-12-10 06:10:27 UTC +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -273,7 +273,7 @@ void RenderViewHostImpl::GetPlatformSpecificPrefs( +@@ -271,7 +271,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 99fd36fef4ea..d3857a9aabf2 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 2023-11-03 10:09:45 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2023-12-10 06:10:27 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -121,7 +121,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/linux/linux_ui.h" -@@ -462,7 +462,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge + #include "ui/base/ime/text_input_flags.h" +@@ -463,7 +463,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()) -@@ -1721,7 +1721,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { +@@ -1724,7 +1724,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { return GetTextInputManager() && GetTextInputManager()->should_do_learning(); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool RenderWidgetHostViewAura::SetCompositionFromExistingText( const gfx::Range& range, const std::vector& ui_ime_text_spans) { -@@ -2566,7 +2566,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -2562,7 +2562,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; -@@ -2749,7 +2749,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -2745,7 +2745,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_service__worker_service__worker__context__wrapper.cc b/www/chromium/files/patch-content_browser_service__worker_service__worker__context__wrapper.cc index f9e50664a9c2..0762519377ed 100644 --- a/www/chromium/files/patch-content_browser_service__worker_service__worker__context__wrapper.cc +++ b/www/chromium/files/patch-content_browser_service__worker_service__worker__context__wrapper.cc @@ -1,15 +1,15 @@ ---- content/browser/service_worker/service_worker_context_wrapper.cc.orig 2023-11-03 10:09:45 UTC +--- content/browser/service_worker/service_worker_context_wrapper.cc.orig 2023-12-10 06:10:27 UTC +++ content/browser/service_worker/service_worker_context_wrapper.cc -@@ -1440,7 +1440,12 @@ void ServiceWorkerContextWrapper::MaybeProcessPendingW +@@ -1453,7 +1453,12 @@ void ServiceWorkerContextWrapper::MaybeProcessPendingW return; } +#if defined(__clang__) && (__clang_major__ >= 16) auto [document_url, key, callback] = std::move(*request); +#else + auto [d_u, key, callback] = std::move(*request); + auto document_url = d_u; +#endif DCHECK(document_url.is_valid()); TRACE_EVENT1("ServiceWorker", 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 aff8354603e6..1fb7a22a251e 100644 --- a/www/chromium/files/patch-content_browser_utility__process__host.cc +++ b/www/chromium/files/patch-content_browser_utility__process__host.cc @@ -1,56 +1,56 @@ ---- content/browser/utility_process_host.cc.orig 2023-11-03 10:09:45 UTC +--- content/browser/utility_process_host.cc.orig 2023-12-10 06:10:27 UTC +++ content/browser/utility_process_host.cc @@ -60,7 +60,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" @@ -70,7 +70,7 @@ #include "media/capture/capture_switches.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "base/task/sequenced_task_runner.h" #include "components/viz/host/gpu_client.h" #include "media/capture/capture_switches.h" @@ -81,7 +81,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; @@ -130,7 +130,7 @@ UtilityProcessHost::UtilityProcessHost(std::unique_ptr started_(false), name_(u"utility process"), file_data_(std::make_unique()), -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) gpu_client_(nullptr, base::OnTaskRunnerDeleter(nullptr)), #endif client_(std::move(client)) { -@@ -419,7 +419,7 @@ bool UtilityProcessHost::StartProcess() { +@@ -417,7 +417,7 @@ bool UtilityProcessHost::StartProcess() { file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload()); #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The network service should have access to the parent directories // necessary for its usage. if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork) { -@@ -430,7 +430,7 @@ bool UtilityProcessHost::StartProcess() { +@@ -428,7 +428,7 @@ bool UtilityProcessHost::StartProcess() { } #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Pass `kVideoCaptureUseGpuMemoryBuffer` flag to video capture service only // when the video capture use GPU memory buffer enabled and NV12 GPU memory // buffer supported. 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 16deee98dc96..deacdfe60fb9 100644 --- a/www/chromium/files/patch-content_browser_utility__sandbox__delegate.cc +++ b/www/chromium/files/patch-content_browser_utility__sandbox__delegate.cc @@ -1,32 +1,32 @@ ---- content/browser/utility_sandbox_delegate.cc.orig 2023-07-16 15:47:57 UTC +--- content/browser/utility_sandbox_delegate.cc.orig 2023-12-10 06:10:27 UTC +++ content/browser/utility_sandbox_delegate.cc -@@ -63,13 +63,13 @@ UtilitySandboxedProcessLauncherDelegate:: +@@ -64,13 +64,13 @@ UtilitySandboxedProcessLauncherDelegate:: #if BUILDFLAG(ENABLE_PPAPI) sandbox_type_ == sandbox::mojom::Sandbox::kPpapi || #endif -#if BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) 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) -@@ -124,10 +124,10 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe +@@ -125,10 +125,10 @@ ZygoteCommunication* UtilitySandboxedProcessLauncherDe // unsandboxed zygote and then apply their actual sandboxes in the forked // process upon startup. if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork || -#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_browser_web__contents_web__contents__view__aura.cc b/www/chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc index 07e8157aaed8..b498e7d739e1 100644 --- a/www/chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc +++ b/www/chromium/files/patch-content_browser_web__contents_web__contents__view__aura.cc @@ -1,29 +1,29 @@ ---- content/browser/web_contents/web_contents_view_aura.cc.orig 2023-11-03 10:09:45 UTC +--- content/browser/web_contents/web_contents_view_aura.cc.orig 2023-12-10 06:10:27 UTC +++ content/browser/web_contents/web_contents_view_aura.cc -@@ -178,7 +178,7 @@ class WebDragSourceAura : public content::WebContentsO +@@ -174,7 +174,7 @@ class WebDragSourceAura : public content::WebContentsO raw_ptr window_; }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Fill out the OSExchangeData with a file contents, synthesizing a name if // necessary. void PrepareDragForFileContents(const DropData& drop_data, -@@ -262,7 +262,7 @@ void PrepareDragData(const DropData& drop_data, +@@ -258,7 +258,7 @@ void PrepareDragData(const DropData& drop_data, if (!drop_data.download_metadata.empty()) PrepareDragForDownload(drop_data, provider, web_contents); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // We set the file contents before the URL because the URL also sets file // contents (to a .URL shortcut). We want to prefer file content data over // a shortcut so we add it first. -@@ -1380,7 +1380,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* +@@ -1319,7 +1319,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* // Linux window managers like to handle raise-on-click themselves. If we // raise-on-click manually, this may override user settings that prevent // focus-stealing. -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // It is possible for the web-contents to be destroyed while it is being // activated. Use a weak-ptr to track whether that happened or not. // More in https://crbug.com/1040725 diff --git a/www/chromium/files/patch-content_child_BUILD.gn b/www/chromium/files/patch-content_child_BUILD.gn new file mode 100644 index 000000000000..21adeaaa118b --- /dev/null +++ b/www/chromium/files/patch-content_child_BUILD.gn @@ -0,0 +1,16 @@ +--- content/child/BUILD.gn.orig 2023-12-10 06:10:27 UTC ++++ content/child/BUILD.gn +@@ -128,6 +128,13 @@ target(link_target_type, "child") { + ] + } + ++ if (is_bsd) { ++ sources -= [ ++ "sandboxed_process_thread_type_handler.cc", ++ "sandboxed_process_thread_type_handler.h", ++ ] ++ } ++ + if (is_win) { + sources += [ + "dwrite_font_proxy/dwrite_font_proxy_init_impl_win.cc", diff --git a/www/chromium/files/patch-content_common_BUILD.gn b/www/chromium/files/patch-content_common_BUILD.gn index b4e22e94ad5c..9d3df23e28ff 100644 --- a/www/chromium/files/patch-content_common_BUILD.gn +++ b/www/chromium/files/patch-content_common_BUILD.gn @@ -1,21 +1,12 @@ ---- content/common/BUILD.gn.orig 2023-11-03 10:09:45 UTC +--- content/common/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ content/common/BUILD.gn -@@ -441,6 +441,9 @@ if (is_linux || is_chromeos) { +@@ -438,6 +438,9 @@ if (is_linux || is_chromeos) { public = [ "set_process_title_linux.h" ] sources = [ "set_process_title_linux.cc" ] deps = [ "//base" ] + if (is_bsd) { + sources -= [ "set_process_title_linux.cc" ] + } } } -@@ -486,7 +489,7 @@ mojom("mojo_bindings") { - if (enable_ipc_logging) { - enabled_features += [ "ipc_logging" ] - } -- if (is_linux || is_chromeos) { -+ if (!is_bsd && (is_linux || is_chromeos)) { - enabled_features += [ "supports_thread_types" ] - } - if (use_clang_profiling_inside_sandbox) { diff --git a/www/chromium/files/patch-content_common_features.cc b/www/chromium/files/patch-content_common_features.cc index 3029c06d9f42..e8c13eeba88f 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 2023-11-03 10:09:45 UTC +--- content/common/features.cc.orig 2023-12-10 06:10:27 UTC +++ content/common/features.cc -@@ -147,7 +147,7 @@ BASE_FEATURE(kEnableBackForwardCacheForScreenReader, +@@ -154,7 +154,7 @@ BASE_FEATURE(kEnableBackForwardCacheForScreenReader, 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); -@@ -219,7 +219,7 @@ BASE_FEATURE(kGpuInfoCollectionSeparatePrefetch, +@@ -246,7 +246,7 @@ BASE_FEATURE(kGroupNIKByJoiningOrigin, // process and having browser process handle adjusting thread properties (nice - // value, c-group, latency sensitivity...) for renderers which have sandbox + // 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(kHandleRendererThreadTypeChangesInBrowser, - "HandleRendererThreadTypeChangesInBrowser", + 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 ee4a3de83d00..c7ae3c9651ae 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 2023-11-03 10:09:45 UTC +--- content/common/features.h.orig 2023-12-10 06:10:27 UTC +++ content/common/features.h @@ -37,7 +37,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kDeviceMonitorMac) CONTENT_EXPORT BASE_DECLARE_FEATURE(kDocumentPolicyNegotiation); CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnumerateDevicesHideDeviceIDs); CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableBackForwardCacheForScreenReader); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableDevToolsJsErrorReporting); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnsureAllowBindingsIsAlwaysForWebUI); -@@ -55,7 +55,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kForwardMemoryPres - #if BUILDFLAG(IS_WIN) +@@ -58,7 +58,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kForwardMemoryPres 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(kHandleRendererThreadTypeChangesInBrowser); + CONTENT_EXPORT BASE_DECLARE_FEATURE(kHandleChildThreadTypeChangesInBrowser); #endif CONTENT_EXPORT BASE_DECLARE_FEATURE(kHighPriorityBeforeUnload); diff --git a/www/chromium/files/patch-content_gpu_gpu__child__thread.cc b/www/chromium/files/patch-content_gpu_gpu__child__thread.cc new file mode 100644 index 000000000000..144a3ea7f587 --- /dev/null +++ b/www/chromium/files/patch-content_gpu_gpu__child__thread.cc @@ -0,0 +1,21 @@ +--- content/gpu/gpu_child_thread.cc.orig 2023-12-10 06:10:27 UTC ++++ content/gpu/gpu_child_thread.cc +@@ -59,7 +59,7 @@ + #include "third_party/skia/include/ports/SkFontConfigInterface.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 + +@@ -143,7 +143,8 @@ void GpuChildThread::Init(const base::TimeTicks& proce + + viz_main_.gpu_service()->set_start_time(process_start_time); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++// XXX BSD ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) + SandboxedProcessThreadTypeHandler::NotifyMainChildThreadCreated(); + #endif + diff --git a/www/chromium/files/patch-content_gpu_gpu__main.cc b/www/chromium/files/patch-content_gpu_gpu__main.cc index 3638f797be74..a54731f96d42 100644 --- a/www/chromium/files/patch-content_gpu_gpu__main.cc +++ b/www/chromium/files/patch-content_gpu_gpu__main.cc @@ -1,56 +1,66 @@ ---- content/gpu/gpu_main.cc.orig 2023-08-17 07:33:31 UTC +--- content/gpu/gpu_main.cc.orig 2023-12-10 06:10:27 UTC +++ content/gpu/gpu_main.cc -@@ -90,7 +90,7 @@ +@@ -91,7 +91,7 @@ #include "sandbox/win/src/sandbox.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "content/child/sandboxed_process_thread_type_handler.h" #include "content/gpu/gpu_sandbox_hook_linux.h" #include "sandbox/policy/linux/sandbox_linux.h" - #include "sandbox/policy/sandbox_type.h" -@@ -112,7 +112,7 @@ namespace content { +@@ -114,7 +114,7 @@ namespace content { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool StartSandboxLinux(gpu::GpuWatchdogThread*, const gpu::GPUInfo*, const gpu::GpuPreferences&); -@@ -177,7 +177,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel +@@ -179,7 +179,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel bool EnsureSandboxInitialized(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) override { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs); #elif BUILDFLAG(IS_WIN) return StartSandboxWindows(sandbox_info_); -@@ -287,7 +287,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -289,7 +289,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 -@@ -422,7 +422,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -328,7 +328,8 @@ int GpuMain(MainFunctionParams parameters) { + // before it. + InitializeSkia(); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++// XXX BSD ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) + // Thread type delegate of the process should be registered before + // first thread type change in ChildProcess constructor. + // It also needs to be registered before the process has multiple threads, +@@ -436,7 +437,7 @@ int GpuMain(MainFunctionParams parameters) { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) { -@@ -462,7 +462,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo +@@ -476,7 +477,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo sandbox_options.accelerated_video_encode_enabled = !gpu_prefs.disable_accelerated_video_encode; -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Video decoding of many video streams can use thousands of FDs as well as // Exo clients like Lacros. // See https://crbug.com/1417237 diff --git a/www/chromium/files/patch-content_public_browser_content__browser__client.cc b/www/chromium/files/patch-content_public_browser_content__browser__client.cc new file mode 100644 index 000000000000..0d6aa46e7feb --- /dev/null +++ b/www/chromium/files/patch-content_public_browser_content__browser__client.cc @@ -0,0 +1,11 @@ +--- content/public/browser/content_browser_client.cc.orig 2023-12-10 06:10:27 UTC ++++ content/public/browser/content_browser_client.cc +@@ -1273,7 +1273,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 e404ed16397c..691fc996785d 100644 --- a/www/chromium/files/patch-content_public_common_content__features.cc +++ b/www/chromium/files/patch-content_public_common_content__features.cc @@ -1,41 +1,41 @@ ---- content/public/common/content_features.cc.orig 2023-11-03 10:09:45 UTC +--- content/public/common/content_features.cc.orig 2023-12-10 06:10:27 UTC +++ content/public/common/content_features.cc @@ -40,7 +40,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, "AudioServiceOutOfProcess", // TODO(crbug.com/1052397): Remove !IS_CHROMEOS_LACROS once lacros starts being // built with OS_CHROMEOS instead of OS_LINUX. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) base::FEATURE_ENABLED_BY_DEFAULT #else @@ -52,7 +52,7 @@ BASE_FEATURE(kAudioServiceOutOfProcess, // kAudioServiceOutOfProcess feature is enabled. BASE_FEATURE(kAudioServiceSandbox, "AudioServiceSandbox", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -1131,7 +1131,7 @@ BASE_FEATURE(kWebAssemblyTiering, +@@ -1170,7 +1170,7 @@ BASE_FEATURE(kWebAssemblyTiering, BASE_FEATURE(kWebAssemblyTrapHandler, "WebAssemblyTrapHandler", #if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC)) && \ + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) && \ defined(ARCH_CPU_X86_64)) || \ (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) base::FEATURE_ENABLED_BY_DEFAULT -@@ -1172,7 +1172,11 @@ BASE_FEATURE(kWebUICodeCache, +@@ -1212,7 +1212,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 651c7bb4bd61..8b2b64aadbdb 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 2023-10-11 18:22:24 UTC +--- content/public/common/content_switches.cc.orig 2023-12-10 06:10:27 UTC +++ content/public/common/content_switches.cc -@@ -367,6 +367,8 @@ const char kEnableIsolatedWebAppsInRenderer[] = +@@ -364,6 +364,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. -@@ -992,7 +994,7 @@ const char kEnableAutomation[] = "enable-automation"; +@@ -994,7 +996,7 @@ const char kEnableAutomation[] = "enable-automation"; // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Allows sending text-to-speech requests to speech-dispatcher, a common // Linux speech service. Because it's buggy, the user must explicitly // enable it so that visiting a random webpage can't cause instability. diff --git a/www/chromium/files/patch-content_public_common_content__switches.h b/www/chromium/files/patch-content_public_common_content__switches.h index 2ff103705810..105ba5c3ceb8 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 2023-10-11 18:22:24 UTC +--- content/public/common/content_switches.h.orig 2023-12-10 06:10:27 UTC +++ content/public/common/content_switches.h -@@ -116,6 +116,7 @@ CONTENT_EXPORT extern const char kEnableGpuMemoryBuffe +@@ -115,6 +115,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[]; @@ -265,7 +266,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT extern const char kEnableSpeechDispatcher[]; CONTENT_EXPORT extern const char kLLVMProfileFile[]; #endif diff --git a/www/chromium/files/patch-content_public_test_mock__render__thread.cc b/www/chromium/files/patch-content_public_test_mock__render__thread.cc deleted file mode 100644 index 3a41987950f4..000000000000 --- a/www/chromium/files/patch-content_public_test_mock__render__thread.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- content/public/test/mock_render_thread.cc.orig 2023-03-09 06:31:50 UTC -+++ content/public/test/mock_render_thread.cc -@@ -64,7 +64,7 @@ class MockRenderMessageFilterImpl : public mojom::Rend - std::move(callback).Run(false); - } - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - void SetThreadType(int32_t platform_thread_id, - base::ThreadType thread_type) override {} - #endif diff --git a/www/chromium/files/patch-content_renderer_BUILD.gn b/www/chromium/files/patch-content_renderer_BUILD.gn deleted file mode 100644 index c022ff736f21..000000000000 --- a/www/chromium/files/patch-content_renderer_BUILD.gn +++ /dev/null @@ -1,16 +0,0 @@ ---- content/renderer/BUILD.gn.orig 2023-10-11 18:22:24 UTC -+++ content/renderer/BUILD.gn -@@ -201,6 +201,13 @@ target(link_target_type, "renderer") { - ] - } - -+ if (is_bsd) { -+ sources -= [ -+ "renderer_thread_type_handler.cc", -+ "renderer_thread_type_handler.h", -+ ] -+ } -+ - if (is_mac) { - sources += [ - "renderer_main_platform_delegate_mac.mm", diff --git a/www/chromium/files/patch-content_renderer_render__process__impl.cc b/www/chromium/files/patch-content_renderer_render__process__impl.cc index 4550fb5999dd..ec25fb4b5d4c 100644 --- a/www/chromium/files/patch-content_renderer_render__process__impl.cc +++ b/www/chromium/files/patch-content_renderer_render__process__impl.cc @@ -1,20 +1,20 @@ ---- content/renderer/render_process_impl.cc.orig 2023-11-03 10:09:45 UTC +--- content/renderer/render_process_impl.cc.orig 2023-12-10 06:10:27 UTC +++ content/renderer/render_process_impl.cc -@@ -46,7 +46,7 @@ +@@ -47,7 +47,7 @@ #if BUILDFLAG(IS_WIN) #include "base/win/win_util.h" #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) #include "v8/include/v8-wasm-trap-handler-posix.h" #endif -@@ -212,7 +212,7 @@ RenderProcessImpl::RenderProcessImpl() +@@ -224,7 +224,7 @@ RenderProcessImpl::RenderProcessImpl() v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag)); } -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) if (base::FeatureList::IsEnabled(features::kWebAssemblyTrapHandler)) { base::CommandLine* const command_line = base::CommandLine::ForCurrentProcess(); 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 9442998ab1aa..4c71f026adab 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 2023-11-03 10:09:45 UTC +--- content/renderer/render_thread_impl.cc.orig 2023-12-10 06:10:27 UTC +++ content/renderer/render_thread_impl.cc @@ -205,6 +205,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_BSD) +#include #else #include #endif -@@ -1016,7 +1018,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1020,7 +1022,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) && -@@ -1025,7 +1027,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1029,7 +1031,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) && -@@ -1799,7 +1801,7 @@ std::unique_ptr RenderThreadImpl::Create +@@ -1807,7 +1809,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 3ee3d4e38162..1fbd4bb47a68 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 2023-11-03 10:09:45 UTC +--- content/renderer/renderer_blink_platform_impl.cc.orig 2023-12-10 06:10:27 UTC +++ content/renderer/renderer_blink_platform_impl.cc @@ -113,7 +113,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 - -@@ -181,13 +181,13 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -182,13 +182,13 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( sudden_termination_disables_(0), is_locked_to_site_(false), main_thread_scheduler_(main_thread_scheduler) { -#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()); -@@ -196,7 +196,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -197,7 +197,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(); -@@ -254,7 +254,7 @@ void RendererBlinkPlatformImpl::SetThreadType(base::Pl +@@ -258,7 +258,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 024a22e32206..9de5a9f99f1c 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 2023-11-03 10:09:45 UTC +--- content/renderer/renderer_blink_platform_impl.h.orig 2023-12-10 06:10:27 UTC +++ content/renderer/renderer_blink_platform_impl.h -@@ -235,7 +235,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : publi +@@ -234,7 +234,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 3ad2fd09eb44..77e64df4d531 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 2023-11-03 10:09:45 UTC +--- content/shell/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ content/shell/BUILD.gn -@@ -1028,7 +1028,7 @@ group("content_shell_crash_test") { +@@ -1026,7 +1026,7 @@ group("content_shell_crash_test") { if (is_win) { data_deps += [ "//build/win:copy_cdb_to_output" ] } - if (is_posix) { + if (is_posix && !is_bsd) { data_deps += [ "//third_party/breakpad:dump_syms", "//third_party/breakpad:minidump_stackwalk", diff --git a/www/chromium/files/patch-content_shell_app_shell__main__delegate.cc b/www/chromium/files/patch-content_shell_app_shell__main__delegate.cc index 427733f2a5a6..fa4e2a937fc8 100644 --- a/www/chromium/files/patch-content_shell_app_shell__main__delegate.cc +++ b/www/chromium/files/patch-content_shell_app_shell__main__delegate.cc @@ -1,11 +1,11 @@ ---- content/shell/app/shell_main_delegate.cc.orig 2023-04-28 17:01:32 UTC +--- content/shell/app/shell_main_delegate.cc.orig 2023-12-10 06:10:27 UTC +++ content/shell/app/shell_main_delegate.cc -@@ -223,7 +223,7 @@ void ShellMainDelegate::PreSandboxStartup() { +@@ -227,7 +227,7 @@ void ShellMainDelegate::PreSandboxStartup() { // Reporting for sub-processes will be initialized in ZygoteForked. if (process_type != switches::kZygoteProcess) { crash_reporter::InitializeCrashpad(process_type.empty(), process_type); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) crash_reporter::SetFirstChanceExceptionHandler( v8::TryHandleWebAssemblyTrapPosix); #endif diff --git a/www/chromium/files/patch-content_test_BUILD.gn b/www/chromium/files/patch-content_test_BUILD.gn index 6bc8c31ea044..481b7c968c87 100644 --- a/www/chromium/files/patch-content_test_BUILD.gn +++ b/www/chromium/files/patch-content_test_BUILD.gn @@ -1,20 +1,20 @@ ---- content/test/BUILD.gn.orig 2023-11-03 10:09:45 UTC +--- content/test/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ content/test/BUILD.gn -@@ -2237,7 +2237,7 @@ static_library("run_all_unittests") { +@@ -2269,7 +2269,7 @@ static_library("run_all_unittests") { ":test_support", "//base/test:test_support", ] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { deps += [ "//content/common:set_process_title_linux" ] } } -@@ -3322,7 +3322,7 @@ test("content_unittests") { +@@ -3367,7 +3367,7 @@ test("content_unittests") { deps += [ "//third_party/boringssl" ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "../common/set_process_title_linux_unittest.cc" ] deps += [ "//content/common:set_process_title_linux" ] } diff --git a/www/chromium/files/patch-content_utility_services.cc b/www/chromium/files/patch-content_utility_services.cc index 52bcaa5e2084..2d63d01bcb49 100644 --- a/www/chromium/files/patch-content_utility_services.cc +++ b/www/chromium/files/patch-content_utility_services.cc @@ -1,81 +1,92 @@ ---- content/utility/services.cc.orig 2023-11-03 10:09:45 UTC +--- content/utility/services.cc.orig 2023-12-10 06:10:27 UTC +++ content/utility/services.cc @@ -67,7 +67,7 @@ extern sandbox::TargetServices* g_utility_target_services; #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "media/mojo/services/mojo_video_encode_accelerator_provider_factory.h" #include "sandbox/linux/services/libc_interceptor.h" #include "sandbox/policy/mojom/sandbox.mojom.h" @@ -90,7 +90,7 @@ extern sandbox::TargetServices* g_utility_target_servi #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) + #include "content/common/features.h" #include "media/mojo/services/stable_video_decoder_factory_process_service.h" // nogncheck - #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && -@@ -106,7 +106,7 @@ extern sandbox::TargetServices* g_utility_target_servi +@@ -107,7 +107,7 @@ extern sandbox::TargetServices* g_utility_target_servi #include "ui/accessibility/accessibility_features.h" #endif // BUILDFLAG(ENABLE_ACCESSIBILITY_SERVICE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "media/capture/capture_switches.h" #include "services/viz/public/cpp/gpu/gpu.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -@@ -223,7 +223,7 @@ auto RunAudio(mojo::PendingReceiver receiver) { auto service = std::make_unique( std::move(receiver), base::SingleThreadTaskRunner::GetCurrentDefault()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) { mojo::PendingRemote remote_gpu; content::UtilityThread::Get()->BindHostReceiver( -@@ -344,7 +344,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( +@@ -345,7 +345,7 @@ auto RunOOPArcVideoAcceleratorFactoryService( #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) auto RunStableVideoDecoderFactoryProcessService( mojo::PendingReceiver< -@@ -355,7 +355,7 @@ auto RunStableVideoDecoderFactoryProcessService( +@@ -356,7 +356,7 @@ auto RunStableVideoDecoderFactoryProcessService( #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) auto RunVideoEncodeAcceleratorProviderFactory( mojo::PendingReceiver receiver) { -@@ -418,13 +418,13 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -379,7 +379,7 @@ void RegisterIOThreadServices(mojo::ServiceFactory& se + // loop of type IO that can get notified when pipes have data. + services.Add(RunNetworkService); + +-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ + (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) + if (base::FeatureList::IsEnabled( + features::kRunStableVideoDecoderFactoryProcessServiceOnIOThread)) { +@@ -428,7 +428,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& #endif // BUILDFLAG(IS_CHROMEOS_ASH) && (BUILDFLAG(USE_VAAPI) || // BUILDFLAG(USE_V4L2_CODEC)) -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)) && \ (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) - services.Add(RunStableVideoDecoderFactoryProcessService); + if (!base::FeatureList::IsEnabled( + features::kRunStableVideoDecoderFactoryProcessServiceOnIOThread)) { +@@ -437,7 +437,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && // (BUILDFLAG(USE_VAAPI) || BUILDFLAG(USE_V4L2_CODEC)) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) services.Add(RunVideoEncodeAcceleratorProviderFactory); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/chromium/files/patch-content_utility_utility__main.cc b/www/chromium/files/patch-content_utility_utility__main.cc index eb2db6eaeb82..cb9c8858f68d 100644 --- a/www/chromium/files/patch-content_utility_utility__main.cc +++ b/www/chromium/files/patch-content_utility_utility__main.cc @@ -1,102 +1,112 @@ ---- content/utility/utility_main.cc.orig 2023-10-11 18:22:24 UTC +--- content/utility/utility_main.cc.orig 2023-12-10 06:10:27 UTC +++ content/utility/utility_main.cc -@@ -34,7 +34,7 @@ +@@ -37,7 +37,7 @@ #include "third_party/icu/source/common/unicode/unistr.h" #include "third_party/icu/source/i18n/unicode/timezone.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" -@@ -42,7 +42,9 @@ +@@ -46,7 +46,9 @@ #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 -@@ -54,10 +56,14 @@ +@@ -58,10 +60,14 @@ #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" +#endif + #if BUILDFLAG(IS_CHROMEOS_ASH) #include "chromeos/ash/components/assistant/buildflags.h" #include "chromeos/ash/services/ime/ime_sandbox_hook.h" -@@ -69,7 +75,7 @@ +@@ -73,7 +79,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 "components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h" // nogncheck #endif -@@ -95,7 +101,7 @@ namespace content { +@@ -99,7 +105,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( -@@ -123,7 +129,7 @@ std::vector GetNetworkContextsParentDirec +@@ -127,7 +133,7 @@ std::vector GetNetworkContextsParentDirec 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; -@@ -239,7 +245,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -248,7 +254,8 @@ int UtilityMain(MainFunctionParams parameters) { } } +-#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, +@@ -259,7 +266,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. -@@ -268,7 +274,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -288,7 +295,7 @@ int UtilityMain(MainFunctionParams parameters) { pre_sandbox_hook = base::BindOnce(&screen_ai::ScreenAIPreSandboxHook); 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); -@@ -295,6 +301,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -315,6 +322,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::policy::SandboxLinux::Options sandbox_options; -@@ -303,6 +310,11 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -323,6 +331,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_utility_utility__thread__impl.cc b/www/chromium/files/patch-content_utility_utility__thread__impl.cc new file mode 100644 index 000000000000..32c902cf300a --- /dev/null +++ b/www/chromium/files/patch-content_utility_utility__thread__impl.cc @@ -0,0 +1,21 @@ +--- content/utility/utility_thread_impl.cc.orig 2023-12-10 06:10:27 UTC ++++ content/utility/utility_thread_impl.cc +@@ -32,7 +32,7 @@ + #include "mojo/public/cpp/bindings/service_factory.h" + #include "third_party/abseil-cpp/absl/types/optional.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "content/child/sandboxed_process_thread_type_handler.h" + #endif + +@@ -252,7 +252,8 @@ void UtilityThreadImpl::Init() { + + GetContentClient()->utility()->UtilityThreadStarted(); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++// XXX BSD ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) + SandboxedProcessThreadTypeHandler::NotifyMainChildThreadCreated(); + #endif + diff --git a/www/chromium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc b/www/chromium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc index 713305f51ab3..857ae62066db 100644 --- a/www/chromium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc +++ b/www/chromium/files/patch-extensions_browser_api_api__browser__context__keyed__service__factories.cc @@ -1,11 +1,11 @@ ---- extensions/browser/api/api_browser_context_keyed_service_factories.cc.orig 2023-07-16 15:47:57 UTC +--- extensions/browser/api/api_browser_context_keyed_service_factories.cc.orig 2023-12-10 06:10:27 UTC +++ extensions/browser/api/api_browser_context_keyed_service_factories.cc -@@ -104,7 +104,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt - MessageService::GetFactoryInstance(); +@@ -107,7 +107,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt MessagingAPIMessageFilter::EnsureAssociatedFactoryBuilt(); + #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) NetworkingPrivateEventRouterFactory::GetInstance(); #endif OffscreenDocumentManager::GetFactory(); diff --git a/www/chromium/files/patch-extensions_browser_api_management_management__api.cc b/www/chromium/files/patch-extensions_browser_api_management_management__api.cc new file mode 100644 index 000000000000..71e280ab976a --- /dev/null +++ b/www/chromium/files/patch-extensions_browser_api_management_management__api.cc @@ -0,0 +1,11 @@ +--- extensions/browser/api/management/management_api.cc.orig 2023-12-10 06:10:27 UTC ++++ extensions/browser/api/management/management_api.cc +@@ -278,7 +278,7 @@ bool PlatformSupportsApprovalFlowForExtensions() { + #if BUILDFLAG(IS_CHROMEOS) + // ChromeOS devices have this feature already shipped. + return true; +-#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + return base::FeatureList::IsEnabled( + supervised_user::kEnableExtensionsPermissionsForSupervisedUsersOnDesktop); + #else diff --git a/www/chromium/files/patch-extensions_browser_api_messaging_message__service.cc b/www/chromium/files/patch-extensions_browser_api_messaging_message__service.cc index 73da58b18fd3..7e54f1b396a9 100644 --- a/www/chromium/files/patch-extensions_browser_api_messaging_message__service.cc +++ b/www/chromium/files/patch-extensions_browser_api_messaging_message__service.cc @@ -1,20 +1,20 @@ ---- extensions/browser/api/messaging/message_service.cc.orig 2023-09-13 12:11:42 UTC +--- extensions/browser/api/messaging/message_service.cc.orig 2023-12-10 06:10:27 UTC +++ extensions/browser/api/messaging/message_service.cc -@@ -71,7 +71,7 @@ namespace { +@@ -70,7 +70,7 @@ namespace { const char kReceivingEndDoesntExistError[] = "Could not establish connection. Receiving end does not exist."; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kMissingPermissionError[] = "Access to native messaging requires nativeMessaging permission."; const char kProhibitedByPoliciesError[] = -@@ -486,7 +486,7 @@ void MessageService::OpenChannelToNativeApp( +@@ -541,7 +541,7 @@ void MessageService::OpenChannelToNativeAppImpl( return; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool has_permission = extension->permissions_data()->HasAPIPermission( mojom::APIPermissionID::kNativeMessaging); if (!has_permission) { diff --git a/www/chromium/files/patch-extensions_common_api___permission__features.json b/www/chromium/files/patch-extensions_common_api___permission__features.json index 1e286d6e747c..bfa6bbeb35e9 100644 --- a/www/chromium/files/patch-extensions_common_api___permission__features.json +++ b/www/chromium/files/patch-extensions_common_api___permission__features.json @@ -1,29 +1,29 @@ ---- extensions/common/api/_permission_features.json.orig 2023-07-16 15:47:57 UTC +--- extensions/common/api/_permission_features.json.orig 2023-12-10 06:10:27 UTC +++ extensions/common/api/_permission_features.json @@ -138,7 +138,7 @@ { "channel": "stable", "extension_types": ["platform_app"], - "platforms": ["chromeos", "lacros", "win", "mac", "linux"], + "platforms": ["chromeos", "lacros", "win", "mac", "linux", "openbsd", "freebsd"], "allowlist": [ "1C93BD3CF875F4A73C0B2A163BB8FBDA8B8B3D80", // http://crbug.com/387169 "A3BC37E2148AC4E99BE4B16AF9D42DD1E592BBBE", // http://crbug.com/387169 @@ -432,7 +432,7 @@ }, { "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"], - "platforms": ["chromeos", "mac", "win", "linux", "fuchsia"], + "platforms": ["chromeos", "mac", "win", "linux", "fuchsia", "openbsd", "freebsd"], "allowlist": [ "0DE0F05680A4A056BCEC864ED8DDA84296F82B40", // http://crbug.com/434651 "1C93BD3CF875F4A73C0B2A163BB8FBDA8B8B3D80", // http://crbug.com/293683 -@@ -474,7 +474,7 @@ +@@ -476,7 +476,7 @@ "networkingPrivate": { "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"], - "platforms": ["chromeos", "lacros", "mac", "win", "linux", "fuchsia"], + "platforms": ["chromeos", "lacros", "mac", "win", "linux", "fuchsia", "openbsd", "freebsd"], "allowlist": [ // DO NOT ADD ANY MORE ENTRIES HERE. // networkingPrivate is being migrated to networking.onc. diff --git a/www/chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc b/www/chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc index 143b470cc18e..872e983726b3 100644 --- a/www/chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc +++ b/www/chromium/files/patch-gpu_command__buffer_service_dawn__context__provider.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/dawn_context_provider.cc.orig 2023-11-03 10:09:45 UTC +--- gpu/command_buffer/service/dawn_context_provider.cc.orig 2023-12-10 06:10:27 UTC +++ gpu/command_buffer/service/dawn_context_provider.cc -@@ -151,7 +151,7 @@ wgpu::BackendType DawnContextProvider::GetDefaultBacke +@@ -178,7 +178,7 @@ wgpu::BackendType DawnContextProvider::GetDefaultBacke return base::FeatureList::IsEnabled(features::kSkiaGraphiteDawnUseD3D12) ? wgpu::BackendType::D3D12 : wgpu::BackendType::D3D11; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return wgpu::BackendType::Vulkan; #elif BUILDFLAG(IS_APPLE) return wgpu::BackendType::Metal; diff --git a/www/chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc b/www/chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc index 0eef43b4fedd..6166cb1bf916 100644 --- a/www/chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc +++ b/www/chromium/files/patch-gpu_command__buffer_service_gles2__cmd__decoder.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2023-11-03 10:09:45 UTC +--- gpu/command_buffer/service/gles2_cmd_decoder.cc.orig 2023-12-10 06:10:27 UTC +++ gpu/command_buffer/service/gles2_cmd_decoder.cc -@@ -2986,7 +2986,7 @@ GLES2Decoder* GLES2Decoder::Create( +@@ -2999,7 +2999,7 @@ GLES2Decoder* GLES2Decoder::Create( } // Allow linux to run fuzzers. -#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return new GLES2DecoderImpl(client, command_buffer_service, outputter, group); #else LOG(FATAL) << "Validating command decoder is not supported."; diff --git a/www/chromium/files/patch-gpu_command__buffer_service_shared__context__state.cc b/www/chromium/files/patch-gpu_command__buffer_service_shared__context__state.cc deleted file mode 100644 index f735975955f4..000000000000 --- a/www/chromium/files/patch-gpu_command__buffer_service_shared__context__state.cc +++ /dev/null @@ -1,32 +0,0 @@ ---- gpu/command_buffer/service/shared_context_state.cc.orig 2023-11-03 10:09:45 UTC -+++ gpu/command_buffer/service/shared_context_state.cc -@@ -4,6 +4,7 @@ - - #include "gpu/command_buffer/service/shared_context_state.h" - -+#include "base/immediate_crash.h" - #include "base/observer_list.h" - #include "base/strings/stringprintf.h" - #include "base/system/sys_info.h" -@@ -101,6 +102,13 @@ void SharedContextState::compileError(const char* shad - << "------------------------\n" - << shader << "\nErrors:\n" - << errors; -+ -+ // Increase shader cache shm count and crash the GPU process so that the -+ // browser process would clear the cache. -+ GpuProcessShmCount::ScopedIncrement increment( -+ use_shader_cache_shm_count_.get()); -+ -+ base::ImmediateCrash(); - } - } - -@@ -305,6 +313,7 @@ bool SharedContextState::InitializeGanesh( - gl::ProgressReporter* progress_reporter) { - progress_reporter_ = progress_reporter; - gr_shader_cache_ = cache; -+ use_shader_cache_shm_count_ = use_shader_cache_shm_count; - - size_t max_resource_cache_bytes; - size_t glyph_cache_max_texture_bytes; diff --git a/www/chromium/files/patch-gpu_command__buffer_service_shared__context__state.h b/www/chromium/files/patch-gpu_command__buffer_service_shared__context__state.h deleted file mode 100644 index a69b6bcaa0b2..000000000000 --- a/www/chromium/files/patch-gpu_command__buffer_service_shared__context__state.h +++ /dev/null @@ -1,11 +0,0 @@ ---- gpu/command_buffer/service/shared_context_state.h.orig 2023-11-03 10:09:45 UTC -+++ gpu/command_buffer/service/shared_context_state.h -@@ -392,6 +392,8 @@ class GPU_GLES2_EXPORT SharedContextState - std::vector scratch_deserialization_buffer_; - raw_ptr gr_shader_cache_ = - nullptr; -+ raw_ptr use_shader_cache_shm_count_ = -+ nullptr; - - // |need_context_state_reset| is set whenever Skia may have altered the - // driver's GL state. diff --git a/www/chromium/files/patch-gpu_command__buffer_service_shared__image_ozone__image__gl__textures__holder.h b/www/chromium/files/patch-gpu_command__buffer_service_shared__image_ozone__image__gl__textures__holder.h new file mode 100644 index 000000000000..20ddeae1a669 --- /dev/null +++ b/www/chromium/files/patch-gpu_command__buffer_service_shared__image_ozone__image__gl__textures__holder.h @@ -0,0 +1,10 @@ +--- gpu/command_buffer/service/shared_image/ozone_image_gl_textures_holder.h.orig 2023-12-10 06:10:27 UTC ++++ gpu/command_buffer/service/shared_image/ozone_image_gl_textures_holder.h +@@ -6,6 +6,7 @@ + #define GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_OZONE_IMAGE_GL_TEXTURES_HOLDER_H_ + + #include ++#include + + #include "base/memory/raw_ptr.h" + #include "base/memory/ref_counted.h" 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 a77208ed0c9a..b6874141c477 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 2023-11-03 10:09:45 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2023-12-10 06:10:27 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1193,7 +1193,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( +@@ -1252,7 +1252,7 @@ void WebGPUDecoderImpl::RequestAdapterImpl( force_fallback_adapter = true; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!shared_context_state_->GrContextIsVulkan() && !shared_context_state_->IsGraphiteDawnVulkan() && use_webgpu_adapter_ != WebGPUAdapterName::kOpenGLES) { -@@ -1848,7 +1848,7 @@ WebGPUDecoderImpl::AssociateMailboxDawn( +@@ -1879,7 +1879,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_ipc_service_gpu__init.cc b/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc index 69362a371cca..8c62f5796438 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 2023-11-03 10:09:45 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2023-12-10 06:10:27 UTC +++ gpu/ipc/service/gpu_init.cc @@ -357,7 +357,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 @@ -394,7 +394,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. -@@ -451,7 +451,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - } +@@ -491,7 +491,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 -@@ -533,7 +533,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -573,7 +573,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; -@@ -686,7 +686,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -726,7 +726,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. -@@ -741,7 +741,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -781,7 +781,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 -@@ -895,7 +895,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -935,7 +935,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 -@@ -965,7 +965,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -1005,7 +1005,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__util.cc b/www/chromium/files/patch-gpu_vulkan_vulkan__util.cc index f7640c1af4a7..192c521820fe 100644 --- a/www/chromium/files/patch-gpu_vulkan_vulkan__util.cc +++ b/www/chromium/files/patch-gpu_vulkan_vulkan__util.cc @@ -1,11 +1,11 @@ ---- gpu/vulkan/vulkan_util.cc.orig 2023-08-17 07:33:31 UTC +--- gpu/vulkan/vulkan_util.cc.orig 2023-12-10 06:10:27 UTC +++ gpu/vulkan/vulkan_util.cc -@@ -343,7 +343,7 @@ bool CheckVulkanCompabilities(const VulkanInfo& vulkan +@@ -433,7 +433,7 @@ bool CheckVulkanCompabilities(const VulkanInfo& vulkan } } -#if BUILDFLAG(IS_LINUX) && !defined(OZONE_PLATFORM_IS_X11) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !defined(OZONE_PLATFORM_IS_X11) // Vulkan is only supported with X11 on Linux for now. return false; #else 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 5cf3c5f96c59..a42c701df4bf 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 2023-09-13 12:11:42 UTC +--- headless/lib/headless_content_main_delegate.cc.orig 2023-12-10 06:10:27 UTC +++ headless/lib/headless_content_main_delegate.cc -@@ -344,7 +344,7 @@ void HeadlessContentMainDelegate::InitCrashReporter( +@@ -362,7 +362,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_BUILD.gn b/www/chromium/files/patch-media_BUILD.gn index b6dcf15b49c2..0fa3e974884b 100644 --- a/www/chromium/files/patch-media_BUILD.gn +++ b/www/chromium/files/patch-media_BUILD.gn @@ -1,12 +1,12 @@ ---- media/BUILD.gn.orig 2023-09-13 12:11:42 UTC +--- media/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ media/BUILD.gn -@@ -94,6 +94,9 @@ config("media_config") { +@@ -95,6 +95,9 @@ config("media_config") { defines += [ "DLOPEN_PULSEAUDIO" ] } } + if (use_sndio) { + defines += [ "USE_SNDIO" ] + } if (use_cras) { defines += [ "USE_CRAS" ] } diff --git a/www/chromium/files/patch-media_base_media__switches.cc b/www/chromium/files/patch-media_base_media__switches.cc index 311409cdefd3..be2a09e492f1 100644 --- a/www/chromium/files/patch-media_base_media__switches.cc +++ b/www/chromium/files/patch-media_base_media__switches.cc @@ -1,65 +1,65 @@ ---- media/base/media_switches.cc.orig 2023-11-16 20:38:16 UTC +--- media/base/media_switches.cc.orig 2023-12-10 06:10:27 UTC +++ media/base/media_switches.cc @@ -17,7 +17,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 -@@ -698,7 +698,7 @@ BASE_FEATURE(kFallbackAfterDecodeError, +@@ -702,7 +702,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 -@@ -721,7 +721,7 @@ BASE_FEATURE(kGlobalMediaControlsCrOSUpdatedUI, +@@ -725,7 +725,7 @@ BASE_FEATURE(kGlobalMediaControlsCrOSUpdatedUI, // 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 -@@ -733,7 +733,7 @@ BASE_FEATURE(kMediaRemotingWithoutFullscreen, +@@ -737,7 +737,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 -@@ -777,7 +777,7 @@ BASE_FEATURE(kUnifiedAutoplay, +@@ -776,7 +776,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, -@@ -861,7 +861,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, +@@ -856,7 +856,7 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding, "VaapiVp9SModeHWEncoding", base::FEATURE_DISABLED_BY_DEFAULT); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Enables the new V4L2StatefulVideoDecoder instead of V4L2VideoDecoder. BASE_FEATURE(kV4L2FlatStatelessVideoDecoder, "V4L2FlatStatelessVideoDecoder", -@@ -1396,7 +1396,7 @@ const base::Feature MEDIA_EXPORT kUseOutOfProcessVideo +@@ -1384,7 +1384,7 @@ const base::Feature MEDIA_EXPORT kUseOutOfProcessVideo }; #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. const base::Feature MEDIA_EXPORT kUseOutOfProcessVideoEncoding{ diff --git a/www/chromium/files/patch-media_base_media__switches.h b/www/chromium/files/patch-media_base_media__switches.h index e9961dd33d9f..49b57c0bdc90 100644 --- a/www/chromium/files/patch-media_base_media__switches.h +++ b/www/chromium/files/patch-media_base_media__switches.h @@ -1,29 +1,29 @@ ---- media/base/media_switches.h.orig 2023-11-08 17:48:01 UTC +--- media/base/media_switches.h.orig 2023-12-10 06:10:27 UTC +++ media/base/media_switches.h -@@ -320,7 +320,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseElementInsteadOf +@@ -322,7 +322,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseDecoderStreamFor + MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseElementInsteadOfRegionCapture); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseFakeDeviceForMediaStream); MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseMediaHistoryStore); - MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseR16Texture); -#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); -@@ -339,7 +339,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLay - MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9kSVCHWEncoding); +@@ -340,7 +340,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLa + MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLayerHWEncoding); MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9SModeHWEncoding); #endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatelessVideoDecoder); MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder); #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -@@ -459,7 +459,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kExposeOutOfProcessV +@@ -461,7 +461,7 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kExposeOutOfProcessV MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoDecoding); #endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) MEDIA_EXPORT BASE_DECLARE_FEATURE(kUseOutOfProcessVideoEncoding); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/chromium/files/patch-media_capture_video_video__capture__buffer__tracker__factory__impl.cc b/www/chromium/files/patch-media_capture_video_video__capture__buffer__tracker__factory__impl.cc index 1d0267861d44..2d5b9a94cab7 100644 --- a/www/chromium/files/patch-media_capture_video_video__capture__buffer__tracker__factory__impl.cc +++ b/www/chromium/files/patch-media_capture_video_video__capture__buffer__tracker__factory__impl.cc @@ -1,20 +1,20 @@ ---- media/capture/video/video_capture_buffer_tracker_factory_impl.cc.orig 2023-09-13 12:11:42 UTC +--- media/capture/video/video_capture_buffer_tracker_factory_impl.cc.orig 2023-12-10 06:10:27 UTC +++ media/capture/video/video_capture_buffer_tracker_factory_impl.cc @@ -14,7 +14,7 @@ #include "media/capture/video/chromeos/gpu_memory_buffer_tracker_cros.h" #elif BUILDFLAG(IS_APPLE) #include "media/capture/video/apple/gpu_memory_buffer_tracker_apple.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "media/capture/video/linux/v4l2_gpu_memory_buffer_tracker.h" #elif BUILDFLAG(IS_WIN) - #include "media/capture/video/shared_memory_buffer_tracker.h" -@@ -43,7 +43,7 @@ VideoCaptureBufferTrackerFactoryImpl::CreateTracker( + #include "media/capture/video/win/gpu_memory_buffer_tracker_win.h" +@@ -42,7 +42,7 @@ VideoCaptureBufferTrackerFactoryImpl::CreateTracker( return std::make_unique(); #elif BUILDFLAG(IS_APPLE) return std::make_unique(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return std::make_unique(); #elif BUILDFLAG(IS_WIN) if (!dxgi_device_manager_) { diff --git a/www/chromium/files/patch-media_capture_video_video__capture__device__client.cc b/www/chromium/files/patch-media_capture_video_video__capture__device__client.cc index 7209171cf29b..64b0f621c90e 100644 --- a/www/chromium/files/patch-media_capture_video_video__capture__device__client.cc +++ b/www/chromium/files/patch-media_capture_video_video__capture__device__client.cc @@ -1,11 +1,11 @@ ---- media/capture/video/video_capture_device_client.cc.orig 2023-07-16 15:47:57 UTC +--- media/capture/video/video_capture_device_client.cc.orig 2023-12-10 06:10:27 UTC +++ media/capture/video/video_capture_device_client.cc -@@ -149,7 +149,7 @@ FourccAndFlip GetFourccAndFlipFromPixelFormat( +@@ -150,7 +150,7 @@ FourccAndFlip GetFourccAndFlipFromPixelFormat( CHECK(!is_width_odd && !is_height_odd); return {libyuv::FOURCC_UYVY}; case media::PIXEL_FORMAT_RGB24: - if constexpr (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) { + if constexpr (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) { // Linux RGB24 defines red at lowest byte address, // see http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html. return {libyuv::FOURCC_RAW}; 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 6b35df679a06..ffcf57302a23 100644 --- a/www/chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc +++ b/www/chromium/files/patch-media_gpu_chromeos_video__decoder__pipeline.cc @@ -1,28 +1,28 @@ ---- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2023-11-08 17:48:01 UTC +--- media/gpu/chromeos/video_decoder_pipeline.cc.orig 2023-12-10 06:10:27 UTC +++ media/gpu/chromeos/video_decoder_pipeline.cc -@@ -1033,14 +1033,14 @@ VideoDecoderPipeline::PickDecoderOutputFormat( - } +@@ -1048,14 +1048,14 @@ VideoDecoderPipeline::PickDecoderOutputFormat( } + #endif -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_VAAPI) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_VAAPI) // Linux should always use a custom allocator (to allocate buffers using // libva) and a PlatformVideoFramePool. CHECK(allocator.has_value()); CHECK(main_frame_pool_->AsPlatformVideoFramePool()); main_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator( *allocator); -#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 -@@ -1177,7 +1177,7 @@ VideoDecoderPipeline::PickDecoderOutputFormat( +@@ -1192,7 +1192,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) auxiliary_frame_pool_->AsPlatformVideoFramePool()->SetCustomFrameAllocator( *allocator); #endif diff --git a/www/chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc b/www/chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc index c582f04cd111..eb100cdeebbc 100644 --- a/www/chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc +++ b/www/chromium/files/patch-media_gpu_vaapi_vaapi__video__decoder.cc @@ -1,11 +1,11 @@ ---- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2023-08-17 07:33:31 UTC +--- media/gpu/vaapi/vaapi_video_decoder.cc.orig 2023-12-10 06:10:27 UTC +++ media/gpu/vaapi/vaapi_video_decoder.cc -@@ -779,7 +779,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree +@@ -776,7 +776,7 @@ void VaapiVideoDecoder::ApplyResolutionChangeWithScree const gfx::Size decoder_natural_size = aspect_ratio_.GetNaturalSize(decoder_visible_rect); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) absl::optional allocator = base::BindRepeating(&AllocateCustomFrameProxy, weak_this_); std::vector candidates = { diff --git a/www/chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc b/www/chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc index 3368487e9b00..52a4bf483f9d 100644 --- a/www/chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc +++ b/www/chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc @@ -1,47 +1,47 @@ ---- media/gpu/vaapi/vaapi_wrapper.cc.orig 2023-11-03 10:09:45 UTC +--- media/gpu/vaapi/vaapi_wrapper.cc.orig 2023-12-10 06:10:27 UTC +++ media/gpu/vaapi/vaapi_wrapper.cc -@@ -82,7 +82,7 @@ extern "C" { +@@ -71,7 +71,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 -@@ -1506,7 +1506,7 @@ bool IsVBREncodingSupported(VAProfile va_profile) { +@@ -1445,7 +1445,7 @@ bool IsVBREncodingSupported(VAProfile va_profile) { return VASupportedProfiles::Get().IsProfileSupported(mode, va_profile); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Some VA-API drivers (vdpau-va-driver) will crash if used with VA/DRM on // NVIDIA GPUs. This function checks if such drivers are present. bool IsBrokenNvidiaVaapiDriverPresent() { -@@ -1567,7 +1567,7 @@ void VADisplayStateSingleton::PreSandboxInitialization +@@ -1506,7 +1506,7 @@ void VADisplayStateSingleton::PreSandboxInitialization VADisplayStateSingleton& va_display_state = GetInstance(); base::AutoLock lock(va_display_state.lock_); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) std::string va_driver_name; auto env = base::Environment::Create(); if (env->GetVar("LIBVA_DRIVER_NAME", &va_driver_name) && -@@ -1604,7 +1604,7 @@ void VADisplayStateSingleton::PreSandboxInitialization +@@ -1543,7 +1543,7 @@ void VADisplayStateSingleton::PreSandboxInitialization if (base::EqualsCaseInsensitiveASCII(version_name, "vgem")) { continue; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Skip NVIDIA GPUs if the VA-API driver used for them is known for crashing // with VA/DRM. if (is_nvidia_va_drm_broken && -@@ -1637,7 +1637,7 @@ VADisplayStateHandle VADisplayStateSingleton::GetHandl +@@ -1576,7 +1576,7 @@ VADisplayStateHandle VADisplayStateSingleton::GetHandl return {}; } -#if BUILDFLAG(IS_OZONE) && BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_OZONE) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) // TODO(crbug.com/1116701): add vaapi support for other Ozone platforms on // Linux. See comment in OzonePlatform::PlatformProperties::supports_vaapi // for more details. This will also require revisiting everything that's diff --git a/www/chromium/files/patch-media_media__options.gni b/www/chromium/files/patch-media_media__options.gni index d879f03dd5be..abb415e7910a 100644 --- a/www/chromium/files/patch-media_media__options.gni +++ b/www/chromium/files/patch-media_media__options.gni @@ -1,30 +1,30 @@ ---- media/media_options.gni.orig 2023-10-11 18:22:24 UTC +--- media/media_options.gni.orig 2023-12-10 06:10:27 UTC +++ media/media_options.gni -@@ -181,12 +181,15 @@ declare_args() { +@@ -187,12 +187,15 @@ declare_args() { # Enables runtime selection of ALSA library for audio. use_alsa = false + # Enable runtime selection of sndio(7) + use_sndio = false + # Alsa should be used on all non-Android, non-Mac POSIX systems - with the # exception of CastOS desktop builds. # # TODO(crbug.com/1336055): Remove legacy target_cpu hack used for targeting # desktop Chromecast builds. - if (is_posix && !is_android && !is_apple && + if (is_posix && !is_android && !is_apple && !is_bsd && (!is_castos || (target_cpu == "x86" || target_cpu == "x64") || is_cast_audio_only)) { use_alsa = true -@@ -202,6 +205,10 @@ declare_args() { +@@ -208,6 +211,10 @@ declare_args() { if (!use_cras && !is_castos && !is_asan && !is_tsan) { use_pulseaudio = true } + } + if (is_openbsd) { + use_sndio = true + use_pulseaudio = false } } 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 aa06e41e7a96..c80ddf35b596 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 2023-11-03 10:09:45 UTC +--- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2023-12-10 06:10:27 UTC +++ media/video/gpu_memory_buffer_video_frame_pool.cc -@@ -773,7 +773,7 @@ void GpuMemoryBufferVideoFramePool::PoolImpl::CreateHa +@@ -774,7 +774,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 -@@ -1223,7 +1223,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1224,7 +1224,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo } #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) is_webgpu_compatible = (gpu_memory_buffer != nullptr); if (is_webgpu_compatible) { is_webgpu_compatible &= -@@ -1242,7 +1242,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo +@@ -1243,7 +1243,7 @@ scoped_refptr GpuMemoryBufferVideoFramePoo gpu::SHARED_IMAGE_USAGE_DISPLAY_READ | gpu::SHARED_IMAGE_USAGE_SCANOUT; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1241537): Always add the flag once the // OzoneImageBacking is by default turned on. if (base::CommandLine::ForCurrentProcess()->HasSwitch( diff --git a/www/chromium/files/patch-media_video_video__encode__accelerator__adapter.cc b/www/chromium/files/patch-media_video_video__encode__accelerator__adapter.cc index 4f6b35fd42eb..e3690dee0ae5 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 2023-09-13 12:11:42 UTC +--- media/video/video_encode_accelerator_adapter.cc.orig 2023-12-10 06:10:27 UTC +++ media/video/video_encode_accelerator_adapter.cc -@@ -140,7 +140,7 @@ VideoEncodeAccelerator::Config SetUpVeaConfig( +@@ -153,7 +153,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 -@@ -465,7 +465,7 @@ void VideoEncodeAcceleratorAdapter::InitializeInternal +@@ -478,7 +478,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-mojo_public_tools_bindings_mojom.gni b/www/chromium/files/patch-mojo_public_tools_bindings_mojom.gni index dfa34bc3e864..9548cd2f2b20 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 2023-09-13 12:11:42 UTC +--- mojo/public/tools/bindings/mojom.gni.orig 2023-12-10 06:10:27 UTC +++ mojo/public/tools/bindings/mojom.gni -@@ -743,6 +743,16 @@ template("mojom") { +@@ -758,6 +758,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 custom_processor = "mojom_parser" diff --git a/www/chromium/files/patch-net_BUILD.gn b/www/chromium/files/patch-net_BUILD.gn index 7c434d8d5f21..757b4911d253 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 2023-11-03 10:09:45 UTC +--- net/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ net/BUILD.gn @@ -122,7 +122,7 @@ net_configs = [ "//build/config/compiler:wexit_time_destructors", ] -if (is_linux || is_chromeos) { +if ((is_linux || is_chromeos) && !is_bsd) { net_configs += [ "//build/config/linux:libresolv" ] } -@@ -1242,6 +1242,19 @@ component("net") { - deps += [ "//third_party/xdg_shared_mime_info" ] +@@ -1240,6 +1240,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", -@@ -1398,7 +1411,7 @@ component("net") { +@@ -1396,7 +1409,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", -@@ -2891,7 +2904,7 @@ test("net_unittests") { +@@ -2886,7 +2899,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", -@@ -2963,6 +2976,10 @@ test("net_unittests") { - "//url:buildflags", - ] +@@ -2974,6 +2987,10 @@ test("net_unittests") { + ] + } + if (is_bsd) { + deps += [ "//sandbox/policy" ] + } + if (enable_websockets) { deps += [ "//net/server:tests" ] } @@ -3044,7 +3061,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "tools/quic/quic_simple_server_test.cc" ] } @@ -3179,7 +3196,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 4c23ccf699c5..3bf0406bb5ba 100644 --- a/www/chromium/files/patch-net_base_features.cc +++ b/www/chromium/files/patch-net_base_features.cc @@ -1,11 +1,15 @@ ---- net/base/features.cc.orig 2023-11-03 10:09:45 UTC +--- net/base/features.cc.orig 2023-12-10 06:10:27 UTC +++ net/base/features.cc -@@ -169,7 +169,7 @@ BASE_FEATURE(kSameSiteDefaultChecksMethodRigorously, - #if BUILDFLAG(CHROME_ROOT_STORE_OPTIONAL) - BASE_FEATURE(kChromeRootStoreUsed, - "ChromeRootStoreUsed", --#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) -+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT - #else - base::FEATURE_DISABLED_BY_DEFAULT +@@ -468,7 +468,12 @@ BASE_FEATURE(kSpdyHeadersToHttpResponseUseBuilder, + "SpdyHeadersToHttpResponseUseBuilder", + base::FEATURE_DISABLED_BY_DEFAULT); + ++#if BUILDFLAG(IS_OPENBSD) ++// No IP_RECVTOS support + BASE_FEATURE(kReceiveEcn, "ReceiveEcn", base::FEATURE_DISABLED_BY_DEFAULT); ++#else ++BASE_FEATURE(kReceiveEcn, "ReceiveEcn", base::FEATURE_DISABLED_BY_DEFAULT); ++#endif + + // TODO(crbug.com/634470): Remove this feature flag in January 2024 if the new + // limit sticks. diff --git a/www/chromium/files/patch-net_cert_cert__verifier.cc b/www/chromium/files/patch-net_cert_cert__verifier.cc deleted file mode 100644 index fdff52e2134d..000000000000 --- a/www/chromium/files/patch-net_cert_cert__verifier.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- net/cert/cert_verifier.cc.orig 2023-05-31 08:12:17 UTC -+++ net/cert/cert_verifier.cc -@@ -40,7 +40,7 @@ class DefaultCertVerifyProcFactory : public net::CertV - return CertVerifyProc::CreateBuiltinWithChromeRootStore( - std::move(cert_net_fetcher), impl_params.crl_set, - base::OptionalToPtr(impl_params.root_store_data)); --#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - return CertVerifyProc::CreateBuiltinVerifyProc(std::move(cert_net_fetcher), - impl_params.crl_set); - #else diff --git a/www/chromium/files/patch-net_cert_cert__verify__proc.cc b/www/chromium/files/patch-net_cert_cert__verify__proc.cc deleted file mode 100644 index d4ee27dbeed9..000000000000 --- a/www/chromium/files/patch-net_cert_cert__verify__proc.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- net/cert/cert_verify_proc.cc.orig 2023-05-31 08:12:17 UTC -+++ net/cert/cert_verify_proc.cc -@@ -409,7 +409,7 @@ base::Value::Dict CertVerifyParams( - - } // namespace - --#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)) - // static - scoped_refptr CertVerifyProc::CreateSystemVerifyProc( diff --git a/www/chromium/files/patch-net_cert_cert__verify__proc__unittest.cc b/www/chromium/files/patch-net_cert_cert__verify__proc__unittest.cc deleted file mode 100644 index fa6683fbabcc..000000000000 --- a/www/chromium/files/patch-net_cert_cert__verify__proc__unittest.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- net/cert/cert_verify_proc_unittest.cc.orig 2023-11-03 10:09:45 UTC -+++ net/cert/cert_verify_proc_unittest.cc -@@ -213,7 +213,7 @@ scoped_refptr CreateCertVerifyProc( - case CERT_VERIFY_PROC_IOS: - return base::MakeRefCounted(std::move(crl_set)); - #endif --#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - case CERT_VERIFY_PROC_BUILTIN: - return CreateCertVerifyProcBuiltin(std::move(cert_net_fetcher), - std::move(crl_set), -@@ -242,7 +242,7 @@ constexpr CertVerifyProcType kAllCertVerifiers[] = { - CERT_VERIFY_PROC_ANDROID, - #elif BUILDFLAG(IS_IOS) - CERT_VERIFY_PROC_IOS, --#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - CERT_VERIFY_PROC_BUILTIN, - #endif - #if BUILDFLAG(CHROME_ROOT_STORE_SUPPORTED) diff --git a/www/chromium/files/patch-net_cert_test__root__certs__unittest.cc b/www/chromium/files/patch-net_cert_test__root__certs__unittest.cc deleted file mode 100644 index f5ffb4432e52..000000000000 --- a/www/chromium/files/patch-net_cert_test__root__certs__unittest.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- net/cert/test_root_certs_unittest.cc.orig 2023-05-31 08:12:17 UTC -+++ net/cert/test_root_certs_unittest.cc -@@ -46,7 +46,7 @@ scoped_refptr CreateCertVerifyProc() { - return CertVerifyProc::CreateBuiltinWithChromeRootStore( - /*cert_net_fetcher=*/nullptr, CRLSet::BuiltinCRLSet().get(), - /*root_store_data=*/nullptr); --#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - return CertVerifyProc::CreateBuiltinVerifyProc(/*cert_net_fetcher=*/nullptr, - CRLSet::BuiltinCRLSet().get()); - #else 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 0a8e66603d32..0231a9d21209 100644 --- a/www/chromium/files/patch-net_socket_udp__socket__posix.cc +++ b/www/chromium/files/patch-net_socket_udp__socket__posix.cc @@ -1,29 +1,39 @@ ---- net/socket/udp_socket_posix.cc.orig 2023-07-16 15:47:57 UTC +--- net/socket/udp_socket_posix.cc.orig 2023-12-10 06:10:27 UTC +++ net/socket/udp_socket_posix.cc -@@ -591,7 +591,7 @@ int UDPSocketPosix::SetDoNotFragment() { +@@ -612,12 +612,17 @@ int UDPSocketPosix::SetRecvEcn() { + } + } + ++#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 { -@@ -612,7 +612,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { +@@ -638,7 +643,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. -@@ -925,7 +925,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) +@@ -951,7 +956,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 6574699fc1ac..8a9470c80cf5 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,38 +1,29 @@ ---- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2023-05-31 08:12:17 UTC +--- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2023-12-10 06:10:27 UTC +++ net/tools/cert_verify_tool/cert_verify_tool.cc @@ -31,7 +31,7 @@ #include "net/url_request/url_request_context_builder.h" #include "net/url_request/url_request_context_getter.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 -@@ -61,7 +61,7 @@ void SetUpOnNetworkThread( +@@ -63,7 +63,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. // -@@ -223,7 +223,7 @@ std::unique_ptr CreateCertVerifyImplFr - scoped_refptr cert_net_fetcher, - scoped_refptr crl_set, - RootStoreType root_store_type) { --#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)) - if (impl_name == "platform") { - if (root_store_type != RootStoreType::kSystem) { -@@ -537,7 +537,7 @@ int main(int argc, char** argv) { +@@ -545,7 +545,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-printing_printing__context__linux.cc b/www/chromium/files/patch-printing_printing__context__linux.cc index b6d023b96e0e..98abb1c7e22d 100644 --- a/www/chromium/files/patch-printing_printing__context__linux.cc +++ b/www/chromium/files/patch-printing_printing__context__linux.cc @@ -1,38 +1,38 @@ ---- printing/printing_context_linux.cc.orig 2023-10-11 18:22:24 UTC +--- printing/printing_context_linux.cc.orig 2023-12-10 06:10:27 UTC +++ printing/printing_context_linux.cc @@ -23,7 +23,7 @@ #endif // Avoid using LinuxUi on Fuchsia. -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/linux/linux_ui.h" #endif -@@ -72,7 +72,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett +@@ -68,7 +68,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett ResetSettings(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!ui::LinuxUi::instance()) return mojom::ResultCode::kSuccess; -@@ -88,7 +88,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett +@@ -84,7 +84,7 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSett } gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (ui::LinuxUi::instance()) return ui::LinuxUi::instance()->GetPdfPaperSize(this); #endif -@@ -101,7 +101,7 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterS +@@ -97,7 +97,7 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterS DCHECK(!printer_settings.show_system_dialog); DCHECK(!in_print_job_); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (!ui::LinuxUi::instance()) return mojom::ResultCode::kSuccess; diff --git a/www/chromium/files/patch-remoting_host_heartbeat__sender.cc b/www/chromium/files/patch-remoting_host_heartbeat__sender.cc deleted file mode 100644 index ca738a53cb76..000000000000 --- a/www/chromium/files/patch-remoting_host_heartbeat__sender.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- remoting/host/heartbeat_sender.cc.orig 2023-04-05 11:05:06 UTC -+++ remoting/host/heartbeat_sender.cc -@@ -111,7 +111,7 @@ const net::BackoffEntry::Policy kBackoffPolicy = { - std::string GetHostname() { - // TODO(crbug.com/1052397): Revisit the macro expression once build flag - // switch of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - return net::GetHostName(); - #elif BUILDFLAG(IS_WIN) - wchar_t buffer[MAX_PATH] = {0}; 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 cdd84a3ec846..677bf471d089 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 2023-03-09 06:31:50 UTC +--- remoting/host/me2me_desktop_environment.cc.orig 2023-12-10 06:10:27 UTC +++ remoting/host/me2me_desktop_environment.cc @@ -125,7 +125,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; -@@ -164,7 +164,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( +@@ -171,7 +171,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 -@@ -173,7 +173,7 @@ Me2MeDesktopEnvironment::Me2MeDesktopEnvironment( +@@ -180,7 +180,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); } -@@ -198,7 +198,7 @@ bool Me2MeDesktopEnvironment::InitializeSecurity( +@@ -205,7 +205,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_policy__watcher.cc b/www/chromium/files/patch-remoting_host_policy__watcher.cc index 2b175e3a8517..1a994664f6de 100644 --- a/www/chromium/files/patch-remoting_host_policy__watcher.cc +++ b/www/chromium/files/patch-remoting_host_policy__watcher.cc @@ -1,11 +1,11 @@ ---- remoting/host/policy_watcher.cc.orig 2023-09-13 12:11:42 UTC +--- remoting/host/policy_watcher.cc.orig 2023-12-10 06:10:27 UTC +++ remoting/host/policy_watcher.cc -@@ -184,7 +184,7 @@ base::Value::Dict PolicyWatcher::GetDefaultPolicies() +@@ -191,7 +191,7 @@ base::Value::Dict PolicyWatcher::GetDefaultPolicies() true); result.Set(key::kRemoteAccessHostAllowEnterpriseFileTransfer, false); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) result.Set(key::kRemoteAccessHostMatchUsername, false); #endif #if !BUILDFLAG(IS_CHROMEOS) diff --git a/www/chromium/files/patch-remoting_host_remoting__me2me__host.cc b/www/chromium/files/patch-remoting_host_remoting__me2me__host.cc index 69e59de725fd..a3ae169c3d23 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 2023-09-13 12:11:42 UTC +--- remoting/host/remoting_me2me_host.cc.orig 2023-12-10 06:10:27 UTC +++ remoting/host/remoting_me2me_host.cc -@@ -126,7 +126,7 @@ +@@ -127,7 +127,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) -@@ -137,13 +137,13 @@ +@@ -138,13 +138,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 -@@ -156,7 +156,7 @@ +@@ -157,7 +157,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) -@@ -186,7 +186,7 @@ const char kApplicationName[] = "chromoting"; +@@ -187,7 +187,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"; -@@ -397,7 +397,7 @@ class HostProcess : public ConfigWatcher::Delegate, +@@ -394,7 +394,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) -@@ -466,7 +466,7 @@ class HostProcess : public ConfigWatcher::Delegate, +@@ -463,7 +463,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_; -@@ -775,7 +775,7 @@ void HostProcess::StartOnNetworkThread() { +@@ -772,7 +772,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) } -@@ -836,7 +836,7 @@ void HostProcess::CreateAuthenticatorFactory() { +@@ -833,7 +833,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, -@@ -955,13 +955,13 @@ void HostProcess::StartOnUiThread() { +@@ -952,13 +952,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 = -@@ -1033,7 +1033,7 @@ void HostProcess::ShutdownOnUiThread() { +@@ -1030,7 +1030,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. -@@ -1041,7 +1041,7 @@ void HostProcess::ShutdownOnUiThread() { +@@ -1038,7 +1038,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(); })); -@@ -1392,7 +1392,7 @@ bool HostProcess::OnUsernamePolicyUpdate(const base::V +@@ -1391,7 +1391,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) absl::optional host_username_match_required = policies.FindBool(policy::key::kRemoteAccessHostMatchUsername); if (!host_username_match_required.has_value()) { -@@ -1801,7 +1801,7 @@ void HostProcess::StartHost() { +@@ -1800,7 +1800,7 @@ void HostProcess::StartHost() { // won't be advertised if it's missing a registry key or something. desktop_environment_options_.set_enable_remote_open_url(true); -#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 -@@ -1834,7 +1834,7 @@ void HostProcess::StartHost() { +@@ -1833,7 +1833,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_ = -@@ -1866,7 +1866,7 @@ void HostProcess::StartHost() { +@@ -1865,7 +1865,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(); -@@ -1999,7 +1999,7 @@ int HostProcessMain() { +@@ -1998,7 +1998,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 ...) -@@ -2048,7 +2048,7 @@ int HostProcessMain() { +@@ -2047,7 +2047,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-remoting_host_setup_start__host__main.cc b/www/chromium/files/patch-remoting_host_setup_start__host__main.cc index 86f6479c29fe..21c82bd84d22 100644 --- a/www/chromium/files/patch-remoting_host_setup_start__host__main.cc +++ b/www/chromium/files/patch-remoting_host_setup_start__host__main.cc @@ -1,29 +1,29 @@ ---- remoting/host/setup/start_host_main.cc.orig 2023-03-09 06:31:50 UTC +--- remoting/host/setup/start_host_main.cc.orig 2023-12-10 06:10:27 UTC +++ remoting/host/setup/start_host_main.cc -@@ -33,7 +33,7 @@ +@@ -36,7 +36,7 @@ #include #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "remoting/host/setup/daemon_controller_delegate_linux.h" #include "remoting/host/setup/start_host_as_root.h" #endif // BUILDFLAG(IS_LINUX) -@@ -130,7 +130,7 @@ void OnDone(HostStarter::Result result) { +@@ -242,7 +242,7 @@ bool InitializeCorpMachineParams(HostStarter::Params& } // namespace int StartHostMain(int argc, char** argv) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Minimize the amount of code that runs as root on Posix systems. if (getuid() == 0) { return remoting::StartHostAsRoot(argc, argv); -@@ -173,7 +173,7 @@ int StartHostMain(int argc, char** argv) { - // for the account which generated |code|. - std::string host_owner = command_line->GetSwitchValueASCII("host-owner"); +@@ -274,7 +274,7 @@ int StartHostMain(int argc, char** argv) { + + mojo::core::Init(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (command_line->HasSwitch("no-start")) { // On Linux, registering the host with systemd and starting it is the only // reason start_host requires root. The --no-start options skips that final diff --git a/www/chromium/files/patch-remoting_protocol_webrtc__video__stream.cc b/www/chromium/files/patch-remoting_protocol_webrtc__video__stream.cc index 3cb9f04d66d0..212884c5469c 100644 --- a/www/chromium/files/patch-remoting_protocol_webrtc__video__stream.cc +++ b/www/chromium/files/patch-remoting_protocol_webrtc__video__stream.cc @@ -1,11 +1,11 @@ ---- remoting/protocol/webrtc_video_stream.cc.orig 2023-04-05 11:05:06 UTC +--- remoting/protocol/webrtc_video_stream.cc.orig 2023-12-10 06:10:27 UTC +++ remoting/protocol/webrtc_video_stream.cc -@@ -260,7 +260,7 @@ WebrtcVideoStream::WebrtcVideoStream(const std::string +@@ -263,7 +263,7 @@ WebrtcVideoStream::WebrtcVideoStream(const std::string : stream_name_(stream_name), session_options_(session_options) { // TODO(joedow): Dig into the threading model on other platforms to see if they // can also be updated to run on a dedicated thread. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) core_task_runner_ = base::ThreadPool::CreateSingleThreadTaskRunner( {base::TaskPriority::HIGHEST}, base::SingleThreadTaskRunnerThreadMode::DEDICATED); diff --git a/www/chromium/files/patch-sandbox_policy_BUILD.gn b/www/chromium/files/patch-sandbox_policy_BUILD.gn index b0e42b4b9e0a..d4c0c16a2944 100644 --- a/www/chromium/files/patch-sandbox_policy_BUILD.gn +++ b/www/chromium/files/patch-sandbox_policy_BUILD.gn @@ -1,39 +1,39 @@ ---- sandbox/policy/BUILD.gn.orig 2023-08-17 07:33:31 UTC +--- sandbox/policy/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ sandbox/policy/BUILD.gn -@@ -35,7 +35,7 @@ component("policy") { - "//sandbox/policy/mojom", - ] - public_deps = [ "//sandbox:common" ] +@@ -48,7 +48,7 @@ component("policy") { + "//sandbox/linux:seccomp_bpf", + ] + } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "linux/bpf_audio_policy_linux.cc", "linux/bpf_audio_policy_linux.h", -@@ -106,6 +106,27 @@ component("policy") { +@@ -119,6 +119,27 @@ component("policy") { "//sandbox/linux:sandbox_services", "//sandbox/linux:seccomp_bpf", "//sandbox/linux:suid_sandbox_client", + ] + } + if (is_openbsd) { + sources += [ + "openbsd/sandbox_openbsd.cc", + "openbsd/sandbox_openbsd.h", + ] + deps += [ + "//sandbox:sandbox_buildflags", + "//ui/gfx/x", + ] + libs = [ "util" ] + } + if (is_freebsd) { + sources += [ + "freebsd/sandbox_freebsd.cc", + "freebsd/sandbox_freebsd.h", + ] + deps += [ + "//sandbox:sandbox_buildflags", + "//ui/gfx/x", ] } if (is_chromeos_ash) { diff --git a/www/chromium/files/patch-sandbox_policy_mojom_sandbox.mojom b/www/chromium/files/patch-sandbox_policy_mojom_sandbox.mojom index c77a4d3a6489..48b525912c9f 100644 --- a/www/chromium/files/patch-sandbox_policy_mojom_sandbox.mojom +++ b/www/chromium/files/patch-sandbox_policy_mojom_sandbox.mojom @@ -1,15 +1,15 @@ ---- sandbox/policy/mojom/sandbox.mojom.orig 2023-07-16 15:47:57 UTC +--- sandbox/policy/mojom/sandbox.mojom.orig 2023-12-10 06:10:27 UTC +++ sandbox/policy/mojom/sandbox.mojom -@@ -72,6 +72,12 @@ enum Sandbox { +@@ -77,6 +77,12 @@ enum Sandbox { [EnableIf=is_fuchsia] kVideoCapture, + [EnableIf=is_openbsd] + kVideoCapture, + + [EnableIf=is_freebsd] + kVideoCapture, + // Allows access to file contents and Windows APIs for parsing icons from PE // files. [EnableIf=is_win] diff --git a/www/chromium/files/patch-sandbox_policy_sandbox__type.cc b/www/chromium/files/patch-sandbox_policy_sandbox__type.cc index e98ffa00a0cb..23c5e7819928 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-07-16 15:47:57 UTC +--- sandbox/policy/sandbox_type.cc.orig 2023-12-10 06:10:27 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 -@@ -61,7 +61,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { +@@ -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) -@@ -71,7 +71,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) { +@@ -73,7 +73,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 -@@ -127,7 +127,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -130,7 +130,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) -@@ -138,10 +138,10 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -141,10 +141,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) -@@ -169,7 +169,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -172,7 +172,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( - if (process_type == switches::kNaClBrokerProcess) - return Sandbox::kNoSandbox; + #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; -@@ -260,7 +260,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -262,7 +262,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 -@@ -290,11 +290,11 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -292,11 +292,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) -@@ -314,7 +314,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -316,7 +316,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(); -@@ -382,11 +382,11 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( +@@ -388,11 +388,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 60396bfe797a..e8b567b18b5e 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-07-16 15:47:57 UTC +--- sandbox/policy/switches.cc.orig 2023-12-10 06:10:27 UTC +++ sandbox/policy/switches.cc -@@ -53,10 +53,10 @@ const char kWindowsSystemProxyResolverSandbox[] = "pro +@@ -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) -@@ -95,7 +95,9 @@ const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-f +@@ -96,7 +96,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 d8879ff2d1e3..b84e7d2213eb 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-07-16 15:47:57 UTC +--- sandbox/policy/switches.h.orig 2023-12-10 06:10:27 UTC +++ sandbox/policy/switches.h -@@ -56,10 +56,10 @@ SANDBOX_POLICY_EXPORT extern const char kWindowsSystem +@@ -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) -@@ -80,7 +80,8 @@ SANDBOX_POLICY_EXPORT extern const char kDisableSetuid +@@ -81,7 +81,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_cert__verifier_cert__verifier__creation.cc b/www/chromium/files/patch-services_cert__verifier_cert__verifier__creation.cc deleted file mode 100644 index 4067e130438a..000000000000 --- a/www/chromium/files/patch-services_cert__verifier_cert__verifier__creation.cc +++ /dev/null @@ -1,28 +0,0 @@ ---- services/cert_verifier/cert_verifier_creation.cc.orig 2023-11-03 10:09:45 UTC -+++ services/cert_verifier/cert_verifier_creation.cc -@@ -13,7 +13,7 @@ - #include "net/cert/multi_threaded_cert_verifier.h" - #include "net/net_buildflags.h" - --#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "net/cert/cert_verify_proc_builtin.h" - #include "net/cert/internal/system_trust_store.h" - #endif -@@ -108,7 +108,7 @@ class CertVerifyProcFactoryImpl : public net::CertVeri - user_slot_restriction_ ? crypto::ScopedPK11Slot(PK11_ReferenceSlot( - user_slot_restriction_.get())) - : nullptr)); --#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - return net::CreateCertVerifyProcBuiltin(std::move(cert_net_fetcher), - std::move(crl_set), - net::CreateSslSystemTrustStore()); -@@ -174,6 +174,7 @@ class CertVerifyProcFactoryImpl : public net::CertVeri - bool IsUsingCertNetFetcher() { - #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || \ -+ BUILDFLAG(IS_BSD) || \ - BUILDFLAG(CHROME_ROOT_STORE_SUPPORTED) - return true; - #else diff --git a/www/chromium/files/patch-services_device_geolocation_location__arbitrator.cc b/www/chromium/files/patch-services_device_geolocation_location__arbitrator.cc index b7ee6f77bcd5..e9b7d674a73a 100644 --- a/www/chromium/files/patch-services_device_geolocation_location__arbitrator.cc +++ b/www/chromium/files/patch-services_device_geolocation_location__arbitrator.cc @@ -1,11 +1,11 @@ ---- services/device/geolocation/location_arbitrator.cc.orig 2023-10-11 18:22:24 UTC +--- services/device/geolocation/location_arbitrator.cc.orig 2023-12-10 06:10:27 UTC +++ services/device/geolocation/location_arbitrator.cc -@@ -188,7 +188,7 @@ LocationArbitrator::NewNetworkLocationProvider( +@@ -193,7 +193,7 @@ LocationArbitrator::NewNetworkLocationProvider( std::unique_ptr LocationArbitrator::NewSystemLocationProvider() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) return nullptr; #else return device::NewSystemLocationProvider(main_task_runner_, diff --git a/www/chromium/files/patch-services_network_BUILD.gn b/www/chromium/files/patch-services_network_BUILD.gn index acbe7b67222c..e1a8d7e3f535 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 2023-11-03 10:09:45 UTC +--- services/network/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ services/network/BUILD.gn -@@ -391,7 +391,6 @@ if (is_linux || is_chromeos) { +@@ -394,7 +394,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 b8142d08e34a..c64af742e2d1 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 2023-11-03 10:09:45 UTC +--- services/network/network_context.cc.orig 2023-12-10 06:10:27 UTC +++ services/network/network_context.cc -@@ -446,7 +446,7 @@ NetworkContext::NetworkContextHttpAuthPreferences:: +@@ -470,7 +470,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_) { -@@ -2364,7 +2364,7 @@ void NetworkContext::OnHttpAuthDynamicParamsChanged( +@@ -2385,7 +2385,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 787999bbd3c8..ae16925bca81 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 2023-11-03 10:09:45 UTC +--- services/network/network_context.h.orig 2023-12-10 06:10:27 UTC +++ services/network/network_context.h -@@ -675,7 +675,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -677,7 +677,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_network__service.cc b/www/chromium/files/patch-services_network_network__service.cc index 40e1959f5446..d3903366973c 100644 --- a/www/chromium/files/patch-services_network_network__service.cc +++ b/www/chromium/files/patch-services_network_network__service.cc @@ -1,29 +1,29 @@ ---- services/network/network_service.cc.orig 2023-10-11 18:22:24 UTC +--- services/network/network_service.cc.orig 2023-12-10 06:10:27 UTC +++ services/network/network_service.cc @@ -96,7 +96,7 @@ #include "third_party/boringssl/src/include/openssl/cpu.h" #endif -#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || \ +#if ((BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD)) || \ BUILDFLAG(IS_CHROMEOS_LACROS) #include "components/os_crypt/sync/key_storage_config_linux.h" -@@ -1003,7 +1003,7 @@ void NetworkService::SetExplicitlyAllowedPorts( +@@ -998,7 +998,7 @@ void NetworkService::SetExplicitlyAllowedPorts( net::SetExplicitlyAllowedPorts(ports); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void NetworkService::SetGssapiLibraryLoadObserver( mojo::PendingRemote gssapi_library_load_observer) { -@@ -1085,7 +1085,7 @@ NetworkService::CreateHttpAuthHandlerFactory(NetworkCo +@@ -1080,7 +1080,7 @@ NetworkService::CreateHttpAuthHandlerFactory(NetworkCo ); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void NetworkService::OnBeforeGssapiLibraryLoad() { if (gssapi_library_load_observer_.is_bound()) { gssapi_library_load_observer_->OnBeforeGssapiLibraryLoad(); diff --git a/www/chromium/files/patch-services_network_network__service.h b/www/chromium/files/patch-services_network_network__service.h index 47fbfe151389..1862c9bfa44a 100644 --- a/www/chromium/files/patch-services_network_network__service.h +++ b/www/chromium/files/patch-services_network_network__service.h @@ -1,29 +1,29 @@ ---- services/network/network_service.h.orig 2023-10-11 18:22:24 UTC +--- services/network/network_service.h.orig 2023-12-10 06:10:27 UTC +++ services/network/network_service.h -@@ -235,7 +235,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService +@@ -225,7 +225,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService mojo::PendingReceiver receiver) override; void SetFirstPartySets(net::GlobalFirstPartySets sets) override; void SetExplicitlyAllowedPorts(const std::vector& ports) override; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void SetGssapiLibraryLoadObserver( mojo::PendingRemote gssapi_library_load_observer) override; -@@ -266,7 +266,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService +@@ -252,7 +252,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService std::unique_ptr CreateHttpAuthHandlerFactory( NetworkContext* network_context); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // This is called just before a GSSAPI library may be loaded. void OnBeforeGssapiLibraryLoad(); #endif // BUILDFLAG(IS_LINUX) -@@ -507,7 +507,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService +@@ -494,7 +494,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService // leaking stale listeners between tests. std::unique_ptr mock_network_change_notifier_; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) mojo::Remote gssapi_library_load_observer_; #endif // BUILDFLAG(IS_LINUX) diff --git a/www/chromium/files/patch-services_network_public_cpp_BUILD.gn b/www/chromium/files/patch-services_network_public_cpp_BUILD.gn index 1ff612783c4c..e9fc7c3707fb 100644 --- a/www/chromium/files/patch-services_network_public_cpp_BUILD.gn +++ b/www/chromium/files/patch-services_network_public_cpp_BUILD.gn @@ -1,11 +1,11 @@ ---- services/network/public/cpp/BUILD.gn.orig 2023-11-03 10:09:45 UTC +--- services/network/public/cpp/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ services/network/public/cpp/BUILD.gn -@@ -471,7 +471,7 @@ component("cpp_base") { +@@ -485,7 +485,7 @@ component("cpp_base") { sources += [ "transferable_directory_fuchsia.cc" ] } - if (is_linux) { + if (is_linux && !is_bsd) { sources += [ "network_interface_change_listener_mojom_traits.cc", "network_interface_change_listener_mojom_traits.h", diff --git a/www/chromium/files/patch-services_network_public_cpp_features.cc b/www/chromium/files/patch-services_network_public_cpp_features.cc index 34681bb890a1..bd768ce9937e 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-11-03 10:09:45 UTC +--- services/network/public/cpp/features.cc.orig 2023-12-10 06:10:27 UTC +++ services/network/public/cpp/features.cc -@@ -376,7 +376,7 @@ BASE_FEATURE(kPrivateNetworkAccessPermissionPrompt, - // that can be adequately sandboxed. - BASE_FEATURE(kOutOfProcessSystemDnsResolution, - "OutOfProcessSystemDnsResolution", --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +@@ -98,7 +98,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 799066db19c5..250f21b8d941 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 2023-11-03 10:09:45 UTC +--- services/network/public/mojom/BUILD.gn.orig 2023-12-10 06:10:27 UTC +++ services/network/public/mojom/BUILD.gn -@@ -515,11 +515,11 @@ mojom("url_loader_base") { +@@ -521,11 +521,11 @@ mojom("url_loader_base") { } enabled_features = [] - if (is_android || is_chromeos || is_linux) { + if (!is_bsd && (is_android || is_chromeos || is_linux)) { enabled_features += [ "network_change_notifier_in_browser" ] } - if (is_linux) { + if (is_linux && !is_bsd) { # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does # not include lacros. enabled_features += [ "use_network_interface_change_listener" ] -@@ -1431,7 +1431,7 @@ mojom("mojom") { +@@ -1442,7 +1442,7 @@ mojom("mojom") { } } - if (is_linux) { + if (is_linux && !is_bsd) { # TODO(crbug.com/1431866): Remove this once is_linux in the mojom IDL does # not include lacros. enabled_features += [ "use_network_interface_change_listener" ] diff --git a/www/chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc b/www/chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc index 54958084d79e..602743b9b880 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc +++ b/www/chromium/files/patch-third__party_blink_renderer_controller_blink__initializer.cc @@ -1,35 +1,35 @@ ---- third_party/blink/renderer/controller/blink_initializer.cc.orig 2023-10-11 18:22:24 UTC +--- third_party/blink/renderer/controller/blink_initializer.cc.orig 2023-12-10 06:10:27 UTC +++ third_party/blink/renderer/controller/blink_initializer.cc @@ -78,12 +78,12 @@ #include "third_party/blink/renderer/controller/private_memory_footprint_provider.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/controller/memory_usage_monitor_posix.h" #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/controller/highest_pmf_reporter.h" #include "third_party/blink/renderer/controller/user_level_memory_pressure_signal_generator.h" #endif -@@ -227,7 +227,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder +@@ -232,7 +232,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder main_thread_task_runner); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) binders.Add( ConvertToBaseRepeatingCallback( CrossThreadBindRepeating(&MemoryUsageMonitorPosix::Bind)), -@@ -266,7 +266,7 @@ void BlinkInitializer::RegisterMemoryWatchers(Platform +@@ -271,7 +271,7 @@ void BlinkInitializer::RegisterMemoryWatchers(Platform #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Start reporting the highest private memory footprint after the first // navigation. HighestPmfReporter::Initialize(main_thread_task_runner); diff --git a/www/chromium/files/patch-third__party_blink_renderer_core_editing_editing__behavior.cc b/www/chromium/files/patch-third__party_blink_renderer_core_editing_editing__behavior.cc index b3b5aa730498..9bb9d79b6e44 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_core_editing_editing__behavior.cc +++ b/www/chromium/files/patch-third__party_blink_renderer_core_editing_editing__behavior.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/editing/editing_behavior.cc.orig 2023-11-03 10:09:45 UTC +--- third_party/blink/renderer/core/editing/editing_behavior.cc.orig 2023-12-10 06:10:27 UTC +++ third_party/blink/renderer/core/editing/editing_behavior.cc -@@ -279,7 +279,7 @@ bool EditingBehavior::ShouldInsertCharacter(const Keyb +@@ -324,7 +324,7 @@ bool EditingBehavior::ShouldInsertCharacter(const Keyb // unexpected behaviour if (ch < ' ') return false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // According to XKB map no keyboard combinations with ctrl key are mapped to // printable characters, however we need the filter as the DomKey/text could // contain printable characters. 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 aee05b69a1c5..12948d7c7a4a 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 2023-11-03 10:09:45 UTC +--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2023-12-10 06:10:27 UTC +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -421,7 +421,7 @@ SkFontHinting RendererPreferencesToSkiaHinting( +@@ -424,7 +424,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' -@@ -3327,7 +3327,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3351,7 +3351,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 0c06447385a5..67aac0ab96e2 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 2023-11-03 10:09:45 UTC +--- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2023-12-10 06:10:27 UTC +++ third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -6461,7 +6461,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { +@@ -6468,7 +6468,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 \ -@@ -6870,7 +6870,7 @@ TEST_F(CompositedSelectionBoundsTest, LargeSelectionSc +@@ -6877,7 +6877,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_html_parser_html__document__parser__fastpath.cc b/www/chromium/files/patch-third__party_blink_renderer_core_html_parser_html__document__parser__fastpath.cc index 4b80f12d9aad..8b421a48b8dd 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_core_html_parser_html__document__parser__fastpath.cc +++ b/www/chromium/files/patch-third__party_blink_renderer_core_html_parser_html__document__parser__fastpath.cc @@ -1,14 +1,14 @@ ---- third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.orig 2023-07-16 15:47:57 UTC +--- third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.orig 2023-12-10 06:10:27 UTC +++ third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc -@@ -169,7 +169,11 @@ class HTMLFastPathParser { +@@ -172,7 +172,11 @@ class HTMLFastPathParser { using Span = base::span; using USpan = base::span; // 32 matches that used by HTMLToken::Attribute. +#if defined(__clang__) && (__clang_major__ >= 16) typedef std::conditional, +#else + typedef typename std::conditional, +#endif UCharLiteralBuffer<32>, LCharLiteralBuffer<32>>::type LiteralBufferType; typedef UCharLiteralBuffer<32> UCharLiteralBufferType; diff --git a/www/chromium/files/patch-third__party_blink_renderer_core_layout_ng_layout__ng__view.cc b/www/chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc similarity index 64% rename from www/chromium/files/patch-third__party_blink_renderer_core_layout_ng_layout__ng__view.cc rename to www/chromium/files/patch-third__party_blink_renderer_core_layout_layout__view.cc index 9921956775a0..edb343c8fe74 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_core_layout_ng_layout__ng__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/ng/layout_ng_view.cc.orig 2023-11-03 10:09:45 UTC -+++ third_party/blink/renderer/core/layout/ng/layout_ng_view.cc -@@ -15,7 +15,7 @@ - #include "third_party/blink/renderer/core/svg/svg_document_extensions.h" - #include "ui/display/screen_info.h" +--- third_party/blink/renderer/core/layout/layout_view.cc.orig 2023-12-10 06:10:27 UTC ++++ third_party/blink/renderer/core/layout/layout_view.cc +@@ -73,7 +73,7 @@ + #include "ui/gfx/geometry/quad_f.h" + #include "ui/gfx/geometry/size_conversions.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "third_party/blink/renderer/platform/fonts/font_cache.h" #endif -@@ -51,7 +51,7 @@ void LayoutNGView::UpdateLayout() { +@@ -808,7 +808,7 @@ void LayoutView::UpdateLayout() { fragmentation_context_.Clear(); } -#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_layout_ng_grid_ng__grid__layout__algorithm.cc b/www/chromium/files/patch-third__party_blink_renderer_core_layout_ng_grid_ng__grid__layout__algorithm.cc deleted file mode 100644 index f09c4b19606b..000000000000 --- a/www/chromium/files/patch-third__party_blink_renderer_core_layout_ng_grid_ng__grid__layout__algorithm.cc +++ /dev/null @@ -1,30 +0,0 @@ ---- third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.orig 2023-10-11 18:22:24 UTC -+++ third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc -@@ -3452,7 +3452,13 @@ void NGGridLayoutAlgorithm::PlaceGridItems( - DCHECK(out_row_break_between); - - const auto& container_space = ConstraintSpace(); -+#if defined(__clang__) && (__clang_major__ >= 16) - const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData(); -+#else -+ const auto& [g_i, l_d, t_s] = sizing_tree.TreeRootData(); -+ const auto& grid_items = g_i; -+ const auto& layout_data = l_d; -+#endif - - const auto* cached_layout_subtree = container_space.GridLayoutSubtree(); - const auto container_writing_direction = -@@ -3616,7 +3622,13 @@ void NGGridLayoutAlgorithm::PlaceGridItemsForFragmenta - - // TODO(ikilpatrick): Update |SetHasSeenAllChildren| and early exit if true. - const auto& constraint_space = ConstraintSpace(); -+#if defined(__clang__) && (__clang_major__ >= 16) - const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData(); -+#else -+ const auto& [g_i, l_d, t_s] = sizing_tree.TreeRootData(); -+ const auto& grid_items = g_i; -+ const auto& layout_data = l_d; -+#endif - - const auto* cached_layout_subtree = constraint_space.GridLayoutSubtree(); - const auto container_writing_direction = 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 d8fe5fba9631..3d1cd8c1926d 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 2023-11-03 10:09:45 UTC +--- third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2023-12-10 06:10:27 UTC +++ third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc @@ -157,7 +157,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; -@@ -357,7 +357,7 @@ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scr +@@ -360,7 +360,7 @@ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scr const WebMouseEvent& event) { // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) if (event.button == WebPointerProperties::Button::kMiddle) return true; #endif diff --git a/www/chromium/files/patch-third__party_blink_renderer_modules_canvas_canvas2d_canvas__style.cc b/www/chromium/files/patch-third__party_blink_renderer_modules_canvas_canvas2d_canvas__style.cc index 04b9c8a2c63a..0727055ded99 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_modules_canvas_canvas2d_canvas__style.cc +++ b/www/chromium/files/patch-third__party_blink_renderer_modules_canvas_canvas2d_canvas__style.cc @@ -1,33 +1,33 @@ ---- third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.orig 2023-08-17 07:33:31 UTC +--- third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.orig 2023-12-10 06:10:27 UTC +++ third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc -@@ -76,6 +76,9 @@ bool ParseCanvasColorString(const String& color_string +@@ -83,6 +83,9 @@ bool ParseCanvasColorString(const String& color_string void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags, float global_alpha) const { +#if defined(__clang__) && (__clang_major__ < 16) + SkColor4f custom_color = SkColor4f{0.0f, 0.0f, 0.0f, global_alpha}; +#endif switch (type_) { case kColor: ApplyColorToFlags(flags, global_alpha); -@@ -83,12 +86,20 @@ void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags, +@@ -90,12 +93,20 @@ void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags, case kGradient: GetCanvasGradient()->GetGradient()->ApplyToFlags(flags, SkMatrix::I(), ImageDrawOptions()); +#if defined(__clang__) && (__clang_major__ >= 16) flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha)); +#else + flags.setColor(custom_color); +#endif break; case kImagePattern: GetCanvasPattern()->GetPattern()->ApplyToFlags( flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform())); +#if defined(__clang__) && (__clang_major__ >= 16) flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha)); +#else + flags.setColor(custom_color); +#endif break; default: NOTREACHED(); 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 index a0cc194ba49d..9f6a554bc47d 100644 --- 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 @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc.orig 2023-11-03 10:09:45 UTC +--- third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc.orig 2023-12-10 06:10:27 UTC +++ third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc -@@ -195,7 +195,7 @@ class SharedXnnpackContext : public ThreadSafeRefCount +@@ -196,7 +196,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_webgl_webgl__rendering__context__base.cc b/www/chromium/files/patch-third__party_blink_renderer_modules_webgl_webgl__rendering__context__base.cc index 8a2994eaf00e..d4c865978095 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 2023-11-03 10:09:45 UTC +--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2023-12-10 06:10:27 UTC +++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -6330,7 +6330,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid +@@ -6314,7 +6314,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