diff --git a/www/chromium/Makefile b/www/chromium/Makefile index 51f600b6fcdb..d6b5e0e99493 100644 --- a/www/chromium/Makefile +++ b/www/chromium/Makefile @@ -1,353 +1,368 @@ PORTNAME= chromium -PORTVERSION= 113.0.5672.126 +PORTVERSION= 114.0.5735.90 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 WWW= https://www.chromium.org/Home LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi ONLY_FOR_ARCHS= aarch64 amd64 i386 BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ gperf:devel/gperf \ flock:sysutils/flock \ node:www/node \ xcb-proto>0:x11/xcb-proto \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} \ ${LOCALBASE}/include/va/va.h:multimedia/libva \ ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri \ ${LOCALBASE}/libdata/pkgconfig/Qt5Core.pc:devel/qt5-core \ ${LOCALBASE}/libdata/pkgconfig/Qt5Widgets.pc:x11-toolkits/qt5-widgets LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libepoll-shim.so:devel/libepoll-shim \ libevent.so:devel/libevent \ libffi.so:devel/libffi \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libdav1d.so:multimedia/dav1d \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic -USES= bison compiler:c++17-lang cpe desktop-file-utils gl gnome iconv:wchar_t jpeg \ - localbase:ldflags ninja perl5 pkgconfig python:3.7+,build qt:5 shebangfix \ - tar:xz xorg +USES= bison compiler:c++17-lang cpe desktop-file-utils gl gmake gnome \ + iconv:wchar_t jpeg localbase:ldflags ninja perl5 pkgconfig \ + python:3.7+,build qt:5 shebangfix tar:xz xorg CPE_VENDOR= google CPE_PRODUCT= chrome USE_GL= gbm gl USE_GNOME= atk dconf gdkpixbuf2 glib20 gtk30 libxml2 libxslt USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xorgproto xrandr xrender xscrnsaver xtst USE_QT= buildtools:build SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format MAKE_ARGS= -C out/${BUILDTYPE} ALL_TARGET= chrome BINARY_ALIAS= python3=${PYTHON_CMD} \ moc=${PREFIX}/bin/moc-qt5 # TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) # # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= clang_use_chrome_plugins=false \ enable_backup_ref_ptr_support=false \ enable_hangout_services_extension=true \ enable_nacl=false \ enable_remoting=false \ fatal_linker_warnings=false \ icu_use_data_file=false \ is_clang=true \ optimize_webui=true \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=false \ use_gnome_keyring=false \ use_lld=true \ use_partition_alloc=true \ use_partition_alloc_as_malloc=false \ use_sysroot=false \ use_system_freetype=false \ use_system_harfbuzz=true \ use_system_libffi=true \ use_system_libjpeg=true \ use_udev=false \ extra_cxxflags="${CXXFLAGS}" \ - extra_ldflags="${LDFLAGS}" + extra_ldflags="${LDFLAGS}" \ + ffmpeg_branding="${FFMPEG_BRAND}" # TODO: investigate building with these options: # use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles # FreeBSD Chromium Api Key # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . # Note: these are for FreeBSD use ONLY. For your own distribution, # please get your own set of keys. GN_ARGS+= google_api_key="AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8" SUB_FILES= chromium-browser.desktop chrome SUB_LIST+= COMMENT="${COMMENT}" OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS LTO 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 +CODECS_VARS= GN_ARGS+=proprietary_codecs=true \ + FFMPEG_BRAND="Chrome" +CODECS_VARS_OFF= GN_ARGS+=proprietary_codecs=false \ + FFMPEG_BRAND="Chromium" CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_BUILD_DEPENDS= esbuild:devel/esbuild DEBUG_VARS= BUILDTYPE=Debug \ GN_ARGS+=is_debug=true \ GN_ARGS+=is_component_build=false \ GN_ARGS+=symbol_level=1 \ GN_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="21 GB" DEBUG_VARS_OFF= BUILDTYPE=Release \ GN_ARGS+=blink_symbol_level=0 \ GN_ARGS+=is_debug=false \ GN_ARGS+=is_official_build=true \ GN_ARGS+=symbol_level=0 \ WANTSPACE="14 GB" DRIVER_MAKE_ARGS= chromedriver HEIMDAL_LIB_DEPENDS= libkrb.so.26:security/heimdal KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false LTO_VARS= GN_ARGS+=use_thin_lto=true \ GN_ARGS+=thin_lto_enable_optimizations=true \ WANTSPACE="14 GB" LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false MIT_LIB_DEPENDS= libkrb.so.3:security/krb5 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 # for COMPILER_VERSION .if ${PORT_OPTIONS:MHEIMDAL_BASE} && !exists(/usr/lib/libkrb5.so) IGNORE= you have selected HEIMDAL_BASE but do not have Heimdal installed in base .endif .if ${COMPILER_VERSION} < 150 LLVM_DEFAULT= 15 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 +# - swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only +# - map ffmpeg target to ${ARCH} .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " -.else +FFMPEG_TARGET= arm64 +.elif ${ARCH} == amd64 +BUILD_DEPENDS+= nasm:devel/nasm +PLIST_SUB+= NOT_AARCH64="" +FFMPEG_TARGET= x64 +.elif ${ARCH} == i386 +BUILD_DEPENDS+= nasm:devel/nasm PLIST_SUB+= NOT_AARCH64="" +FFMPEG_TARGET= ia32 .endif +FFMPEG_BDIR= ${WRKSRC}/third_party/ffmpeg/build.${FFMPEG_TARGET}.freebsd/${FFMPEG_BRAND} +FFMPEG_CDIR= ${WRKSRC}/third_party/ffmpeg/chromium/config/${FFMPEG_BRAND}/freebsd/${FFMPEG_TARGET} + # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "To build Chromium, you should have around 2GB of memory" @${ECHO_MSG} "and around ${WANTSPACE} of free disk space." @${ECHO_MSG} post-extract-TEST-on: @${MKDIR} ${WRKSRC}/third_party/test_fonts/test_fonts @${MV} ${WRKDIR}/test_fonts ${WRKSRC}/third_party/test_fonts/ pre-configure: # We used to remove bundled libraries to be sure that chromium uses # system libraries and not shipped ones. # cd ${WRKSRC} && ${PYTHON_CMD} \ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ ./build/linux/unbundle/replace_gn_files.py --system-libraries \ dav1d flac fontconfig freetype harfbuzz-ng icu libdrm libevent libpng \ libusb libwebp libxml libxslt openh264 opus snappy || ${FALSE} # Chromium uses an unreleased version of FFmpeg, so configure it -.for brand in Chrome Chromium - ${CP} -R \ - ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/linux/ \ - ${WRKSRC}/third_party/ffmpeg/chromium/config/${brand}/freebsd + cd ${WRKSRC}/third_party/ffmpeg && \ + ${PYTHON_CMD} chromium/scripts/build_ffmpeg.py freebsd ${FFMPEG_TARGET} \ + --config-only --branding=${FFMPEG_BRAND} + cd ${FFMPEG_BDIR} && ${GMAKE} ffversion.h + ${MKDIR} ${FFMPEG_CDIR} +.for _e in config.h config.asm config_components.h libavcodec libavformat libavutil + -${CP} -pR ${FFMPEG_BDIR}/${_e} ${FFMPEG_CDIR} .endfor do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd/bin/node # Setup buildtools/freebsd @${MKDIR} ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/buildtools/linux64/clang-format ${WRKSRC}/buildtools/freebsd ${LN} -sf ${WRKSRC}/out/${BUILDTYPE}/gn ${WRKSRC}/buildtools/freebsd ${LN} -sf /usr/bin/strip ${WRKSRC}/buildtools/freebsd/strip do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ ${STAGEDIR}${MANPREFIX}/man/man1/chrome.1 @${SED} -i "" -e 's,\@\@PACKAGE\@\@,chromium,g;s,\@\@MENUNAME\@\@,Chromium Web Browser,g' \ ${STAGEDIR}${MANPREFIX}/man/man1/chrome.1 ${CP} ${WRKSRC}/chrome/app/theme/chromium/product_logo_22_mono.png ${WRKSRC}/chrome/app/theme/chromium/product_logo_22.png .for s in 22 24 48 64 128 256 @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps ${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${s}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/chrome.png .endfor ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.png ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.pak ${STAGEDIR}${DATADIR} .for d in protoc mksnapshot ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor .for d in snapshot_blob.bin v8_context_snapshot.bin ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chrome \ ${STAGEDIR}${DATADIR} cd ${WRKSRC}/out/${BUILDTYPE} && \ ${COPYTREE_SHARE} "locales resources" ${STAGEDIR}${DATADIR} @${MKDIR} ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKDIR}/chromium-browser.desktop \ ${STAGEDIR}${DESKTOPDIR} ${INSTALL_SCRIPT} ${WRKDIR}/chrome ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/chrome/tools/build/linux/chrome-wrapper \ ${STAGEDIR}${DATADIR} # ANGLE, EGL, Vk .for f in libEGL.so libGLESv2.so libVkICD_mock_icd.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvulkan.so.1 \ ${STAGEDIR}${DATADIR}/libvulkan.so .if ${BUILDTYPE} == Debug ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libVkLayer_khronos_validation.so ${STAGEDIR}${DATADIR} .endif # SwiftShader .if ${ARCH} != aarch64 ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvk_swiftshader.so ${STAGEDIR}${DATADIR} .endif post-install-DEBUG-on: ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/*.so \ ${STAGEDIR}${DATADIR} ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/character_data_generator \ ${STAGEDIR}${DATADIR} post-install-DRIVER-on: ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver.unstripped \ ${STAGEDIR}${PREFIX}/bin/chromedriver do-test-TEST-on: .for t in ${TEST_TARGETS} cd ${WRKSRC}/out/${BUILDTYPE} && ${SETENV} LC_ALL=en_US.UTF-8 \ ./${t} --gtest_filter=-${EXCLUDE_${t}:ts:} || ${TRUE} .endfor .include diff --git a/www/chromium/distinfo b/www/chromium/distinfo index 3e8a5d67e451..7cb18604147f 100644 --- a/www/chromium/distinfo +++ b/www/chromium/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1684318714 -SHA256 (chromium-113.0.5672.126.tar.xz) = 0def7cd594304d7675821d42a4207377af98e321a78a91ee5200aea55adc2d93 -SIZE (chromium-113.0.5672.126.tar.xz) = 1556790928 -SHA256 (chrome-linux-113.0.5672.126-llvm13.profdata.tar.xz) = 401df2b0b0452bcb0841b52383a98649e15ad4f6baea47dc99e913a35ae40111 -SIZE (chrome-linux-113.0.5672.126-llvm13.profdata.tar.xz) = 27020448 -SHA256 (chromium-113.0.5672.126-testdata.tar.xz) = 89088e4cdc494ad5c468c7cf7e7ed26c4f76244d42ec74dac0ee141ead0fd6e6 -SIZE (chromium-113.0.5672.126-testdata.tar.xz) = 262980780 +TIMESTAMP = 1685521034 +SHA256 (chromium-114.0.5735.90.tar.xz) = 071a8620b6175923f91f0ce0e3a0b2b20bf350a7d1a0f5513c160df7c17526d8 +SIZE (chromium-114.0.5735.90.tar.xz) = 1570683592 +SHA256 (chrome-linux-114.0.5735.90-llvm13.profdata.tar.xz) = 2a7f6a89475266193420ba70c00858093d7cd3ed0eda2a34ded2f3a6006b1526 +SIZE (chrome-linux-114.0.5735.90-llvm13.profdata.tar.xz) = 27343652 +SHA256 (chromium-114.0.5735.90-testdata.tar.xz) = 9ce66f3d7b60e5f74d0f4e4290b1e159b3346e4afb85373c745ac44fc1d14994 +SIZE (chromium-114.0.5735.90-testdata.tar.xz) = 256217488 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 2eac54a44e3a..dafde345f6b8 100644 --- a/www/chromium/files/patch-BUILD.gn +++ b/www/chromium/files/patch-BUILD.gn @@ -1,89 +1,89 @@ ---- BUILD.gn.orig 2023-04-28 17:01:32 UTC +--- BUILD.gn.orig 2023-05-31 08:12:17 UTC +++ BUILD.gn -@@ -60,7 +60,7 @@ declare_args() { +@@ -61,7 +61,7 @@ declare_args() { root_extra_deps = [] } -if (is_official_build) { +if (is_official_build && !is_bsd) { # An official (maximally optimized!) component (optimized for build times) # build doesn't make sense and usually doesn't work. assert(!is_component_build) -@@ -85,7 +85,6 @@ group("gn_all") { - "//codelabs", - "//components:components_unittests", - "//components/gwp_asan:gwp_asan_unittests", -- "//infra/orchestrator:orchestrator_all", - "//net:net_unittests", - "//sandbox:sandbox_unittests", - "//services:services_unittests", -@@ -426,7 +425,7 @@ group("gn_all") { +@@ -95,7 +95,6 @@ group("gn_all") { + "//codelabs", + "//components:components_unittests", + "//components/gwp_asan:gwp_asan_unittests", +- "//infra/orchestrator:orchestrator_all", + "//net:net_unittests", + "//sandbox:sandbox_unittests", + "//services:services_unittests", +@@ -419,7 +418,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", -@@ -630,6 +629,15 @@ 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", +@@ -619,6 +618,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_bsd) { ++ deps -= [ ++ "//third_party/breakpad:dump_syms($host_toolchain)", ++ "//third_party/breakpad:microdump_stackwalk($host_toolchain)", ++ "//third_party/breakpad:minidump_dump($host_toolchain)", ++ "//third_party/breakpad:minidump_stackwalk($host_toolchain)", ++ ] ++ } + - if (is_mac) { - deps += [ - "//third_party/breakpad:dump_syms", -@@ -677,7 +685,7 @@ group("gn_all") { - host_os == "win") { - deps += [ "//chrome/test/mini_installer:mini_installer_tests" ] + if (is_mac) { + deps += [ + "//third_party/breakpad:dump_syms", +@@ -666,7 +674,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)" ] } -- } 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)" ] - } -@@ -1100,7 +1108,7 @@ if (!is_ios) { +@@ -1096,7 +1104,7 @@ if (!is_ios && !is_cronet_build) { ] } - if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) { + if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos && !is_bsd) { # WPT Webdriver tests runner # chrome/test/chromedriver/test/run_webdriver_tests.py script_test("webdriver_wpt_tests") { -@@ -1200,7 +1208,7 @@ if (!is_ios) { +@@ -1196,7 +1204,7 @@ if (!is_ios && !is_cronet_build) { data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ] } - if (!is_win && !is_android) { + if (!is_win && !is_android && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -1209,7 +1217,7 @@ if (!is_ios) { +@@ -1205,7 +1213,7 @@ if (!is_ios && !is_cronet_build) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } - if (is_linux || is_chromeos) { + if ((is_linux && !is_bsd) || is_chromeos) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1677,7 +1685,7 @@ group("chromium_builder_perf") { +@@ -1672,7 +1680,7 @@ group("chromium_builder_perf") { data_deps += [ "//chrome/test:performance_browser_tests" ] } - if (!is_win) { + if (!is_win && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } diff --git a/www/chromium/files/patch-ash_display_mirror__window__controller.cc b/www/chromium/files/patch-ash_display_mirror__window__controller.cc index d0bcf31e3bff..1246cfbe086e 100644 --- a/www/chromium/files/patch-ash_display_mirror__window__controller.cc +++ b/www/chromium/files/patch-ash_display_mirror__window__controller.cc @@ -1,14 +1,14 @@ ---- ash/display/mirror_window_controller.cc.orig 2022-10-24 13:33:33 UTC +--- ash/display/mirror_window_controller.cc.orig 2023-05-31 08:12:17 UTC +++ ash/display/mirror_window_controller.cc -@@ -295,7 +295,11 @@ void MirrorWindowController::UpdateWindow( +@@ -296,7 +296,11 @@ void MirrorWindowController::UpdateWindow( if (!base::Contains(display_info_list, iter->first, &display::ManagedDisplayInfo::id)) { CloseAndDeleteHost(iter->second, true); +#if defined(__llvm__) + mirroring_host_info_map_.erase(iter++); +#else iter = mirroring_host_info_map_.erase(iter); +#endif } else { ++iter; } diff --git a/www/chromium/files/patch-base_BUILD.gn b/www/chromium/files/patch-base_BUILD.gn index e4a7afebc72e..99581eac42b8 100644 --- a/www/chromium/files/patch-base_BUILD.gn +++ b/www/chromium/files/patch-base_BUILD.gn @@ -1,143 +1,143 @@ ---- base/BUILD.gn.orig 2023-04-28 17:01:32 UTC +--- base/BUILD.gn.orig 2023-05-31 08:12:17 UTC +++ base/BUILD.gn -@@ -198,7 +198,7 @@ buildflag_header("ios_cronet_buildflags") { +@@ -197,7 +197,7 @@ buildflag_header("ios_cronet_buildflags") { flags = [ "CRONET_BUILD=$is_cronet_build" ] } -enable_message_pump_epoll = is_linux || is_chromeos || is_android +enable_message_pump_epoll = (is_linux || is_chromeos || is_android) && !is_bsd buildflag_header("message_pump_buildflags") { header = "message_pump_buildflags.h" header_dir = "base/message_loop" -@@ -1105,11 +1105,23 @@ component("base") { +@@ -1100,11 +1100,23 @@ component("base") { # Needed for if using newer C++ library than sysroot, except if # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. - if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && + if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos && !is_bsd)) && host_toolchain != "//build/toolchain/cros:host") { libs += [ "atomic" ] } + # *BSD needs libkvm + if (is_bsd) { + libs += [ "kvm" ] + } + + if (is_freebsd) { + libs += [ + "execinfo", + "util", + ] + } + if (use_allocator_shim) { sources += [ "allocator/partition_allocator/shim/allocator_shim.cc", -@@ -1137,7 +1149,7 @@ component("base") { +@@ -1132,7 +1144,7 @@ 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/partition_allocator/shim/allocator_shim_override_cpp_symbols.h", "allocator/partition_allocator/shim/allocator_shim_override_glibc_weak_symbols.h", -@@ -1178,7 +1190,7 @@ component("base") { +@@ -1173,7 +1185,7 @@ component("base") { # Allow more direct string conversions on platforms with native utf8 # strings - if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) { + if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia || is_bsd) { defines += [ "SYSTEM_NATIVE_UTF8" ] } -@@ -2135,6 +2147,43 @@ component("base") { +@@ -2127,6 +2139,43 @@ component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_inotify.cc", + "files/scoped_file_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", + "profiler/stack_copier_signal.cc", + "profiler/stack_copier_signal.h", + "profiler/thread_delegate_posix.cc", + "profiler/thread_delegate_posix.h", + ] + sources += [ + "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 += [ -@@ -2244,7 +2293,7 @@ component("base") { +@@ -2236,7 +2285,7 @@ component("base") { } if (dep_libevent) { - deps += [ "//third_party/libevent" ] + public_deps += [ "//third_party/libevent" ] } if (use_libevent) { -@@ -3562,7 +3611,7 @@ test("base_unittests") { +@@ -3559,7 +3608,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", -@@ -3611,7 +3660,7 @@ test("base_unittests") { +@@ -3608,7 +3657,7 @@ test("base_unittests") { "posix/file_descriptor_shuffle_unittest.cc", "posix/unix_domain_socket_unittest.cc", ] - if (!is_nacl && !is_apple) { + if (!is_nacl && !is_apple && !is_bsd) { sources += [ "profiler/stack_base_address_posix_unittest.cc", "profiler/stack_copier_signal_unittest.cc", -@@ -3622,7 +3671,7 @@ test("base_unittests") { +@@ -3619,7 +3668,7 @@ test("base_unittests") { # Allow more direct string conversions on platforms with native utf8 # strings - if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia) { + if (is_apple || is_chromeos || is_castos || is_cast_android || is_fuchsia || is_bsd) { defines += [ "SYSTEM_NATIVE_UTF8" ] } -@@ -3848,7 +3897,7 @@ test("base_unittests") { +@@ -3843,7 +3892,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_dispatcher_tls.h b/www/chromium/files/patch-base_allocator_dispatcher_tls.h index 6613880dca00..51dd6a7b59fd 100644 --- a/www/chromium/files/patch-base_allocator_dispatcher_tls.h +++ b/www/chromium/files/patch-base_allocator_dispatcher_tls.h @@ -1,11 +1,11 @@ ---- base/allocator/dispatcher/tls.h.orig 2023-02-08 09:03:45 UTC +--- base/allocator/dispatcher/tls.h.orig 2023-05-31 08:12:17 UTC +++ base/allocator/dispatcher/tls.h -@@ -51,7 +51,7 @@ struct BASE_EXPORT MMapAllocator { +@@ -50,7 +50,7 @@ struct BASE_EXPORT MMapAllocator { partition_alloc::PartitionPageSize(); #elif BUILDFLAG(IS_APPLE) constexpr static size_t AllocationChunkSize = 16384; -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) constexpr static size_t AllocationChunkSize = 16384; #else constexpr static size_t AllocationChunkSize = 4096; 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 e67310662bc4..b4837778e5d5 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-11-30 08:12:58 UTC +--- base/allocator/partition_allocator/page_allocator.h.orig 2023-05-31 08:12:17 UTC +++ base/allocator/partition_allocator/page_allocator.h -@@ -231,7 +231,7 @@ void DecommitAndZeroSystemPages(void* address, size_t +@@ -238,7 +238,7 @@ void DecommitAndZeroSystemPages(void* address, size_t // recommitted. Do not assume that this will not change over time. constexpr PA_COMPONENT_EXPORT( PARTITION_ALLOC) bool DecommittedMemoryIsAlwaysZeroed() { -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) return false; #else return true; diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h b/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h index d423837a8b87..7896aa46cbda 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 2023-04-28 17:01:32 UTC +--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2023-05-31 08:12:17 UTC +++ base/allocator/partition_allocator/page_allocator_internals_posix.h -@@ -383,8 +383,12 @@ bool TryRecommitSystemPagesInternal( +@@ -387,8 +387,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__alloc.gni b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni index 67fdc47c1f1b..1d6b8c5f9d65 100644 --- a/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni +++ b/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc.gni @@ -1,11 +1,11 @@ ---- base/allocator/partition_allocator/partition_alloc.gni.orig 2023-04-28 17:01:32 UTC +--- base/allocator/partition_allocator/partition_alloc.gni.orig 2023-05-31 08:12:17 UTC +++ base/allocator/partition_allocator/partition_alloc.gni -@@ -285,7 +285,7 @@ assert(!use_asan_backup_ref_ptr || use_hookable_raw_pt +@@ -305,7 +305,7 @@ assert(!use_asan_backup_ref_ptr || use_hookable_raw_pt "AsanBackupRefPtr requires RawPtrHookableImpl") declare_args() { - enable_pkeys = is_linux && target_cpu == "x64" + enable_pkeys = (is_linux && !is_bsd) && target_cpu == "x64" } assert(!enable_pkeys || (is_linux && target_cpu == "x64"), "Pkeys are only supported on x64 linux") 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 0b3468df1b5e..62424268d4a0 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 2023-04-28 17:01:32 UTC +--- base/allocator/partition_allocator/partition_root.cc.orig 2023-05-31 08:12:17 UTC +++ base/allocator/partition_allocator/partition_root.cc -@@ -43,7 +43,7 @@ +@@ -46,7 +46,7 @@ #include "wow64apiset.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #endif -@@ -284,7 +284,7 @@ void PartitionAllocMallocInitOnce() { +@@ -287,7 +287,7 @@ void PartitionAllocMallocInitOnce() { return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // When fork() is called, only the current thread continues to execute in the // child process. If the lock is held, but *not* by this thread when fork() is // called, we have a deadlock. -@@ -378,7 +378,7 @@ static size_t PartitionPurgeSlotSpan( +@@ -381,7 +381,7 @@ static size_t PartitionPurgeSlotSpan( constexpr size_t kMaxSlotCount = (PartitionPageSize() * kMaxPartitionPagesPerRegularSlotSpan) / MinPurgeableSlotSize(); -#elif BUILDFLAG(IS_APPLE) || (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) +#elif BUILDFLAG(IS_APPLE) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)) // It's better for slot_usage to be stack-allocated and fixed-size, which // demands that its size be constexpr. On IS_APPLE and Linux on arm64, // PartitionPageSize() is always SystemPageSize() << 2, so regardless of -@@ -850,7 +850,7 @@ void PartitionRoot::Init(PartitionOptions +@@ -853,7 +853,7 @@ void PartitionRoot::Init(PartitionOptions // apple OSes. PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) || (internal::SystemPageSize() == (size_t{1} << 14))); -#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64) +#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64) // Check runtime pagesize. Though the code is currently the same, it is // not merged with the IS_APPLE case above as a 1 << 16 case needs to be // added here in the future, to allow 64 kiB pagesize. That is only diff --git a/www/chromium/files/patch-base_files_file__path__watcher__unittest.cc b/www/chromium/files/patch-base_files_file__path__watcher__unittest.cc index 00e9c1bd57b2..de8691c92fe6 100644 --- a/www/chromium/files/patch-base_files_file__path__watcher__unittest.cc +++ b/www/chromium/files/patch-base_files_file__path__watcher__unittest.cc @@ -1,29 +1,29 @@ ---- base/files/file_path_watcher_unittest.cc.orig 2023-02-08 09:03:45 UTC +--- base/files/file_path_watcher_unittest.cc.orig 2023-05-31 08:12:17 UTC +++ base/files/file_path_watcher_unittest.cc -@@ -521,7 +521,7 @@ TEST_F(FilePathWatcherTest, MAYBE_WatchDirectory) { +@@ -473,7 +473,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { VLOG(1) << "Waiting for file1 creation"; ASSERT_TRUE(WaitForEvent()); -#if !BUILDFLAG(IS_APPLE) +#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) // Mac implementation does not detect files modified in a directory. ASSERT_TRUE(WriteFile(file1, "content v2")); VLOG(1) << "Waiting for file1 modification"; -@@ -1345,7 +1345,7 @@ enum Permission { +@@ -1275,7 +1275,7 @@ enum Permission { Execute }; -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) bool ChangeFilePermissions(const FilePath& path, Permission perm, bool allow) { struct stat stat_buf; -@@ -1376,7 +1376,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi +@@ -1306,7 +1306,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi } #endif // BUILDFLAG(IS_APPLE) -#if BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD) // Linux implementation of FilePathWatcher doesn't catch attribute changes. // http://crbug.com/78043 // Windows implementation of FilePathWatcher catches attribute changes that diff --git a/www/chromium/files/patch-base_files_file__util__unittest.cc b/www/chromium/files/patch-base_files_file__util__unittest.cc index d5440ad2aba6..7c9e00b671a6 100644 --- a/www/chromium/files/patch-base_files_file__util__unittest.cc +++ b/www/chromium/files/patch-base_files_file__util__unittest.cc @@ -1,20 +1,20 @@ ---- base/files/file_util_unittest.cc.orig 2023-04-28 17:01:32 UTC +--- base/files/file_util_unittest.cc.orig 2023-05-31 08:12:17 UTC +++ base/files/file_util_unittest.cc -@@ -3853,7 +3853,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { +@@ -3871,7 +3871,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { } #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD) TEST_F(FileUtilTest, ReadFileToStringWithProcFileSystem) { FilePath file_path("/proc/cpuinfo"); std::string data = "temp"; -@@ -4576,7 +4576,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles +@@ -4594,7 +4594,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles NULL); #else size_t bytes_written = - ::write(::fileno(output_file.get()), content.c_str(), content.length()); + ::write(fileno(output_file.get()), content.c_str(), content.length()); #endif EXPECT_EQ(content.length(), bytes_written); ::fflush(output_file.get()); diff --git a/www/chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc b/www/chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc index ead3fe5472be..f6675773b436 100644 --- a/www/chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc +++ b/www/chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc @@ -1,21 +1,21 @@ ---- base/memory/madv_free_discardable_memory_posix.cc.orig 2022-05-19 14:06:27 UTC +--- base/memory/madv_free_discardable_memory_posix.cc.orig 2023-05-31 08:12:17 UTC +++ base/memory/madv_free_discardable_memory_posix.cc -@@ -295,6 +295,10 @@ void MadvFreeDiscardableMemoryPosix::SetKeepMemoryForT +@@ -306,6 +306,10 @@ void MadvFreeDiscardableMemoryPosix::SetKeepMemoryForT bool MadvFreeDiscardableMemoryPosix::IsResident() const { DFAKE_SCOPED_RECURSIVE_LOCK(thread_collision_warner_); +// XXX mincore +#if BUILDFLAG(IS_BSD) + return false; +#else #if BUILDFLAG(IS_APPLE) std::vector vec(allocated_pages_); #else -@@ -310,6 +314,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons +@@ -321,6 +325,7 @@ bool MadvFreeDiscardableMemoryPosix::IsResident() cons return false; } return true; +#endif } bool MadvFreeDiscardableMemoryPosix::IsDiscarded() const { diff --git a/www/chromium/files/patch-base_process_process__metrics.cc b/www/chromium/files/patch-base_process_process__metrics.cc index 85291ccdbdfd..e5b95631f50d 100644 --- a/www/chromium/files/patch-base_process_process__metrics.cc +++ b/www/chromium/files/patch-base_process_process__metrics.cc @@ -1,54 +1,54 @@ ---- base/process/process_metrics.cc.orig 2023-03-09 06:31:50 UTC +--- base/process/process_metrics.cc.orig 2023-05-31 08:12:17 UTC +++ base/process/process_metrics.cc @@ -17,7 +17,7 @@ namespace base { namespace { #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int CalculateEventsPerSecond(uint64_t event_count, uint64_t* last_event_count, base::TimeTicks* last_calculated) { @@ -54,7 +54,7 @@ SystemMetrics SystemMetrics::Sample() { SystemMetrics system_metrics; system_metrics.committed_memory_ = GetSystemCommitCharge(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) GetSystemMemoryInfo(&system_metrics.memory_info_); GetVmStatInfo(&system_metrics.vmstat_info_); GetSystemDiskInfo(&system_metrics.disk_info_); @@ -73,7 +73,7 @@ Value::Dict SystemMetrics::ToDict() const { Value::Dict res; res.Set("committed_memory", static_cast(committed_memory_)); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) Value::Dict meminfo = memory_info_.ToDict(); meminfo.Merge(vmstat_info_.ToDict()); res.Set("meminfo", std::move(meminfo)); -@@ -98,7 +98,6 @@ std::unique_ptr ProcessMetrics::Create +@@ -100,7 +100,6 @@ std::unique_ptr ProcessMetrics::Create #endif // !BUILDFLAG(IS_MAC) } -#if !BUILDFLAG(IS_FREEBSD) || !BUILDFLAG(IS_POSIX) double ProcessMetrics::GetPlatformIndependentCPUUsage( TimeDelta cumulative_cpu) { TimeTicks time = TimeTicks::Now(); -@@ -124,7 +123,6 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( +@@ -126,7 +125,6 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( double ProcessMetrics::GetPlatformIndependentCPUUsage() { return GetPlatformIndependentCPUUsage(GetCumulativeCPUUsage()); } -#endif #if BUILDFLAG(IS_WIN) double ProcessMetrics::GetPreciseCPUUsage(TimeDelta cumulative_cpu) { -@@ -155,7 +153,7 @@ double ProcessMetrics::GetPreciseCPUUsage() { +@@ -157,7 +155,7 @@ double ProcessMetrics::GetPreciseCPUUsage() { #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) int ProcessMetrics::CalculateIdleWakeupsPerSecond( uint64_t absolute_idle_wakeups) { return CalculateEventsPerSecond(absolute_idle_wakeups, diff --git a/www/chromium/files/patch-base_process_process__metrics__posix.cc b/www/chromium/files/patch-base_process_process__metrics__posix.cc index 9cd1a72c8e2a..278bd803c9f2 100644 --- a/www/chromium/files/patch-base_process_process__metrics__posix.cc +++ b/www/chromium/files/patch-base_process_process__metrics__posix.cc @@ -1,20 +1,20 @@ ---- base/process/process_metrics_posix.cc.orig 2022-08-31 12:19:35 UTC +--- base/process/process_metrics_posix.cc.orig 2023-05-31 08:12:17 UTC +++ base/process/process_metrics_posix.cc @@ -20,6 +20,8 @@ #if BUILDFLAG(IS_APPLE) #include +#elif BUILDFLAG(IS_OPENBSD) +#include #else #include #endif -@@ -135,7 +137,7 @@ size_t ProcessMetrics::GetMallocUsage() { +@@ -133,7 +135,7 @@ size_t ProcessMetrics::GetMallocUsage() { return stats.size_in_use; #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) return GetMallocUsageMallinfo(); -#elif BUILDFLAG(IS_FUCHSIA) +#elif BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. return 0; #endif diff --git a/www/chromium/files/patch-base_rand__util.h b/www/chromium/files/patch-base_rand__util.h index 63ac19b02681..f3cfae0331e7 100644 --- a/www/chromium/files/patch-base_rand__util.h +++ b/www/chromium/files/patch-base_rand__util.h @@ -1,11 +1,11 @@ ---- base/rand_util.h.orig 2022-11-30 08:12:58 UTC +--- base/rand_util.h.orig 2023-05-31 08:12:17 UTC +++ base/rand_util.h -@@ -117,7 +117,7 @@ void RandomShuffle(Itr first, Itr last) { +@@ -121,7 +121,7 @@ void RandomShuffle(Itr first, Itr last) { std::shuffle(first, last, RandomBitGenerator()); } -#if BUILDFLAG(IS_POSIX) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_BSD) BASE_EXPORT int GetUrandomFD(); #endif diff --git a/www/chromium/files/patch-base_system_sys__info.cc b/www/chromium/files/patch-base_system_sys__info.cc index f030b0307ea8..68ea0347c4d2 100644 --- a/www/chromium/files/patch-base_system_sys__info.cc +++ b/www/chromium/files/patch-base_system_sys__info.cc @@ -1,11 +1,11 @@ ---- base/system/sys_info.cc.orig 2023-03-09 06:31:50 UTC +--- base/system/sys_info.cc.orig 2023-05-31 08:12:17 UTC +++ base/system/sys_info.cc -@@ -106,7 +106,7 @@ std::string SysInfo::HardwareModelName() { +@@ -148,7 +148,7 @@ std::string SysInfo::HardwareModelName() { #endif void SysInfo::GetHardwareInfo(base::OnceCallback callback) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) constexpr base::TaskTraits kTraits = {base::MayBlock()}; #else constexpr base::TaskTraits kTraits = {}; diff --git a/www/chromium/files/patch-base_system_sys__info.h b/www/chromium/files/patch-base_system_sys__info.h index 2151241365a3..5c9937f693ca 100644 --- a/www/chromium/files/patch-base_system_sys__info.h +++ b/www/chromium/files/patch-base_system_sys__info.h @@ -1,20 +1,20 @@ ---- base/system/sys_info.h.orig 2023-02-08 09:03:45 UTC +--- base/system/sys_info.h.orig 2023-05-31 08:12:17 UTC +++ base/system/sys_info.h -@@ -246,6 +246,8 @@ class BASE_EXPORT SysInfo { +@@ -253,6 +253,8 @@ class BASE_EXPORT SysInfo { static void SetIsCpuSecurityMitigationsEnabled(bool is_enabled); #endif + static uint64_t MaxSharedMemorySize(); + private: FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory); FRIEND_TEST_ALL_PREFIXES(debug::SystemMetricsTest, ParseMeminfo); -@@ -257,7 +259,7 @@ class BASE_EXPORT SysInfo { +@@ -264,7 +266,7 @@ class BASE_EXPORT SysInfo { static HardwareInfo GetHardwareInfoSync(); #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_AIX) + BUILDFLAG(IS_AIX) || BUILDFLAG(IS_BSD) static uint64_t AmountOfAvailablePhysicalMemory( const SystemMemoryInfoKB& meminfo); #endif diff --git a/www/chromium/files/patch-base_test_launcher_test__launcher.cc b/www/chromium/files/patch-base_test_launcher_test__launcher.cc index 7b9cbd580612..6b0706a91793 100644 --- a/www/chromium/files/patch-base_test_launcher_test__launcher.cc +++ b/www/chromium/files/patch-base_test_launcher_test__launcher.cc @@ -1,10 +1,10 @@ ---- base/test/launcher/test_launcher.cc.orig 2023-03-09 06:31:50 UTC +--- base/test/launcher/test_launcher.cc.orig 2023-05-31 08:12:17 UTC +++ base/test/launcher/test_launcher.cc -@@ -67,6 +67,7 @@ +@@ -69,6 +69,7 @@ #include "third_party/libxml/chromium/libxml_utils.h" #if BUILDFLAG(IS_POSIX) +#include #include #include "base/files/file_descriptor_watcher_posix.h" diff --git a/www/chromium/files/patch-build_config_compiler_BUILD.gn b/www/chromium/files/patch-build_config_compiler_BUILD.gn index 14ce513d99fb..5c87ed247ad9 100644 --- a/www/chromium/files/patch-build_config_compiler_BUILD.gn +++ b/www/chromium/files/patch-build_config_compiler_BUILD.gn @@ -1,131 +1,140 @@ ---- build/config/compiler/BUILD.gn.orig 2023-04-28 17:01:32 UTC +--- build/config/compiler/BUILD.gn.orig 2023-05-31 08:12:17 UTC +++ build/config/compiler/BUILD.gn @@ -237,13 +237,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 --------------------------------------------------------------------- @@ -467,6 +470,10 @@ config("compiler") { } } + if (is_openbsd) { + ldflags += [ "-Wl,-z,wxneeded" ] + } + # Linux-specific compiler flags setup. # ------------------------------------ if (use_gold) { @@ -542,7 +549,7 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } - if (is_clang && !is_nacl && current_os != "zos") { + if (is_clang && !is_nacl && current_os != "zos" && !is_bsd) { cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] if (save_reproducers_on_lld_crash && use_lld) { ldflags += [ -@@ -816,7 +823,7 @@ config("compiler") { +@@ -727,7 +734,7 @@ config("compiler") { + + ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ] + +- if (!is_chromeos) { ++ if (!is_chromeos && !is_bsd) { + # TODO(https://crbug.com/972449): turn on for ChromeOS when that + # toolchain has this flag. + # We only use one version of LLVM within a build so there's no need to +@@ -825,7 +832,7 @@ config("compiler") { # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode # lldb doesn't have the needed changes yet. # TODO(crbug.com/1379070): Remove if the upstream default ever changes. - if (is_clang && !is_nacl && !is_win && !is_apple) { + if (is_clang && !is_nacl && !is_win && !is_apple && !is_bsd) { cflags_cc += [ "-gsimple-template-names" ] } -@@ -996,7 +1003,7 @@ config("compiler_cpu_abi") { +@@ -1005,7 +1012,7 @@ config("compiler_cpu_abi") { ] } } else if (current_cpu == "arm") { - if (is_clang && !is_android && !is_nacl && + if (is_clang && !is_android && !is_nacl && !is_bsd && !(is_chromeos_lacros && is_chromeos_device)) { cflags += [ "--target=arm-linux-gnueabihf" ] ldflags += [ "--target=arm-linux-gnueabihf" ] -@@ -1011,7 +1018,7 @@ config("compiler_cpu_abi") { +@@ -1020,7 +1027,7 @@ config("compiler_cpu_abi") { cflags += [ "-mtune=$arm_tune" ] } } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_nacl && !is_fuchsia && + if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd && !(is_chromeos_lacros && is_chromeos_device)) { cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] -@@ -1346,7 +1353,7 @@ config("compiler_deterministic") { +@@ -1355,7 +1362,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", -@@ -1398,7 +1405,7 @@ config("compiler_deterministic") { +@@ -1407,7 +1414,7 @@ config("compiler_deterministic") { } config("clang_revision") { - if (is_clang && clang_base_path == default_clang_base_path) { + if (is_clang && !is_bsd && clang_base_path == default_clang_base_path) { update_args = [ "--print-revision", "--verify-version=$clang_version", -@@ -1636,7 +1643,7 @@ config("default_warnings") { +@@ -1645,7 +1652,7 @@ config("default_warnings") { "-Wno-ignored-pragma-optimize", ] - if (!is_nacl) { + if (!is_nacl && !is_bsd) { cflags += [ # TODO(crbug.com/1343975) Evaluate and possibly enable. "-Wno-deprecated-builtins", -@@ -1827,7 +1834,7 @@ config("no_chromium_code") { +@@ -1836,7 +1843,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", -@@ -2337,7 +2344,7 @@ config("afdo_optimize_size") { +@@ -2346,7 +2353,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. -@@ -2356,7 +2363,7 @@ config("afdo") { +@@ -2365,7 +2372,7 @@ config("afdo") { } 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 ] } -@@ -2511,7 +2518,8 @@ config("symbols") { +@@ -2523,7 +2530,8 @@ config("symbols") { configs += [ "//build/config:compress_debug_sections" ] } - if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") { + if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos" && + !is_bsd) { if (is_apple) { # TODO(https://crbug.com/1050118): Investigate missing debug info on mac. # Make sure we don't use constructor homing on mac. diff --git a/www/chromium/files/patch-build_config_rust.gni b/www/chromium/files/patch-build_config_rust.gni index e52e75ceb868..19d053b81726 100644 --- a/www/chromium/files/patch-build_config_rust.gni +++ b/www/chromium/files/patch-build_config_rust.gni @@ -1,11 +1,11 @@ ---- build/config/rust.gni.orig 2023-04-28 17:01:32 UTC +--- build/config/rust.gni.orig 2023-05-31 08:12:17 UTC +++ build/config/rust.gni -@@ -157,7 +157,7 @@ if (enable_rust) { +@@ -170,7 +170,7 @@ if (enable_rust) { rust_sysroot = "//third_party/rust-toolchain" use_unverified_rust_toolchain = false } else { - if (host_os != "linux") { + if (host_os != "linux" && host_os != "openbsd" && host_os != "freebsd") { assert(false, "Attempt to use Android Rust toolchain on an unsupported platform") } diff --git a/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni b/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni index 53cbcfd600fc..9f88b28c852e 100644 --- a/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni +++ b/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni @@ -1,44 +1,44 @@ ---- build/toolchain/gcc_toolchain.gni.orig 2023-04-28 17:01:32 UTC +--- build/toolchain/gcc_toolchain.gni.orig 2023-05-31 08:12:17 UTC +++ build/toolchain/gcc_toolchain.gni @@ -53,6 +53,13 @@ if (enable_resource_allowlist_generation) { "enable_resource_allowlist_generation=true does not work for target_os=$target_os") } +declare_args() { + extra_cflags = "" + extra_cppflags = "" + extra_cxxflags = "" + extra_ldflags = "" +} + # This template defines a toolchain for something that works like gcc # (including clang). # -@@ -837,22 +844,12 @@ template("gcc_toolchain") { +@@ -859,22 +866,12 @@ template("gcc_toolchain") { # use_gold too. template("clang_toolchain") { gcc_toolchain(target_name) { - _path = "$clang_base_path/bin" - _is_path_absolute = get_path_info(_path, "abspath") == _path - - # Preserve absolute paths for tools like distcc. - if (_is_path_absolute && filter_include([ _path ], [ "//*" ]) == []) { - prefix = _path - } else { - prefix = rebase_path(_path, root_build_dir) - } - - cc = "${prefix}/clang" - cxx = "${prefix}/clang++" + cc = "cc" + cxx = "c++" ld = cxx - readelf = "${prefix}/llvm-readelf" - ar = "${prefix}/llvm-ar" - nm = "${prefix}/llvm-nm" + readelf = "readelf" + ar = "ar" + nm = "nm" forward_variables_from(invoker, [ diff --git a/www/chromium/files/patch-cc_BUILD.gn b/www/chromium/files/patch-cc_BUILD.gn index cf0f8bed2da7..017ab0893c61 100644 --- a/www/chromium/files/patch-cc_BUILD.gn +++ b/www/chromium/files/patch-cc_BUILD.gn @@ -1,19 +1,19 @@ ---- cc/BUILD.gn.orig 2023-04-28 17:01:32 UTC +--- cc/BUILD.gn.orig 2023-05-31 08:12:17 UTC +++ cc/BUILD.gn -@@ -664,7 +664,7 @@ cc_test_static_library("test_support") { +@@ -672,7 +672,7 @@ cc_test_static_library("test_support") { if (enable_vulkan) { deps += [ "//gpu/vulkan/init" ] } - if (!is_android) { + if (!is_android && !is_bsd) { data_deps = [ "//third_party/mesa_headers" ] } } -@@ -911,7 +911,6 @@ cc_test("cc_unittests") { +@@ -922,7 +922,6 @@ cc_test("cc_unittests") { data = [ "//components/test/data/viz/" ] data_deps = [ "//testing/buildbot/filters:cc_unittests_filters", - "//third_party/mesa_headers", ] if (is_android && enable_chrome_android_internal) { diff --git a/www/chromium/files/patch-chrome_app_app__management__strings.grdp b/www/chromium/files/patch-chrome_app_app__management__strings.grdp index 951439da5219..6c9bfa4a371a 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-07-22 17:30:31 UTC +--- chrome/app/app_management_strings.grdp.orig 2023-05-31 08:12:17 UTC +++ chrome/app/app_management_strings.grdp -@@ -173,7 +173,7 @@ +@@ -176,7 +176,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.cc b/www/chromium/files/patch-chrome_app_chrome__main.cc index 38eea00db206..b43e62b57bbd 100644 --- a/www/chromium/files/patch-chrome_app_chrome__main.cc +++ b/www/chromium/files/patch-chrome_app_chrome__main.cc @@ -1,34 +1,34 @@ ---- chrome/app/chrome_main.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/app/chrome_main.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/app/chrome_main.cc -@@ -28,11 +28,11 @@ +@@ -27,11 +27,11 @@ #include "chrome/app/notification_metrics.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/base_switches.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/app/chrome_main_linux.h" #endif -@@ -147,7 +147,7 @@ int ChromeMain(int argc, const char** argv) { +@@ -136,7 +136,7 @@ int ChromeMain(int argc, const char** argv) { SetUpBundleOverrides(); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) AppendExtraArgumentsToCommandLine(command_line); #endif -@@ -175,7 +175,7 @@ int ChromeMain(int argc, const char** argv) { +@@ -164,7 +164,7 @@ int ChromeMain(int argc, const char** argv) { headless::SetUpCommandLine(command_line); } else { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) if (headless::IsOldHeadlessMode()) { #if BUILDFLAG(GOOGLE_CHROME_BRANDING) command_line->AppendSwitch(::headless::switches::kEnableCrashReporter); diff --git a/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc b/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc index 4a76c4bdcb91..59734c00d37e 100644 --- a/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc +++ b/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc @@ -1,112 +1,112 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/app/chrome_main_delegate.cc -@@ -135,7 +135,7 @@ +@@ -137,7 +137,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 -@@ -179,16 +179,16 @@ +@@ -182,16 +182,16 @@ #include "v8/include/v8.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/environment.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "base/message_loop/message_pump_libevent.h" #endif #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \ - BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "chrome/browser/policy/policy_path_parser.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -323,7 +323,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -327,7 +327,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 -@@ -408,7 +408,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -412,7 +412,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) || -@@ -522,7 +522,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -526,7 +526,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. -@@ -611,7 +611,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat +@@ -615,7 +615,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( -@@ -941,7 +941,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { +@@ -956,7 +956,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() { base::InitializeCpuReductionExperiment(); base::sequence_manager::internal::SequenceManagerImpl::InitializeFeatures(); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) base::MessagePumpLibevent::InitializeFeatures(); #elif BUILDFLAG(IS_MAC) base::PlatformThread::InitFeaturesPostFieldTrial(); -@@ -1080,7 +1080,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1094,7 +1094,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo // TODO(crbug.com/1052397): Revisit the macro expression once build flag // switch of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) // This will directly exit if the user asked for help. HandleHelpSwitches(command_line); #endif -@@ -1110,7 +1110,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo +@@ -1124,7 +1124,7 @@ absl::optional ChromeMainDelegate::BasicStartupCo #if BUILDFLAG(IS_CHROMEOS) chromeos::dbus_paths::RegisterPathProvider(); #endif -#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) +#if BUILDFLAG(ENABLE_NACL) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)) nacl::RegisterPathProvider(); #endif -@@ -1484,7 +1484,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1498,7 +1498,7 @@ void ChromeMainDelegate::PreSandboxStartup() { CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; } -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_BSD) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess) { if (command_line.HasSwitch(switches::kPreCrashpadCrashTest)) { -@@ -1586,7 +1586,7 @@ absl::variant Chrome +@@ -1600,7 +1600,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 a57daeea1297..07888c60362a 100644 --- a/www/chromium/files/patch-chrome_app_generated__resources.grd +++ b/www/chromium/files/patch-chrome_app_generated__resources.grd @@ -1,74 +1,74 @@ ---- chrome/app/generated_resources.grd.orig 2023-04-28 17:01:32 UTC +--- chrome/app/generated_resources.grd.orig 2023-05-31 08:12:17 UTC +++ chrome/app/generated_resources.grd @@ -2,7 +2,7 @@ -@@ -3219,7 +3219,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -3258,7 +3258,7 @@ are declared in tools/grit/grit_rule.gni. - + Device Credentials -@@ -4974,7 +4974,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -5007,7 +5007,7 @@ are declared in tools/grit/grit_rule.gni. Read information about your browser, OS, device, installed software, registry values and files - + Read information about your browser, OS, device, installed software and files -@@ -5644,7 +5644,7 @@ Keep your key file in a safe place. You will need it t +@@ -5689,7 +5689,7 @@ Keep your key file in a safe place. You will need it t Old versions of Chrome Apps won't open on Windows devices after December 2022. Contact your administrator to update to a new version or remove this app. - + Old versions of Chrome Apps won't open on Linux devices after December 2022. Contact your administrator to update to a new version or remove this app. -@@ -5690,7 +5690,7 @@ Keep your key file in a safe place. You will need it t +@@ -5735,7 +5735,7 @@ Keep your key file in a safe place. You will need it t Old versions of Chrome apps won't open on Windows devices after December 2022. You can check if there's a new version available. - + Old versions of Chrome apps won't open on Linux devices after December 2022. You can check if there's a new version available. -@@ -9707,7 +9707,7 @@ Check your passwords anytime in - + Use system title bar and borders -@@ -11048,7 +11048,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -11182,7 +11182,7 @@ Please help our engineers fix this problem. Tell us wh Set as default - + Minimize -@@ -13184,7 +13184,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -13324,7 +13324,7 @@ Please help our engineers fix this problem. Tell us wh Open Anyway - + System Signals Utilities diff --git a/www/chromium/files/patch-chrome_app_profiles__strings.grdp b/www/chromium/files/patch-chrome_app_profiles__strings.grdp index cf95a34a489e..d7816ca6c466 100644 --- a/www/chromium/files/patch-chrome_app_profiles__strings.grdp +++ b/www/chromium/files/patch-chrome_app_profiles__strings.grdp @@ -1,11 +1,11 @@ ---- chrome/app/profiles_strings.grdp.orig 2022-02-07 13:39:41 UTC +--- chrome/app/profiles_strings.grdp.orig 2023-05-31 08:12:17 UTC +++ chrome/app/profiles_strings.grdp -@@ -66,7 +66,7 @@ +@@ -60,7 +60,7 @@ Add Profile... - + Add profile... diff --git a/www/chromium/files/patch-chrome_app_settings__strings.grdp b/www/chromium/files/patch-chrome_app_settings__strings.grdp index 60ce67608cbc..ff3753e3770a 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 2023-04-05 11:05:06 UTC +--- chrome/app/settings_strings.grdp.orig 2023-05-31 08:12:17 UTC +++ chrome/app/settings_strings.grdp -@@ -166,7 +166,7 @@ +@@ -202,7 +202,7 @@ Theme - + GTK -@@ -186,7 +186,7 @@ +@@ -222,7 +222,7 @@ Use Classic - + Reset to default diff --git a/www/chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd b/www/chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd index 8172123c8583..5ccb10f413a5 100644 --- a/www/chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd +++ b/www/chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd @@ -1,29 +1,29 @@ ---- chrome/app/theme/chrome_unscaled_resources.grd.orig 2023-04-05 11:05:06 UTC +--- chrome/app/theme/chrome_unscaled_resources.grd.orig 2023-05-31 08:12:17 UTC +++ chrome/app/theme/chrome_unscaled_resources.grd @@ -16,7 +16,7 @@ - + -@@ -63,7 +63,7 @@ +@@ -67,7 +67,7 @@ - + -@@ -77,7 +77,7 @@ +@@ -81,7 +81,7 @@ - + diff --git a/www/chromium/files/patch-chrome_browser_about__flags.cc b/www/chromium/files/patch-chrome_browser_about__flags.cc index 24145d4d74f3..ae690a53f3f0 100644 --- a/www/chromium/files/patch-chrome_browser_about__flags.cc +++ b/www/chromium/files/patch-chrome_browser_about__flags.cc @@ -1,126 +1,144 @@ ---- chrome/browser/about_flags.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/about_flags.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/about_flags.cc -@@ -220,7 +220,7 @@ +@@ -221,7 +221,7 @@ #include "ui/ui_features.h" #include "url/url_features.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "base/allocator/buildflags.h" #endif -@@ -312,7 +312,7 @@ +@@ -314,7 +314,7 @@ #include "device/vr/public/cpp/features.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "ui/ozone/buildflags.h" #include "ui/ozone/public/ozone_switches.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) -@@ -418,7 +418,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap +@@ -420,7 +420,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap {"Max 3 Frames", &kDXGIWaitableSwapChain3Frames, 1, nullptr}}; #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const FeatureEntry::Choice kOzonePlatformHintRuntimeChoices[] = { {flag_descriptions::kOzonePlatformHintChoiceDefault, "", ""}, {flag_descriptions::kOzonePlatformHintChoiceAuto, -@@ -1447,7 +1447,7 @@ const FeatureEntry::FeatureVariation kLocalWebApproval - #endif +@@ -1447,7 +1447,7 @@ const FeatureEntry::FeatureVariation kChromeRefresh202 + std::size(kChromeRefresh2023Level1), nullptr}}; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const FeatureEntry::FeatureParam kOmniboxDocumentProviderCapLowQualitySuggestionsTo1[] = { {"DocumentProviderMaxLowQualitySuggestions", "1"}, -@@ -4637,13 +4637,13 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4749,13 +4749,13 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kWebShare)}, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName, flag_descriptions::kOzonePlatformHintDescription, kOsLinux, MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)}, #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) {"skip-undecryptable-passwords", flag_descriptions::kSkipUndecryptablePasswordsName, flag_descriptions::kSkipUndecryptablePasswordsDescription, -@@ -4917,7 +4917,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5032,7 +5032,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(feed::kDiscoFeedEndpoint)}, #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) {"following-feed-sidepanel", flag_descriptions::kFollowingFeedSidepanelName, flag_descriptions::kFollowingFeedSidepanelDescription, kOsDesktop, FEATURE_VALUE_TYPE(feed::kWebUiFeed)}, -@@ -5537,7 +5537,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -5679,7 +5679,7 @@ const FeatureEntry kFeatureEntries[] = { kOsAll, FEATURE_VALUE_TYPE(omnibox::kUseExistingAutocompleteClient)}, #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, -@@ -6252,7 +6252,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kPointerLockOptionsDescription, kOsDesktop, - FEATURE_VALUE_TYPE(features::kPointerLockOptions)}, +@@ -6463,7 +6463,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kParallelDownloadingDescription, kOsAll, + FEATURE_VALUE_TYPE(download::features::kParallelDownloading)}, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) {"enable-async-dns", flag_descriptions::kAsyncDnsName, flag_descriptions::kAsyncDnsDescription, kOsWin | kOsLinux, FEATURE_VALUE_TYPE(features::kAsyncDns)}, -@@ -7145,7 +7145,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -7336,7 +7336,7 @@ const FeatureEntry kFeatureEntries[] = { #endif // BUILDFLAG(IS_CHROMEOS) #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, -@@ -7883,7 +7883,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8111,7 +8111,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)}, -@@ -8108,7 +8108,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8356,7 +8356,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(ash::features::kWallpaperPerDesk)}, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - {"enable-get-display-media-set", flag_descriptions::kGetDisplayMediaSetName, - flag_descriptions::kGetDisplayMediaSetDescription, + {"enable-get-all-screens-media", flag_descriptions::kGetAllScreensMediaName, + flag_descriptions::kGetAllScreensMediaDescription, kOsCrOS | kOsLacros | kOsLinux, -@@ -8169,7 +8169,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8417,7 +8417,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, -@@ -8722,7 +8722,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -8994,7 +8994,7 @@ const FeatureEntry kFeatureEntries[] = { #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) {"document-picture-in-picture-api", flag_descriptions::kDocumentPictureInPictureApiName, flag_descriptions::kDocumentPictureInPictureApiDescription, +@@ -9692,7 +9692,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kWebUIOmniboxPopupDescription, kOsDesktop, + FEATURE_VALUE_TYPE(omnibox::kWebUIOmniboxPopup)}, + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + {"webui-system-font", flag_descriptions::kWebUiSystemFontName, + flag_descriptions::kWebUiSystemFontDescription, kOsAll, + FEATURE_VALUE_TYPE(features::kWebUiSystemFont)}, +@@ -9893,7 +9893,7 @@ const FeatureEntry kFeatureEntries[] = { + #endif + + #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + {"data-retention-policies-disable-sync-types-needed", + flag_descriptions::kDataRetentionPoliciesDisableSyncTypesNeededName, + flag_descriptions::kDataRetentionPoliciesDisableSyncTypesNeededDescription, diff --git a/www/chromium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc b/www/chromium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc new file mode 100644 index 000000000000..abef5d273c00 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_apps_app__service_publishers_extension__apps.cc @@ -0,0 +1,11 @@ +--- chrome/browser/apps/app_service/publishers/extension_apps.cc.orig 2023-05-31 08:12:17 UTC ++++ chrome/browser/apps/app_service/publishers/extension_apps.cc +@@ -25,7 +25,7 @@ ExtensionApps::~ExtensionApps() = default; + + bool ExtensionApps::Accepts(const extensions::Extension* extension) { + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) + if (extensions::IsExtensionUnsupportedDeprecatedApp(profile(), + extension->id())) { + return false; diff --git a/www/chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc b/www/chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc index cd6ccf427c25..5b2bbff3d527 100644 --- a/www/chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc +++ b/www/chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.cc @@ -1,20 +1,20 @@ ---- chrome/browser/apps/platform_apps/platform_app_launch.cc.orig 2022-08-31 12:19:35 UTC +--- chrome/browser/apps/platform_apps/platform_app_launch.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/apps/platform_apps/platform_app_launch.cc @@ -20,7 +20,7 @@ #include "extensions/common/extension.h" #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/browser_window.h" -@@ -124,7 +124,7 @@ bool OpenExtensionApplicationTab(Profile* profile, con +@@ -138,7 +138,7 @@ bool OpenExtensionApplicationTab(Profile* profile, con } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) bool OpenDeprecatedApplicationPrompt(Profile* profile, const std::string& app_id) { if (!extensions::IsExtensionUnsupportedDeprecatedApp(profile, app_id)) diff --git a/www/chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h b/www/chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h index 393b6f62495b..421d2be586c0 100644 --- a/www/chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h +++ b/www/chromium/files/patch-chrome_browser_apps_platform__apps_platform__app__launch.h @@ -1,11 +1,11 @@ ---- chrome/browser/apps/platform_apps/platform_app_launch.h.orig 2022-02-28 16:54:41 UTC +--- chrome/browser/apps/platform_apps/platform_app_launch.h.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/apps/platform_apps/platform_app_launch.h -@@ -36,7 +36,7 @@ bool OpenExtensionApplicationWindow(Profile* profile, - // and false otherwise. +@@ -37,7 +37,7 @@ bool OpenExtensionApplicationWindow(Profile* profile, bool OpenExtensionApplicationTab(Profile* profile, const std::string& app_id); --#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +- BUILDFLAG(IS_FUCHSIA) ++ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) // Opens the deprecated Chrome Apps flow if |app_id| refers to a Chrome App and // Chrome Apps are deprecated on the |profile|. Returns true if that was the // case, or false otherwise. 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 0efa589ecfab..f34db76c1a81 100644 --- a/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc +++ b/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc @@ -1,11 +1,11 @@ ---- chrome/browser/background/background_mode_manager.cc.orig 2023-03-09 06:31:50 UTC +--- chrome/browser/background/background_mode_manager.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/background/background_mode_manager.cc -@@ -889,7 +889,7 @@ gfx::ImageSkia GetStatusTrayIcon() { +@@ -874,7 +874,7 @@ gfx::ImageSkia GetStatusTrayIcon() { return gfx::ImageSkia(); return family->CreateExact(size).AsImageSkia(); -#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( IDR_PRODUCT_LOGO_128); #elif BUILDFLAG(IS_MAC) diff --git a/www/chromium/files/patch-chrome_browser_browser__features.cc b/www/chromium/files/patch-chrome_browser_browser__features.cc index 97d82e9e7c7e..f0c0a7280a88 100644 --- a/www/chromium/files/patch-chrome_browser_browser__features.cc +++ b/www/chromium/files/patch-chrome_browser_browser__features.cc @@ -1,11 +1,11 @@ ---- chrome/browser/browser_features.cc.orig 2023-03-09 06:31:50 UTC +--- chrome/browser/browser_features.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/browser_features.cc -@@ -24,7 +24,7 @@ BASE_FEATURE(kClosedTabCache, - // the browser exits. +@@ -27,7 +27,7 @@ BASE_FEATURE(kClosedTabCache, BASE_FEATURE(kDestroyProfileOnBrowserClose, "DestroyProfileOnBrowserClose", --#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ +- BUILDFLAG(IS_CHROMEOS_LACROS) ++ BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) base::FEATURE_ENABLED_BY_DEFAULT); #else base::FEATURE_DISABLED_BY_DEFAULT); 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 ad1d24a40f42..91327c635acf 100644 --- a/www/chromium/files/patch-chrome_browser_browser__process__impl.cc +++ b/www/chromium/files/patch-chrome_browser_browser__process__impl.cc @@ -1,29 +1,29 @@ ---- chrome/browser/browser_process_impl.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/browser_process_impl.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/browser_process_impl.cc @@ -213,7 +213,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 -@@ -1222,7 +1222,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { +@@ -1195,7 +1195,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 -@@ -1475,7 +1475,7 @@ void BrowserProcessImpl::Unpin() { +@@ -1448,7 +1448,7 @@ void BrowserProcessImpl::Unpin() { // Mac is currently not supported. // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is // complete. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD) bool BrowserProcessImpl::IsRunningInBackground() const { // Check if browser is in the background. diff --git a/www/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc b/www/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc index 520dd4047f0b..4ea24d58d8ff 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 2023-04-28 17:01:32 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -113,13 +113,13 @@ +@@ -117,13 +117,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 -@@ -193,7 +193,7 @@ +@@ -197,7 +197,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" -@@ -853,7 +853,7 @@ void PopulateChromeFrameBinders( +@@ -881,7 +881,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)); -@@ -861,7 +861,7 @@ void PopulateChromeFrameBinders( +@@ -889,7 +889,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->GetParentOrOuterDocument()) { // The service binder will reject non-primary main frames, but we still need -@@ -926,14 +926,14 @@ void PopulateChromeWebUIFrameBinders( - SegmentationInternalsUI>(map); +@@ -958,14 +958,14 @@ void PopulateChromeWebUIFrameBinders( + commerce::CommerceInternalsUI>(map); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder< connectors_internals::mojom::PageHandler, enterprise_connectors::ConnectorsInternalsUI>(map); #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 -@@ -1377,7 +1377,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -1420,7 +1420,7 @@ void PopulateChromeWebUIFrameBinders( #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) RegisterWebUIControllerInterfaceBinder(map); diff --git a/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc b/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc index 343d5124bbe1..246bf78ce181 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc +++ b/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc @@ -1,43 +1,43 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -240,11 +240,11 @@ +@@ -241,11 +241,11 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD) #include "chrome/browser/first_run/upgrade_util_linux.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/core/app/crashpad.h" #endif -@@ -279,7 +279,7 @@ +@@ -280,7 +280,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) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" #include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h" #include "chrome/browser/profiles/profile_activity_metrics_recorder.h" -@@ -991,7 +991,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -992,7 +992,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 . -@@ -1047,7 +1047,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1048,7 +1048,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::Initialize(); TouchModeStatsTracker::Initialize( 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 d989f0b99409..8dbd05118f59 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,165 +1,165 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -420,7 +420,7 @@ +@@ -424,7 +424,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" -@@ -503,12 +503,12 @@ +@@ -512,12 +512,12 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) || \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) #include "chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include "components/crash/core/app/crash_switches.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -517,14 +517,14 @@ +@@ -526,14 +526,14 @@ #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/enterprise/chrome_browser_main_extra_parts_enterprise.h" #include "chrome/browser/enterprise/profile_token_management/profile_token_navigation_throttle.h" #include "chrome/browser/ui/webui/app_settings/web_app_settings_navigation_throttle.h" #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h" #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || // BUILDFLAG(IS_CHROMEOS_ASH) -@@ -553,11 +553,11 @@ +@@ -562,11 +562,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 BUILDFLAG(IS_OZONE) #include "chrome/browser/chrome_browser_main_extra_parts_ozone.h" -@@ -1567,7 +1567,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre +@@ -1609,7 +1609,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre policy::policy_prefs::kPPAPISharedImagesSwapChainAllowed, true); registry->RegisterBooleanPref( policy::policy_prefs::kForceEnablePepperVideoDecoderDevAPI, false); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOutOfProcessSystemDnsResolutionEnabled, true); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) -@@ -1680,7 +1680,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1722,7 +1722,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) -@@ -1719,7 +1719,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1761,7 +1761,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 -@@ -1740,7 +1740,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1782,7 +1782,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo main_parts->AddParts(std::make_unique()); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) main_parts->AddParts(std::make_unique()); #elif BUILDFLAG(IS_OZONE) main_parts->AddParts(std::make_unique()); -@@ -1759,7 +1759,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1801,7 +1801,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo chrome::AddMetricsExtraParts(main_parts.get()); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) main_parts->AddParts( std::make_unique< chrome::enterprise_util::ChromeBrowserMainExtraPartsEnterprise>()); -@@ -2582,6 +2582,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2626,6 +2626,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin #elif BUILDFLAG(IS_POSIX) #if BUILDFLAG(IS_ANDROID) bool enable_crash_reporter = true; +#elif BUILDFLAG(IS_BSD) + bool enable_crash_reporter = false; #elif BUILDFLAG(IS_CHROMEOS) bool enable_crash_reporter = false; if (crash_reporter::IsCrashpadEnabled()) { -@@ -2951,7 +2953,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -3020,7 +3022,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin ThreadProfilerConfiguration::Get()->AppendCommandLineSwitchForChildProcess( command_line); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) // Opt into a hardened stack canary mitigation if it hasn't already been // force-disabled. if (!browser_command_line.HasSwitch(switches::kChangeStackGuardOnFork)) { -@@ -4504,7 +4506,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -4574,7 +4576,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, -@@ -5023,7 +5025,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5093,7 +5095,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati &throttles); } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) MaybeAddThrottle( WebAppSettingsNavigationThrottle::MaybeCreateThrottleFor(handle), &throttles); -@@ -5033,7 +5035,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5103,7 +5105,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) MaybeAddThrottle(enterprise_connectors::DeviceTrustNavigationThrottle:: MaybeCreateThrottleFor(handle), &throttles); -@@ -5072,7 +5074,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -5142,7 +5144,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati handle)); } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) MaybeAddThrottle(browser_switcher::BrowserSwitcherNavigationThrottle:: MaybeCreateThrottleFor(handle), &throttles); -@@ -6703,7 +6705,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS +@@ -6849,7 +6851,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS } bool ChromeContentBrowserClient::ShouldRunOutOfProcessSystemDnsResolution() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // This is possibly called before `g_browser_process` is initialized. PrefService* local_state; if (g_browser_process) { diff --git a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h index b82601d53a43..0ef812447655 100644 --- a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h +++ b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_content_browser_client.h.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -458,7 +458,7 @@ class ChromeContentBrowserClient : public content::Con +@@ -460,7 +460,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_dev__ui__browser__resources.grd b/www/chromium/files/patch-chrome_browser_dev__ui__browser__resources.grd index e20aad771d13..ef2e38396831 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 2023-02-08 09:03:45 UTC +--- chrome/browser/dev_ui_browser_resources.grd.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/dev_ui_browser_resources.grd -@@ -33,7 +33,7 @@ This file specifies browser resources for developer-fa +@@ -34,7 +34,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 605ab1ae00aa..71cf3353ba69 100644 --- a/www/chromium/files/patch-chrome_browser_download_download__item__model.cc +++ b/www/chromium/files/patch-chrome_browser_download_download__item__model.cc @@ -1,29 +1,29 @@ ---- chrome/browser/download/download_item_model.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/download/download_item_model.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/download/download_item_model.cc @@ -766,7 +766,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(); @@ -809,7 +809,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand base::UmaHistogramBoolean("Download.SetAlwaysOpenTo", !is_checked); 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); -@@ -1222,7 +1222,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe +@@ -1234,7 +1234,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (download_->GetOriginalMimeType() == "application/x-x509-user-cert") { SetShouldPreferOpeningInBrowser(true); return; diff --git a/www/chromium/files/patch-chrome_browser_download_download__prefs.cc b/www/chromium/files/patch-chrome_browser_download_download__prefs.cc index fa841ca69284..63a33db14312 100644 --- a/www/chromium/files/patch-chrome_browser_download_download__prefs.cc +++ b/www/chromium/files/patch-chrome_browser_download_download__prefs.cc @@ -1,90 +1,90 @@ ---- chrome/browser/download/download_prefs.cc.orig 2023-05-17 10:17:13 UTC +--- chrome/browser/download/download_prefs.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/download/download_prefs.cc @@ -11,6 +11,7 @@ #include "base/check.h" #include "base/cxx17_backports.h" +#include "base/command_line.h" #include "base/feature_list.h" #include "base/files/file_util.h" #include "base/functional/bind.h" @@ -63,6 +64,10 @@ #include "chrome/browser/download/bubble/download_bubble_prefs.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; @@ -73,7 +78,7 @@ namespace { // Consider downloads 'dangerous' if they go to the home directory on Linux and // to the desktop on any platform. bool DownloadPathIsDangerous(const base::FilePath& download_path) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) base::FilePath home_dir = base::GetHomeDir(); if (download_path == home_dir) { return true; @@ -181,7 +186,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) should_open_pdf_in_system_reader_ = prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader); #endif -@@ -308,7 +313,7 @@ void DownloadPrefs::RegisterProfilePrefs( +@@ -311,7 +316,7 @@ void DownloadPrefs::RegisterProfilePrefs( registry->RegisterTimePref(prefs::kDownloadLastCompleteTime, /*default_value=*/base::Time()); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false); #endif #if BUILDFLAG(IS_ANDROID) -@@ -481,7 +486,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens +@@ -484,7 +489,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens } #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) void DownloadPrefs::SetShouldOpenPdfInSystemReader(bool should_open) { if (should_open_pdf_in_system_reader_ == should_open) return; -@@ -513,7 +518,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons +@@ -516,7 +521,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons void DownloadPrefs::ResetAutoOpenByUser() { #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) SetShouldOpenPdfInSystemReader(false); #endif auto_open_by_user_.clear(); -@@ -544,7 +549,7 @@ void DownloadPrefs::SaveAutoOpenState() { +@@ -547,7 +552,7 @@ void DownloadPrefs::SaveAutoOpenState() { bool DownloadPrefs::CanPlatformEnableAutoOpenForPdf() const { #if BUILDFLAG(IS_CHROMEOS) return false; // There is no UI for auto-open on ChromeOS. -#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) return ShouldOpenPdfInSystemReader(); #else return false; -@@ -668,7 +673,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa +@@ -671,7 +676,14 @@ base::FilePath DownloadPrefs::SanitizeDownloadTargetPa #else // If the stored download directory is an absolute path, we presume it's // correct; there's not really much more validation we can do here. +#if BUILDFLAG(IS_OPENBSD) + // If unveil(2) is used, force the file dialog directory to something we + // know is available. + auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); + if (!sandbox->unveil_initialized() && path.IsAbsolute()) +#else if (path.IsAbsolute()) +#endif return path; // When the default download directory is *not* an absolute path, we use the diff --git a/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc b/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc index 06b57a07674b..57c00c7f02ed 100644 --- a/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc +++ b/www/chromium/files/patch-chrome_browser_enterprise_connectors_device__trust_signals_signals__service__factory.cc @@ -1,20 +1,20 @@ ---- chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc.orig 2023-04-05 11:05:06 UTC +--- chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/enterprise/connectors/device_trust/signals/signals_service_factory.cc @@ -18,7 +18,7 @@ #include "chrome/browser/profiles/profile.h" #include "components/policy/core/common/management/management_service.h" -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) #include "base/check.h" #include "chrome/browser/enterprise/connectors/device_trust/signals/decorators/browser/browser_signals_decorator.h" #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" -@@ -55,7 +55,7 @@ std::unique_ptr CreateSignalsService(P +@@ -56,7 +56,7 @@ std::unique_ptr CreateSignalsService(P enterprise_signals::ContextInfoFetcher::CreateInstance( profile, ConnectorsServiceFactory::GetForBrowserContext(profile)))); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) - policy::CloudPolicyStore* store = nullptr; - // Managed device. + policy::CloudPolicyStore* browser_cloud_policy_store = nullptr; + if (management_service->HasManagementAuthority( diff --git a/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn b/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn index a2c668c7c5de..0aaab8f95393 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn +++ b/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn @@ -1,13 +1,13 @@ ---- chrome/browser/extensions/BUILD.gn.orig 2023-04-05 11:05:06 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1340,6 +1340,10 @@ static_library("extensions") { +@@ -1348,6 +1348,10 @@ static_library("extensions") { deps += [ "//chrome/services/printing/public/mojom" ] } + if (is_bsd) { + sources -= [ "api/image_writer_private/removable_storage_provider_linux.cc" ] + } + if (enable_service_discovery) { sources += [ "api/mdns/mdns_api.cc", diff --git a/www/chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc b/www/chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc index 1293d8833b75..ed30073a08d1 100644 --- a/www/chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc +++ b/www/chromium/files/patch-chrome_browser_extensions_api_passwords__private_passwords__private__delegate__impl.cc @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc -@@ -517,7 +517,7 @@ void PasswordsPrivateDelegateImpl::OsReauthCall( +@@ -544,7 +544,7 @@ void PasswordsPrivateDelegateImpl::OsReauthCall( } void PasswordsPrivateDelegateImpl::OsReauthTimeoutCall() { -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) PasswordsPrivateEventRouter* router = PasswordsPrivateEventRouterFactory::GetForProfile(profile_); if (router) diff --git a/www/chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc b/www/chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc index 51f0ba109d68..71220f078ea4 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 2023-04-05 11:05:06 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -191,7 +191,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -196,7 +196,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 -@@ -203,7 +203,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist +@@ -208,7 +208,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist settings_api::PrefType::PREF_TYPE_STRING; (*s_allowlist)[::prefs::kPolicyThemeColor] = settings_api::PrefType::PREF_TYPE_NUMBER; -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) (*s_allowlist)[::prefs::kUsesSystemThemeDeprecated] = settings_api::PrefType::PREF_TYPE_BOOLEAN; (*s_allowlist)[::prefs::kSystemTheme] = diff --git a/www/chromium/files/patch-chrome_browser_flag__descriptions.cc b/www/chromium/files/patch-chrome_browser_flag__descriptions.cc index 0eda00536ecc..afb652ef82f7 100644 --- a/www/chromium/files/patch-chrome_browser_flag__descriptions.cc +++ b/www/chromium/files/patch-chrome_browser_flag__descriptions.cc @@ -1,65 +1,92 @@ ---- chrome/browser/flag_descriptions.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/flag_descriptions.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/flag_descriptions.cc -@@ -6311,7 +6311,7 @@ const char kLibAssistantV2MigrationDescription[] = +@@ -2450,7 +2450,7 @@ const char kWebUIOmniboxPopupName[] = "WebUI Omnibox P + const char kWebUIOmniboxPopupDescription[] = + "If enabled, shows the omnibox suggestions popup in WebUI."; + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + const char kWebUiSystemFontName[] = "WebUI System font"; + const char kWebUiSystemFontDescription[] = + "If enabled, all WebUI surfaces will use the default UI font of the " +@@ -6593,7 +6593,7 @@ const char kLibAssistantV2MigrationDescription[] = #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - const char kGetDisplayMediaSetName[] = "GetDisplayMediaSet API"; - const char kGetDisplayMediaSetDescription[] = - "When enabled, the getDisplayMediaSet API for capturing multiple surfaces " -@@ -6559,7 +6559,7 @@ const char kSearchWebInSidePanelDescription[] = + const char kGetAllScreensMediaName[] = "GetAllScreensMedia API"; + const char kGetAllScreensMediaDescription[] = + "When enabled, the getAllScreensMedia API for capturing multiple screens " +@@ -6839,7 +6839,7 @@ const char kSearchWebInSidePanelDescription[] = // Random platform combinations ----------------------------------------------- #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) const char kQuickCommandsName[] = "Quick Commands"; const char kQuickCommandsDescription[] = "Enable a text interface to browser features. Invoke with Ctrl-Space."; -@@ -6568,7 +6568,7 @@ const char kQuickCommandsDescription[] = +@@ -6848,7 +6848,7 @@ const char kQuickCommandsDescription[] = // BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) const char kFollowingFeedSidepanelName[] = "Following feed in the sidepanel"; const char kFollowingFeedSidepanelDescription[] = "Enables the following feed in the sidepanel."; -@@ -6589,7 +6589,7 @@ const char kWebShareDescription[] = +@@ -6870,7 +6870,7 @@ const char kEnableProtoApiForClassifyUrlDescription[] + "instead of JSON."; + #endif + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + const char kUseOutOfProcessVideoDecodingName[] = + "Use out-of-process video decoding (OOP-VD)"; + const char kUseOutOfProcessVideoDecodingDescription[] = +@@ -6888,7 +6888,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"; -@@ -6609,7 +6609,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti +@@ -6908,7 +6908,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti "Bluetooth"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) const char kSkipUndecryptablePasswordsName[] = "Skip undecryptable passwords to use the available decryptable " "passwords."; -@@ -6623,7 +6623,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail +@@ -6922,7 +6922,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail "storage and requests initial sync."; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kAsyncDnsName[] = "Async DNS resolver"; const char kAsyncDnsDescription[] = "Enables the built-in DNS resolver."; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -@@ -6724,7 +6724,7 @@ const char kElasticOverscrollDescription[] = +@@ -7023,7 +7023,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."; +@@ -7052,7 +7052,7 @@ const char kSigninInterceptBubbleV2Description[] = + #endif + + #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + const char kDataRetentionPoliciesDisableSyncTypesNeededName[] = + "Data Retention Policies Disable Sync Types"; + const char kDataRetentionPoliciesDisableSyncTypesNeededDescription[] = diff --git a/www/chromium/files/patch-chrome_browser_flag__descriptions.h b/www/chromium/files/patch-chrome_browser_flag__descriptions.h index 54051d7d60b0..ad74f6a06df1 100644 --- a/www/chromium/files/patch-chrome_browser_flag__descriptions.h +++ b/www/chromium/files/patch-chrome_browser_flag__descriptions.h @@ -1,71 +1,98 @@ ---- chrome/browser/flag_descriptions.h.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/flag_descriptions.h.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/flag_descriptions.h -@@ -3660,7 +3660,7 @@ extern const char kLacrosScreenCoordinatesEnabledName[ +@@ -1379,7 +1379,7 @@ extern const char kOmniboxUpdatedConnectionSecurityInd + extern const char kWebUIOmniboxPopupName[]; + extern const char kWebUIOmniboxPopupDescription[]; + +-#if !BUILDFLAG(IS_LINUX) ++#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) + extern const char kWebUiSystemFontName[]; + extern const char kWebUiSystemFontDescription[]; + #endif +@@ -3815,7 +3815,7 @@ extern const char kLacrosScreenCoordinatesEnabledName[ extern const char kLacrosScreenCoordinatesEnabledDescription[]; #endif // #if BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) - extern const char kGetDisplayMediaSetName[]; - extern const char kGetDisplayMediaSetDescription[]; - -@@ -3787,14 +3787,14 @@ extern const char kSearchWebInSidePanelDescription[]; + extern const char kGetAllScreensMediaName[]; + extern const char kGetAllScreensMediaDescription[]; + #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +@@ -3942,14 +3942,14 @@ extern const char kSearchWebInSidePanelDescription[]; // Random platform combinations ----------------------------------------------- #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) extern const char kQuickCommandsName[]; extern const char kQuickCommandsDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // defined (OS_FUCHSIA) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kWebShareName[]; extern const char kWebShareDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) -@@ -3804,7 +3804,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa +@@ -3959,7 +3959,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa extern const char kWebBluetoothConfirmPairingSupportDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kOzonePlatformHintChoiceDefault[]; extern const char kOzonePlatformHintChoiceAuto[]; extern const char kOzonePlatformHintChoiceX11[]; -@@ -3814,7 +3814,7 @@ extern const char kOzonePlatformHintName[]; +@@ -3969,7 +3969,7 @@ extern const char kOzonePlatformHintName[]; extern const char kOzonePlatformHintDescription[]; #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) extern const char kSkipUndecryptablePasswordsName[]; extern const char kSkipUndecryptablePasswordsDescription[]; -@@ -3822,13 +3822,13 @@ extern const char kForcePasswordInitialSyncWhenDecrypt +@@ -3977,13 +3977,13 @@ extern const char kForcePasswordInitialSyncWhenDecrypt extern const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) extern const char kAsyncDnsName[]; extern const char kAsyncDnsDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) + BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) extern const char kFollowingFeedSidepanelName[]; extern const char kFollowingFeedSidepanelDescription[]; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -3908,7 +3908,7 @@ extern const char kElasticOverscrollDescription[]; +@@ -3999,7 +3999,7 @@ extern const char kEnableProtoApiForClassifyUrlName[]; + extern const char kEnableProtoApiForClassifyUrlDescription[]; + #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + extern const char kUseOutOfProcessVideoDecodingName[]; + extern const char kUseOutOfProcessVideoDecodingDescription[]; + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +@@ -4073,7 +4073,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[]; +@@ -4091,7 +4091,7 @@ extern const char kSigninInterceptBubbleV2Description[ + #endif + + #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) || \ +- BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) ++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) + extern const char kDataRetentionPoliciesDisableSyncTypesNeededName[]; + extern const char kDataRetentionPoliciesDisableSyncTypesNeededDescription[]; + #endif diff --git a/www/chromium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc b/www/chromium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc index de3500fc748e..8e33f6757d7b 100644 --- a/www/chromium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc +++ b/www/chromium/files/patch-chrome_browser_media_webrtc_capture__policy__utils.cc @@ -1,20 +1,20 @@ ---- chrome/browser/media/webrtc/capture_policy_utils.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/media/webrtc/capture_policy_utils.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/media/webrtc/capture_policy_utils.cc -@@ -121,7 +121,7 @@ AllowedScreenCaptureLevel GetAllowedCaptureLevel(const +@@ -125,7 +125,7 @@ AllowedScreenCaptureLevel GetAllowedCaptureLevel(const bool IsGetDisplayMediaSetSelectAllScreensAllowedForAnySite( content::BrowserContext* context) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context); if (!profile) { return false; -@@ -148,7 +148,7 @@ bool IsGetDisplayMediaSetSelectAllScreensAllowedForAny +@@ -162,7 +162,7 @@ bool IsGetDisplayMediaSetSelectAllScreensAllowedForAny bool IsGetDisplayMediaSetSelectAllScreensAllowed( content::BrowserContext* context, const GURL& url) { -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) Profile* profile = Profile::FromBrowserContext(context); - if (!profile) + if (!profile) { return false; diff --git a/www/chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc b/www/chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc index ac438f7610fa..9c3ae1596e5c 100644 --- a/www/chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc +++ b/www/chromium/files/patch-chrome_browser_media_webrtc_chrome__screen__enumerator.cc @@ -1,47 +1,47 @@ ---- chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig 2023-03-09 06:31:50 UTC +--- chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/media/webrtc/chrome_screen_enumerator.cc -@@ -20,7 +20,7 @@ +@@ -21,7 +21,7 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) #include "ash/shell.h" #include "ui/aura/window.h" -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "base/functional/callback.h" #include "content/public/browser/desktop_capture.h" #endif -@@ -31,7 +31,7 @@ base::LazyInstance>::Destru +@@ -32,7 +32,7 @@ base::LazyInstance>::Destru root_windows_for_testing_ = LAZY_INSTANCE_INITIALIZER; } // namespace -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) namespace { base::LazyInstance>::DestructorAtExit g_desktop_capturer_for_testing = LAZY_INSTANCE_INITIALIZER; -@@ -77,7 +77,7 @@ blink::mojom::StreamDevicesSetPtr EnumerateScreens( +@@ -78,7 +78,7 @@ blink::mojom::StreamDevicesSetPtr EnumerateScreens( return stream_devices_set; } -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) blink::mojom::StreamDevicesSetPtr EnumerateScreens( blink::mojom::MediaStreamType stream_type) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); -@@ -128,7 +128,7 @@ void ChromeScreenEnumerator::SetRootWindowsForTesting( +@@ -129,7 +129,7 @@ void ChromeScreenEnumerator::SetRootWindowsForTesting( root_windows_for_testing_.Get() = std::move(root_windows); } -#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) +#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) void ChromeScreenEnumerator::SetDesktopCapturerForTesting( std::unique_ptr capturer) { g_desktop_capturer_for_testing.Get() = std::move(capturer); -@@ -144,7 +144,7 @@ void ChromeScreenEnumerator::EnumerateScreens( - DCHECK(base::FeatureList::IsEnabled( - features::kGetDisplayMediaSetAutoSelectAllScreens)); +@@ -146,7 +146,7 @@ void ChromeScreenEnumerator::EnumerateScreens( + features::kGetDisplayMediaSetAutoSelectAllScreens)) || + base::FeatureList::IsEnabled(blink::features::kGetAllScreensMedia)); -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) content::GetUIThreadTaskRunner({})->PostTaskAndReplyWithResult( FROM_HERE, base::BindOnce(::EnumerateScreens, stream_type), base::BindOnce( 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 177ccc28bcff..1a13efa5e189 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,41 +1,41 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -65,8 +65,10 @@ +@@ -66,8 +66,10 @@ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. -#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) +#if !BUILDFLAG(IS_BSD) #include +#endif #include "base/linux_util.h" #include "base/strings/string_split.h" -@@ -100,7 +102,7 @@ +@@ -101,7 +103,7 @@ #include "chromeos/startup/startup_switches.h" #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/pressure/pressure_metrics_reporter.h" #endif // BUILDFLAG(IS_LINUX) -@@ -512,7 +514,7 @@ void RecordStartupMetrics() { +@@ -528,7 +530,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, -@@ -712,7 +714,7 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt +@@ -728,7 +730,7 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserSt } #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) pressure_metrics_reporter_ = std::make_unique(); #endif // BUILDFLAG(IS_LINUX) 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 a90bc4c24d3c..b5480d5673b5 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,65 +1,65 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -176,7 +176,7 @@ +@@ -178,7 +178,7 @@ #include "chrome/notification_helper/notification_helper_constants.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/metrics/motherboard_metrics_provider.h" #endif -@@ -202,7 +202,7 @@ +@@ -204,7 +204,7 @@ #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/metrics/family_link_user_metrics_provider.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS_LACROS))||BUILDFLAG(IS_ANDROID)) -@@ -764,7 +764,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -770,7 +770,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic metrics_service_->RegisterMetricsProvider( std::make_unique()); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) metrics_service_->RegisterMetricsProvider( std::make_unique()); #endif -@@ -843,7 +843,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -849,7 +849,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()); -@@ -852,7 +852,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -858,7 +858,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic #if BUILDFLAG(ENABLE_SUPERVISED_USERS) && \ (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS)) + BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)) if (base::FeatureList::IsEnabled( kExtendFamilyLinkUserLogSegmentToAllPlatforms)) { metrics_service_->RegisterMetricsProvider( -@@ -960,7 +960,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -966,7 +966,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic std::make_unique()); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) metrics_service_->RegisterMetricsProvider( metrics::CreateDesktopSessionMetricsProvider()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) -@@ -1144,7 +1144,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -1163,7 +1163,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_net_system__network__context__manager.cc b/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.cc index c33ca1e33ada..bb4cd439949e 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,65 +1,65 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/net/system_network_context_manager.cc @@ -93,7 +93,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" @@ -178,7 +178,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) @@ -456,7 +456,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) -@@ -489,7 +489,7 @@ SystemNetworkContextManager::SystemNetworkContextManag - base::Unretained(this))); +@@ -503,7 +503,7 @@ SystemNetworkContextManager::SystemNetworkContextManag + #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) pref_change_registrar_.Add( prefs::kEnforceLocalAnchorConstraintsEnabled, base::BindRepeating(&SystemNetworkContextManager:: -@@ -539,7 +539,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -553,7 +553,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterBooleanPref(prefs::kKerberosEnabled, false); #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) registry->RegisterBooleanPref(prefs::kAuthNegotiateDelegateByKdcPolicy, false); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) -@@ -568,7 +568,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -582,7 +582,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterBooleanPref(prefs::kChromeRootStoreEnabled, false); #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Note that the default value is not relevant because the pref is only // evaluated when it is managed. registry->RegisterBooleanPref(prefs::kEnforceLocalAnchorConstraintsEnabled, -@@ -959,7 +959,7 @@ void SystemNetworkContextManager::UpdateExplicitlyAllo - } +@@ -1004,7 +1004,7 @@ void SystemNetworkContextManager::UpdateChromeRootStor + #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) void SystemNetworkContextManager::UpdateEnforceLocalAnchorConstraintsEnabled() { const PrefService::Preference* enforce_local_anchor_constraints_enabled_pref = local_state_->FindPreference( diff --git a/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.h b/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.h index 33a17bee0723..b6e94c226334 100644 --- a/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.h +++ b/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.h @@ -1,11 +1,11 @@ ---- chrome/browser/net/system_network_context_manager.h.orig 2023-04-05 11:05:06 UTC +--- chrome/browser/net/system_network_context_manager.h.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/net/system_network_context_manager.h -@@ -194,7 +194,7 @@ class SystemNetworkContextManager { - void UpdateExplicitlyAllowedNetworkPorts(); +@@ -207,7 +207,7 @@ class SystemNetworkContextManager { + #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) // Applies the current value of the kEnforceLocalAnchorConstraintsEnabled // pref to the enforcement state. void UpdateEnforceLocalAnchorConstraintsEnabled(); 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 af8688fdafd6..f6326517f71f 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,189 +1,180 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -205,12 +205,12 @@ +@@ -206,12 +206,12 @@ #include "components/spellcheck/browser/pref_names.h" #endif // BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/action.h" #include "components/device_signals/core/browser/pref_names.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) #include "chrome/browser/privacy_sandbox/privacy_sandbox_policy_handler.h" #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || -@@ -772,14 +772,14 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -770,14 +770,14 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kManagedDefaultGeolocationSetting, base::Value::Type::INTEGER }, #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { key::kRequireOnlineRevocationChecksForLocalAnchors, prefs::kCertRevocationCheckingRequiredLocalAnchors, base::Value::Type::BOOLEAN }, #endif // #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) // || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) \ - || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kFullscreenAllowed, prefs::kFullscreenAllowed, base::Value::Type::BOOLEAN }, -@@ -1439,7 +1439,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1431,7 +1431,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGSSAPILibraryName, prefs::kGSSAPILibraryName, base::Value::Type::STRING }, -@@ -1509,18 +1509,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1501,18 +1501,18 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = prefs::kTotalMemoryLimitMb, base::Value::Type::INTEGER }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kBackgroundModeEnabled, prefs::kBackgroundModeEnabled, base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kUnmanagedDeviceSignalsConsentFlowEnabled, device_signals::prefs::kUnmanagedDeviceSignalsConsentFlowEnabled, base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ - || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kDefaultBrowserSettingEnabled, prefs::kDefaultBrowserSettingEnabled, base::Value::Type::BOOLEAN }, -@@ -1533,7 +1533,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1525,7 +1525,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) // || BUILDFLAG(IS_FUCHSIA) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) \ - || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD) { key::kAutoplayAllowed, prefs::kAutoplayAllowed, base::Value::Type::BOOLEAN }, -@@ -1637,7 +1637,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1629,7 +1629,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) { key::kAlternativeBrowserPath, browser_switcher::prefs::kAlternativeBrowserPath, base::Value::Type::STRING }, -@@ -1724,13 +1724,13 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1725,13 +1725,13 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kGetDisplayMediaSetSelectAllScreensAllowedForUrls, prefs::kManagedGetDisplayMediaSetSelectAllScreensAllowedForUrls, base::Value::Type::LIST }, #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) { key::kAuthNegotiateDelegateByKdcPolicy, prefs::kAuthNegotiateDelegateByKdcPolicy, base::Value::Type::BOOLEAN }, -@@ -1761,7 +1761,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1762,7 +1762,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = #endif // BUILDFLAG(CHROME_ROOT_STORE_POLICY_SUPPORTED) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) { key::kEnforceLocalAnchorConstraintsEnabled, prefs::kEnforceLocalAnchorConstraintsEnabled, base::Value::Type::BOOLEAN }, -@@ -1790,7 +1790,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - #endif // BUILDFLAG(IS_CHROMEOS_ASH) - - #if BUILDFLAG(ENABLE_EXTENSIONS) && (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) \ -- || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA)) -+ || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)) - { key::kChromeAppsEnabled, - extensions::pref_names::kChromeAppsEnabled, - base::Value::Type::BOOLEAN }, -@@ -1850,7 +1850,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1844,7 +1844,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = ash::prefs::kUrlParameterToAutofillSAMLUsername, base::Value::Type::STRING }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) { key::kHighEfficiencyModeEnabled, performance_manager::user_tuning::prefs::kHighEfficiencyModeEnabled, base::Value::Type::BOOLEAN }, -@@ -1895,7 +1895,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1889,7 +1889,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = policy::policy_prefs::kForceEnablePepperVideoDecoderDevAPI, base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(ENABLE_PPAPI) -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) { key::kOutOfProcessSystemDnsResolutionEnabled, prefs::kOutOfProcessSystemDnsResolutionEnabled, base::Value::Type::BOOLEAN }, -@@ -2162,7 +2162,7 @@ std::unique_ptr BuildH +@@ -2156,7 +2156,7 @@ std::unique_ptr BuildH #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) handlers->AddHandler( std::make_unique()); handlers->AddHandler( -@@ -2219,7 +2219,7 @@ std::unique_ptr BuildH +@@ -2213,7 +2213,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) -@@ -2254,7 +2254,7 @@ std::unique_ptr BuildH +@@ -2248,7 +2248,7 @@ std::unique_ptr BuildH std::vector> signin_legacy_policies; #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_LINUX) + BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) signin_legacy_policies.push_back(std::make_unique( key::kForceBrowserSignin, prefs::kForceBrowserSignin, base::Value::Type::BOOLEAN)); -@@ -2608,7 +2608,7 @@ std::unique_ptr BuildH +@@ -2604,7 +2604,7 @@ std::unique_ptr BuildH #endif #if BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique()); handlers->AddHandler( std::make_unique( -@@ -2616,7 +2616,7 @@ std::unique_ptr BuildH +@@ -2612,7 +2612,7 @@ std::unique_ptr BuildH #endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) #endif // BUILDFLAG(ENABLE_SPELLCHECK) -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) handlers->AddHandler(std::make_unique( key::kAllowSystemNotifications, prefs::kAllowSystemNotifications, base::Value::Type::BOOLEAN)); -@@ -2629,7 +2629,7 @@ std::unique_ptr BuildH +@@ -2625,7 +2625,7 @@ std::unique_ptr BuildH handlers->AddHandler( std::make_unique( chrome_schema)); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) || \ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_ANDROID) handlers->AddHandler(std::make_unique()); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || diff --git a/www/chromium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc b/www/chromium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc new file mode 100644 index 000000000000..264a3cec6660 --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_policy_policy__value__and__status__aggregator.cc @@ -0,0 +1,20 @@ +--- chrome/browser/policy/policy_value_and_status_aggregator.cc.orig 2023-05-31 08:12:17 UTC ++++ chrome/browser/policy/policy_value_and_status_aggregator.cc +@@ -55,7 +55,7 @@ + #include "chrome/browser/policy/value_provider/extension_policies_value_provider.h" + #endif // BUILDFLAG(ENABLE_EXTENSIONS) + +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + #include "components/policy/core/common/cloud/profile_cloud_policy_manager.h" + #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) + +@@ -106,7 +106,7 @@ std::unique_ptr GetUserP + #else // BUILDFLAG(IS_CHROMEOS_ASH) + policy::CloudPolicyManager* cloud_policy_manager = + profile->GetUserCloudPolicyManager(); +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + if (!cloud_policy_manager) { + cloud_policy_manager = profile->GetProfileCloudPolicyManager(); + } 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 a486968f5c7c..b445a3781892 100644 --- a/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc +++ b/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc @@ -1,86 +1,86 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -464,13 +464,13 @@ +@@ -465,13 +465,13 @@ #include "components/os_crypt/sync/os_crypt.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "components/device_signals/core/browser/pref_names.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 -@@ -503,7 +503,7 @@ +@@ -504,7 +504,7 @@ #include "chrome/browser/sessions/session_service_log.h" #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "ui/color/system_theme.h" #endif -@@ -800,7 +800,7 @@ const char kPluginsPluginsList[] = "plugins.plugins_li +@@ -731,7 +731,7 @@ const char kPluginsPluginsList[] = "plugins.plugins_li const char kPluginsShowDetails[] = "plugins.show_details"; // Deprecated 02/2023. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) const char kWebAppsUrlHandlerInfo[] = "web_apps.url_handler_info"; #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -904,7 +904,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistryS +@@ -872,7 +872,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistryS #endif // BUILDFLAG(IS_CHROMEOS_ASH) // Deprecated 02/2023. -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) registry->RegisterDictionaryPref(kWebAppsUrlHandlerInfo); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -1033,7 +1033,7 @@ void RegisterProfilePrefsForMigration( +@@ -987,7 +987,7 @@ void RegisterProfilePrefsForMigration( registry->RegisterIntegerPref(kProfileAvatarTutorialShown, 0); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Deprecated 08/2022. registry->RegisterBooleanPref(prefs::kUsesSystemThemeDeprecated, false); #endif -@@ -1686,11 +1686,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -1690,11 +1690,11 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync safe_browsing::PostCleanupSettingsResetter::RegisterProfilePrefs(registry); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) device_signals::RegisterProfilePrefs(registry); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); #endif -@@ -1878,7 +1878,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local +@@ -1857,7 +1857,7 @@ void MigrateObsoleteLocalStatePrefs(PrefService* local #endif // BUILDFLAG(IS_CHROMEOS_ASH) // Added 02/2023 -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) local_state->ClearPref(kWebAppsUrlHandlerInfo); #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) -@@ -2038,7 +2038,7 @@ void MigrateObsoleteProfilePrefs(Profile* profile) { +@@ -1992,7 +1992,7 @@ void MigrateObsoleteProfilePrefs(Profile* profile) { profile_prefs->ClearPref(kProfileAvatarTutorialShown); #endif -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Added 08/2022. if (profile_prefs->HasPrefPath(prefs::kUsesSystemThemeDeprecated)) { auto migrated_theme = diff --git a/www/chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc b/www/chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc index cdf3c9e15bc4..e13e2da04e41 100644 --- a/www/chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc +++ b/www/chromium/files/patch-chrome_browser_printing_print__backend__service__manager.cc @@ -1,29 +1,38 @@ ---- chrome/browser/printing/print_backend_service_manager.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/printing/print_backend_service_manager.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/printing/print_backend_service_manager.cc -@@ -602,7 +602,7 @@ PrintBackendServiceManager::RegisterClient( +@@ -687,7 +687,7 @@ PrintBackendServiceManager::RegisterClient( query_clients_.insert(client_id); break; case ClientType::kQueryWithUi: -#if !BUILDFLAG(IS_LINUX) +#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_BSD) if (!query_with_ui_clients_.empty()) return absl::nullopt; #endif -@@ -868,7 +868,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate +@@ -960,7 +960,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate break; case ClientType::kQueryWithUi: -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No need to update if there were other query with UI clients. if (query_with_ui_clients_.size() > 1) return absl::nullopt; -@@ -925,7 +925,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate +@@ -1017,7 +1017,7 @@ PrintBackendServiceManager::DetermineIdleTimeoutUpdate return kNoClientsRegisteredResetOnIdleTimeout; case ClientType::kQueryWithUi: -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // No need to update if there were other query with UI clients. if (HasQueryWithUiClientForRemoteId(remote_id)) { return absl::nullopt; +@@ -1477,7 +1477,7 @@ template + void PrintBackendServiceManager::RunSavedCallbacks( + RemoteSavedCallbacks& saved_callbacks, + const RemoteId& remote_id, +- std::remove_reference::type... result) { ++ typename std::remove_reference::type... result) { + auto found_callbacks_map = saved_callbacks.find(remote_id); + if (found_callbacks_map == saved_callbacks.end()) + return; // No callbacks to run. diff --git a/www/chromium/files/patch-chrome_browser_printing_print__backend__service__manager.h b/www/chromium/files/patch-chrome_browser_printing_print__backend__service__manager.h new file mode 100644 index 000000000000..d7c9307957bc --- /dev/null +++ b/www/chromium/files/patch-chrome_browser_printing_print__backend__service__manager.h @@ -0,0 +1,11 @@ +--- chrome/browser/printing/print_backend_service_manager.h.orig 2023-05-31 08:12:17 UTC ++++ chrome/browser/printing/print_backend_service_manager.h +@@ -587,7 +587,7 @@ class PrintBackendServiceManager { + template + void RunSavedCallbacks(RemoteSavedCallbacks& saved_callbacks, + const RemoteId& remote_id, +- std::remove_reference::type... result); ++ typename std::remove_reference::type... result); + + // Test support for client ID management. + static void SetClientsForTesting( diff --git a/www/chromium/files/patch-chrome_browser_printing_printer__query.cc b/www/chromium/files/patch-chrome_browser_printing_printer__query.cc index 186da4ad3b5b..f980d96b1c26 100644 --- a/www/chromium/files/patch-chrome_browser_printing_printer__query.cc +++ b/www/chromium/files/patch-chrome_browser_printing_printer__query.cc @@ -1,11 +1,11 @@ ---- chrome/browser/printing/printer_query.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/printing/printer_query.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/printing/printer_query.cc -@@ -339,7 +339,7 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Di +@@ -341,7 +341,7 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Di crash_key = std::make_unique( print_backend->GetPrinterDriverInfo(printer_name)); -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS) +#if (BUILDFLAG(IS_BSD) || BUILDFLAG(IS_LINUX)) && BUILDFLAG(USE_CUPS) PrinterBasicInfo basic_info; if (print_backend->GetPrinterBasicInfo(printer_name, &basic_info) == mojom::ResultCode::kSuccess) { diff --git a/www/chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc b/www/chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc index e21e56e95bbc..59c95f5c6cc1 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,76 +1,76 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -361,17 +361,17 @@ +@@ -363,17 +363,17 @@ #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.h" #include "chrome/browser/enterprise/connectors/device_trust/device_trust_service_factory.h" #endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) #include "chrome/browser/enterprise/idle/idle_service_factory.h" #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) #include "chrome/browser/browser_switcher/browser_switcher_service_factory.h" #include "chrome/browser/enterprise/connectors/analysis/local_binary_upload_service_factory.h" #include "chrome/browser/enterprise/signals/signals_aggregator_factory.h" -@@ -535,7 +535,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -543,7 +543,7 @@ void ChromeBrowserMainExtraPartsProfiles:: BreadcrumbManagerKeyedServiceFactory::GetInstance(); } browser_sync::UserEventServiceFactory::GetInstance(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) browser_switcher::BrowserSwitcherServiceFactory::GetInstance(); #endif BrowsingDataHistoryObserverService::Factory::GetInstance(); -@@ -606,16 +606,16 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -614,16 +614,16 @@ void ChromeBrowserMainExtraPartsProfiles:: #if !BUILDFLAG(IS_ANDROID) DriveServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_signals::SignalsAggregatorFactory::GetInstance(); #endif enterprise::ProfileIdServiceFactory::GetInstance(); #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_ASH) + BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD) enterprise_connectors::DeviceTrustServiceFactory::GetInstance(); enterprise_connectors::DeviceTrustConnectorServiceFactory::GetInstance(); #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) enterprise_connectors::LocalBinaryUploadServiceFactory::GetInstance(); #endif #if BUILDFLAG(ENABLE_SESSION_SERVICE) -@@ -718,12 +718,12 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -729,12 +729,12 @@ 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 #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ - BUILDFLAG(IS_ANDROID) + BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD) enterprise_idle::IdleServiceFactory::GetInstance(); #endif ModelTypeStoreServiceFactory::GetInstance(); -@@ -786,7 +786,7 @@ void ChromeBrowserMainExtraPartsProfiles:: - PolicyBlocklistFactory::GetInstance(); +@@ -801,7 +801,7 @@ void ChromeBrowserMainExtraPartsProfiles:: PredictionServiceFactory::GetInstance(); + PrimaryAccountPolicyManagerFactory::GetInstance(); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) ProfileTokenWebSigninInterceptorFactory::GetInstance(); + policy::ProfileTokenPolicyWebSigninServiceFactory::GetInstance(); #endif - #if !BUILDFLAG(IS_ANDROID) diff --git a/www/chromium/files/patch-chrome_browser_profiles_profile__impl.cc b/www/chromium/files/patch-chrome_browser_profiles_profile__impl.cc index bf4e3f5b5d90..1b0d866547c9 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,40 @@ ---- chrome/browser/profiles/profile_impl.cc.orig 2023-04-28 17:01:32 UTC +--- chrome/browser/profiles/profile_impl.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/profiles/profile_impl.cc -@@ -260,6 +260,10 @@ +@@ -263,6 +263,10 @@ #include "chrome/browser/spellchecker/spellcheck_service.h" #endif +#if BUILDFLAG(IS_BSD) +#include "sandbox/policy/sandbox.h" +#endif + using bookmarks::BookmarkModel; using content::BrowserThread; using content::DownloadManagerDelegate; -@@ -865,7 +869,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) +@@ -611,7 +615,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async + #else + { + #endif // BUILDFLAG(IS_CHROMEOS_LACROS) +-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) + ProfileManager* profile_manager = g_browser_process->profile_manager(); + ProfileAttributesEntry* entry = + profile_manager->GetProfileAttributesStorage() +@@ -886,7 +890,17 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) } base::FilePath ProfileImpl::last_selected_directory() { +#if BUILDFLAG(IS_OPENBSD) + // If unveil(2) is used, force the file dialog directory to something we + // know is available. + auto* sandbox = sandbox::policy::SandboxLinux::GetInstance(); + if (sandbox->unveil_initialized()) + return GetPrefs()->GetFilePath(prefs::kDownloadDefaultDirectory); + else + return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); +#else return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); +#endif } void ProfileImpl::set_last_selected_directory(const base::FilePath& path) { diff --git a/www/chromium/files/patch-chrome_browser_profiles_profiles__state.cc b/www/chromium/files/patch-chrome_browser_profiles_profiles__state.cc index 014e10c0cde4..13e8ab242934 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-09-24 10:57:32 UTC +--- chrome/browser/profiles/profiles_state.cc.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/profiles/profiles_state.cc -@@ -181,7 +181,7 @@ bool IsGuestModeRequested(const base::CommandLine& com +@@ -182,7 +182,7 @@ bool IsGuestModeRequested(const base::CommandLine& com PrefService* local_state, bool show_warning) { #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || \ - BUILDFLAG(IS_MAC) + BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD) DCHECK(local_state); // Check if guest mode enforcement commandline switch or policy are provided. diff --git a/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html b/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html index 645e71dd8d1d..01f9a99a0ed6 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 2023-03-09 06:31:50 UTC +--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2023-05-31 08:12:17 UTC +++ chrome/browser/resources/settings/appearance_page/appearance_page.html -@@ -28,7 +28,7 @@ +@@ -27,7 +27,7 @@ + - + - +