diff --git a/www/chromium/Makefile b/www/chromium/Makefile index ef6a49dbe35a..c1d35882ffb0 100644 --- a/www/chromium/Makefile +++ b/www/chromium/Makefile @@ -1,345 +1,345 @@ # Created by: Florent Thoumie PORTNAME= chromium -PORTVERSION= 102.0.5005.115 +PORTVERSION= 103.0.5060.53 CATEGORIES= www MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ https://nerd.hu/distfiles/:fonts DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= chromium@FreeBSD.org COMMENT= Google web browser based on WebKit LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi ONLY_FOR_ARCHS= aarch64 amd64 i386 BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ gperf:devel/gperf \ flock:sysutils/flock \ node:www/node \ xcb-proto>0:x11/xcb-proto \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} \ ${LOCALBASE}/include/va/va.h:multimedia/libva \ ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libevent.so:devel/libevent \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic USES= bison compiler:c++17-lang cpe desktop-file-utils gl gnome jpeg localbase:ldflags \ ninja perl5 pkgconfig python:3.7+,build shebangfix tar:xz xorg CPE_VENDOR= google CPE_PRODUCT= chrome USE_GL= gbm gl USE_GNOME= atk dconf gdkpixbuf2 glib20 gtk30 libxml2 libxslt USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xorgproto xrandr xrender xscrnsaver xtst SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format MAKE_ARGS= -C out/${BUILDTYPE} ALL_TARGET= chrome BINARY_ALIAS= python3=${PYTHON_CMD} # TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) # # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= clang_use_chrome_plugins=false \ enable_hangout_services_extension=true \ enable_js_type_check=false \ enable_nacl=false \ enable_one_click_signin=true \ enable_remoting=false \ enable_wmax_tokens=false \ fatal_linker_warnings=false \ is_clang=true \ optimize_webui=true \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator="none" \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=false \ use_gnome_keyring=false \ use_lld=true \ use_sysroot=false \ use_system_freetype=false \ use_system_harfbuzz=true \ use_system_libjpeg=true \ use_system_wayland_scanner=true \ use_udev=false \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" # TODO: investigate building with these options: # use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles # 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 TEST OPTIONS_DEFAULT= CODECS CUPS DRIVER KERBEROS SNDIO OPTIONS_EXCLUDE_aarch64=LTO OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO OPTIONS_RADIO= KERBEROS OPTIONS_RADIO_KERBEROS= HEIMDAL HEIMDAL_BASE MIT OPTIONS_SUB= yes CODECS_DESC= Compile and enable patented codecs like H.264 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+=ffmpeg_branding="Chrome" \ GN_ARGS+=proprietary_codecs=true CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \ GN_ARGS+=proprietary_codecs=false CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_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 PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false # With SNDIO=on we exclude audio_manager_linux from the build (see # media/audio/BUILD.gn) and use audio_manager_openbsd which does not # support falling back to ALSA or PulseAudio. SNDIO_PREVENTS= ALSA PULSEAUDIO SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false .include "Makefile.tests" TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX} \ - test_fonts-cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb.tar.gz:fonts + test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz:fonts TEST_ALL_TARGET= ${TEST_TARGETS} .include .include .if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base .endif .if ${COMPILER_VERSION} < 130 LLVM_DEFAULT= 13 BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} BINARY_ALIAS+= cpp=${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} \ cc=${LOCALBASE}/bin/clang${LLVM_DEFAULT} \ c++=${LOCALBASE}/bin/clang++${LLVM_DEFAULT} \ ar=${LOCALBASE}/bin/llvm-ar${LLVM_DEFAULT} \ nm=${LOCALBASE}/bin/llvm-nm${LLVM_DEFAULT} \ ld=${LOCALBASE}/bin/ld.lld${LLVM_DEFAULT} .else BINARY_ALIAS+= ar=/usr/bin/llvm-ar \ nm=/usr/bin/llvm-nm .endif # swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " .else PLIST_SUB+= NOT_AARCH64="" .endif # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "To build 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 \ flac fontconfig freetype harfbuzz-ng libdrm libevent libpng \ libusb libwebp libxml libxslt openh264 opus snappy || ${FALSE} # Chromium uses an unreleased version of FFmpeg, so configure it .for brand in Chrome Chromium ${CP} -R \ ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/linux/ \ ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/freebsd .endfor do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin/node # Setup buildtools/freebsd @${MKDIR} ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKSRC}/buildtools/freebsd ${LN} -sf /usr/bin/strip ${WRKSRC}/buildtools/freebsd/strip do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ ${STAGEDIR}${MANPREFIX}/man/man1/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 icudtl.dat snapshot_blob.bin v8_context_snapshot.bin ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chrome \ ${STAGEDIR}${DATADIR} 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 d27ac26ad93a..05d2f47cc3dc 100644 --- a/www/chromium/distinfo +++ b/www/chromium/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1654845180 -SHA256 (chromium-102.0.5005.115.tar.xz) = 301d40e5373b6dad9bc6aeb6898116d1f7dd2d0589ed18e108c56e2290df47e6 -SIZE (chromium-102.0.5005.115.tar.xz) = 1461900356 -SHA256 (chromium-102.0.5005.115-testdata.tar.xz) = f979682d8f159cdab5bc0f07ca6342e6e8f7718fedb30dac49bdd8f3f9739a4e -SIZE (chromium-102.0.5005.115-testdata.tar.xz) = 260718224 -SHA256 (test_fonts-cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb.tar.gz) = ec973eccd669d417fbf2d0a4dac730744a3174268ff062db5451b55c82bc3492 -SIZE (test_fonts-cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb.tar.gz) = 26759650 +TIMESTAMP = 1655470095 +SHA256 (chromium-103.0.5060.53.tar.xz) = 0ecbae14670506da90c8bf744f83f52a64a5fff0765c2e2e066b0e68b805b101 +SIZE (chromium-103.0.5060.53.tar.xz) = 1470748636 +SHA256 (chromium-103.0.5060.53-testdata.tar.xz) = df1e4c1864c2b338553c19c58418c9c0fe4f9581e86d21ce3d2594594a3ec572 +SIZE (chromium-103.0.5060.53-testdata.tar.xz) = 260732188 +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 98eca15f4c7c..2ff3fd50744c 100644 --- a/www/chromium/files/patch-BUILD.gn +++ b/www/chromium/files/patch-BUILD.gn @@ -1,80 +1,80 @@ ---- BUILD.gn.orig 2022-05-19 14:06:27 UTC +--- BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ BUILD.gn @@ -54,7 +54,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) @@ -86,7 +86,6 @@ group("gn_all") { "//codelabs", "//components:components_unittests", "//components/gwp_asan:gwp_asan_unittests", - "//infra/orchestrator:orchestrator_all", "//net:net_unittests", "//services:services_unittests", "//services/service_manager/public/cpp", -@@ -450,7 +449,7 @@ group("gn_all") { +@@ -447,7 +446,7 @@ group("gn_all") { ] } - if (is_linux || is_chromeos || is_android) { + if ((is_linux && !is_bsd) || is_chromeos || is_android) { deps += [ "//third_party/breakpad:breakpad_unittests", "//third_party/breakpad:core-2-minidump", @@ -635,6 +634,15 @@ group("gn_all") { } } + if (is_bsd) { + deps -= [ + "//third_party/breakpad:dump_syms($host_toolchain)", + "//third_party/breakpad:microdump_stackwalk($host_toolchain)", + "//third_party/breakpad:minidump_dump($host_toolchain)", + "//third_party/breakpad:minidump_stackwalk($host_toolchain)", + ] + } + if (is_mac) { deps += [ "//third_party/breakpad:crash_inspector", @@ -683,7 +691,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)" ] } -@@ -1159,7 +1167,7 @@ if (!is_ios) { +@@ -1167,7 +1175,7 @@ if (!is_ios) { data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] } - if (!is_win && !is_android) { + if (!is_win && !is_android && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -1168,7 +1176,7 @@ if (!is_ios) { +@@ -1176,7 +1184,7 @@ if (!is_ios) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } - if (is_linux || is_chromeos) { + if ((is_linux && !is_bsd) || is_chromeos) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1565,7 +1573,7 @@ group("chromium_builder_perf") { +@@ -1580,7 +1588,7 @@ group("chromium_builder_perf") { if (is_win) { data_deps += [ "//chrome/installer/mini_installer:mini_installer" ] - } else { + } else if (!is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } diff --git a/www/chromium/files/patch-base_BUILD.gn b/www/chromium/files/patch-base_BUILD.gn index 7f88a789793f..61aca5553be5 100644 --- a/www/chromium/files/patch-base_BUILD.gn +++ b/www/chromium/files/patch-base_BUILD.gn @@ -1,146 +1,146 @@ ---- base/BUILD.gn.orig 2022-05-19 14:06:27 UTC +--- base/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ base/BUILD.gn -@@ -998,7 +998,7 @@ mixed_component("base") { +@@ -1004,7 +1004,7 @@ mixed_component("base") { "timer/hi_res_timer_manager_posix.cc", ] - if (!is_nacl && !is_apple) { + if (!is_nacl && !is_apple && !is_bsd) { sources += [ "cpu_affinity_posix.cc", "cpu_affinity_posix.h", -@@ -1009,6 +1009,12 @@ mixed_component("base") { +@@ -1015,6 +1015,12 @@ mixed_component("base") { "profiler/thread_delegate_posix.h", ] } + + if (is_bsd) { + sources += [ + "profiler/stack_sampler_posix.cc", + ] + } } if (is_win) { -@@ -1486,11 +1492,23 @@ mixed_component("base") { +@@ -1496,11 +1502,23 @@ mixed_component("base") { # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. if (!use_sysroot && - (is_android || ((is_linux || is_chromeos) && !is_chromecast)) && + (is_android || ((is_linux || is_chromeos) && !is_chromecast && !is_bsd)) && host_toolchain != "//build/toolchain/cros:host") { libs += [ "atomic" ] } + # *BSD needs libkvm + if (is_bsd) { + libs += [ "kvm" ] + } + + if (is_freebsd) { + libs += [ + "execinfo", + "util", + ] + } + if (use_allocator_shim) { sources += [ "allocator/allocator_shim.cc", -@@ -1518,7 +1536,7 @@ mixed_component("base") { +@@ -1528,7 +1546,7 @@ mixed_component("base") { ] configs += [ "//base/allocator:mac_no_default_new_delete_symbols" ] } - if (is_chromeos || is_linux) { + if (is_chromeos || (is_linux && !is_bsd)) { sources += [ "allocator/allocator_shim_override_cpp_symbols.h", "allocator/allocator_shim_override_glibc_weak_symbols.h", -@@ -1574,7 +1592,7 @@ mixed_component("base") { +@@ -1584,7 +1602,7 @@ mixed_component("base") { # Allow more direct string conversions on platforms with native utf8 # strings - if (is_apple || is_chromeos || is_chromecast || is_fuchsia) { + if (is_apple || is_chromeos || is_chromecast || is_fuchsia || is_bsd) { defines += [ "SYSTEM_NATIVE_UTF8" ] } -@@ -2147,6 +2165,42 @@ mixed_component("base") { +@@ -2158,6 +2176,42 @@ mixed_component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/file_util_linux.cc", + "files/scoped_file_linux.cc", + "process/memory_linux.cc", + "process/process_linux.cc", + "system/sys_info_linux.cc", + "process/process_iterator_linux.cc", + "process/process_metrics_linux.cc", + "process/process_handle_linux.cc" + ] + sources += [ + "process/memory_stubs.cc", + "files/file_path_watcher_kqueue.cc", + "files/file_path_watcher_kqueue.h", + "files/file_path_watcher_bsd.cc", + ] + } + + if (is_openbsd) { + sources += [ + "process/process_handle_openbsd.cc", + "process/process_iterator_openbsd.cc", + "process/process_metrics_openbsd.cc", + "system/sys_info_openbsd.cc", + ] + } else if (is_freebsd) { + sources += [ + "process/process_handle_freebsd.cc", + "process/process_iterator_freebsd.cc", + "process/process_metrics_freebsd.cc", + "system/sys_info_freebsd.cc", + ] + } + # iOS if (is_ios) { sources -= [ -@@ -3436,7 +3490,7 @@ test("base_unittests") { +@@ -3452,7 +3506,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", -@@ -3484,7 +3538,7 @@ test("base_unittests") { +@@ -3500,7 +3554,7 @@ test("base_unittests") { "posix/unix_domain_socket_unittest.cc", "task/thread_pool/task_tracker_posix_unittest.cc", ] - if (!is_nacl && !is_apple) { + if (!is_nacl && !is_apple && !is_bsd) { sources += [ "cpu_affinity_posix_unittest.cc", "profiler/stack_copier_signal_unittest.cc", -@@ -3495,7 +3549,7 @@ test("base_unittests") { +@@ -3511,7 +3565,7 @@ test("base_unittests") { # Allow more direct string conversions on platforms with native utf8 # strings - if (is_apple || is_chromeos || is_chromecast || is_fuchsia) { + if (is_apple || is_chromeos || is_chromecast || is_fuchsia || is_bsd) { defines += [ "SYSTEM_NATIVE_UTF8" ] } -@@ -3657,7 +3711,7 @@ test("base_unittests") { +@@ -3683,7 +3737,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_address__space__randomization.h b/www/chromium/files/patch-base_allocator_partition__allocator_address__space__randomization.h index b92553d33536..f16c9802cfb4 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_address__space__randomization.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_address__space__randomization.h @@ -1,20 +1,20 @@ ---- base/allocator/partition_allocator/address_space_randomization.h.orig 2022-05-19 14:06:27 UTC +--- base/allocator/partition_allocator/address_space_randomization.h.orig 2022-06-17 14:20:10 UTC +++ base/allocator/partition_allocator/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) && !defined(OS_BSD) // We shouldn't allocate system pages at all for sanitizer builds. However, // we do, and if random hint addresses interfere with address ranges -@@ -121,7 +121,7 @@ AslrMask(uintptr_t bits) { +@@ -128,7 +128,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_partition__alloc__base_rand__util__posix.cc b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc new file mode 100644 index 000000000000..024aa1e97b2c --- /dev/null +++ b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc @@ -0,0 +1,13 @@ +--- base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc.orig 2022-06-17 14:20:10 UTC ++++ base/allocator/partition_allocator/partition_alloc_base/rand_util_posix.cc +@@ -88,6 +88,10 @@ void RandBytes(void* output, size_t output_length) { + return; + } + } ++#elif BUILDFLAG(IS_BSD) ++ if (getentropy(output, output_length) == 0) { ++ return; ++ } + #endif + + // If the OS-specific mechanisms didn't work, fall through to reading from diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h index 380fe64d6f07..9bb71dd6268f 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__constants.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2022-05-19 14:06:27 UTC +--- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2022-06-17 14:20:10 UTC +++ base/allocator/partition_allocator/partition_alloc_constants.h -@@ -80,7 +80,7 @@ PartitionPageShift() { +@@ -84,7 +84,7 @@ PartitionPageShift() { return 18; // 256 KiB } #elif (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \ - (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t PartitionPageShift() { return PageAllocationGranularityShift() + 2; diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__page.h b/www/chromium/files/patch-base_allocator_partition__allocator_partition__page.h index 294bfc737221..abf25cf132ff 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__page.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_partition__page.h @@ -1,29 +1,29 @@ ---- base/allocator/partition_allocator/partition_page.h.orig 2022-05-19 14:06:27 UTC +--- base/allocator/partition_allocator/partition_page.h.orig 2022-06-17 14:20:10 UTC +++ base/allocator/partition_allocator/partition_page.h -@@ -129,13 +129,14 @@ struct __attribute__((packed)) SlotSpanMetadata { +@@ -130,13 +130,14 @@ struct SlotSpanMetadata { PartitionBucket* const bucket = nullptr; // CHECK()ed in AllocNewSlotSpan(). -#if defined(PA_HAS_64_BITS_POINTERS) && BUILDFLAG(IS_APPLE) +#if (defined(PA_HAS_64_BITS_POINTERS) && BUILDFLAG(IS_APPLE)) || \ + (BUILDFLAG(IS_FREEBSD) && defined(__i386__)) // System page size is not a constant on Apple OSes, but is either 4 or 16kiB // (1 << 12 or 1 << 14), as checked in PartitionRoot::Init(). And // 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). -@@ -149,7 +150,9 @@ struct __attribute__((packed)) SlotSpanMetadata { +@@ -150,7 +151,9 @@ struct SlotSpanMetadata { #endif // defined(PA_HAS_64_BITS_POINTERS) && BUILDFLAG(IS_APPLE) // The maximum number of bits needed to cover all currently supported OSes. static constexpr size_t kMaxSlotsPerSlotSpanBits = 13; +#if !BUILDFLAG(IS_FREEBSD) && defined(__i386__) static_assert(kMaxSlotsPerSlotSpan < (1 << kMaxSlotsPerSlotSpanBits), ""); +#endif // |marked_full| isn't equivalent to being full. Slot span is marked as full // iff it isn't on the active slot span list (or any other list). diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__root.cc b/www/chromium/files/patch-base_allocator_partition__allocator_partition__root.cc index 6461c1678b28..70cba6b75bf8 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__root.cc +++ b/www/chromium/files/patch-base_allocator_partition__allocator_partition__root.cc @@ -1,38 +1,38 @@ ---- base/allocator/partition_allocator/partition_root.cc.orig 2022-05-19 14:06:27 UTC +--- base/allocator/partition_allocator/partition_root.cc.orig 2022-06-17 14:20:10 UTC +++ base/allocator/partition_allocator/partition_root.cc @@ -29,7 +29,7 @@ #include "wow64apiset.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #endif @@ -226,7 +226,7 @@ void PartitionAllocMallocInitOnce() { if (!g_global_init_called.compare_exchange_strong(expected, true)) return; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // When fork() is called, only the current thread continues to execute in the // child process. If the lock is held, but *not* by this thread when fork() is // called, we have a deadlock. @@ -305,7 +305,7 @@ static size_t PartitionPurgeSlotSpan( constexpr size_t kMaxSlotCount = (PartitionPageSize() * kMaxPartitionPagesPerRegularSlotSpan) / SystemPageSize(); -#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 -@@ -648,7 +648,7 @@ void PartitionRoot::Init(PartitionOptions +@@ -651,7 +651,7 @@ void PartitionRoot::Init(PartitionOptions // apple OSes. PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) || (internal::SystemPageSize() == (size_t{1} << 14))); -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // Check runtime pagesize. Though the code is currently the same, it is // not merged with the IS_APPLE case above as a 1 << 16 case needs to be // added here in the future, to allow 64 kiB pagesize. That is only diff --git a/www/chromium/files/patch-base_files_dir__reader__linux.h b/www/chromium/files/patch-base_files_dir__reader__linux.h new file mode 100644 index 000000000000..82ff9a17eb2e --- /dev/null +++ b/www/chromium/files/patch-base_files_dir__reader__linux.h @@ -0,0 +1,39 @@ +--- base/files/dir_reader_linux.h.orig 2022-06-18 05:49:12 UTC ++++ base/files/dir_reader_linux.h +@@ -16,10 +16,16 @@ + #include "base/logging.h" + #include "base/posix/eintr_wrapper.h" + ++#include "build/build_config.h" ++ + // See the comments in dir_reader_posix.h about this. + + namespace base { + ++#if BUILDFLAG(IS_BSD) ++#include ++typedef struct dirent linux_dirent; ++#else + struct linux_dirent { + uint64_t d_ino; + int64_t d_off; +@@ -27,6 +33,7 @@ struct linux_dirent { + unsigned char d_type; + char d_name[0]; + }; ++#endif + + class DirReaderLinux { + public: +@@ -61,7 +68,11 @@ class DirReaderLinux { + if (offset_ != size_) + return true; + ++#if BUILDFLAG(IS_BSD) ++ const int r = getdents(fd_, reinterpret_cast(buf_), sizeof(buf_)); ++#else + const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_)); ++#endif + if (r == 0) + return false; + if (r == -1) { diff --git a/www/chromium/files/patch-base_files_dir__reader__posix.h b/www/chromium/files/patch-base_files_dir__reader__posix.h new file mode 100644 index 000000000000..2285fb726f8e --- /dev/null +++ b/www/chromium/files/patch-base_files_dir__reader__posix.h @@ -0,0 +1,20 @@ +--- base/files/dir_reader_posix.h.orig 2022-06-17 14:20:10 UTC ++++ base/files/dir_reader_posix.h +@@ -17,7 +17,7 @@ + // seems worse than falling back to enumerating all file descriptors so we will + // probably never implement this on the Mac. + +-#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/files/dir_reader_linux.h" + #else + #include "base/files/dir_reader_fallback.h" +@@ -25,7 +25,7 @@ + + namespace base { + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + typedef DirReaderLinux DirReaderPosix; + #else + typedef DirReaderFallback DirReaderPosix; diff --git a/www/chromium/files/patch-base_files_file__util__posix.cc b/www/chromium/files/patch-base_files_file__util__posix.cc index 058f7033f6a9..d0148196ba56 100644 --- a/www/chromium/files/patch-base_files_file__util__posix.cc +++ b/www/chromium/files/patch-base_files_file__util__posix.cc @@ -1,52 +1,52 @@ ---- base/files/file_util_posix.cc.orig 2022-05-19 14:06:27 UTC +--- base/files/file_util_posix.cc.orig 2022-06-17 14:20:10 UTC +++ base/files/file_util_posix.cc -@@ -697,32 +697,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p +@@ -696,32 +696,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p File::Error* error) { ScopedBlockingCall scoped_blocking_call( FROM_HERE, BlockingType::MAY_BLOCK); // For call to mkdir(). + const FilePath kFileSystemRoot("/"); std::vector subpaths; // Collect a list of all parent directories. FilePath last_path = full_path; - subpaths.push_back(full_path); + if (full_path != kFileSystemRoot) + subpaths.push_back(full_path); for (FilePath path = full_path.DirName(); - path.value() != last_path.value(); path = path.DirName()) { + (path.value() != last_path.value() && + (path != kFileSystemRoot)); path = path.DirName()) { subpaths.push_back(path); last_path = path; } // Iterate through the parents and create the missing ones. for (const FilePath& subpath : base::Reversed(subpaths)) { - if (DirectoryExists(subpath)) - continue; - if (mkdir(subpath.value().c_str(), 0700) == 0) - continue; - // Mkdir failed, but it might have failed with EEXIST, or some other error - // due to the directory appearing out of thin air. This can occur if - // two processes are trying to create the same file system tree at the same - // time. Check to see if it exists and make sure it is a directory. - int saved_errno = errno; - if (!DirectoryExists(subpath)) { - if (error) - *error = File::OSErrorToFileError(saved_errno); - return false; + if (!PathExists(subpath)) { + if ((mkdir(subpath.value().c_str(), 0700) == -1) && + ((full_path != subpath) ? (errno != ENOENT) : (-1))) { + int saved_errno = errno; + if (error) + *error = File::OSErrorToFileError(saved_errno); + return false; + } + } else if (!DirectoryExists(subpath)) { + if (error) + *error = File::OSErrorToFileError(ENOTDIR); + return false; } } return true; diff --git a/www/chromium/files/patch-base_files_file__util__unittest.cc b/www/chromium/files/patch-base_files_file__util__unittest.cc index 7a1b5ff376fb..cbc96b4a9d6f 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 2022-04-21 18:48:31 UTC +--- base/files/file_util_unittest.cc.orig 2022-06-17 14:20:10 UTC +++ base/files/file_util_unittest.cc -@@ -3523,7 +3523,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { +@@ -3522,7 +3522,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"; -@@ -4239,7 +4239,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles +@@ -4238,7 +4238,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_i18n_icu__util.cc b/www/chromium/files/patch-base_i18n_icu__util.cc index 9f649aad1cf1..f9fe06225de0 100644 --- a/www/chromium/files/patch-base_i18n_icu__util.cc +++ b/www/chromium/files/patch-base_i18n_icu__util.cc @@ -1,20 +1,20 @@ ---- base/i18n/icu_util.cc.orig 2022-05-19 14:06:27 UTC +--- base/i18n/icu_util.cc.orig 2022-06-17 14:20:10 UTC +++ base/i18n/icu_util.cc -@@ -52,7 +52,7 @@ +@@ -54,7 +54,7 @@ #endif #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ - ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ !BUILDFLAG(IS_CHROMECAST)) #include "third_party/icu/source/i18n/unicode/timezone.h" #endif -@@ -324,7 +324,7 @@ void InitializeIcuTimeZone() { +@@ -326,7 +326,7 @@ void InitializeIcuTimeZone() { FuchsiaIntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization(); icu::TimeZone::adoptDefault( icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id))); -#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ !BUILDFLAG(IS_CHROMECAST) // To respond to the time zone change properly, the default time zone // cache in ICU has to be populated on starting up. diff --git a/www/chromium/files/patch-base_logging__unittest.cc b/www/chromium/files/patch-base_logging__unittest.cc index 875546922a1c..b792452342c0 100644 --- a/www/chromium/files/patch-base_logging__unittest.cc +++ b/www/chromium/files/patch-base_logging__unittest.cc @@ -1,31 +1,31 @@ ---- base/logging_unittest.cc.orig 2022-02-28 16:54:41 UTC +--- base/logging_unittest.cc.orig 2022-06-17 14:20:10 UTC +++ base/logging_unittest.cc @@ -32,7 +32,7 @@ #include "base/posix/eintr_wrapper.h" #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_FREEBSD) #include #endif -@@ -552,14 +552,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo +@@ -574,14 +574,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo // need the arch-specific boilerplate below, which is inspired by breakpad. // At the same time, on OSX, ucontext.h is deprecated but si_addr works fine. uintptr_t crash_addr = 0; -#if BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FREEBSD) crash_addr = reinterpret_cast(info->si_addr); #else // OS_* ucontext_t* context = reinterpret_cast(context_ptr); #if defined(ARCH_CPU_X86) crash_addr = static_cast(context->uc_mcontext.gregs[REG_EIP]); #elif defined(ARCH_CPU_X86_64) +#if BUILDFLAG(IS_OPENBSD) + crash_addr = static_cast(context->sc_rip); +#else crash_addr = static_cast(context->uc_mcontext.gregs[REG_RIP]); +#endif #elif defined(ARCH_CPU_ARMEL) crash_addr = static_cast(context->uc_mcontext.arm_pc); #elif defined(ARCH_CPU_ARM64) diff --git a/www/chromium/files/patch-base_memory_platform__shared__memory__region.h b/www/chromium/files/patch-base_memory_platform__shared__memory__region.h index 8bc7dfe4b8ec..852cc726f377 100644 --- a/www/chromium/files/patch-base_memory_platform__shared__memory__region.h +++ b/www/chromium/files/patch-base_memory_platform__shared__memory__region.h @@ -1,29 +1,29 @@ ---- base/memory/platform_shared_memory_region.h.orig 2022-05-19 14:06:27 UTC +--- base/memory/platform_shared_memory_region.h.orig 2022-06-17 14:20:10 UTC +++ base/memory/platform_shared_memory_region.h -@@ -14,7 +14,7 @@ +@@ -16,7 +16,7 @@ #include -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) namespace content { class SandboxIPCHandler; } -@@ -81,7 +81,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { +@@ -83,7 +83,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { kMaxValue = GET_SHMEM_TEMP_DIR_FAILURE }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Structure to limit access to executable region creation. struct ExecutableRegion { private: @@ -211,7 +211,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { CheckPlatformHandlePermissionsCorrespondToMode); static PlatformSharedMemoryRegion Create(Mode mode, size_t size -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) , bool executable = false #endif diff --git a/www/chromium/files/patch-base_process_launch.h b/www/chromium/files/patch-base_process_launch.h index 5ad4c6605f88..2a8f08199824 100644 --- a/www/chromium/files/patch-base_process_launch.h +++ b/www/chromium/files/patch-base_process_launch.h @@ -1,11 +1,11 @@ ---- base/process/launch.h.orig 2022-05-19 14:06:27 UTC +--- base/process/launch.h.orig 2022-06-17 14:20:10 UTC +++ base/process/launch.h -@@ -199,7 +199,7 @@ struct BASE_EXPORT LaunchOptions { +@@ -198,7 +198,7 @@ struct BASE_EXPORT LaunchOptions { bool clear_environment = false; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If non-zero, start the process using clone(), using flags as provided. // Unlike in clone, clone_flags may not contain a custom termination signal // that is sent to the parent when the child dies. The termination signal will diff --git a/www/chromium/files/patch-base_process_launch__posix.cc b/www/chromium/files/patch-base_process_launch__posix.cc index 7e4f92b48eb9..137785dd2f2b 100644 --- a/www/chromium/files/patch-base_process_launch__posix.cc +++ b/www/chromium/files/patch-base_process_launch__posix.cc @@ -1,12 +1,12 @@ ---- base/process/launch_posix.cc.orig 2022-02-07 13:39:41 UTC +--- base/process/launch_posix.cc.orig 2022-06-17 14:20:10 UTC +++ base/process/launch_posix.cc -@@ -64,6 +64,9 @@ +@@ -63,6 +63,9 @@ #error "macOS should use launch_mac.cc" #endif +#if defined(OS_FREEBSD) +#pragma weak environ +#endif extern char** environ; namespace base { diff --git a/www/chromium/files/patch-base_process_process__metrics.cc b/www/chromium/files/patch-base_process_process__metrics.cc index 504425708f12..612be1c5ded0 100644 --- a/www/chromium/files/patch-base_process_process__metrics.cc +++ b/www/chromium/files/patch-base_process_process__metrics.cc @@ -1,47 +1,47 @@ ---- base/process/process_metrics.cc.orig 2022-05-19 14:06:27 UTC +--- base/process/process_metrics.cc.orig 2022-06-17 14:20:10 UTC +++ base/process/process_metrics.cc -@@ -18,7 +18,7 @@ namespace base { +@@ -17,7 +17,7 @@ namespace base { namespace { #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int CalculateEventsPerSecond(uint64_t event_count, uint64_t* last_event_count, base::TimeTicks* last_calculated) { -@@ -55,7 +55,7 @@ SystemMetrics SystemMetrics::Sample() { +@@ -54,7 +54,7 @@ SystemMetrics SystemMetrics::Sample() { SystemMetrics system_metrics; system_metrics.committed_memory_ = GetSystemCommitCharge(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) GetSystemMemoryInfo(&system_metrics.memory_info_); GetVmStatInfo(&system_metrics.vmstat_info_); GetSystemDiskInfo(&system_metrics.disk_info_); -@@ -74,7 +74,7 @@ Value SystemMetrics::ToValue() const { +@@ -73,7 +73,7 @@ Value SystemMetrics::ToValue() const { Value res(Value::Type::DICTIONARY); res.SetIntKey("committed_memory", static_cast(committed_memory_)); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) Value meminfo = memory_info_.ToValue(); Value vmstat = vmstat_info_.ToValue(); meminfo.MergeDictionary(&vmstat); -@@ -100,7 +100,7 @@ std::unique_ptr ProcessMetrics::Create +@@ -99,7 +99,7 @@ std::unique_ptr ProcessMetrics::Create #endif // !BUILDFLAG(IS_MAC) } -#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) +#if !BUILDFLAG(IS_BSD) || !BUILDFLAG(IS_POSIX) double ProcessMetrics::GetPlatformIndependentCPUUsage() { TimeDelta cumulative_cpu = GetCumulativeCPUUsage(); TimeTicks time = TimeTicks::Now(); -@@ -151,7 +151,7 @@ double ProcessMetrics::GetPreciseCPUUsage() { +@@ -150,7 +150,7 @@ double ProcessMetrics::GetPreciseCPUUsage() { #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int ProcessMetrics::CalculateIdleWakeupsPerSecond( uint64_t absolute_idle_wakeups) { return CalculateEventsPerSecond(absolute_idle_wakeups, diff --git a/www/chromium/files/patch-base_process_process__metrics.h b/www/chromium/files/patch-base_process_process__metrics.h index c6d856e7598b..79286ab92b7d 100644 --- a/www/chromium/files/patch-base_process_process__metrics.h +++ b/www/chromium/files/patch-base_process_process__metrics.h @@ -1,119 +1,119 @@ ---- base/process/process_metrics.h.orig 2022-05-19 14:06:27 UTC +--- base/process/process_metrics.h.orig 2022-06-17 14:20:10 UTC +++ base/process/process_metrics.h -@@ -36,7 +36,7 @@ +@@ -35,7 +35,7 @@ #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) #include #include #include -@@ -52,7 +52,7 @@ class Value; +@@ -51,7 +51,7 @@ class Value; // Full declaration is in process_metrics_iocounters.h. struct IoCounters; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Minor and major page fault counts since the process creation. // Both counts are process-wide, and exclude child processes. // -@@ -107,7 +107,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -106,7 +106,7 @@ class BASE_EXPORT ProcessMetrics { // convenience wrapper for CreateProcessMetrics(). static std::unique_ptr CreateCurrentProcessMetrics(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Resident Set Size is a Linux/Android specific memory concept. Do not // attempt to extend this to other platforms. BASE_EXPORT size_t GetResidentSetSize() const; -@@ -155,7 +155,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -154,7 +154,7 @@ class BASE_EXPORT ProcessMetrics { #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Emits the cumulative CPU usage for all currently active threads since they // were started into the output parameter (replacing its current contents). // Threads that have already terminated will not be reported. Thus, the sum of -@@ -238,7 +238,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -237,7 +237,7 @@ class BASE_EXPORT ProcessMetrics { int GetOpenFdSoftLimit() const; #endif // BUILDFLAG(IS_POSIX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Bytes of swap as reported by /proc/[pid]/status. uint64_t GetVmSwapBytes() const; -@@ -259,7 +259,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -258,7 +258,7 @@ class BASE_EXPORT ProcessMetrics { #endif // !BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups); #endif #if BUILDFLAG(IS_APPLE) -@@ -270,7 +270,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -269,7 +269,7 @@ class BASE_EXPORT ProcessMetrics { #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) CPU::CoreType GetCoreType(int core_index); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) -@@ -294,7 +294,7 @@ class BASE_EXPORT ProcessMetrics { +@@ -293,7 +293,7 @@ class BASE_EXPORT ProcessMetrics { #endif #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Same thing for idle wakeups. TimeTicks last_idle_wakeups_time_; uint64_t last_absolute_idle_wakeups_; -@@ -337,7 +337,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de +@@ -336,7 +336,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Data about system-wide memory consumption. Values are in KB. Available on // Windows, Mac, Linux, Android and Chrome OS. // -@@ -372,7 +372,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -371,7 +371,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // This provides an estimate of available memory as described here: // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773 // NOTE: this is ONLY valid in kernels 3.14 and up. Its value will always -@@ -387,7 +387,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { +@@ -386,7 +386,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { #endif #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) int buffers = 0; int cached = 0; int active_anon = 0; -@@ -424,7 +424,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK +@@ -423,7 +423,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK // BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Parse the data found in /proc//stat and return the sum of the // CPU-related ticks. Returns -1 on parse error. // Exposed for testing. -@@ -611,7 +611,7 @@ class BASE_EXPORT SystemMetrics { +@@ -610,7 +610,7 @@ class BASE_EXPORT SystemMetrics { FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics); size_t committed_memory_; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) SystemMemoryInfoKB memory_info_; VmStatInfo vmstat_info_; SystemDiskInfo disk_info_; diff --git a/www/chromium/files/patch-base_process_process__unittest.cc b/www/chromium/files/patch-base_process_process__unittest.cc index 0b87a05680b7..32da363685fc 100644 --- a/www/chromium/files/patch-base_process_process__unittest.cc +++ b/www/chromium/files/patch-base_process_process__unittest.cc @@ -1,11 +1,11 @@ ---- base/process/process_unittest.cc.orig 2022-02-28 16:54:41 UTC +--- base/process/process_unittest.cc.orig 2022-06-17 14:20:10 UTC +++ base/process/process_unittest.cc -@@ -140,7 +140,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) { +@@ -139,7 +139,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) { // was spawned and a time recorded after it was spawned. However, since the // base::Time and process creation clocks don't match, tolerate some error. constexpr base::TimeDelta kTolerance = -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux, process creation time is relative to boot time which has a // 1-second resolution. Tolerate 1 second for the imprecise boot time and // 100 ms for the imprecise clock. diff --git a/www/chromium/files/patch-base_synchronization_lock__impl.h b/www/chromium/files/patch-base_synchronization_lock__impl.h index 4c06c2a54589..baac846e9d78 100644 --- a/www/chromium/files/patch-base_synchronization_lock__impl.h +++ b/www/chromium/files/patch-base_synchronization_lock__impl.h @@ -1,23 +1,23 @@ ---- base/synchronization/lock_impl.h.orig 2022-05-19 14:06:27 UTC +--- base/synchronization/lock_impl.h.orig 2022-06-17 14:20:10 UTC +++ base/synchronization/lock_impl.h -@@ -106,6 +106,10 @@ void LockImpl::Unlock() { +@@ -107,6 +107,10 @@ void LockImpl::Unlock() { } #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_FREEBSD) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wthread-safety-analysis" +#endif #if DCHECK_IS_ON() BASE_EXPORT void dcheck_trylock_result(int rv); -@@ -126,6 +130,9 @@ void LockImpl::Unlock() { +@@ -127,6 +131,9 @@ void LockImpl::Unlock() { dcheck_unlock_result(rv); #endif } +#if BUILDFLAG(IS_FREEBSD) +#pragma GCC diagnostic pop +#endif #endif // This is an implementation used for AutoLock templated on the lock type. diff --git a/www/chromium/files/patch-base_system_sys__info.cc b/www/chromium/files/patch-base_system_sys__info.cc index 9c2c95db0407..a9affa23e4ae 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 2022-05-19 14:06:27 UTC +--- base/system/sys_info.cc.orig 2022-06-17 14:20:10 UTC +++ base/system/sys_info.cc -@@ -104,7 +104,7 @@ void SysInfo::GetHardwareInfo(base::OnceCallback>:: Leaky g_lazy_number_of_processors = LAZY_INSTANCE_INITIALIZER; -#endif // !BUILDFLAG(IS_OPENBSD) +#endif // !BUILDFLAG(IS_BSD) int64_t AmountOfVirtualMemory() { struct rlimit limit; -@@ -143,11 +143,11 @@ bool GetDiskSpaceInfo(const base::FilePath& path, +@@ -142,11 +142,11 @@ bool GetDiskSpaceInfo(const base::FilePath& path, namespace base { -#if !BUILDFLAG(IS_OPENBSD) +#if !BUILDFLAG(IS_BSD) int SysInfo::NumberOfProcessors() { return g_lazy_number_of_processors.Get().value(); } -#endif // !BUILDFLAG(IS_OPENBSD) +#endif // !BUILDFLAG(IS_BSD) // static int64_t SysInfo::AmountOfVirtualMemory() { -@@ -239,6 +239,8 @@ std::string SysInfo::OperatingSystemArchitecture() { +@@ -236,6 +236,8 @@ std::string SysInfo::OperatingSystemArchitecture() { arch = "x86"; } else if (arch == "amd64") { arch = "x86_64"; + } else if (arch == "arm64") { + arch = "aarch64"; } else if (std::string(info.sysname) == "AIX") { arch = "ppc64"; } diff --git a/www/chromium/files/patch-base_system_sys__info__unittest.cc b/www/chromium/files/patch-base_system_sys__info__unittest.cc index 2d9da201de79..f7c662a4e82e 100644 --- a/www/chromium/files/patch-base_system_sys__info__unittest.cc +++ b/www/chromium/files/patch-base_system_sys__info__unittest.cc @@ -1,19 +1,19 @@ ---- base/system/sys_info_unittest.cc.orig 2022-03-25 21:59:56 UTC +--- base/system/sys_info_unittest.cc.orig 2022-06-17 14:20:10 UTC +++ base/system/sys_info_unittest.cc -@@ -234,12 +234,15 @@ TEST_F(SysInfoTest, GetHardwareInfo) { +@@ -233,12 +233,15 @@ TEST_F(SysInfoTest, GetHardwareInfo) { EXPECT_TRUE(IsStringUTF8(hardware_info->model)); bool empty_result_expected = #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) false; #else true; #endif EXPECT_EQ(hardware_info->manufacturer.empty(), empty_result_expected); +#if BUILDFLAG(IS_BSD) + empty_result_expected = true; +#endif EXPECT_EQ(hardware_info->model.empty(), empty_result_expected); } diff --git a/www/chromium/files/patch-base_threading_platform__thread__linux.cc b/www/chromium/files/patch-base_threading_platform__thread__linux.cc index db45be7f723b..d10b804f030b 100644 --- a/www/chromium/files/patch-base_threading_platform__thread__linux.cc +++ b/www/chromium/files/patch-base_threading_platform__thread__linux.cc @@ -1,77 +1,77 @@ ---- base/threading/platform_thread_linux.cc.orig 2022-05-19 14:06:27 UTC +--- base/threading/platform_thread_linux.cc.orig 2022-06-17 14:20:10 UTC +++ base/threading/platform_thread_linux.cc -@@ -30,7 +30,9 @@ +@@ -29,7 +29,9 @@ #if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) #include +#if !BUILDFLAG(IS_BSD) #include +#endif #include #include #include -@@ -133,7 +135,7 @@ int sched_setattr(pid_t pid, +@@ -132,7 +134,7 @@ int sched_setattr(pid_t pid, #endif // !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) - #endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) + #endif // BUILDFLAG(IS_CHROMEOS) -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) const FilePath::CharType kCgroupDirectory[] = FILE_PATH_LITERAL("/sys/fs/cgroup"); -@@ -287,7 +289,7 @@ void SetThreadCgroupsForThreadPriority(PlatformThreadI +@@ -286,7 +288,7 @@ void SetThreadCgroupsForThreadPriority(PlatformThreadI namespace internal { namespace { -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) const struct sched_param kRealTimePrio = {8}; #endif } // namespace -@@ -300,7 +302,7 @@ const ThreadPriorityToNiceValuePair kThreadPriorityToN +@@ -299,7 +301,7 @@ const ThreadPriorityToNiceValuePair kThreadPriorityToN }; bool CanSetThreadPriorityToRealtimeAudio() { -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) // A non-zero soft-limit on RLIMIT_RTPRIO is required to be allowed to invoke // pthread_setschedparam in SetCurrentThreadPriorityForPlatform(). struct rlimit rlim; -@@ -311,7 +313,7 @@ bool CanSetThreadPriorityToRealtimeAudio() { +@@ -310,7 +312,7 @@ bool CanSetThreadPriorityToRealtimeAudio() { } bool SetCurrentThreadPriorityForPlatform(ThreadPriority priority) { -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) // For legacy schedtune interface SetThreadCgroupsForThreadPriority(PlatformThread::CurrentId(), priority); -@@ -329,7 +331,7 @@ bool SetCurrentThreadPriorityForPlatform(ThreadPriorit +@@ -328,7 +330,7 @@ bool SetCurrentThreadPriorityForPlatform(ThreadPriorit } absl::optional GetCurrentThreadPriorityForPlatform() { -#if !BUILDFLAG(IS_NACL) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) int maybe_sched_rr = 0; struct sched_param maybe_realtime_prio = {0}; if (pthread_getschedparam(pthread_self(), &maybe_sched_rr, -@@ -348,7 +350,7 @@ absl::optional GetCurrentThreadPriorit +@@ -347,7 +349,7 @@ absl::optional GetCurrentThreadPriorit void PlatformThread::SetName(const std::string& name) { ThreadIdNameManager::GetInstance()->SetName(name); -#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) +#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) && !BUILDFLAG(IS_BSD) // On linux we can get the thread names to show up in the debugger by setting // the process name for the LWP. We don't want to do this for the main // thread because that would rename the process, causing tools like killall -@@ -378,8 +380,10 @@ void PlatformThread::SetThreadPriority(ProcessId proce +@@ -377,8 +379,10 @@ void PlatformThread::SetThreadPriority(ProcessId proce // priority. CHECK_NE(thread_id, process_id); +#if !BUILDFLAG(IS_BSD) // For legacy schedtune interface SetThreadCgroupsForThreadPriority(thread_id, priority); +#endif - #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) + #if BUILDFLAG(IS_CHROMEOS) // For upstream uclamp interface. We try both legacy (schedtune, as done diff --git a/www/chromium/files/patch-base_trace__event_malloc__dump__provider.cc b/www/chromium/files/patch-base_trace__event_malloc__dump__provider.cc index 630217b469e1..3a85c8907285 100644 --- a/www/chromium/files/patch-base_trace__event_malloc__dump__provider.cc +++ b/www/chromium/files/patch-base_trace__event_malloc__dump__provider.cc @@ -1,31 +1,31 @@ ---- base/trace_event/malloc_dump_provider.cc.orig 2022-05-19 14:06:27 UTC +--- base/trace_event/malloc_dump_provider.cc.orig 2022-06-17 14:20:10 UTC +++ base/trace_event/malloc_dump_provider.cc @@ -23,6 +23,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif defined(OS_BSD) +#include #else #include #endif -@@ -174,7 +176,8 @@ void ReportAppleAllocStats(size_t* total_virtual_size, +@@ -176,7 +178,8 @@ void ReportAppleAllocStats(size_t* total_virtual_size, #if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \ (!BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) && \ - !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_FUCHSIA)) + !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_FUCHSIA) && \ + !BUILDFLAG(IS_BSD)) void ReportMallinfoStats(ProcessMemoryDump* pmd, size_t* total_virtual_size, size_t* resident_size, -@@ -339,6 +342,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump +@@ -341,6 +344,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump &allocated_objects_count); #elif BUILDFLAG(IS_FUCHSIA) // TODO(fuchsia): Port, see https://crbug.com/706592. +#elif defined(OS_BSD) + total_virtual_size = 0; + allocated_objects_size = 0; #else ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size, &allocated_objects_size, &allocated_objects_count); diff --git a/www/chromium/files/patch-base_trace__event_process__memory__dump.cc b/www/chromium/files/patch-base_trace__event_process__memory__dump.cc index d31975d16574..e697c602ffd7 100644 --- a/www/chromium/files/patch-base_trace__event_process__memory__dump.cc +++ b/www/chromium/files/patch-base_trace__event_process__memory__dump.cc @@ -1,20 +1,20 @@ ---- base/trace_event/process_memory_dump.cc.orig 2022-02-28 16:54:41 UTC +--- base/trace_event/process_memory_dump.cc.orig 2022-06-17 14:20:10 UTC +++ base/trace_event/process_memory_dump.cc -@@ -105,7 +105,7 @@ absl::optional ProcessMemoryDump::CountResiden +@@ -106,7 +106,7 @@ absl::optional ProcessMemoryDump::CountResiden #if BUILDFLAG(IS_WIN) std::unique_ptr vec( new PSAPI_WORKING_SET_EX_INFORMATION[max_vec_size]); -#elif BUILDFLAG(IS_APPLE) +#elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) std::unique_ptr vec(new char[max_vec_size]); #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) std::unique_ptr vec(new unsigned char[max_vec_size]); -@@ -130,7 +130,7 @@ absl::optional ProcessMemoryDump::CountResiden +@@ -131,7 +131,7 @@ absl::optional ProcessMemoryDump::CountResiden for (size_t i = 0; i < page_count; i++) resident_page_count += vec[i].VirtualAttributes.Valid; -#elif BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // TODO(fuchsia): Port, see https://crbug.com/706592. #elif BUILDFLAG(IS_APPLE) // mincore in MAC does not fail with EAGAIN. diff --git a/www/chromium/files/patch-build_config_compiler_BUILD.gn b/www/chromium/files/patch-build_config_compiler_BUILD.gn index 890458560e59..aa5b6f12202c 100644 --- a/www/chromium/files/patch-build_config_compiler_BUILD.gn +++ b/www/chromium/files/patch-build_config_compiler_BUILD.gn @@ -1,122 +1,119 @@ ---- build/config/compiler/BUILD.gn.orig 2022-05-19 14:06:27 UTC +--- build/config/compiler/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ build/config/compiler/BUILD.gn @@ -231,13 +231,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 --------------------------------------------------------------------- @@ -447,6 +450,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_gold) { @@ -522,7 +529,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 ] # TODO(hans): Remove this once Clang generates better optimized debug info -@@ -904,7 +911,7 @@ config("compiler_cpu_abi") { +@@ -903,7 +910,7 @@ config("compiler_cpu_abi") { ] } } else if (current_cpu == "arm") { - if (is_clang && !is_android && !is_nacl) { + if (is_clang && !is_android && !is_nacl && !is_bsd) { cflags += [ "--target=arm-linux-gnueabihf" ] ldflags += [ "--target=arm-linux-gnueabihf" ] } -@@ -918,7 +925,7 @@ config("compiler_cpu_abi") { +@@ -917,7 +924,7 @@ config("compiler_cpu_abi") { cflags += [ "-mtune=$arm_tune" ] } } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_nacl && !is_fuchsia) { + if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) { cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] } -@@ -1239,7 +1246,7 @@ config("compiler_deterministic") { +@@ -1238,7 +1245,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", -@@ -1530,7 +1537,7 @@ config("default_warnings") { +@@ -1529,12 +1536,12 @@ config("default_warnings") { "-Wno-ignored-pragma-optimize", ] - if (!is_nacl) { + if (!is_nacl && !is_bsd) { # TODO(https://crbug.com/1300731) Clean up and enable. cflags += [ "-Wno-unqualified-std-cast-call" ] - -@@ -1538,7 +1545,7 @@ config("default_warnings") { - cflags += [ "-Wno-deprecated-non-prototype" ] } - if (!is_nacl && !(is_chromeos || + if (!is_nacl && !is_bsd && !(is_chromeos || default_toolchain == "//build/toolchain/cros:target")) { # TODO(https://crbug.com/1316298): Re-enable once test failure is figured out cflags += [ -@@ -1723,7 +1730,7 @@ config("no_chromium_code") { +@@ -1719,7 +1726,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", -@@ -2237,7 +2244,7 @@ config("afdo_optimize_size") { +@@ -2233,7 +2240,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. -@@ -2253,7 +2260,7 @@ config("afdo") { +@@ -2249,7 +2256,7 @@ config("afdo") { cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ] inputs = [ _clang_sample_profile ] } - } else if (auto_profile_path != "" && is_a_target_toolchain) { + } else if (auto_profile_path != "" && is_a_target_toolchain && !is_bsd) { cflags = [ "-fauto-profile=${auto_profile_path}" ] inputs = [ auto_profile_path ] } -@@ -2396,7 +2403,8 @@ config("symbols") { +@@ -2392,7 +2399,8 @@ config("symbols") { } } - if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") { + if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos" && + !is_bsd) { if (is_apple) { # TODO(https://crbug.com/1050118): Investigate missing debug info on mac. # Make sure we don't use constructor homing on mac. diff --git a/www/chromium/files/patch-build_config_rust.gni b/www/chromium/files/patch-build_config_rust.gni index 88a93d14ee6d..724cec8e0742 100644 --- a/www/chromium/files/patch-build_config_rust.gni +++ b/www/chromium/files/patch-build_config_rust.gni @@ -1,11 +1,11 @@ ---- build/config/rust.gni.orig 2022-03-25 21:59:56 UTC +--- build/config/rust.gni.orig 2022-06-17 14:20:10 UTC +++ build/config/rust.gni -@@ -116,7 +116,7 @@ if (enable_rust) { +@@ -124,7 +124,7 @@ if (enable_rust) { rust_sysroot = "//third_party/rust-toolchain" use_unverified_rust_toolchain = false } else { - if (host_os != "linux") { + if (host_os != "linux" && host_os != "openbsd" && host_os != "freebsd") { assert(false, "Attempt to use Android Rust toolchain on an unsupported platform") } diff --git a/www/chromium/files/patch-build_linux_unbundle_libxml.gn b/www/chromium/files/patch-build_linux_unbundle_libxml.gn deleted file mode 100644 index 37cfca7fbd71..000000000000 --- a/www/chromium/files/patch-build_linux_unbundle_libxml.gn +++ /dev/null @@ -1,10 +0,0 @@ ---- build/linux/unbundle/libxml.gn.orig 2022-04-21 18:48:31 UTC -+++ build/linux/unbundle/libxml.gn -@@ -19,6 +19,7 @@ static_library("libxml_utils") { - ":xml_reader", - ":xml_writer", - "//base/test:test_support", -+ "//services/data_decoder:lib", - "//services/data_decoder:xml_parser_fuzzer_deps", - ] - sources = [ diff --git a/www/chromium/files/patch-cc_BUILD.gn b/www/chromium/files/patch-cc_BUILD.gn index 1812b54d7afc..b6f50ae884f8 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 2022-04-21 18:48:31 UTC +--- cc/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ cc/BUILD.gn -@@ -665,7 +665,7 @@ cc_test_static_library("test_support") { +@@ -669,7 +669,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" ] } } -@@ -893,7 +893,6 @@ cc_test("cc_unittests") { +@@ -897,7 +897,6 @@ cc_test("cc_unittests") { data = [ "//components/viz/test/data/" ] data_deps = [ "//testing/buildbot/filters:cc_unittests_filters", - "//third_party/mesa_headers", ] if (is_android && enable_chrome_android_internal) { diff --git a/www/chromium/files/patch-chrome_app_app__management__strings.grdp b/www/chromium/files/patch-chrome_app_app__management__strings.grdp index b7638925e9e3..3499a698d0af 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 2022-05-19 14:06:27 UTC +--- chrome/app/app_management_strings.grdp.orig 2022-06-17 14:20:10 UTC +++ chrome/app/app_management_strings.grdp -@@ -165,7 +165,7 @@ +@@ -174,7 +174,7 @@ - -- -+ + +- ++ 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__command__ids.h b/www/chromium/files/patch-chrome_app_chrome__command__ids.h index cf79191cac1c..e5fe7eacffed 100644 --- a/www/chromium/files/patch-chrome_app_chrome__command__ids.h +++ b/www/chromium/files/patch-chrome_app_chrome__command__ids.h @@ -1,20 +1,11 @@ ---- chrome/app/chrome_command_ids.h.orig 2022-04-21 18:48:31 UTC +--- chrome/app/chrome_command_ids.h.orig 2022-06-17 14:20:10 UTC +++ chrome/app/chrome_command_ids.h -@@ -66,7 +66,7 @@ +@@ -67,7 +67,7 @@ #define IDC_NAME_WINDOW 34049 // 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) #define IDC_USE_SYSTEM_TITLE_BAR 34051 #define IDC_RESTORE_WINDOW 34052 #endif -@@ -447,7 +447,7 @@ - #define IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_QUERY 52414 - #endif - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Screen AI - #define IDC_RUN_SCREEN_AI 52420 - #endif diff --git a/www/chromium/files/patch-chrome_app_chrome__main.cc b/www/chromium/files/patch-chrome_app_chrome__main.cc index 6dcdad77169d..f0268b40f412 100644 --- a/www/chromium/files/patch-chrome_app_chrome__main.cc +++ b/www/chromium/files/patch-chrome_app_chrome__main.cc @@ -1,20 +1,20 @@ ---- chrome/app/chrome_main.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/app/chrome_main.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/app/chrome_main.cc -@@ -25,7 +25,7 @@ +@@ -26,7 +26,7 @@ #include "chrome/app/notification_metrics.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/base_switches.h" #endif -@@ -146,7 +146,7 @@ int ChromeMain(int argc, const char** argv) { +@@ -147,7 +147,7 @@ int ChromeMain(int argc, const char** argv) { headless::SetUpCommandLine(command_line); } else { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (command_line->HasSwitch(switches::kHeadless)) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) command_line->AppendSwitch(::headless::switches::kEnableCrashReporter); diff --git a/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc b/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc index e2579407f457..e725615c2082 100644 --- a/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc +++ b/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc @@ -1,107 +1,107 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/app/chrome_main_delegate.cc -@@ -116,7 +116,7 @@ +@@ -117,7 +117,7 @@ #include "chrome/app/chrome_crash_reporter_client.h" #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) #include "components/nacl/common/nacl_paths.h" #include "components/nacl/zygote/nacl_fork_delegate_linux.h" #endif -@@ -159,12 +159,12 @@ +@@ -160,12 +160,12 @@ #include "v8/include/v8.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/environment.h" #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/policy_path_parser.h" #include "components/crash/core/app/crashpad.h" #endif @@ -308,7 +308,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 @@ -348,7 +348,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) || @@ -412,7 +412,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. @@ -496,7 +496,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Record the startup process creation time on supported platforms. On Android // this is recorded in ChromeMainDelegateAndroid. startup_metric_utils::RecordStartupProcessCreationTime( -@@ -669,6 +669,8 @@ void ChromeMainDelegate::PostFieldTrialInitialization( +@@ -668,6 +668,8 @@ void ChromeMainDelegate::PostFieldTrialInitialization( // not always enabled on Linux/ChromeOS. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) bool enable_gwp_asan = crash_reporter::IsCrashpadEnabled(); +#elif BUILDFLAG(IS_BSD) + bool enable_gwp_asan = false; #else bool enable_gwp_asan = true; #endif -@@ -807,7 +809,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi +@@ -806,7 +808,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi } // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // This will directly exit if the user asked for help. HandleHelpSwitches(command_line); #endif -@@ -838,7 +840,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi - #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +@@ -837,7 +839,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi + #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 -@@ -1153,7 +1155,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1163,7 +1165,7 @@ void ChromeMainDelegate::PreSandboxStartup() { locale; } -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess) { #if BUILDFLAG(IS_ANDROID) -@@ -1223,7 +1225,7 @@ absl::variant Chrome +@@ -1233,7 +1235,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 aa755102c0fe..28bfed9125df 100644 --- a/www/chromium/files/patch-chrome_app_chromium__strings.grd +++ b/www/chromium/files/patch-chrome_app_chromium__strings.grd @@ -1,20 +1,20 @@ ---- chrome/app/chromium_strings.grd.orig 2022-05-19 14:06:27 UTC +--- chrome/app/chromium_strings.grd.orig 2022-06-17 14:20:10 UTC +++ chrome/app/chromium_strings.grd @@ -296,7 +296,7 @@ If you update this file, be sure also to update google Welcome to Chromium; new browser window opened - + Welcome to Chromium -@@ -981,7 +981,7 @@ Permissions you've already given to websites and apps - - - -- -+ - - The profile appears to be in use by another Chromium process ($112345) on another computer ($2example.com). Chromium has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chromium. +@@ -410,7 +410,7 @@ If you update this file, be sure also to update google + Chromium may not function correctly because it is no longer supported on Windows XP or Windows Vista + + +- ++ + + Chromium may not function correctly because it is no longer supported on this Linux distribution diff --git a/www/chromium/files/patch-chrome_app_generated__resources.grd b/www/chromium/files/patch-chrome_app_generated__resources.grd index b1dbb1741e2e..809a54ddbe8e 100644 --- a/www/chromium/files/patch-chrome_app_generated__resources.grd +++ b/www/chromium/files/patch-chrome_app_generated__resources.grd @@ -1,38 +1,38 @@ ---- chrome/app/generated_resources.grd.orig 2022-05-19 14:06:27 UTC +--- chrome/app/generated_resources.grd.orig 2022-06-17 14:20:10 UTC +++ chrome/app/generated_resources.grd @@ -2,7 +2,7 @@ -@@ -3013,7 +3013,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -2989,7 +2989,7 @@ are declared in tools/grit/grit_rule.gni. - + Device Credentials -@@ -8670,7 +8670,7 @@ Keep your key file in a safe place. You will need it t +@@ -8669,7 +8669,7 @@ Check your passwords anytime in + Use system title bar and borders -@@ -9821,7 +9821,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -9823,7 +9823,7 @@ Please help our engineers fix this problem. Tell us wh Set as default - + Minimize 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 4202f42e44a1..5306ef5a6679 100644 --- a/www/chromium/files/patch-chrome_app_google__chrome__strings.grd +++ b/www/chromium/files/patch-chrome_app_google__chrome__strings.grd @@ -1,20 +1,20 @@ ---- chrome/app/google_chrome_strings.grd.orig 2022-05-19 14:06:27 UTC +--- chrome/app/google_chrome_strings.grd.orig 2022-06-17 14:20:10 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 -@@ -1048,7 +1048,7 @@ Permissions you've already given to websites and apps - - - -- -+ - - The profile appears to be in use by another Google Chrome process ($112345) on another computer ($2example.com). Chrome has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chrome. +@@ -438,7 +438,7 @@ chromium_strings.grd. --> + This computer will no longer receive Google Chrome updates because Windows XP and Windows Vista are no longer supported + + +- ++ + + Google Chrome may not function correctly because it is no longer supported on this Linux distribution diff --git a/www/chromium/files/patch-chrome_app_theme_theme__resources.grd b/www/chromium/files/patch-chrome_app_theme_theme__resources.grd index 959a0c285ffa..491d03995e76 100644 --- a/www/chromium/files/patch-chrome_app_theme_theme__resources.grd +++ b/www/chromium/files/patch-chrome_app_theme_theme__resources.grd @@ -1,34 +1,34 @@ ---- chrome/app/theme/theme_resources.grd.orig 2022-05-19 14:06:27 UTC +--- chrome/app/theme/theme_resources.grd.orig 2022-06-17 14:20:10 UTC +++ chrome/app/theme/theme_resources.grd -@@ -128,11 +128,11 @@ +@@ -130,11 +130,11 @@ - + - + -@@ -140,7 +140,7 @@ +@@ -142,7 +142,7 @@ - + -@@ -148,7 +148,7 @@ +@@ -150,7 +150,7 @@ - + diff --git a/www/chromium/files/patch-chrome_browser_about__flags.cc b/www/chromium/files/patch-chrome_browser_about__flags.cc index b4582e90b40e..c64416ccb5bb 100644 --- a/www/chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/chromium/files/patch-chrome_browser_about__flags.cc @@ -1,110 +1,101 @@ ---- chrome/browser/about_flags.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/about_flags.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/about_flags.cc @@ -202,7 +202,7 @@ #include "ui/native_theme/native_theme_features.h" #include "ui/ui_features.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/allocator/buildflags.h" #endif -@@ -274,7 +274,7 @@ - #include "chrome/browser/supervised_user/supervised_user_features/supervised_user_features.h" +@@ -275,7 +275,7 @@ + #include "chrome/browser/supervised_user/supervised_user_features/supervised_user_features.h" // nogncheck #endif // ENABLE_SUPERVISED_USERS -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "ui/ozone/buildflags.h" #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -@@ -363,7 +363,7 @@ const FeatureEntry::Choice kUseAngleChoicesMac[] = { +@@ -364,7 +364,7 @@ const FeatureEntry::Choice kUseAngleChoicesMac[] = { gl::kANGLEImplementationMetalName}}; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const FeatureEntry::Choice kOzonePlatformHintRuntimeChoices[] = { {flag_descriptions::kOzonePlatformHintChoiceDefault, "", ""}, {flag_descriptions::kOzonePlatformHintChoiceAuto, @@ -1055,7 +1055,7 @@ const FeatureEntry::FeatureVariation kJourneysOnDevice }; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kOmniboxDocumentProviderServerScoring[] = { {"DocumentUseServerScore", "true"}, {"DocumentUseClientScore", "false"}, -@@ -3668,7 +3668,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -3681,7 +3681,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(chromeos::kLacrosTtsSupport)}, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { "enable-accelerated-video-decode", flag_descriptions::kAcceleratedVideoDecodeName, -@@ -4271,7 +4271,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4283,7 +4283,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWebShare)}, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName, - flag_descriptions::kOzonePlatformHintDescription, kOsLinux | kOsLacros, + flag_descriptions::kOzonePlatformHintDescription, kOsLinux, MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, -@@ -4291,7 +4291,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4302,7 +4302,7 @@ const FeatureEntry kFeatureEntries[] = { password_manager::features::kForceInitialSyncWhenDecryptionFails)}, #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"skip-undecryptable-passwords", flag_descriptions::kSkipUndecryptablePasswordsName, flag_descriptions::kSkipUndecryptablePasswordsDescription, -@@ -4986,7 +4986,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4979,7 +4979,7 @@ const FeatureEntry kFeatureEntries[] = { "OmniboxBundledExperimentV1")}, #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"omnibox-experimental-keyword-mode", flag_descriptions::kOmniboxExperimentalKeywordModeName, flag_descriptions::kOmniboxExperimentalKeywordModeDescription, kOsDesktop, -@@ -5375,7 +5375,7 @@ const FeatureEntry kFeatureEntries[] = { - #endif // BUILDFLAG(IS_ANDROID) - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - {"webui-feedback", flag_descriptions::kWebuiFeedbackName, - flag_descriptions::kWebuiFeedbackDescription, kOsDesktop, - FEATURE_VALUE_TYPE(features::kWebUIFeedback)}, -@@ -6396,7 +6396,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6378,7 +6378,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kMouseSubframeNoImplicitCapture)}, #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"global-media-controls-modern-ui", flag_descriptions::kGlobalMediaControlsModernUIName, flag_descriptions::kGlobalMediaControlsModernUIDescription, -@@ -7260,7 +7260,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7251,7 +7251,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)}, -@@ -7551,7 +7551,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7547,7 +7547,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, 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 ddb257f073dc..74f8da11f951 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 2022-05-19 14:06:27 UTC +--- chrome/browser/browser_process_impl.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/browser_process_impl.cc -@@ -209,7 +209,7 @@ +@@ -208,7 +208,7 @@ #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/error_reporting/chrome_js_error_report_processor.h" // nogncheck #endif -@@ -1158,7 +1158,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1153,7 +1153,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 -@@ -1415,7 +1415,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1405,7 +1405,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 4b7342b9edb6..cf6f1932bf97 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 2022-04-21 18:48:31 UTC +--- chrome/browser/browser_process_impl.h.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/browser_process_impl.h -@@ -366,7 +366,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -358,7 +358,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_browser__resources.grd b/www/chromium/files/patch-chrome_browser_browser__resources.grd index b340908a4530..2e2aebe2dfa9 100644 --- a/www/chromium/files/patch-chrome_browser_browser__resources.grd +++ b/www/chromium/files/patch-chrome_browser_browser__resources.grd @@ -1,11 +1,11 @@ ---- chrome/browser/browser_resources.grd.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/browser_resources.grd.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/browser_resources.grd -@@ -119,7 +119,7 @@ +@@ -125,7 +125,7 @@ - + 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 4e550f8411c9..53c50bc0a333 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc +++ b/www/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc @@ -1,71 +1,71 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -100,13 +100,13 @@ +@@ -110,13 +110,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 -@@ -177,7 +177,7 @@ +@@ -183,7 +183,7 @@ #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/discards/discards.mojom.h" #include "chrome/browser/ui/webui/discards/discards_ui.h" #include "chrome/browser/ui/webui/discards/site_data.mojom.h" -@@ -726,7 +726,7 @@ void PopulateChromeFrameBinders( - #endif +@@ -752,7 +752,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)); -@@ -734,7 +734,7 @@ void PopulateChromeFrameBinders( +@@ -760,7 +760,7 @@ void PopulateChromeFrameBinders( #endif #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(blink::features::kDesktopPWAsSubApps) && render_frame_host->IsInPrimaryMainFrame()) { map->Add( -@@ -781,14 +781,14 @@ void PopulateChromeWebUIFrameBinders( +@@ -815,14 +815,14 @@ void PopulateChromeWebUIFrameBinders( SegmentationInternalsUI>(map); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< connectors_internals::mojom::PageHandler, enterprise_connectors::ConnectorsInternalsUI>(map); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map); #endif -@@ -1111,7 +1111,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1163,7 +1163,7 @@ void PopulateChromeWebUIFrameBinders( #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder(map); diff --git a/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc b/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc index 71cba7c6a9bf..478d89ed72f3 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc +++ b/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc @@ -1,52 +1,52 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -230,11 +230,11 @@ +@@ -231,11 +231,11 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/first_run/upgrade_util_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/core/app/breakpad_linux.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -269,7 +269,7 @@ +@@ -270,7 +270,7 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" #include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h" -@@ -1009,7 +1009,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1019,7 +1019,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 . -@@ -1022,7 +1022,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1032,7 +1032,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { } #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) // Set the product channel for crash reports. if (!crash_reporter::IsCrashpadEnabled()) { breakpad::SetChannelCrashKey( -@@ -1043,7 +1043,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1053,7 +1053,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::Initialize(); diff --git a/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc b/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc index 711142efa19a..4393081b8a6f 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,20 +1,28 @@ ---- chrome/browser/chrome_browser_main_linux.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/chrome_browser_main_linux.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/chrome_browser_main_linux.cc -@@ -57,7 +57,7 @@ ChromeBrowserMainPartsLinux::~ChromeBrowserMainPartsLi +@@ -57,13 +57,15 @@ ChromeBrowserMainPartsLinux::~ChromeBrowserMainPartsLi } void ChromeBrowserMainPartsLinux::PostCreateMainMessageLoop() { --#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD) +-#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. - #else -@@ -122,7 +122,7 @@ void ChromeBrowserMainPartsLinux::PostBrowserStart() { + #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 +@@ -123,7 +125,7 @@ void ChromeBrowserMainPartsLinux::PostBrowserStart() { #endif // defined(USE_DBUS) && !BUILDFLAG(IS_CHROMEOS) void ChromeBrowserMainPartsLinux::PostDestroyThreads() { --#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD) +-#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 668295937676..223119fd9585 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,150 +1,150 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -378,7 +378,7 @@ +@@ -381,7 +381,7 @@ #include "components/user_manager/user_manager.h" #include "services/service_manager/public/mojom/interface_provider_spec.mojom.h" #include "storage/browser/file_system/external_mount_points.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_linux.h" #elif BUILDFLAG(IS_ANDROID) #include "base/android/application_status_listener.h" -@@ -448,17 +448,17 @@ +@@ -454,17 +454,17 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/core/app/crash_switches.h" #include "components/crash/core/app/crashpad.h" #endif -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) #if !BUILDFLAG(IS_ANDROID) #include "base/debug/leak_annotations.h" #include "components/crash/core/app/breakpad_linux.h" -@@ -466,12 +466,12 @@ +@@ -472,12 +472,12 @@ #include "components/crash/content/browser/crash_handler_host_linux.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/app_settings/web_app_settings_navigation_throttle.h" #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -493,11 +493,11 @@ +@@ -501,11 +501,11 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/chrome_browser_main_extra_parts_linux.h" #elif defined(USE_OZONE) #include "chrome/browser/chrome_browser_main_extra_parts_ozone.h" -@@ -889,7 +889,7 @@ blink::mojom::AutoplayPolicy GetAutoplayPolicyForWebCo +@@ -892,7 +892,7 @@ blink::mojom::AutoplayPolicy GetAutoplayPolicyForWebCo int GetCrashSignalFD(const base::CommandLine& command_line) { return crashpad::CrashHandlerHost::Get()->GetDeathSignalSocket(); } -#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( const std::string& process_type) { base::FilePath dumps_path; -@@ -1406,7 +1406,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( +@@ -1410,7 +1410,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo #elif BUILDFLAG(IS_CHROMEOS_LACROS) main_parts = std::make_unique( - std::move(parameters), &startup_data_); + 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( - std::move(parameters), &startup_data_); + is_integration_test, &startup_data_); #elif BUILDFLAG(IS_ANDROID) -@@ -1440,7 +1440,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( +@@ -1444,7 +1444,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 -@@ -1457,7 +1457,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( +@@ -1461,7 +1461,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo main_parts->AddParts(std::make_unique()); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) main_parts->AddParts(std::make_unique()); #elif defined(USE_OZONE) main_parts->AddParts(std::make_unique()); -@@ -2206,6 +2206,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2230,6 +2230,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin #elif BUILDFLAG(IS_POSIX) #if BUILDFLAG(IS_ANDROID) bool enable_crash_reporter = true; +#elif BUILDFLAG(IS_BSD) + bool enable_crash_reporter = false; #else bool enable_crash_reporter = false; if (crash_reporter::IsCrashpadEnabled()) { -@@ -2513,7 +2515,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2547,7 +2549,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) // TODO(https://crbug.com/1316129): Re-enable for Lacros. // Processes may only query perf_event_open with the BPF sandbox disabled. if (browser_command_line.HasSwitch(switches::kEnableThreadInstructionCount) && -@@ -3903,7 +3905,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -3960,7 +3962,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, -@@ -4310,14 +4312,14 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4371,14 +4373,14 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati &throttles); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) MaybeAddThrottle( WebAppSettingsNavigationThrottle::MaybeCreateThrottleFor(handle), &throttles); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) MaybeAddThrottle(enterprise_connectors::DeviceTrustNavigationThrottle:: MaybeCreateThrottleFor(handle), &throttles); -@@ -4350,7 +4352,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4411,7 +4413,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) MaybeAddThrottle(browser_switcher::BrowserSwitcherNavigationThrottle:: MaybeCreateThrottleFor(handle), diff --git a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h index b2959c6b4fed..fc1d0ff538ca 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 2022-05-19 14:06:27 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -414,7 +414,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -420,7 +420,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 deleted file mode 100644 index 782c92a32dab..000000000000 --- a/www/chromium/files/patch-chrome_browser_component__updater_registration.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/component_updater/registration.cc.orig 2022-05-19 14:06:27 UTC -+++ chrome/browser/component_updater/registration.cc -@@ -90,7 +90,7 @@ - #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" - #endif // BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "chrome/browser/component_updater/screen_ai_component_installer.h" - #endif // BUILDFLAG(IS_LINUX) - -@@ -214,7 +214,7 @@ void RegisterComponentsForUpdate() { - - RegisterClientSidePhishingComponent(cus); - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - RegisterScreenAIComponent(cus, g_browser_process->local_state()); - #endif // BUILDFLAG(IS_LINUX) - diff --git a/www/chromium/files/patch-chrome_browser_crash__upload__list_crash__upload__list.cc b/www/chromium/files/patch-chrome_browser_crash__upload__list_crash__upload__list.cc index a7fe163ba2e5..69a0309f6183 100644 --- a/www/chromium/files/patch-chrome_browser_crash__upload__list_crash__upload__list.cc +++ b/www/chromium/files/patch-chrome_browser_crash__upload__list_crash__upload__list.cc @@ -1,11 +1,11 @@ ---- chrome/browser/crash_upload_list/crash_upload_list.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/crash_upload_list/crash_upload_list.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/crash_upload_list/crash_upload_list.cc -@@ -52,7 +52,7 @@ scoped_refptr CreateCrashUploadList() { +@@ -50,7 +50,7 @@ scoped_refptr CreateCrashUploadList() { + // which isn't compatible with CrashUploadListCrashpad. crash_sender continues // to log uploads in CrashUploadList::kReporterLogFilename. // Linux is handled below. - #if !(BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ -- BUILDFLAG(IS_LINUX)) -+ BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) +-#if !(BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)) ++#if !(BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) if (crash_reporter::IsCrashpadEnabled()) { return new CrashUploadListCrashpad(); } diff --git a/www/chromium/files/patch-chrome_browser_dev__ui__browser__resources.grd b/www/chromium/files/patch-chrome_browser_dev__ui__browser__resources.grd index b548b1227e0e..d41f7b1f7e2f 100644 --- a/www/chromium/files/patch-chrome_browser_dev__ui__browser__resources.grd +++ b/www/chromium/files/patch-chrome_browser_dev__ui__browser__resources.grd @@ -1,11 +1,11 @@ ---- chrome/browser/dev_ui_browser_resources.grd.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/dev_ui_browser_resources.grd.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/dev_ui_browser_resources.grd -@@ -50,7 +50,7 @@ This file specifies browser resources for developer-fa - - +@@ -41,7 +41,7 @@ This file specifies browser resources for developer-fa + + -- -+ +- ++ 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 c08101b188a1..45628b84695c 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,47 +1,47 @@ ---- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1533,7 +1533,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1540,7 +1540,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe target_info->is_filetype_handled_safely) DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (item->GetOriginalMimeType() == "application/x-x509-user-cert") DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true); #endif -@@ -1585,7 +1585,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1592,7 +1592,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(); } -@@ -1693,7 +1693,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow +@@ -1699,7 +1699,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()) { -@@ -1735,7 +1735,7 @@ std::unique_ptr +@@ -1741,7 +1741,7 @@ std::unique_ptr ChromeDownloadManagerDelegate::GetRenameHandlerForDownload( download::DownloadItem* download_item) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return enterprise_connectors::FileSystemRenameHandler::CreateIfNeeded( download_item); #else -@@ -1751,7 +1751,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl +@@ -1757,7 +1757,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__item__model.cc b/www/chromium/files/patch-chrome_browser_download_download__item__model.cc index 22ae1dedb0e4..6f6f53a1f27f 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,20 +1,20 @@ ---- chrome/browser/download/download_item_model.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/download/download_item_model.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/download/download_item_model.cc -@@ -678,7 +678,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -671,7 +671,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(); -@@ -718,7 +718,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand +@@ -711,7 +711,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand DownloadCommands::ALWAYS_OPEN_TYPE); DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile()); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) if (download_commands->CanOpenPdfInSystemViewer()) { prefs->SetShouldOpenPdfInSystemReader(!is_checked); SetShouldPreferOpeningInBrowser(is_checked); diff --git a/www/chromium/files/patch-chrome_browser_download_download__prefs.cc b/www/chromium/files/patch-chrome_browser_download_download__prefs.cc index 1191fd54aa79..6c02c285ce32 100644 --- a/www/chromium/files/patch-chrome_browser_download_download__prefs.cc +++ b/www/chromium/files/patch-chrome_browser_download_download__prefs.cc @@ -1,99 +1,90 @@ ---- chrome/browser/download/download_prefs.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/download/download_prefs.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/download/download_prefs.cc @@ -13,6 +13,7 @@ #include "base/callback_helpers.h" #include "base/check.h" #include "base/cxx17_backports.h" +#include "base/command_line.h" #include "base/feature_list.h" #include "base/files/file_util.h" #include "base/no_destructor.h" @@ -60,6 +61,10 @@ #include "chrome/browser/ui/pdf/adobe_reader_info_win.h" #endif +#if BUILDFLAG(IS_OPENBSD) +#include "sandbox/policy/openbsd/sandbox_openbsd.h" +#endif + using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; @@ -70,7 +75,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; @@ -168,7 +173,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 @@ -291,7 +296,7 @@ void DownloadPrefs::RegisterProfilePrefs( registry->RegisterTimePref(prefs::kDownloadLastCompleteTime, /*default_value=*/base::Time()); #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) -@@ -434,7 +439,7 @@ bool DownloadPrefs::IsDownloadPathManaged() const { - - bool DownloadPrefs::IsAutoOpenByUserUsed() const { - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - if (ShouldOpenPdfInSystemReader()) - return true; - #endif -@@ -449,7 +454,7 @@ bool DownloadPrefs::IsAutoOpenEnabled(const GURL& url, - DCHECK(extension[0] == base::FilePath::kExtensionSeparator); - extension.erase(0, 1); - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_MAC) -+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - if (base::FilePath::CompareEqualIgnoreCase(extension, - FILE_PATH_LITERAL("pdf")) && - ShouldOpenPdfInSystemReader()) -@@ -504,7 +509,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens +@@ -496,7 +501,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; -@@ -526,7 +531,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons +@@ -528,7 +533,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(); -@@ -666,7 +671,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa +@@ -559,7 +564,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; +@@ -678,7 +683,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 7bc29b44a5a3..11d432acfbc2 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 2022-05-19 14:06:27 UTC +--- chrome/browser/download/download_prefs.h.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/download/download_prefs.h @@ -125,7 +125,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); -@@ -185,7 +185,7 @@ class DownloadPrefs { +@@ -186,7 +186,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_extensions_BUILD.gn b/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn index 12a4cc805196..737f36d6551e 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 2022-05-19 14:06:27 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1302,6 +1302,10 @@ static_library("extensions") { +@@ -1281,6 +1281,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_enterprise__reporting__private_enterprise__reporting__private__api.cc b/www/chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc index a88036a55cae..38cc6a034c09 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc -@@ -155,7 +155,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: +@@ -168,7 +168,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction:: // getPersistentSecret -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) EnterpriseReportingPrivateGetPersistentSecretFunction:: EnterpriseReportingPrivateGetPersistentSecretFunction() = default; diff --git a/www/chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h b/www/chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h index 885f7e4d295e..fdafe702d58a 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h +++ b/www/chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_enterprise__reporting__private__api.h @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h -@@ -45,7 +45,7 @@ class EnterpriseReportingPrivateGetDeviceIdFunction : +@@ -52,7 +52,7 @@ class EnterpriseReportingPrivateGetDeviceIdFunction : ~EnterpriseReportingPrivateGetDeviceIdFunction() override; }; -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) class EnterpriseReportingPrivateGetPersistentSecretFunction : public ExtensionFunction { diff --git a/www/chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc b/www/chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc index b70742d8aa83..0f7b19fef295 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2022-04-21 18:48:31 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -183,7 +183,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -187,7 +187,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::PREF_TYPE_BOOLEAN; #endif -@@ -197,7 +197,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -201,7 +201,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist settings_api::PrefType::PREF_TYPE_NUMBER; // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUsesSystemTheme] = settings_api::PrefType::PREF_TYPE_BOOLEAN; #endif diff --git a/www/chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc b/www/chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc index ae603afe7673..62824e0b0fa3 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/extensions/browser_context_keyed_service_factories.cc -@@ -53,7 +53,7 @@ +@@ -52,7 +52,7 @@ #include "extensions/browser/api/networking_private/networking_private_delegate_factory.h" #include "ppapi/buildflags/buildflags.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h" #endif -@@ -133,7 +133,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() +@@ -131,7 +131,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() + #endif extensions::SettingsPrivateEventRouterFactory::GetInstance(); extensions::SettingsOverridesAPI::GetFactoryInstance(); - extensions::SignedInDevicesManager::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_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 ebbdbd6295d6..de4b90789eb5 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 2022-02-28 16:54:41 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -217,7 +217,7 @@ const struct { +@@ -219,7 +219,7 @@ const struct { {base::DIR_HOME, FILE_PATH_LITERAL("Library/Mobile Documents"), kDontBlockChildren}, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // On Linux also block access to devices via /dev, as well as security // sensitive data in /sys and /proc. {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren}, diff --git a/www/chromium/files/patch-chrome_browser_first__run_first__run__internal.h b/www/chromium/files/patch-chrome_browser_first__run_first__run__internal.h index e354427b6e15..306e49626ec7 100644 --- a/www/chromium/files/patch-chrome_browser_first__run_first__run__internal.h +++ b/www/chromium/files/patch-chrome_browser_first__run_first__run__internal.h @@ -1,11 +1,11 @@ ---- chrome/browser/first_run/first_run_internal.h.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/first_run/first_run_internal.h.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/first_run/first_run_internal.h -@@ -58,7 +58,7 @@ FirstRunState DetermineFirstRunState(bool has_sentinel +@@ -56,7 +56,7 @@ FirstRunState DetermineFirstRunState(bool has_sentinel + bool force_first_run, + bool no_first_run); - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -+#if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // For testing, forces the first run dialog to either be shown or not. If not // called, the decision to show the dialog or not will be made by Chrome based // on a number of factors (such as install type, whether it's a Chrome-branded diff --git a/www/chromium/files/patch-chrome_browser_flag__descriptions.cc b/www/chromium/files/patch-chrome_browser_flag__descriptions.cc index 67486d5f9f47..05d76b6df0e6 100644 --- a/www/chromium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/chromium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,56 +1,47 @@ ---- chrome/browser/flag_descriptions.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/flag_descriptions.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/flag_descriptions.cc -@@ -5639,7 +5639,7 @@ const char kDownloadShelfWebUIDescription[] = +@@ -5709,7 +5709,7 @@ const char kSideSearchDSESupportDescription[] = // Random platform combinations ----------------------------------------------- - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - - const char kWebuiFeedbackName[] = "WebUI Feedback"; - const char kWebuiFeedbackDescription[] = -@@ -5650,7 +5650,7 @@ const char kWebuiFeedbackDescription[] = - // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kDesktopRestructuredLanguageSettingsName[] = "Restructured Language Settings (Desktop)"; -@@ -5676,7 +5676,7 @@ const char kWebShareDescription[] = +@@ -5735,7 +5735,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"; -@@ -5688,7 +5688,7 @@ const char kOzonePlatformHintDescription[] = +@@ -5747,7 +5747,7 @@ const char kOzonePlatformHintDescription[] = "\"X11\". \"Auto\" selects Wayland if possible, X11 otherwise. "; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kCleanUndecryptablePasswordsLinuxName[] = "Cleanup local undecryptable passwords during initial sync flow"; const char kCleanUndecryptablePasswordsLinuxDescription[] = -@@ -5701,7 +5701,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail +@@ -5760,7 +5760,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail "storage and requests initial sync."; #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kSkipUndecryptablePasswordsName[] = "Skip undecryptable passwords to use the available decryptable " "passwords."; -@@ -5832,7 +5832,7 @@ const char kElasticOverscrollDescription[] = +@@ -5875,7 +5875,7 @@ const char kElasticOverscrollDescription[] = #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kUIDebugToolsName[] = "Debugging tools for UI"; const char kUIDebugToolsDescription[] = "Enables additional keyboard shortcuts to help debugging."; diff --git a/www/chromium/files/patch-chrome_browser_flag__descriptions.h b/www/chromium/files/patch-chrome_browser_flag__descriptions.h index c15792e97796..c562addb2caf 100644 --- a/www/chromium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/chromium/files/patch-chrome_browser_flag__descriptions.h @@ -1,47 +1,38 @@ ---- chrome/browser/flag_descriptions.h.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/flag_descriptions.h.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/flag_descriptions.h -@@ -3241,7 +3241,7 @@ extern const char kDownloadShelfWebUIDescription[]; +@@ -3279,7 +3279,7 @@ extern const char kSideSearchDSESupportDescription[]; // Random platform combinations ----------------------------------------------- - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) -+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - - extern const char kWebuiFeedbackName[]; - extern const char kWebuiFeedbackDescription[]; -@@ -3250,7 +3250,7 @@ extern const char kWebuiFeedbackDescription[]; - // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kDesktopRestructuredLanguageSettingsName[]; extern const char kDesktopRestructuredLanguageSettingsDescription[]; -@@ -3269,7 +3269,7 @@ extern const char kWebShareName[]; +@@ -3298,7 +3298,7 @@ extern const char kWebShareName[]; extern const char kWebShareDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kOzonePlatformHintChoiceDefault[]; extern const char kOzonePlatformHintChoiceAuto[]; extern const char kOzonePlatformHintChoiceX11[]; -@@ -3285,7 +3285,7 @@ extern const char kForcePasswordInitialSyncWhenDecrypt +@@ -3314,7 +3314,7 @@ extern const char kForcePasswordInitialSyncWhenDecrypt extern const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[]; #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kSkipUndecryptablePasswordsName[]; extern const char kSkipUndecryptablePasswordsDescription[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -@@ -3377,7 +3377,7 @@ extern const char kElasticOverscrollDescription[]; +@@ -3395,7 +3395,7 @@ extern const char kElasticOverscrollDescription[]; #if BUILDFLAG(IS_WIN) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kUIDebugToolsName[]; extern const char kUIDebugToolsDescription[]; #endif diff --git a/www/chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc b/www/chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc index 7e2720742be7..336a741b996e 100644 --- a/www/chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc +++ b/www/chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc @@ -1,23 +1,23 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2022-03-25 21:59:56 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -57,8 +57,10 @@ +@@ -60,8 +60,10 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) +#if !BUILDFLAG(IS_BSD) #include +#endif #include "base/linux_util.h" #include "base/strings/string_split.h" -@@ -223,7 +225,7 @@ void RecordStartupMetrics() { +@@ -227,7 +229,7 @@ void RecordStartupMetrics() { // Record whether Chrome is the default browser or not. // Disabled on Linux due to hanging browser tests, see crbug.com/1216328. -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) shell_integration::DefaultWebClientState default_state = shell_integration::GetDefaultBrowser(); base::UmaHistogramEnumeration("DefaultBrowser.State", default_state, diff --git a/www/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 912d6984b293..3b3454b1ab3c 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,29 +1,29 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -784,7 +784,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -787,7 +787,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()); -@@ -874,7 +874,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -876,7 +876,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()); metrics_service_->RegisterMetricsProvider( -@@ -1053,7 +1053,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1055,7 +1055,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_performance__monitor_process__metrics__recorder__util.cc b/www/chromium/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc similarity index 60% rename from www/chromium/files/patch-chrome_browser_performance__monitor_process__metrics__recorder__util.cc rename to www/chromium/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc index c88046d4002e..d8d02e8bf313 100644 --- a/www/chromium/files/patch-chrome_browser_performance__monitor_process__metrics__recorder__util.cc +++ b/www/chromium/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc @@ -1,11 +1,11 @@ ---- chrome/browser/performance_monitor/process_metrics_recorder_util.cc.orig 2022-05-19 14:06:27 UTC -+++ chrome/browser/performance_monitor/process_metrics_recorder_util.cc -@@ -43,7 +43,7 @@ void RecordProcessHistograms(const char* histogram_suf +--- chrome/browser/metrics/power/process_metrics_recorder_util.cc.orig 2022-06-17 14:20:10 UTC ++++ chrome/browser/metrics/power/process_metrics_recorder_util.cc +@@ -41,7 +41,7 @@ void RecordProcessHistograms(const char* histogram_suf kCPUUsageHistogramMax, kCPUUsageHistogramBucketCount); #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) base::UmaHistogramCounts10000( base::StrCat({"PerformanceMonitor.IdleWakeups.", histogram_suffix}), metrics.idle_wakeups); diff --git a/www/chromium/files/patch-chrome_browser_performance__monitor_process__monitor.cc b/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc similarity index 66% rename from www/chromium/files/patch-chrome_browser_performance__monitor_process__monitor.cc rename to www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc index d4341d8d8ff2..8ca94aafbb07 100644 --- a/www/chromium/files/patch-chrome_browser_performance__monitor_process__monitor.cc +++ b/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc @@ -1,20 +1,20 @@ ---- chrome/browser/performance_monitor/process_monitor.cc.orig 2022-05-19 14:06:27 UTC -+++ chrome/browser/performance_monitor/process_monitor.cc -@@ -64,7 +64,7 @@ ProcessMonitor::Metrics SampleMetrics(base::ProcessMet +--- chrome/browser/metrics/power/process_monitor.cc.orig 2022-06-17 14:20:10 UTC ++++ chrome/browser/metrics/power/process_monitor.cc +@@ -59,7 +59,7 @@ ProcessMonitor::Metrics SampleMetrics(base::ProcessMet metrics.precise_cpu_usage = process_metrics.GetPreciseCPUUsage(); #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) -@@ -119,7 +119,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me +@@ -114,7 +114,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me #endif #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_performance__monitor_process__monitor.h b/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.h similarity index 59% rename from www/chromium/files/patch-chrome_browser_performance__monitor_process__monitor.h rename to www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.h index 7e90761af238..5c14d103a0f9 100644 --- a/www/chromium/files/patch-chrome_browser_performance__monitor_process__monitor.h +++ b/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.h @@ -1,11 +1,11 @@ ---- chrome/browser/performance_monitor/process_monitor.h.orig 2022-05-19 14:06:27 UTC -+++ chrome/browser/performance_monitor/process_monitor.h -@@ -78,7 +78,7 @@ class ProcessMonitor : public content::BrowserChildPro +--- chrome/browser/metrics/power/process_monitor.h.orig 2022-06-17 14:20:10 UTC ++++ chrome/browser/metrics/power/process_monitor.h +@@ -76,7 +76,7 @@ class ProcessMonitor : public content::BrowserChildPro #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Returns the number of average idle cpu wakeups per second since the last // time the metric was sampled. int idle_wakeups = 0; diff --git a/www/chromium/files/patch-chrome_browser_platform__util__linux.cc b/www/chromium/files/patch-chrome_browser_platform__util__linux.cc index 6c677548e70d..0e2e20a6d695 100644 --- a/www/chromium/files/patch-chrome_browser_platform__util__linux.cc +++ b/www/chromium/files/patch-chrome_browser_platform__util__linux.cc @@ -1,12 +1,12 @@ ---- chrome/browser/platform_util_linux.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/platform_util_linux.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/platform_util_linux.cc -@@ -298,7 +298,9 @@ void RunCommand(const std::string& command, +@@ -294,7 +294,9 @@ void RunCommand(const std::string& command, base::LaunchOptions options; options.current_directory = working_directory; +#if !defined(OS_BSD) options.allow_new_privs = true; +#endif // xdg-open can fall back on mailcap which eventually might plumb through // to a command that needs a terminal. Set the environment variable telling // it that we definitely don't have a terminal available and that it should diff --git a/www/chromium/files/patch-chrome_browser_plugins_plugins__resource__service.cc b/www/chromium/files/patch-chrome_browser_plugins_plugins__resource__service.cc deleted file mode 100644 index 6762dc97c10f..000000000000 --- a/www/chromium/files/patch-chrome_browser_plugins_plugins__resource__service.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/plugins/plugins_resource_service.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/plugins/plugins_resource_service.cc -@@ -62,7 +62,7 @@ GURL GetPluginsServerURL() { - filename = "plugins_win.json"; - #elif BUILDFLAG(IS_CHROMEOS_ASH) - filename = "plugins_chromeos.json"; --#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - filename = "plugins_linux.json"; - #elif BUILDFLAG(IS_MAC) - filename = "plugins_mac.json"; 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 c5533c6b1ade..a9763e11d754 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,56 +1,56 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -187,7 +187,7 @@ - #endif // BUILDFLAG(ENABLE_SIDE_SEARCH) +@@ -186,7 +186,7 @@ + #endif // BUILDFLAG(ENABLE_SPELLCHECK) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/policy/web_app_settings_policy_handler.h" #endif -@@ -1557,7 +1557,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1562,7 +1562,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { key::kAuthNegotiateDelegateByKdcPolicy, prefs::kAuthNegotiateDelegateByKdcPolicy, base::Value::Type::BOOLEAN }, -@@ -1624,7 +1624,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1626,7 +1626,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(ENABLE_EXTENSIONS) && (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)) +#if BUILDFLAG(ENABLE_EXTENSIONS) && (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)) { key::kChromeAppsEnabled, extensions::pref_names::kChromeAppsEnabled, base::Value::Type::BOOLEAN }, -@@ -1940,7 +1940,7 @@ std::unique_ptr BuildH +@@ -1945,7 +1945,7 @@ std::unique_ptr BuildH key::kBrowsingDataLifetime, browsing_data::prefs::kBrowsingDataLifetime, chrome_schema)); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique()); handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -@@ -2294,7 +2294,7 @@ std::unique_ptr BuildH +@@ -2299,7 +2299,7 @@ std::unique_ptr BuildH static_cast(variations::RestrictionPolicy::ALL), false)); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique(chrome_schema)); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -2313,7 +2313,7 @@ std::unique_ptr BuildH +@@ -2318,7 +2318,7 @@ std::unique_ptr BuildH policy::key::kSpellcheckLanguageBlocklist)); #endif // BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique( key::kAllowSystemNotifications, prefs::kAllowSystemNotifications, base::Value::Type::BOOLEAN)); 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 db49d7358c07..75c4ed1a175b 100644 --- a/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc +++ b/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -1,46 +1,37 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -430,14 +430,14 @@ +@@ -434,14 +434,14 @@ #include "components/os_crypt/os_crypt.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/web_applications/url_handler_prefs.h" #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/browser_switcher/browser_switcher_prefs.h" #endif -@@ -1191,7 +1191,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) +@@ -1177,7 +1177,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) web_app::url_handler_prefs::RegisterLocalStatePrefs(registry); #endif -@@ -1205,7 +1205,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) - registry->RegisterBooleanPref( - policy::policy_prefs::kSetTimeoutWithout1MsClampEnabled, false); - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - screen_ai::RegisterLocalStatePrefs(registry); - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - -@@ -1504,7 +1504,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -1492,7 +1492,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); #endif diff --git a/www/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 8374e8b2683c..0f457624265d 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 2022-05-19 14:06:27 UTC +--- chrome/browser/printing/print_backend_service_manager.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/printing/print_backend_service_manager.cc -@@ -480,7 +480,7 @@ absl::optional PrintBackendServiceManager::R +@@ -481,7 +481,7 @@ absl::optional PrintBackendServiceManager::R query_clients_.insert(client_id); break; case ClientType::kQueryWithUi: -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) if (!query_with_ui_clients_.empty()) return absl::nullopt; #endif -@@ -705,7 +705,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate +@@ -706,7 +706,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate break; 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 (query_with_ui_clients_.size() > 1) return absl::nullopt; -@@ -762,7 +762,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate +@@ -763,7 +763,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 (!query_with_ui_clients_.empty()) return absl::nullopt; 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 a59897bf8a89..52c3aba74cf3 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,11 +1,11 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -400,7 +400,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -406,7 +406,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance(); #endif diff --git a/www/chromium/files/patch-chrome_browser_profiles_profile__impl.cc b/www/chromium/files/patch-chrome_browser_profiles_profile__impl.cc index 841292078166..d066c4e0c6b5 100644 --- a/www/chromium/files/patch-chrome_browser_profiles_profile__impl.cc +++ b/www/chromium/files/patch-chrome_browser_profiles_profile__impl.cc @@ -1,31 +1,31 @@ ---- chrome/browser/profiles/profile_impl.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -264,6 +264,10 @@ +@@ -259,6 +259,10 @@ #include "chrome/browser/spellchecker/spellcheck_service.h" #endif +#if BUILDFLAG(IS_OPENBSD) +#include "sandbox/policy/openbsd/sandbox_openbsd.h" +#endif + using bookmarks::BookmarkModel; using content::BrowserThread; using content::DownloadManagerDelegate; -@@ -844,7 +848,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -845,7 +849,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) } base::FilePath ProfileImpl::last_selected_directory() { +#if BUILDFLAG(IS_OPENBSD) + // If unveil(2) is used, force the file dialog directory to something we + // know is available. + auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); + if (sandbox->unveil_initialized()) + return GetPrefs()->GetFilePath(prefs::kDownloadDefaultDirectory); + else + return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); +#else return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); +#endif } void ProfileImpl::set_last_selected_directory(const base::FilePath& path) { diff --git a/www/chromium/files/patch-chrome_browser_profiles_profiles__state.cc b/www/chromium/files/patch-chrome_browser_profiles_profiles__state.cc index 497ec10d4120..31386232e3d3 100644 --- a/www/chromium/files/patch-chrome_browser_profiles_profiles__state.cc +++ b/www/chromium/files/patch-chrome_browser_profiles_profiles__state.cc @@ -1,11 +1,11 @@ ---- chrome/browser/profiles/profiles_state.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/profiles/profiles_state.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/profiles/profiles_state.cc -@@ -176,7 +176,7 @@ bool IsGuestModeRequested(const base::CommandLine& com +@@ -177,7 +177,7 @@ bool IsGuestModeRequested(const base::CommandLine& com PrefService* local_state, bool show_warning) { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) DCHECK(local_state); // Check if guest mode enforcement commandline switch or policy are provided. 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 be6eb02d57a1..b6a965119496 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 2022-05-19 14:06:27 UTC +--- chrome/browser/resources/settings/route.ts.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/resources/settings/route.ts -@@ -188,7 +188,7 @@ function createBrowserSettingsRoutes(): SettingsRoutes +@@ -190,7 +190,7 @@ function createBrowserSettingsRoutes(): SettingsRoutes r.ACCESSIBILITY = r.ADVANCED.createSection('/accessibility', 'a11y'); - // + // 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 f8d53d434290..38567566017e 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 2022-05-19 14:06:27 UTC +--- chrome/browser/safe_browsing/download_protection/file_analyzer.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/safe_browsing/download_protection/file_analyzer.cc @@ -20,7 +20,7 @@ #include "content/public/browser/browser_thread.h" #include "url/gurl.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/safe_browsing/download_protection/document_analysis_service.h" #endif @@ -101,7 +101,7 @@ void FileAnalyzer::Start(const base::FilePath& target_ } 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 -@@ -283,7 +283,7 @@ void FileAnalyzer::OnDmgAnalysisFinished( +@@ -289,7 +289,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_signin_primary__account__policy__manager.cc b/www/chromium/files/patch-chrome_browser_signin_primary__account__policy__manager.cc index ed53b893c4a0..f70285bf99a2 100644 --- a/www/chromium/files/patch-chrome_browser_signin_primary__account__policy__manager.cc +++ b/www/chromium/files/patch-chrome_browser_signin_primary__account__policy__manager.cc @@ -1,38 +1,38 @@ ---- chrome/browser/signin/primary_account_policy_manager.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/signin/primary_account_policy_manager.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/signin/primary_account_policy_manager.cc -@@ -22,7 +22,7 @@ +@@ -23,7 +23,7 @@ #include "google_apis/gaia/gaia_auth_util.h" #include "ui/base/l10n/l10n_util.h" -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" -@@ -34,7 +34,7 @@ +@@ -35,7 +35,7 @@ #include "chrome/browser/ui/webui/profile_helper.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Manager that presents the profile will be deleted dialog on the first active // browser window. class PrimaryAccountPolicyManager::DeleteProfileDialogManager -@@ -249,7 +249,7 @@ void PrimaryAccountPolicyManager::EnsurePrimaryAccount +@@ -250,7 +250,7 @@ void PrimaryAccountPolicyManager::EnsurePrimaryAccount break; } case signin::Tribool::kFalse: -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Force remove the profile if sign out is not allowed and if the // primary account is no longer allowed. // This may be called while the profile is initializing, so it must be -@@ -280,7 +280,7 @@ void PrimaryAccountPolicyManager::EnsurePrimaryAccount +@@ -281,7 +281,7 @@ void PrimaryAccountPolicyManager::EnsurePrimaryAccount #endif // !BUILDFLAG(IS_CHROMEOS_ASH) } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Shows the delete profile dialog on the first browser active window. void PrimaryAccountPolicyManager::ShowDeleteProfileDialog( Profile* profile, diff --git a/www/chromium/files/patch-chrome_browser_themes_theme__helper.cc b/www/chromium/files/patch-chrome_browser_themes_theme__helper.cc new file mode 100644 index 000000000000..8aa7e5d70afe --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_themes_theme__helper.cc @@ -0,0 +1,20 @@ +--- chrome/browser/themes/theme_helper.cc.orig 2022-06-17 14:20:10 UTC ++++ chrome/browser/themes/theme_helper.cc +@@ -24,7 +24,7 @@ + #include "ui/native_theme/common_theme.h" + #include "ui/native_theme/native_theme.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/views/linux_ui/linux_ui.h" + #endif + +@@ -494,7 +494,7 @@ bool ThemeHelper::UseDarkModeColors(const CustomThemeS + + ui::NativeTheme const* native_theme = + ui::NativeTheme::GetInstanceForNativeUi(); +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (const auto* linux_ui = views::LinuxUI::instance()) { + // We rely on the fact that the system theme is in use iff `theme_supplier` + // is non-null, but this is cheating. In the future this might not hold 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 201e89390c56..ee944889c1f2 100644 --- a/www/chromium/files/patch-chrome_browser_themes_theme__service.cc +++ b/www/chromium/files/patch-chrome_browser_themes_theme__service.cc @@ -1,38 +1,38 @@ ---- chrome/browser/themes/theme_service.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/themes/theme_service.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/themes/theme_service.cc @@ -72,7 +72,7 @@ #include "extensions/browser/extension_registry_observer.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/views/linux_ui/linux_ui.h" #endif -@@ -511,7 +511,7 @@ ThemeService::BrowserThemeProvider::GetColorProviderCo +@@ -489,7 +489,7 @@ ThemeService::BrowserThemeProvider::GetColorProviderCo native_theme = ui::NativeTheme::GetInstanceForDarkUI(); } else { native_theme = ui::NativeTheme::GetInstanceForNativeUi(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (const auto* linux_ui = views::LinuxUI::instance()) { native_theme = linux_ui->GetNativeTheme(delegate_->ShouldUseSystemTheme()); -@@ -631,7 +631,7 @@ CustomThemeSupplier* ThemeService::GetThemeSupplier() +@@ -611,7 +611,7 @@ CustomThemeSupplier* ThemeService::GetThemeSupplier() } bool ThemeService::ShouldUseSystemTheme() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return profile_->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme); #else return false; -@@ -639,7 +639,7 @@ bool ThemeService::ShouldUseSystemTheme() const { +@@ -619,7 +619,7 @@ bool ThemeService::ShouldUseSystemTheme() const { } bool ThemeService::ShouldUseCustomFrame() const { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return profile_->GetPrefs()->GetBoolean(prefs::kUseCustomChromeFrame); #else return true; diff --git a/www/chromium/files/patch-chrome_browser_ui_browser.h b/www/chromium/files/patch-chrome_browser_ui_browser.h new file mode 100644 index 000000000000..b8a35a466f16 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_ui_browser.h @@ -0,0 +1,11 @@ +--- chrome/browser/ui/browser.h.orig 2022-06-17 14:20:10 UTC ++++ chrome/browser/ui/browser.h +@@ -734,7 +734,7 @@ class Browser : public TabStripModelObserver, + + StatusBubble* GetStatusBubbleForTesting(); + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + void RunScreenAIAnnotator(); + #endif + 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 b3fdff9f3d18..475c34166459 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,65 +1,38 @@ ---- chrome/browser/ui/browser_command_controller.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/ui/browser_command_controller.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/browser_command_controller.cc -@@ -71,7 +71,7 @@ - #include "ui/base/ui_base_features.h" - #include "ui/events/keycodes/keyboard_codes.h" - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "ui/accessibility/accessibility_features.h" - #endif - -@@ -96,7 +96,7 @@ +@@ -97,7 +97,7 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h" #endif -@@ -287,7 +287,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( +@@ -288,7 +288,7 @@ bool BrowserCommandController::IsReservedCommandOrKey( // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // If this key was registered by the user as a content editing hotkey, then // it is not reserved. ui::TextEditKeyBindingsDelegateAuraLinux* delegate = -@@ -523,7 +523,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo +@@ -524,7 +524,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; -@@ -926,7 +926,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo - ExecuteUIDebugCommand(id, browser_); - break; - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - case IDC_RUN_SCREEN_AI: - RunScreenAi(browser_); - break; -@@ -1088,7 +1088,7 @@ void BrowserCommandController::InitCommandState() { +@@ -1087,7 +1087,7 @@ void BrowserCommandController::InitCommandState() { #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_MAXIMIZE_WINDOW, true); command_updater_.UpdateCommandEnabled(IDC_RESTORE_WINDOW, true); -@@ -1474,7 +1474,7 @@ void BrowserCommandController::UpdateCommandsForFullsc - command_updater_.UpdateCommandEnabled( - IDC_FOCUS_INACTIVE_POPUP_FOR_ACCESSIBILITY, main_not_fullscreen); - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - command_updater_.UpdateCommandEnabled(IDC_RUN_SCREEN_AI, - features::IsScreenAIEnabled()); - #endif diff --git a/www/chromium/files/patch-chrome_browser_ui_browser__commands.cc b/www/chromium/files/patch-chrome_browser_ui_browser__commands.cc deleted file mode 100644 index 9ccd79eefb9f..000000000000 --- a/www/chromium/files/patch-chrome_browser_ui_browser__commands.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- chrome/browser/ui/browser_commands.cc.orig 2022-05-19 14:06:27 UTC -+++ chrome/browser/ui/browser_commands.cc -@@ -176,7 +176,7 @@ - #include "chromeos/lacros/lacros_service.h" - #endif - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "ui/accessibility/ax_action_data.h" - #include "ui/accessibility/ax_enums.mojom.h" - #endif -@@ -1859,7 +1859,7 @@ void UnfollowSite(content::WebContents* web_contents) - feed::UnfollowSite(web_contents); - } - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - void RunScreenAi(Browser* browser) { - ui::AXActionData ad; - ad.action = ax::mojom::Action::kRunScreenAi; diff --git a/www/chromium/files/patch-chrome_browser_ui_browser__commands.h b/www/chromium/files/patch-chrome_browser_ui_browser__commands.h deleted file mode 100644 index a9511ee83274..000000000000 --- a/www/chromium/files/patch-chrome_browser_ui_browser__commands.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/ui/browser_commands.h.orig 2022-05-19 14:06:27 UTC -+++ chrome/browser/ui/browser_commands.h -@@ -251,7 +251,7 @@ void ProcessInterceptedChromeURLNavigationInIncognito( - void FollowSite(content::WebContents* web_contents); - void UnfollowSite(content::WebContents* web_contents); - --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - // Triggers the Screen AI to be run once on the |browser|. - void RunScreenAi(Browser* browser); - #endif // BUILDFLAG(IS_LINUX) 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 48471d5179ed..543c6c1e4458 100644 --- a/www/chromium/files/patch-chrome_browser_ui_chrome__pages.cc +++ b/www/chromium/files/patch-chrome_browser_ui_chrome__pages.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/chrome_pages.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/ui/chrome_pages.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/chrome_pages.cc -@@ -561,7 +561,7 @@ void ShowBrowserSigninOrSettings(Browser* browser, +@@ -566,7 +566,7 @@ void ShowBrowserSigninOrSettings(Browser* browser, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) void ShowWebAppSettings(Browser* browser, const std::string& app_id, web_app::AppSettingsPageEntryPoint entry_point) { diff --git a/www/chromium/files/patch-chrome_browser_ui_chrome__pages.h b/www/chromium/files/patch-chrome_browser_ui_chrome__pages.h index 11914612e99f..6fdc2d8d1d80 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 2022-04-21 18:48:31 UTC +--- chrome/browser/ui/chrome_pages.h.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/chrome_pages.h @@ -26,7 +26,7 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/web_applications/web_app_utils.h" #endif -@@ -202,7 +202,7 @@ void ShowBrowserSigninOrSettings(Browser* browser, +@@ -204,7 +204,7 @@ void ShowBrowserSigninOrSettings(Browser* browser, #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Show chrome://app-settings/ page. void ShowWebAppSettings(Browser* browser, const std::string& app_id, diff --git a/www/chromium/files/patch-chrome_browser_ui_signin__view__controller.cc b/www/chromium/files/patch-chrome_browser_ui_signin__view__controller.cc index c4500cd60570..29634fb51731 100644 --- a/www/chromium/files/patch-chrome_browser_ui_signin__view__controller.cc +++ b/www/chromium/files/patch-chrome_browser_ui_signin__view__controller.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/signin_view_controller.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/ui/signin_view_controller.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/signin_view_controller.cc -@@ -262,7 +262,7 @@ void SigninViewController::ShowModalEnterpriseConfirma +@@ -273,7 +273,7 @@ void SigninViewController::ShowModalEnterpriseConfirma SkColor profile_color, signin::SigninChoiceCallback callback) { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CloseModalSignin(); dialog_ = std::make_unique( SigninViewControllerDelegate::CreateEnterpriseConfirmationDelegate( diff --git a/www/chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc b/www/chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc index efe06fd7ba6a..813b834db6e9 100644 --- a/www/chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc +++ b/www/chromium/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2022-04-21 18:48:31 UTC +--- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/startup/bad_flags_prompt.cc -@@ -92,7 +92,7 @@ static const char* kBadFlags[] = { +@@ -91,7 +91,7 @@ static const char* kBadFlags[] = { // 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) // Speech dispatcher is buggy, it can crash and it can make Chrome freeze. // http://crbug.com/327295 switches::kEnableSpeechDispatcher, diff --git a/www/chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc b/www/chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc index 57dfa984310d..077c2a9282c5 100644 --- a/www/chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc +++ b/www/chromium/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/startup/startup_browser_creator.cc @@ -128,7 +128,7 @@ #include "chrome/credential_provider/common/gcp_strings.h" #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/startup/web_app_info_recorder_utils.h" #endif -@@ -1007,7 +1007,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1014,7 +1014,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( silent_launch = true; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Writes open and installed web apps to the specified file without // launching a new browser window or tab. if (base::FeatureList::IsEnabled(features::kListWebAppsSwitch) && -@@ -1197,7 +1197,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( +@@ -1204,7 +1204,7 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( CHECK_EQ(profile_info.mode, StartupProfileMode::kBrowserWindow) << "Failed launch with app: couldn't pick a profile"; std::string app_id = command_line.GetSwitchValueASCII(switches::kAppId); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // If Chrome Apps are deprecated and |app_id| is a Chrome App, display the // deprecation UI instead of launching the app. if (apps::OpenDeprecatedApplicationPrompt(privacy_safe_profile, app_id)) diff --git a/www/chromium/files/patch-chrome_browser_ui_tab__helpers.cc b/www/chromium/files/patch-chrome_browser_ui_tab__helpers.cc index 8e542f4d7477..2ba23e5a47b7 100644 --- a/www/chromium/files/patch-chrome_browser_ui_tab__helpers.cc +++ b/www/chromium/files/patch-chrome_browser_ui_tab__helpers.cc @@ -1,36 +1,36 @@ ---- chrome/browser/ui/tab_helpers.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/ui/tab_helpers.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/tab_helpers.cc -@@ -192,7 +192,7 @@ +@@ -196,7 +196,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/autofill_assistant/common_dependencies_chrome.h" + #include "chrome/browser/autofill_assistant/platform_dependencies_desktop.h" #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" -@@ -530,13 +530,13 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -532,13 +532,13 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents); #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( features::kHappinessTrackingSurveysForDesktopDemo) || base::FeatureList::IsEnabled(features::kTrustSafetySentimentSurvey) || -@@ -551,7 +551,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con +@@ -553,7 +553,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( autofill_assistant::features::kAutofillAssistantDesktop)) { - autofill_assistant::CreateForWebContents(web_contents); + autofill_assistant::CreateForWebContents( diff --git a/www/chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc b/www/chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc index d618a4423631..e21d9769aab0 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc @@ -1,43 +1,34 @@ ---- chrome/browser/ui/views/accelerator_table.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/ui/views/accelerator_table.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/views/accelerator_table.cc -@@ -62,11 +62,11 @@ const AcceleratorMapping kAcceleratorMap[] = { +@@ -61,11 +61,11 @@ const AcceleratorMapping kAcceleratorMap[] = { + {ui::VKEY_S, ui::EF_PLATFORM_ACCELERATOR, IDC_SAVE_PAGE}, + {ui::VKEY_9, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_LAST_TAB}, {ui::VKEY_NUMPAD9, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_LAST_TAB}, - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {ui::VKEY_9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB}, {ui::VKEY_NUMPAD9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB}, - #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #endif // BUILDFLAG(IS_LINUX) +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) {ui::VKEY_NEXT, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_NEXT}, {ui::VKEY_PRIOR, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_PREVIOUS}, -@@ -97,7 +97,7 @@ const AcceleratorMapping kAcceleratorMap[] = { +@@ -93,7 +93,7 @@ const AcceleratorMapping kAcceleratorMap[] = { + {ui::VKEY_NUMPAD7, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_6}, + {ui::VKEY_8, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_7}, {ui::VKEY_NUMPAD8, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_7}, - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {ui::VKEY_1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0}, {ui::VKEY_NUMPAD1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0}, {ui::VKEY_2, ui::EF_ALT_DOWN, IDC_SELECT_TAB_1}, -@@ -142,7 +142,7 @@ const AcceleratorMapping kAcceleratorMap[] = { +@@ -138,7 +138,7 @@ const AcceleratorMapping kAcceleratorMap[] = { IDC_SHOW_AVATAR_MENU}, // Platform-specific key maps. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) {ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK}, {ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD}, {ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME}, -@@ -240,7 +240,7 @@ const AcceleratorMapping kAcceleratorMap[] = { - {ui::VKEY_SPACE, ui::EF_CONTROL_DOWN, IDC_TOGGLE_QUICK_COMMANDS}, - #endif // !BUILDFLAG(IS_CHROMEOS_ASH) - #endif // !BUILDFLAG(IS_MAC) --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - {ui::VKEY_S, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_RUN_SCREEN_AI}, - #endif - }; diff --git a/www/chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h b/www/chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h index 384e3fabd16e..b55489a351f9 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h +++ b/www/chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate.h @@ -1,11 +1,16 @@ ---- chrome/browser/ui/views/chrome_views_delegate.h.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/ui/views/chrome_views_delegate.h.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/views/chrome_views_delegate.h -@@ -51,7 +51,7 @@ class ChromeViewsDelegate : public views::ViewsDelegat +@@ -51,11 +51,11 @@ class ChromeViewsDelegate : public views::ViewsDelegat base::OnceClosure callback) override; // 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) - gfx::ImageSkia* GetDefaultWindowIcon() const override; bool WindowManagerProvidesTitleBar(bool maximized) override; #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + gfx::ImageSkia* GetDefaultWindowIcon() const override; + #endif + diff --git a/www/chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate__linux.cc b/www/chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate__linux.cc new file mode 100644 index 000000000000..87a83c6e9198 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_ui_views_chrome__views__delegate__linux.cc @@ -0,0 +1,20 @@ +--- chrome/browser/ui/views/chrome_views_delegate_linux.cc.orig 2022-06-17 14:20:10 UTC ++++ chrome/browser/ui/views/chrome_views_delegate_linux.cc +@@ -23,7 +23,7 @@ bool IsDesktopEnvironmentUnity() { + return desktop_env == base::nix::DESKTOP_ENVIRONMENT_UNITY; + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + int GetWindowIconResourceId() { + #if BUILDFLAG(GOOGLE_CHROME_BRANDING) + switch (chrome::GetChannel()) { +@@ -52,7 +52,7 @@ views::NativeWidget* ChromeViewsDelegate::CreateNative + return ::CreateNativeWidget(native_widget_type, params, delegate); + } + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + gfx::ImageSkia* ChromeViewsDelegate::GetDefaultWindowIcon() const { + ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); + return rb.GetImageSkiaNamed(GetWindowIconResourceId()); diff --git a/www/chromium/files/patch-chrome_browser_ui_views_first__run__dialog.cc b/www/chromium/files/patch-chrome_browser_ui_views_first__run__dialog.cc index 4e75ddb2b7d9..b48887d90b38 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_first__run__dialog.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_first__run__dialog.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/first_run_dialog.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/ui/views/first_run_dialog.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/views/first_run_dialog.cc -@@ -38,7 +38,7 @@ +@@ -34,7 +34,7 @@ namespace { -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) void InitCrashReporterIfEnabled(bool enabled) { if (!crash_reporter::IsCrashpadEnabled() && enabled) breakpad::InitCrashReporter(std::string()); @@ -122,7 +122,7 @@ bool FirstRunDialog::Accept() { #if BUILDFLAG(IS_MAC) ChangeMetricsReportingState(report_crashes_->GetChecked()); -#else +#elif !BUILDFLAG(IS_BSD) - #if BUILDFLAG(IS_CHROMEOS_ASH) - metrics::structured::NeutrinoDevicesLog( - metrics::structured::NeutrinoDevicesLocation::kFirstRunDialog); + ChangeMetricsReportingStateWithReply( + report_crashes_->GetChecked(), + base::BindOnce(&InitCrashReporterIfEnabled)); diff --git a/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__desktop__window__tree__host__linux.cc b/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__desktop__window__tree__host__linux.cc index dbd0a894f425..571992fbd269 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__desktop__window__tree__host__linux.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__desktop__window__tree__host__linux.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.cc.orig 2022-04-21 18:48:31 UTC +--- chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.cc -@@ -151,7 +151,7 @@ bool BrowserDesktopWindowTreeHostLinux::SupportsClient +@@ -145,7 +145,7 @@ bool BrowserDesktopWindowTreeHostLinux::SupportsClient } void BrowserDesktopWindowTreeHostLinux::UpdateFrameHints() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) auto* view = static_cast( native_frame_->browser_frame()->GetFrameView()); auto* layout = view->layout(); diff --git a/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__desktop__window__tree__host__linux.h b/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__desktop__window__tree__host__linux.h deleted file mode 100644 index 8b456b44c4f1..000000000000 --- a/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__desktop__window__tree__host__linux.h +++ /dev/null @@ -1,11 +0,0 @@ ---- chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.h.orig 2022-02-28 16:54:41 UTC -+++ chrome/browser/ui/views/frame/browser_desktop_window_tree_host_linux.h -@@ -95,7 +95,7 @@ class BrowserDesktopWindowTreeHostLinux - // browser_desktop_window_tree_host_lacros.cc. - #if BUILDFLAG(IS_CHROMEOS_LACROS) - using DesktopBrowserFrameAuraPlatform = DesktopBrowserFrameLacros; --#elif BUILDFLAG(IS_LINUX) -+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - using DesktopBrowserFrameAuraPlatform = DesktopBrowserFrameAuraLinux; - #else - #error Unknown platform diff --git a/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc b/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc index 65f637d362ba..8383d8d732f7 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__frame.cc @@ -1,52 +1,52 @@ ---- chrome/browser/ui/views/frame/browser_frame.cc.orig 2022-04-21 18:48:31 UTC +--- chrome/browser/ui/views/frame/browser_frame.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/views/frame/browser_frame.cc @@ -49,11 +49,11 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "ui/display/screen.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/views/linux_ui/linux_ui.h" #endif @@ -62,7 +62,7 @@ namespace { bool IsUsingGtkTheme(Profile* profile) { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) return ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme(); #else return false; -@@ -268,7 +268,7 @@ void BrowserFrame::OnNativeWidgetWorkspaceChanged() { +@@ -277,7 +277,7 @@ void BrowserFrame::OnNativeWidgetWorkspaceChanged() { IsVisibleOnAllWorkspaces()); // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // If the window was sent to a different workspace, prioritize it if // it was sent to the current workspace and deprioritize it // otherwise. This is done by MoveBrowsersInWorkspaceToFront() -@@ -389,7 +389,7 @@ void BrowserFrame::SelectNativeTheme() { +@@ -398,7 +398,7 @@ void BrowserFrame::SelectNativeTheme() { return; } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const views::LinuxUI* linux_ui = views::LinuxUI::instance(); // Ignore GTK+ for web apps with window-controls-overlay as the // display_override so the web contents can blend with the overlay by using -@@ -408,7 +408,7 @@ bool BrowserFrame::RegenerateFrameOnThemeChange( +@@ -417,7 +417,7 @@ bool BrowserFrame::RegenerateFrameOnThemeChange( bool need_regenerate = false; // TODO(crbug.com/1052397): Revisit the macro expression once build flag // switch of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // GTK and user theme changes can both change frame buttons, so the frame // always needs to be regenerated on Linux. need_regenerate = true; diff --git a/www/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 0b8c96b46162..78bb5a55ec2d 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 2022-05-19 14:06:27 UTC +--- chrome/browser/ui/views/frame/browser_view.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -1956,7 +1956,7 @@ void BrowserView::TabDraggingStatusChanged(bool is_dra +@@ -1964,7 +1964,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_system__menu__model__builder.cc b/www/chromium/files/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc index 8afa8e836fff..9934192460ee 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/views/frame/system_menu_model_builder.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/ui/views/frame/system_menu_model_builder.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/views/frame/system_menu_model_builder.cc -@@ -77,7 +77,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForBrowser +@@ -76,7 +76,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForBrowser ui::SimpleMenuModel* model) { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) model->AddItemWithStringId(IDC_MINIMIZE_WINDOW, IDS_MINIMIZE_WINDOW_MENU); model->AddItemWithStringId(IDC_MAXIMIZE_WINDOW, IDS_MAXIMIZE_WINDOW_MENU); model->AddItemWithStringId(IDC_RESTORE_WINDOW, IDS_RESTORE_WINDOW_MENU); -@@ -93,7 +93,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForBrowser +@@ -92,7 +92,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForBrowser } // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) model->AddSeparator(ui::NORMAL_SEPARATOR); bool supports_server_side_decorations = true; - #if defined(USE_OZONE) && \ -@@ -148,7 +148,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForAppOrPo + #if defined(USE_OZONE) && !BUILDFLAG(IS_CHROMEOS) +@@ -146,7 +146,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForAppOrPo } // 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) model->AddSeparator(ui::NORMAL_SEPARATOR); model->AddItemWithStringId(IDC_CLOSE_WINDOW, IDS_CLOSE); #endif 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 5c4323c49c43..7697ffc30943 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 2022-02-28 16:54:41 UTC +--- chrome/browser/ui/views/hung_renderer_view.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/views/hung_renderer_view.cc -@@ -403,7 +403,7 @@ void HungRendererDialogView::ForceCrashHungRenderer() +@@ -401,7 +401,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_signin__view__controller__delegate__views.cc b/www/chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc index aadbc302c4da..813a4e82c7ca 100644 --- a/www/chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc +++ b/www/chromium/files/patch-chrome_browser_ui_views_profiles_signin__view__controller__delegate__views.cc @@ -1,20 +1,20 @@ ---- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc -@@ -139,7 +139,7 @@ SigninViewControllerDelegateViews::CreateProfileCustom +@@ -140,7 +140,7 @@ SigninViewControllerDelegateViews::CreateProfileCustom #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // static std::unique_ptr SigninViewControllerDelegateViews::CreateEnterpriseConfirmationWebView( -@@ -421,7 +421,7 @@ SigninViewControllerDelegate::CreateProfileCustomizati +@@ -419,7 +419,7 @@ SigninViewControllerDelegate::CreateProfileCustomizati #endif // BUILDFLAG(ENABLE_DICE_SUPPORT) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // static SigninViewControllerDelegate* SigninViewControllerDelegate::CreateEnterpriseConfirmationDelegate( diff --git a/www/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 daad11b85efb..f8a3357ffeac 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,38 +1,38 @@ ---- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/views/tabs/tab_drag_controller.cc @@ -480,7 +480,7 @@ void TabDragController::Init(TabDragContext* source_co // synchronous on desktop Linux, so use that. // - Chrome OS // Releasing capture on Ash cancels gestures so avoid it. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) can_release_capture_ = false; #endif start_point_in_screen_ = gfx::Point(source_view_offset, mouse_offset.y()); @@ -1021,7 +1021,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if !(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) // EndMoveLoop is going to snap the window back to its original location. // Hide it so users don't see this. Hiding a window in Linux aura causes // it to lose capture so skip it. @@ -1977,7 +1977,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) - +-#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && \ ++#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) && \ + !BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_MAC) // Keeping maximized state breaks snap to Grid on Windows when dragging // tabs from maximized windows. TODO:(crbug.com/727051) Explore doing this -@@ -2358,7 +2358,7 @@ TabDragController::Liveness TabDragController::GetLoca +@@ -2362,7 +2362,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_webui_chrome__web__ui__controller__factory.cc b/www/chromium/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc index bc8f13bfea06..b4f64221bb59 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 2022-05-19 14:06:27 UTC +--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -304,7 +304,7 @@ +@@ -299,7 +299,7 @@ #include "chrome/browser/ui/webui/app_launcher_page_ui.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/webui/webui_js_error/webui_js_error_ui.h" #endif -@@ -329,17 +329,17 @@ +@@ -324,17 +324,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 -@@ -695,7 +695,7 @@ bool IsAboutUI(const GURL& url) { +@@ -680,7 +680,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) -@@ -1115,7 +1115,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we - return &NewWebUI; +@@ -1096,7 +1096,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we + #endif // !defined(USE_REAL_DBUS_CLIENTS) #endif // !defined(OFFICIAL_BUILD) #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIWebUIJsErrorHost) return &NewWebUI; #endif -@@ -1173,7 +1173,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -1154,7 +1154,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) -@@ -1229,27 +1229,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we +@@ -1213,27 +1213,27 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUISandboxHost) { return &NewWebUI; } #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIConnectorsInternalsHost) return &NewWebUI; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIDiscardsHost) return &NewWebUI; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (url.host_piece() == chrome::kChromeUIBrowserSwitchHost) return &NewWebUI; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(features::kDesktopPWAsWebAppSettingsPage) && url.host_piece() == chrome::kChromeUIWebAppSettingsHost) { return &NewWebUI; diff --git a/www/chromium/files/patch-chrome_browser_ui_webui_connectors__internals_zero__trust__utils.cc b/www/chromium/files/patch-chrome_browser_ui_webui_connectors__internals_zero__trust__utils.cc index ac2334aba092..7ba115f42964 100644 --- a/www/chromium/files/patch-chrome_browser_ui_webui_connectors__internals_zero__trust__utils.cc +++ b/www/chromium/files/patch-chrome_browser_ui_webui_connectors__internals_zero__trust__utils.cc @@ -1,29 +1,29 @@ ---- chrome/browser/ui/webui/connectors_internals/zero_trust_utils.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/ui/webui/connectors_internals/zero_trust_utils.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/webui/connectors_internals/zero_trust_utils.cc -@@ -9,7 +9,7 @@ - #include "base/strings/string_util.h" +@@ -6,7 +6,7 @@ + #include "build/build_config.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/policy/chrome_browser_policy_connector.h" #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h" -@@ -66,7 +66,7 @@ void TrySetSignal(base::flat_map(values.begin(), values.end()), ", "); - } +@@ -22,7 +22,7 @@ namespace utils { + + namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) connectors_internals::mojom::KeyTrustLevel ParseTrustLevel( BPKUR::KeyTrustLevel trust_level) { -@@ -171,7 +171,7 @@ base::flat_map SignalsToMap( - } +@@ -53,7 +53,7 @@ connectors_internals::mojom::KeyType AlgorithmToType( + } // namespace connectors_internals::mojom::KeyInfoPtr GetKeyInfo() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) auto* key_manager = g_browser_process->browser_policy_connector() ->chrome_browser_cloud_management_controller() ->GetDeviceTrustKeyManager(); 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 e715ba89489c..de30d3e44763 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,20 +1,20 @@ ---- chrome/browser/ui/webui/ntp/app_launcher_handler.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/ui/webui/ntp/app_launcher_handler.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/webui/ntp/app_launcher_handler.cc -@@ -316,7 +316,7 @@ base::Value::Dict AppLauncherHandler::CreateExtensionI +@@ -322,7 +322,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 -@@ -1387,7 +1387,7 @@ void AppLauncherHandler::InstallOsHooks(const web_app: +@@ -1398,7 +1398,7 @@ void AppLauncherHandler::InstallOsHooks(const web_app: options.os_hooks[web_app::OsHookType::kUninstallationViaOsSettings] = web_app->CanUserUninstallWebApp(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) options.os_hooks[web_app::OsHookType::kUrlHandlers] = true; #else diff --git a/www/chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc b/www/chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc index 7e23bc2e263b..1056f2c08bae 100644 --- a/www/chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc +++ b/www/chromium/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc @@ -1,47 +1,47 @@ ---- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc @@ -116,7 +116,7 @@ #include "chrome/browser/ui/webui/settings/chromeos/constants/routes.mojom.h" #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) #include "ui/display/screen.h" #endif @@ -137,7 +137,7 @@ #include "chrome/browser/ui/webui/certificate_manager_localized_strings_provider.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/ozone/public/ozone_platform.h" #endif -@@ -371,7 +371,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -372,7 +372,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht {"huge", IDS_SETTINGS_HUGE_FONT_SIZE}, // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) {"systemTheme", IDS_SETTINGS_SYSTEM_THEME}, {"useSystemTheme", IDS_SETTINGS_USE_SYSTEM_THEME}, {"classicTheme", IDS_SETTINGS_CLASSIC_THEME}, -@@ -379,7 +379,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -380,7 +380,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht #else {"resetToDefaultTheme", IDS_SETTINGS_RESET_TO_DEFAULT_THEME}, #endif -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, #endif #if BUILDFLAG(IS_MAC) -@@ -400,7 +400,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht +@@ -401,7 +401,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_LACROS) bool show_custom_chrome_frame = ui::OzonePlatform::GetInstance() ->GetPlatformRuntimeProperties() .supports_server_side_window_decorations; diff --git a/www/chromium/files/patch-chrome_browser_ui_window__sizer_window__sizer.cc b/www/chromium/files/patch-chrome_browser_ui_window__sizer_window__sizer.cc index f5e4edc63ee2..e7a263bab4e9 100644 --- a/www/chromium/files/patch-chrome_browser_ui_window__sizer_window__sizer.cc +++ b/www/chromium/files/patch-chrome_browser_ui_window__sizer_window__sizer.cc @@ -1,11 +1,11 @@ ---- chrome/browser/ui/window_sizer/window_sizer.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/ui/window_sizer/window_sizer.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/ui/window_sizer/window_sizer.cc -@@ -173,7 +173,7 @@ void WindowSizer::GetBrowserWindowBoundsAndShowState( +@@ -172,7 +172,7 @@ void WindowSizer::GetBrowserWindowBoundsAndShowState( browser, window_bounds, show_state); } -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Linux has its own implementation, see WindowSizerLinux. // static void WindowSizer::GetBrowserWindowBoundsAndShowState( diff --git a/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc b/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc index 8ed33da82169..b921cc1742c4 100644 --- a/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc +++ b/www/chromium/files/patch-chrome_browser_web__applications_os__integration_web__app__shortcut.cc @@ -1,38 +1,38 @@ ---- chrome/browser/web_applications/os_integration/web_app_shortcut.cc.orig 2022-04-21 18:48:31 UTC +--- chrome/browser/web_applications/os_integration/web_app_shortcut.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/web_applications/os_integration/web_app_shortcut.cc -@@ -43,7 +43,7 @@ namespace { +@@ -44,7 +44,7 @@ namespace { #if BUILDFLAG(IS_MAC) const int kDesiredIconSizesForShortcut[] = {16, 32, 128, 256, 512}; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Linux supports icons of any size. FreeDesktop Icon Theme Specification states // that "Minimally you should install a 48x48 icon in the hicolor theme." const int kDesiredIconSizesForShortcut[] = {16, 32, 48, 128, 256, 512}; -@@ -133,7 +133,7 @@ ScopedShortcutOverrideForTesting::~ScopedShortcutOverr +@@ -147,7 +147,7 @@ ScopedShortcutOverrideForTesting::~ScopedShortcutOverr } } } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) directories = {&desktop}; #endif for (base::ScopedTempDir* dir : directories) { -@@ -177,7 +177,7 @@ std::unique_ptr Over +@@ -191,7 +191,7 @@ std::unique_ptr Over scoped_override->chrome_apps_folder.CreateUniqueTempDirUnderPath( base_path); DCHECK(success); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool success = scoped_override->desktop.CreateUniqueTempDirUnderPath(base_path); DCHECK(success); -@@ -197,7 +197,7 @@ std::unique_ptr Over +@@ -211,7 +211,7 @@ std::unique_ptr Over #elif BUILDFLAG(IS_MAC) bool success = scoped_override->chrome_apps_folder.CreateUniqueTempDir(); DCHECK(success); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) bool success = scoped_override->desktop.CreateUniqueTempDir(); DCHECK(success); success = scoped_override->startup.CreateUniqueTempDir(); diff --git a/www/chromium/files/patch-chrome_browser_web__applications_web__app__provider.cc b/www/chromium/files/patch-chrome_browser_web__applications_web__app__provider.cc index 6beb7b9a4582..98b63fd85a9f 100644 --- a/www/chromium/files/patch-chrome_browser_web__applications_web__app__provider.cc +++ b/www/chromium/files/patch-chrome_browser_web__applications_web__app__provider.cc @@ -1,11 +1,11 @@ ---- chrome/browser/web_applications/web_app_provider.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/web_applications/web_app_provider.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/web_applications/web_app_provider.cc -@@ -292,7 +292,7 @@ void WebAppProvider::CreateSubsystems(Profile* profile +@@ -281,7 +281,7 @@ void WebAppProvider::CreateSubsystems(Profile* profile protocol_handler_manager.get()); std::unique_ptr url_handler_manager; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) url_handler_manager = std::make_unique(profile); #endif diff --git a/www/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 de944fd655dc..9810900717e1 100644 --- a/www/chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc +++ b/www/chromium/files/patch-chrome_browser_webauthn_chrome__authenticator__request__delegate.cc @@ -1,11 +1,11 @@ ---- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/webauthn/chrome_authenticator_request_delegate.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/browser/webauthn/chrome_authenticator_request_delegate.cc -@@ -557,7 +557,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureCabl +@@ -670,7 +670,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureCabl // TODO(crbug.com/1052397): Revisit the macro expression once build flag // switch of lacros-chrome is complete. -#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (std::any_of(pairings_from_extension.begin(), pairings_from_extension.end(), [](const device::CableDiscoveryData& v) -> bool { diff --git a/www/chromium/files/patch-chrome_common_chrome__features.cc b/www/chromium/files/patch-chrome_common_chrome__features.cc index 3c431f2e6835..d76d025c188a 100644 --- a/www/chromium/files/patch-chrome_common_chrome__features.cc +++ b/www/chromium/files/patch-chrome_common_chrome__features.cc @@ -1,74 +1,74 @@ ---- chrome/common/chrome_features.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/common/chrome_features.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/common/chrome_features.cc @@ -104,7 +104,7 @@ const base::Feature kAsyncDns { }; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Enables or disables the Autofill survey triggered by opening a prompt to // save address info. const base::Feature kAutofillAddressSurvey{"AutofillAddressSurvey", @@ -119,7 +119,7 @@ const base::Feature kAutofillPasswordSurvey{"AutofillP base::FEATURE_DISABLED_BY_DEFAULT}; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Enables the Restart background mode optimization. When all Chrome UI is // closed and it goes in the background, allows to restart the browser to // discard memory. -@@ -298,7 +298,7 @@ const base::Feature kDesktopPWAsNotificationIconAndTit +@@ -287,7 +287,7 @@ const base::Feature kDesktopPWAsEnforceWebAppSettingsP // Enables or disables Desktop PWAs to be auto-started on OS login. const base::Feature kDesktopPWAsRunOnOsLogin { "DesktopPWAsRunOnOsLogin", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -314,7 +314,7 @@ const base::Feature kDesktopPWAsWebBundles{"DesktopPWA +@@ -303,7 +303,7 @@ const base::Feature kDesktopPWAsWebBundles{"DesktopPWA base::FEATURE_DISABLED_BY_DEFAULT}; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Serves web app settings at chrome://app-settings/. const base::Feature kDesktopPWAsWebAppSettingsPage{ "DesktopPWAsWebAppSettingsPage", base::FEATURE_ENABLED_BY_DEFAULT}; -@@ -333,7 +333,7 @@ const base::Feature kKeepForceInstalledPreinstalledApp +@@ -327,7 +327,7 @@ const base::Feature kDmTokenDeletion{"DmTokenDeletion" const base::Feature kDnsOverHttps { "DnsOverHttps", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -349,7 +349,7 @@ const base::FeatureParam kDnsOverHttpsFallbackPa +@@ -343,7 +343,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 -@@ -646,7 +646,7 @@ const base::Feature kKernelnextVMs{"KernelnextVMs", - base::FEATURE_DISABLED_BY_DEFAULT}; - #endif +@@ -639,7 +639,7 @@ const base::Feature kIncognitoParamFilterEnabled{ + const base::Feature kIPHInWebUIDemo{"IPHInWebUIDemo", + base::FEATURE_DISABLED_BY_DEFAULT}; -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) const base::Feature kLinuxLowMemoryMonitor{"LinuxLowMemoryMonitor", base::FEATURE_DISABLED_BY_DEFAULT}; -@@ -659,7 +659,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit +@@ -652,7 +652,7 @@ constexpr base::FeatureParam kLinuxLowMemoryMonit &kLinuxLowMemoryMonitor, "critical_level", 255}; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) const base::Feature kListWebAppsSwitch{"ListWebAppsSwitch", base::FEATURE_DISABLED_BY_DEFAULT}; #endif diff --git a/www/chromium/files/patch-chrome_common_chrome__features.h b/www/chromium/files/patch-chrome_common_chrome__features.h index 35273b09cef8..ec04c20c41ca 100644 --- a/www/chromium/files/patch-chrome_common_chrome__features.h +++ b/www/chromium/files/patch-chrome_common_chrome__features.h @@ -1,47 +1,47 @@ ---- chrome/common/chrome_features.h.orig 2022-05-19 14:06:27 UTC +--- chrome/common/chrome_features.h.orig 2022-06-17 14:20:10 UTC +++ chrome/common/chrome_features.h @@ -91,7 +91,7 @@ extern const base::Feature kArcPiGhostWindow; COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kAsyncDns; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kAutofillAddressSurvey; COMPONENT_EXPORT(CHROME_FEATURES) @@ -100,7 +100,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kAutofillPasswordSurvey; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kBackgroundModeAllowRestart; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -223,7 +223,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -220,7 +220,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) extern const base::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) extern const base::Feature kDesktopPWAsWebAppSettingsPage; COMPONENT_EXPORT(CHROME_FEATURES) -@@ -451,7 +451,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) - extern const base::Feature kKernelnextVMs; - #endif +@@ -449,7 +449,7 @@ extern const base::Feature kIncognitoParamFilterEnable + COMPONENT_EXPORT(CHROME_FEATURES) + extern const base::Feature kIPHInWebUIDemo; -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS) COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kLinuxLowMemoryMonitor; COMPONENT_EXPORT(CHROME_FEATURES) -@@ -460,7 +460,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) +@@ -458,7 +458,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam kLinuxLowMemoryMonitorCriticalLevel; #endif // BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kListWebAppsSwitch; #endif diff --git a/www/chromium/files/patch-chrome_common_chrome__paths.cc b/www/chromium/files/patch-chrome_common_chrome__paths.cc index 1f9c0bc83498..940ec1a8352a 100644 --- a/www/chromium/files/patch-chrome_common_chrome__paths.cc +++ b/www/chromium/files/patch-chrome_common_chrome__paths.cc @@ -1,80 +1,80 @@ ---- chrome/common/chrome_paths.cc.orig 2022-04-21 18:48:31 UTC +--- chrome/common/chrome_paths.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/common/chrome_paths.cc -@@ -48,14 +48,14 @@ +@@ -49,14 +49,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) -@@ -182,7 +182,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -183,7 +183,7 @@ bool PathProvider(int key, base::FilePath* result) { return false; break; case chrome::DIR_DEFAULT_DOWNLOADS_SAFE: -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (!GetUserDownloadsDirectorySafe(&cur)) return false; break; -@@ -429,10 +429,12 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -426,10 +426,12 @@ bool PathProvider(int key, base::FilePath* result) { if (!base::PathExists(cur)) // We don't want to create this return false; break; -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) case chrome::DIR_POLICY_FILES: { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) cur = base::FilePath(FILE_PATH_LITERAL("/etc/opt/chrome/policies")); +#elif BUILDFLAG(IS_FREEBSD) + cur = base::FilePath(FILE_PATH_LITERAL("/usr/local/etc/chromium/policies")); #else cur = base::FilePath(FILE_PATH_LITERAL("/etc/chromium/policies")); #endif -@@ -444,7 +446,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -441,7 +443,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; -@@ -452,7 +454,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -449,7 +451,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; -@@ -496,7 +498,7 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -493,7 +495,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) -@@ -510,6 +512,9 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -507,6 +509,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__paths.h b/www/chromium/files/patch-chrome_common_chrome__paths.h index 1941de84727c..12f6569093fa 100644 --- a/www/chromium/files/patch-chrome_common_chrome__paths.h +++ b/www/chromium/files/patch-chrome_common_chrome__paths.h @@ -1,29 +1,29 @@ ---- chrome/common/chrome_paths.h.orig 2022-04-21 18:48:31 UTC +--- chrome/common/chrome_paths.h.orig 2022-06-17 14:20:10 UTC +++ chrome/common/chrome_paths.h @@ -56,7 +56,7 @@ enum { #if BUILDFLAG(IS_CHROMEOS_ASH) || \ ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ BUILDFLAG(CHROMIUM_BRANDING)) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) DIR_USER_EXTERNAL_EXTENSIONS, // Directory for per-user external extensions // on Chrome Mac and Chromium Linux. // On Chrome OS, this path is used for OEM @@ -64,7 +64,7 @@ enum { // create it. #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) DIR_STANDALONE_EXTERNAL_EXTENSIONS, // Directory for 'per-extension' // definition manifest files that // describe extensions which are to be -@@ -114,7 +114,7 @@ enum { +@@ -117,7 +117,7 @@ enum { DIR_CHROMEOS_CUSTOM_WALLPAPERS, // Directory where custom wallpapers // reside. #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) DIR_NATIVE_MESSAGING, // System directory where native messaging host // manifest files are stored. DIR_USER_NATIVE_MESSAGING, // Directory with Native Messaging Hosts diff --git a/www/chromium/files/patch-chrome_common_pref__names.cc b/www/chromium/files/patch-chrome_common_pref__names.cc index 04b95fd57e0d..487a233935a2 100644 --- a/www/chromium/files/patch-chrome_common_pref__names.cc +++ b/www/chromium/files/patch-chrome_common_pref__names.cc @@ -1,56 +1,56 @@ ---- chrome/common/pref_names.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/common/pref_names.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/common/pref_names.cc -@@ -1221,7 +1221,7 @@ const char kUseAshProxy[] = "lacros.proxy.use_ash_prox +@@ -1220,7 +1220,7 @@ const char kUseAshProxy[] = "lacros.proxy.use_ash_prox // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Linux specific preference on whether we should match the system theme. const char kUsesSystemTheme[] = "extensions.theme.use_system"; #endif -@@ -1324,7 +1324,7 @@ const char kShowUpdatePromotionInfoBar[] = +@@ -1315,7 +1315,7 @@ const char kShowUpdatePromotionInfoBar[] = // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Boolean that is false if we should show window manager decorations. If // true, we draw a custom chrome frame (thicker title bar and blue border). const char kUseCustomChromeFrame[] = "browser.custom_chrome_frame"; -@@ -1809,7 +1809,7 @@ const char kDownloadDirUpgraded[] = "download.director +@@ -1810,7 +1810,7 @@ const char kDownloadDirUpgraded[] = "download.director const char kDownloadLastCompleteTime[] = "download.last_complete_time"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kOpenPdfDownloadInSystemReader[] = "download.open_pdf_in_system_reader"; #endif -@@ -2104,7 +2104,7 @@ const char kWebAppsPreferences[] = "web_apps.web_app_i +@@ -2111,7 +2111,7 @@ const char kWebAppsPreferences[] = "web_apps.web_app_i // its isolation requirements. const char kWebAppsIsolationState[] = "web_apps.isolation_state"; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) // Dictionary that maps origins to web apps that can act as URL handlers. const char kWebAppsUrlHandlerInfo[] = "web_apps.url_handler_info"; -@@ -2234,7 +2234,7 @@ const char kAmbientAuthenticationInPrivateModesEnabled +@@ -2241,7 +2241,7 @@ const char kAmbientAuthenticationInPrivateModesEnabled // requests. const char kBasicAuthOverHttpEnabled[] = "auth.basic_over_http_enabled"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Boolean that specifies whether OK-AS-DELEGATE flag from KDC is respected // along with kAuthNegotiateDelegateAllowlist. const char kAuthNegotiateDelegateByKdcPolicy[] = -@@ -3172,7 +3172,7 @@ const char kBlockAutoplayEnabled[] = "media.block_auto +@@ -3246,7 +3246,7 @@ const char kBlockAutoplayEnabled[] = "media.block_auto const char kSandboxExternalProtocolBlocked[] = "profile.sandbox_external_protocol_blocked"; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Boolean that indicates if system notifications are allowed to be used in // place of Chrome notifications. const char kAllowSystemNotifications[] = "system_notifications.allowed"; diff --git a/www/chromium/files/patch-chrome_common_pref__names.h b/www/chromium/files/patch-chrome_common_pref__names.h index b2dd7abfec78..177307b9df53 100644 --- a/www/chromium/files/patch-chrome_common_pref__names.h +++ b/www/chromium/files/patch-chrome_common_pref__names.h @@ -1,56 +1,56 @@ ---- chrome/common/pref_names.h.orig 2022-05-19 14:06:27 UTC +--- chrome/common/pref_names.h.orig 2022-06-17 14:20:10 UTC +++ chrome/common/pref_names.h -@@ -377,7 +377,7 @@ extern const char kUseAshProxy[]; +@@ -381,7 +381,7 @@ extern const char kUseAshProxy[]; #endif // BUILDFLAG(IS_CHROMEOS_LACROS) // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) extern const char kUsesSystemTheme[]; #endif extern const char kCurrentThemePackFilename[]; @@ -406,7 +406,7 @@ extern const char kShowUpdatePromotionInfoBar[]; #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) extern const char kUseCustomChromeFrame[]; #endif #if BUILDFLAG(ENABLE_PLUGINS) -@@ -590,7 +590,7 @@ extern const char kDownloadAllowedURLsForOpenByPolicy[ +@@ -595,7 +595,7 @@ extern const char kDownloadAllowedURLsForOpenByPolicy[ extern const char kDownloadDirUpgraded[]; extern const char kDownloadLastCompleteTime[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kOpenPdfDownloadInSystemReader[]; #endif #if BUILDFLAG(IS_ANDROID) -@@ -700,7 +700,7 @@ extern const char kWebAppsUninstalledDefaultChromeApps +@@ -706,7 +706,7 @@ extern const char kWebAppsUninstalledDefaultChromeApps extern const char kWebAppsPreferences[]; extern const char kWebAppsIsolationState[]; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) extern const char kWebAppsUrlHandlerInfo[]; #endif -@@ -839,7 +839,7 @@ extern const char kGloballyScopeHTTPAuthCacheEnabled[] +@@ -844,7 +844,7 @@ extern const char kGloballyScopeHTTPAuthCacheEnabled[] extern const char kAmbientAuthenticationInPrivateModesEnabled[]; extern const char kBasicAuthOverHttpEnabled[]; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kAuthNegotiateDelegateByKdcPolicy[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -1081,7 +1081,7 @@ extern const char kBlockAutoplayEnabled[]; +@@ -1108,7 +1108,7 @@ extern const char kBlockAutoplayEnabled[]; #endif extern const char kSandboxExternalProtocolBlocked[]; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kAllowSystemNotifications[]; #endif diff --git a/www/chromium/files/patch-chrome_common_url__constants.cc b/www/chromium/files/patch-chrome_common_url__constants.cc index 3404f016bd60..a8825a007ff9 100644 --- a/www/chromium/files/patch-chrome_common_url__constants.cc +++ b/www/chromium/files/patch-chrome_common_url__constants.cc @@ -1,11 +1,11 @@ ---- chrome/common/url_constants.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/common/url_constants.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/common/url_constants.cc -@@ -476,7 +476,7 @@ const char kPhoneHubPermissionLearnMoreURL[] = +@@ -479,7 +479,7 @@ const char kPhoneHubPermissionLearnMoreURL[] = "https://support.google.com/chromebook/?p=multidevice"; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kChromeAppsDeprecationLearnMoreURL[] = "https://support.google.com/chrome/?p=chrome_app_deprecation"; #endif diff --git a/www/chromium/files/patch-chrome_common_url__constants.h b/www/chromium/files/patch-chrome_common_url__constants.h index c9d4af2c790b..86516c868a4b 100644 --- a/www/chromium/files/patch-chrome_common_url__constants.h +++ b/www/chromium/files/patch-chrome_common_url__constants.h @@ -1,11 +1,11 @@ ---- chrome/common/url_constants.h.orig 2022-05-19 14:06:27 UTC +--- chrome/common/url_constants.h.orig 2022-06-17 14:20:10 UTC +++ chrome/common/url_constants.h -@@ -446,7 +446,7 @@ extern const char kOutdatedPluginLearnMoreURL[]; +@@ -449,7 +449,7 @@ extern const char kOutdatedPluginLearnMoreURL[]; extern const char kPhoneHubPermissionLearnMoreURL[]; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // "Learn more" URL for the chrome apps deprecation dialog. extern const char kChromeAppsDeprecationLearnMoreURL[]; diff --git a/www/chromium/files/patch-chrome_common_webui__url__constants.cc b/www/chromium/files/patch-chrome_common_webui__url__constants.cc index 49349be39b27..94010631f0ad 100644 --- a/www/chromium/files/patch-chrome_common_webui__url__constants.cc +++ b/www/chromium/files/patch-chrome_common_webui__url__constants.cc @@ -1,68 +1,68 @@ ---- chrome/common/webui_url_constants.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/common/webui_url_constants.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/common/webui_url_constants.cc -@@ -453,18 +453,18 @@ const char kOsUIHelpAppURL[] = "os://help-app"; +@@ -451,18 +451,18 @@ const char kOsUIHelpAppURL[] = "os://help-app"; const char kOsUIVersionURL[] = "os://version"; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kChromeUIWebUIJsErrorHost[] = "webuijserror"; const char kChromeUIWebUIJsErrorURL[] = "chrome://webuijserror/"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) const char kChromeUIConnectorsInternalsHost[] = "connectors-internals"; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kChromeUIDiscardsHost[] = "discards"; const char kChromeUIDiscardsURL[] = "chrome://discards/"; #endif -@@ -479,14 +479,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr +@@ -477,14 +477,14 @@ const char kChromeUILinuxProxyConfigHost[] = "linux-pr #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) const char kChromeUISandboxHost[] = "sandbox"; #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) const char kChromeUIBrowserSwitchHost[] = "browser-switch"; const char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/"; const char kChromeUIEnterpriseProfileWelcomeHost[] = -@@ -501,7 +501,7 @@ const char kChromeUIProfilePickerUrl[] = "chrome://pro +@@ -499,7 +499,7 @@ const char kChromeUIProfilePickerUrl[] = "chrome://pro const char kChromeUIProfilePickerStartupQuery[] = "startup"; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) const char kChromeUITabModalConfirmDialogHost[] = "tab-modal-confirm-dialog"; @@ -574,7 +574,7 @@ const char kPrivacySandboxSubPagePath[] = "/privacySan #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kChromeUIWebAppSettingsURL[] = "chrome://app-settings/"; const char kChromeUIWebAppSettingsHost[] = "app-settings"; #endif -@@ -779,7 +779,7 @@ const char* const kChromeDebugURLs[] = { +@@ -778,7 +778,7 @@ const char* const kChromeDebugURLs[] = { blink::kChromeUIGpuJavaCrashURL, kChromeUIJavaCrashURL, #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) kChromeUIWebUIJsErrorURL, #endif kChromeUIQuitURL, diff --git a/www/chromium/files/patch-chrome_common_webui__url__constants.h b/www/chromium/files/patch-chrome_common_webui__url__constants.h index 69131e754d5d..337e54139e46 100644 --- a/www/chromium/files/patch-chrome_common_webui__url__constants.h +++ b/www/chromium/files/patch-chrome_common_webui__url__constants.h @@ -1,57 +1,57 @@ ---- chrome/common/webui_url_constants.h.orig 2022-05-19 14:06:27 UTC +--- chrome/common/webui_url_constants.h.orig 2022-06-17 14:20:10 UTC +++ chrome/common/webui_url_constants.h -@@ -382,24 +382,24 @@ extern const char kOsUIHelpAppURL[]; +@@ -384,24 +384,24 @@ extern const char kOsUIHelpAppURL[]; extern const char kOsUIVersionURL[]; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kChromeUIWebUIJsErrorHost[]; extern const char kChromeUIWebUIJsErrorURL[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) extern const char kChromeUIConnectorsInternalsHost[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kChromeUIDiscardsHost[]; extern const char kChromeUIDiscardsURL[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kChromeUIWebAppSettingsURL[]; extern const char kChromeUIWebAppSettingsHost[]; #endif -@@ -414,14 +414,14 @@ extern const char kChromeUILinuxProxyConfigHost[]; +@@ -416,14 +416,14 @@ extern const char kChromeUILinuxProxyConfigHost[]; #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) extern const char kChromeUISandboxHost[]; #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || \ - (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) extern const char kChromeUIBrowserSwitchHost[]; extern const char kChromeUIBrowserSwitchURL[]; extern const char kChromeUIEnterpriseProfileWelcomeHost[]; -@@ -433,7 +433,7 @@ extern const char kChromeUIProfilePickerUrl[]; +@@ -435,7 +435,7 @@ extern const char kChromeUIProfilePickerUrl[]; extern const char kChromeUIProfilePickerStartupQuery[]; #endif -#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ defined(TOOLKIT_VIEWS)) || \ defined(USE_AURA) extern const char kChromeUITabModalConfirmDialogHost[]; diff --git a/www/chromium/files/patch-chrome_services_system__signals_public_cpp_system__signals__service__host.cc b/www/chromium/files/patch-chrome_services_system__signals_public_cpp_system__signals__service__host.cc new file mode 100644 index 000000000000..bb370b5b8570 --- /dev/null +++ b/www/chromium/files/patch-chrome_services_system__signals_public_cpp_system__signals__service__host.cc @@ -0,0 +1,20 @@ +--- chrome/services/system_signals/public/cpp/system_signals_service_host.cc.orig 2022-06-17 14:20:10 UTC ++++ chrome/services/system_signals/public/cpp/system_signals_service_host.cc +@@ -12,7 +12,7 @@ + #include "content/public/browser/service_process_host.h" + #elif BUILDFLAG(IS_MAC) + #include "chrome/services/system_signals/mac/mac_system_signals_service.h" +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "chrome/services/system_signals/linux/linux_system_signals_service.h" + #endif + +@@ -39,7 +39,7 @@ SystemSignalsServiceHost::GetService() { + return &remote_service_; + } + +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + + device_signals::mojom::SystemSignalsService* + SystemSignalsServiceHost::GetService() { diff --git a/www/chromium/files/patch-chrome_services_system__signals_public_cpp_system__signals__service__host.h b/www/chromium/files/patch-chrome_services_system__signals_public_cpp_system__signals__service__host.h new file mode 100644 index 000000000000..772a3c12e8e4 --- /dev/null +++ b/www/chromium/files/patch-chrome_services_system__signals_public_cpp_system__signals__service__host.h @@ -0,0 +1,20 @@ +--- chrome/services/system_signals/public/cpp/system_signals_service_host.h.orig 2022-06-17 14:20:10 UTC ++++ chrome/services/system_signals/public/cpp/system_signals_service_host.h +@@ -10,7 +10,7 @@ + + #if BUILDFLAG(IS_WIN) + #include "mojo/public/cpp/bindings/remote.h" +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + #include + #endif + +@@ -33,7 +33,7 @@ class SystemSignalsServiceHost { + private: + #if BUILDFLAG(IS_WIN) + mojom::Remote remote_service_; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) + std::unique_ptr local_service_; + #endif + }; diff --git a/www/chromium/files/patch-chrome_test_BUILD.gn b/www/chromium/files/patch-chrome_test_BUILD.gn index 716204ec664c..e52a7851d696 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 2022-05-19 14:06:27 UTC +--- chrome/test/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ chrome/test/BUILD.gn -@@ -9454,7 +9454,7 @@ test("chrome_app_unittests") { +@@ -9488,7 +9488,7 @@ test("chrome_app_unittests") { "//components/heap_profiling/in_process", "//components/safe_browsing:buildflags", ] - if (!is_fuchsia) { + if (!is_fuchsia && !is_bsd) { deps += [ "//third_party/breakpad:client" ] } if (enable_gwp_asan) { diff --git a/www/chromium/files/patch-chrome_test_interaction_interaction__sequence__browser__util.cc b/www/chromium/files/patch-chrome_test_interaction_interaction__sequence__browser__util.cc new file mode 100644 index 000000000000..c166f08ee18e --- /dev/null +++ b/www/chromium/files/patch-chrome_test_interaction_interaction__sequence__browser__util.cc @@ -0,0 +1,11 @@ +--- chrome/test/interaction/interaction_sequence_browser_util.cc.orig 2022-06-17 14:20:10 UTC ++++ chrome/test/interaction/interaction_sequence_browser_util.cc +@@ -53,7 +53,7 @@ class RenderFrameHost; + + namespace { + +-#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) + #define SUPPORTS_PIXEL_TESTS 1 + #else + #define SUPPORTS_PIXEL_TESTS 0 diff --git a/www/chromium/files/patch-chrome_updater_app_app__install.cc b/www/chromium/files/patch-chrome_updater_app_app__install.cc index 19d6a80a76cd..49758d18177d 100644 --- a/www/chromium/files/patch-chrome_updater_app_app__install.cc +++ b/www/chromium/files/patch-chrome_updater_app_app__install.cc @@ -1,11 +1,11 @@ ---- chrome/updater/app/app_install.cc.orig 2022-04-21 18:48:31 UTC +--- chrome/updater/app/app_install.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/updater/app/app_install.cc -@@ -188,7 +188,7 @@ void AppInstall::WakeCandidate() { +@@ -197,7 +197,7 @@ void AppInstall::WakeCandidate() { update_service_internal, base::WrapRefCounted(this))); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1276114) - implement. void AppInstall::WakeCandidateDone() { NOTIMPLEMENTED(); diff --git a/www/chromium/files/patch-chrome_updater_configurator.cc b/www/chromium/files/patch-chrome_updater_configurator.cc index 2802860a344c..5da57674da73 100644 --- a/www/chromium/files/patch-chrome_updater_configurator.cc +++ b/www/chromium/files/patch-chrome_updater_configurator.cc @@ -1,11 +1,11 @@ ---- chrome/updater/configurator.cc.orig 2022-03-25 21:59:56 UTC +--- chrome/updater/configurator.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/updater/configurator.cc -@@ -39,7 +39,7 @@ +@@ -40,7 +40,7 @@ #include "chrome/updater/win/net/network.h" #elif BUILDFLAG(IS_MAC) #include "chrome/updater/mac/net/network.h" -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/updater/linux/net/network.h" #endif diff --git a/www/chromium/files/patch-chrome_updater_device__management_cloud__policy__util.cc b/www/chromium/files/patch-chrome_updater_device__management_cloud__policy__util.cc deleted file mode 100644 index 9e31a013f94f..000000000000 --- a/www/chromium/files/patch-chrome_updater_device__management_cloud__policy__util.cc +++ /dev/null @@ -1,47 +0,0 @@ ---- chrome/updater/device_management/cloud_policy_util.cc.orig 2022-02-28 16:54:41 UTC -+++ chrome/updater/device_management/cloud_policy_util.cc -@@ -22,7 +22,7 @@ - #include - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - #include - #include - #include -@@ -36,7 +36,7 @@ - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include // For HOST_NAME_MAX - #endif - -@@ -63,7 +63,7 @@ - - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. --#if BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - #include "base/system/sys_info.h" - #endif - -@@ -111,7 +111,7 @@ std::string GetPolicyVerificationKey() { - std::string GetMachineName() { - // 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) - char hostname[HOST_NAME_MAX]; - if (gethostname(hostname, HOST_NAME_MAX) == 0) // Success. - return hostname; -@@ -161,7 +161,7 @@ std::string GetMachineName() { - } - - std::string GetOSVersion() { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - return base::SysInfo::OperatingSystemVersion(); - #elif BUILDFLAG(IS_WIN) - base::win::OSInfo::VersionNumber version_number = diff --git a/www/chromium/files/patch-chrome_updater_util.cc b/www/chromium/files/patch-chrome_updater_util.cc index 3a9f249cbdfc..4806e48563b4 100644 --- a/www/chromium/files/patch-chrome_updater_util.cc +++ b/www/chromium/files/patch-chrome_updater_util.cc @@ -1,11 +1,11 @@ ---- chrome/updater/util.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/updater/util.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/updater/util.cc -@@ -266,7 +266,7 @@ GURL AppendQueryParameter(const GURL& url, +@@ -261,7 +261,7 @@ GURL AppendQueryParameter(const GURL& url, return url.ReplaceComponents(replacements); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // TODO(crbug.com/1276188) - implement the functions below. absl::optional GetUpdaterFolderPath(UpdaterScope scope) { diff --git a/www/chromium/files/patch-chrome_utility_services.cc b/www/chromium/files/patch-chrome_utility_services.cc index ce7e69ff7508..b650922a7624 100644 --- a/www/chromium/files/patch-chrome_utility_services.cc +++ b/www/chromium/files/patch-chrome_utility_services.cc @@ -1,56 +1,29 @@ ---- chrome/utility/services.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/utility/services.cc.orig 2022-06-17 14:20:10 UTC +++ chrome/utility/services.cc -@@ -28,7 +28,7 @@ - #include "printing/buildflags/buildflags.h" - #include "ui/accessibility/accessibility_features.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "components/services/screen_ai/screen_ai_service_impl.h" - #endif - -@@ -67,7 +67,7 @@ +@@ -74,7 +74,7 @@ #include "chrome/services/file_util/file_util_service.h" // nogncheck #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) #include "chrome/services/file_util/document_analysis_service.h" // nogncheck #endif -@@ -215,7 +215,7 @@ auto RunSpeechRecognitionService( - } - #endif // !BUILDFLAG(IS_ANDROID) - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - auto RunScreenAIService( - mojo::PendingReceiver receiver) { - return std::make_unique(std::move(receiver)); -@@ -229,7 +229,7 @@ auto RunCupsIppParser( +@@ -249,7 +249,7 @@ auto RunCupsIppParser( } #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) auto RunDocumentAnalysis( mojo::PendingReceiver receiver) { return std::make_unique(std::move(receiver)); -@@ -382,7 +382,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& - services.Add(RunSpeechRecognitionService); - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (features::IsScreenAIEnabled()) - services.Add(RunScreenAIService); - #endif -@@ -406,7 +406,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& +@@ -432,7 +432,7 @@ void RegisterMainThreadServices(mojo::ServiceFactory& services.Add(RunFileUtil); #endif -#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) +#if BUILDFLAG(FULL_SAFE_BROWSING) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) services.Add(RunDocumentAnalysis); #endif diff --git a/www/chromium/files/patch-chromecast_browser_cast__browser__main__parts.cc b/www/chromium/files/patch-chromecast_browser_cast__browser__main__parts.cc index c5dad6837844..731841914719 100644 --- a/www/chromium/files/patch-chromecast_browser_cast__browser__main__parts.cc +++ b/www/chromium/files/patch-chromecast_browser_cast__browser__main__parts.cc @@ -1,65 +1,65 @@ ---- chromecast/browser/cast_browser_main_parts.cc.orig 2022-05-19 14:06:27 UTC +--- chromecast/browser/cast_browser_main_parts.cc.orig 2022-06-17 14:20:10 UTC +++ chromecast/browser/cast_browser_main_parts.cc -@@ -92,7 +92,7 @@ +@@ -91,7 +91,7 @@ #include "ui/base/ui_base_switches.h" #include "ui/gl/gl_switches.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include #include -@@ -147,7 +147,7 @@ +@@ -146,7 +146,7 @@ #include "extensions/browser/extension_prefs.h" // nogncheck #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) #include "chromecast/browser/exo/wayland_server_controller.h" #endif -@@ -283,7 +283,7 @@ class CastViewsDelegate : public views::ViewsDelegate +@@ -282,7 +282,7 @@ class CastViewsDelegate : public views::ViewsDelegate #endif // defined(USE_AURA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath GetApplicationFontsDir() { std::unique_ptr env(base::Environment::Create()); -@@ -329,7 +329,7 @@ const DefaultCommandLineSwitch kDefaultSwitches[] = { +@@ -328,7 +328,7 @@ const DefaultCommandLineSwitch kDefaultSwitches[] = { {cc::switches::kDisableThreadedAnimation, ""}, #endif // BUILDFLAG(IS_ANDROID) #endif // BUILDFLAG(IS_CAST_AUDIO_ONLY) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if defined(ARCH_CPU_X86_FAMILY) // This is needed for now to enable the x11 Ozone platform to work with // current Linux/NVidia OpenGL drivers. -@@ -519,7 +519,7 @@ void CastBrowserMainParts::ToolkitInitialized() { +@@ -516,7 +516,7 @@ void CastBrowserMainParts::ToolkitInitialized() { views_delegate_ = std::make_unique(); #endif // defined(USE_AURA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath dir_font = GetApplicationFontsDir(); const FcChar8 *dir_font_char8 = reinterpret_cast(dir_font.value().data()); if (!FcConfigAppFontAddDir(gfx::GetGlobalFontConfig(), dir_font_char8)) { -@@ -750,7 +750,7 @@ int CastBrowserMainParts::PreMainMessageLoopRun() { +@@ -747,7 +747,7 @@ int CastBrowserMainParts::PreMainMessageLoopRun() { cast_browser_process_->browser_context()); #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) wayland_server_controller_ = std::make_unique(window_manager_.get()); #endif -@@ -825,7 +825,7 @@ void CastBrowserMainParts::PostMainMessageLoopRun() { +@@ -822,7 +822,7 @@ void CastBrowserMainParts::PostMainMessageLoopRun() { cast_browser_process_->cast_service()->Stop(); -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) wayland_server_controller_.reset(); #endif #if BUILDFLAG(ENABLE_CHROMECAST_EXTENSIONS) diff --git a/www/chromium/files/patch-chromecast_browser_cast__content__browser__client.cc b/www/chromium/files/patch-chromecast_browser_cast__content__browser__client.cc index 2f482e80813f..e397aeb17314 100644 --- a/www/chromium/files/patch-chromecast_browser_cast__content__browser__client.cc +++ b/www/chromium/files/patch-chromecast_browser_cast__content__browser__client.cc @@ -1,29 +1,29 @@ ---- chromecast/browser/cast_content_browser_client.cc.orig 2022-05-19 14:06:27 UTC +--- chromecast/browser/cast_content_browser_client.cc.orig 2022-06-17 14:20:10 UTC +++ chromecast/browser/cast_content_browser_client.cc @@ -135,7 +135,7 @@ #include "extensions/common/constants.h" // nogncheck #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) #include "chromecast/browser/webview/webview_controller.h" #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) -@@ -476,7 +476,7 @@ void CastContentBrowserClient::AppendExtraCommandLineS +@@ -474,7 +474,7 @@ void CastContentBrowserClient::AppendExtraCommandLineS switches::kAudioOutputChannels)); } } else if (process_type == switches::kGpuProcess) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Necessary for accelerated 2d canvas. By default on Linux, Chromium // assumes GLES2 contexts can be lost to a power-save mode, which breaks GPU // canvas apps. -@@ -872,7 +872,7 @@ CastContentBrowserClient::CreateThrottlesForNavigation +@@ -870,7 +870,7 @@ CastContentBrowserClient::CreateThrottlesForNavigation handle, general_audience_browsing_service_.get())); } -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) auto webview_throttle = WebviewController::MaybeGetNavigationThrottle(handle); if (webview_throttle) { throttles.push_back(std::move(webview_throttle)); diff --git a/www/chromium/files/patch-chromecast_renderer_cast__content__renderer__client.cc b/www/chromium/files/patch-chromecast_renderer_cast__content__renderer__client.cc index f9aa34f1cb55..57484e1e13f9 100644 --- a/www/chromium/files/patch-chromecast_renderer_cast__content__renderer__client.cc +++ b/www/chromium/files/patch-chromecast_renderer_cast__content__renderer__client.cc @@ -1,11 +1,11 @@ ---- chromecast/renderer/cast_content_renderer_client.cc.orig 2022-03-25 21:59:56 UTC +--- chromecast/renderer/cast_content_renderer_client.cc.orig 2022-06-17 14:20:10 UTC +++ chromecast/renderer/cast_content_renderer_client.cc -@@ -194,7 +194,7 @@ void CastContentRendererClient::RenderFrameCreated( +@@ -190,7 +190,7 @@ void CastContentRendererClient::RenderFrameCreated( dispatcher->OnRenderFrameCreated(render_frame); #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(USE_OZONE) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(USE_OZONE) // JsChannelBindings destroys itself when the RenderFrame is destroyed. JsChannelBindings::Create(render_frame); #endif diff --git a/www/chromium/files/patch-components_autofill__assistant_browser_autofill__assistant__impl.cc b/www/chromium/files/patch-components_autofill__assistant_browser_autofill__assistant__impl.cc new file mode 100644 index 000000000000..deb1e3ffd6fb --- /dev/null +++ b/www/chromium/files/patch-components_autofill__assistant_browser_autofill__assistant__impl.cc @@ -0,0 +1,11 @@ +--- components/autofill_assistant/browser/autofill_assistant_impl.cc.orig 2022-06-17 14:20:10 UTC ++++ components/autofill_assistant/browser/autofill_assistant_impl.cc +@@ -113,7 +113,7 @@ void AutofillAssistantImpl::GetCapabilitiesByHashPrefi + client_context.set_platform_type(ClientContextProto::PLATFORM_TYPE_ANDROID); + #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) + client_context.set_platform_type(ClientContextProto::PLATFORM_TYPE_DESKTOP); + #endif + diff --git a/www/chromium/files/patch-components_autofill__assistant_browser_client__context.cc b/www/chromium/files/patch-components_autofill__assistant_browser_client__context.cc new file mode 100644 index 000000000000..2f292859d16f --- /dev/null +++ b/www/chromium/files/patch-components_autofill__assistant_browser_client__context.cc @@ -0,0 +1,11 @@ +--- components/autofill_assistant/browser/client_context.cc.orig 2022-06-17 14:20:10 UTC ++++ components/autofill_assistant/browser/client_context.cc +@@ -20,7 +20,7 @@ ClientContextImpl::ClientContextImpl(const Client* cli + proto_.set_platform_type(ClientContextProto::PLATFORM_TYPE_ANDROID); + #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) + proto_.set_platform_type(ClientContextProto::PLATFORM_TYPE_DESKTOP); + #endif + diff --git a/www/chromium/files/patch-components_autofill__payments__strings.grdp b/www/chromium/files/patch-components_autofill__payments__strings.grdp index 6cfac250aa08..35d6cf55921f 100644 --- a/www/chromium/files/patch-components_autofill__payments__strings.grdp +++ b/www/chromium/files/patch-components_autofill__payments__strings.grdp @@ -1,11 +1,11 @@ ---- components/autofill_payments_strings.grdp.orig 2022-05-19 14:06:27 UTC +--- components/autofill_payments_strings.grdp.orig 2022-06-17 14:20:10 UTC +++ components/autofill_payments_strings.grdp -@@ -124,7 +124,7 @@ +@@ -127,7 +127,7 @@ Save card - + Do you want to save this card to your Google Account? 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 e04afbe2c5b7..a758e7a15a79 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 2022-05-19 14:06:27 UTC +--- components/autofill/core/common/autofill_payments_features.cc.orig 2022-06-17 14:20:10 UTC +++ components/autofill/core/common/autofill_payments_features.cc -@@ -201,7 +201,7 @@ const base::Feature kAutofillUpstreamAllowAllEmailDoma +@@ -227,7 +227,7 @@ const base::FeatureParam 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_embedder__support_user__agent__utils__unittest.cc b/www/chromium/files/patch-components_embedder__support_user__agent__utils__unittest.cc index def575e44335..48df9a6dfeae 100644 --- a/www/chromium/files/patch-components_embedder__support_user__agent__utils__unittest.cc +++ b/www/chromium/files/patch-components_embedder__support_user__agent__utils__unittest.cc @@ -1,20 +1,20 @@ ---- components/embedder_support/user_agent_utils_unittest.cc.orig 2022-02-28 16:54:41 UTC +--- components/embedder_support/user_agent_utils_unittest.cc.orig 2022-06-17 14:20:10 UTC +++ components/embedder_support/user_agent_utils_unittest.cc -@@ -54,7 +54,7 @@ namespace { +@@ -55,7 +55,7 @@ namespace { static constexpr char kChromeProductVersionRegex[] = "Chrome/([0-9]+).([0-9]+).([0-9]+).([0-9]+)"; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::string GetMachine() { struct utsname unixinfo; uname(&unixinfo); -@@ -162,7 +162,7 @@ void CheckUserAgentStringOrdering(bool mobile_device) +@@ -163,7 +163,7 @@ void CheckUserAgentStringOrdering(bool mobile_device) int value; ASSERT_TRUE(base::StringToInt(pieces[i], &value)); } -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // X11; Linux x86_64 ASSERT_EQ(2u, pieces.size()); ASSERT_EQ("X11", pieces[0]); 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 5274ab655829..15d3d2fe9c67 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 2022-05-19 14:06:27 UTC +--- components/feature_engagement/public/feature_constants.cc.orig 2022-06-17 14:20:10 UTC +++ components/feature_engagement/public/feature_constants.cc -@@ -22,7 +22,7 @@ const base::Feature kIPHDummyFeature{"IPH_Dummy", +@@ -23,7 +23,7 @@ const base::Feature kIPHDummyFeature{"IPH_Dummy", base::FEATURE_DISABLED_BY_DEFAULT}; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const base::Feature kIPHDesktopSharedHighlightingFeature{ "IPH_DesktopSharedHighlighting", base::FEATURE_DISABLED_BY_DEFAULT}; const base::Feature kIPHDesktopTabGroupsNewGroupFeature{ -@@ -288,7 +288,7 @@ const base::Feature kIPHPasswordSuggestionsFeature{ - "IPH_PasswordSuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; +@@ -293,7 +293,7 @@ const base::Feature kIPHFollowWhileBrowsingFeature{ + "IPH_FollowWhileBrowsing", base::FEATURE_DISABLED_BY_DEFAULT}; #endif // BUILDFLAG(IS_IOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) const base::Feature kIPHAutofillVirtualCardSuggestionFeature{ "IPH_AutofillVirtualCardSuggestion", base::FEATURE_ENABLED_BY_DEFAULT}; diff --git a/www/chromium/files/patch-components_feature__engagement_public_feature__constants.h b/www/chromium/files/patch-components_feature__engagement_public_feature__constants.h index 130a5c4eb349..5a706daeca67 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 2022-05-19 14:06:27 UTC +--- components/feature_engagement/public/feature_constants.h.orig 2022-06-17 14:20:10 UTC +++ components/feature_engagement/public/feature_constants.h -@@ -30,7 +30,7 @@ extern const base::Feature kUseClientConfigIPH; - extern const base::Feature kIPHDummyFeature; +@@ -32,7 +32,7 @@ extern const base::Feature kIPHDummyFeature; + extern const base::Feature kEnableIPH; #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const base::Feature kIPHDesktopSharedHighlightingFeature; extern const base::Feature kIPHDesktopTabGroupsNewGroupFeature; extern const base::Feature kIPHFocusHelpBubbleScreenReaderPromoFeature; -@@ -175,7 +175,7 @@ extern const base::Feature kIPHDefaultSiteViewFeature; - extern const base::Feature kIPHPasswordSuggestionsFeature; +@@ -178,7 +178,7 @@ extern const base::Feature kIPHPasswordSuggestionsFeat + extern const base::Feature kIPHFollowWhileBrowsingFeature; #endif // BUILDFLAG(IS_IOS) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) extern const base::Feature kIPHAutofillVirtualCardSuggestionFeature; - extern const base::Feature kIPHUpdatedConnectionSecurityIndicatorsFeature; + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || diff --git a/www/chromium/files/patch-components_feature__engagement_public_feature__list.cc b/www/chromium/files/patch-components_feature__engagement_public_feature__list.cc index 9072d425dd9d..5d99f4a6d541 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,21 +1,21 @@ ---- components/feature_engagement/public/feature_list.cc.orig 2022-05-19 14:06:27 UTC +--- components/feature_engagement/public/feature_list.cc.orig 2022-06-17 14:20:10 UTC +++ components/feature_engagement/public/feature_list.cc -@@ -120,7 +120,7 @@ const base::Feature* const kAllFeatures[] = { - &kIPHPasswordSuggestionsFeature, +@@ -121,7 +121,7 @@ const base::Feature* const kAllFeatures[] = { + &kIPHFollowWhileBrowsingFeature, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) &kIPHDesktopTabGroupsNewGroupFeature, &kIPHFocusHelpBubbleScreenReaderPromoFeature, &kIPHGMCCastStartStopFeature, @@ -143,7 +143,8 @@ const base::Feature* const kAllFeatures[] = { // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) &kIPHAutofillVirtualCardSuggestionFeature, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || diff --git a/www/chromium/files/patch-components_feature__engagement_public_feature__list.h b/www/chromium/files/patch-components_feature__engagement_public_feature__list.h index f30ceb6912d2..f62d8c0d1d20 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,40 +1,40 @@ ---- components/feature_engagement/public/feature_list.h.orig 2022-05-19 14:06:27 UTC +--- components/feature_engagement/public/feature_list.h.orig 2022-06-17 14:20:10 UTC +++ components/feature_engagement/public/feature_list.h -@@ -224,7 +224,7 @@ DEFINE_VARIATION_PARAM(kIPHPasswordSuggestionsFeature, +@@ -225,7 +225,7 @@ DEFINE_VARIATION_PARAM(kIPHFollowWhileBrowsingFeature, #endif // BUILDFLAG(IS_IOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHDesktopTabGroupsNewGroupFeature, "IPH_DesktopTabGroupsNewGroup"); DEFINE_VARIATION_PARAM(kIPHFocusModeFeature, "IPH_FocusMode"); -@@ -255,7 +255,8 @@ DEFINE_VARIATION_PARAM(kIPHIntentChipFeature, "IPH_Int +@@ -254,7 +254,8 @@ DEFINE_VARIATION_PARAM(kIPHIntentChipFeature, "IPH_Int // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) DEFINE_VARIATION_PARAM(kIPHAutofillVirtualCardSuggestionFeature, "IPH_AutofillVirtualCardSuggestion"); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || @@ -360,7 +361,7 @@ constexpr flags_ui::FeatureEntry::FeatureVariation - VARIATION_ENTRY(kIPHDefaultSiteViewFeature), VARIATION_ENTRY(kIPHPasswordSuggestionsFeature), + VARIATION_ENTRY(kIPHFollowWhileBrowsingFeature), #elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHDesktopTabGroupsNewGroupFeature), VARIATION_ENTRY(kIPHFocusModeFeature), VARIATION_ENTRY(kIPHGlobalMediaControls), -@@ -384,7 +385,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation +@@ -383,7 +384,8 @@ constexpr flags_ui::FeatureEntry::FeatureVariation // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ + BUILDFLAG(IS_BSD) VARIATION_ENTRY(kIPHAutofillVirtualCardSuggestionFeature), #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || diff --git a/www/chromium/files/patch-components_feed_core_v2_proto__util__unittest.cc b/www/chromium/files/patch-components_feed_core_v2_proto__util__unittest.cc index 75b5eb8fc90a..affbc249ee4a 100644 --- a/www/chromium/files/patch-components_feed_core_v2_proto__util__unittest.cc +++ b/www/chromium/files/patch-components_feed_core_v2_proto__util__unittest.cc @@ -1,13 +1,13 @@ ---- components/feed/core/v2/proto_util_unittest.cc.orig 2022-02-28 16:54:41 UTC +--- components/feed/core/v2/proto_util_unittest.cc.orig 2022-06-17 14:20:10 UTC +++ components/feed/core/v2/proto_util_unittest.cc -@@ -39,8 +39,8 @@ TEST(ProtoUtilTest, CreateClientInfo) { +@@ -42,8 +42,8 @@ TEST(ProtoUtilTest, CreateClientInfo) { feedwire::ClientInfo result = CreateClientInfo(request_metadata); EXPECT_EQ(feedwire::ClientInfo::CHROME_ANDROID, result.app_type()); EXPECT_EQ(feedwire::Version::RELEASE, result.app_version().build_type()); - EXPECT_EQ(1, result.app_version().major()); - EXPECT_EQ(2, result.app_version().minor()); + EXPECT_EQ(1, result.app_version().gmajor()); + EXPECT_EQ(2, result.app_version().gminor()); EXPECT_EQ(3, result.app_version().build()); EXPECT_EQ(4, result.app_version().revision()); EXPECT_FALSE(result.chrome_client_info().start_surface()); diff --git a/www/chromium/files/patch-components_flags__ui_flags__state.cc b/www/chromium/files/patch-components_flags__ui_flags__state.cc index 9dca2225b1bf..1bb08041928c 100644 --- a/www/chromium/files/patch-components_flags__ui_flags__state.cc +++ b/www/chromium/files/patch-components_flags__ui_flags__state.cc @@ -1,11 +1,11 @@ ---- components/flags_ui/flags_state.cc.orig 2022-05-19 14:06:27 UTC +--- components/flags_ui/flags_state.cc.orig 2022-06-17 14:20:10 UTC +++ components/flags_ui/flags_state.cc -@@ -623,7 +623,7 @@ unsigned short FlagsState::GetCurrentPlatform() { - #elif BUILDFLAG(IS_CHROMEOS_ASH) +@@ -624,7 +624,7 @@ unsigned short FlagsState::GetCurrentPlatform() { return kOsCrOS; - #elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \ -- BUILDFLAG(IS_OPENBSD) -+ BUILDFLAG(IS_BSD) + #elif BUILDFLAG(IS_CHROMEOS_LACROS) + return kOsLacros; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kOsLinux; #elif BUILDFLAG(IS_ANDROID) return kOsAndroid; diff --git a/www/chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc b/www/chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc index 8cef443a87d0..151940bea908 100644 --- a/www/chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc +++ b/www/chromium/files/patch-components_network__session__configurator_browser_network__session__configurator.cc @@ -1,11 +1,11 @@ ---- components/network_session_configurator/browser/network_session_configurator.cc.orig 2022-05-19 14:06:27 UTC +--- components/network_session_configurator/browser/network_session_configurator.cc.orig 2022-06-17 14:20:10 UTC +++ components/network_session_configurator/browser/network_session_configurator.cc -@@ -813,7 +813,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C +@@ -823,7 +823,7 @@ net::URLRequestContextBuilder::HttpCacheParams::Type C } #endif // #if !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE; #else return net::URLRequestContextBuilder::HttpCacheParams::DISK_BLOCKFILE; diff --git a/www/chromium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc b/www/chromium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc index ee8cecd1a764..f542cf9e6e33 100644 --- a/www/chromium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc +++ b/www/chromium/files/patch-components_network__session__configurator_browser_network__session__configurator__unittest.cc @@ -1,11 +1,11 @@ ---- components/network_session_configurator/browser/network_session_configurator_unittest.cc.orig 2022-05-19 14:06:27 UTC +--- components/network_session_configurator/browser/network_session_configurator_unittest.cc.orig 2022-06-17 14:20:10 UTC +++ components/network_session_configurator/browser/network_session_configurator_unittest.cc -@@ -807,7 +807,7 @@ TEST_F(NetworkSessionConfiguratorTest, HostRules) { +@@ -832,7 +832,7 @@ TEST_F(NetworkSessionConfiguratorTest, HostRules) { } TEST_F(NetworkSessionConfiguratorTest, DefaultCacheBackend) { -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) EXPECT_EQ(net::URLRequestContextBuilder::HttpCacheParams::DISK_SIMPLE, ChooseCacheType()); #elif BUILDFLAG(IS_MAC) diff --git a/www/chromium/files/patch-components_os__crypt_libsecret__util__linux.cc b/www/chromium/files/patch-components_os__crypt_libsecret__util__linux.cc index 8c33525f1c23..2a3b51e501c6 100644 --- a/www/chromium/files/patch-components_os__crypt_libsecret__util__linux.cc +++ b/www/chromium/files/patch-components_os__crypt_libsecret__util__linux.cc @@ -1,18 +1,18 @@ ---- components/os_crypt/libsecret_util_linux.cc.orig 2022-02-07 13:39:41 UTC +--- components/os_crypt/libsecret_util_linux.cc.orig 2022-06-17 14:20:10 UTC +++ components/os_crypt/libsecret_util_linux.cc -@@ -101,13 +101,13 @@ bool LibsecretLoader::LoadLibsecret() { +@@ -102,13 +102,13 @@ bool LibsecretLoader::LoadLibsecret() { if (libsecret_loaded_) return true; - static void* handle = dlopen("libsecret-1.so.0", RTLD_NOW | RTLD_GLOBAL); + static void* handle = dlopen("libsecret-1.so", RTLD_NOW | RTLD_GLOBAL); if (!handle) { // We wanted to use libsecret, but we couldn't load it. Warn, because // either the user asked for this, or we autodetected it incorrectly. (Or // the system has broken libraries, which is also good to warn about.) // TODO(crbug.com/607435): Channel this message to the user-facing log - VLOG(1) << "Could not load libsecret-1.so.0: " << dlerror(); + VLOG(1) << "Could not load libsecret-1.so: " << dlerror(); return false; } diff --git a/www/chromium/files/patch-components_os__crypt_os__crypt.h b/www/chromium/files/patch-components_os__crypt_os__crypt.h index 25a8a5a21a60..5ea36009e617 100644 --- a/www/chromium/files/patch-components_os__crypt_os__crypt.h +++ b/www/chromium/files/patch-components_os__crypt_os__crypt.h @@ -1,47 +1,72 @@ ---- components/os_crypt/os_crypt.h.orig 2022-04-21 18:48:31 UTC +--- components/os_crypt/os_crypt.h.orig 2022-06-17 14:20:10 UTC +++ components/os_crypt/os_crypt.h -@@ -14,7 +14,7 @@ +@@ -15,7 +15,7 @@ #include "build/build_config.h" #include "build/chromecast_buildflags.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) class KeyStorageLinux; #endif // BUILDFLAG(IS_LINUX) -@@ -30,7 +30,7 @@ struct Config; +@@ -24,7 +24,7 @@ class PrefRegistrySimple; + class PrefService; + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) + namespace crypto { + class SymmetricKey; + } +@@ -37,7 +37,7 @@ struct Config; // Temporary interface due to OSCrypt refactor. See OSCryptImpl for descriptions // of what each function does. namespace OSCrypt { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) COMPONENT_EXPORT(OS_CRYPT) void SetConfig(std::unique_ptr config); #endif // BUILDFLAG(IS_LINUX) -@@ -75,7 +75,7 @@ COMPONENT_EXPORT(OS_CRYPT) void UseMockKeyForTesting(b +@@ -82,7 +82,7 @@ COMPONENT_EXPORT(OS_CRYPT) void UseMockKeyForTesting(b COMPONENT_EXPORT(OS_CRYPT) void SetLegacyEncryptionForTesting(bool legacy); COMPONENT_EXPORT(OS_CRYPT) void ResetStateForTesting(); #endif // BUILDFLAG(IS_WIN) -#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMECAST)) +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMECAST)) COMPONENT_EXPORT(OS_CRYPT) void UseMockKeyStorageForTesting( - std::unique_ptr (*get_key_storage_mock)()); -@@ -95,7 +95,7 @@ class OSCryptImpl { - OSCryptImpl(const OSCryptImpl&) = delete; - OSCryptImpl& operator=(const OSCryptImpl&) = delete; + base::OnceCallback()> +@@ -109,7 +109,7 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCryptImpl { + // Returns singleton instance of OSCryptImpl. + static OSCryptImpl* GetInstance(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Set the configuration of OSCryptImpl. // This method, or SetRawEncryptionKey(), must be called before using // EncryptString() and DecryptString(). -@@ -200,7 +200,7 @@ class OSCryptImpl { - static void ResetStateForTesting(); +@@ -201,7 +201,7 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCryptImpl { + void ResetStateForTesting(); #endif -#if (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMECAST)) +#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMECAST)) // For unit testing purposes, inject methods to be used. - // |get_key_storage_mock| provides the desired |KeyStorage| implementation. - // If the provider returns |nullptr|, a hardcoded password will be used. + // |storage_provider_factory| provides the desired |KeyStorage| + // implementation. If the provider returns |nullptr|, a hardcoded password +@@ -226,13 +226,13 @@ class COMPONENT_EXPORT(OS_CRYPT) OSCryptImpl { + crypto::SymmetricKey* GetEncryptionKey(); + #endif // BUILDFLAG(IS_APPLE) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) + // This lock is used to make the GetEncryptionKey and + // GetRawEncryptionKey methods thread-safe. + static base::Lock& GetLock(); + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_APPLE) + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Create the KeyStorage. Will be null if no service is found. A Config must + // be set before every call to this method. + std::unique_ptr CreateKeyStorage(); diff --git a/www/chromium/files/patch-components_paint__preview_browser_paint__preview__client.cc b/www/chromium/files/patch-components_paint__preview_browser_paint__preview__client.cc index 0bbcfdb492aa..dfd3a09911fc 100644 --- a/www/chromium/files/patch-components_paint__preview_browser_paint__preview__client.cc +++ b/www/chromium/files/patch-components_paint__preview_browser_paint__preview__client.cc @@ -1,13 +1,13 @@ ---- components/paint_preview/browser/paint_preview_client.cc.orig 2022-05-19 14:06:27 UTC +--- components/paint_preview/browser/paint_preview_client.cc.orig 2022-06-17 14:20:10 UTC +++ components/paint_preview/browser/paint_preview_client.cc -@@ -312,8 +312,8 @@ void PaintPreviewClient::CapturePaintPreview( +@@ -309,8 +309,8 @@ void PaintPreviewClient::CapturePaintPreview( metadata->set_url(url.spec()); metadata->set_version(kPaintPreviewVersion); auto* chromeVersion = metadata->mutable_chrome_version(); - chromeVersion->set_major(CHROME_VERSION_MAJOR); - chromeVersion->set_minor(CHROME_VERSION_MINOR); + chromeVersion->set_gmajor(CHROME_VERSION_MAJOR); + chromeVersion->set_gminor(CHROME_VERSION_MINOR); chromeVersion->set_build(CHROME_VERSION_BUILD); chromeVersion->set_patch(CHROME_VERSION_PATCH); document_data.callback = std::move(callback); diff --git a/www/chromium/files/patch-components_password__manager_core_browser_login__database.cc b/www/chromium/files/patch-components_password__manager_core_browser_login__database.cc index 990c4482e491..3dec4797afa5 100644 --- a/www/chromium/files/patch-components_password__manager_core_browser_login__database.cc +++ b/www/chromium/files/patch-components_password__manager_core_browser_login__database.cc @@ -1,29 +1,29 @@ ---- components/password_manager/core/browser/login_database.cc.orig 2022-04-21 18:48:31 UTC +--- components/password_manager/core/browser/login_database.cc.orig 2022-06-17 14:20:10 UTC +++ components/password_manager/core/browser/login_database.cc -@@ -701,7 +701,7 @@ std::string GeneratePlaceholders(size_t count) { +@@ -699,7 +699,7 @@ std::string GeneratePlaceholders(size_t count) { return result; } -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Fills |form| with necessary data required to be removed from the database // and returns it. PasswordForm GetFormForRemoval(sql::Statement& statement) { -@@ -718,7 +718,7 @@ PasswordForm GetFormForRemoval(sql::Statement& stateme +@@ -716,7 +716,7 @@ PasswordForm GetFormForRemoval(sql::Statement& stateme // Whether we should try to return the decryptable passwords while the // encryption service fails for some passwords. bool ShouldReturnPartialPasswords() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled(features::kSkipUndecryptablePasswords); #else return false; -@@ -1547,7 +1547,7 @@ bool LoginDatabase::DeleteAndRecreateDatabaseFile() { +@@ -1545,7 +1545,7 @@ bool LoginDatabase::DeleteAndRecreateDatabaseFile() { } DatabaseCleanupResult LoginDatabase::DeleteUndecryptableLogins() { -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) TRACE_EVENT0("passwords", "LoginDatabase::DeleteUndecryptableLogins"); // If the Keychain in MacOS or the real secret key in Linux is unavailable, // don't delete any logins. diff --git a/www/chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc b/www/chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc index a056b951423e..ba6673758771 100644 --- a/www/chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc +++ b/www/chromium/files/patch-components_password__manager_core_browser_sync_password__sync__bridge.cc @@ -1,20 +1,20 @@ ---- components/password_manager/core/browser/sync/password_sync_bridge.cc.orig 2022-05-19 14:06:27 UTC +--- components/password_manager/core/browser/sync/password_sync_bridge.cc.orig 2022-06-17 14:20:10 UTC +++ components/password_manager/core/browser/sync/password_sync_bridge.cc -@@ -150,7 +150,7 @@ bool ShouldRecoverPasswordsDuringMerge() { +@@ -153,7 +153,7 @@ bool ShouldRecoverPasswordsDuringMerge() { // Delete the local undecryptable copy when this is MacOS only. #if BUILDFLAG(IS_MAC) return true; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return base::FeatureList::IsEnabled( features::kSyncUndecryptablePasswordsLinux); #else -@@ -159,7 +159,7 @@ bool ShouldRecoverPasswordsDuringMerge() { +@@ -162,7 +162,7 @@ bool ShouldRecoverPasswordsDuringMerge() { } bool ShouldCleanSyncMetadataDuringStartupWhenDecryptionFails() { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return ShouldRecoverPasswordsDuringMerge() && base::FeatureList::IsEnabled( features::kForceInitialSyncWhenDecryptionFails); diff --git a/www/chromium/files/patch-components_password__manager_core_common_password__manager__features.cc b/www/chromium/files/patch-components_password__manager_core_common_password__manager__features.cc index 5914211e9a11..0a7de79656e1 100644 --- a/www/chromium/files/patch-components_password__manager_core_common_password__manager__features.cc +++ b/www/chromium/files/patch-components_password__manager_core_common_password__manager__features.cc @@ -1,29 +1,29 @@ ---- components/password_manager/core/common/password_manager_features.cc.orig 2022-05-19 14:06:27 UTC +--- components/password_manager/core/common/password_manager_features.cc.orig 2022-06-17 14:20:10 UTC +++ components/password_manager/core/common/password_manager_features.cc @@ -70,7 +70,7 @@ const base::Feature kFillingAcrossAffiliatedWebsites{ const base::Feature kFillOnAccountSelect = {"fill-on-account-select", base::FEATURE_DISABLED_BY_DEFAULT}; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // When enabled, initial sync will be forced during startup if the password // store has encryption service failures. const base::Feature kForceInitialSyncWhenDecryptionFails = { -@@ -148,7 +148,7 @@ const base::Feature kRecoverFromNeverSaveAndroid = { +@@ -152,7 +152,7 @@ const base::Feature kRecoverFromNeverSaveAndroid = { const base::Feature kSecondaryServerFieldPredictions = { "SecondaryServerFieldPredictions", base::FEATURE_ENABLED_BY_DEFAULT}; -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Displays at least the decryptable and never saved logins in the password // manager const base::Feature kSkipUndecryptablePasswords = { -@@ -160,7 +160,7 @@ const base::Feature kSkipUndecryptablePasswords = { - const base::Feature kSupportForAddPasswordsInSettings = { +@@ -169,7 +169,7 @@ const base::Feature kSupportForAddPasswordsInSettings "SupportForAddPasswordsInSettings", base::FEATURE_DISABLED_BY_DEFAULT}; + #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // When enabled, all undecryptable passwords are deleted from the local database // during initial sync flow. const base::Feature kSyncUndecryptablePasswordsLinux = { diff --git a/www/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 a58c41faac7f..03dafd6464f1 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 2022-05-19 14:06:27 UTC +--- components/policy/core/common/cloud/cloud_policy_client.cc.orig 2022-06-17 14:20:10 UTC +++ components/policy/core/common/cloud/cloud_policy_client.cc -@@ -422,7 +422,7 @@ void CloudPolicyClient::FetchPolicy() { +@@ -447,7 +447,7 @@ void CloudPolicyClient::FetchPolicy() { fetch_request->set_invalidation_payload(invalidation_payload_); } } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Only set browser device identifier for CBCM Chrome cloud policy on // desktop. - if (base::FeatureList::IsEnabled( + if (type_to_fetch.first == diff --git a/www/chromium/files/patch-components_policy_resources_policy__templates.json b/www/chromium/files/patch-components_policy_resources_policy__templates.json index b9f17c5136da..4650aa2a3db9 100644 --- a/www/chromium/files/patch-components_policy_resources_policy__templates.json +++ b/www/chromium/files/patch-components_policy_resources_policy__templates.json @@ -1,191 +1,191 @@ ---- components/policy/resources/policy_templates.json.orig 2022-05-19 14:06:27 UTC +--- components/policy/resources/policy_templates.json.orig 2022-06-17 14:20:10 UTC +++ components/policy/resources/policy_templates.json -@@ -1434,7 +1434,7 @@ +@@ -1437,7 +1437,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pastarmovj@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win7:11-', 'chrome.mac:11-', 'chrome.linux:11-'], + 'supported_on': ['chrome.win7:11-', 'chrome.mac:11-', 'chrome.linux:11-', 'chrome.openbsd:11-', 'chrome.freebsd:11-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -2560,7 +2560,7 @@ +@@ -2565,7 +2565,7 @@ 'owners': ['file://remoting/OWNERS', 'jamiewalch@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:25-', 'chrome.mac:25-'], + 'supported_on': ['chrome.linux:25-', 'chrome.mac:25-', 'chrome.openbsd:25-', 'chrome.freebsd:25-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -4326,7 +4326,7 @@ +@@ -4331,7 +4331,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pastarmovj@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:57-', 'chrome.mac:88-', 'chrome.linux:88-'], + 'supported_on': ['chrome.win:57-', 'chrome.mac:88-', 'chrome.linux:88-', 'chrome.openbsd:88-', 'chrome.freebsd:88-'], 'features': { 'dynamic_refresh': False, 'per_profile': False, -@@ -4355,7 +4355,7 @@ +@@ -4360,7 +4360,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pastarmovj@chromium.org'], 'type': 'string', 'schema': { 'type': 'string' }, - 'supported_on': ['chrome.win:57-', 'chrome.mac:88-', 'chrome.linux:88-'], + 'supported_on': ['chrome.win:57-', 'chrome.mac:88-', 'chrome.linux:88-', 'chrome.openbsd:88-', 'chrome.freebsd:88-'], 'features': { 'dynamic_refresh': False, 'per_profile': False, -@@ -5319,7 +5319,7 @@ +@@ -5324,7 +5324,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'rsorokin@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:74-','chrome.mac:74-','chrome_os:74-'], + 'supported_on': ['chrome.linux:74-','chrome.mac:74-','chrome_os:74-','chrome.openbsd:74-','chrome.freebsd:74-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -5380,7 +5380,7 @@ +@@ -5385,7 +5385,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'rsorokin@chromium.org'], 'type': 'string', 'schema': { 'type': 'string' }, - 'supported_on': ['chrome.linux:9-'], + 'supported_on': ['chrome.linux:9-','chrome.openbsd:9-','chrome.freebsd:9-'], 'features': { 'dynamic_refresh': False, 'per_profile': False, -@@ -5446,7 +5446,7 @@ +@@ -5451,7 +5451,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'rsorokin@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:63-','chrome.mac:63-','chrome_os:63-','android:63-','webview_android:63-'], + 'supported_on': ['chrome.linux:63-','chrome.mac:63-','chrome_os:63-','android:63-','webview_android:63-','chrome.openbsd:63-','chrome.freebsd:63-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -10588,7 +10588,7 @@ +@@ -10677,7 +10677,7 @@ 'owners': ['file://net/cert/OWNERS', 'rsleevi@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome_os:30-', 'chrome.linux:30-', 'chrome.win:30-'], + 'supported_on': ['chrome_os:30-', 'chrome.linux:30-', 'chrome.win:30-', 'chrome.openbsd:30-', 'chrome.freebsd:30-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -10682,7 +10682,7 @@ +@@ -10771,7 +10771,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pmarko@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome_os:77-83', 'chrome.linux:79-83', 'chrome.mac:83-'], + 'supported_on': ['chrome_os:77-83', 'chrome.linux:79-83', 'chrome.mac:83-', 'chrome.openbsd:79-83', 'chrome.freebsd:79-83'], 'features': { 'dynamic_refresh': False, 'per_profile': False, -@@ -12679,7 +12679,7 @@ +@@ -12774,7 +12774,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'pmarko@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:19-', 'chrome.linux:19-'], + 'supported_on': ['chrome.win:19-', 'chrome.linux:19-', 'chrome.openbsd:19-', 'chrome.freebsd:19-'], 'features': { 'can_be_recommended': True, 'dynamic_refresh': True, -@@ -13537,7 +13537,7 @@ +@@ -13632,7 +13632,7 @@ 'owners': ['file://components/policy/resources/OWNERS', 'bartfab@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:31-', 'chrome.linux:31-', 'chrome_os:31-'], + 'supported_on': ['chrome.win:31-', 'chrome.linux:31-', 'chrome_os:31-', 'chrome.openbsd:31-', 'chrome.freebsd:31-'], 'features': { 'dynamic_refresh': True, 'per_profile': True, -@@ -20502,7 +20502,7 @@ +@@ -20597,7 +20597,7 @@ 'items': { 'type': 'string' } }, # Spell checking is provided by macOS, so can't be controlled on Mac. - 'supported_on': ['chrome.win:65-', 'chrome.linux:65-', 'chrome_os:65-'], + 'supported_on': ['chrome.win:65-', 'chrome.linux:65-', 'chrome_os:65-', 'chrome.openbsd:65-', 'chrome.freebsd:65-'], 'features': { 'can_be_recommended': False, 'dynamic_refresh': True, -@@ -20533,7 +20533,7 @@ +@@ -20628,7 +20628,7 @@ 'items': { 'type': 'string' } }, # Spell checking is provided by macOS, so can't be controlled on Mac. - 'supported_on': ['chrome.win:75-100', 'chrome.linux:75-100', 'chrome_os:75-100'], + 'supported_on': ['chrome.win:75-100', 'chrome.linux:75-100', 'chrome_os:75-100', 'chrome.openbsd:75-100', 'chrome.freebsd:75-100'], 'deprecated': True, 'features': { 'can_be_recommended': False, -@@ -20567,7 +20567,7 @@ +@@ -20662,7 +20662,7 @@ 'items': { 'type': 'string' } }, # Spell checking is provided by macOS, so can't be controlled on Mac. - 'supported_on': ['chrome.win:86-', 'chrome.linux:86-', 'chrome_os:86-'], + 'supported_on': ['chrome.win:86-', 'chrome.linux:86-', 'chrome_os:86-', 'chrome.openbsd:86-', 'chrome.freebsd:86-'], 'features': { 'can_be_recommended': False, 'dynamic_refresh': True, -@@ -21337,7 +21337,7 @@ +@@ -21432,7 +21432,7 @@ 'owners': ['fbeaufort@chromium.org', 'beccahughes@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:66-', 'chrome.linux:66-', 'chrome.mac:66-', 'chrome_os:66-'], + 'supported_on': ['chrome.win:66-', 'chrome.linux:66-', 'chrome.mac:66-', 'chrome_os:66-', 'chrome.openbsd:66-', 'chrome.freebsd:66-'], 'features': { 'dynamic_refresh': True, 'per_profile': True, -@@ -25611,7 +25611,7 @@ +@@ -25706,7 +25706,7 @@ 'owners': ['file://services/audio/OWNERS', 'dalecurtis@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.win:79-', 'chrome.linux:79-', 'chrome.mac:79-'], + 'supported_on': ['chrome.win:79-', 'chrome.linux:79-', 'chrome.mac:79-', 'chrome.openbsd:79-', 'chrome.freebsd:79-'], 'features': { 'dynamic_refresh': False, 'per_profile': False, -@@ -26955,7 +26955,7 @@ If this policy is left unset, privacy screen is disabl +@@ -27050,7 +27050,7 @@ If this policy is left unset, privacy screen is disabl 'owners': ['file://chrome/browser/notifications/OWNERS', 'knollr@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:83-100'], + 'supported_on': ['chrome.linux:83-100','chrome.openbsd:83-100','chrome.freebsd:83-100'], 'features': { 'dynamic_refresh': True, 'per_profile': True, -@@ -26979,7 +26979,7 @@ If set to False, $1Google +@@ -27074,7 +27074,7 @@ If set to False, $1Google 'owners': ['file://chrome/browser/notifications/OWNERS'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:90-'], + 'supported_on': ['chrome.linux:90-','chrome.openbsd:90-','chrome.freebsd:90-'], 'features': { 'dynamic_refresh': True, 'per_profile': True, -@@ -28077,7 +28077,7 @@ If you disable this policy, web page scrolling to spec +@@ -28172,7 +28172,7 @@ If you disable this policy, web page scrolling to spec 'owners': ['asumaneev@google.com'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'supported_on': ['chrome.linux:91-92', 'chrome_os:91-'], + 'supported_on': ['chrome.linux:91-92', 'chrome_os:91-', 'chrome.openbsd:91-', 'chrome.freebsd:91-'], 'features': { 'dynamic_refresh': True, 'per_profile': False, -@@ -29320,7 +29320,7 @@ When this policy is set, $2 +@@ -29418,7 +29418,7 @@ When this policy is set, $2 }, ], 'default': True, - 'supported_on': ['chrome.win:93-', 'chrome.linux:93-', 'chrome.mac:93-'], + 'supported_on': ['chrome.win:93-', 'chrome.linux:93-', 'chrome.mac:93-', 'chrome.openbsd:93-', 'chrome.freebsd:93-'], 'features': { 'dynamic_refresh': True, 'per_profile': True, -@@ -29453,7 +29453,7 @@ When this policy is set, $2 +@@ -29551,7 +29551,7 @@ When this policy is set, $2 'owners': ['mattm@chromium.org'], 'type': 'main', 'schema': { 'type': 'boolean' }, - 'future_on': ['chrome.win', 'chrome.mac', 'chrome.linux'], + 'future_on': ['chrome.win', 'chrome.mac', 'chrome.linux', 'chrome.openbsd', 'chrome.freebsd'], 'features': { 'dynamic_refresh': True, 'per_profile': True, diff --git a/www/chromium/files/patch-components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc b/www/chromium/files/patch-components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc index 71179c9bddb0..41f3c97311f9 100644 --- a/www/chromium/files/patch-components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc +++ b/www/chromium/files/patch-components_services_screen__ai_sandbox_screen__ai__sandbox__hook__linux.cc @@ -1,18 +1,18 @@ ---- components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc.orig 2022-05-19 14:06:27 UTC +--- components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc.orig 2022-06-17 14:20:10 UTC +++ components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.cc -@@ -35,6 +35,7 @@ bool ScreenAIPreSandboxHook(sandbox::policy::SandboxLi - VLOG(2) << "Screen AI library loaded pre-sandboxing:" << library_path; +@@ -36,6 +36,7 @@ bool ScreenAIPreSandboxHook(sandbox::policy::SandboxLi } + screen_ai::SetPreloadedLibraryFilePath(library_path); +#if !BUILDFLAG(IS_BSD) auto* instance = sandbox::policy::SandboxLinux::GetInstance(); std::vector permissions{ -@@ -46,6 +47,7 @@ bool ScreenAIPreSandboxHook(sandbox::policy::SandboxLi +@@ -52,6 +53,7 @@ bool ScreenAIPreSandboxHook(sandbox::policy::SandboxLi sandbox::syscall_broker::COMMAND_OPEN}), permissions, sandbox::policy::SandboxLinux::PreSandboxHook(), options); instance->EngageNamespaceSandboxIfPossible(); +#endif return true; } diff --git a/www/chromium/files/patch-components_storage__monitor_BUILD.gn b/www/chromium/files/patch-components_storage__monitor_BUILD.gn index 1c3dc3ad0240..ad6acf227a78 100644 --- a/www/chromium/files/patch-components_storage__monitor_BUILD.gn +++ b/www/chromium/files/patch-components_storage__monitor_BUILD.gn @@ -1,11 +1,11 @@ ---- components/storage_monitor/BUILD.gn.orig 2022-02-28 16:54:41 UTC +--- components/storage_monitor/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ components/storage_monitor/BUILD.gn -@@ -174,7 +174,7 @@ source_set("unit_tests") { - "mtp_manager_client_chromeos_unittest.cc", +@@ -175,7 +175,7 @@ source_set("unit_tests") { "storage_monitor_chromeos_unittest.cc", ] -- } else if (is_linux || is_chromeos_lacros) { -+ } else if ((is_linux || is_chromeos_lacros) && !is_bsd) { + } +- } else if (is_linux || is_chromeos_lacros) { ++ } else if ((is_linux || is_chromeos_lacros) && !is_bsd) { + if (use_udev) { sources += [ "storage_monitor_linux_unittest.cc" ] } - } diff --git a/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc b/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc index 21b67c3514dd..0bb456540868 100644 --- a/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc +++ b/www/chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc @@ -1,11 +1,11 @@ ---- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2022-05-19 14:06:27 UTC +--- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2022-06-17 14:20:10 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl.cc -@@ -1200,7 +1200,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor +@@ -1145,7 +1145,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor ->GetDeviceQueue() ->GetVulkanPhysicalDevice(), VK_IMAGE_TILING_OPTIMAL, ycbcr_info); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Textures that were allocated _on linux_ with ycbcr info came from // VaapiVideoDecoder, which exports using DRM format modifiers. return GrBackendFormat::MakeVk(gr_ycbcr_info, diff --git a/www/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 5dec66679a00..db81d3f41ab7 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 2022-02-28 16:54:41 UTC +--- components/viz/service/display_embedder/software_output_surface.cc.orig 2022-06-17 14:20:10 UTC +++ components/viz/service/display_embedder/software_output_surface.cc -@@ -118,7 +118,7 @@ void SoftwareOutputSurface::SwapBuffersCallback(base:: +@@ -114,7 +114,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 -@@ -149,7 +149,7 @@ gfx::OverlayTransform SoftwareOutputSurface::GetDispla +@@ -145,7 +145,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 fd322b83c76d..d4e2a47f7605 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-05-19 14:06:27 UTC +--- components/viz/service/display_embedder/software_output_surface.h.orig 2022-06-17 14:20:10 UTC +++ components/viz/service/display_embedder/software_output_surface.h -@@ -57,7 +57,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputSurface : publi +@@ -53,7 +53,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 -@@ -79,7 +79,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputSurface : publi +@@ -75,7 +75,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-content_app_content__main__runner__impl.cc b/www/chromium/files/patch-content_app_content__main__runner__impl.cc index e331d51e75f1..72c42f514b4f 100644 --- a/www/chromium/files/patch-content_app_content__main__runner__impl.cc +++ b/www/chromium/files/patch-content_app_content__main__runner__impl.cc @@ -1,120 +1,120 @@ ---- content/app/content_main_runner_impl.cc.orig 2022-05-19 14:06:27 UTC +--- content/app/content_main_runner_impl.cc.orig 2022-06-17 14:20:10 UTC +++ content/app/content_main_runner_impl.cc -@@ -129,13 +129,13 @@ +@@ -128,13 +128,13 @@ #include "base/posix/global_descriptors.h" #include "content/public/common/content_descriptors.h" -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) #include "content/public/common/zygote/zygote_fork_delegate_linux.h" #endif #endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/native_library.h" #include "base/rand_util.h" #include "content/public/common/zygote/sandbox_support_linux.h" -@@ -169,6 +169,10 @@ +@@ -173,6 +173,10 @@ #include "media/base/media_switches.h" #endif +#if BUILDFLAG(IS_BSD) +#include "base/system/sys_info.h" +#endif + #if BUILDFLAG(IS_ANDROID) #include "base/system/sys_info.h" #include "content/browser/android/battery_metrics.h" -@@ -338,7 +342,7 @@ void InitializeZygoteSandboxForBrowserProcess( +@@ -356,7 +360,7 @@ void InitializeZygoteSandboxForBrowserProcess( } #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #if BUILDFLAG(ENABLE_PLUGINS) // Loads the (native) libraries but does not initialize them (i.e., does not -@@ -374,7 +378,7 @@ void PreloadLibraryCdms() { +@@ -392,7 +396,7 @@ void PreloadLibraryCdms() { } #endif // BUILDFLAG(ENABLE_LIBRARY_CDMS) -#if BUILDFLAG(USE_ZYGOTE_HANDLE) +#if BUILDFLAG(USE_ZYGOTE_HANDLE) || BUILDFLAG(IS_BSD) void PreSandboxInit() { // Pre-acquire resources needed by BoringSSL. See // https://boringssl.googlesource.com/boringssl/+/HEAD/SANDBOXING.md -@@ -390,6 +394,11 @@ void PreSandboxInit() { +@@ -408,6 +412,11 @@ void PreSandboxInit() { #endif InitializeWebRtcModule(); +#if BUILDFLAG(IS_BSD) + // "cache" the amount of physical memory before pledge(2) + base::SysInfo::AmountOfPhysicalMemoryMB(); +#endif + // Set the android SkFontMgr for blink. We need to ensure this is done // before the sandbox is initialized to allow the font manager to access // font configuration files on disk. -@@ -559,7 +568,7 @@ int NO_STACK_PROTECTOR RunZygote(ContentMainDelegate* +@@ -577,7 +586,7 @@ int NO_STACK_PROTECTOR RunZygote(ContentMainDelegate* delegate->ZygoteStarting(&zygote_fork_delegates); media::InitializeMediaLibrary(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) PreSandboxInit(); #endif -@@ -745,11 +754,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -763,11 +772,10 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam kFieldTrialDescriptor + base::GlobalDescriptors::kBaseDescriptor); #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OPENBSD) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) g_fds->Set(kCrashDumpSignal, kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor); -#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || - // BUILDFLAG(IS_OPENBSD) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #endif // !BUILDFLAG(IS_WIN) -@@ -926,6 +934,16 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam +@@ -944,6 +952,16 @@ int ContentMainRunnerImpl::Initialize(ContentMainParam } #endif +#if BUILDFLAG(IS_BSD) + if (process_type.empty()) { + sandbox::policy::SandboxLinux::Options sandbox_options; + sandbox::policy::SandboxLinux::GetInstance()->InitializeSandbox( + sandbox::policy::SandboxTypeFromCommandLine( + *base::CommandLine::ForCurrentProcess()), + sandbox::policy::SandboxLinux::PreSandboxHook(), sandbox_options); + } +#endif + delegate_->SandboxInitialized(process_type); #if BUILDFLAG(USE_ZYGOTE_HANDLE) -@@ -981,7 +999,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -999,7 +1017,7 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { mojo::core::InitFeatures(); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If dynamic Mojo Core is being used, ensure that it's loaded very early in // the child/zygote process, before any sandbox is initialized. The library // is not fully initialized with IPC support until a ChildProcess is later -@@ -1014,6 +1032,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { +@@ -1032,6 +1050,11 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { content_main_params_.reset(); RegisterMainThreadFactories(); + +#if BUILDFLAG(IS_BSD) + if (!process_type.empty()) + PreSandboxInit(); +#endif if (process_type.empty()) return RunBrowser(std::move(main_params), start_minimal_browser); diff --git a/www/chromium/files/patch-content_browser_BUILD.gn b/www/chromium/files/patch-content_browser_BUILD.gn index 979871d51d65..0e0a5450823d 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 2022-05-19 14:06:27 UTC +--- content/browser/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ content/browser/BUILD.gn -@@ -2389,6 +2389,13 @@ source_set("browser") { +@@ -2407,6 +2407,13 @@ source_set("browser") { ] } + if (is_bsd) { + sources -= [ + "sandbox_ipc_linux.cc", + "sandbox_ipc_linux.h", + ] + } + if (is_chromeos) { deps += [ "//components/value_store:value_store" ] sources += [ diff --git a/www/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 e599a1e02682..9d24051a7806 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,10 @@ ---- content/browser/browser_child_process_host_impl.cc.orig 2022-03-25 21:59:56 UTC +--- content/browser/browser_child_process_host_impl.cc.orig 2022-06-17 14:20:10 UTC +++ content/browser/browser_child_process_host_impl.cc -@@ -292,6 +292,7 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo +@@ -294,6 +294,7 @@ void BrowserChildProcessHostImpl::LaunchWithoutExtraCo switches::kDisableBestEffortTasks, switches::kDisableLogging, switches::kEnableLogging, + switches::kDisableUnveil, switches::kIPCConnectionTimeout, switches::kLogBestEffortTasks, switches::kLogFile, 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 8c65553b3781..c1f5f1ecd32f 100644 --- a/www/chromium/files/patch-content_browser_browser__main__loop.cc +++ b/www/chromium/files/patch-content_browser_browser__main__loop.cc @@ -1,46 +1,46 @@ ---- content/browser/browser_main_loop.cc.orig 2022-05-19 14:06:27 UTC +--- content/browser/browser_main_loop.cc.orig 2022-06-17 14:20:10 UTC +++ content/browser/browser_main_loop.cc -@@ -242,6 +242,12 @@ +@@ -243,6 +243,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 -@@ -549,6 +555,12 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -540,6 +546,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 -@@ -576,7 +588,7 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -567,7 +579,7 @@ int BrowserMainLoop::EarlyInitialization() { // Up the priority of the UI thread unless it was already high (since Mac // and recent versions of Android (O+) do this automatically). -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( features::kBrowserUseDisplayThreadPriority) && base::PlatformThread::GetCurrentThreadPriority() < -@@ -587,7 +599,7 @@ int BrowserMainLoop::EarlyInitialization() { +@@ -578,7 +590,7 @@ int BrowserMainLoop::EarlyInitialization() { #endif // !BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // We use quite a few file descriptors for our IPC as well as disk the disk // cache,and the default limit on the Mac is low (256), so bump it up. diff --git a/www/chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc b/www/chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc index 2a89d2d51ac1..0f54c1724e7e 100644 --- a/www/chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc +++ b/www/chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc @@ -1,76 +1,76 @@ ---- content/browser/child_process_launcher_helper_linux.cc.orig 2022-02-28 16:54:41 UTC +--- content/browser/child_process_launcher_helper_linux.cc.orig 2022-06-17 14:20:10 UTC +++ content/browser/child_process_launcher_helper_linux.cc -@@ -19,7 +19,9 @@ +@@ -20,7 +20,9 @@ #include "content/public/common/result_codes.h" #include "content/public/common/sandboxed_process_launcher_delegate.h" #include "content/public/common/zygote/sandbox_support_linux.h" +#if !BUILDFLAG(IS_BSD) #include "content/public/common/zygote/zygote_handle.h" +#endif #include "sandbox/policy/linux/sandbox_linux.h" namespace content { -@@ -68,6 +70,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr +@@ -74,6 +76,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr int* launch_result) { *is_synchronous_launch = true; +#if !BUILDFLAG(IS_BSD) ZygoteHandle zygote_handle = base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote) ? nullptr -@@ -81,7 +84,6 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr +@@ -87,7 +90,6 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr GetProcessType()); *launch_result = LAUNCH_RESULT_SUCCESS; -#if !BUILDFLAG(IS_OPENBSD) if (handle) { // It could be a renderer process or an utility process. int oom_score = content::kMiscOomScore; -@@ -90,13 +92,13 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr +@@ -96,13 +98,13 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr oom_score = content::kLowestRendererOomScore; ZygoteHostImpl::GetInstance()->AdjustRendererOOMScore(handle, oom_score); } -#endif Process process; process.process = base::Process(handle); process.zygote = zygote_handle; return process; } +#endif Process process; process.process = base::LaunchProcess(*command_line(), options); -@@ -114,10 +116,14 @@ ChildProcessTerminationInfo ChildProcessLauncherHelper +@@ -120,10 +122,14 @@ ChildProcessTerminationInfo ChildProcessLauncherHelper const ChildProcessLauncherHelper::Process& process, bool known_dead) { ChildProcessTerminationInfo info; +#if !BUILDFLAG(IS_BSD) if (process.zygote) { info.status = process.zygote->GetTerminationStatus( process.process.Handle(), known_dead, &info.exit_code); } else if (known_dead) { +#else + if (known_dead) { +#endif info.status = base::GetKnownDeadTerminationStatus(process.process.Handle(), &info.exit_code); } else { -@@ -141,13 +147,17 @@ void ChildProcessLauncherHelper::ForceNormalProcessTer +@@ -147,13 +153,17 @@ void ChildProcessLauncherHelper::ForceNormalProcessTer DCHECK(CurrentlyOnProcessLauncherTaskRunner()); process.process.Terminate(RESULT_CODE_NORMAL_EXIT, false); // On POSIX, we must additionally reap the child. +#if !BUILDFLAG(IS_BSD) if (process.zygote) { // If the renderer was created via a zygote, we have to proxy the reaping // through the zygote process. process.zygote->EnsureProcessTerminated(process.process.Handle()); } else { +#endif base::EnsureProcessTerminated(std::move(process.process)); +#if !BUILDFLAG(IS_BSD) } +#endif } void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread( diff --git a/www/chromium/files/patch-content_browser_download_download__manager__impl.cc b/www/chromium/files/patch-content_browser_download_download__manager__impl.cc index 135079c3ef4f..2bc019e81334 100644 --- a/www/chromium/files/patch-content_browser_download_download__manager__impl.cc +++ b/www/chromium/files/patch-content_browser_download_download__manager__impl.cc @@ -1,29 +1,29 @@ ---- content/browser/download/download_manager_impl.cc.orig 2022-04-21 18:48:31 UTC +--- content/browser/download/download_manager_impl.cc.orig 2022-06-17 14:20:10 UTC +++ content/browser/download/download_manager_impl.cc -@@ -90,7 +90,7 @@ +@@ -91,7 +91,7 @@ #include "third_party/blink/public/common/storage_key/storage_key.h" #include "url/origin.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/nix/xdg_util.h" #endif -@@ -218,7 +218,7 @@ class DownloadItemFactoryImpl : public download::Downl +@@ -219,7 +219,7 @@ class DownloadItemFactoryImpl : public download::Downl } }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath GetTemporaryDownloadDirectory() { std::unique_ptr env(base::Environment::Create()); return base::nix::GetXDGDirectory(env.get(), "XDG_DATA_HOME", ".local/share"); -@@ -654,7 +654,7 @@ bool DownloadManagerImpl::InterceptDownload( +@@ -656,7 +656,7 @@ bool DownloadManagerImpl::InterceptDownload( base::FilePath DownloadManagerImpl::GetDefaultDownloadDirectory() { base::FilePath default_download_directory; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(thomasanderson,crbug.com/784010): Remove this when all Linux // distros with versions of GTK lower than 3.14.7 are no longer // supported. This should happen when support for Ubuntu Trusty and diff --git a/www/chromium/files/patch-content_browser_gpu_gpu__process__host.cc b/www/chromium/files/patch-content_browser_gpu_gpu__process__host.cc index cc749785d7e2..660992a77dea 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,28 +1,28 @@ ---- content/browser/gpu/gpu_process_host.cc.orig 2022-02-28 16:54:41 UTC +--- content/browser/gpu/gpu_process_host.cc.orig 2022-06-17 14:20:10 UTC +++ content/browser/gpu/gpu_process_host.cc -@@ -100,7 +100,7 @@ +@@ -102,7 +102,7 @@ #include "ui/ozone/public/ozone_switches.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/gfx/switches.h" #endif -@@ -252,6 +252,7 @@ static const char* const kSwitchNames[] = { +@@ -254,6 +254,7 @@ static const char* const kSwitchNames[] = { switches::kEnableBackgroundThreadPool, switches::kEnableGpuRasterization, switches::kEnableLogging, + switches::kDisableUnveil, switches::kEnableDeJelly, switches::kDeJellyScreenWidth, - switches::kDocumentTransitionSlowdownFactor, -@@ -289,7 +290,7 @@ static const char* const kSwitchNames[] = { + switches::kDoubleBufferCompositing, +@@ -290,7 +291,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__interface__proxy.cc b/www/chromium/files/patch-content_browser_media_media__interface__proxy.cc index aa1f464c30ee..983c990f29ad 100644 --- a/www/chromium/files/patch-content_browser_media_media__interface__proxy.cc +++ b/www/chromium/files/patch-content_browser_media_media__interface__proxy.cc @@ -1,20 +1,20 @@ ---- content/browser/media/media_interface_proxy.cc.orig 2022-05-19 14:06:27 UTC +--- content/browser/media/media_interface_proxy.cc.orig 2022-06-17 14:20:10 UTC +++ content/browser/media/media_interface_proxy.cc -@@ -73,7 +73,7 @@ +@@ -74,7 +74,7 @@ #include "media/mojo/services/mojo_renderer_service.h" // nogncheck #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/public/browser/stable_video_decoder_factory.h" #include "media/base/media_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -293,7 +293,7 @@ void MediaInterfaceProxy::CreateVideoDecoder( +@@ -294,7 +294,7 @@ void MediaInterfaceProxy::CreateVideoDecoder( mojo::PendingRemote oop_video_decoder; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(media::kUseOutOfProcessVideoDecoding)) { // TODO(b/195769334): for now, we're using the same // StableVideoDecoderFactory. However, we should be using a separate diff --git a/www/chromium/files/patch-content_browser_renderer__host_render__frame__host__impl.cc b/www/chromium/files/patch-content_browser_renderer__host_render__frame__host__impl.cc deleted file mode 100644 index a89c4c3df9de..000000000000 --- a/www/chromium/files/patch-content_browser_renderer__host_render__frame__host__impl.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- content/browser/renderer_host/render_frame_host_impl.cc.orig 2022-05-19 14:06:27 UTC -+++ content/browser/renderer_host/render_frame_host_impl.cc -@@ -276,7 +276,7 @@ - #include "content/browser/renderer_host/render_view_host_delegate_view.h" - #endif - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - #include "content/browser/accessibility/ax_screen_ai_annotator.h" - #include "ui/accessibility/accessibility_features.h" - #endif -@@ -2661,7 +2661,7 @@ void RenderFrameHostImpl::AccessibilityPerformAction( - view->SetLastPointerType(ui::EventPointerType::kTouch); - } - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - if (action_data.action == ax::mojom::Action::kRunScreenAi) { - RunScreenAIAnnotator(); - return; -@@ -2671,7 +2671,7 @@ void RenderFrameHostImpl::AccessibilityPerformAction( - render_accessibility_->PerformAction(action_data); - } - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - void RenderFrameHostImpl::RunScreenAIAnnotator() { - if (!features::IsScreenAIEnabled()) - return; diff --git a/www/chromium/files/patch-content_browser_renderer__host_render__frame__host__impl.h b/www/chromium/files/patch-content_browser_renderer__host_render__frame__host__impl.h deleted file mode 100644 index 787c0c54c2e2..000000000000 --- a/www/chromium/files/patch-content_browser_renderer__host_render__frame__host__impl.h +++ /dev/null @@ -1,20 +0,0 @@ ---- content/browser/renderer_host/render_frame_host_impl.h.orig 2022-05-19 14:06:27 UTC -+++ content/browser/renderer_host/render_frame_host_impl.h -@@ -3341,7 +3341,7 @@ class CONTENT_EXPORT RenderFrameHostImpl - - TraceProto::LifecycleState LifecycleStateToProto() const; - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - void RunScreenAIAnnotator(); - #endif - -@@ -4193,7 +4193,7 @@ class CONTENT_EXPORT RenderFrameHostImpl - BackForwardCacheDisablingFeaturesCallback - back_forward_cache_disabling_features_callback_for_testing_; - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Manages the snapshot processing by Screen AI, if enabled. - std::unique_ptr ax_screen_ai_annotator_; - #endif 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 c2fa8838903a..a712450c8147 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,37 +1,37 @@ ---- content/browser/renderer_host/render_process_host_impl.cc.orig 2022-05-19 14:06:27 UTC +--- content/browser/renderer_host/render_process_host_impl.cc.orig 2022-06-17 14:20:10 UTC +++ content/browser/renderer_host/render_process_host_impl.cc -@@ -210,7 +210,7 @@ +@@ -211,7 +211,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 -@@ -1180,7 +1180,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = +@@ -1139,7 +1139,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; -@@ -1267,7 +1267,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public +@@ -1226,7 +1226,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; -@@ -3257,6 +3257,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin +@@ -3212,6 +3212,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, switches::kDisableTouchDragDrop, + switches::kDisableUnveil, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, switches::kDisableWebGLImageChromium, diff --git a/www/chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h b/www/chromium/files/patch-content_browser_renderer__host_render__process__host__impl.h index fbec9c89ecb7..c7e7c39501b4 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 2022-05-19 14:06:27 UTC +--- content/browser/renderer_host/render_process_host_impl.h.orig 2022-06-17 14:20:10 UTC +++ content/browser/renderer_host/render_process_host_impl.h -@@ -461,7 +461,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -466,7 +466,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // Sets this RenderProcessHost to be guest only. For Testing only. void SetForGuestsOnlyForTesting(); -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) // Launch the zygote early in the browser startup. static void EarlyZygoteLaunch(); #endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_MAC) diff --git a/www/chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc b/www/chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc index dfafc2c1bb09..55f1ef78958f 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 2022-05-19 14:06:27 UTC +--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2022-06-17 14:20:10 UTC +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -114,7 +114,7 @@ #include "ui/gfx/gdi_util.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "content/browser/accessibility/browser_accessibility_auralinux.h" #include "ui/base/ime/linux/text_edit_command_auralinux.h" #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h" @@ -439,7 +439,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::Ge if (manager) return ToBrowserAccessibilityWin(manager->GetRoot())->GetCOM(); -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) BrowserAccessibilityManager* manager = host()->GetOrCreateRootBrowserAccessibilityManager(); if (manager && manager->GetRoot()) -@@ -1596,7 +1596,7 @@ bool RenderWidgetHostViewAura::ShouldDoLearning() { +@@ -1583,7 +1583,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) { -@@ -2408,7 +2408,7 @@ bool RenderWidgetHostViewAura::NeedsInputGrab() { +@@ -2396,7 +2396,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; -@@ -2585,7 +2585,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit +@@ -2573,7 +2573,7 @@ void RenderWidgetHostViewAura::ForwardKeyboardEventWit if (!target_host) return; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate = ui::GetTextEditKeyBindingsDelegate(); std::vector commands; diff --git a/www/chromium/files/patch-content_browser_utility__sandbox__delegate.cc b/www/chromium/files/patch-content_browser_utility__sandbox__delegate.cc index f7a5722a4449..b7f79c80b996 100644 --- a/www/chromium/files/patch-content_browser_utility__sandbox__delegate.cc +++ b/www/chromium/files/patch-content_browser_utility__sandbox__delegate.cc @@ -1,42 +1,24 @@ ---- content/browser/utility_sandbox_delegate.cc.orig 2022-05-19 14:06:27 UTC +--- content/browser/utility_sandbox_delegate.cc.orig 2022-06-17 14:20:10 UTC +++ content/browser/utility_sandbox_delegate.cc -@@ -62,10 +62,10 @@ UtilitySandboxedProcessLauncherDelegate:: +@@ -63,10 +63,10 @@ UtilitySandboxedProcessLauncherDelegate:: #if BUILDFLAG(ENABLE_PLUGINS) 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_CHROMEOS_ASH) -@@ -75,7 +75,7 @@ UtilitySandboxedProcessLauncherDelegate:: - sandbox_type_ == sandbox::mojom::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) - sandbox_type_ == sandbox::mojom::Sandbox::kScreenAI || - #endif - sandbox_type_ == sandbox::mojom::Sandbox::kAudio || -@@ -108,7 +108,7 @@ ZygoteHandle UtilitySandboxedProcessLauncherDelegate:: +@@ -109,7 +109,7 @@ ZygoteHandle UtilitySandboxedProcessLauncherDelegate:: // 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_CHROMEOS_ASH) -@@ -122,7 +122,7 @@ ZygoteHandle UtilitySandboxedProcessLauncherDelegate:: - #if BUILDFLAG(ENABLE_OOP_PRINTING) - sandbox_type_ == sandbox::mojom::Sandbox::kPrintBackend || - #endif --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - sandbox_type_ == sandbox::mojom::Sandbox::kScreenAI || - #endif - sandbox_type_ == sandbox::mojom::Sandbox::kSpeechRecognition) { 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 336ecc8a9179..aac99b7f3e98 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 2022-05-19 14:06:27 UTC +--- content/browser/web_contents/web_contents_view_aura.cc.orig 2022-06-17 14:20:10 UTC +++ content/browser/web_contents/web_contents_view_aura.cc @@ -159,7 +159,7 @@ class WebDragSourceAura : public content::WebContentsO raw_ptr window_; }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Fill out the OSExchangeData with a file contents, synthesizing a name if // necessary. void PrepareDragForFileContents(const DropData& drop_data, @@ -242,7 +242,7 @@ void PrepareDragData(const DropData& drop_data, if (!drop_data.download_metadata.empty()) PrepareDragForDownload(drop_data, provider, web_contents); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // We set the file contents before the URL because the URL also sets file // contents (to a .URL shortcut). We want to prefer file content data over // a shortcut so we add it first. -@@ -1333,7 +1333,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* +@@ -1343,7 +1343,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_gpu_gpu__main.cc b/www/chromium/files/patch-content_gpu_gpu__main.cc index f3e058e2c8cd..c7c3757f1819 100644 --- a/www/chromium/files/patch-content_gpu_gpu__main.cc +++ b/www/chromium/files/patch-content_gpu_gpu__main.cc @@ -1,73 +1,73 @@ ---- content/gpu/gpu_main.cc.orig 2022-05-19 14:06:27 UTC +--- content/gpu/gpu_main.cc.orig 2022-06-17 14:20:10 UTC +++ content/gpu/gpu_main.cc -@@ -87,7 +87,7 @@ +@@ -88,7 +88,7 @@ #include "sandbox/win/src/sandbox.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/gpu/gpu_sandbox_hook_linux.h" #include "sandbox/policy/linux/sandbox_linux.h" #include "sandbox/policy/sandbox_type.h" -@@ -109,7 +109,7 @@ namespace content { +@@ -110,7 +110,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&); -@@ -171,7 +171,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel +@@ -172,7 +172,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_); -@@ -267,7 +267,7 @@ int GpuMain(MainFunctionParams parameters) { +@@ -268,7 +268,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 -@@ -410,17 +410,19 @@ int GpuMain(MainFunctionParams parameters) { +@@ -411,17 +411,19 @@ int GpuMain(MainFunctionParams parameters) { namespace { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread, const gpu::GPUInfo* gpu_info, const gpu::GpuPreferences& gpu_prefs) { TRACE_EVENT0("gpu,startup", "Initialize sandbox"); +#if !BUILDFLAG(IS_BSD) if (watchdog_thread) { // SandboxLinux needs to be able to ensure that the thread // has really been stopped. sandbox::policy::SandboxLinux::GetInstance()->StopThread(watchdog_thread); } +#endif // SandboxLinux::InitializeSandbox() must always be called // with only one thread. -@@ -455,11 +457,13 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo +@@ -456,11 +458,13 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo *base::CommandLine::ForCurrentProcess()), base::BindOnce(GpuProcessPreSandboxHook), sandbox_options); +#if !BUILDFLAG(IS_BSD) if (watchdog_thread) { base::Thread::Options thread_options; thread_options.timer_slack = base::TIMER_SLACK_MAXIMUM; watchdog_thread->StartWithOptions(std::move(thread_options)); } +#endif return res; } diff --git a/www/chromium/files/patch-content_public_common_content__features.cc b/www/chromium/files/patch-content_public_common_content__features.cc index b54010be9e01..810c599221d1 100644 --- a/www/chromium/files/patch-content_public_common_content__features.cc +++ b/www/chromium/files/patch-content_public_common_content__features.cc @@ -1,50 +1,50 @@ ---- content/public/common/content_features.cc.orig 2022-05-19 14:06:27 UTC +--- content/public/common/content_features.cc.orig 2022-06-17 14:20:10 UTC +++ content/public/common/content_features.cc @@ -43,7 +43,7 @@ const base::Feature kAudioServiceOutOfProcess { "AudioServiceOutOfProcess", // TODO(crbug.com/1052397): Remove !IS_CHROMEOS_LACROS once lacros starts being // built with OS_CHROMEOS instead of OS_LINUX. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) base::FEATURE_ENABLED_BY_DEFAULT #else @@ -55,7 +55,7 @@ const base::Feature kAudioServiceOutOfProcess { // kAudioServiceOutOfProcess feature is enabled. const base::Feature kAudioServiceSandbox { "AudioServiceSandbox", -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -1055,7 +1055,7 @@ const base::Feature kWebAssemblyBaseline{"WebAssemblyB +@@ -1029,7 +1029,7 @@ const base::Feature kWebAssemblyBaseline{"WebAssemblyB const base::Feature kWebAssemblyCodeProtection{ "WebAssemblyCodeProtection", base::FEATURE_ENABLED_BY_DEFAULT}; -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) // Use memory protection keys in userspace (PKU) (if available) to protect code // JITed for WebAssembly. Fall back to traditional memory protection if // WebAssemblyCodeProtection is also enabled. -@@ -1085,7 +1085,7 @@ const base::Feature kWebAssemblyTiering{"WebAssemblyTi +@@ -1059,7 +1059,7 @@ const base::Feature kWebAssemblyTiering{"WebAssemblyTi const base::Feature kWebAssemblyTrapHandler { "WebAssemblyTrapHandler", #if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC)) && \ + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)) && \ defined(ARCH_CPU_X86_64)) || \ (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) base::FEATURE_ENABLED_BY_DEFAULT -@@ -1166,7 +1166,11 @@ const base::Feature kWebUIReportOnlyTrustedTypes{ +@@ -1140,7 +1140,11 @@ const base::Feature kWebUIReportOnlyTrustedTypes{ // Controls whether the WebUSB API is enabled: // https://wicg.github.io/webusb +#if BUILDFLAG(IS_BSD) +const base::Feature kWebUsb{"WebUSB", base::FEATURE_DISABLED_BY_DEFAULT}; +#else const base::Feature kWebUsb{"WebUSB", base::FEATURE_ENABLED_BY_DEFAULT}; +#endif // Controls whether the WebXR Device API is enabled. const base::Feature kWebXr{"WebXR", base::FEATURE_ENABLED_BY_DEFAULT}; diff --git a/www/chromium/files/patch-content_public_common_content__features.h b/www/chromium/files/patch-content_public_common_content__features.h index 08a96085a4b3..6576958c187c 100644 --- a/www/chromium/files/patch-content_public_common_content__features.h +++ b/www/chromium/files/patch-content_public_common_content__features.h @@ -1,11 +1,11 @@ ---- content/public/common/content_features.h.orig 2022-05-19 14:06:27 UTC +--- content/public/common/content_features.h.orig 2022-06-17 14:20:10 UTC +++ content/public/common/content_features.h -@@ -264,7 +264,7 @@ CONTENT_EXPORT extern const base::Feature kV8VmFuture; +@@ -257,7 +257,7 @@ CONTENT_EXPORT extern const base::Feature kV8VmFuture; CONTENT_EXPORT extern const base::Feature kWebAppWindowControlsOverlay; CONTENT_EXPORT extern const base::Feature kWebAssemblyBaseline; CONTENT_EXPORT extern const base::Feature kWebAssemblyCodeProtection; -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && defined(ARCH_CPU_X86_64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_X86_64) CONTENT_EXPORT extern const base::Feature kWebAssemblyCodeProtectionPku; #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && // defined(ARCH_CPU_X86_64) diff --git a/www/chromium/files/patch-content_public_common_content__switches.cc b/www/chromium/files/patch-content_public_common_content__switches.cc index ab653cca6f60..9a2153259489 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 2022-05-19 14:06:27 UTC +--- content/public/common/content_switches.cc.orig 2022-06-17 14:20:10 UTC +++ content/public/common/content_switches.cc -@@ -370,6 +370,8 @@ const char kEnableGpuMemoryBufferVideoFrames[] = +@@ -365,6 +365,8 @@ const char kEnableGpuMemoryBufferVideoFrames[] = // 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. -@@ -981,7 +983,7 @@ const char kEnableAutomation[] = "enable-automation"; +@@ -975,7 +977,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 dd5a2ce9fd0f..e9d4d9f91b71 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 2022-05-19 14:06:27 UTC +--- content/public/common/content_switches.h.orig 2022-06-17 14:20:10 UTC +++ content/public/common/content_switches.h @@ -117,6 +117,7 @@ CONTENT_EXPORT extern const char kEnableBlinkTestFeatu CONTENT_EXPORT extern const char kEnableGpuMemoryBufferVideoFrames[]; CONTENT_EXPORT extern const char kEnableLCDText[]; CONTENT_EXPORT extern const char kEnableLogging[]; +CONTENT_EXPORT extern const char kDisableUnveil[]; CONTENT_EXPORT extern const char kEnableNetworkInformationDownlinkMax[]; CONTENT_EXPORT extern const char kEnableCanvas2DLayers[]; CONTENT_EXPORT extern const char kEnablePluginPlaceholderTesting[]; -@@ -265,7 +266,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD +@@ -264,7 +265,7 @@ CONTENT_EXPORT extern const char kRendererWaitForJavaD // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) CONTENT_EXPORT extern const char kEnableSpeechDispatcher[]; #endif diff --git a/www/chromium/files/patch-content_renderer_render__thread__impl.cc b/www/chromium/files/patch-content_renderer_render__thread__impl.cc index 25c46e126b26..d90cb036286b 100644 --- a/www/chromium/files/patch-content_renderer_render__thread__impl.cc +++ b/www/chromium/files/patch-content_renderer_render__thread__impl.cc @@ -1,47 +1,47 @@ ---- content/renderer/render_thread_impl.cc.orig 2022-05-19 14:06:27 UTC +--- content/renderer/render_thread_impl.cc.orig 2022-06-17 14:20:10 UTC +++ content/renderer/render_thread_impl.cc -@@ -189,7 +189,7 @@ +@@ -190,7 +190,7 @@ #if BUILDFLAG(IS_MAC) #include -#else +#elif !BUILDFLAG(IS_OPENBSD) #include #endif -@@ -716,7 +716,7 @@ void RenderThreadImpl::Init() { +@@ -717,7 +717,7 @@ void RenderThreadImpl::Init() { DCHECK(parsed_num_raster_threads) << string_value; DCHECK_GT(num_raster_threads, 0); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) categorized_worker_pool_->SetBackgroundingCallback( main_thread_scheduler_->DefaultTaskRunner(), base::BindOnce( -@@ -739,7 +739,7 @@ void RenderThreadImpl::Init() { +@@ -740,7 +740,7 @@ void RenderThreadImpl::Init() { base::DiscardableMemoryAllocator::SetInstance( discardable_memory_allocator_.get()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled( blink::features::kBlinkCompositorUseDisplayThreadPriority)) { render_message_filter()->SetThreadPriority( -@@ -1098,7 +1098,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1099,7 +1099,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: const bool enable_video_decode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoDecodeLinux) && #else !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) && -@@ -1109,7 +1109,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: +@@ -1110,7 +1110,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl: const bool enable_video_encode_accelerator = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) base::FeatureList::IsEnabled(media::kVaapiVideoEncodeLinux) && #else !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoEncode) && diff --git a/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc b/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc index 122ec1373f57..dca05fa29d81 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,48 +1,48 @@ ---- content/renderer/renderer_blink_platform_impl.cc.orig 2022-05-19 14:06:27 UTC +--- content/renderer/renderer_blink_platform_impl.cc.orig 2022-06-17 14:20:10 UTC +++ content/renderer/renderer_blink_platform_impl.cc -@@ -109,7 +109,7 @@ +@@ -110,7 +110,7 @@ #if BUILDFLAG(IS_MAC) #include "content/child/child_process_sandbox_support_impl_mac.h" -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "content/child/child_process_sandbox_support_impl_linux.h" #endif -@@ -178,7 +178,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -179,7 +179,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( main_thread_scheduler_(main_thread_scheduler) { // RenderThread may not exist in some tests. if (RenderThreadImpl::current()) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::PendingRemote font_service; RenderThreadImpl::current()->BindHostReceiver( font_service.InitWithNewPipeAndPassReceiver()); -@@ -188,7 +188,7 @@ RendererBlinkPlatformImpl::RendererBlinkPlatformImpl( +@@ -189,7 +189,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(); -@@ -283,7 +283,8 @@ RendererBlinkPlatformImpl::WrapSharedURLLoaderFactory( +@@ -284,7 +284,8 @@ RendererBlinkPlatformImpl::WrapSharedURLLoaderFactory( /*terminate_sync_load_event=*/nullptr); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +// pledge +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) void RendererBlinkPlatformImpl::SetDisplayThreadPriority( base::PlatformThreadId thread_id) { if (RenderThreadImpl* render_thread = RenderThreadImpl::current()) { -@@ -298,7 +299,7 @@ blink::BlameContext* RendererBlinkPlatformImpl::GetTop +@@ -299,7 +300,7 @@ blink::BlameContext* RendererBlinkPlatformImpl::GetTop } blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return sandbox_support_.get(); #else // These platforms do not require sandbox support. diff --git a/www/chromium/files/patch-content_shell_BUILD.gn b/www/chromium/files/patch-content_shell_BUILD.gn index 4384cd627ed4..2e72e582baab 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 2022-05-19 14:06:27 UTC +--- content/shell/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ content/shell/BUILD.gn -@@ -880,7 +880,7 @@ group("content_shell_crash_test") { +@@ -879,7 +879,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_browser_shell__browser__main__parts.cc b/www/chromium/files/patch-content_shell_browser_shell__browser__main__parts.cc index 354654dfb0eb..f3be501ed62b 100644 --- a/www/chromium/files/patch-content_shell_browser_shell__browser__main__parts.cc +++ b/www/chromium/files/patch-content_shell_browser_shell__browser__main__parts.cc @@ -1,20 +1,47 @@ ---- content/shell/browser/shell_browser_main_parts.cc.orig 2022-05-19 14:06:27 UTC +--- content/shell/browser/shell_browser_main_parts.cc.orig 2022-06-17 14:20:10 UTC +++ content/shell/browser/shell_browser_main_parts.cc -@@ -51,7 +51,7 @@ +@@ -50,7 +50,7 @@ #include "net/base/network_change_notifier.h" #endif -#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) #include "ui/base/ime/init/input_method_initializer.h" #endif -@@ -131,7 +131,7 @@ void ShellBrowserMainParts::PostCreateMainMessageLoop( +@@ -65,7 +65,7 @@ + #include "chromeos/lacros/dbus/lacros_dbus_thread_manager.h" + #endif + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/views/linux_ui/linux_ui.h" // nogncheck + #include "ui/views/linux_ui/linux_ui_factory.h" // nogncheck + #endif +@@ -129,7 +129,7 @@ void ShellBrowserMainParts::PostCreateMainMessageLoop( } int ShellBrowserMainParts::PreEarlyInitialization() { -#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) ui::InitializeInputMethodForTesting(); #endif #if BUILDFLAG(IS_ANDROID) +@@ -153,7 +153,7 @@ void ShellBrowserMainParts::ToolkitInitialized() { + if (switches::IsRunWebTestsSwitchPresent()) + return; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + views::LinuxUI::SetInstance(CreateLinuxUi()); + #endif + } +@@ -196,7 +196,7 @@ void ShellBrowserMainParts::PostMainMessageLoopRun() { + ShellDevToolsManagerDelegate::StopHttpHandler(); + browser_context_.reset(); + off_the_record_browser_context_.reset(); +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + views::LinuxUI::SetInstance(nullptr); + #endif + performance_manager_lifetime_.reset(); diff --git a/www/chromium/files/patch-content_test_BUILD.gn b/www/chromium/files/patch-content_test_BUILD.gn index d2fe457d92dd..434f6b6e977c 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 2022-05-19 14:06:27 UTC +--- content/test/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ content/test/BUILD.gn -@@ -1938,7 +1938,7 @@ static_library("run_all_unittests") { +@@ -1955,7 +1955,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" ] } } -@@ -2888,7 +2888,7 @@ test("content_unittests") { +@@ -2917,7 +2917,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 421ce9c78c37..7c22404390f0 100644 --- a/www/chromium/files/patch-content_utility_services.cc +++ b/www/chromium/files/patch-content_utility_services.cc @@ -1,20 +1,47 @@ ---- content/utility/services.cc.orig 2022-02-28 16:54:41 UTC +--- content/utility/services.cc.orig 2022-06-17 14:20:10 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 "sandbox/linux/services/libc_interceptor.h" #include "sandbox/policy/mojom/sandbox.mojom.h" #include "sandbox/policy/sandbox_type.h" -@@ -205,7 +205,7 @@ auto RunAudio(mojo::PendingReceiver +@@ -354,7 +354,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(RunStableVideoDecoderFactoryService); + #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)) && diff --git a/www/chromium/files/patch-content_utility_utility__main.cc b/www/chromium/files/patch-content_utility_utility__main.cc index 870834b11c62..c28b1490a69a 100644 --- a/www/chromium/files/patch-content_utility_utility__main.cc +++ b/www/chromium/files/patch-content_utility_utility__main.cc @@ -1,79 +1,78 @@ ---- content/utility/utility_main.cc.orig 2022-05-19 14:06:27 UTC +--- content/utility/utility_main.cc.orig 2022-06-17 14:20:10 UTC +++ content/utility/utility_main.cc -@@ -32,18 +32,20 @@ +@@ -31,17 +31,19 @@ #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 "components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h" #include "content/utility/speech/speech_recognition_sandbox_hook_linux.h" #if BUILDFLAG(ENABLE_PRINTING) #include "printing/sandbox/print_backend_sandbox_hook_linux.h" #endif +#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" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "gpu/config/gpu_info_collector.h" #include "media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h" -@@ -52,6 +54,10 @@ +@@ -50,6 +52,10 @@ #include "third_party/angle/src/gpu_info_util/SystemInfo.h" // nogncheck #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/openbsd/sandbox_openbsd.h" +#endif + #if BUILDFLAG(IS_CHROMEOS_ASH) #include "ash/services/ime/ime_sandbox_hook.h" #include "chromeos/assistant/buildflags.h" -@@ -139,7 +145,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -129,7 +135,7 @@ int UtilityMain(MainFunctionParams parameters) { } } -#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. -@@ -165,7 +171,7 @@ int UtilityMain(MainFunctionParams parameters) { - case sandbox::mojom::Sandbox::kScreenAI: +@@ -157,7 +163,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); -@@ -188,10 +194,11 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -180,10 +186,11 @@ 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; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) if (sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoDecoding) { // The kHardwareVideoDecoding sandbox needs to know the GPU type in order // to select the right policy. -@@ -204,6 +211,11 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -196,6 +203,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 #elif BUILDFLAG(IS_WIN) g_utility_target_services = parameters.sandbox_info->target_services; #endif diff --git a/www/chromium/files/patch-content_zygote_zygote__main__linux.cc b/www/chromium/files/patch-content_zygote_zygote__main__linux.cc index 91c7bc1e35f7..691d24aab691 100644 --- a/www/chromium/files/patch-content_zygote_zygote__main__linux.cc +++ b/www/chromium/files/patch-content_zygote_zygote__main__linux.cc @@ -1,64 +1,64 @@ ---- content/zygote/zygote_main_linux.cc.orig 2022-02-07 13:39:41 UTC +--- content/zygote/zygote_main_linux.cc.orig 2022-06-17 14:20:10 UTC +++ content/zygote/zygote_main_linux.cc @@ -11,7 +11,9 @@ #include #include #include +#if !defined(OS_BSD) #include +#endif #include #include #include -@@ -40,7 +42,9 @@ +@@ -41,7 +43,9 @@ #include "sandbox/linux/services/thread_helpers.h" #include "sandbox/linux/suid/client/setuid_sandbox_client.h" #include "sandbox/policy/linux/sandbox_debug_handling_linux.h" +#if !defined(OS_BSD) #include "sandbox/policy/linux/sandbox_linux.h" +#endif #include "sandbox/policy/sandbox.h" #include "sandbox/policy/switches.h" #include "third_party/icu/source/i18n/unicode/timezone.h" -@@ -49,6 +53,7 @@ namespace content { +@@ -50,6 +54,7 @@ namespace content { namespace { +#if !defined(OS_BSD) void CloseFds(const std::vector& fds) { for (const auto& it : fds) { PCHECK(0 == IGNORE_EINTR(close(it))); -@@ -66,9 +71,11 @@ base::OnceClosure ClosureFromTwoClosures(base::OnceClo +@@ -67,9 +72,11 @@ base::OnceClosure ClosureFromTwoClosures(base::OnceClo }, std::move(one), std::move(two)); } +#endif } // namespace +#if !defined(OS_BSD) // This function triggers the static and lazy construction of objects that need // to be created before imposing the sandbox. static void ZygotePreSandboxInit() { -@@ -173,9 +180,11 @@ static void EnterLayerOneSandbox(sandbox::policy::Sand +@@ -174,9 +181,11 @@ static void EnterLayerOneSandbox(sandbox::policy::Sand CHECK(!using_layer1_sandbox); } } +#endif bool ZygoteMain( std::vector> fork_delegates) { +#if !defined(OS_BSD) sandbox::SetAmZygoteOrRenderer(true, GetSandboxFD()); auto* linux_sandbox = sandbox::policy::SandboxLinux::GetInstance(); -@@ -240,6 +249,9 @@ bool ZygoteMain( +@@ -241,6 +250,9 @@ bool ZygoteMain( // This function call can return multiple times, once per fork(). return zygote.ProcessRequests(); +#else + return false; +#endif } } // namespace content diff --git a/www/chromium/files/patch-device_bluetooth_cast__bluetooth.gni b/www/chromium/files/patch-device_bluetooth_cast__bluetooth.gni index 5a4b92be382e..febddef647a9 100644 --- a/www/chromium/files/patch-device_bluetooth_cast__bluetooth.gni +++ b/www/chromium/files/patch-device_bluetooth_cast__bluetooth.gni @@ -1,9 +1,9 @@ ---- device/bluetooth/cast_bluetooth.gni.orig 2021-12-16 17:28:29 UTC +--- device/bluetooth/cast_bluetooth.gni.orig 2022-06-17 14:20:10 UTC +++ device/bluetooth/cast_bluetooth.gni @@ -2,5 +2,5 @@ import("//build/config/features.gni") declare_args() { force_cast_bluetooth = false -- use_bluez = use_dbus +- use_bluez = (is_linux || is_chromeos) && !is_castos + use_bluez = use_dbus && !is_bsd } diff --git a/www/chromium/files/patch-extensions_browser_extension__prefs.cc b/www/chromium/files/patch-extensions_browser_extension__prefs.cc index d351fd2b78ac..0a57a4b83be4 100644 --- a/www/chromium/files/patch-extensions_browser_extension__prefs.cc +++ b/www/chromium/files/patch-extensions_browser_extension__prefs.cc @@ -1,11 +1,11 @@ ---- extensions/browser/extension_prefs.cc.orig 2022-05-19 14:06:27 UTC +--- extensions/browser/extension_prefs.cc.orig 2022-06-17 14:20:10 UTC +++ extensions/browser/extension_prefs.cc -@@ -2271,7 +2271,7 @@ void ExtensionPrefs::RegisterProfilePrefs( +@@ -2270,7 +2270,7 @@ void ExtensionPrefs::RegisterProfilePrefs( registry->RegisterDictionaryPref(kInstallSignature); registry->RegisterListPref(kExternalUninstalls); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(pref_names::kChromeAppsEnabled, false); #endif registry->RegisterBooleanPref(pref_names::kU2fSecurityKeyApiEnabled, false); diff --git a/www/chromium/files/patch-chrome_common_extensions_command.cc b/www/chromium/files/patch-extensions_common_command.cc similarity index 57% rename from www/chromium/files/patch-chrome_common_extensions_command.cc rename to www/chromium/files/patch-extensions_common_command.cc index c5fb7b11aecd..6955640d6a46 100644 --- a/www/chromium/files/patch-chrome_common_extensions_command.cc +++ b/www/chromium/files/patch-extensions_common_command.cc @@ -1,11 +1,11 @@ ---- chrome/common/extensions/command.cc.orig 2022-05-19 14:06:27 UTC -+++ chrome/common/extensions/command.cc -@@ -295,7 +295,7 @@ std::string Command::CommandPlatform() { +--- extensions/common/command.cc.orig 2022-06-17 14:20:10 UTC ++++ extensions/common/command.cc +@@ -288,7 +288,7 @@ std::string Command::CommandPlatform() { return values::kKeybindingPlatformMac; - #elif BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) + #elif BUILDFLAG(IS_CHROMEOS) return values::kKeybindingPlatformChromeOs; -#elif BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return values::kKeybindingPlatformLinux; #elif BUILDFLAG(IS_FUCHSIA) // TODO(crbug.com/1312215): Change this once we decide what string should be diff --git a/www/chromium/files/patch-gpu_command__buffer_service_external__vk__image__backing.cc b/www/chromium/files/patch-gpu_command__buffer_service_external__vk__image__backing.cc index 2dd27a0ccf4d..855c9b131c6c 100644 --- a/www/chromium/files/patch-gpu_command__buffer_service_external__vk__image__backing.cc +++ b/www/chromium/files/patch-gpu_command__buffer_service_external__vk__image__backing.cc @@ -1,20 +1,20 @@ ---- gpu/command_buffer/service/external_vk_image_backing.cc.orig 2022-05-19 14:06:27 UTC +--- gpu/command_buffer/service/external_vk_image_backing.cc.orig 2022-06-17 14:20:10 UTC +++ gpu/command_buffer/service/external_vk_image_backing.cc @@ -30,7 +30,7 @@ #include "ui/gl/gl_version_info.h" #include "ui/gl/scoped_binders.h" -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) #include "gpu/command_buffer/service/external_vk_image_dawn_representation.h" #endif -@@ -570,7 +570,7 @@ ExternalVkImageBacking::ProduceDawn(SharedImageManager +@@ -571,7 +571,7 @@ ExternalVkImageBacking::ProduceDawn(SharedImageManager MemoryTypeTracker* tracker, WGPUDevice wgpuDevice, WGPUBackendType backend_type) { -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && BUILDFLAG(USE_DAWN) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && BUILDFLAG(USE_DAWN) auto wgpu_format = viz::ToWGPUFormat(format()); if (wgpu_format == WGPUTextureFormat_Undefined) { diff --git a/www/chromium/files/patch-gpu_command__buffer_service_shared__image__backing__factory__angle__vulkan.cc b/www/chromium/files/patch-gpu_command__buffer_service_shared__image__backing__factory__angle__vulkan.cc index 306ee714d0b7..6da7029eab09 100644 --- a/www/chromium/files/patch-gpu_command__buffer_service_shared__image__backing__factory__angle__vulkan.cc +++ b/www/chromium/files/patch-gpu_command__buffer_service_shared__image__backing__factory__angle__vulkan.cc @@ -1,11 +1,11 @@ ---- gpu/command_buffer/service/shared_image_backing_factory_angle_vulkan.cc.orig 2022-05-19 14:06:27 UTC +--- gpu/command_buffer/service/shared_image_backing_factory_angle_vulkan.cc.orig 2022-06-17 14:20:10 UTC +++ gpu/command_buffer/service/shared_image_backing_factory_angle_vulkan.cc -@@ -577,7 +577,7 @@ bool SharedImageBackingFactoryAngleVulkan::CanUseAngle +@@ -576,7 +576,7 @@ bool SharedImageBackingFactoryAngleVulkan::CanUseAngle // TODO(penghuang): verify the scanout is the right usage for video playback. // crbug.com/1280798 constexpr auto kSupportedUsages = -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SHARED_IMAGE_USAGE_SCANOUT | #endif SHARED_IMAGE_USAGE_GLES2 | SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT | diff --git a/www/chromium/files/patch-gpu_command__buffer_service_shared__image__backing__factory__ozone.cc b/www/chromium/files/patch-gpu_command__buffer_service_shared__image__backing__factory__ozone.cc new file mode 100644 index 000000000000..5c0d9b0cdef5 --- /dev/null +++ b/www/chromium/files/patch-gpu_command__buffer_service_shared__image__backing__factory__ozone.cc @@ -0,0 +1,11 @@ +--- gpu/command_buffer/service/shared_image_backing_factory_ozone.cc.orig 2022-06-17 14:20:10 UTC ++++ gpu/command_buffer/service/shared_image_backing_factory_ozone.cc +@@ -218,7 +218,7 @@ bool SharedImageBackingFactoryOzone::IsSupported( + !CanImportGpuMemoryBufferToVulkan(gmb_type)) { + return false; + } +-#elif BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_ASH) && \ ++#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_ASH) && \ + !BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_CHROMECAST) + bool used_by_skia = (usage & SHARED_IMAGE_USAGE_RASTER) || + (usage & SHARED_IMAGE_USAGE_DISPLAY); diff --git a/www/chromium/files/patch-gpu_command__buffer_service_shared__image__factory.cc b/www/chromium/files/patch-gpu_command__buffer_service_shared__image__factory.cc index 2513ce5c68d0..f1172d9981fd 100644 --- a/www/chromium/files/patch-gpu_command__buffer_service_shared__image__factory.cc +++ b/www/chromium/files/patch-gpu_command__buffer_service_shared__image__factory.cc @@ -1,29 +1,29 @@ ---- gpu/command_buffer/service/shared_image_factory.cc.orig 2022-05-19 14:06:27 UTC +--- gpu/command_buffer/service/shared_image_factory.cc.orig 2022-06-17 14:20:10 UTC +++ gpu/command_buffer/service/shared_image_factory.cc -@@ -46,7 +46,7 @@ - #include "ui/ozone/public/ozone_platform.h" +@@ -50,7 +50,7 @@ + #endif #endif -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN)) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) && \ BUILDFLAG(ENABLE_VULKAN) #include "gpu/command_buffer/service/external_vk_image_factory.h" - #elif BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_VULKAN) -@@ -81,7 +81,7 @@ + #include "gpu/command_buffer/service/shared_image_backing_factory_ozone.h" +@@ -86,7 +86,7 @@ namespace gpu { --#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_ASH) && \ -+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_ASH) && \ - !BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_CHROMECAST) && \ +-#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_ASH) && \ ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_ASH) && \ + !BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_CASTOS) && \ BUILDFLAG(ENABLE_VULKAN) -@@ -325,7 +325,7 @@ SharedImageFactory::SharedImageFactory( +@@ -387,7 +387,7 @@ SharedImageFactory::SharedImageFactory( factories_.push_back(std::move(external_vk_image_factory)); } #elif defined(USE_OZONE) -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_ASH) && \ +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMEOS_ASH) && \ - !BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_CHROMECAST) + !BUILDFLAG(IS_CHROMEOS_LACROS) && !BUILDFLAG(IS_CASTOS) // Desktop Linux, not ChromeOS. - if (gr_context_type_ == GrContextType::kVulkan && + if (ShouldUseOzoneFactory()) { 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 045d71aff7db..d950b892da48 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,11 +1,11 @@ ---- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2022-05-19 14:06:27 UTC +--- gpu/command_buffer/service/webgpu_decoder_impl.cc.orig 2022-06-17 14:20:10 UTC +++ gpu/command_buffer/service/webgpu_decoder_impl.cc -@@ -1547,7 +1547,7 @@ error::Error WebGPUDecoderImpl::HandleRequestAdapter( +@@ -1421,7 +1421,7 @@ error::Error WebGPUDecoderImpl::HandleRequestAdapter( if (gr_context_type_ != GrContextType::kVulkan && use_webgpu_adapter_ != WebGPUAdapterName::kCompat) { -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) SendAdapterProperties(request_adapter_serial, -1, nullptr, "WebGPU on Linux requires command-line flag " "--enable-features=Vulkan,UseSkiaRenderer"); diff --git a/www/chromium/files/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc b/www/chromium/files/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc index fa8050758e8d..c96914bd19c3 100644 --- a/www/chromium/files/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc +++ b/www/chromium/files/patch-gpu_command__buffer_tests_gl__gpu__memory__buffer__unittest.cc @@ -1,29 +1,20 @@ ---- gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc.orig 2022-03-25 21:59:56 UTC +--- gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc.orig 2022-06-17 14:20:10 UTC +++ gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc @@ -29,7 +29,7 @@ #include "ui/gl/gl_image.h" #include "ui/gl/test/gl_image_test_support.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h" #include "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h" #endif @@ -72,7 +72,7 @@ class GpuMemoryBufferTest : public testing::TestWithPa GLManager gl_; }; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) class GpuMemoryBufferTestEGL : public testing::Test, public gpu::GpuCommandBufferTestEGL { public: -@@ -364,7 +364,7 @@ TEST_P(GpuMemoryBufferTest, Lifecycle) { - glDeleteTextures(1, &texture_id); - } - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // Test glCreateImageCHROMIUM with gfx::NATIVE_PIXMAP. Basically the test - // reproduces the situation where some dmabuf fds are available outside the - // gpu process and the user wants to import them using glCreateImageCHROMIUM. diff --git a/www/chromium/files/patch-gpu_config_gpu__control__list.cc b/www/chromium/files/patch-gpu_config_gpu__control__list.cc index 644cf5b2b178..3e785a5cfe09 100644 --- a/www/chromium/files/patch-gpu_config_gpu__control__list.cc +++ b/www/chromium/files/patch-gpu_config_gpu__control__list.cc @@ -1,20 +1,20 @@ ---- gpu/config/gpu_control_list.cc.orig 2022-05-19 14:06:27 UTC +--- gpu/config/gpu_control_list.cc.orig 2022-06-17 14:20:10 UTC +++ gpu/config/gpu_control_list.cc -@@ -261,7 +261,7 @@ bool GpuControlList::More::GLVersionInfoMismatch( +@@ -302,7 +302,7 @@ bool GpuControlList::More::GLVersionInfoMismatch( GpuControlList::GLType GpuControlList::More::GetDefaultGLType() { #if BUILDFLAG(IS_CHROMEOS) return kGLTypeGL; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kGLTypeGL; #elif BUILDFLAG(IS_MAC) return kGLTypeGL; -@@ -784,7 +784,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { +@@ -844,7 +844,7 @@ GpuControlList::OsType GpuControlList::GetOsType() { return kOsAndroid; #elif BUILDFLAG(IS_FUCHSIA) return kOsFuchsia; -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_OPENBSD) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) return kOsLinux; #elif BUILDFLAG(IS_MAC) return kOsMacosx; diff --git a/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc b/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc index a4abf1a0301e..7e3d02be826b 100644 --- a/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc +++ b/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc @@ -1,65 +1,65 @@ ---- gpu/ipc/service/gpu_init.cc.orig 2022-05-19 14:06:27 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2022-06-17 14:20:10 UTC +++ gpu/ipc/service/gpu_init.cc -@@ -313,7 +313,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -318,7 +318,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 -@@ -363,7 +363,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -368,7 +368,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. -@@ -412,7 +412,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -417,7 +417,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL if (gl_initialized && gl_use_swiftshader_ && !gl::IsSoftwareGLImplementation(gl::GetGLImplementationParts())) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly " << "on Linux"; return false; -@@ -445,7 +445,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -450,7 +450,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // The ContentSandboxHelper is currently the only one implementation of // GpuSandboxHelper and it has no dependency. Except on Linux where // VaapiWrapper checks the GL implementation to determine which display -@@ -504,7 +504,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -510,7 +510,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; -@@ -627,7 +627,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -637,7 +637,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. -@@ -857,7 +857,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -867,7 +867,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c InitializePlatformOverlaySettings(&gpu_info_, gpu_feature_info_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Driver may create a compatibility profile context when collect graphics // information on Linux platform. Try to collect graphics information // based on core profile context after disabling platform extensions. diff --git a/www/chromium/files/patch-headless_lib_browser_headless__browser__main__parts.h b/www/chromium/files/patch-headless_lib_browser_headless__browser__main__parts.h index e1e8158bd26a..aa8733048357 100644 --- a/www/chromium/files/patch-headless_lib_browser_headless__browser__main__parts.h +++ b/www/chromium/files/patch-headless_lib_browser_headless__browser__main__parts.h @@ -1,11 +1,11 @@ ---- headless/lib/browser/headless_browser_main_parts.h.orig 2022-02-28 16:54:41 UTC +--- headless/lib/browser/headless_browser_main_parts.h.orig 2022-06-17 14:20:10 UTC +++ headless/lib/browser/headless_browser_main_parts.h -@@ -50,7 +50,7 @@ class HEADLESS_EXPORT HeadlessBrowserMainParts +@@ -48,7 +48,7 @@ class HEADLESS_EXPORT HeadlessBrowserMainParts #if BUILDFLAG(IS_MAC) void PreCreateMainMessageLoop() override; #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) void PostCreateMainMessageLoop() override; #endif void QuitMainMessageLoop(); diff --git a/www/chromium/files/patch-headless_lib_browser_headless__request__context__manager.cc b/www/chromium/files/patch-headless_lib_browser_headless__request__context__manager.cc index 094da6fa2849..244ad62eab49 100644 --- a/www/chromium/files/patch-headless_lib_browser_headless__request__context__manager.cc +++ b/www/chromium/files/patch-headless_lib_browser_headless__request__context__manager.cc @@ -1,11 +1,11 @@ ---- headless/lib/browser/headless_request_context_manager.cc.orig 2022-05-19 14:06:27 UTC +--- headless/lib/browser/headless_request_context_manager.cc.orig 2022-06-17 14:20:10 UTC +++ headless/lib/browser/headless_request_context_manager.cc -@@ -64,7 +64,7 @@ void SetCryptKeyOnce(const base::FilePath& user_data_p +@@ -65,7 +65,7 @@ void SetCryptKeyOnce(const base::FilePath& user_data_p return; done_once = true; -#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)) && defined(HEADLESS_USE_PREFS) +#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(HEADLESS_USE_PREFS) // The OSCrypt keys are process bound, so if network service is out of // process, send it the required key if it is available. if (content::IsOutOfProcessNetworkService() diff --git a/www/chromium/files/patch-ipc_ipc__channel.h b/www/chromium/files/patch-ipc_ipc__channel.h index 7fe7304f8b70..568237754a60 100644 --- a/www/chromium/files/patch-ipc_ipc__channel.h +++ b/www/chromium/files/patch-ipc_ipc__channel.h @@ -1,11 +1,11 @@ ---- ipc/ipc_channel.h.orig 2022-02-28 16:54:41 UTC +--- ipc/ipc_channel.h.orig 2022-06-17 14:20:10 UTC +++ ipc/ipc_channel.h -@@ -235,7 +235,7 @@ class COMPONENT_EXPORT(IPC) Channel : public Sender { +@@ -234,7 +234,7 @@ class COMPONENT_EXPORT(IPC) Channel : public Sender { static std::string GenerateUniqueRandomChannelID(); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Sandboxed processes live in a PID namespace, so when sending the IPC hello // message from client to server we need to send the PID from the global // PID namespace. diff --git a/www/chromium/files/patch-media_audio_BUILD.gn b/www/chromium/files/patch-media_audio_BUILD.gn index c7780eee9e89..ec409b677f70 100644 --- a/www/chromium/files/patch-media_audio_BUILD.gn +++ b/www/chromium/files/patch-media_audio_BUILD.gn @@ -1,24 +1,24 @@ ---- media/audio/BUILD.gn.orig 2022-04-21 18:48:31 UTC +--- media/audio/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ media/audio/BUILD.gn -@@ -243,9 +243,20 @@ source_set("audio") { +@@ -245,9 +245,20 @@ source_set("audio") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !use_sndio) { sources += [ "linux/audio_manager_linux.cc" ] } + + if (use_sndio) { + libs += [ "sndio" ] + sources += [ + "sndio/audio_manager_sndio.cc", + "sndio/sndio_input.cc", + "sndio/sndio_input.h", + "sndio/sndio_output.cc", + "sndio/sndio_output.h" + ] + } if (use_alsa) { libs += [ "asound" ] diff --git a/www/chromium/files/patch-media_audio_audio__features.cc b/www/chromium/files/patch-media_audio_audio__features.cc index cc57efce1236..a63feeec497c 100644 --- a/www/chromium/files/patch-media_audio_audio__features.cc +++ b/www/chromium/files/patch-media_audio_audio__features.cc @@ -1,11 +1,11 @@ ---- media/audio/audio_features.cc.orig 2022-02-28 16:54:41 UTC +--- media/audio/audio_features.cc.orig 2022-06-17 14:20:10 UTC +++ media/audio/audio_features.cc -@@ -19,7 +19,7 @@ const base::Feature kPlatformAudioEncoder{"PlatformAud +@@ -14,7 +14,7 @@ namespace features { const base::Feature kAudioServiceOutOfProcessKillAtHang{ "AudioServiceOutOfProcessKillAtHang", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT diff --git a/www/chromium/files/patch-media_base_audio__latency.cc b/www/chromium/files/patch-media_base_audio__latency.cc index a51069bbe202..c3919836726c 100644 --- a/www/chromium/files/patch-media_base_audio__latency.cc +++ b/www/chromium/files/patch-media_base_audio__latency.cc @@ -1,11 +1,11 @@ ---- media/base/audio_latency.cc.orig 2022-02-28 16:54:41 UTC +--- media/base/audio_latency.cc.orig 2022-06-17 14:20:10 UTC +++ media/base/audio_latency.cc -@@ -135,7 +135,7 @@ int AudioLatency::GetRtcBufferSize(int sample_rate, in +@@ -137,7 +137,7 @@ int AudioLatency::GetRtcBufferSize(int sample_rate, in } #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // On Linux, MacOS and Fuchsia, the low level IO implementations on the // browser side supports all buffer size the clients want. We use the native // peer connection buffer size (10ms) to achieve best possible performance. diff --git a/www/chromium/files/patch-media_base_media__switches.cc b/www/chromium/files/patch-media_base_media__switches.cc index a6eec177873a..5d4027c634a4 100644 --- a/www/chromium/files/patch-media_base_media__switches.cc +++ b/www/chromium/files/patch-media_base_media__switches.cc @@ -1,47 +1,47 @@ ---- media/base/media_switches.cc.orig 2022-05-19 14:06:27 UTC +--- media/base/media_switches.cc.orig 2022-06-17 14:20:10 UTC +++ media/base/media_switches.cc @@ -10,7 +10,7 @@ #include "components/system_media_controls/linux/buildflags/buildflags.h" #include "media/media_buildflags.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/cpu.h" #endif -@@ -416,7 +416,7 @@ const base::Feature kGav1VideoDecoder{"Gav1VideoDecode +@@ -439,7 +439,7 @@ const base::Feature kGav1VideoDecoder{"Gav1VideoDecode const base::Feature kGlobalMediaControls { "GlobalMediaControls", #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT -@@ -448,7 +448,7 @@ constexpr base::FeatureParamIsProfileSupported(type.profile); - #else - return true; + #elif BUILDFLAG(IS_MAC) + if (__builtin_available(macOS 11.0, *)) 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 8ae8e6c1d5bd..0b8fd8d4a5db 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 2022-02-28 16:54:41 UTC +--- media/capture/video/video_capture_device_client.cc.orig 2022-06-17 14:20:10 UTC +++ media/capture/video/video_capture_device_client.cc -@@ -320,7 +320,7 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData( +@@ -317,7 +317,7 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData( // see http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html. // Windows RGB24 defines blue at lowest byte, // see https://msdn.microsoft.com/en-us/library/windows/desktop/dd407253 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) fourcc_format = libyuv::FOURCC_RAW; #elif BUILDFLAG(IS_WIN) fourcc_format = libyuv::FOURCC_24BG; diff --git a/www/chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc b/www/chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc index fc9753486ae9..271b45919fa8 100644 --- a/www/chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc +++ b/www/chromium/files/patch-media_gpu_gpu__video__encode__accelerator__factory.cc @@ -1,11 +1,11 @@ ---- media/gpu/gpu_video_encode_accelerator_factory.cc.orig 2022-04-21 18:48:31 UTC +--- media/gpu/gpu_video_encode_accelerator_factory.cc.orig 2022-06-17 14:20:10 UTC +++ media/gpu/gpu_video_encode_accelerator_factory.cc -@@ -96,7 +96,7 @@ std::vector GetVEAFactoryFunctions +@@ -103,7 +103,7 @@ std::vector GetVEAFactoryFunctions return vea_factory_functions; #if BUILDFLAG(USE_VAAPI) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (base::FeatureList::IsEnabled(kVaapiVideoEncodeLinux)) vea_factory_functions.push_back(base::BindRepeating(&CreateVaapiVEA)); #else 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 e8b8aa1b6a2b..a0a7f1ca4935 100644 --- a/www/chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc +++ b/www/chromium/files/patch-media_gpu_vaapi_vaapi__wrapper.cc @@ -1,11 +1,11 @@ ---- media/gpu/vaapi/vaapi_wrapper.cc.orig 2022-04-21 18:48:31 UTC +--- media/gpu/vaapi/vaapi_wrapper.cc.orig 2022-06-17 14:20:10 UTC +++ media/gpu/vaapi/vaapi_wrapper.cc -@@ -582,7 +582,7 @@ VADisplayState::VADisplayState() +@@ -590,7 +590,7 @@ VADisplayState::VADisplayState() bool VADisplayState::Initialize() { base::AutoLock auto_lock(va_lock_); -#if defined(USE_OZONE) && BUILDFLAG(IS_LINUX) +#if defined(USE_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 915143278a5b..af85b063a3a2 100644 --- a/www/chromium/files/patch-media_media__options.gni +++ b/www/chromium/files/patch-media_media__options.gni @@ -1,27 +1,27 @@ ---- media/media_options.gni.orig 2022-02-28 16:54:41 UTC +--- media/media_options.gni.orig 2022-06-17 14:20:10 UTC +++ media/media_options.gni @@ -125,9 +125,12 @@ 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 non-Android, non-Mac POSIX systems. - # Alsa should be used on desktop Chromecast and audio-only Chromecast builds. + # Alsa should be used on non-Android, non-Mac POSIX systems (excluding CastOS + # video builds). - if (is_posix && !is_android && !is_mac && + if (is_posix && !is_android && !is_mac && !is_bsd && - (!is_chromecast || is_cast_desktop_build || is_cast_audio_only)) { + (!is_castos || is_cast_audio_only)) { use_alsa = true @@ -142,6 +145,10 @@ declare_args() { if (!use_cras && !is_chromecast && !is_asan && !is_tsan) { use_pulseaudio = true } + } + if (is_openbsd) { + use_sndio = true + use_pulseaudio = false } } diff --git a/www/chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h b/www/chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h index c8745ab93146..81678c827a61 100644 --- a/www/chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h +++ b/www/chromium/files/patch-media_mojo_mojom_stable_stable__video__decoder__types__mojom__traits.h @@ -1,11 +1,11 @@ ---- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h.orig 2022-05-19 14:06:27 UTC +--- media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h.orig 2022-06-17 14:20:10 UTC +++ media/mojo/mojom/stable/stable_video_decoder_types_mojom_traits.h -@@ -620,7 +620,7 @@ struct StructTraits AudioProcessor::ProcessData( +@@ -473,7 +473,7 @@ absl::optional AudioProcessor::ProcessData( #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) DCHECK_LE(volume, 1.0); #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_OPENBSD) + BUILDFLAG(IS_BSD) // We have a special situation on Linux where the microphone volume can be // "higher than maximum". The input volume slider in the sound preference // allows the user to set a scaling that is higher than 100%. It means that diff --git a/www/chromium/files/patch-media_webrtc_helpers__unittests.cc b/www/chromium/files/patch-media_webrtc_helpers__unittests.cc index 5cf8052588ee..3fba74be9256 100644 --- a/www/chromium/files/patch-media_webrtc_helpers__unittests.cc +++ b/www/chromium/files/patch-media_webrtc_helpers__unittests.cc @@ -1,20 +1,20 @@ ---- media/webrtc/helpers_unittests.cc.orig 2022-05-19 14:06:27 UTC +--- media/webrtc/helpers_unittests.cc.orig 2022-06-17 14:20:10 UTC +++ media/webrtc/helpers_unittests.cc @@ -36,7 +36,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau EXPECT_FALSE(config.pre_amplifier.enabled); EXPECT_TRUE(config.echo_canceller.enabled); EXPECT_TRUE(config.gain_controller1.enabled); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) EXPECT_TRUE(config.gain_controller2.enabled); #else EXPECT_FALSE(config.gain_controller2.enabled); -@@ -93,7 +93,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau +@@ -98,7 +98,7 @@ TEST(CreateWebRtcAudioProcessingModuleTest, CheckDefau // Check that either AGC1 digital or AGC2 digital is used based on the // platforms where the Hybrid AGC is enabled by default. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) EXPECT_FALSE(agc1_analog_config.enable_digital_adaptive); EXPECT_TRUE(config.gain_controller2.enabled); EXPECT_TRUE(config.gain_controller2.adaptive_digital.enabled); diff --git a/www/chromium/files/patch-media_webrtc_webrtc__features.cc b/www/chromium/files/patch-media_webrtc_webrtc__features.cc index c203655688cc..a453cc1d0390 100644 --- a/www/chromium/files/patch-media_webrtc_webrtc__features.cc +++ b/www/chromium/files/patch-media_webrtc_webrtc__features.cc @@ -1,11 +1,20 @@ ---- media/webrtc/webrtc_features.cc.orig 2022-02-28 16:54:41 UTC +--- media/webrtc/webrtc_features.cc.orig 2022-06-17 14:20:10 UTC +++ media/webrtc/webrtc_features.cc @@ -9,7 +9,7 @@ namespace features { namespace { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) constexpr base::FeatureState kWebRtcHybridAgcState = base::FEATURE_ENABLED_BY_DEFAULT; #else +@@ -19,7 +19,7 @@ constexpr base::FeatureState kWebRtcHybridAgcState = + } // namespace + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS) ++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + constexpr base::FeatureState kWebRtcAnalogAgcClippingControlState = + base::FEATURE_ENABLED_BY_DEFAULT; + #else 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 b4511f374ac0..0be942f4872c 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 2022-05-19 14:06:27 UTC +--- mojo/public/tools/bindings/mojom.gni.orig 2022-06-17 14:20:10 UTC +++ mojo/public/tools/bindings/mojom.gni -@@ -689,6 +689,16 @@ template("mojom") { +@@ -694,6 +694,16 @@ template("mojom") { enabled_features += [ "is_win" ] } + 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) { script = mojom_parser_script inputs = mojom_parser_sources + [ build_metadata_filename ] diff --git a/www/chromium/files/patch-net_BUILD.gn b/www/chromium/files/patch-net_BUILD.gn index 4b5d771694d5..3ea3984b877e 100644 --- a/www/chromium/files/patch-net_BUILD.gn +++ b/www/chromium/files/patch-net_BUILD.gn @@ -1,91 +1,83 @@ ---- net/BUILD.gn.orig 2022-05-19 14:06:27 UTC +--- net/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ net/BUILD.gn @@ -104,7 +104,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" ] } -@@ -1081,6 +1081,7 @@ component("net") { - "//net/dns:mdns_client", - "//net/dns/public", - "//net/third_party/quiche", -+ "//sandbox/policy", - ] - - allow_circular_includes_from = [ -@@ -1207,6 +1208,15 @@ component("net") { +@@ -1201,6 +1201,15 @@ component("net") { ] } + if (is_bsd) { + sources -= [ + "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", -@@ -1337,7 +1347,7 @@ component("net") { +@@ -1333,7 +1342,7 @@ component("net") { } } - if (is_android || is_chromeos_ash) { + if (is_android || is_chromeos_ash || is_bsd) { sources += [ "base/network_change_notifier_posix.cc", "base/network_change_notifier_posix.h", -@@ -1370,7 +1380,7 @@ component("net") { +@@ -1366,7 +1375,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", -@@ -4358,7 +4368,7 @@ test("net_unittests") { +@@ -4373,7 +4382,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", -@@ -4432,6 +4442,10 @@ test("net_unittests") { +@@ -4445,6 +4454,10 @@ test("net_unittests") { "//url:buildflags", ] + if (is_bsd) { + deps += [ "//sandbox/policy" ] + } + - allow_circular_includes_from = [ "//net/third_party/quiche:quiche_tests" ] - if (enable_websockets) { -@@ -4502,7 +4516,7 @@ test("net_unittests") { + deps += [ "//net/server:tests" ] + } +@@ -4517,7 +4530,7 @@ test("net_unittests") { ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "quic/platform/impl/quic_flags_test.cc", "tools/quic/quic_http_proxy_backend_stream_test.cc", -@@ -4649,7 +4663,7 @@ test("net_unittests") { +@@ -4665,7 +4678,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_socket_unix__domain__client__socket__posix.cc b/www/chromium/files/patch-net_base_sockaddr__util__posix.cc similarity index 67% rename from www/chromium/files/patch-net_socket_unix__domain__client__socket__posix.cc rename to www/chromium/files/patch-net_base_sockaddr__util__posix.cc index f24c61654424..24c932b83326 100644 --- a/www/chromium/files/patch-net_socket_unix__domain__client__socket__posix.cc +++ b/www/chromium/files/patch-net_base_sockaddr__util__posix.cc @@ -1,11 +1,12 @@ ---- net/socket/unix_domain_client_socket_posix.cc.orig 2022-02-28 16:54:41 UTC -+++ net/socket/unix_domain_client_socket_posix.cc -@@ -60,7 +60,7 @@ bool UnixDomainClientSocket::FillAddress(const std::st +--- net/base/sockaddr_util_posix.cc.orig 2022-06-17 14:20:10 UTC ++++ net/base/sockaddr_util_posix.cc +@@ -40,7 +40,8 @@ bool FillUnixAddress(const std::string& socket_path, return true; } -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ++ // XXX ? // Convert the path given into abstract socket name. It must start with // the '\0' character, so we are adding it. |addr_len| must specify the // length of the structure exactly, as potentially the socket name may diff --git a/www/chromium/files/patch-net_base_sockaddr__util__posix__unittest.cc b/www/chromium/files/patch-net_base_sockaddr__util__posix__unittest.cc new file mode 100644 index 000000000000..50ed6dc7f90d --- /dev/null +++ b/www/chromium/files/patch-net_base_sockaddr__util__posix__unittest.cc @@ -0,0 +1,12 @@ +--- net/base/sockaddr_util_posix_unittest.cc.orig 2022-06-17 14:20:10 UTC ++++ net/base/sockaddr_util_posix_unittest.cc +@@ -83,7 +83,8 @@ TEST(FillUnixAddressTest, AbstractLinuxAddress) { + size_t path_max = MaxPathLength(&storage); + std::string path(path_max, '0'); + +-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) ++ // XXX? + EXPECT_TRUE(FillUnixAddress(path, /*use_abstract_namespace=*/true, &storage)); + + EXPECT_EQ(path.size() + 1U + offsetof(struct sockaddr_un, sun_path), diff --git a/www/chromium/files/patch-net_cert_cert__verify__proc.cc b/www/chromium/files/patch-net_cert_cert__verify__proc.cc index d9b2ded4bcaf..2b0b95101b4e 100644 --- a/www/chromium/files/patch-net_cert_cert__verify__proc.cc +++ b/www/chromium/files/patch-net_cert_cert__verify__proc.cc @@ -1,11 +1,11 @@ ---- net/cert/cert_verify_proc.cc.orig 2022-03-25 21:59:56 UTC +--- net/cert/cert_verify_proc.cc.orig 2022-06-17 14:20:10 UTC +++ net/cert/cert_verify_proc.cc -@@ -552,7 +552,7 @@ base::Value CertVerifyParams(X509Certificate* cert, +@@ -527,7 +527,7 @@ base::Value CertVerifyParams(X509Certificate* cert, } // namespace -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // static scoped_refptr CertVerifyProc::CreateSystemVerifyProc( scoped_refptr cert_net_fetcher) { diff --git a/www/chromium/files/patch-net_cert_cert__verify__proc.h b/www/chromium/files/patch-net_cert_cert__verify__proc.h index c73588b0ff78..8e0e2535a303 100644 --- a/www/chromium/files/patch-net_cert_cert__verify__proc.h +++ b/www/chromium/files/patch-net_cert_cert__verify__proc.h @@ -1,11 +1,11 @@ ---- net/cert/cert_verify_proc.h.orig 2022-03-25 21:59:56 UTC +--- net/cert/cert_verify_proc.h.orig 2022-06-17 14:20:10 UTC +++ net/cert/cert_verify_proc.h -@@ -79,7 +79,7 @@ class NET_EXPORT CertVerifyProc +@@ -80,7 +80,7 @@ class NET_EXPORT CertVerifyProc kMaxValue = kOther }; -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) // Creates and returns a CertVerifyProc that uses the system verifier. // |cert_net_fetcher| may not be used, depending on the implementation. static scoped_refptr CreateSystemVerifyProc( diff --git a/www/chromium/files/patch-net_cert_cert__verify__proc__unittest.cc b/www/chromium/files/patch-net_cert_cert__verify__proc__unittest.cc index 2adc8a62414e..80ffa8812960 100644 --- a/www/chromium/files/patch-net_cert_cert__verify__proc__unittest.cc +++ b/www/chromium/files/patch-net_cert_cert__verify__proc__unittest.cc @@ -1,11 +1,11 @@ ---- net/cert/cert_verify_proc_unittest.cc.orig 2022-05-19 14:06:27 UTC +--- net/cert/cert_verify_proc_unittest.cc.orig 2022-06-17 14:20:10 UTC +++ net/cert/cert_verify_proc_unittest.cc -@@ -232,7 +232,7 @@ const std::vector kAllCertVerifier +@@ -240,7 +240,7 @@ const std::vector kAllCertVerifier CERT_VERIFY_PROC_MAC, CERT_VERIFY_PROC_BUILTIN #elif BUILDFLAG(IS_WIN) CERT_VERIFY_PROC_WIN, CERT_VERIFY_PROC_BUILTIN_CHROME_ROOTS -#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) CERT_VERIFY_PROC_BUILTIN #else #error Unsupported platform diff --git a/www/chromium/files/patch-net_disk__cache_simple_simple__file__tracker.cc b/www/chromium/files/patch-net_disk__cache_simple_simple__file__tracker.cc index 8290fcc26da0..ea6580b0cab2 100644 --- a/www/chromium/files/patch-net_disk__cache_simple_simple__file__tracker.cc +++ b/www/chromium/files/patch-net_disk__cache_simple_simple__file__tracker.cc @@ -1,20 +1,20 @@ ---- net/disk_cache/simple/simple_file_tracker.cc.orig 2022-02-07 13:39:41 UTC +--- net/disk_cache/simple/simple_file_tracker.cc.orig 2022-06-17 14:20:10 UTC +++ net/disk_cache/simple/simple_file_tracker.cc -@@ -28,7 +28,17 @@ void RecordFileDescripterLimiterOp(FileDescriptorLimit +@@ -29,7 +29,17 @@ void RecordFileDescripterLimiterOp(FileDescriptorLimit } // namespace SimpleFileTracker::SimpleFileTracker(int file_limit) +#if defined(OS_OPENBSD) +{ + // cap the file descriptor limit at 85% of the size of the + // file descriptor table and also substract the amount of + // currently used file descriptors as this should give us + // enough reserve to avoid hitting the limit + file_limit_ = (getdtablesize() * 0.85) - getdtablecount(); +} +#else : file_limit_(file_limit) {} +#endif SimpleFileTracker::~SimpleFileTracker() { DCHECK(lru_.empty()); diff --git a/www/chromium/files/patch-net_dns_host__resolver__manager.cc b/www/chromium/files/patch-net_dns_host__resolver__manager.cc index da4e19114df1..09afd4db5f2a 100644 --- a/www/chromium/files/patch-net_dns_host__resolver__manager.cc +++ b/www/chromium/files/patch-net_dns_host__resolver__manager.cc @@ -1,11 +1,11 @@ ---- net/dns/host_resolver_manager.cc.orig 2022-05-19 14:06:27 UTC +--- net/dns/host_resolver_manager.cc.orig 2022-06-17 14:20:10 UTC +++ net/dns/host_resolver_manager.cc -@@ -3157,7 +3157,7 @@ HostResolverManager::HostResolverManager( +@@ -3156,7 +3156,7 @@ HostResolverManager::HostResolverManager( } if (system_dns_config_notifier_) system_dns_config_notifier_->AddObserver(this); -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \ +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) && \ !BUILDFLAG(IS_ANDROID) EnsureDnsReloaderInit(); #endif diff --git a/www/chromium/files/patch-net_socket_tcp__socket__posix.cc b/www/chromium/files/patch-net_socket_tcp__socket__posix.cc index f49f1cb1caa9..8408ed6a4f63 100644 --- a/www/chromium/files/patch-net_socket_tcp__socket__posix.cc +++ b/www/chromium/files/patch-net_socket_tcp__socket__posix.cc @@ -1,20 +1,20 @@ ---- net/socket/tcp_socket_posix.cc.orig 2022-04-21 18:48:31 UTC +--- net/socket/tcp_socket_posix.cc.orig 2022-06-17 14:20:10 UTC +++ net/socket/tcp_socket_posix.cc -@@ -97,6 +97,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { - PLOG(ERROR) << "Failed to set TCP_KEEPALIVE on fd: " << fd; - return false; - } +@@ -100,6 +100,17 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { + PLOG(ERROR) << "Failed to set TCP_KEEPALIVE on fd: " << fd; + return false; + } +#elif BUILDFLAG(IS_FREEBSD) + // Set seconds until first TCP keep alive. + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &delay, sizeof(delay))) { + PLOG(ERROR) << "Failed to set TCP_KEEPIDLE on fd: " << fd; + return false; + } -+ // Set seconds between TCP keep alives. ++ // Set seconds between TCP keep alives. + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &delay, sizeof(delay))) { + PLOG(ERROR) << "Failed to set TCP_KEEPINTVL on fd: " << fd; + return false; + } #endif - return true; - } + } + diff --git a/www/chromium/files/patch-net_socket_udp__socket__posix.cc b/www/chromium/files/patch-net_socket_udp__socket__posix.cc index 89514745435c..e54f0028bb37 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,29 @@ ---- net/socket/udp_socket_posix.cc.orig 2022-05-19 14:06:27 UTC +--- net/socket/udp_socket_posix.cc.orig 2022-06-17 14:20:10 UTC +++ net/socket/udp_socket_posix.cc -@@ -621,7 +621,7 @@ int UDPSocketPosix::SetDoNotFragment() { +@@ -576,7 +576,7 @@ int UDPSocketPosix::SetDoNotFragment() { } void UDPSocketPosix::SetMsgConfirm(bool confirm) { -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) if (confirm) { sendto_flags_ |= MSG_CONFIRM; } else { -@@ -642,7 +642,7 @@ int UDPSocketPosix::SetBroadcast(bool broadcast) { +@@ -597,7 +597,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. -@@ -955,7 +955,7 @@ int UDPSocketPosix::DoBind(const IPEndPoint& address) +@@ -910,7 +910,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_third__party_quiche_BUILD.gn b/www/chromium/files/patch-net_third__party_quiche_BUILD.gn index 349ce70c8cc0..c9157ce422ee 100644 --- a/www/chromium/files/patch-net_third__party_quiche_BUILD.gn +++ b/www/chromium/files/patch-net_third__party_quiche_BUILD.gn @@ -1,33 +1,11 @@ ---- net/third_party/quiche/BUILD.gn.orig 2022-05-19 14:06:27 UTC +--- net/third_party/quiche/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ net/third_party/quiche/BUILD.gn -@@ -711,7 +711,7 @@ proto_library("net_quic_test_tools_proto") { - extra_configs = [ "//build/config/compiler:wexit_time_destructors" ] - } +@@ -28,7 +28,7 @@ import("//build/config/chromeos/ui_mode.gni") + import("//testing/libfuzzer/fuzzer_test.gni") + import("//third_party/protobuf/proto_library.gni") --if (is_linux || is_chromeos) { -+if ((is_linux || is_chromeos) && !is_bsd) { - source_set("epoll_server") { - sources = [ - "overrides/quiche_platform_impl/epoll_bug_impl.h", -@@ -1102,7 +1102,7 @@ source_set("quic_test_tools_core") { - "//third_party/quic_trace:quic_trace_proto", - ] +-build_epoll_based_tools = is_linux || is_chromeos ++build_epoll_based_tools = (is_linux && !is_bsd) || is_chromeos -- if (is_linux || is_chromeos) { -+ if ((is_linux || is_chromeos) && !is_bsd) { - sources += [ - "src/quiche/epoll_server/fake_simple_epoll_server.cc", - "src/quiche/epoll_server/fake_simple_epoll_server.h", -@@ -1562,10 +1562,10 @@ source_set("quiche_tests") { - ] - public_deps = [] - -- if (is_linux || is_chromeos_lacros) { -+ if ((is_linux || is_chromeos_lacros) && !is_bsd) { - public_deps += [ ":epoll_quic_tools" ] - } -- if (is_linux || is_chromeos) { -+ if ((is_linux || is_chromeos) && !is_bsd) { - sources += [ - "overrides/quiche_platform_impl/quiche_command_line_flags_test.cc", - "src/quiche/epoll_server/simple_epoll_server_test.cc", + config("quiche_internal_config") { + cflags = [] diff --git a/www/chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc b/www/chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc index 73fc5d48b427..b2e1ec0c4090 100644 --- a/www/chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc +++ b/www/chromium/files/patch-net_tools_cert__verify__tool_cert__verify__comparision__tool.cc @@ -1,29 +1,29 @@ ---- net/tools/cert_verify_tool/cert_verify_comparision_tool.cc.orig 2022-02-28 16:54:41 UTC +--- net/tools/cert_verify_tool/cert_verify_comparision_tool.cc.orig 2022-06-17 14:20:10 UTC +++ net/tools/cert_verify_tool/cert_verify_comparision_tool.cc @@ -35,7 +35,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 -@@ -51,7 +51,7 @@ void SetUpOnNetworkThread( +@@ -55,7 +55,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. // -@@ -123,7 +123,7 @@ class CertVerifyImpl { +@@ -127,7 +127,7 @@ class CertVerifyImpl { std::unique_ptr CreateCertVerifyImplFromName( base::StringPiece impl_name, scoped_refptr cert_net_fetcher) { -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) if (impl_name == "platform") { return std::make_unique( "CertVerifyProc (system)", net::CertVerifyProc::CreateSystemVerifyProc( 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 e4297a2b6fff..1c43c835029d 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,38 @@ ---- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2022-02-28 16:54:41 UTC +--- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2022-06-17 14:20:10 UTC +++ net/tools/cert_verify_tool/cert_verify_tool.cc @@ -30,7 +30,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 -@@ -56,7 +56,7 @@ void SetUpOnNetworkThread( +@@ -60,7 +60,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. // -@@ -206,7 +206,7 @@ std::unique_ptr CreateCertVerifyImplFr +@@ -217,7 +217,7 @@ std::unique_ptr CreateCertVerifyImplFr base::StringPiece impl_name, scoped_refptr cert_net_fetcher, RootStoreType root_store_type) { -#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) if (impl_name == "platform") { if (root_store_type != RootStoreType::kSystem) { std::cerr << "WARNING: platform verifier not supported with " -@@ -463,7 +463,7 @@ int main(int argc, char** argv) { +@@ -474,7 +474,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) || BUILDFLAG(IS_CHROMEOS)) +#if !(BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || BUILDFLAG(IS_BSD) impls_str = "platform,"; #endif impls_str += "builtin,pathbuilder"; diff --git a/www/chromium/files/patch-net_url__request_url__request__context__builder.cc b/www/chromium/files/patch-net_url__request_url__request__context__builder.cc index 73f0e82479f4..2b9e75aaa34f 100644 --- a/www/chromium/files/patch-net_url__request_url__request__context__builder.cc +++ b/www/chromium/files/patch-net_url__request_url__request__context__builder.cc @@ -1,11 +1,11 @@ ---- net/url_request/url_request_context_builder.cc.orig 2022-05-19 14:06:27 UTC +--- net/url_request/url_request_context_builder.cc.orig 2022-06-17 14:20:10 UTC +++ net/url_request/url_request_context_builder.cc -@@ -498,7 +498,7 @@ std::unique_ptr URLRequestContextBu +@@ -501,7 +501,7 @@ std::unique_ptr URLRequestContextBu } if (!proxy_resolution_service_) { -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_BSD) // TODO(willchan): Switch to using this code when // ConfiguredProxyResolutionService::CreateSystemProxyConfigService()'s // signature doesn't suck. diff --git a/www/chromium/files/patch-printing_mojom_printing__context__mojom__traits.cc b/www/chromium/files/patch-printing_mojom_printing__context__mojom__traits.cc index 1408b965110d..3d0ff023647c 100644 --- a/www/chromium/files/patch-printing_mojom_printing__context__mojom__traits.cc +++ b/www/chromium/files/patch-printing_mojom_printing__context__mojom__traits.cc @@ -1,20 +1,20 @@ ---- printing/mojom/printing_context_mojom_traits.cc.orig 2022-02-28 16:54:41 UTC +--- printing/mojom/printing_context_mojom_traits.cc.orig 2022-06-17 14:20:10 UTC +++ printing/mojom/printing_context_mojom_traits.cc -@@ -16,7 +16,7 @@ +@@ -15,7 +15,7 @@ #include "ui/gfx/geometry/mojom/geometry_mojom_traits.h" #include "ui/gfx/geometry/size.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "mojo/public/mojom/base/values.mojom.h" #endif -@@ -162,7 +162,7 @@ bool StructTraits< +@@ -147,7 +147,7 @@ bool StructTraits< } out->set_pages_per_sheet(data.pages_per_sheet()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) DCHECK(out->advanced_settings().empty()); if (!data.ReadAdvancedSettings(&out->advanced_settings())) return false; diff --git a/www/chromium/files/patch-printing_mojom_printing__context__mojom__traits.h b/www/chromium/files/patch-printing_mojom_printing__context__mojom__traits.h index 8d439f07445f..5e565acae23a 100644 --- a/www/chromium/files/patch-printing_mojom_printing__context__mojom__traits.h +++ b/www/chromium/files/patch-printing_mojom_printing__context__mojom__traits.h @@ -1,11 +1,11 @@ ---- printing/mojom/printing_context_mojom_traits.h.orig 2022-02-28 16:54:41 UTC +--- printing/mojom/printing_context_mojom_traits.h.orig 2022-06-17 14:20:10 UTC +++ printing/mojom/printing_context_mojom_traits.h -@@ -168,7 +168,7 @@ struct StructTraitsg_threads = std::min(config->g_threads, 2U); + // 5/3/2022 update: Perf testing has shown that doubling the number of threads diff --git a/www/chromium/files/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc b/www/chromium/files/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc index 0d2aba957d12..ccb0eb5f2f5d 100644 --- a/www/chromium/files/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc +++ b/www/chromium/files/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc @@ -1,47 +1,47 @@ ---- remoting/host/it2me/it2me_native_messaging_host_main.cc.orig 2022-02-28 16:54:41 UTC +--- remoting/host/it2me/it2me_native_messaging_host_main.cc.orig 2022-06-17 14:20:10 UTC +++ remoting/host/it2me/it2me_native_messaging_host_main.cc @@ -30,7 +30,7 @@ #include "remoting/host/resources.h" #include "remoting/host/usage_stats_consent.h" --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#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) #include #include "base/linux_util.h" -@@ -76,7 +76,7 @@ bool CurrentProcessHasUiAccess() { +@@ -77,7 +77,7 @@ bool CurrentProcessHasUiAccess() { // Creates a It2MeNativeMessagingHost instance, attaches it to stdin/stdout and // runs the task executor until It2MeNativeMessagingHost signals shutdown. int It2MeNativeMessagingHostMain(int argc, char** argv) { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#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) // Initialize Xlib for multi-threaded use, allowing non-Chromium code to // use X11 safely (such as the WebRTC capturer, GTK ...) x11::InitXlib(); -@@ -121,7 +121,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv +@@ -123,7 +123,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv remoting::LoadResources(""); --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#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) // Required for any calls into GTK functions, such as the Disconnect and // Continue windows. Calling with nullptr arguments because we don't have // any command line arguments for gtk to consume. -@@ -254,7 +254,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv +@@ -257,7 +257,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv PolicyWatcher::CreateWithTaskRunner(context->file_task_runner(), context->management_service()); --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#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 = -@@ -276,7 +276,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv +@@ -280,7 +280,7 @@ int It2MeNativeMessagingHostMain(int argc, char** argv // Run the loop until channel is alive. run_loop.Run(); --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#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) input_task_runner->PostTask(FROM_HERE, base::BindOnce([]() { delete ui::X11EventSource::GetInstance(); })); 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 d23ad854ac24..7ebdc841da3f 100644 --- a/www/chromium/files/patch-remoting_host_remoting__me2me__host.cc +++ b/www/chromium/files/patch-remoting_host_remoting__me2me__host.cc @@ -1,119 +1,135 @@ ---- remoting/host/remoting_me2me_host.cc.orig 2022-04-21 18:48:31 UTC +--- remoting/host/remoting_me2me_host.cc.orig 2022-06-17 14:20:10 UTC +++ remoting/host/remoting_me2me_host.cc @@ -124,7 +124,7 @@ #include "remoting/host/mac/permission_utils.h" #endif // BUILDFLAG(IS_APPLE) --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#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) #include + #include "ui/events/platform/x11/x11_event_source.h" +@@ -132,13 +132,13 @@ + #endif // (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && + // defined(REMOTING_USE_X11) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/linux_util.h" -@@ -134,7 +134,7 @@ - #include "ui/gfx/x/xlib_support.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 -@@ -172,7 +172,7 @@ const char kApplicationName[] = "chromoting"; +@@ -176,7 +176,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"; -@@ -377,7 +377,7 @@ class HostProcess : public ConfigWatcher::Delegate, +@@ -381,7 +381,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 -@@ -443,7 +443,7 @@ class HostProcess : public ConfigWatcher::Delegate, + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -447,7 +447,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_; -@@ -754,7 +754,7 @@ void HostProcess::StartOnNetworkThread() { +@@ -758,7 +758,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) } -@@ -813,7 +813,7 @@ void HostProcess::CreateAuthenticatorFactory() { +@@ -817,7 +817,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, -@@ -923,7 +923,7 @@ void HostProcess::StartOnUiThread() { +@@ -927,7 +927,7 @@ void HostProcess::StartOnUiThread() { base::BindRepeating(&HostProcess::OnPolicyUpdate, base::Unretained(this)), base::BindRepeating(&HostProcess::OnPolicyError, base::Unretained(this))); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // If an audio pipe is specific on the command-line then initialize // AudioCapturerLinux to capture from it. base::FilePath audio_pipe_name = base::CommandLine::ForCurrentProcess()-> -@@ -994,7 +994,7 @@ void HostProcess::ShutdownOnUiThread() { +@@ -998,7 +998,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. -@@ -1704,7 +1704,7 @@ void HostProcess::StartHost() { +@@ -1006,7 +1006,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(); })); +@@ -1711,7 +1711,7 @@ void HostProcess::StartHost() { // The feature is enabled for all Googlers using a supported platform. desktop_environment_options_.set_enable_remote_open_url(is_googler_); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) desktop_environment_options_.set_enable_remote_webauthn(is_googler_); #endif -@@ -1737,7 +1737,7 @@ void HostProcess::StartHost() { +@@ -1744,7 +1744,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_ = -@@ -1908,7 +1908,7 @@ int HostProcessMain() { +@@ -1915,7 +1915,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 ...) - x11::InitXlib(); -@@ -1952,7 +1952,7 @@ int HostProcessMain() { +@@ -1961,7 +1961,7 @@ int HostProcessMain() { std::unique_ptr network_change_notifier( net::NetworkChangeNotifier::CreateIfNeeded()); --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +-#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_webauthn_remote__webauthn__caller__security__utils.cc b/www/chromium/files/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc new file mode 100644 index 000000000000..95c3357b6bc0 --- /dev/null +++ b/www/chromium/files/patch-remoting_host_webauthn_remote__webauthn__caller__security__utils.cc @@ -0,0 +1,29 @@ +--- remoting/host/webauthn/remote_webauthn_caller_security_utils.cc.orig 2022-06-17 14:20:10 UTC ++++ remoting/host/webauthn/remote_webauthn_caller_security_utils.cc +@@ -9,7 +9,7 @@ + #include "base/strings/utf_string_conversions.h" + #include "build/build_config.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #include "base/containers/fixed_flat_set.h" + #include "base/files/file_path.h" + #include "base/process/process_handle.h" +@@ -37,7 +37,7 @@ namespace { + + // No static variables needed for debug builds. + +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + + constexpr auto kAllowedCallerPrograms = + base::MakeFixedFlatSet({ +@@ -76,7 +76,7 @@ bool IsLaunchedByTrustedProcess() { + #if !defined(NDEBUG) + // Just return true on debug builds for the convenience of development. + return true; +-#elif BUILDFLAG(IS_LINUX) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + base::ProcessId parent_pid = + base::GetParentProcessId(base::GetCurrentProcessHandle()); + base::FilePath parent_image_path = GetProcessImagePath(parent_pid); diff --git a/www/chromium/files/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc b/www/chromium/files/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc index bf7e2c626cb0..58f274d57c36 100644 --- a/www/chromium/files/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc +++ b/www/chromium/files/patch-remoting_host_webauthn_remote__webauthn__extension__notifier.cc @@ -1,19 +1,28 @@ ---- remoting/host/webauthn/remote_webauthn_extension_notifier.cc.orig 2022-05-19 14:06:27 UTC +--- remoting/host/webauthn/remote_webauthn_extension_notifier.cc.orig 2022-06-17 14:20:10 UTC +++ remoting/host/webauthn/remote_webauthn_extension_notifier.cc -@@ -49,14 +49,14 @@ namespace { +@@ -23,7 +23,7 @@ + #include "base/threading/sequenced_task_runner_handle.h" + #include "build/build_config.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "base/environment.h" + #include "base/nix/xdg_util.h" + #include "base/strings/string_util.h" +@@ -68,14 +68,14 @@ static constexpr char kExtensionWakeupFileContent[] = // Caller should check if the directory exists before writing files to it. A // directory only exists if the corresponding Chrome version is installed. std::vector GetRemoteStateChangeDirPaths() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) constexpr base::FilePath::CharType kStateChangeDirName[] = FILE_PATH_LITERAL("WebAuthenticationProxyRemoteSessionStateChange"); #endif std::vector dirs; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // See: chrome/common/chrome_paths_linux.cc + auto env = base::Environment::Create(); base::FilePath base_path; - if (!base::PathService::Get(base::DIR_HOME, &base_path)) { - LOG(ERROR) << "Failed to get local app data dir"; diff --git a/www/chromium/files/patch-sandbox_policy_BUILD.gn b/www/chromium/files/patch-sandbox_policy_BUILD.gn index bc11b185025d..88f6b4be2c31 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 2022-04-21 18:48:31 UTC +--- sandbox/policy/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ sandbox/policy/BUILD.gn -@@ -34,7 +34,7 @@ component("policy") { +@@ -36,7 +36,7 @@ component("policy") { "//sandbox/policy/mojom", ] public_deps = [ "//sandbox:common" ] - 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", -@@ -89,6 +89,27 @@ component("policy") { +@@ -95,6 +95,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_sandbox__type.cc b/www/chromium/files/patch-sandbox_policy_sandbox__type.cc index 1e11d06c7cac..6f7c2411faec 100644 --- a/www/chromium/files/patch-sandbox_policy_sandbox__type.cc +++ b/www/chromium/files/patch-sandbox_policy_sandbox__type.cc @@ -1,105 +1,70 @@ ---- sandbox/policy/sandbox_type.cc.orig 2022-05-19 14:06:27 UTC +--- sandbox/policy/sandbox_type.cc.orig 2022-06-17 14:20:10 UTC +++ sandbox/policy/sandbox_type.cc @@ -39,7 +39,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 @@ -62,7 +62,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) -@@ -72,8 +72,10 @@ 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) -+#if !BUILDFLAG(IS_BSD) - case Sandbox::kZygoteIntermediateSandbox: -+#endif - case Sandbox::kScreenAI: - #endif - case Sandbox::kSpeechRecognition: -@@ -125,7 +127,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -127,7 +127,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) -@@ -136,7 +138,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi +@@ -138,7 +138,7 @@ 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_CHROMEOS_ASH) -@@ -149,7 +151,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi - #if BUILDFLAG(IS_MAC) - case Sandbox::kMirroring: - #endif // BUILDFLAG(IS_MAC) --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - case Sandbox::kScreenAI: - #endif - case Sandbox::kSpeechRecognition: -@@ -255,7 +257,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -257,7 +257,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 -@@ -265,7 +267,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb - return switches::kServiceSandboxWithJit; - case Sandbox::kSpeechRecognition: - return switches::kSpeechRecognitionSandbox; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - case Sandbox::kScreenAI: - return switches::kScreenAISandbox; - #endif -@@ -285,7 +287,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb +@@ -287,7 +287,7 @@ 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) -@@ -369,15 +371,15 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString( - return Sandbox::kAudio; - if (sandbox_string == switches::kSpeechRecognitionSandbox) - return Sandbox::kSpeechRecognition; --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +@@ -375,11 +375,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 1eb26bb12aa3..5b12c91f9438 100644 --- a/www/chromium/files/patch-sandbox_policy_switches.cc +++ b/www/chromium/files/patch-sandbox_policy_switches.cc @@ -1,22 +1,22 @@ ---- sandbox/policy/switches.cc.orig 2022-05-19 14:06:27 UTC +--- sandbox/policy/switches.cc.orig 2022-06-17 14:20:10 UTC +++ sandbox/policy/switches.cc -@@ -52,7 +52,7 @@ const char kWindowsSystemProxyResolverSandbox[] = "pro +@@ -54,7 +54,7 @@ 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) -@@ -99,7 +99,9 @@ const char kGpuSandboxFailuresFatal[] = "gpu-sandbox-f +@@ -101,7 +101,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 aeebbcbb5644..d3234c31c975 100644 --- a/www/chromium/files/patch-sandbox_policy_switches.h +++ b/www/chromium/files/patch-sandbox_policy_switches.h @@ -1,21 +1,21 @@ ---- sandbox/policy/switches.h.orig 2022-05-19 14:06:27 UTC +--- sandbox/policy/switches.h.orig 2022-06-17 14:20:10 UTC +++ sandbox/policy/switches.h -@@ -53,7 +53,7 @@ SANDBOX_POLICY_EXPORT extern const char kWindowsSystem +@@ -56,7 +56,7 @@ 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) -@@ -75,7 +75,8 @@ SANDBOX_POLICY_EXPORT extern const char kDisableSetuid +@@ -78,7 +78,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 index 7507614ed649..75a1cdaffb46 100644 --- a/www/chromium/files/patch-services_cert__verifier_cert__verifier__creation.cc +++ b/www/chromium/files/patch-services_cert__verifier_cert__verifier__creation.cc @@ -1,30 +1,28 @@ ---- services/cert_verifier/cert_verifier_creation.cc.orig 2022-02-28 16:54:41 UTC +--- services/cert_verifier/cert_verifier_creation.cc.orig 2022-06-17 14:20:10 UTC +++ services/cert_verifier/cert_verifier_creation.cc -@@ -86,7 +86,7 @@ scoped_refptr CreateCertVerifyPro - scoped_refptr CreateOldDefaultWithoutCaching( - scoped_refptr cert_net_fetcher) { - scoped_refptr verify_proc; +@@ -12,7 +12,7 @@ + #include "net/cert_net/cert_net_fetcher_url_request.h" + #include "net/net_buildflags.h" + +-#if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) || \ ++#if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) || BUILDFLAG(IS_BSD) || \ + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + #include "net/cert/cert_verify_proc_builtin.h" + #include "net/cert/internal/system_trust_store.h" +@@ -94,7 +94,7 @@ class OldDefaultCertVerifyProcFactory : public net::Ce + scoped_refptr cert_net_fetcher, + const net::ChromeRootStoreData* root_store_data) override { + scoped_refptr verify_proc; -#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - verify_proc = - net::CertVerifyProc::CreateBuiltinVerifyProc(std::move(cert_net_fetcher)); + verify_proc = net::CreateCertVerifyProcBuiltin( + std::move(cert_net_fetcher), net::CreateSslSystemTrustStore()); #else -@@ -104,7 +104,7 @@ scoped_refptr CreateNewDefaultWit - scoped_refptr cert_net_fetcher) { - scoped_refptr verify_proc; - #if BUILDFLAG(CHROME_ROOT_STORE_SUPPORTED) && \ -- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) -+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)) - verify_proc = net::CreateCertVerifyProcBuiltin( - std::move(cert_net_fetcher), net::CreateSslSystemTrustStoreChromeRoot()); - #elif BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) -@@ -122,7 +122,8 @@ bool IsUsingCertNetFetcher() { +@@ -272,6 +272,7 @@ std::unique_ptr Cr + bool IsUsingCertNetFetcher() { #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || \ ++ BUILDFLAG(IS_BSD) || \ BUILDFLAG(TRIAL_COMPARISON_CERT_VERIFIER_SUPPORTED) || \ -- BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) -+ BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) || \ -+ BUILDFLAG(IS_BSD) - return true; - #else - return false; + BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) || \ + BUILDFLAG(CHROME_ROOT_STORE_SUPPORTED) diff --git a/www/chromium/files/patch-services_device_hid_hid__connection__fido.cc b/www/chromium/files/patch-services_device_hid_hid__connection__fido.cc index 5a6ded090276..2a0b172b142a 100644 --- a/www/chromium/files/patch-services_device_hid_hid__connection__fido.cc +++ b/www/chromium/files/patch-services_device_hid_hid__connection__fido.cc @@ -1,201 +1,200 @@ ---- services/device/hid/hid_connection_fido.cc.orig 2022-02-07 13:39:41 UTC +--- services/device/hid/hid_connection_fido.cc.orig 2022-06-17 14:20:10 UTC +++ services/device/hid/hid_connection_fido.cc -@@ -0,0 +1,198 @@ +@@ -0,0 +1,197 @@ +// Copyright (c) 2020 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "services/device/hid/hid_connection_fido.h" + +#include "base/bind.h" +#include "base/files/file_descriptor_watcher_posix.h" +#include "base/location.h" +#include "base/numerics/safe_math.h" +#include "base/posix/eintr_wrapper.h" -+#include "base/task/post_task.h" +#include "base/task/single_thread_task_runner.h" +#include "base/threading/scoped_blocking_call.h" +#include "base/threading/thread_restrictions.h" +#include "base/threading/thread_task_runner_handle.h" +#include "components/device_event_log/device_event_log.h" +#include "services/device/hid/hid_service.h" + +namespace device { + +class HidConnectionFido::BlockingTaskHelper { +public: + BlockingTaskHelper(base::ScopedFD fd, + scoped_refptr device_info, + base::WeakPtr connection) + : fd_(std::move(fd)), + // Report buffers must always have room for the report ID. + report_buffer_size_(device_info->max_input_report_size() + 1), + has_report_id_(device_info->has_report_id()), connection_(connection), + origin_task_runner_(base::ThreadTaskRunnerHandle::Get()) { + DETACH_FROM_SEQUENCE(sequence_checker_); + } + + BlockingTaskHelper(const BlockingTaskHelper&) = delete; + BlockingTaskHelper& operator=(const BlockingTaskHelper&) = delete; + + ~BlockingTaskHelper() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } + + // Starts the FileDescriptorWatcher that reads input events from the device. + // Must be called on a thread that has a base::MessageLoopForIO. + void Start() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::internal::AssertBlockingAllowed(); + + file_watcher_ = base::FileDescriptorWatcher::WatchReadable( + fd_.get(), base::BindRepeating(&BlockingTaskHelper::OnFileCanReadWithoutBlocking, + base::Unretained(this))); + } + + void Write(scoped_refptr buffer, + WriteCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + + auto data = buffer->front(); + size_t size = buffer->size(); + // if report id is 0, it shouldn't be included + if (data[0] == 0) { + data++; + size--; + } + + ssize_t result = HANDLE_EINTR(write(fd_.get(), data, size)); + bool success = static_cast(result) == size; + if (!success) { + HID_LOG(EVENT) << "HID write failed: " << result << " != " << size; + } + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), success)); + } + + void GetFeatureReport(uint8_t report_id, + scoped_refptr buffer, + ReadCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + HID_PLOG(EVENT) << "GendFeatureReport not implemented on OpenBSD"; + origin_task_runner_->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), false, nullptr, 0)); + } + + void SendFeatureReport(scoped_refptr buffer, + WriteCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + HID_PLOG(EVENT) << "SendFeatureReport not implemented on OpenBSD"; + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), false)); + } + +private: + void OnFileCanReadWithoutBlocking() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + scoped_refptr buffer( + new base::RefCountedBytes(report_buffer_size_)); + unsigned char *data = buffer->front(); + size_t length = report_buffer_size_; + if (!has_report_id_) { + // OpenBSD will not prefix the buffer with a report ID if report IDs are + // not used by the device. Prefix the buffer with 0. + *data++ = 0; + length--; + } + + ssize_t bytes_read = HANDLE_EINTR(read(fd_.get(), data, length)); + if (bytes_read < 0) { + if (errno != EAGAIN) { + HID_PLOG(EVENT) << "Read failed"; + // This assumes that the error is unrecoverable and disables reading + // from the device until it has been re-opened. + // TODO(reillyg): Investigate starting and stopping the file descriptor + // watcher in response to pending read requests so that per-request + // errors can be returned to the client. + file_watcher_.reset(); + } + return; + } + if (!has_report_id_) { + // Behave as if the byte prefixed above as the the report ID was read. + bytes_read++; + } + + origin_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&HidConnectionFido::ProcessInputReport, + connection_, buffer, bytes_read)); + } + + SEQUENCE_CHECKER(sequence_checker_); + base::ScopedFD fd_; + const size_t report_buffer_size_; + const bool has_report_id_; + base::WeakPtr connection_; + const scoped_refptr origin_task_runner_; + std::unique_ptr file_watcher_; +}; + +HidConnectionFido::HidConnectionFido( + scoped_refptr device_info, base::ScopedFD fd, + scoped_refptr blocking_task_runner, + bool allow_protected_reports, bool allow_fido_reports) + : HidConnection(device_info, allow_protected_reports, allow_fido_reports), + blocking_task_runner_(std::move(blocking_task_runner)), + weak_factory_(this), + helper_(std::make_unique( + std::move(fd), device_info, weak_factory_.GetWeakPtr())) { + blocking_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&BlockingTaskHelper::Start, + base::Unretained(helper_.get()))); +} + +HidConnectionFido::~HidConnectionFido() = default; + +void HidConnectionFido::PlatformClose() { + // By closing the device on the blocking task runner 1) the requirement that + // base::ScopedFD is destroyed on a thread where I/O is allowed is satisfied + // and 2) any tasks posted to this task runner that refer to this file will + // complete before it is closed. + blocking_task_runner_->DeleteSoon(FROM_HERE, helper_.release()); +} + +void HidConnectionFido::PlatformWrite( + scoped_refptr buffer, WriteCallback callback) { + blocking_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&BlockingTaskHelper::Write, + base::Unretained(helper_.get()), buffer, + std::move(callback))); +} + +void HidConnectionFido::PlatformGetFeatureReport(uint8_t report_id, + ReadCallback callback) { + // The first byte of the destination buffer is the report ID being requested + // and is overwritten by the feature report. + DCHECK_GT(device_info()->max_feature_report_size(), 0u); + scoped_refptr buffer( + new base::RefCountedBytes(device_info()->max_feature_report_size() + 1)); + if (report_id != 0) + buffer->data()[0] = report_id; + + blocking_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&BlockingTaskHelper::GetFeatureReport, + base::Unretained(helper_.get()), report_id, + buffer, std::move(callback))); +} + +void HidConnectionFido::PlatformSendFeatureReport( + scoped_refptr buffer, WriteCallback callback) { + base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, + base::BlockingType::MAY_BLOCK); + blocking_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&BlockingTaskHelper::SendFeatureReport, + base::Unretained(helper_.get()), buffer, + std::move(callback))); +} + +} // namespace device diff --git a/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.cc b/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.cc index bdb73b369068..ae990e29ff3d 100644 --- a/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.cc +++ b/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.cc @@ -1,246 +1,245 @@ ---- services/device/hid/hid_connection_freebsd.cc.orig 2022-02-07 13:39:41 UTC +--- services/device/hid/hid_connection_freebsd.cc.orig 2022-06-17 14:20:10 UTC +++ services/device/hid/hid_connection_freebsd.cc -@@ -0,0 +1,243 @@ +@@ -0,0 +1,242 @@ +// Copyright (c) 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "services/device/hid/hid_connection_freebsd.h" + +#include +#include + +#include "base/bind.h" +#include "base/files/file_descriptor_watcher_posix.h" +#include "base/location.h" +#include "base/numerics/safe_math.h" +#include "base/posix/eintr_wrapper.h" +#include "base/strings/stringprintf.h" -+#include "base/task/post_task.h" +#include "base/task/single_thread_task_runner.h" +#include "base/threading/scoped_blocking_call.h" +#include "base/threading/thread_restrictions.h" +#include "base/threading/thread_task_runner_handle.h" +#include "components/device_event_log/device_event_log.h" +#include "services/device/hid/hid_service.h" + +namespace device { + +class HidConnectionFreeBSD::BlockingTaskRunnerHelper { + public: + BlockingTaskRunnerHelper(base::ScopedFD fd, + scoped_refptr device_info, + base::WeakPtr connection) + : fd_(std::move(fd)), + connection_(connection), + origin_task_runner_(base::ThreadTaskRunnerHandle::Get()) { + DETACH_FROM_SEQUENCE(sequence_checker_); + // Report buffers must always have room for the report ID. + report_buffer_size_ = device_info->max_input_report_size() + 1; + has_report_id_ = device_info->has_report_id(); + } + + BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete; + BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete; + + ~BlockingTaskRunnerHelper() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } + + // Starts the FileDescriptorWatcher that reads input events from the device. + // Must be called on a thread that has a base::MessageLoopForIO. + void Start() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::internal::AssertBlockingAllowed(); + + file_watcher_ = base::FileDescriptorWatcher::WatchReadable( + fd_.get(), base::BindRepeating(&BlockingTaskRunnerHelper::OnFileCanReadWithoutBlocking, + base::Unretained(this))); + } + + void Write(scoped_refptr buffer, + WriteCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + + auto data = buffer->front(); + size_t size = buffer->size(); + // if report id is 0, it shouldn't be included + if (data[0] == 0) { + data++; + size--; + } + + ssize_t result = HANDLE_EINTR(write(fd_.get(), data, size)); + if (result < 0) { + HID_PLOG(EVENT) << "Write failed"; + origin_task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), false)); + } else { + if (static_cast(result) != size) + HID_LOG(EVENT) << "Incomplete HID write: " << result << " != " << size; + origin_task_runner_->PostTask(FROM_HERE, base::BindOnce(std::move(callback), true)); + } + } + + void GetFeatureReport(uint8_t report_id, + scoped_refptr buffer, + ReadCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + struct usb_gen_descriptor ugd; + ugd.ugd_report_type = UHID_FEATURE_REPORT; + ugd.ugd_data = buffer->front(); + ugd.ugd_maxlen = buffer->size(); + int result = HANDLE_EINTR( + ioctl(fd_.get(), USB_GET_REPORT, &ugd)); + if (result < 0) { + HID_PLOG(EVENT) << "Failed to get feature report"; + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), false, nullptr, 0)); + } else if (result == 0) { + HID_LOG(EVENT) << "Get feature result too short."; + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), false, nullptr, 0)); + } else { + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), true, buffer, result)); + } + } + + void SendFeatureReport(scoped_refptr buffer, + WriteCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + struct usb_gen_descriptor ugd; + ugd.ugd_report_type = UHID_FEATURE_REPORT; + ugd.ugd_data = buffer->front(); + ugd.ugd_maxlen = buffer->size(); + // FreeBSD does not require report id if it's not used + if (buffer->front()[0] == 0) { + ugd.ugd_data = buffer->front() + 1; + ugd.ugd_maxlen = buffer->size() - 1; + } else { + ugd.ugd_data = buffer->front(); + ugd.ugd_maxlen = buffer->size(); + } + int result = HANDLE_EINTR( + ioctl(fd_.get(), USB_SET_REPORT, &ugd)); + if (result < 0) { + HID_PLOG(EVENT) << "Failed to send feature report"; + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), false)); + } else { + origin_task_runner_->PostTask(FROM_HERE, + base::BindOnce(std::move(callback), true)); + } + } + + private: + void OnFileCanReadWithoutBlocking() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + scoped_refptr buffer(new base::RefCountedBytes(report_buffer_size_)); + unsigned char* data = buffer->front(); + size_t length = report_buffer_size_; + if (!has_report_id_) { + // FreeBSD will not prefix the buffer with a report ID if report IDs are not + // used by the device. Prefix the buffer with 0. + *data++ = 0; + length--; + } + + ssize_t bytes_read = HANDLE_EINTR(read(fd_.get(), data, length)); + if (bytes_read < 0) { + if (errno != EAGAIN) { + HID_PLOG(EVENT) << "Read failed"; + // This assumes that the error is unrecoverable and disables reading + // from the device until it has been re-opened. + // TODO(reillyg): Investigate starting and stopping the file descriptor + // watcher in response to pending read requests so that per-request + // errors can be returned to the client. + file_watcher_.reset(); + } + return; + } + if (!has_report_id_) { + // Behave as if the byte prefixed above as the the report ID was read. + bytes_read++; + } + + origin_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&HidConnectionFreeBSD::ProcessInputReport, + connection_, buffer, bytes_read)); + } + + SEQUENCE_CHECKER(sequence_checker_); + base::ScopedFD fd_; + size_t report_buffer_size_; + bool has_report_id_; + base::WeakPtr connection_; + const scoped_refptr origin_task_runner_; + std::unique_ptr file_watcher_; +}; + +HidConnectionFreeBSD::HidConnectionFreeBSD( + scoped_refptr device_info, + base::ScopedFD fd, + scoped_refptr blocking_task_runner, + bool allow_protected_reports, + bool allow_fido_reports) + : HidConnection(device_info, allow_protected_reports, allow_fido_reports), + helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner)), + blocking_task_runner_(std::move(blocking_task_runner)) { + helper_.reset(new BlockingTaskRunnerHelper(std::move(fd), device_info, + weak_factory_.GetWeakPtr())); + blocking_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&BlockingTaskRunnerHelper::Start, + base::Unretained(helper_.get()))); +} + +HidConnectionFreeBSD::~HidConnectionFreeBSD() {} + +void HidConnectionFreeBSD::PlatformClose() { + // By closing the device on the blocking task runner 1) the requirement that + // base::ScopedFD is destroyed on a thread where I/O is allowed is satisfied + // and 2) any tasks posted to this task runner that refer to this file will + // complete before it is closed. + blocking_task_runner_->DeleteSoon(FROM_HERE, helper_.release()); +} + +void HidConnectionFreeBSD::PlatformWrite(scoped_refptr buffer, + WriteCallback callback) { + + blocking_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&BlockingTaskRunnerHelper::Write, base::Unretained(helper_.get()), + buffer, std::move(callback))); +} + +void HidConnectionFreeBSD::PlatformGetFeatureReport(uint8_t report_id, + ReadCallback callback) { + // The first byte of the destination buffer is the report ID being requested + // and is overwritten by the feature report. + DCHECK_GT(device_info()->max_feature_report_size(), 0u); + scoped_refptr buffer( + new base::RefCountedBytes(device_info()->max_feature_report_size() + 1)); + if (report_id != 0) + buffer->data()[0] = report_id; + + blocking_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&BlockingTaskRunnerHelper::GetFeatureReport, + base::Unretained(helper_.get()), report_id, + buffer, std::move(callback))); +} + +void HidConnectionFreeBSD::PlatformSendFeatureReport( + scoped_refptr buffer, + WriteCallback callback) { + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + blocking_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&BlockingTaskRunnerHelper::SendFeatureReport, + base::Unretained(helper_.get()), buffer, std::move(callback))); +} + +} // namespace device diff --git a/www/chromium/files/patch-services_device_hid_hid__service__fido.cc b/www/chromium/files/patch-services_device_hid_hid__service__fido.cc index 35dc50e5e425..e0deca268d8a 100644 --- a/www/chromium/files/patch-services_device_hid_hid__service__fido.cc +++ b/www/chromium/files/patch-services_device_hid_hid__service__fido.cc @@ -1,331 +1,330 @@ ---- services/device/hid/hid_service_fido.cc.orig 2022-02-07 13:39:41 UTC +--- services/device/hid/hid_service_fido.cc.orig 2022-06-17 14:20:10 UTC +++ services/device/hid/hid_service_fido.cc -@@ -0,0 +1,328 @@ +@@ -0,0 +1,327 @@ +// Copyright 2020 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "services/device/hid/hid_service_fido.h" + +#include +#include +#include +#include +#include +#include + +// TODO: remove once the missing guard in fido.h is fixed upstream. +extern "C" { +#include +} + +#include +#include +#include + +#include "base/bind.h" +#include "base/files/file.h" +#include "base/files/file_descriptor_watcher_posix.h" +#include "base/files/file_enumerator.h" +#include "base/location.h" +#include "base/logging.h" +#include "base/posix/eintr_wrapper.h" +#include "base/task/single_thread_task_runner.h" +#include "base/task/thread_pool.h" +#include "base/stl_util.h" +#include "base/strings/pattern.h" +#include "base/strings/string_split.h" +#include "base/strings/string_util.h" +#include "base/strings/stringprintf.h" +#include "base/strings/sys_string_conversions.h" -+#include "base/task/post_task.h" +#include "base/threading/scoped_blocking_call.h" +#include "base/threading/thread_task_runner_handle.h" +#include "components/device_event_log/device_event_log.h" +#include "services/device/hid/hid_connection_fido.h" + +namespace device { + +namespace { + +struct ConnectParams { + ConnectParams(scoped_refptr device_info, + HidService::ConnectCallback callback) + : device_info(std::move(device_info)), callback(std::move(callback)), + task_runner(base::ThreadTaskRunnerHandle::Get()), + blocking_task_runner(base::ThreadPool::CreateSequencedTaskRunner( + HidService::kBlockingTaskTraits)) {} + ~ConnectParams() {} + + scoped_refptr device_info; + HidService::ConnectCallback callback; + scoped_refptr task_runner; + scoped_refptr blocking_task_runner; + base::ScopedFD fd; + bool allow_protected_reports; + bool allow_fido_reports; +}; + +void CreateConnection(std::unique_ptr params) { + DCHECK(params->fd.is_valid()); + std::move(params->callback).Run(base::MakeRefCounted( + std::move(params->device_info), std::move(params->fd), + std::move(params->blocking_task_runner), params->allow_protected_reports, + params->allow_fido_reports)); +} + +void FinishOpen(std::unique_ptr params) { + scoped_refptr task_runner = params->task_runner; + + task_runner->PostTask(FROM_HERE, + base::BindOnce(&CreateConnection, std::move(params))); +} + +bool terrible_ping_kludge(int fd, const std::string &path) { + u_char data[256]; + int i, n; + struct pollfd pfd; + + for (i = 0; i < 4; i++) { + memset(data, 0, sizeof(data)); + /* broadcast channel ID */ + data[1] = 0xff; + data[2] = 0xff; + data[3] = 0xff; + data[4] = 0xff; + /* Ping command */ + data[5] = 0x81; + /* One byte ping only, Vasili */ + data[6] = 0; + data[7] = 1; + HID_LOG(EVENT) << "send ping " << i << " " << path; + if (write(fd, data, 64) == -1) { + HID_PLOG(ERROR) << "write " << path; + return false; + } + HID_LOG(EVENT) << "wait reply " << path; + memset(&pfd, 0, sizeof(pfd)); + pfd.fd = fd; + pfd.events = POLLIN; + if ((n = poll(&pfd, 1, 100)) == -1) { + HID_PLOG(EVENT) << "poll " << path; + return false; + } else if (n == 0) { + HID_LOG(EVENT) << "timed out " << path; + continue; + } + if (read(fd, data, 64) == -1) { + HID_PLOG(ERROR) << "read " << path; + return false; + } + /* + * Ping isn't always supported on the broadcast channel, + * so we might get an error, but we don't care - we're + * synched now. + */ + HID_LOG(EVENT) << "got reply " << path; + return true; + } + HID_LOG(ERROR) << "no response " << path; + return false; +} + +void OpenOnBlockingThread(std::unique_ptr params) { + base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, + base::BlockingType::MAY_BLOCK); + scoped_refptr task_runner = params->task_runner; + + const auto &device_node = params->device_info->device_node(); + base::FilePath device_path(device_node); + int flags = + base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE; + base::File device_file(device_path, flags); + if (!device_file.IsValid()) { + HID_LOG(EVENT) << "Failed to open '" << device_node << "': " + << base::File::ErrorToString(device_file.error_details()); + task_runner->PostTask(FROM_HERE, base::BindOnce(std::move(params->callback), nullptr)); + return; + } + if (!terrible_ping_kludge(device_file.GetPlatformFile(), device_node)) { + HID_LOG(EVENT) << "Failed to ping " << device_node; + task_runner->PostTask(FROM_HERE, base::BindOnce(std::move(params->callback), nullptr)); + return; + } + params->fd.reset(device_file.TakePlatformFile()); + FinishOpen(std::move(params)); +} + +// HID report descriptor for U2F interface. Copied from: +// https://chromium.googlesource.com/chromiumos/platform2/+/c6c7e4e54fce11932fedaa3ea10236bf75d85a2b%5E%21/u2fd/u2fhid.cc +// Apparently Chromium wants to see these bytes, but OpenBSD fido(4) +// devices prohibit USB_GET_REPORT_DESC ioctl that could be used to +// get the bytes from the USB device. +constexpr uint8_t kU2fReportDesc[] = { + 0x06, 0xD0, 0xF1, /* Usage Page (FIDO Alliance), FIDO_USAGE_PAGE */ + 0x09, 0x01, /* Usage (U2F HID Auth. Device) FIDO_USAGE_U2FHID */ + 0xA1, 0x01, /* Collection (Application), HID_APPLICATION */ + 0x09, 0x20, /* Usage (Input Report Data), FIDO_USAGE_DATA_IN */ + 0x15, 0x00, /* Logical Minimum (0) */ + 0x26, 0xFF, 0x00, /* Logical Maximum (255) */ + 0x75, 0x08, /* Report Size (8) */ + 0x95, 0x40, /* Report Count (64), HID_INPUT_REPORT_BYTES */ + 0x81, 0x02, /* Input (Data, Var, Abs), Usage */ + 0x09, 0x21, /* Usage (Output Report Data), FIDO_USAGE_DATA_OUT */ + 0x15, 0x00, /* Logical Minimum (0) */ + 0x26, 0xFF, 0x00, /* Logical Maximum (255) */ + 0x75, 0x08, /* Report Size (8) */ + 0x95, 0x40, /* Report Count (64), HID_OUTPUT_REPORT_BYTES */ + 0x91, 0x02, /* Output (Data, Var, Abs), Usage */ + 0xC0 /* End Collection */ +}; + +} // namespace + +class HidServiceFido::BlockingTaskHelper { +public: + BlockingTaskHelper(base::WeakPtr service) + : service_(std::move(service)), + task_runner_(base::ThreadTaskRunnerHandle::Get()) { + DETACH_FROM_SEQUENCE(sequence_checker_); + } + + BlockingTaskHelper(const BlockingTaskHelper&) = delete; + BlockingTaskHelper& operator=(const BlockingTaskHelper&) = delete; + + ~BlockingTaskHelper() = default; + + void Start() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + + fido_dev_info_t *devlist = NULL; + fido_dev_t *dev = NULL; + size_t devlist_len = 0, i; + const char *path; + int r; + const int MAX_FIDO_DEVICES = 256; + + if ((devlist = fido_dev_info_new(MAX_FIDO_DEVICES)) == NULL) { + HID_LOG(ERROR) << "fido_dev_info_new failed"; + goto out; + } + if ((r = fido_dev_info_manifest(devlist, MAX_FIDO_DEVICES, &devlist_len)) != + FIDO_OK) { + HID_LOG(ERROR) << "fido_dev_info_manifest: " << fido_strerr(r); + goto out; + } + + HID_LOG(EVENT) << "fido_dev_info_manifest found " << devlist_len + << " device(s)"; + + for (i = 0; i < devlist_len; i++) { + const fido_dev_info_t *di = fido_dev_info_ptr(devlist, i); + if (di == NULL) { + HID_LOG(ERROR) << "fido_dev_info_ptr " << i << " failed"; + continue; + } + if ((path = fido_dev_info_path(di)) == NULL) { + HID_LOG(ERROR) << "fido_dev_info_path " << i << " failed"; + continue; + } + HID_LOG(EVENT) << "trying device " << i << ": " << path; + if ((dev = fido_dev_new()) == NULL) { + HID_LOG(ERROR) << "fido_dev_new failed"; + continue; + } + if ((r = fido_dev_open(dev, path)) != FIDO_OK) { + HID_LOG(ERROR) << "fido_dev_open failed " << path; + fido_dev_free(&dev); + continue; + } + OnDeviceAdded(di); + fido_dev_close(dev); + fido_dev_free(&dev); + } + + out: + if (devlist != NULL) + fido_dev_info_free(&devlist, MAX_FIDO_DEVICES); + + task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&HidServiceFido::FirstEnumerationComplete, service_)); + } + + void OnDeviceAdded(const fido_dev_info_t *di) { + auto null_as_empty = [](const char *r) -> std::string { + return (r != nullptr) ? r : ""; + }; + std::string device_node(null_as_empty(fido_dev_info_path(di))); + std::vector report_descriptor( + kU2fReportDesc, kU2fReportDesc + sizeof(kU2fReportDesc)); + scoped_refptr device_info(new HidDeviceInfo( + device_node, /*physical_device_id=*/"", fido_dev_info_vendor(di), + fido_dev_info_product(di), null_as_empty(fido_dev_info_product_string(di)), + null_as_empty(fido_dev_info_manufacturer_string(di)), + device::mojom::HidBusType::kHIDBusTypeUSB, report_descriptor, + device_node)); + + task_runner_->PostTask(FROM_HERE, base::BindOnce(&HidServiceFido::AddDevice, + service_, device_info)); + } + + void OnDeviceRemoved(std::string device_node) { + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + task_runner_->PostTask(FROM_HERE, base::BindOnce(&HidServiceFido::RemoveDevice, + service_, device_node)); + } + +private: + SEQUENCE_CHECKER(sequence_checker_); + + // This weak pointer is only valid when checked on this task runner. + base::WeakPtr service_; + scoped_refptr task_runner_; +}; + +HidServiceFido::HidServiceFido() + : task_runner_(base::ThreadTaskRunnerHandle::Get()), + blocking_task_runner_( + base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)), + weak_factory_(this), helper_(std::make_unique( + weak_factory_.GetWeakPtr())) { + blocking_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&BlockingTaskHelper::Start, base::Unretained(helper_.get()))); +} + +HidServiceFido::~HidServiceFido() { + blocking_task_runner_->DeleteSoon(FROM_HERE, helper_.release()); +} + +base::WeakPtr HidServiceFido::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + +void HidServiceFido::Connect(const std::string &device_guid, + bool allow_protected_reports, + bool allow_fido_reports, + ConnectCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + const auto &map_entry = devices().find(device_guid); + if (map_entry == devices().end()) { + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), nullptr)); + return; + } + + scoped_refptr device_info = map_entry->second; + + auto params = std::make_unique(device_info, std::move(callback)); + + scoped_refptr blocking_task_runner = + params->blocking_task_runner; + blocking_task_runner->PostTask( + FROM_HERE, base::BindOnce(&OpenOnBlockingThread, std::move(params))); +} + +} // namespace device diff --git a/www/chromium/files/patch-services_device_hid_hid__service__freebsd.cc b/www/chromium/files/patch-services_device_hid_hid__service__freebsd.cc index e04b2eb9c670..4ed1d48f5445 100644 --- a/www/chromium/files/patch-services_device_hid_hid__service__freebsd.cc +++ b/www/chromium/files/patch-services_device_hid_hid__service__freebsd.cc @@ -1,401 +1,400 @@ ---- services/device/hid/hid_service_freebsd.cc.orig 2022-02-07 13:39:41 UTC +--- services/device/hid/hid_service_freebsd.cc.orig 2022-06-17 14:20:10 UTC +++ services/device/hid/hid_service_freebsd.cc -@@ -0,0 +1,398 @@ +@@ -0,0 +1,397 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "services/device/hid/hid_service_freebsd.h" + +#include +#include +#include +#include + +#include +#include +#include + +#include "base/bind.h" +#include "base/files/file_descriptor_watcher_posix.h" +#include "base/files/file_enumerator.h" +#include "base/files/file_util.h" +#include "base/files/file.h" +#include "base/location.h" +#include "base/logging.h" +#include "base/posix/eintr_wrapper.h" +#include "base/stl_util.h" +#include "base/strings/pattern.h" +#include "base/strings/stringprintf.h" +#include "base/strings/sys_string_conversions.h" +#include "base/strings/string_util.h" +#include "base/strings/string_split.h" -+#include "base/task/post_task.h" +#include "base/task/single_thread_task_runner.h" +#include "base/task/thread_pool.h" +#include "base/threading/scoped_blocking_call.h" +#include "base/threading/thread_task_runner_handle.h" +#include "base/threading/thread_restrictions.h" +#include "components/device_event_log/device_event_log.h" +#include "services/device/hid/hid_connection_freebsd.h" + +const int kMaxPermissionChecks = 5; + +namespace device { + +struct HidServiceFreeBSD::ConnectParams { + ConnectParams(scoped_refptr device_info, + bool allow_protected_reports, + bool allow_fido_reports, + ConnectCallback callback) + : device_info(std::move(device_info)), + allow_protected_reports(allow_protected_reports), + allow_fido_reports(allow_fido_reports), + callback(std::move(callback)), + task_runner(base::ThreadTaskRunnerHandle::Get()), + blocking_task_runner( + base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)) {} + ~ConnectParams() {} + + scoped_refptr device_info; + bool allow_protected_reports; + bool allow_fido_reports; + ConnectCallback callback; + scoped_refptr task_runner; + scoped_refptr blocking_task_runner; + base::ScopedFD fd; +}; + +class HidServiceFreeBSD::BlockingTaskRunnerHelper { + public: + BlockingTaskRunnerHelper(base::WeakPtr service) + : service_(std::move(service)), + task_runner_(base::ThreadTaskRunnerHandle::Get()) { + DETACH_FROM_SEQUENCE(sequence_checker_); + + timer_.reset(new base::RepeatingTimer()); + devd_buffer_ = new net::IOBufferWithSize(1024); + } + + BlockingTaskRunnerHelper(const BlockingTaskRunnerHelper&) = delete; + BlockingTaskRunnerHelper& operator=(const BlockingTaskRunnerHelper&) = delete; + + ~BlockingTaskRunnerHelper() { + } + + void Start() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + const base::FilePath kDevRoot("/dev"); + const std::string kUHIDPattern("/dev/uhid*"); + + base::FileEnumerator enumerator(kDevRoot, false, base::FileEnumerator::FILES); + do { + const base::FilePath next_device_path(enumerator.Next()); + const std::string next_device = next_device_path.value(); + if (next_device.empty()) + break; + + if (base::MatchPattern(next_device, kUHIDPattern)) + OnDeviceAdded(next_device.substr(5)); + } while (true); + + SetupDevdMonitor(); + + task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&HidServiceFreeBSD::FirstEnumerationComplete, service_)); + } + + bool HaveReadWritePermissions(std::string device_id) { + std::string device_node = "/dev/" + device_id; + base::internal::AssertBlockingAllowed(); + + base::FilePath device_path(device_node); + base::File device_file; + int flags = + base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE; + device_file.Initialize(device_path, flags); + if (!device_file.IsValid()) + return false; + + return true; + } + + void OnDeviceAdded(std::string device_id) { + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + std::string device_node = "/dev/" + device_id; + uint16_t vendor_id = 0xffff; + uint16_t product_id = 0xffff; + std::string product_name = ""; + std::string serial_number = ""; + + std::vector report_descriptor; + + base::internal::AssertBlockingAllowed(); + + base::FilePath device_path(device_node); + base::File device_file; + int flags = + base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE; + device_file.Initialize(device_path, flags); + if (!device_file.IsValid()) { + HID_LOG(ERROR) << "Failed to open '" << device_node + << "': " + << base::File::ErrorToString(device_file.error_details()); + return; + } + + base::ScopedFD fd; + fd.reset(device_file.TakePlatformFile()); + + struct usb_gen_descriptor ugd; + ugd.ugd_data = NULL; + ugd.ugd_maxlen = 0xffff; + int result = HANDLE_EINTR( + ioctl(fd.get(), USB_GET_REPORT_DESC, &ugd)); + + if (result < 0) { + HID_LOG(ERROR) << "Failed to get report descriptor size"; + return; + } + + report_descriptor.resize(ugd.ugd_actlen); + + ugd.ugd_data = report_descriptor.data(); + ugd.ugd_maxlen = ugd.ugd_actlen; + result = HANDLE_EINTR( + ioctl(fd.get(), USB_GET_REPORT_DESC, &ugd)); + + if (result < 0) { + HID_LOG(ERROR) << "Failed to get report descriptor"; + return; + } + + scoped_refptr device_info(new HidDeviceInfo( + device_id, + /*physical_device_id*/"", + vendor_id, + product_id, + product_name, + serial_number, + device::mojom::HidBusType::kHIDBusTypeUSB, + report_descriptor, + device_node)); + + task_runner_->PostTask(FROM_HERE, base::BindOnce(&HidServiceFreeBSD::AddDevice, + service_, device_info)); + } + + void OnDeviceRemoved(std::string device_id) { + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + task_runner_->PostTask( + FROM_HERE, base::BindOnce(&HidServiceFreeBSD::RemoveDevice, service_, + device_id)); + } + + private: + + void CheckPendingPermissionChange() { + base::internal::AssertBlockingAllowed(); + std::map::iterator it; + for (it = permissions_checks_attempts_.begin(); it != permissions_checks_attempts_.end();) { + std::string device_name = it->first; + bool keep = true; + if (HaveReadWritePermissions(device_name)) { + OnDeviceAdded(device_name); + keep = false; + } + else if (it->second-- <= 0) { + HID_LOG(ERROR) << "Still don't have write permissions to '" << device_name + << "' after " << kMaxPermissionChecks << " attempts"; + keep = false; + } + + if (keep) + ++it; + else + permissions_checks_attempts_.erase(it++); + } + + if (permissions_checks_attempts_.empty()) + timer_->Stop(); + } + + void SetupDevdMonitor() { + base::internal::AssertBlockingAllowed(); + + int devd_fd = socket(AF_UNIX, SOCK_SEQPACKET, 0); + if (devd_fd < 0) + return; + + struct sockaddr_un sa; + + sa.sun_family = AF_UNIX; + strlcpy(sa.sun_path, "/var/run/devd.seqpacket.pipe", sizeof(sa.sun_path)); + if (connect(devd_fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) { + close(devd_fd); + return; + } + + devd_fd_.reset(devd_fd); + file_watcher_ = base::FileDescriptorWatcher::WatchReadable( + devd_fd_.get(), base::BindRepeating(&BlockingTaskRunnerHelper::OnDevdMessageCanBeRead, + base::Unretained(this))); + } + + void OnDevdMessageCanBeRead() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + ssize_t bytes_read = HANDLE_EINTR(recv(devd_fd_.get(), devd_buffer_->data(), + devd_buffer_->size() - 1, MSG_WAITALL)); + if (bytes_read < 0) { + if (errno != EAGAIN) { + HID_LOG(ERROR) << "Read failed"; + file_watcher_.reset(); + } + return; + } + + devd_buffer_->data()[bytes_read] = 0; + char *data = devd_buffer_->data(); + // It may take some time for devd to change permissions + // on /dev/uhidX node. So do not fail immediately if + // open fail. Retry each second for kMaxPermissionChecks + // times before giving up entirely + if (base::StartsWith(data, "+uhid", base::CompareCase::SENSITIVE)) { + std::vector parts = base::SplitString( + data, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); + if (!parts.empty()) { + std::string device_name = parts[0].substr(1); // skip '+' + if (HaveReadWritePermissions(device_name)) + OnDeviceAdded(parts[0].substr(1)); + else { + // Do not re-add to checks + if (permissions_checks_attempts_.find(device_name) == permissions_checks_attempts_.end()) { + permissions_checks_attempts_.insert(std::pair(device_name, kMaxPermissionChecks)); + timer_->Start(FROM_HERE, base::Seconds(1), + this, &BlockingTaskRunnerHelper::CheckPendingPermissionChange); + } + } + } + } + + if (base::StartsWith(data, "-uhid", base::CompareCase::SENSITIVE)) { + std::vector parts = base::SplitString( + data, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); + if (!parts.empty()) { + std::string device_name = parts[0].substr(1); // skip '-' + auto it = permissions_checks_attempts_.find(device_name); + if (it != permissions_checks_attempts_.end()) { + permissions_checks_attempts_.erase(it); + if (permissions_checks_attempts_.empty()) + timer_->Stop(); + } + OnDeviceRemoved(parts[0].substr(1)); + } + } + } + + SEQUENCE_CHECKER(sequence_checker_); + + // This weak pointer is only valid when checked on this task runner. + base::WeakPtr service_; + scoped_refptr task_runner_; + std::unique_ptr file_watcher_; + std::unique_ptr timer_; + base::ScopedFD devd_fd_; + scoped_refptr devd_buffer_; + std::map permissions_checks_attempts_; +}; + +HidServiceFreeBSD::HidServiceFreeBSD() + : blocking_task_runner_( + base::ThreadPool::CreateSequencedTaskRunner(kBlockingTaskTraits)), + helper_(nullptr, base::OnTaskRunnerDeleter(blocking_task_runner_)) { + helper_.reset(new BlockingTaskRunnerHelper(weak_factory_.GetWeakPtr())); + blocking_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&BlockingTaskRunnerHelper::Start, base::Unretained(helper_.get()))); +} + +HidServiceFreeBSD::~HidServiceFreeBSD() { + blocking_task_runner_->DeleteSoon(FROM_HERE, helper_.release()); +} + +base::WeakPtr HidServiceFreeBSD::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + +// static +void HidServiceFreeBSD::OpenOnBlockingThread( + std::unique_ptr params) { + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::MAY_BLOCK); + scoped_refptr task_runner = params->task_runner; + + base::FilePath device_path(params->device_info->device_node()); + base::File device_file; + int flags = + base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE; + device_file.Initialize(device_path, flags); + if (!device_file.IsValid()) { + HID_LOG(EVENT) << "Failed to open '" << params->device_info->device_node() + << "': " + << base::File::ErrorToString(device_file.error_details()); + task_runner->PostTask(FROM_HERE, + base::BindOnce(std::move(params->callback), nullptr)); + return; + } + params->fd.reset(device_file.TakePlatformFile()); + task_runner->PostTask(FROM_HERE, base::BindOnce(&HidServiceFreeBSD::FinishOpen, + std::move(params))); +} + +void HidServiceFreeBSD::Connect(const std::string& device_guid, + bool allow_protected_reports, + bool allow_fido_reports, + ConnectCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + const auto& map_entry = devices().find(device_guid); + if (map_entry == devices().end()) { + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), nullptr)); + return; + } + + scoped_refptr device_info = map_entry->second; + + auto params = std::make_unique(device_info, + allow_protected_reports, + allow_fido_reports, + std::move(callback)); + scoped_refptr blocking_task_runner = + params->blocking_task_runner; + + blocking_task_runner->PostTask( + FROM_HERE, base::BindOnce(&HidServiceFreeBSD::OpenOnBlockingThread, + std::move(params))); +} + +// static +void HidServiceFreeBSD::FinishOpen(std::unique_ptr params) { + DCHECK(params->fd.is_valid()); + + if (!base::SetNonBlocking(params->fd.get())) { + HID_PLOG(ERROR) << "Failed to set the non-blocking flag on the device fd"; + std::move(params->callback).Run(nullptr); + } + + std::move(params->callback).Run(base::MakeRefCounted( + std::move(params->device_info), + std::move(params->fd), + std::move(params->blocking_task_runner), + params->allow_protected_reports, + params->allow_fido_reports + )); +} + +} // namespace device diff --git a/www/chromium/files/patch-services_device_serial_serial__io__handler__posix.cc b/www/chromium/files/patch-services_device_serial_serial__io__handler__posix.cc index 9b477e51ff61..4fdce4ce7f02 100644 --- a/www/chromium/files/patch-services_device_serial_serial__io__handler__posix.cc +++ b/www/chromium/files/patch-services_device_serial_serial__io__handler__posix.cc @@ -1,11 +1,11 @@ ---- services/device/serial/serial_io_handler_posix.cc.orig 2022-02-28 16:54:41 UTC +--- services/device/serial/serial_io_handler_posix.cc.orig 2022-06-17 14:20:10 UTC +++ services/device/serial/serial_io_handler_posix.cc -@@ -68,7 +68,7 @@ bool BitrateToSpeedConstant(int bitrate, speed_t* spee +@@ -67,7 +67,7 @@ bool BitrateToSpeedConstant(int bitrate, speed_t* spee BITRATE_TO_SPEED_CASE(9600) BITRATE_TO_SPEED_CASE(19200) BITRATE_TO_SPEED_CASE(38400) -#if !BUILDFLAG(IS_MAC) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) BITRATE_TO_SPEED_CASE(57600) BITRATE_TO_SPEED_CASE(115200) BITRATE_TO_SPEED_CASE(230400) diff --git a/www/chromium/files/patch-services_network_BUILD.gn b/www/chromium/files/patch-services_network_BUILD.gn index 2a7e0aef461a..85e273769ebf 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 2022-05-19 14:06:27 UTC +--- services/network/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ services/network/BUILD.gn -@@ -328,7 +328,6 @@ if (is_linux || is_chromeos) { +@@ -332,7 +332,6 @@ if (is_linux || is_chromeos) { ] deps = [ "//base:base", - "//sandbox/linux:sandbox_services", "//sandbox/policy:policy", ] } diff --git a/www/chromium/files/patch-services_tracing_public_cpp_perfetto_perfetto__config.cc b/www/chromium/files/patch-services_tracing_public_cpp_perfetto_perfetto__config.cc index 1f26208a7d6e..0db160132971 100644 --- a/www/chromium/files/patch-services_tracing_public_cpp_perfetto_perfetto__config.cc +++ b/www/chromium/files/patch-services_tracing_public_cpp_perfetto_perfetto__config.cc @@ -1,11 +1,11 @@ ---- services/tracing/public/cpp/perfetto/perfetto_config.cc.orig 2022-02-28 16:54:41 UTC +--- services/tracing/public/cpp/perfetto/perfetto_config.cc.orig 2022-06-17 14:20:10 UTC +++ services/tracing/public/cpp/perfetto/perfetto_config.cc -@@ -124,7 +124,7 @@ void AddDataSourceConfigs( +@@ -125,7 +125,7 @@ void AddDataSourceConfigs( // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. #if BUILDFLAG(IS_CHROMEOS_ASH) || \ - (BUILDFLAG(IS_CHROMECAST) && BUILDFLAG(IS_LINUX)) + (BUILDFLAG(IS_CHROMECAST) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD))) if (source_names.empty() || source_names.count(tracing::mojom::kSystemTraceDataSourceName) == 1) { AddDataSourceConfig( diff --git a/www/chromium/files/patch-services_video__capture_broadcasting__receiver.cc b/www/chromium/files/patch-services_video__capture_broadcasting__receiver.cc index e39571c78e5b..234059638de3 100644 --- a/www/chromium/files/patch-services_video__capture_broadcasting__receiver.cc +++ b/www/chromium/files/patch-services_video__capture_broadcasting__receiver.cc @@ -1,20 +1,11 @@ ---- services/video_capture/broadcasting_receiver.cc.orig 2022-02-28 16:54:41 UTC +--- services/video_capture/broadcasting_receiver.cc.orig 2022-06-17 14:20:10 UTC +++ services/video_capture/broadcasting_receiver.cc -@@ -28,7 +28,7 @@ void CloneSharedBufferHandle(const mojo::ScopedSharedB - void CloneSharedBufferToRawFileDescriptorHandle( - const mojo::ScopedSharedBufferHandle& source, - media::mojom::VideoBufferHandlePtr* target) { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // |source| is unwrapped to a |PlatformSharedMemoryRegion|, from whence a file - // descriptor can be extracted which is then mojo-wrapped. - base::subtle::PlatformSharedMemoryRegion platform_region = -@@ -240,7 +240,7 @@ void BroadcastingReceiver::BufferContext:: - ConvertRawFileDescriptorToSharedBuffer() { +@@ -234,7 +234,7 @@ void BroadcastingReceiver::BufferContext:: + ConvertRawFileDescriptorToUnsafeShmemRegion() { DCHECK(buffer_handle_->is_shared_memory_via_raw_file_descriptor()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) - // The conversion unwraps the descriptor from its mojo handle to the raw file - // descriptor (ie, an int). This is used to create a - // PlatformSharedMemoryRegion which is then wrapped as a + const size_t handle_size = + buffer_handle_->get_shared_memory_via_raw_file_descriptor() + ->shared_memory_size_in_bytes; diff --git a/www/chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc b/www/chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc index 3236ed475d65..647e814932d4 100644 --- a/www/chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc +++ b/www/chromium/files/patch-third__party_abseil-cpp_absl_base_internal_sysinfo.cc @@ -1,23 +1,23 @@ ---- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig 2022-02-07 13:39:41 UTC +--- third_party/abseil-cpp/absl/base/internal/sysinfo.cc.orig 2022-06-17 14:20:10 UTC +++ third_party/abseil-cpp/absl/base/internal/sysinfo.cc @@ -30,7 +30,7 @@ #include #endif -#if defined(__APPLE__) || defined(__FreeBSD__) +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) #include #endif -@@ -308,9 +308,11 @@ static double GetNominalCPUFrequency() { +@@ -307,9 +307,11 @@ static double GetNominalCPUFrequency() { // a new mode (turbo mode). Essentially, those frequencies cannot // always be relied upon. The same reasons apply to /proc/cpuinfo as // well. +#if !defined(__OpenBSD__) && !defined(__FreeBSD__) // pledge violation if (ReadLongFromFile("/sys/devices/system/cpu/cpu0/tsc_freq_khz", &freq)) { return freq * 1e3; // Value is kHz. } +#endif #if defined(ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY) // On these platforms, the TSC frequency is the nominal CPU diff --git a/www/chromium/files/patch-third__party_angle_BUILD.gn b/www/chromium/files/patch-third__party_angle_BUILD.gn index 5bd5ca9bcd92..1c2bf54e5ff3 100644 --- a/www/chromium/files/patch-third__party_angle_BUILD.gn +++ b/www/chromium/files/patch-third__party_angle_BUILD.gn @@ -1,29 +1,29 @@ ---- third_party/angle/BUILD.gn.orig 2022-05-19 14:06:27 UTC +--- third_party/angle/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ third_party/angle/BUILD.gn -@@ -213,7 +213,6 @@ config("extra_warnings") { +@@ -222,7 +222,6 @@ config("extra_warnings") { "-Wtautological-type-limit-compare", "-Wundefined-reinterpret-cast", "-Wunneeded-internal-declaration", - "-Wunused-but-set-variable", "-Wsuggest-destructor-override", "-Wsuggest-override", -@@ -391,7 +390,7 @@ angle_static_library("angle_common") { +@@ -400,7 +399,7 @@ angle_static_library("angle_common") { all_dependent_configs = [ ":angle_disable_pool_alloc" ] } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { libs = [ "dl" ] } -@@ -512,6 +511,9 @@ angle_static_library("angle_gpu_info_util") { +@@ -521,6 +520,9 @@ angle_static_library("angle_gpu_info_util") { "Xi", "Xext", ] + if (is_bsd) { + libs += [ "GL" ] + } } - } + if (angle_use_wayland && angle_has_build) { diff --git a/www/chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp b/www/chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp index 838318b2421b..0b0463d3ce9c 100644 --- a/www/chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp +++ b/www/chromium/files/patch-third__party_angle_src_libANGLE_Display.cpp @@ -1,47 +1,47 @@ ---- third_party/angle/src/libANGLE/Display.cpp.orig 2022-05-19 14:06:27 UTC +--- third_party/angle/src/libANGLE/Display.cpp.orig 2022-06-17 14:20:10 UTC +++ third_party/angle/src/libANGLE/Display.cpp @@ -55,7 +55,7 @@ # include "libANGLE/renderer/gl/wgl/DisplayWGL.h" # elif defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_IOS) # include "libANGLE/renderer/gl/apple/DisplayApple_api.h" -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # include "libANGLE/renderer/gl/egl/DisplayEGL.h" # if defined(ANGLE_USE_GBM) # include "libANGLE/renderer/gl/egl/gbm/DisplayGbm.h" -@@ -328,7 +328,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -330,7 +330,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di impl = rx::CreateDisplayCGLOrEAGL(state); break; -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) if (platformType == 0) { -@@ -373,7 +373,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -375,7 +375,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di #if defined(ANGLE_ENABLE_OPENGL) # if defined(ANGLE_PLATFORM_WINDOWS) impl = new rx::DisplayWGL(state); -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) # if defined(ANGLE_USE_GBM) if (platformType == 0 || platformType == EGL_PLATFORM_VULKAN_DISPLAY_MODE_HEADLESS_ANGLE) -@@ -424,7 +424,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di +@@ -426,7 +426,7 @@ rx::DisplayImpl *CreateDisplayFromAttribs(EGLAttrib di impl = rx::CreateVulkanWin32Display(state); } break; -# elif defined(ANGLE_PLATFORM_LINUX) +# elif defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) - # if defined(ANGLE_USE_X11) - if (platformType == EGL_PLATFORM_X11_EXT && rx::IsVulkanXcbDisplayAvailable()) + # if defined(ANGLE_USE_GBM) + if (platformType == EGL_PLATFORM_GBM_KHR && rx::IsVulkanGbmDisplayAvailable()) { -@@ -1932,7 +1932,7 @@ static ClientExtensions GenerateClientExtensions() +@@ -1965,7 +1965,7 @@ static ClientExtensions GenerateClientExtensions() extensions.x11Visual = true; #endif -#if defined(ANGLE_PLATFORM_LINUX) +#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) extensions.platformANGLEDeviceTypeEGLANGLE = true; #endif diff --git a/www/chromium/files/patch-third__party_angle_src_libANGLE_renderer_driver__utils.h b/www/chromium/files/patch-third__party_angle_src_libANGLE_renderer_driver__utils.h index 9e0cb54e9bbd..8cf1aa4b9191 100644 --- a/www/chromium/files/patch-third__party_angle_src_libANGLE_renderer_driver__utils.h +++ b/www/chromium/files/patch-third__party_angle_src_libANGLE_renderer_driver__utils.h @@ -1,11 +1,11 @@ ---- third_party/angle/src/libANGLE/renderer/driver_utils.h.orig 2022-02-28 16:54:41 UTC +--- third_party/angle/src/libANGLE/renderer/driver_utils.h.orig 2022-06-17 14:20:10 UTC +++ third_party/angle/src/libANGLE/renderer/driver_utils.h -@@ -179,7 +179,7 @@ inline bool IsWindows() +@@ -183,7 +183,7 @@ inline bool IsWindows() inline bool IsLinux() { -#if defined(ANGLE_PLATFORM_LINUX) +#if defined(ANGLE_PLATFORM_LINUX) || defined(ANGLE_PLATFORM_BSD) return true; #else return false; diff --git a/www/chromium/files/patch-third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h b/www/chromium/files/patch-third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h index c83bf271ea18..26496368123b 100644 --- a/www/chromium/files/patch-third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h +++ b/www/chromium/files/patch-third__party_angle_src_libANGLE_renderer_vulkan_DisplayVk__api.h @@ -1,11 +1,11 @@ ---- third_party/angle/src/libANGLE/renderer/vulkan/DisplayVk_api.h.orig 2022-02-07 13:39:41 UTC +--- third_party/angle/src/libANGLE/renderer/vulkan/DisplayVk_api.h.orig 2022-06-17 14:20:10 UTC +++ third_party/angle/src/libANGLE/renderer/vulkan/DisplayVk_api.h @@ -23,7 +23,7 @@ bool IsVulkanWin32DisplayAvailable(); DisplayImpl *CreateVulkanWin32Display(const egl::DisplayState &state); #endif // defined(ANGLE_PLATFORM_WINDOWS) -#if defined(ANGLE_PLATFORM_LINUX) +#if defined(ANGLE_PLATFORM_POSIX) - bool IsVulkanXcbDisplayAvailable(); - DisplayImpl *CreateVulkanXcbDisplay(const egl::DisplayState &state); + bool IsVulkanWaylandDisplayAvailable(); + DisplayImpl *CreateVulkanWaylandDisplay(const egl::DisplayState &state); diff --git a/www/chromium/files/patch-third__party_angle_util_BUILD.gn b/www/chromium/files/patch-third__party_angle_util_BUILD.gn index 912f36e8a1d5..d23d124dc8d9 100644 --- a/www/chromium/files/patch-third__party_angle_util_BUILD.gn +++ b/www/chromium/files/patch-third__party_angle_util_BUILD.gn @@ -1,11 +1,11 @@ ---- third_party/angle/util/BUILD.gn.orig 2022-05-19 14:06:27 UTC +--- third_party/angle/util/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ third_party/angle/util/BUILD.gn -@@ -203,7 +203,7 @@ foreach(is_shared_library, +@@ -214,7 +214,7 @@ foreach(is_shared_library, ] libs = [] - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { libs += [ "rt", "dl", 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 9a1fe95c2fc0..de0a6162817b 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 2022-02-28 16:54:41 UTC +--- third_party/blink/renderer/controller/blink_initializer.cc.orig 2022-06-17 14:20:10 UTC +++ third_party/blink/renderer/controller/blink_initializer.cc -@@ -71,12 +71,12 @@ +@@ -72,12 +72,12 @@ #include "third_party/blink/renderer/controller/oom_intervention_impl.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_MAC) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_MAC) || 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 -@@ -156,7 +156,7 @@ void InitializeCommon(Platform* platform, mojo::Binder +@@ -157,7 +157,7 @@ void InitializeCommon(Platform* platform, mojo::Binder #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) // Initialize UserLevelMemoryPressureSignalGenerator so it starts monitoring. if (UserLevelMemoryPressureSignalGenerator::Enabled()) UserLevelMemoryPressureSignalGenerator::Instance(); -@@ -227,7 +227,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder +@@ -228,7 +228,7 @@ void BlinkInitializer::RegisterInterfaces(mojo::Binder main_thread->GetTaskRunner()); #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) binders.Add(ConvertToBaseRepeatingCallback( CrossThreadBindRepeating(&MemoryUsageMonitorPosix::Bind)), main_thread->GetTaskRunner()); diff --git a/www/chromium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc b/www/chromium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc index 4cc481597288..4d6ac85cc1bc 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc +++ b/www/chromium/files/patch-third__party_blink_renderer_controller_memory__usage__monitor__posix.cc @@ -1,21 +1,21 @@ ---- third_party/blink/renderer/controller/memory_usage_monitor_posix.cc.orig 2022-02-28 16:54:41 UTC +--- third_party/blink/renderer/controller/memory_usage_monitor_posix.cc.orig 2022-06-17 14:20:10 UTC +++ third_party/blink/renderer/controller/memory_usage_monitor_posix.cc -@@ -128,15 +128,17 @@ void MemoryUsageMonitorPosix::ResetFileDescriptors() { +@@ -129,15 +129,17 @@ void MemoryUsageMonitorPosix::ResetFileDescriptors() { void MemoryUsageMonitorPosix::SetProcFiles(base::File statm_file, base::File status_file) { +#if !BUILDFLAG(IS_BSD) DCHECK(statm_file.IsValid()); DCHECK(status_file.IsValid()); DCHECK_EQ(-1, statm_fd_.get()); DCHECK_EQ(-1, status_fd_.get()); statm_fd_.reset(statm_file.TakePlatformFile()); status_fd_.reset(status_file.TakePlatformFile()); +#endif } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // static void MemoryUsageMonitorPosix::Bind( mojo::PendingReceiver receiver) { 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 ef31aacc8b56..ff2257f6eaaf 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 2022-05-19 14:06:27 UTC +--- third_party/blink/renderer/core/exported/web_view_impl.cc.orig 2022-06-17 14:20:10 UTC +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -405,7 +405,7 @@ SkFontHinting RendererPreferencesToSkiaHinting( +@@ -401,7 +401,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' -@@ -3168,7 +3168,7 @@ void WebViewImpl::UpdateFontRenderingFromRendererPrefs +@@ -3187,7 +3187,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 1b6ec2508e5c..4ef40caac308 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 2022-05-19 14:06:27 UTC +--- third_party/blink/renderer/core/frame/web_frame_test.cc.orig 2022-06-17 14:20:10 UTC +++ third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -6281,7 +6281,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { - EXPECT_EQ(64, ComputeOffset(layout_object, 1000, 1000)); - } - +@@ -6321,7 +6321,7 @@ TEST_F(WebFrameTest, DISABLED_PositionForPointTest) { + MoveCaretStaysHorizontallyAlignedWhenMoved + #endif + // TODO(crbug.com/1317375): Build these tests on all platforms. -#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) - TEST_F(WebFrameTest, SelectRangeStaysHorizontallyAlignedWhenMoved) { + TEST_F(WebFrameTest, MAYBE_SelectRangeStaysHorizontallyAlignedWhenMoved) { RegisterMockedHttpURLLoad("move_caret.html"); -@@ -6660,7 +6660,7 @@ TEST_F(CompositedSelectionBoundsTest, SVGBasic) { +@@ -6700,7 +6700,7 @@ TEST_F(CompositedSelectionBoundsTest, SVGBasic) { TEST_F(CompositedSelectionBoundsTest, SVGTextWithFragments) { RunTest("composited_selection_bounds_svg_text_with_fragments.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_inspector_inspector__memory__agent.cc b/www/chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc index c7b78f2a0dc7..e3f53f951af8 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc +++ b/www/chromium/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig 2022-02-28 16:54:41 UTC +--- third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig 2022-06-17 14:20:10 UTC +++ third_party/blink/renderer/core/inspector/inspector_memory_agent.cc -@@ -186,7 +186,7 @@ InspectorMemoryAgent::GetSamplingProfileById(uint32_t +@@ -190,7 +190,7 @@ InspectorMemoryAgent::GetSamplingProfileById(uint32_t Vector InspectorMemoryAgent::Symbolize( const WebVector& addresses) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // TODO(alph): Move symbolization to the client. Vector addresses_to_symbolize; for (size_t i = 0; i < addresses.size(); i++) { diff --git a/www/chromium/files/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc b/www/chromium/files/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc index 2013dbe181bb..fb15f518017d 100644 --- a/www/chromium/files/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc +++ b/www/chromium/files/patch-third__party_blink_renderer_modules_webaudio_audio__worklet__thread__test.cc @@ -1,11 +1,11 @@ ---- third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc.orig 2022-02-28 16:54:41 UTC +--- third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc.orig 2022-06-17 14:20:10 UTC +++ third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc -@@ -379,7 +379,7 @@ class AudioWorkletThreadPriorityTest +@@ -378,7 +378,7 @@ class AudioWorkletThreadPriorityTest // TODO(crbug.com/1022888): The worklet thread priority is always NORMAL // on OS_LINUX and OS_CHROMEOS regardless of the thread priority setting. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (expected_priority == base::ThreadPriority::REALTIME_AUDIO || expected_priority == base::ThreadPriority::DISPLAY) { EXPECT_EQ(actual_priority, base::ThreadPriority::NORMAL); 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 ed4e9bdb1877..c53d7018e08c 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 2022-05-19 14:06:27 UTC +--- third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc.orig 2022-06-17 14:20:10 UTC +++ third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -6057,7 +6057,7 @@ void WebGLRenderingContextBase::TexImageHelperMediaVid +@@ -6116,7 +6116,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 -- -+ +- ++ Lohit Bengali - + diff --git a/www/chromium/files/patch-ui_strings_translations_app__locale__settings__ja.xtb b/www/chromium/files/patch-ui_strings_translations_app__locale__settings__ja.xtb index 9c58d65717f0..7250d5648984 100644 --- a/www/chromium/files/patch-ui_strings_translations_app__locale__settings__ja.xtb +++ b/www/chromium/files/patch-ui_strings_translations_app__locale__settings__ja.xtb @@ -1,11 +1,11 @@ ---- ui/strings/translations/app_locale_settings_ja.xtb.orig 2022-05-19 14:06:27 UTC +--- ui/strings/translations/app_locale_settings_ja.xtb.orig 2022-06-17 14:20:10 UTC +++ ui/strings/translations/app_locale_settings_ja.xtb @@ -12,7 +12,7 @@ Helvetica,Hiragino Kaku Gothic ProN,sans-serif -- -+ +- ++ VL PGothic,Sazanami Gothic,Kochi Gothic,sans-serif - + diff --git a/www/chromium/files/patch-ui_strings_translations_app__locale__settings__ko.xtb b/www/chromium/files/patch-ui_strings_translations_app__locale__settings__ko.xtb index 14f27d4a74bd..4dd6f3802148 100644 --- a/www/chromium/files/patch-ui_strings_translations_app__locale__settings__ko.xtb +++ b/www/chromium/files/patch-ui_strings_translations_app__locale__settings__ko.xtb @@ -1,11 +1,11 @@ ---- ui/strings/translations/app_locale_settings_ko.xtb.orig 2022-05-19 14:06:27 UTC +--- ui/strings/translations/app_locale_settings_ko.xtb.orig 2022-06-17 14:20:10 UTC +++ ui/strings/translations/app_locale_settings_ko.xtb @@ -12,7 +12,7 @@ Helvetica,Apple SD Gothic Neo,AppleGothic,sans-serif -- -+ +- ++ Noto Sans CJK KR,NanumGothic,UnDotum,Baekmuk Gulim,sans-serif - + diff --git a/www/chromium/files/patch-ui_strings_translations_app__locale__settings__ml.xtb b/www/chromium/files/patch-ui_strings_translations_app__locale__settings__ml.xtb index f4efc5d9ee2f..e495d27cccc6 100644 --- a/www/chromium/files/patch-ui_strings_translations_app__locale__settings__ml.xtb +++ b/www/chromium/files/patch-ui_strings_translations_app__locale__settings__ml.xtb @@ -1,11 +1,11 @@ ---- ui/strings/translations/app_locale_settings_ml.xtb.orig 2022-05-19 14:06:27 UTC +--- ui/strings/translations/app_locale_settings_ml.xtb.orig 2022-06-17 14:20:10 UTC +++ ui/strings/translations/app_locale_settings_ml.xtb @@ -9,7 +9,7 @@ 'Segoe UI',Arial,AnjaliOldLipi,Rachana,Kartika Arial,AnjaliOldLipi,Rachana,Kartika -- -+ +- ++ Arial,AnjaliOldLipi,Rachana,Kartika,sans-serif - + diff --git a/www/chromium/files/patch-ui_strings_translations_app__locale__settings__th.xtb b/www/chromium/files/patch-ui_strings_translations_app__locale__settings__th.xtb index c097b0e22858..74b96462a4f8 100644 --- a/www/chromium/files/patch-ui_strings_translations_app__locale__settings__th.xtb +++ b/www/chromium/files/patch-ui_strings_translations_app__locale__settings__th.xtb @@ -1,11 +1,11 @@ ---- ui/strings/translations/app_locale_settings_th.xtb.orig 2022-05-19 14:06:27 UTC +--- ui/strings/translations/app_locale_settings_th.xtb.orig 2022-06-17 14:20:10 UTC +++ ui/strings/translations/app_locale_settings_th.xtb @@ -6,7 +6,7 @@ Tahoma,sans-serif Tahoma,sans-serif -- -+ +- ++ Norasi,Waree,Garuda,Loma,sans-serif - + diff --git a/www/chromium/files/patch-ui_strings_translations_app__locale__settings__zh-CN.xtb b/www/chromium/files/patch-ui_strings_translations_app__locale__settings__zh-CN.xtb index 922bad3acb0c..ae6bf289b144 100644 --- a/www/chromium/files/patch-ui_strings_translations_app__locale__settings__zh-CN.xtb +++ b/www/chromium/files/patch-ui_strings_translations_app__locale__settings__zh-CN.xtb @@ -1,11 +1,11 @@ ---- ui/strings/translations/app_locale_settings_zh-CN.xtb.orig 2022-05-19 14:06:27 UTC +--- ui/strings/translations/app_locale_settings_zh-CN.xtb.orig 2022-06-17 14:20:10 UTC +++ ui/strings/translations/app_locale_settings_zh-CN.xtb @@ -12,7 +12,7 @@ Helvetica,PingFang SC,STHeiti,sans-serif -- -+ +- ++ Noto Sans CJK SC, WenQuanYi Zen Hei, sans-serif - + diff --git a/www/chromium/files/patch-ui_strings_translations_app__locale__settings__zh-TW.xtb b/www/chromium/files/patch-ui_strings_translations_app__locale__settings__zh-TW.xtb index 0df523ac6721..c7facafac28b 100644 --- a/www/chromium/files/patch-ui_strings_translations_app__locale__settings__zh-TW.xtb +++ b/www/chromium/files/patch-ui_strings_translations_app__locale__settings__zh-TW.xtb @@ -1,11 +1,11 @@ ---- ui/strings/translations/app_locale_settings_zh-TW.xtb.orig 2022-05-19 14:06:27 UTC +--- ui/strings/translations/app_locale_settings_zh-TW.xtb.orig 2022-06-17 14:20:10 UTC +++ ui/strings/translations/app_locale_settings_zh-TW.xtb @@ -12,7 +12,7 @@ Helvetica,PingFang TC,Heiti TC,sans-serif -- -+ +- ++ Noto Sans CJK SC, WenQuanYi Zen Hei, sans-serif - + diff --git a/www/chromium/files/patch-ui_views_examples_widget__example.cc b/www/chromium/files/patch-ui_views_examples_widget__example.cc index 11dc52f2cd0d..3a6e1803eb0f 100644 --- a/www/chromium/files/patch-ui_views_examples_widget__example.cc +++ b/www/chromium/files/patch-ui_views_examples_widget__example.cc @@ -1,11 +1,11 @@ ---- ui/views/examples/widget_example.cc.orig 2022-02-28 16:54:41 UTC +--- ui/views/examples/widget_example.cc.orig 2022-06-17 14:20:10 UTC +++ ui/views/examples/widget_example.cc -@@ -49,7 +49,7 @@ void WidgetExample::CreateExampleView(View* container) +@@ -50,7 +50,7 @@ void WidgetExample::CreateExampleView(View* container) modal_button->SetCallback( base::BindRepeating(&WidgetExample::CreateDialogWidget, base::Unretained(this), modal_button, true)); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Windows does not support TYPE_CONTROL top-level widgets. LabelButton* control_button = BuildButton( container, GetStringUTF16(IDS_WIDGET_CHILD_WIDGET_BUTTON_LABEL)); diff --git a/www/chromium/files/patch-ui_views_linux__ui_linux__ui.cc b/www/chromium/files/patch-ui_views_linux__ui_linux__ui.cc index 86800bb0a12d..332960677908 100644 --- a/www/chromium/files/patch-ui_views_linux__ui_linux__ui.cc +++ b/www/chromium/files/patch-ui_views_linux__ui_linux__ui.cc @@ -1,11 +1,11 @@ ---- ui/views/linux_ui/linux_ui.cc.orig 2022-03-25 21:59:56 UTC +--- ui/views/linux_ui/linux_ui.cc.orig 2022-06-17 14:20:10 UTC +++ ui/views/linux_ui/linux_ui.cc -@@ -21,7 +21,7 @@ void LinuxUI::SetInstance(std::unique_ptr ins +@@ -24,7 +24,7 @@ void LinuxUI::SetInstance(std::unique_ptr ins g_linux_ui = instance.release(); SkiaFontDelegate::SetInstance(g_linux_ui); -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMECAST) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMECAST) ShellDialogLinux::SetInstance(g_linux_ui); #endif ui::SetTextEditKeyBindingsDelegate(g_linux_ui); diff --git a/www/chromium/files/patch-ui_views_linux__ui_linux__ui.h b/www/chromium/files/patch-ui_views_linux__ui_linux__ui.h index aa233791b9a8..85fcfb69e602 100644 --- a/www/chromium/files/patch-ui_views_linux__ui_linux__ui.h +++ b/www/chromium/files/patch-ui_views_linux__ui_linux__ui.h @@ -1,20 +1,20 @@ ---- ui/views/linux_ui/linux_ui.h.orig 2022-03-25 21:59:56 UTC +--- ui/views/linux_ui/linux_ui.h.orig 2022-06-17 14:20:10 UTC +++ ui/views/linux_ui/linux_ui.h -@@ -21,7 +21,7 @@ +@@ -23,7 +23,7 @@ #include "ui/views/controls/button/button.h" #include "ui/views/views_export.h" -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMECAST) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMECAST) #include "ui/shell_dialogs/shell_dialog_linux.h" #endif -@@ -57,7 +57,7 @@ class WindowFrameProvider; +@@ -59,7 +59,7 @@ class WindowFrameProvider; // project that wants to do linux desktop native rendering. class VIEWS_EXPORT LinuxUI : public ui::LinuxInputMethodContextFactory, public gfx::SkiaFontDelegate, -#if BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMECAST) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && !BUILDFLAG(IS_CHROMECAST) public ui::ShellDialogLinux, #endif public ui::TextEditKeyBindingsDelegateAuraLinux, diff --git a/www/chromium/files/patch-ui_views_test_ui__controls__factory__desktop__aura__ozone.cc b/www/chromium/files/patch-ui_views_test_ui__controls__factory__desktop__aura__ozone.cc deleted file mode 100644 index f9db12cd0b1c..000000000000 --- a/www/chromium/files/patch-ui_views_test_ui__controls__factory__desktop__aura__ozone.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- ui/views/test/ui_controls_factory_desktop_aura_ozone.cc.orig 2022-05-19 14:06:27 UTC -+++ ui/views/test/ui_controls_factory_desktop_aura_ozone.cc -@@ -25,7 +25,7 @@ - #include "ui/ozone/public/ozone_ui_controls_test_helper.h" - #include "ui/views/test/test_desktop_screen_ozone.h" - --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h" - #else - #include "ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h" -@@ -157,7 +157,7 @@ class UIControlsDesktopOzone : public UIControlsAura { - - private: - aura::Window* RootWindowForPoint(const gfx::Point& point) { --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) - // Most interactive_ui_tests run inside of the aura_test_helper - // environment. This means that we can't rely on display::Screen and several - // other things to work properly. Therefore we hack around this by diff --git a/www/chromium/files/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h b/www/chromium/files/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h new file mode 100644 index 000000000000..ca1948b16212 --- /dev/null +++ b/www/chromium/files/patch-ui_views_widget_desktop__aura_desktop__drag__drop__client__ozone.h @@ -0,0 +1,11 @@ +--- ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.h.orig 2022-06-17 14:20:10 UTC ++++ ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone.h +@@ -67,7 +67,7 @@ class VIEWS_EXPORT DesktopDragDropClientOzone + // The offset of |drag_widget_| relative to the mouse position. + gfx::Vector2d offset; + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // The last received drag location. The drag widget is moved asynchronously + // so its position is updated when the UI thread has time for that. When + // the first change to the location happens, a call to UpdateDragWidget() diff --git a/www/chromium/files/patch-ui_views_widget_desktop__aura_desktop__screen__ozone.cc b/www/chromium/files/patch-ui_views_widget_desktop__aura_desktop__screen__ozone.cc index 4999013209be..4496b0bea20d 100644 --- a/www/chromium/files/patch-ui_views_widget_desktop__aura_desktop__screen__ozone.cc +++ b/www/chromium/files/patch-ui_views_widget_desktop__aura_desktop__screen__ozone.cc @@ -1,11 +1,11 @@ ---- ui/views/widget/desktop_aura/desktop_screen_ozone.cc.orig 2022-02-28 16:54:41 UTC +--- ui/views/widget/desktop_aura/desktop_screen_ozone.cc.orig 2022-06-17 14:20:10 UTC +++ ui/views/widget/desktop_aura/desktop_screen_ozone.cc @@ -25,7 +25,7 @@ gfx::NativeWindow DesktopScreenOzone::GetNativeWindowF widget); } --#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) -+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) std::unique_ptr CreateDesktopScreen() { - auto screen = std::make_unique(); + auto screen = std::make_unique(); screen->Initialize(); diff --git a/www/chromium/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc b/www/chromium/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc index 29641fbb3686..bbc391808f4d 100644 --- a/www/chromium/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc +++ b/www/chromium/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc @@ -1,11 +1,29 @@ ---- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc.orig 2022-05-19 14:06:27 UTC +--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc.orig 2022-06-17 14:20:10 UTC +++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc -@@ -907,7 +907,7 @@ display::Display DesktopWindowTreeHostPlatform::GetDis +@@ -40,7 +40,7 @@ + #include "ui/wm/core/window_util.h" + #include "ui/wm/public/window_move_client.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_ozone_linux.h" + #endif + +@@ -313,7 +313,7 @@ std::unique_ptr + DesktopWindowTreeHostPlatform::CreateDragDropClient() { + ui::WmDragHandler* drag_handler = ui::GetWmDragHandler(*(platform_window())); + std::unique_ptr drag_drop_client = +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + std::make_unique(window(), drag_handler); + #else + std::make_unique(window(), drag_handler); +@@ -987,7 +987,7 @@ display::Display DesktopWindowTreeHostPlatform::GetDis // DesktopWindowTreeHost: // Linux subclasses this host and adds some Linux specific bits. -#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) // static DesktopWindowTreeHost* DesktopWindowTreeHost::Create( internal::NativeWidgetDelegate* native_widget_delegate, diff --git a/www/chromium/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform__impl__interactive__uitest.cc b/www/chromium/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform__impl__interactive__uitest.cc new file mode 100644 index 000000000000..0815c62ca170 --- /dev/null +++ b/www/chromium/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform__impl__interactive__uitest.cc @@ -0,0 +1,11 @@ +--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform_impl_interactive_uitest.cc.orig 2022-06-17 14:20:10 UTC ++++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform_impl_interactive_uitest.cc +@@ -21,7 +21,7 @@ + #include "ui/views/widget/widget_delegate.h" + #include "ui/views/window/native_frame_view.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h" + #include "ui/views/widget/desktop_aura/window_event_filter_linux.h" + using DesktopWindowTreeHostPlatformImpl = views::DesktopWindowTreeHostLinux; diff --git a/www/chromium/files/patch-ui_views_widget_native__widget__aura.cc b/www/chromium/files/patch-ui_views_widget_native__widget__aura.cc deleted file mode 100644 index dfd6c8a4a1a5..000000000000 --- a/www/chromium/files/patch-ui_views_widget_native__widget__aura.cc +++ /dev/null @@ -1,29 +0,0 @@ ---- ui/views/widget/native_widget_aura.cc.orig 2022-04-21 18:48:31 UTC -+++ ui/views/widget/native_widget_aura.cc -@@ -69,7 +69,7 @@ - #endif - - #if BUILDFLAG(ENABLE_DESKTOP_AURA) && \ -- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) -+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) - #include "ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h" - #endif - -@@ -1154,7 +1154,7 @@ void NativeWidgetAura::SetInitialFocus(ui::WindowShowS - - namespace { - #if BUILDFLAG(ENABLE_DESKTOP_AURA) && \ -- (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) -+ (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) - void CloseWindow(aura::Window* window) { - if (window) { - Widget* widget = Widget::GetWidgetForNativeView(window); -@@ -1185,7 +1185,7 @@ void Widget::CloseAllSecondaryWidgets() { - #endif - - #if BUILDFLAG(ENABLE_DESKTOP_AURA) && \ -- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) -+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) - DesktopWindowTreeHostLinux::CleanUpWindowList(CloseWindow); - #endif - } diff --git a/www/chromium/files/patch-ui_views_widget_widget.cc b/www/chromium/files/patch-ui_views_widget_widget.cc index a2b2491bfd9f..b144e7cd6ec7 100644 --- a/www/chromium/files/patch-ui_views_widget_widget.cc +++ b/www/chromium/files/patch-ui_views_widget_widget.cc @@ -1,20 +1,20 @@ ---- ui/views/widget/widget.cc.orig 2022-05-19 14:06:27 UTC +--- ui/views/widget/widget.cc.orig 2022-06-17 14:20:10 UTC +++ ui/views/widget/widget.cc @@ -48,7 +48,7 @@ #include "ui/views/window/custom_frame_view.h" #include "ui/views/window/dialog_delegate.h" -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/views/linux_ui/linux_ui.h" #endif -@@ -1821,7 +1821,7 @@ const ui::NativeTheme* Widget::GetNativeTheme() const +@@ -1819,7 +1819,7 @@ const ui::NativeTheme* Widget::GetNativeTheme() const if (parent_) return parent_->GetNativeTheme(); -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) if (const views::LinuxUI* linux_ui = views::LinuxUI::instance()) { if (auto* native_theme = linux_ui->GetNativeTheme(GetNativeWindow())) return native_theme; diff --git a/www/chromium/files/patch-v8_BUILD.gn b/www/chromium/files/patch-v8_BUILD.gn index 54a8b54940a2..de7c4a4f4e69 100644 --- a/www/chromium/files/patch-v8_BUILD.gn +++ b/www/chromium/files/patch-v8_BUILD.gn @@ -1,45 +1,45 @@ ---- v8/BUILD.gn.orig 2022-05-19 14:06:27 UTC +--- v8/BUILD.gn.orig 2022-06-17 14:20:10 UTC +++ v8/BUILD.gn -@@ -1226,6 +1226,14 @@ config("toolchain") { +@@ -1241,6 +1241,14 @@ config("toolchain") { } else if (target_os == "win") { defines += [ "V8_HAVE_TARGET_OS" ] defines += [ "V8_TARGET_OS_WIN" ] + } else if (target_os == "openbsd") { + defines += [ "V8_HAVE_TARGET_OS" ] + defines += [ "V8_TARGET_OS_OPENBSD" ] + defines += [ "V8_TARGET_OS_BSD" ] + } else if (target_os == "freebsd") { + defines += [ "V8_HAVE_TARGET_OS" ] + defines += [ "V8_TARGET_OS_FREEBSD" ] + defines += [ "V8_TARGET_OS_BSD" ] } # TODO(infra): Support v8_enable_prof on Windows. -@@ -5239,7 +5247,7 @@ v8_component("v8_libbase") { +@@ -5298,7 +5306,7 @@ v8_component("v8_libbase") { } } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "src/base/debug/stack_trace_posix.cc", "src/base/platform/platform-linux.cc", -@@ -5249,6 +5257,18 @@ v8_component("v8_libbase") { +@@ -5309,6 +5317,18 @@ v8_component("v8_libbase") { "dl", "rt", ] + } else if (is_openbsd) { + sources += [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-openbsd.cc", + ] + libs = [ "execinfo" ] + } else if (is_freebsd) { + sources += [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-freebsd.cc", + ] + libs = [ "execinfo" ] } else if (current_os == "aix") { sources += [ "src/base/debug/stack_trace_posix.cc", diff --git a/www/chromium/files/patch-v8_src_api_api.cc b/www/chromium/files/patch-v8_src_api_api.cc index 04739f5e7e00..6bace994d05c 100644 --- a/www/chromium/files/patch-v8_src_api_api.cc +++ b/www/chromium/files/patch-v8_src_api_api.cc @@ -1,20 +1,20 @@ ---- v8/src/api/api.cc.orig 2022-05-19 14:06:27 UTC +--- v8/src/api/api.cc.orig 2022-06-17 14:20:10 UTC +++ v8/src/api/api.cc @@ -138,7 +138,7 @@ #include "src/wasm/wasm-serialization.h" #endif // V8_ENABLE_WEBASSEMBLY -#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD +#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD #include - #include "include/v8-wasm-trap-handler-posix.h" - #include "src/trap-handler/handler-inside-posix.h" -@@ -6064,7 +6064,7 @@ bool v8::V8::Initialize(const int build_config) { + + #if V8_ENABLE_WEBASSEMBLY +@@ -6096,7 +6096,7 @@ bool v8::V8::Initialize(const int build_config) { return true; } -#if V8_OS_LINUX || V8_OS_DARWIN +#if V8_OS_LINUX || V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD bool TryHandleWebAssemblyTrapPosix(int sig_code, siginfo_t* info, void* context) { #if V8_ENABLE_WEBASSEMBLY && V8_TRAP_HANDLER_SUPPORTED diff --git a/www/chromium/files/patch-v8_src_base_atomicops.h b/www/chromium/files/patch-v8_src_base_atomicops.h index 4557f74f1445..5e9ed3088e3b 100644 --- a/www/chromium/files/patch-v8_src_base_atomicops.h +++ b/www/chromium/files/patch-v8_src_base_atomicops.h @@ -1,33 +1,24 @@ ---- v8/src/base/atomicops.h.orig 2022-05-19 14:06:27 UTC +--- v8/src/base/atomicops.h.orig 2022-06-17 14:20:10 UTC +++ v8/src/base/atomicops.h @@ -57,10 +57,10 @@ using Atomic64 = SbAtomic64; using Atomic8 = char; using Atomic16 = int16_t; using Atomic32 = int32_t; -#if defined(V8_HOST_ARCH_64_BIT) +#if defined(V8_HOST_ARCH_64_BIT) || defined(V8_OS_OPENBSD) // We need to be able to go between Atomic64 and AtomicWord implicitly. This // means Atomic64 and AtomicWord should be the same type on 64-bit. -#if defined(__ILP32__) +#if defined(__ILP32__) && !defined(V8_OS_OPENBSD) using Atomic64 = int64_t; #else using Atomic64 = intptr_t; -@@ -257,7 +257,7 @@ inline Atomic32 SeqCst_Load(volatile const Atomic32* p +@@ -258,7 +258,7 @@ inline Atomic32 SeqCst_Load(volatile const Atomic32* p std::memory_order_seq_cst); } -#if defined(V8_HOST_ARCH_64_BIT) +#if defined(V8_HOST_ARCH_64_BIT) || defined(V8_OS_OPENBSD) inline Atomic64 Relaxed_CompareAndSwap(volatile Atomic64* ptr, Atomic64 old_value, Atomic64 new_value) { -@@ -468,7 +468,7 @@ inline int Relaxed_Memcmp(volatile const Atomic8* s1, - - // On some platforms we need additional declarations to make - // AtomicWord compatible with our other Atomic* types. --#if defined(V8_OS_DARWIN) || defined(V8_OS_OPENBSD) || defined(V8_OS_AIX) -+#if defined(V8_OS_DARWIN) || defined(V8_OS_AIX) - #include "src/base/atomicops_internals_atomicword_compat.h" - #endif - diff --git a/www/chromium/files/patch-v8_src_base_platform_platform-posix.cc b/www/chromium/files/patch-v8_src_base_platform_platform-posix.cc index 25b00008ef24..201867d123dc 100644 --- a/www/chromium/files/patch-v8_src_base_platform_platform-posix.cc +++ b/www/chromium/files/patch-v8_src_base_platform_platform-posix.cc @@ -1,53 +1,53 @@ ---- v8/src/base/platform/platform-posix.cc.orig 2022-04-21 18:48:31 UTC +--- v8/src/base/platform/platform-posix.cc.orig 2022-06-17 14:20:10 UTC +++ v8/src/base/platform/platform-posix.cc @@ -68,7 +68,7 @@ #include #endif -#if V8_OS_FREEBSD || V8_OS_DARWIN || V8_OS_OPENBSD || V8_OS_SOLARIS +#if V8_OS_FREEBSD || V8_OS_DARWIN || V8_OS_BSD || V8_OS_SOLARIS #define MAP_ANONYMOUS MAP_ANON #endif @@ -294,8 +294,15 @@ void OS::SetRandomMmapSeed(int64_t seed) { } } +#if V8_OS_OPENBSD +// Allow OpenBSD's mmap to select a random address on OpenBSD // static void* OS::GetRandomMmapAddr() { + return nullptr; +} +#else +// static +void* OS::GetRandomMmapAddr() { uintptr_t raw_addr; { MutexGuard guard(rng_mutex.Pointer()); @@ -386,6 +393,7 @@ void* OS::GetRandomMmapAddr() { #endif return reinterpret_cast(raw_addr); } +#endif // TODO(bbudge) Move Cygwin and Fuchsia stuff into platform-specific files. #if !V8_OS_CYGWIN && !V8_OS_FUCHSIA -@@ -612,7 +620,7 @@ void OS::DestroySharedMemoryHandle(PlatformSharedMemor +@@ -634,7 +642,7 @@ void OS::DestroySharedMemoryHandle(PlatformSharedMemor // static bool OS::HasLazyCommits() { -#if V8_OS_AIX || V8_OS_LINUX || V8_OS_DARWIN +#if V8_OS_AIX || V8_OS_LINUX || V8_OS_DARWIN || V8_OS_BSD return true; #else // TODO(bbudge) Return true for all POSIX platforms. -@@ -1231,7 +1239,7 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* +@@ -1209,7 +1217,7 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* // keep this version in POSIX as most Linux-compatible derivatives will // support it. MacOS and FreeBSD are different here. #if !defined(V8_OS_FREEBSD) && !defined(V8_OS_DARWIN) && !defined(_AIX) && \ - !defined(V8_OS_SOLARIS) + !defined(V8_OS_SOLARIS) && !defined(V8_OS_OPENBSD) // static Stack::StackSlot Stack::GetStackStart() { diff --git a/www/chromium/files/patch-v8_src_compiler_backend_ia32_instruction-selector-ia32.cc b/www/chromium/files/patch-v8_src_compiler_backend_ia32_instruction-selector-ia32.cc index 5eb629c65728..b8599ecc5b85 100644 --- a/www/chromium/files/patch-v8_src_compiler_backend_ia32_instruction-selector-ia32.cc +++ b/www/chromium/files/patch-v8_src_compiler_backend_ia32_instruction-selector-ia32.cc @@ -1,20 +1,20 @@ ---- v8/src/compiler/backend/ia32/instruction-selector-ia32.cc.orig 2022-05-19 14:06:27 UTC +--- v8/src/compiler/backend/ia32/instruction-selector-ia32.cc.orig 2022-06-17 14:20:10 UTC +++ v8/src/compiler/backend/ia32/instruction-selector-ia32.cc -@@ -3021,6 +3021,7 @@ void InstructionSelector::VisitI8x16Shuffle(Node* node +@@ -3026,6 +3026,7 @@ void InstructionSelector::VisitI8x16Shuffle(Node* node Emit(opcode, 1, &dst, input_count, inputs, temp_count, temps); } +#if V8_ENABLE_WEBASSEMBLY void InstructionSelector::VisitI8x16Swizzle(Node* node) { InstructionCode op = kIA32I8x16Swizzle; -@@ -3074,6 +3075,9 @@ void VisitMinOrMax(InstructionSelector* selector, Node +@@ -3079,6 +3080,9 @@ void VisitMinOrMax(InstructionSelector* selector, Node void InstructionSelector::VisitF32x4Pmin(Node* node) { VisitMinOrMax(this, node, kIA32Minps, true); } +#else +void InstructionSelector::VisitI8x16Swizzle(Node* node) { UNREACHABLE(); } +#endif // V8_ENABLE_WEBASSEMBLY void InstructionSelector::VisitF32x4Pmax(Node* node) { VisitMinOrMax(this, node, kIA32Maxps, true); diff --git a/www/chromium/files/patch-v8_src_diagnostics_perf-jit.cc b/www/chromium/files/patch-v8_src_diagnostics_perf-jit.cc index 22b7555f190e..d6d2809f73e6 100644 --- a/www/chromium/files/patch-v8_src_diagnostics_perf-jit.cc +++ b/www/chromium/files/patch-v8_src_diagnostics_perf-jit.cc @@ -1,11 +1,11 @@ ---- v8/src/diagnostics/perf-jit.cc.orig 2022-02-07 13:39:41 UTC +--- v8/src/diagnostics/perf-jit.cc.orig 2022-06-17 14:20:10 UTC +++ v8/src/diagnostics/perf-jit.cc @@ -30,7 +30,7 @@ #include "src/common/assert-scope.h" - // Only compile the {PerfJitLogger} on Linux. + // Only compile the {LinuxPerfJitLogger} on Linux. -#if V8_OS_LINUX +#if defined(V8_OS_LINUX) || defined(V8_OS_BSD) #include #include diff --git a/www/chromium/files/patch-v8_src_diagnostics_perf-jit.h b/www/chromium/files/patch-v8_src_diagnostics_perf-jit.h index 998045c944ed..b5c06ad88b32 100644 --- a/www/chromium/files/patch-v8_src_diagnostics_perf-jit.h +++ b/www/chromium/files/patch-v8_src_diagnostics_perf-jit.h @@ -1,11 +1,11 @@ ---- v8/src/diagnostics/perf-jit.h.orig 2022-02-07 13:39:41 UTC +--- v8/src/diagnostics/perf-jit.h.orig 2022-06-17 14:20:10 UTC +++ v8/src/diagnostics/perf-jit.h @@ -31,7 +31,7 @@ #include "include/v8config.h" - // {PerfJitLogger} is only implemented on Linux. + // {LinuxPerfJitLogger} is only implemented on Linux. -#if V8_OS_LINUX +#if defined(V8_OS_LINUX) || defined(V8_OS_BSD) #include "src/logging/log.h" diff --git a/www/chromium/files/patch-weblayer_browser_browser__main__parts__impl.cc b/www/chromium/files/patch-weblayer_browser_browser__main__parts__impl.cc index 8ee0e3fa42aa..565a302bec87 100644 --- a/www/chromium/files/patch-weblayer_browser_browser__main__parts__impl.cc +++ b/www/chromium/files/patch-weblayer_browser_browser__main__parts__impl.cc @@ -1,20 +1,20 @@ ---- weblayer/browser/browser_main_parts_impl.cc.orig 2022-04-21 18:48:31 UTC +--- weblayer/browser/browser_main_parts_impl.cc.orig 2022-06-17 14:20:10 UTC +++ weblayer/browser/browser_main_parts_impl.cc @@ -79,7 +79,7 @@ // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) #include "ui/base/ime/init/input_method_initializer.h" #endif -@@ -198,7 +198,7 @@ int BrowserMainPartsImpl::PreEarlyInitialization() { +@@ -195,7 +195,7 @@ int BrowserMainPartsImpl::PreEarlyInitialization() { // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(USE_AURA) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) ui::InitializeInputMethodForTesting(); #endif #if BUILDFLAG(IS_ANDROID) diff --git a/www/chromium/files/patch-weblayer_browser_content__browser__client__impl.cc b/www/chromium/files/patch-weblayer_browser_content__browser__client__impl.cc index 4b99c063e1e0..982777ace576 100644 --- a/www/chromium/files/patch-weblayer_browser_content__browser__client__impl.cc +++ b/www/chromium/files/patch-weblayer_browser_content__browser__client__impl.cc @@ -1,20 +1,20 @@ ---- weblayer/browser/content_browser_client_impl.cc.orig 2022-04-21 18:48:31 UTC +--- weblayer/browser/content_browser_client_impl.cc.orig 2022-06-17 14:20:10 UTC +++ weblayer/browser/content_browser_client_impl.cc -@@ -154,7 +154,7 @@ +@@ -156,7 +156,7 @@ // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "content/public/common/content_descriptors.h" #endif -@@ -1001,7 +1001,7 @@ SafeBrowsingService* ContentBrowserClientImpl::GetSafe +@@ -1002,7 +1002,7 @@ SafeBrowsingService* ContentBrowserClientImpl::GetSafe // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) void ContentBrowserClientImpl::GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id,