diff --git a/www/chromium/Makefile b/www/chromium/Makefile index 7a19a6cb98dd..105000c1e678 100644 --- a/www/chromium/Makefile +++ b/www/chromium/Makefile @@ -1,346 +1,345 @@ PORTNAME= chromium -PORTVERSION= 103.0.5060.134 +PORTVERSION= 104.0.5112.79 CATEGORIES= www wayland MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ https://nerd.hu/distfiles/:external DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ chrome-linux-${PORTVERSION}-llvm13.profdata${EXTRACT_SUFX}:external 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 iconv 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 \ icu_use_data_file=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-336e775eec536b2d785cc80eff6ac39051931286.tar.gz:external 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 icu 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 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 d449a092f418..69eec2095041 100644 --- a/www/chromium/distinfo +++ b/www/chromium/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1658300677 -SHA256 (chromium-103.0.5060.134.tar.xz) = e48a272481e41b1aae7aba71b55c41fe9e994cf71edd01c8ca1d0b604af0b571 -SIZE (chromium-103.0.5060.134.tar.xz) = 1488286096 -SHA256 (chrome-linux-103.0.5060.134-llvm13.profdata.tar.xz) = abac57f392bf42a68e94b9fcb90ac28e39e1019dccfbaf5ac5bf66210e24032c -SIZE (chrome-linux-103.0.5060.134-llvm13.profdata.tar.xz) = 24397884 -SHA256 (chromium-103.0.5060.134-testdata.tar.xz) = 8097abf4dd8e0bd3a9e293acf5e01ea379dcab9b4154bfa57817e8bbb47b0d59 -SIZE (chromium-103.0.5060.134-testdata.tar.xz) = 260891464 +TIMESTAMP = 1659422888 +SHA256 (chromium-104.0.5112.79.tar.xz) = 9cc662f1a84c796521ee17ed2808795ca937fe7f77bc605e788f0304a81dabf3 +SIZE (chromium-104.0.5112.79.tar.xz) = 1509100404 +SHA256 (chrome-linux-104.0.5112.79-llvm13.profdata.tar.xz) = d088e4540e6bf1a077e41e6a94ab7af3dd72cfdaad1f35737559a4570b0612b1 +SIZE (chrome-linux-104.0.5112.79-llvm13.profdata.tar.xz) = 24547748 +SHA256 (chromium-104.0.5112.79-testdata.tar.xz) = 9f54026ed796e66dcbaceb31be5408c510421a0c308ab890de8bc9237f2b837c +SIZE (chromium-104.0.5112.79-testdata.tar.xz) = 264005020 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 2ff3fd50744c..c6627a923546 100644 --- a/www/chromium/files/patch-BUILD.gn +++ b/www/chromium/files/patch-BUILD.gn @@ -1,80 +1,80 @@ ---- BUILD.gn.orig 2022-06-17 14:20:10 UTC +--- BUILD.gn.orig 2022-07-22 17:30:31 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", -@@ -447,7 +446,7 @@ group("gn_all") { +@@ -446,7 +445,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)" ] } -@@ -1167,7 +1175,7 @@ if (!is_ios) { +@@ -1184,7 +1192,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)" ] } -@@ -1176,7 +1184,7 @@ if (!is_ios) { +@@ -1193,7 +1201,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)" ] } -@@ -1580,7 +1588,7 @@ group("chromium_builder_perf") { +@@ -1592,7 +1600,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-apps_ui_views_app__window__frame__view.cc b/www/chromium/files/patch-apps_ui_views_app__window__frame__view.cc index 151948510862..2ac2dff2a8b1 100644 --- a/www/chromium/files/patch-apps_ui_views_app__window__frame__view.cc +++ b/www/chromium/files/patch-apps_ui_views_app__window__frame__view.cc @@ -1,11 +1,11 @@ ---- apps/ui/views/app_window_frame_view.cc.orig 2022-02-28 16:54:41 UTC +--- apps/ui/views/app_window_frame_view.cc.orig 2022-07-22 17:30:31 UTC +++ apps/ui/views/app_window_frame_view.cc -@@ -138,7 +138,7 @@ gfx::Rect AppWindowFrameView::GetWindowBoundsForClient +@@ -137,7 +137,7 @@ gfx::Rect AppWindowFrameView::GetWindowBoundsForClient gfx::Rect window_bounds = client_bounds; // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // Get the difference between the widget's client area bounds and window // bounds, and grow |window_bounds| by that amount. gfx::Insets native_frame_insets = diff --git a/www/chromium/files/patch-base_BUILD.gn b/www/chromium/files/patch-base_BUILD.gn index 61aca5553be5..e5a50d632c33 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-06-17 14:20:10 UTC +--- base/BUILD.gn.orig 2022-07-22 17:30:31 UTC +++ base/BUILD.gn -@@ -1004,7 +1004,7 @@ mixed_component("base") { +@@ -1001,7 +1001,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", -@@ -1015,6 +1015,12 @@ mixed_component("base") { + "profiler/stack_copier_signal.cc", + "profiler/stack_copier_signal.h", +@@ -1010,6 +1010,12 @@ mixed_component("base") { "profiler/thread_delegate_posix.h", ] } + + if (is_bsd) { + sources += [ + "profiler/stack_sampler_posix.cc", + ] + } } if (is_win) { @@ -1496,11 +1502,23 @@ mixed_component("base") { + # Needed for if using newer C++ library than sysroot, except if # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. - if (!use_sysroot && -- (is_android || ((is_linux || is_chromeos) && !is_chromecast)) && -+ (is_android || ((is_linux || is_chromeos) && !is_chromecast && !is_bsd)) && +- if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && ++ if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos && !is_bsd)) && host_toolchain != "//build/toolchain/cros:host") { libs += [ "atomic" ] } + # *BSD needs libkvm + if (is_bsd) { + libs += [ "kvm" ] + } + + if (is_freebsd) { + libs += [ + "execinfo", + "util", + ] + } + if (use_allocator_shim) { sources += [ "allocator/allocator_shim.cc", @@ -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", @@ -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) { +- if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) { ++ if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia || is_bsd) { defines += [ "SYSTEM_NATIVE_UTF8" ] } -@@ -2158,6 +2176,42 @@ mixed_component("base") { +@@ -2165,6 +2183,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 -= [ -@@ -3452,7 +3506,7 @@ test("base_unittests") { +@@ -3467,7 +3521,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", -@@ -3500,7 +3554,7 @@ test("base_unittests") { +@@ -3514,7 +3568,7 @@ test("base_unittests") { + "posix/file_descriptor_shuffle_unittest.cc", "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", -@@ -3511,7 +3565,7 @@ test("base_unittests") { + "profiler/thread_delegate_posix_unittest.cc", +@@ -3524,7 +3578,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) { +- if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) { ++ if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia || is_bsd) { defines += [ "SYSTEM_NATIVE_UTF8" ] } -@@ -3683,7 +3737,7 @@ test("base_unittests") { +@@ -3712,7 +3766,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_page__allocator.h b/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator.h index 57ceca3efe3a..160b0b69d02e 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator.h @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/page_allocator.h.orig 2022-02-28 16:54:41 UTC +--- base/allocator/partition_allocator/page_allocator.h.orig 2022-07-22 17:30:31 UTC +++ base/allocator/partition_allocator/page_allocator.h -@@ -194,7 +194,7 @@ BASE_EXPORT void DecommitAndZeroSystemPages(void* addr - // Whether decommitted memory is guaranteed to be zeroed when it is +@@ -206,7 +206,7 @@ void DecommitAndZeroSystemPages(void* address, size_t // recommitted. Do not assume that this will not change over time. - constexpr BASE_EXPORT bool DecommittedMemoryIsAlwaysZeroed() { + constexpr PA_COMPONENT_EXPORT( + PARTITION_ALLOC) bool DecommittedMemoryIsAlwaysZeroed() { -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) return false; #else return true; diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h b/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h index 483bda5e796f..d728f1cc8f28 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h @@ -1,16 +1,16 @@ ---- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2022-03-25 21:59:56 UTC +--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2022-07-22 17:30:31 UTC +++ base/allocator/partition_allocator/page_allocator_internals_posix.h -@@ -352,8 +352,12 @@ bool TryRecommitSystemPagesInternal( +@@ -347,8 +347,12 @@ bool TryRecommitSystemPagesInternal( void DiscardSystemPagesInternal(uintptr_t address, size_t length) { void* ptr = reinterpret_cast(address); -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) +#if BUILDFLAG(IS_BSD) + int ret = madvise(ptr, length, MADV_FREE); +#else int ret = madvise(ptr, length, MADV_FREE_REUSABLE); +#endif if (ret) { // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED. ret = madvise(ptr, length, MADV_DONTNEED); diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc b/www/chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc index 6b2c32c5ae86..ba8125fd0062 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc +++ b/www/chromium/files/patch-base_allocator_partition__allocator_partition__address__space.cc @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/partition_address_space.cc.orig 2022-05-19 14:06:27 UTC +--- base/allocator/partition_allocator/partition_address_space.cc.orig 2022-07-22 17:30:31 UTC +++ base/allocator/partition_allocator/partition_address_space.cc -@@ -184,7 +184,7 @@ void PartitionAddressSpace::UninitConfigurablePoolForT +@@ -234,7 +234,7 @@ void PartitionAddressSpace::UninitConfigurablePoolForT setup_.configurable_pool_ = 0; } -#if BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) PageCharacteristics page_characteristics; diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc index 024aa1e97b2c..5b35ab100616 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc +++ b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_rand__util__posix.cc @@ -1,13 +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.orig 2022-07-22 17:30:31 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; - } +@@ -86,6 +86,10 @@ void RandBytes(void* output, size_t output_length) { + if (getentropy(output, output_length) == 0) { + return; } +#elif BUILDFLAG(IS_BSD) + if (getentropy(output, output_length) == 0) { + return; + } #endif // If 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__base_threading_platform__thread__internal__posix.h b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__internal__posix.h new file mode 100644 index 000000000000..dfe57178caab --- /dev/null +++ b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__internal__posix.h @@ -0,0 +1,11 @@ +--- base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_internal_posix.h.orig 2022-07-22 17:30:31 UTC ++++ base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_internal_posix.h +@@ -10,7 +10,7 @@ + + namespace partition_alloc::internal::base::internal { + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + // Current thread id is cached in thread local storage for performance reasons. + // In some rare cases it's important to invalidate that cache explicitly (e.g. + // after going through clone() syscall which does not call pthread_atfork() diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__posix.cc b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__posix.cc new file mode 100644 index 000000000000..16c4bd4b3273 --- /dev/null +++ b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_threading_platform__thread__posix.cc @@ -0,0 +1,11 @@ +--- base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix.cc.orig 2022-07-22 17:30:31 UTC ++++ base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_posix.cc +@@ -17,7 +17,7 @@ + #include "base/allocator/partition_allocator/partition_alloc_base/threading/platform_thread_internal_posix.h" + #include "build/build_config.h" + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include + #include + #endif diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_time_time.cc b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_time_time.cc new file mode 100644 index 000000000000..aa3133e6ce8d --- /dev/null +++ b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__base_time_time.cc @@ -0,0 +1,11 @@ +--- base/allocator/partition_allocator/partition_alloc_base/time/time.cc.orig 2022-07-22 17:30:31 UTC ++++ base/allocator/partition_allocator/partition_alloc_base/time/time.cc +@@ -6,7 +6,7 @@ + + #include "build/build_config.h" + +-#if BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // time.h is a widely included header and its size impacts build time. + // Try not to raise this limit unless necessary. See + // https://chromium.googlesource.com/chromium/src/+/HEAD/docs/wmax_tokens.md diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h index ae70ea5b47aa..d6413d76da7e 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h +++ b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__config.h @@ -1,29 +1,29 @@ ---- base/allocator/partition_allocator/partition_alloc_config.h.orig 2022-05-19 14:06:27 UTC +--- base/allocator/partition_allocator/partition_alloc_config.h.orig 2022-07-22 17:30:31 UTC +++ base/allocator/partition_allocator/partition_alloc_config.h -@@ -66,7 +66,7 @@ static_assert(sizeof(void*) != 8, ""); +@@ -68,7 +68,7 @@ static_assert(sizeof(void*) != 8, ""); // POSIX is not only UNIX, e.g. macOS and other OSes. We do use Linux-specific // features such as futex(2). -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #define PA_HAS_LINUX_KERNEL #endif -@@ -186,7 +186,7 @@ constexpr bool kUseLazyCommit = false; +@@ -187,7 +187,7 @@ constexpr bool kUseLazyCommit = false; // On these platforms, lock all the partitions before fork(), and unlock after. // This may be required on more platforms in the future. -#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #define PA_HAS_ATFORK_HANDLER #endif -@@ -225,7 +225,7 @@ constexpr bool kUseLazyCommit = false; +@@ -227,7 +227,7 @@ constexpr bool kUseLazyCommit = false; // // Also enabled on ARM64 macOS, as the 16kiB pages on this platform lead to // larger slot spans. -#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) +#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD) #define PA_PREFER_SMALLER_SLOT_SPANS #endif // BUILDFLAG(IS_LINUX) 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 9bb71dd6268f..ea17eb2ddaca 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,20 @@ ---- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2022-06-17 14:20:10 UTC +--- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2022-07-22 17:30:31 UTC +++ base/allocator/partition_allocator/partition_alloc_constants.h -@@ -84,7 +84,7 @@ PartitionPageShift() { +@@ -96,7 +96,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 + PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t PartitionPageShift() { return PageAllocationGranularityShift() + 2; +@@ -252,7 +252,7 @@ constexpr size_t kSuperPageBaseMask = ~kSuperPageOffse + #if defined(PA_HAS_64_BITS_POINTERS) + // The Configurable Pool is only available in 64-bit mode + constexpr size_t kNumPools = 3; +-#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + // Special-case macOS. Contrary to other platforms, there is no sandbox limit + // there, meaning that a single renderer could "happily" consume >8GiB. So the + // 8GiB pool size is a regression. Make the limit higher on this platform only 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 70cba6b75bf8..a46d0c1a9f27 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-06-17 14:20:10 UTC +--- base/allocator/partition_allocator/partition_root.cc.orig 2022-07-22 17:30:31 UTC +++ base/allocator/partition_allocator/partition_root.cc -@@ -29,7 +29,7 @@ +@@ -33,7 +33,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() { +@@ -230,7 +230,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( +@@ -309,7 +309,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 -@@ -651,7 +651,7 @@ void PartitionRoot::Init(PartitionOptions +@@ -655,7 +655,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_allocator_partition__allocator_spinning__mutex.cc b/www/chromium/files/patch-base_allocator_partition__allocator_spinning__mutex.cc index fc3fa41f6937..4d89110c7401 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_spinning__mutex.cc +++ b/www/chromium/files/patch-base_allocator_partition__allocator_spinning__mutex.cc @@ -1,47 +1,47 @@ ---- base/allocator/partition_allocator/spinning_mutex.cc.orig 2022-04-21 18:48:31 UTC +--- base/allocator/partition_allocator/spinning_mutex.cc.orig 2022-07-22 17:30:31 UTC +++ base/allocator/partition_allocator/spinning_mutex.cc -@@ -17,7 +17,15 @@ +@@ -18,7 +18,15 @@ #if defined(PA_HAS_LINUX_KERNEL) #include +#if defined(OS_OPENBSD) +#include +#elif defined(OS_FREEBSD) +#include +#include +#include +#else #include +#endif #include #include #endif // defined(PA_HAS_LINUX_KERNEL) -@@ -116,8 +124,13 @@ void SpinningMutex::FutexWait() { +@@ -107,8 +115,13 @@ void SpinningMutex::FutexWait() { // |kLockedContended| anymore. Note that even without spurious wakeups, the // value of |state_| is not guaranteed when this returns, as another thread // may get the lock before we get to run. +#if defined(OS_FREEBSD) + int err = _umtx_op(&state_, UMTX_OP_WAIT_UINT_PRIVATE, + kLockedContended, nullptr, nullptr); +#else int err = syscall(SYS_futex, &state_, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, kLockedContended, nullptr, nullptr, 0); +#endif if (err) { // These are programming error, check them. -@@ -129,8 +142,14 @@ void SpinningMutex::FutexWait() { +@@ -120,8 +133,14 @@ void SpinningMutex::FutexWait() { void SpinningMutex::FutexWake() { int saved_errno = errno; +#if defined(OS_FREEBSD) + long retval = _umtx_op(&state_, UMTX_OP_WAKE_PRIVATE, + 1 /* wake up a single waiter */, nullptr, nullptr); +#else long retval = syscall(SYS_futex, &state_, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1 /* wake up a single waiter */, nullptr, nullptr, 0); +#endif + PA_CHECK(retval != -1); errno = saved_errno; } diff --git a/www/chromium/files/patch-base_files_file__util__posix.cc b/www/chromium/files/patch-base_files_file__util__posix.cc index d0148196ba56..5fafd41cb66a 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,55 @@ ---- base/files/file_util_posix.cc.orig 2022-06-17 14:20:10 UTC +--- base/files/file_util_posix.cc.orig 2022-07-22 17:30:31 UTC +++ base/files/file_util_posix.cc -@@ -696,32 +696,34 @@ bool CreateDirectoryAndGetError(const FilePath& full_p +@@ -696,32 +696,37 @@ 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; ++ if (DirectoryExists(full_path)) ++ return true; ++ // 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_i18n_icu__util.cc b/www/chromium/files/patch-base_i18n_icu__util.cc index f9fe06225de0..c14c06e1c33c 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-06-17 14:20:10 UTC +--- base/i18n/icu_util.cc.orig 2022-07-22 17:30:31 UTC +++ base/i18n/icu_util.cc -@@ -54,7 +54,7 @@ +@@ -53,7 +53,7 @@ + #include "third_party/icu/source/common/unicode/unistr.h" #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)) +-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || \ ++#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) || \ + BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) #include "third_party/icu/source/i18n/unicode/timezone.h" #endif -@@ -326,7 +326,7 @@ void InitializeIcuTimeZone() { +@@ -325,7 +325,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) +-#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) ++#elif BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS)) || BUILDFLAG(IS_BSD) // To respond to the time zone change properly, the default time zone // cache in ICU has to be populated on starting up. + // See TimeZoneMonitorLinux::NotifyClientsFromImpl(). diff --git a/www/chromium/files/patch-base_process_memory.cc b/www/chromium/files/patch-base_process_memory.cc index 13cd43d79b6c..4c75405fc8fb 100644 --- a/www/chromium/files/patch-base_process_memory.cc +++ b/www/chromium/files/patch-base_process_memory.cc @@ -1,20 +1,11 @@ ---- base/process/memory.cc.orig 2022-02-28 16:54:41 UTC +--- base/process/memory.cc.orig 2022-07-22 17:30:31 UTC +++ base/process/memory.cc -@@ -65,14 +65,16 @@ NOINLINE void OnNoMemoryInternal(size_t size) { - - } // namespace internal - -+#if !BUILDFLAG(IS_BSD) - void TerminateBecauseOutOfMemory(size_t size) { - internal::OnNoMemoryInternal(size); - } -+#endif - +@@ -29,7 +29,7 @@ namespace base { // Defined in memory_mac.mm for macOS + use_allocator="none". In case of // USE_PARTITION_ALLOC_AS_MALLOC, no need to route the call to the system // default calloc of macOS. -#if !BUILDFLAG(IS_APPLE) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) +#if (!BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) bool UncheckedCalloc(size_t num_items, size_t size, void** result) { const size_t alloc_size = num_items * size; diff --git a/www/chromium/files/patch-base_process_process__posix.cc b/www/chromium/files/patch-base_process_process__posix.cc index 5154b3028c57..4f9205302896 100644 --- a/www/chromium/files/patch-base_process_process__posix.cc +++ b/www/chromium/files/patch-base_process_process__posix.cc @@ -1,93 +1,93 @@ ---- base/process/process_posix.cc.orig 2022-05-19 14:06:27 UTC +--- base/process/process_posix.cc.orig 2022-07-22 17:30:31 UTC +++ base/process/process_posix.cc @@ -25,10 +25,15 @@ #include "build/build_config.h" #include "third_party/abseil-cpp/absl/types/optional.h" -#if BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include #endif +#if defined(OS_BSD) +#include +#include +#endif + #if BUILDFLAG(CLANG_PROFILING) #include "base/test/clang_profiling.h" #endif @@ -97,7 +102,7 @@ bool WaitpidWithTimeout(base::ProcessHandle handle, return ret_pid > 0; } -#if BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // Using kqueue on Mac so that we can wait on non-child processes. // We can't use kqueues on child processes because we need to reap // our own children using wait. @@ -202,7 +207,7 @@ bool WaitForExitWithTimeoutImpl(base::ProcessHandle ha const bool exited = (parent_pid < 0); if (!exited && parent_pid != our_pid) { -#if BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) // On Mac we can wait on non child processes. return WaitForSingleNonChildProcess(handle, timeout); #else -@@ -358,7 +363,55 @@ void Process::Exited(int exit_code) const {} +@@ -379,7 +384,55 @@ void Process::Exited(int exit_code) const { int Process::GetPriority() const { DCHECK(IsValid()); +// avoid pledge(2) violation +#if defined(OS_BSD) + return 0; +#else return getpriority(PRIO_PROCESS, process_); +#endif +} + +Time Process::CreationTime() const { +// avoid ps pledge in the network process +#if !defined(OS_BSD) + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid(), + sizeof(struct kinfo_proc), 0 }; + struct kinfo_proc *info = nullptr; + size_t info_size; +#endif + Time ct = Time(); + +#if !defined(OS_BSD) + if (sysctl(mib, std::size(mib), NULL, &info_size, NULL, 0) < 0) + goto out; + + mib[5] = (info_size / sizeof(struct kinfo_proc)); + if ((info = reinterpret_cast(malloc(info_size))) == NULL) + goto out; + + if (sysctl(mib, std::size(mib), info, &info_size, NULL, 0) < 0) + goto out; + + ct = Time::FromTimeT(info->p_ustart_sec); + +out: + if (info) + free(info); +#endif + return ct; +} + +bool Process::IsProcessBackgrounded() const { + return false; +} + +bool Process::SetProcessBackgrounded(bool value) { + return false; +} + +// static +bool Process::CanBackgroundProcesses() { + return false; } } // namespace base diff --git a/www/chromium/files/patch-base_process_process__unittest.cc b/www/chromium/files/patch-base_process_process__unittest.cc index 32da363685fc..7c23a1ea4882 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-06-17 14:20:10 UTC +--- base/process/process_unittest.cc.orig 2022-07-22 17:30:31 UTC +++ base/process/process_unittest.cc -@@ -139,7 +139,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) { +@@ -193,7 +193,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_rand__util__posix.cc b/www/chromium/files/patch-base_rand__util__posix.cc index 5e00097c8aa2..ce4eedbcb4ee 100644 --- a/www/chromium/files/patch-base_rand__util__posix.cc +++ b/www/chromium/files/patch-base_rand__util__posix.cc @@ -1,52 +1,52 @@ ---- base/rand_util_posix.cc.orig 2022-02-28 16:54:41 UTC +--- base/rand_util_posix.cc.orig 2022-07-22 17:30:31 UTC +++ base/rand_util_posix.cc @@ -17,7 +17,7 @@ #include "base/posix/eintr_wrapper.h" #include "build/build_config.h" -#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) #include "third_party/lss/linux_syscall_support.h" #elif BUILDFLAG(IS_MAC) // TODO(crbug.com/995996): Waiting for this header to appear in the iOS SDK. @@ -34,6 +34,7 @@ static constexpr int kOpenFlags = O_RDONLY; static constexpr int kOpenFlags = O_RDONLY | O_CLOEXEC; #endif +#if !BUILDFLAG(IS_OPENBSD) // We keep the file descriptor for /dev/urandom around so we don't need to // reopen it (which is expensive), and since we may not even be able to reopen // it if we are later put in a sandbox. This class wraps the file descriptor so @@ -51,6 +52,7 @@ class URandomFd { private: const int fd_; }; +#endif } // namespace @@ -62,6 +64,7 @@ namespace base { // (https://chromium-review.googlesource.com/c/chromium/src/+/1545096) and land // it or some form of it. void RandBytes(void* output, size_t output_length) { +#if !BUILDFLAG(IS_OPENBSD) #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL) // We have to call `getrandom` via Linux Syscall Support, rather than through // the libc wrapper, because we might not have an up-to-date libc (e.g. on -@@ -93,11 +96,16 @@ void RandBytes(void* output, size_t output_length) { +@@ -91,11 +94,16 @@ void RandBytes(void* output, size_t output_length) { const bool success = ReadFromFD(urandom_fd, static_cast(output), output_length); CHECK(success); +#else + arc4random_buf(static_cast(output), output_length); +#endif } +#if !BUILDFLAG(IS_OPENBSD) int GetUrandomFD() { static NoDestructor urandom_fd; return urandom_fd->fd(); } +#endif } // namespace base diff --git a/www/chromium/files/patch-base_strings_safe__sprintf__unittest.cc b/www/chromium/files/patch-base_strings_safe__sprintf__unittest.cc index f4353c3b265d..5752dc911ef0 100644 --- a/www/chromium/files/patch-base_strings_safe__sprintf__unittest.cc +++ b/www/chromium/files/patch-base_strings_safe__sprintf__unittest.cc @@ -1,18 +1,18 @@ ---- base/strings/safe_sprintf_unittest.cc.orig 2022-02-28 16:54:41 UTC +--- base/strings/safe_sprintf_unittest.cc.orig 2022-07-22 17:30:31 UTC +++ base/strings/safe_sprintf_unittest.cc -@@ -731,6 +731,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) { +@@ -732,6 +732,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) { #endif } +#if !BUILDFLAG(IS_BSD) TEST(SafeSPrintfTest, EmitNULL) { char buf[40]; #if defined(__GNUC__) -@@ -747,6 +748,7 @@ TEST(SafeSPrintfTest, EmitNULL) { +@@ -748,6 +749,7 @@ TEST(SafeSPrintfTest, EmitNULL) { #pragma GCC diagnostic pop #endif } +#endif TEST(SafeSPrintfTest, PointerSize) { // The internal data representation is a 64bit value, independent of the diff --git a/www/chromium/files/patch-base_threading_platform__thread.h b/www/chromium/files/patch-base_threading_platform__thread.h index 7829e5be4113..c871da786e1f 100644 --- a/www/chromium/files/patch-base_threading_platform__thread.h +++ b/www/chromium/files/patch-base_threading_platform__thread.h @@ -1,11 +1,11 @@ ---- base/threading/platform_thread.h.orig 2022-05-19 14:06:27 UTC +--- base/threading/platform_thread.h.orig 2022-07-22 17:30:31 UTC +++ base/threading/platform_thread.h -@@ -211,7 +211,7 @@ class BASE_EXPORT PlatformThread { +@@ -213,7 +213,7 @@ class BASE_EXPORT PlatformThread { // Returns a realtime period provided by `delegate`. static TimeDelta GetRealtimePeriod(Delegate* delegate); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Toggles a specific thread's priority at runtime. This can be used to // change the priority of a thread in a different process and will fail // if the calling process does not have proper permissions. The diff --git a/www/chromium/files/patch-build_config_compiler_BUILD.gn b/www/chromium/files/patch-build_config_compiler_BUILD.gn index aa5b6f12202c..50d9caf98660 100644 --- a/www/chromium/files/patch-build_config_compiler_BUILD.gn +++ b/www/chromium/files/patch-build_config_compiler_BUILD.gn @@ -1,119 +1,119 @@ ---- build/config/compiler/BUILD.gn.orig 2022-06-17 14:20:10 UTC +--- build/config/compiler/BUILD.gn.orig 2022-07-22 17:30:31 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 -@@ -903,7 +910,7 @@ config("compiler_cpu_abi") { +@@ -909,7 +916,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" ] } -@@ -917,7 +924,7 @@ config("compiler_cpu_abi") { +@@ -923,7 +930,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" ] } -@@ -1238,7 +1245,7 @@ config("compiler_deterministic") { +@@ -1244,7 +1251,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", -@@ -1529,12 +1536,12 @@ config("default_warnings") { +@@ -1535,12 +1542,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" ] } - 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 + # TODO(https://crbug.com/1322823): Remove flags once potential miscompile is investigated. cflags += [ -@@ -1719,7 +1726,7 @@ config("no_chromium_code") { +@@ -1724,7 +1731,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", -@@ -2233,7 +2240,7 @@ config("afdo_optimize_size") { +@@ -2238,7 +2245,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. -@@ -2249,7 +2256,7 @@ config("afdo") { +@@ -2254,7 +2261,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 ] } -@@ -2392,7 +2399,8 @@ config("symbols") { +@@ -2395,7 +2402,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_ozone.gni b/www/chromium/files/patch-build_config_ozone.gni index 26cc1361547f..c3d27e12d61f 100644 --- a/www/chromium/files/patch-build_config_ozone.gni +++ b/www/chromium/files/patch-build_config_ozone.gni @@ -1,19 +1,19 @@ ---- build/config/ozone.gni.orig 2022-03-31 09:33:37 UTC +--- build/config/ozone.gni.orig 2022-07-22 17:30:31 UTC +++ build/config/ozone.gni -@@ -91,7 +91,15 @@ declare_args() { +@@ -88,7 +88,15 @@ declare_args() { } else if (is_chromeos_lacros) { ozone_platform = "wayland" ozone_platform_wayland = true - } else if (is_linux) { + } else if (is_linux && !is_bsd) { + ozone_platform = "x11" + ozone_platform_wayland = true + ozone_platform_x11 = true + } else if (is_openbsd) { + ozone_platform = "x11" + ozone_platform_wayland = false + ozone_platform_x11 = true + } else if (is_freebsd) { ozone_platform = "x11" ozone_platform_wayland = true ozone_platform_x11 = true 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 3499a698d0af..951439da5219 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-06-17 14:20:10 UTC +--- chrome/app/app_management_strings.grdp.orig 2022-07-22 17:30:31 UTC +++ chrome/app/app_management_strings.grdp -@@ -174,7 +174,7 @@ +@@ -173,7 +173,7 @@ + You can open and edit supported files with this app from Finder or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. - -- -+ +- ++ You can open and edit supported files with this app from your file browser or other apps. To control which files open this app by default, <a href="#">learn how to set default apps on your device</a>. diff --git a/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc b/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc index e725615c2082..e9c8dd1d6baa 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-06-17 14:20:10 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/app/chrome_main_delegate.cc -@@ -117,7 +117,7 @@ - #include "chrome/app/chrome_crash_reporter_client.h" +@@ -125,7 +125,7 @@ + #include "components/about_ui/credit_utils.h" #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) #include "components/nacl/common/nacl_paths.h" #include "components/nacl/zygote/nacl_fork_delegate_linux.h" #endif -@@ -160,12 +160,12 @@ +@@ -168,12 +168,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 +@@ -320,7 +320,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 +@@ -406,7 +406,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_ +@@ -470,7 +470,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 +@@ -554,7 +554,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( -@@ -668,6 +668,8 @@ void ChromeMainDelegate::PostFieldTrialInitialization( +@@ -733,6 +733,8 @@ void ChromeMainDelegate::CommonEarlyInitialization() { // 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 -@@ -806,7 +808,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi +@@ -878,7 +880,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi } - // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch - // of lacros-chrome is complete. + // 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 -@@ -837,7 +839,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi +@@ -936,7 +938,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 -@@ -1163,7 +1165,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1316,7 +1318,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) -@@ -1233,7 +1235,7 @@ absl::variant Chrome + if (command_line.HasSwitch(switches::kPreCrashpadCrashTest)) { +@@ -1393,7 +1395,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_generated__resources.grd b/www/chromium/files/patch-chrome_app_generated__resources.grd index 809a54ddbe8e..5e9dce92b81b 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-06-17 14:20:10 UTC +--- chrome/app/generated_resources.grd.orig 2022-07-22 17:30:31 UTC +++ chrome/app/generated_resources.grd @@ -2,7 +2,7 @@ @@ -2989,7 +2989,7 @@ are declared in tools/grit/grit_rule.gni. - + Device Credentials -@@ -8669,7 +8669,7 @@ Check your passwords anytime in -- -+ +- ++ Use system title bar and borders -@@ -9823,7 +9823,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -9897,7 +9897,7 @@ Please help our engineers fix this problem. Tell us wh Set as default -- -+ +- ++ Minimize diff --git a/www/chromium/files/patch-chrome_app_settings__strings.grdp b/www/chromium/files/patch-chrome_app_settings__strings.grdp index 3aa6d8d7d939..ea16909c08e8 100644 --- a/www/chromium/files/patch-chrome_app_settings__strings.grdp +++ b/www/chromium/files/patch-chrome_app_settings__strings.grdp @@ -1,20 +1,20 @@ ---- chrome/app/settings_strings.grdp.orig 2022-05-19 14:06:27 UTC +--- chrome/app/settings_strings.grdp.orig 2022-07-22 17:30:31 UTC +++ chrome/app/settings_strings.grdp @@ -131,7 +131,7 @@ Theme -- -+ +- ++ GTK+ @@ -145,7 +145,7 @@ Use Classic - + Reset to default diff --git a/www/chromium/files/patch-chrome_browser_about__flags.cc b/www/chromium/files/patch-chrome_browser_about__flags.cc index c64416ccb5bb..49e45123da2f 100644 --- a/www/chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/chromium/files/patch-chrome_browser_about__flags.cc @@ -1,101 +1,101 @@ ---- chrome/browser/about_flags.cc.orig 2022-06-17 14:20:10 UTC +--- chrome/browser/about_flags.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/about_flags.cc -@@ -202,7 +202,7 @@ +@@ -203,7 +203,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 -@@ -275,7 +275,7 @@ +@@ -277,7 +277,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) -@@ -364,7 +364,7 @@ const FeatureEntry::Choice kUseAngleChoicesMac[] = { +@@ -366,7 +366,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 +@@ -1137,7 +1137,7 @@ const FeatureEntry::FeatureVariation }; #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"}, -@@ -3681,7 +3681,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(chromeos::kLacrosTtsSupport)}, +@@ -3841,7 +3841,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE(base::kOneGroupPerRenderer)}, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { "enable-accelerated-video-decode", flag_descriptions::kAcceleratedVideoDecodeName, -@@ -4283,7 +4283,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4449,7 +4449,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, MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, -@@ -4302,7 +4302,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4468,7 +4468,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, -@@ -4979,7 +4979,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5159,7 +5159,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, -@@ -6378,7 +6378,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -6582,7 +6582,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, -@@ -7251,7 +7251,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7495,7 +7495,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)}, -@@ -7547,7 +7547,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7803,7 +7803,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_after__startup__task__utils.cc b/www/chromium/files/patch-chrome_browser_after__startup__task__utils.cc index 8ca400175f0c..70b237a4f6d9 100644 --- a/www/chromium/files/patch-chrome_browser_after__startup__task__utils.cc +++ b/www/chromium/files/patch-chrome_browser_after__startup__task__utils.cc @@ -1,29 +1,11 @@ ---- chrome/browser/after_startup_task_utils.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/after_startup_task_utils.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/after_startup_task_utils.cc -@@ -25,7 +25,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/views/linux_ui/linux_ui.h" - #endif - -@@ -111,7 +111,7 @@ void SetBrowserStartupIsComplete() { +@@ -105,7 +105,7 @@ void SetBrowserStartupIsComplete() { g_startup_complete_flag.Get().Set(); #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Process::Current().CreationTime() is not available on all platforms. const base::Time process_creation_time = base::Process::Current().CreationTime(); -@@ -130,7 +130,7 @@ void SetBrowserStartupIsComplete() { - - // 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) - // Make sure we complete the startup notification sequence, or launchers will - // get confused by not receiving the expected message from the main process. - views::LinuxUI* linux_ui = views::LinuxUI::instance(); diff --git a/www/chromium/files/patch-chrome_browser_apps_platform__apps_api_music__manager__private_device__id__linux.cc b/www/chromium/files/patch-chrome_browser_apps_platform__apps_api_music__manager__private_device__id__linux.cc deleted file mode 100644 index 44576274c06e..000000000000 --- a/www/chromium/files/patch-chrome_browser_apps_platform__apps_api_music__manager__private_device__id__linux.cc +++ /dev/null @@ -1,71 +0,0 @@ ---- chrome/browser/apps/platform_apps/api/music_manager_private/device_id_linux.cc.orig 2022-04-21 18:48:31 UTC -+++ chrome/browser/apps/platform_apps/api/music_manager_private/device_id_linux.cc -@@ -4,6 +4,15 @@ - - #include "chrome/browser/apps/platform_apps/api/music_manager_private/device_id.h" - -+#include "build/build_config.h" -+ -+#if defined(OS_BSD) -+#include -+#include -+#include -+#include -+#endif -+ - #include - #include - #include -@@ -105,11 +114,33 @@ class MacAddressProcessor { - const char* const prefixes[], - size_t prefixes_count) { - const int MAC_LENGTH = 6; -+#if defined(OS_BSD) -+ struct ifaddrs *ifap, *ifinfo; -+#else - struct ifreq ifinfo; -+#endif - - memset(&ifinfo, 0, sizeof(ifinfo)); -- strncpy(ifinfo.ifr_name, ifaddr->ifa_name, sizeof(ifinfo.ifr_name) - 1); - -+#if defined(OS_BSD) -+ int result = getifaddrs(&ifap); -+ if (result != 0) -+ return true; -+ result = 1; // no MAC found yet -+ for (ifinfo = ifap; ifinfo != NULL; ifinfo = ifinfo->ifa_next) { -+ struct sockaddr* sa = ifinfo->ifa_addr; -+ if (sa->sa_family == AF_LINK && -+ !strncmp(ifinfo->ifa_name, ifaddr->ifa_name, -+ sizeof(ifinfo->ifa_name) - 1)) { -+ result = 0; -+ break; -+ } -+ } -+ -+ char mac_address[6]; -+ strncpy(mac_address, (const char*)LLADDR((struct sockaddr_dl*)ifinfo->ifa_addr), sizeof(mac_address)); -+#else -+ strncpy(ifinfo.ifr_name, ifaddr->ifa_name, sizeof(ifinfo.ifr_name) - 1); - int sd = socket(AF_INET, SOCK_DGRAM, 0); - int result = ioctl(sd, SIOCGIFHWADDR, &ifinfo); - close(sd); -@@ -119,11 +150,17 @@ class MacAddressProcessor { - - const char* mac_address = - static_cast(ifinfo.ifr_hwaddr.sa_data); -+#endif - if (!is_valid_mac_address_.Run(mac_address, MAC_LENGTH)) - return true; - -+#if defined(OS_BSD) -+ if (!IsValidPrefix(ifinfo->ifa_name, prefixes, prefixes_count)) -+ return true; -+#else - if (!IsValidPrefix(ifinfo.ifr_name, prefixes, prefixes_count)) - return true; -+#endif - - // Got one! - found_mac_address_ = diff --git a/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc b/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc index ce52b29e9679..6f088ee13b15 100644 --- a/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc +++ b/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/background/background_mode_manager.cc.orig 2022-04-21 18:48:31 UTC +--- chrome/browser/background/background_mode_manager.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/background/background_mode_manager.cc -@@ -900,7 +900,7 @@ gfx::ImageSkia GetStatusTrayIcon() { +@@ -894,7 +894,7 @@ gfx::ImageSkia GetStatusTrayIcon() { return gfx::ImageSkia(); return family->CreateExact(size).AsImageSkia(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( IDR_PRODUCT_LOGO_128); #elif BUILDFLAG(IS_MAC) diff --git a/www/chromium/files/patch-chrome_browser_browser__process__impl.cc b/www/chromium/files/patch-chrome_browser_browser__process__impl.cc index 74f8da11f951..07fe0677fcd3 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-06-17 14:20:10 UTC +--- chrome/browser/browser_process_impl.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/browser_process_impl.cc -@@ -208,7 +208,7 @@ +@@ -210,7 +210,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 -@@ -1153,7 +1153,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1166,7 +1166,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 -@@ -1405,7 +1405,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1418,7 +1418,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__resources.grd b/www/chromium/files/patch-chrome_browser_browser__resources.grd index 2e2aebe2dfa9..9b1896d38d86 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-06-17 14:20:10 UTC +--- chrome/browser/browser_resources.grd.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/browser_resources.grd -@@ -125,7 +125,7 @@ +@@ -124,7 +124,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 53c50bc0a333..03193cbce1e5 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-06-17 14:20:10 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -110,13 +110,13 @@ +@@ -111,13 +111,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 -@@ -183,7 +183,7 @@ +@@ -180,7 +180,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" -@@ -752,7 +752,7 @@ void PopulateChromeFrameBinders( +@@ -758,7 +758,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)); -@@ -760,7 +760,7 @@ void PopulateChromeFrameBinders( +@@ -766,7 +766,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( -@@ -815,14 +815,14 @@ void PopulateChromeWebUIFrameBinders( +@@ -821,14 +821,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 -@@ -1163,7 +1163,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1177,7 +1177,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 478d89ed72f3..6f586fa6e47c 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-06-17 14:20:10 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -231,11 +231,11 @@ +@@ -236,11 +236,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 -@@ -270,7 +270,7 @@ - +@@ -276,7 +276,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)) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" #include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h" -@@ -1019,7 +1019,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { + #include "chrome/browser/profiles/profile_activity_metrics_recorder.h" +@@ -1024,7 +1024,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 . -@@ -1032,7 +1032,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1037,7 +1037,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( -@@ -1053,7 +1053,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { - +@@ -1059,7 +1059,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)) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::Initialize(); + TouchModeStatsTracker::Initialize( 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 223119fd9585..37b58f44eb8d 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-06-17 14:20:10 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -381,7 +381,7 @@ +@@ -380,7 +380,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" -@@ -454,17 +454,17 @@ +@@ -456,17 +456,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" -@@ -472,12 +472,12 @@ +@@ -474,12 +474,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) -@@ -501,11 +501,11 @@ +@@ -503,11 +503,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" -@@ -892,7 +892,7 @@ blink::mojom::AutoplayPolicy GetAutoplayPolicyForWebCo +@@ -898,7 +898,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; -@@ -1410,7 +1410,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1418,7 +1418,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo #elif BUILDFLAG(IS_CHROMEOS_LACROS) main_parts = std::make_unique( is_integration_test, &startup_data_); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) main_parts = std::make_unique( is_integration_test, &startup_data_); #elif BUILDFLAG(IS_ANDROID) -@@ -1444,7 +1444,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1452,7 +1452,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 -@@ -1461,7 +1461,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1473,7 +1473,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()); -@@ -2230,6 +2230,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2242,6 +2242,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()) { -@@ -2547,7 +2549,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2557,7 +2559,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) && -@@ -3960,7 +3962,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -3971,7 +3973,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, -@@ -4371,14 +4373,14 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4398,14 +4400,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); -@@ -4411,7 +4413,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4438,7 +4440,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 fc1d0ff538ca..295332910843 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-06-17 14:20:10 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -420,7 +420,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -421,7 +421,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_defaults.cc b/www/chromium/files/patch-chrome_browser_defaults.cc index 95e8a8dd3414..d03a43578178 100644 --- a/www/chromium/files/patch-chrome_browser_defaults.cc +++ b/www/chromium/files/patch-chrome_browser_defaults.cc @@ -1,11 +1,11 @@ ---- chrome/browser/defaults.cc.orig 2022-03-25 21:59:56 UTC +--- chrome/browser/defaults.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/defaults.cc -@@ -48,7 +48,7 @@ const bool kSyncAutoStarts = true; +@@ -52,7 +52,7 @@ const bool kSyncAutoStarts = true; const bool kSyncAutoStarts = false; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const bool kScrollEventChangesTab = true; #else const bool kScrollEventChangesTab = false; 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 d41f7b1f7e2f..a9cf58e1eece 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-06-17 14:20:10 UTC +--- chrome/browser/dev_ui_browser_resources.grd.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/dev_ui_browser_resources.grd -@@ -41,7 +41,7 @@ This file specifies browser resources for developer-fa +@@ -39,7 +39,7 @@ This file specifies browser resources for developer-fa - + - + 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 6f6f53a1f27f..43b19db0fed8 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-06-17 14:20:10 UTC +--- chrome/browser/download/download_item_model.cc.orig 2022-07-28 04:43:52 UTC +++ chrome/browser/download/download_item_model.cc -@@ -671,7 +671,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -704,7 +704,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(); -@@ -711,7 +711,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand +@@ -744,7 +744,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_extensions_BUILD.gn b/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn index 737f36d6551e..c422c1a6d7ef 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-06-17 14:20:10 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1281,6 +1281,10 @@ static_library("extensions") { +@@ -1296,6 +1296,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_chrome__desktop__report__request__helper.cc b/www/chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc index 59e2bb1525d0..6ddb4b1c7de4 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_chrome__desktop__report__request__helper.cc @@ -1,29 +1,29 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc @@ -24,7 +24,7 @@ #include "base/win/registry.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/environment.h" #include "base/nix/xdg_util.h" #endif -@@ -208,7 +208,7 @@ base::FilePath GetEndpointVerificationDir() { +@@ -256,7 +256,7 @@ base::FilePath GetEndpointVerificationDir() { bool got_path = false; #if BUILDFLAG(IS_WIN) got_path = base::PathService::Get(base::DIR_LOCAL_APP_DATA, &path); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::unique_ptr env(base::Environment::Create()); path = base::nix::GetXDGDirectory(env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir); -@@ -219,7 +219,7 @@ base::FilePath GetEndpointVerificationDir() { +@@ -267,7 +267,7 @@ base::FilePath GetEndpointVerificationDir() { if (!got_path) return path; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) path = path.AppendASCII("google"); #else path = path.AppendASCII("Google"); 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 0f7b19fef295..505f6a6b3b18 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-06-17 14:20:10 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -187,7 +187,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -186,7 +186,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 -@@ -201,7 +201,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -200,7 +200,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_api_webrtc__logging__private_webrtc__logging__private__api.cc b/www/chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc index c70ae09c36a8..643e85fb5537 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc @@ -1,29 +1,29 @@ ---- chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc @@ -29,7 +29,7 @@ #include "extensions/browser/process_manager.h" #include "extensions/common/error_utils.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "extensions/common/permissions/permissions_data.h" #endif @@ -38,7 +38,7 @@ namespace { bool CanEnableAudioDebugRecordingsFromExtension( const extensions::Extension* extension) { bool enabled_by_permissions = false; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (extension) { enabled_by_permissions = extension->permissions_data()->active_permissions().HasAPIPermission( -@@ -579,7 +579,7 @@ void WebrtcLoggingPrivateStartEventLoggingFunction::Fi +@@ -580,7 +580,7 @@ void WebrtcLoggingPrivateStartEventLoggingFunction::Fi ExtensionFunction::ResponseAction WebrtcLoggingPrivateGetLogsDirectoryFunction::Run() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Unlike other WebrtcLoggingPrivate functions that take a RequestInfo object, // this function shouldn't be called by a component extension on behalf of // some web code. It returns a DirectoryEntry for use directly in the calling 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 62824e0b0fa3..38d3f2c79b14 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-06-17 14:20:10 UTC +--- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/extensions/browser_context_keyed_service_factories.cc -@@ -52,7 +52,7 @@ +@@ -53,7 +53,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 -@@ -131,7 +131,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() +@@ -132,7 +132,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() #endif extensions::SettingsPrivateEventRouterFactory::GetInstance(); extensions::SettingsOverridesAPI::GetFactoryInstance(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) extensions::SystemIndicatorManagerFactory::GetInstance(); #endif extensions::TabGroupsEventRouterFactory::GetInstance(); diff --git a/www/chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc b/www/chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc index ced8d597037c..f7956a996d22 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/external_provider_impl.cc.orig 2022-03-25 21:59:56 UTC +--- chrome/browser/extensions/external_provider_impl.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/extensions/external_provider_impl.cc -@@ -818,7 +818,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -821,7 +821,7 @@ void ExternalProviderImpl::CreateExternalProviders( if (!profile->GetPrefs()->GetBoolean(pref_names::kBlockExternalExtensions)) { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) provider_list->push_back(std::make_unique( service, base::MakeRefCounted( -@@ -846,7 +846,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -849,7 +849,7 @@ void ExternalProviderImpl::CreateExternalProviders( bundled_extension_creation_flags)); // Define a per-user source of external extensions. -#if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ +#if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) && \ BUILDFLAG(CHROMIUM_BRANDING)) provider_list->push_back(std::make_unique( service, diff --git a/www/chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc b/www/chromium/files/patch-chrome_browser_file__system__access_chrome__file__system__access__permission__context.cc index de4b90789eb5..b543e2d173fe 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-06-17 14:20:10 UTC +--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -219,7 +219,7 @@ const struct { +@@ -224,7 +224,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_flag__descriptions.cc b/www/chromium/files/patch-chrome_browser_flag__descriptions.cc index 05d76b6df0e6..5211293e72de 100644 --- a/www/chromium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/chromium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,47 +1,47 @@ ---- chrome/browser/flag_descriptions.cc.orig 2022-06-17 14:20:10 UTC +--- chrome/browser/flag_descriptions.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/flag_descriptions.cc -@@ -5709,7 +5709,7 @@ const char kSideSearchDSESupportDescription[] = +@@ -5867,7 +5867,7 @@ const char kSideSearchDSESupportDescription[] = // Random platform combinations ----------------------------------------------- #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)"; -@@ -5735,7 +5735,7 @@ const char kWebShareDescription[] = + const char kDesktopDetailedLanguageSettingsName[] = + "Detailed Language Settings (Desktop)"; +@@ -5888,7 +5888,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"; -@@ -5747,7 +5747,7 @@ const char kOzonePlatformHintDescription[] = +@@ -5900,7 +5900,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[] = -@@ -5760,7 +5760,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail +@@ -5913,7 +5913,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."; -@@ -5875,7 +5875,7 @@ const char kElasticOverscrollDescription[] = +@@ -6028,7 +6028,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 c562addb2caf..33cc38e7e4fd 100644 --- a/www/chromium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/chromium/files/patch-chrome_browser_flag__descriptions.h @@ -1,38 +1,38 @@ ---- chrome/browser/flag_descriptions.h.orig 2022-06-17 14:20:10 UTC +--- chrome/browser/flag_descriptions.h.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/flag_descriptions.h -@@ -3279,7 +3279,7 @@ extern const char kSideSearchDSESupportDescription[]; +@@ -3370,7 +3370,7 @@ extern const char kSideSearchDSESupportDescription[]; // Random platform combinations ----------------------------------------------- #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) - extern const char kDesktopRestructuredLanguageSettingsName[]; - extern const char kDesktopRestructuredLanguageSettingsDescription[]; -@@ -3298,7 +3298,7 @@ extern const char kWebShareName[]; + extern const char kDesktopDetailedLanguageSettingsName[]; + extern const char kDesktopDetailedLanguageSettingsDescription[]; +@@ -3386,7 +3386,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[]; -@@ -3314,7 +3314,7 @@ extern const char kForcePasswordInitialSyncWhenDecrypt +@@ -3402,7 +3402,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) -@@ -3395,7 +3395,7 @@ extern const char kElasticOverscrollDescription[]; +@@ -3483,7 +3483,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 336a741b996e..e715e8096493 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-06-17 14:20:10 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -60,8 +60,10 @@ +@@ -58,8 +58,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" -@@ -227,7 +229,7 @@ void RecordStartupMetrics() { +@@ -223,7 +225,7 @@ void RecordStartupMetrics() { // Record whether Chrome is the default browser or not. // Disabled on Linux due to hanging browser tests, see crbug.com/1216328. -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) shell_integration::DefaultWebClientState default_state = shell_integration::GetDefaultBrowser(); base::UmaHistogramEnumeration("DefaultBrowser.State", default_state, diff --git a/www/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 3b3454b1ab3c..72f274cf1064 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-06-17 14:20:10 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -787,7 +787,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -789,7 +789,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()); -@@ -876,7 +876,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -878,7 +878,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( -@@ -1055,7 +1055,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1057,7 +1057,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve #endif // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) // This creates the DesktopProfileSessionDurationsServices if it didn't exist // already. diff --git a/www/chromium/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc b/www/chromium/files/patch-chrome_browser_metrics_power_process__metrics__recorder__util.cc index d8d02e8bf313..167de82c10fa 100644 --- a/www/chromium/files/patch-chrome_browser_metrics_power_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/metrics/power/process_metrics_recorder_util.cc.orig 2022-06-17 14:20:10 UTC +--- chrome/browser/metrics/power/process_metrics_recorder_util.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/metrics/power/process_metrics_recorder_util.cc -@@ -41,7 +41,7 @@ void RecordProcessHistograms(const char* histogram_suf - kCPUUsageHistogramMax, kCPUUsageHistogramBucketCount); - #endif +@@ -59,7 +59,7 @@ void RecordProcessHistograms(const char* histogram_suf + const ProcessMonitor::Metrics& metrics) { + RecordAverageCPUUsage(histogram_suffix, metrics.cpu_usage); #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}), + base::StrCat({"PerformanceMonitor.IdleWakeups2.", histogram_suffix}), metrics.idle_wakeups); diff --git a/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc b/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc index 8ca94aafbb07..7e6199d7c063 100644 --- a/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc +++ b/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.cc @@ -1,20 +1,29 @@ ---- chrome/browser/metrics/power/process_monitor.cc.orig 2022-06-17 14:20:10 UTC +--- chrome/browser/metrics/power/process_monitor.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/metrics/power/process_monitor.cc -@@ -59,7 +59,7 @@ ProcessMonitor::Metrics SampleMetrics(base::ProcessMet - metrics.precise_cpu_usage = process_metrics.GetPreciseCPUUsage(); +@@ -64,7 +64,7 @@ ProcessMonitor::Metrics SampleMetrics(base::ProcessMet #endif + #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) metrics.idle_wakeups = process_metrics.GetIdleWakeupsPerSecond(); #endif #if BUILDFLAG(IS_MAC) -@@ -114,7 +114,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me +@@ -81,7 +81,7 @@ void ScaleMetrics(ProcessMonitor::Metrics* metrics, do + metrics->cpu_usage *= factor; + + #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ +- BUILDFLAG(IS_AIX) ++ BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) + metrics->idle_wakeups *= factor; #endif +@@ -130,7 +130,7 @@ ProcessMonitor::Metrics& operator+=(ProcessMonitor::Me + lhs.cpu_usage += rhs.cpu_usage; + #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) lhs.idle_wakeups += rhs.idle_wakeups; #endif diff --git a/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.h b/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.h index 5c14d103a0f9..0d2fcb7c1afe 100644 --- a/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.h +++ b/www/chromium/files/patch-chrome_browser_metrics_power_process__monitor.h @@ -1,11 +1,11 @@ ---- chrome/browser/metrics/power/process_monitor.h.orig 2022-06-17 14:20:10 UTC +--- chrome/browser/metrics/power/process_monitor.h.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/metrics/power/process_monitor.h -@@ -76,7 +76,7 @@ class ProcessMonitor : public content::BrowserChildPro - #endif +@@ -70,7 +70,7 @@ class ProcessMonitor : public content::BrowserChildPro + double cpu_usage = 0.0; #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) // Returns the number of average idle cpu wakeups per second since the last // time the metric was sampled. int idle_wakeups = 0; diff --git a/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.cc b/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.cc index 2c8698541206..ec676e11d6dc 100644 --- a/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.cc +++ b/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.cc @@ -1,38 +1,38 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/net/system_network_context_manager.cc -@@ -90,7 +90,7 @@ +@@ -91,7 +91,7 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/common/chrome_paths_internal.h" #include "chrome/grit/chromium_strings.h" #include "ui/base/l10n/l10n_util.h" -@@ -172,7 +172,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut +@@ -173,7 +173,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut auth_dynamic_params->basic_over_http_enabled = local_state->GetBoolean(prefs::kBasicAuthOverHttpEnabled); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) auth_dynamic_params->delegate_by_kdc_policy = local_state->GetBoolean(prefs::kAuthNegotiateDelegateByKdcPolicy); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -466,7 +466,7 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -474,7 +474,7 @@ SystemNetworkContextManager::SystemNetworkContextManag pref_change_registrar_.Add(prefs::kAllHttpAuthSchemesAllowedForOrigins, auth_pref_callback); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) pref_change_registrar_.Add(prefs::kAuthNegotiateDelegateByKdcPolicy, auth_pref_callback); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -533,7 +533,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -541,7 +541,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterStringPref(prefs::kAuthServerAllowlist, std::string()); registry->RegisterStringPref(prefs::kAuthNegotiateDelegateAllowlist, std::string()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kAuthNegotiateDelegateByKdcPolicy, false); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) diff --git a/www/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 a9763e11d754..243527ebcbe5 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-06-17 14:20:10 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -186,7 +186,7 @@ +@@ -188,7 +188,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 -@@ -1562,7 +1562,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1566,7 +1566,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 }, -@@ -1626,7 +1626,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1627,7 +1627,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 }, @@ -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) -@@ -2299,7 +2299,7 @@ std::unique_ptr BuildH +@@ -2300,7 +2300,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) || -@@ -2318,7 +2318,7 @@ std::unique_ptr BuildH +@@ -2319,7 +2319,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 75c4ed1a175b..fa298b162ad2 100644 --- a/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc +++ b/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -1,37 +1,37 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2022-06-17 14:20:10 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -434,14 +434,14 @@ +@@ -438,14 +438,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 -@@ -1177,7 +1177,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) +@@ -1221,7 +1221,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 -@@ -1492,7 +1492,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -1543,7 +1543,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__job__worker.cc b/www/chromium/files/patch-chrome_browser_printing_print__job__worker.cc index 7bcb6159f42c..66c0b9e4b39e 100644 --- a/www/chromium/files/patch-chrome_browser_printing_print__job__worker.cc +++ b/www/chromium/files/patch-chrome_browser_printing_print__job__worker.cc @@ -1,11 +1,11 @@ ---- chrome/browser/printing/print_job_worker.cc.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/printing/print_job_worker.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/printing/print_job_worker.cc -@@ -216,7 +216,7 @@ void PrintJobWorker::UpdatePrintSettings(base::Value:: +@@ -209,7 +209,7 @@ void PrintJobWorker::UpdatePrintSettings(base::Value:: crash_key = std::make_unique( print_backend->GetPrinterDriverInfo(printer_name)); -#if BUILDFLAG(IS_LINUX) && defined(USE_CUPS) +#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(USE_CUPS) PrinterBasicInfo basic_info; if (print_backend->GetPrinterBasicInfo(printer_name, &basic_info) == mojom::ResultCode::kSuccess) { diff --git a/www/chromium/files/patch-chrome_browser_process__singleton__posix.cc b/www/chromium/files/patch-chrome_browser_process__singleton__posix.cc index a9b497799e69..6eedca91938a 100644 --- a/www/chromium/files/patch-chrome_browser_process__singleton__posix.cc +++ b/www/chromium/files/patch-chrome_browser_process__singleton__posix.cc @@ -1,35 +1,20 @@ ---- chrome/browser/process_singleton_posix.cc.orig 2022-04-21 18:48:31 UTC +--- chrome/browser/process_singleton_posix.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/process_singleton_posix.cc -@@ -96,12 +96,12 @@ +@@ -96,7 +96,7 @@ #include "net/base/network_interfaces.h" #include "ui/base/l10n/l10n_util.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/process_singleton_dialog_linux.h" #endif - #if defined(TOOLKIT_VIEWS) && \ -- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) - #include "ui/views/linux_ui/linux_ui.h" - #endif - -@@ -355,7 +355,7 @@ bool DisplayProfileInUseError(const base::FilePath& lo +@@ -350,7 +350,7 @@ bool DisplayProfileInUseError(const base::FilePath& lo if (g_disable_prompt) return g_user_opted_unlock_in_use_profile; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) std::u16string relaunch_button_text = l10n_util::GetStringUTF16(IDS_PROFILE_IN_USE_LINUX_RELAUNCH); return ShowProcessSingletonDialog(error, relaunch_button_text); -@@ -924,7 +924,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::Notif - return PROCESS_NONE; - } else if (strncmp(buf, kACKToken, std::size(kACKToken) - 1) == 0) { - #if defined(TOOLKIT_VIEWS) && \ -- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) - // Likely NULL in unit tests. - views::LinuxUI* linux_ui = views::LinuxUI::instance(); - if (linux_ui) diff --git a/www/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 52c3aba74cf3..222f3898df6a 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-06-17 14:20:10 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -406,7 +406,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -414,7 +414,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 d066c4e0c6b5..df9ed9f6799f 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-06-17 14:20:10 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/profiles/profile_impl.cc @@ -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; -@@ -845,7 +849,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -847,7 +851,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 31386232e3d3..6eb8961c3863 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-06-17 14:20:10 UTC +--- chrome/browser/profiles/profiles_state.cc.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/profiles/profiles_state.cc -@@ -177,7 +177,7 @@ bool IsGuestModeRequested(const base::CommandLine& com +@@ -178,7 +178,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_sandbox__internals_sandbox__internals.ts b/www/chromium/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts new file mode 100644 index 000000000000..529bf50f38a8 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_resources_sandbox__internals_sandbox__internals.ts @@ -0,0 +1,29 @@ +--- chrome/browser/resources/sandbox_internals/sandbox_internals.ts.orig 2022-07-22 17:30:31 UTC ++++ chrome/browser/resources/sandbox_internals/sandbox_internals.ts +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + +-// ++// + import './strings.m.js'; + + import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; +@@ -121,7 +121,7 @@ function androidHandler() { + } + // + +-// ++// + + /** + * Adds a status row that reports either Yes or No. +@@ -182,7 +182,7 @@ document.addEventListener('DOMContentLoaded', () => { + // + androidHandler(); + // +- // ++ // + linuxHandler(); + // + }); diff --git a/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts b/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts index 503b3d11307a..60dba63415d0 100644 --- a/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts +++ b/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.ts @@ -1,20 +1,20 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.ts.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.ts.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.ts @@ -16,7 +16,7 @@ export interface AppearanceBrowserProxy { useDefaultTheme(): void; -- // -+ // +- // ++ // useSystemTheme(): void; // @@ -44,7 +44,7 @@ export class AppearanceBrowserProxyImpl implements App chrome.send('useDefaultTheme'); } -- // -+ // +- // ++ // useSystemTheme() { chrome.send('useSystemTheme'); } diff --git a/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html b/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html index 7990e1a34ff0..d407a2923519 100644 --- a/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html +++ b/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html @@ -1,29 +1,29 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2022-05-19 14:06:27 UTC +--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2022-07-22 17:30:31 UTC +++ chrome/browser/resources/settings/appearance_page/appearance_page.html @@ -27,7 +27,7 @@ -- -+ +- ++ -- -+ +- ++