Index: head/www/chromium/Makefile =================================================================== --- head/www/chromium/Makefile (revision 543832) +++ head/www/chromium/Makefile (revision 543833) @@ -1,351 +1,358 @@ # Created by: Florent Thoumie # $FreeBSD$ PORTNAME= chromium -PORTVERSION= 83.0.4103.116 -PORTREVISION= 1 +PORTVERSION= 84.0.4147.105 CATEGORIES?= www java MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ LOCAL/cpm/chromium/:fonts DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER?= chromium@FreeBSD.org COMMENT?= Google web browser based on WebKit LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ .if !defined(GN_ONLY) BUILD_DEPENDS+= gperf:devel/gperf \ - yasm:devel/yasm \ ffmpeg>=3.2.2,1:multimedia/ffmpeg \ flock:sysutils/flock \ node:www/node \ + xcb-proto>0:x11/xcb-proto \ ${LOCALBASE}/bin/ar:devel/binutils \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} .endif .if !defined(GN_ONLY) LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ 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 \ libavcodec.so:multimedia/ffmpeg \ 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 RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic BROKEN_FreeBSD_11_aarch64= components/safe_browsing_db/v4_rice.cc:120:18: use of overloaded operator '&' is ambiguous ONLY_FOR_ARCHS= aarch64 amd64 i386 .endif .if defined(GN_ONLY) USES= compiler:c++14-lang dos2unix localbase:ldflags ninja pkgconfig \ python:2.7,build shebangfix tar:xz .else USES= bison cpe desktop-file-utils dos2unix gl gnome jpeg localbase:ldflags \ ninja perl5 pkgconfig python:2.7,build shebangfix tar:xz xorg .endif MAKE_ARGS= -C out/${BUILDTYPE} BINARY_ALIAS= python=${PYTHON_CMD} DOS2UNIX_FILES= third_party/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h .if !defined(GN_ONLY) CPE_VENDOR= google CPE_PRODUCT= chrome USE_GL= gl USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xorgproto xrandr xrender xscrnsaver xtst USE_GNOME= atk dconf glib20 gtk30 libxml2 libxslt SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper buildtools/linux64/clang-format ALL_TARGET= chrome INSTALLS_ICONS= yes .endif EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang # TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) # # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= clang_use_chrome_plugins=false \ enable_hangout_services_extension=true \ enable_nacl=false \ enable_one_click_signin=true \ enable_remoting=false \ fieldtrial_testing_like_official_build=true \ is_clang=true \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator="none" \ use_allocator_shim=false \ use_aura=true \ use_custom_libcxx=false \ use_gnome_keyring=false \ use_lld=true \ use_sysroot=false \ use_system_freetype=true \ use_system_harfbuzz=true \ use_system_libjpeg=true \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" # TODO: investigate building with these options: # use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles # FreeBSD Chromium Api Key # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . # Note: these are for FreeBSD use ONLY. For your own distribution, # please get your own set of keys. GN_ARGS+= google_api_key="AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8" \ google_default_client_id="996322985003.apps.googleusercontent.com" \ google_default_client_secret="IR1za9-1VK0zZ0f_O8MVFicn" .if !defined(GN_ONLY) SUB_FILES= chromium-browser.desktop chrome pkg-message SUB_LIST+= COMMENT="${COMMENT}" OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS TEST CODECS_DESC= Compile and enable patented codecs like H.264 DRIVER_DESC= Install chromedriver OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO OPTIONS_DEFAULT= ALSA CODECS CUPS DRIVER KERBEROS OPTIONS_SUB= yes ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ alsa-lib>=1.1.1_1:audio/alsa-lib ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CODECS_VARS= GN_ARGS+=ffmpeg_branding="Chrome" \ GN_ARGS+=proprietary_codecs=true CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \ GN_ARGS+=proprietary_codecs=false CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_VARS= BUILDTYPE=Debug \ GN_ARGS+=is_debug=true \ GN_ARGS+=is_component_build=false \ GN_ARGS+=symbol_level=1 \ GN_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="lots of free disk space (~ 13GB)" 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="a fair amount of free disk space (~ 6.5GB)" DRIVER_MAKE_ARGS= chromedriver KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false # With SNDIO=on we exclude audio_manager_linux from the build (see # media/audio/BUILD.gn) and use audio_manager_openbsd which does not # support falling back to ALSA or PulseAudio. SNDIO_PREVENTS= ALSA PULSEAUDIO SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false .endif .include "Makefile.tests" TEST_ALL_TARGET= ${TEST_TARGETS} TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX} \ test_fonts${EXTRACT_SUFX}:fonts .include # swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " .else PLIST_SUB+= NOT_AARCH64="" .endif # Make better javascript with java .if !defined(GN_ONLY) JAVA_BUILD= yes JAVA_VERSION= 1.8 USE_JAVA= yes .endif # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include .if !defined(GN_ONLY) pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "To build Chromium, you should have around 2GB of memory" @${ECHO_MSG} "and ${WANTSPACE}." @${ECHO_MSG} post-extract-TEST-on: @${MKDIR} ${WRKSRC}/third_party/test_fonts/test_fonts @${MV} ${WRKDIR}/test_fonts ${WRKSRC}/third_party/test_fonts/ post-patch: @${REINPLACE_CMD} -e 's|@@PACKAGE@@|chromium|' \ -e 's|@@MENUNAME@@|Chromium Web Browser|' \ ${WRKSRC}/chrome/app/resources/manpage.1.in post-patch-SNDIO-on: @${MKDIR} ${WRKSRC}/media/audio/sndio ${WRKSRC}/media/audio/openbsd @${CP} ${FILESDIR}/sndio_output.* ${WRKSRC}/media/audio/sndio @${CP} ${FILESDIR}/sndio_input.* ${WRKSRC}/media/audio/sndio @${CP} ${FILESDIR}/audio_manager_openbsd.* ${WRKSRC}/media/audio/openbsd 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 \ - ffmpeg flac fontconfig freetype harfbuzz-ng libdrm libpng libwebp libxml libxslt openh264 opus snappy yasm || ${FALSE} + ffmpeg flac fontconfig freetype harfbuzz-ng libdrm libpng libwebp libxml libxslt openh264 opus snappy || ${FALSE} + + # We need the site package from xcbgen, which installs as python3.7 (really: default version), while the chromium + # build still needs to use python2.7. It works, because xcbgen can run with both versions, but we want to avoid + # having the pre-compiled pyc files from 2.7 in the 3.7 site packages + # Remove this as soon as chromium uses python3.x as well + @${MKDIR} ${WRKDIR}/site-packages/xcbgen + ${CP} ${PYTHONBASE}/lib/python3.7/site-packages/xcbgen/*.py \ + ${WRKDIR}/site-packages/xcbgen .endif 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} .if !defined(GN_ONLY) 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-x64/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin/node # Setup java dependency on amd64 and i386 .if ${ARCH} == amd64 || ${ARCH} == i386 @${MKDIR} ${WRKDIR}/bin ${LN} -sf ${LOCALBASE}/openjdk8/bin/java ${WRKDIR}/bin/java .endif # 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 .endif 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 .if !defined(GN_ONLY) do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ ${STAGEDIR}${MANPREFIX}/man/man1/chrome.1 ${CP} ${WRKSRC}/chrome/app/theme/chromium/product_logo_22_mono.png ${WRKSRC}/chrome/app/theme/chromium/product_logo_22.png .for s in 22 24 48 64 128 256 @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps ${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${s}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/chrome.png .endfor ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.png ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.pak ${STAGEDIR}${DATADIR} .for d in protoc mksnapshot ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor .for d in icudtl.dat snapshot_blob.bin v8_context_snapshot.bin ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chrome \ ${STAGEDIR}${DATADIR} cd ${WRKSRC}/out/${BUILDTYPE} && \ ${COPYTREE_SHARE} "locales resources" ${STAGEDIR}${DATADIR} @${MKDIR} ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKDIR}/chromium-browser.desktop \ ${STAGEDIR}${DESKTOPDIR} ${INSTALL_SCRIPT} ${WRKDIR}/chrome ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/chrome/tools/build/linux/chrome-wrapper \ ${STAGEDIR}${DATADIR} # ANGLE, EGL, Vk .for f in libEGL.so libGLESv2.so libVkICD_mock_icd.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor .if ${BUILDTYPE} == Debug ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libVkLayer_khronos_validation.so ${STAGEDIR}${DATADIR} .endif # SwiftShader .if ${ARCH} != aarch64 @${MKDIR} ${STAGEDIR}${DATADIR}/swiftshader ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libvk_swiftshader.so ${STAGEDIR}${DATADIR} .for g in libEGL.so libGLESv2.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/swiftshader/${g} \ ${STAGEDIR}${DATADIR}/swiftshader .endfor .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 \ ${STAGEDIR}${PREFIX}/bin .endif .include Index: head/www/chromium/distinfo =================================================================== --- head/www/chromium/distinfo (revision 543832) +++ head/www/chromium/distinfo (revision 543833) @@ -1,7 +1,7 @@ -TIMESTAMP = 1593564988 -SHA256 (chromium-83.0.4103.116.tar.xz) = bb0c7e8dfee9f3a5e30eca7f34fc9f21caefa82a86c058c552f52b1ae2da2ac3 -SIZE (chromium-83.0.4103.116.tar.xz) = 802626772 -SHA256 (chromium-83.0.4103.116-testdata.tar.xz) = 0b999ed70e758e18229ff01c7d0bdea83aedc9f6e0ac56d78d4e46120f8d6a2c -SIZE (chromium-83.0.4103.116-testdata.tar.xz) = 257103056 +TIMESTAMP = 1595931907 +SHA256 (chromium-84.0.4147.105.tar.xz) = caf4ebeb2a2333454c3067a2534aeecaab5029aa78fc0d8b27f79ad3b9c5ccac +SIZE (chromium-84.0.4147.105.tar.xz) = 845167500 +SHA256 (chromium-84.0.4147.105-testdata.tar.xz) = 571cfaa82ea28413b22e65907d0ecdb055e02142f8e1b86f3fe2f1bb9557ac03 +SIZE (chromium-84.0.4147.105-testdata.tar.xz) = 257190208 SHA256 (test_fonts.tar.xz) = cf9cbe3b7f1c4c42d426bddc65ec178d333ad7e205a36fe0a606a3c0c545ece1 SIZE (test_fonts.tar.xz) = 200040 Index: head/www/chromium/files/patch-third__party_zlib_BUILD.gn =================================================================== --- head/www/chromium/files/patch-third__party_zlib_BUILD.gn (revision 543832) +++ head/www/chromium/files/patch-third__party_zlib_BUILD.gn (nonexistent) @@ -1,20 +0,0 @@ ---- third_party/zlib/BUILD.gn.orig 2020-05-18 20:40:28 UTC -+++ third_party/zlib/BUILD.gn -@@ -82,6 +82,8 @@ if (use_arm_neon_optimizations) { - defines = [ "CRC32_ARMV8_CRC32" ] - if (is_android) { - defines += [ "ARMV8_OS_ANDROID" ] -+ } else if (is_bsd) { -+ defines += [ "ARMV8_OS_FREEBSD" ] - } else if (is_linux || is_chromeos) { - defines += [ "ARMV8_OS_LINUX" ] - } else if (is_fuchsia) { -@@ -350,7 +352,7 @@ static_library("minizip") { - ] - } - -- if (is_mac || is_ios || is_android || is_nacl) { -+ if (is_mac || is_ios || is_android || is_nacl || is_bsd) { - # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We - # use fopen, ftell, and fseek instead on these systems. - defines = [ "USE_FILE32API" ] Property changes on: head/www/chromium/files/patch-third__party_zlib_BUILD.gn ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-net_base_features.cc =================================================================== --- head/www/chromium/files/patch-net_base_features.cc (revision 543832) +++ head/www/chromium/files/patch-net_base_features.cc (nonexistent) @@ -1,11 +0,0 @@ ---- net/base/features.cc.orig 2020-05-13 18:40:32 UTC -+++ net/base/features.cc -@@ -92,7 +92,7 @@ const base::Feature kBlockExternalRequestsFromNonSecur - #if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED) - const base::Feature kCertVerifierBuiltinFeature { - "CertVerifierBuiltin", --#if defined(OS_CHROMEOS) || defined(OS_LINUX) -+#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) - base::FEATURE_ENABLED_BY_DEFAULT - #else - base::FEATURE_DISABLED_BY_DEFAULT Property changes on: head/www/chromium/files/patch-net_base_features.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-third__party_yasm_yasm__assemble.gni =================================================================== --- head/www/chromium/files/patch-third__party_yasm_yasm__assemble.gni (revision 543832) +++ head/www/chromium/files/patch-third__party_yasm_yasm__assemble.gni (nonexistent) @@ -1,157 +0,0 @@ ---- third_party/yasm/yasm_assemble.gni.orig 2020-03-16 18:40:14 UTC -+++ third_party/yasm/yasm_assemble.gni -@@ -1,105 +1,23 @@ --# Copyright 2014 The Chromium Authors. All rights reserved. -+# Copyright 2016 The Chromium Authors. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. - --# This provides the yasm_assemble() template which uses YASM to assemble --# assembly files. --# --# Files to be assembled with YASM should have an extension of .asm. --# --# Parameters --# --# yasm_flags (optional) --# [list of strings] Pass additional flags into YASM. These are appended --# to the command line. Note that the target machine type and system is --# already set up based on the current toolchain so you don't need to --# specify these things (see below). --# --# Example: yasm_flags = [ "--force-strict" ] --# --# include_dirs (optional) --# [list of dir names] List of additional include dirs. Note that the --# source root and the root generated file dir is always added, just like --# our C++ build sets up. --# --# Example: include_dirs = [ "//some/other/path", target_gen_dir ] --# --# defines (optional) --# [list of strings] List of defines, as with the native code defines. --# --# Example: defines = [ "FOO", "BAR=1" ] --# --# inputs, deps, visibility (optional) --# These have the same meaning as in an action. --# --# Example --# --# yasm_assemble("my_yasm_target") { --# sources = [ --# "ultra_optimized_awesome.asm", --# ] --# include_dirs = [ "assembly_include" ] --# } -- --if (is_mac || is_ios) { -- if (current_cpu == "x86") { -- _yasm_flags = [ -- "-fmacho32", -- "-m", -- "x86", -- ] -- } else if (current_cpu == "x64") { -- _yasm_flags = [ -- "-fmacho64", -- "-m", -- "amd64", -- ] -- } --} else if (is_posix || is_fuchsia) { -- if (current_cpu == "x86") { -- _yasm_flags = [ -- "-felf32", -- "-m", -- "x86", -- ] -- } else if (current_cpu == "x64") { -- _yasm_flags = [ -- "-DPIC", -- "-felf64", -- "-m", -- "amd64", -- ] -- } --} else if (is_win) { -- if (current_cpu == "x86") { -- _yasm_flags = [ -- "-DPREFIX", -- "-fwin32", -- "-m", -- "x86", -- ] -- } else if (current_cpu == "x64") { -- _yasm_flags = [ -- "-fwin64", -- "-m", -- "amd64", -- ] -- } -+if (current_cpu == "x86") { -+ _yasm_flags = [ -+ "-felf32", -+ "-m", -+ "x86", -+ ] -+} else if (current_cpu == "x64") { -+ _yasm_flags = [ -+ "-DPIC", -+ "-felf64", -+ "-m", -+ "amd64", -+ ] - } - --if (is_win) { -- asm_obj_extension = "obj" --} else { -- asm_obj_extension = "o" --} -- - template("yasm_assemble") { -- assert(defined(invoker.sources), "Need sources defined for $target_name") -- -- # Only depend on YASM on x86 systems. Force compilation of .asm files for -- # ARM to fail. -- assert(current_cpu == "x86" || current_cpu == "x64") -- - action_name = "${target_name}_action" - source_set_name = target_name - -@@ -114,22 +32,12 @@ template("yasm_assemble") { - inputs = invoker.inputs - } - -- # Executable (first in the args). The binary might be in the root build dir -- # (no cross-compiling) or in a toolchain-specific subdirectory of that -- # (when cross-compiling). -- yasm_label = "//third_party/yasm($host_toolchain)" -- args = [ "./" + # Force current dir. -- rebase_path(get_label_info(yasm_label, "root_out_dir") + "/yasm", -- root_build_dir) ] -- -- # Deps. -- deps = [ yasm_label ] -+ deps = [] - if (defined(invoker.deps)) { - deps += invoker.deps - } - -- # Flags. -- args += _yasm_flags -+ args = [ "yasm" ] + _yasm_flags - if (defined(invoker.yasm_flags)) { - args += invoker.yasm_flags - } -@@ -184,9 +92,6 @@ template("yasm_assemble") { - } - - sources = get_target_outputs(":$action_name") -- -- # Do not publicize any header to remove build dependency. -- public = [] - - deps = [ ":$action_name" ] - } Property changes on: head/www/chromium/files/patch-third__party_yasm_yasm__assemble.gni ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-content_shell_test__runner_test__runner.cc =================================================================== --- head/www/chromium/files/patch-content_shell_test__runner_test__runner.cc (revision 543832) +++ head/www/chromium/files/patch-content_shell_test__runner_test__runner.cc (nonexistent) @@ -1,29 +0,0 @@ ---- content/shell/test_runner/test_runner.cc.orig 2020-05-13 18:40:32 UTC -+++ content/shell/test_runner/test_runner.cc -@@ -62,7 +62,7 @@ - #include "ui/gfx/geometry/size.h" - #include "ui/gfx/skia_util.h" - --#if defined(OS_LINUX) || defined(OS_FUCHSIA) -+#if defined(OS_LINUX) || defined(OS_FUCHSIA) || defined(OS_BSD) - #include "third_party/blink/public/platform/web_font_render_style.h" - #endif - -@@ -1532,7 +1532,7 @@ void TestRunner::Reset() { - drag_image_.reset(); - - blink::WebSecurityPolicy::ClearOriginAccessList(); --#if defined(OS_LINUX) || defined(OS_FUCHSIA) -+#if defined(OS_LINUX) || defined(OS_FUCHSIA) || defined(OS_BSD) - blink::WebFontRenderStyle::SetSubpixelPositioning(false); - #endif - -@@ -2112,7 +2112,7 @@ void TestRunner::AddOriginAccessAllowListEntry( - } - - void TestRunner::SetTextSubpixelPositioning(bool value) { --#if defined(OS_LINUX) || defined(OS_FUCHSIA) -+#if defined(OS_LINUX) || defined(OS_FUCHSIA) || defined(OS_BSD) - // Since FontConfig doesn't provide a variable to control subpixel - // positioning, we'll fall back to setting it globally for all fonts. - blink::WebFontRenderStyle::SetSubpixelPositioning(value); Property changes on: head/www/chromium/files/patch-content_shell_test__runner_test__runner.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-third__party_skia_third__party_vulkanmemoryallocator_include_vk__mem__alloc.h =================================================================== --- head/www/chromium/files/patch-third__party_skia_third__party_vulkanmemoryallocator_include_vk__mem__alloc.h (revision 543832) +++ head/www/chromium/files/patch-third__party_skia_third__party_vulkanmemoryallocator_include_vk__mem__alloc.h (nonexistent) @@ -1,11 +0,0 @@ ---- third_party/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h.orig 2019-03-17 01:47:13 UTC -+++ third_party/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h -@@ -2232,7 +2232,7 @@ remove them if not needed. - #include // for std::mutex - #include // for std::atomic - --#if !defined(_WIN32) && !defined(__APPLE__) -+#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__FreeBSD__) - #include // for aligned_alloc() - #endif - Property changes on: head/www/chromium/files/patch-third__party_skia_third__party_vulkanmemoryallocator_include_vk__mem__alloc.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-media_webrtc_webrtc__switches.cc =================================================================== --- head/www/chromium/files/patch-media_webrtc_webrtc__switches.cc (revision 543832) +++ head/www/chromium/files/patch-media_webrtc_webrtc__switches.cc (nonexistent) @@ -1,11 +0,0 @@ ---- media/webrtc/webrtc_switches.cc.orig 2020-02-03 21:52:48 UTC -+++ media/webrtc/webrtc_switches.cc -@@ -50,7 +50,7 @@ namespace media { - - bool IsWebRtcApmInAudioServiceEnabled() { - #if defined(OS_WIN) || defined(OS_MACOSX) || \ -- (defined(OS_LINUX) && !defined(OS_CHROMEOS)) -+ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) - return base::FeatureList::IsEnabled(features::kWebRtcApmInAudioService) && - !base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kForceDisableWebRtcApmInAudioService); Property changes on: head/www/chromium/files/patch-media_webrtc_webrtc__switches.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-media_blink_webmediaplayer__impl.cc =================================================================== --- head/www/chromium/files/patch-media_blink_webmediaplayer__impl.cc (revision 543832) +++ head/www/chromium/files/patch-media_blink_webmediaplayer__impl.cc (nonexistent) @@ -1,15 +0,0 @@ ---- media/blink/webmediaplayer_impl.cc.orig 2020-05-22 09:58:28 UTC -+++ media/blink/webmediaplayer_impl.cc -@@ -280,7 +280,11 @@ void CreateAllocation(base::trace_event::ProcessMemory - - auto* std_allocator = base::trace_event::MemoryDumpManager::GetInstance() - ->system_allocator_pool_name(); -- pmd->AddSuballocation(dump->guid(), std_allocator); -+ if (std_allocator == nullptr) { -+ pmd->AddSuballocation(dump->guid(), std::string()); -+ } else { -+ pmd->AddSuballocation(dump->guid(), std_allocator); -+ } - } - - } // namespace Property changes on: head/www/chromium/files/patch-media_blink_webmediaplayer__impl.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-chrome_browser_policy_policy__prefs__browsertest.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_policy_policy__prefs__browsertest.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_policy_policy__prefs__browsertest.cc (nonexistent) @@ -1,11 +0,0 @@ ---- chrome/browser/policy/policy_prefs_browsertest.cc.orig 2020-05-13 18:40:22 UTC -+++ chrome/browser/policy/policy_prefs_browsertest.cc -@@ -296,6 +296,8 @@ class PolicyTestCase { - const std::string os("chromeos"); - #elif defined(OS_LINUX) - const std::string os("linux"); -+#elif defined(OS_FREEBSD) -+ const std::string os("freebsd"); - #else - #error "Unknown platform" - #endif Property changes on: head/www/chromium/files/patch-chrome_browser_policy_policy__prefs__browsertest.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-base_test_generate__fontconfig__caches.cc =================================================================== --- head/www/chromium/files/patch-base_test_generate__fontconfig__caches.cc (revision 543832) +++ head/www/chromium/files/patch-base_test_generate__fontconfig__caches.cc (nonexistent) @@ -1,17 +0,0 @@ ---- base/test/generate_fontconfig_caches.cc.orig 2019-12-16 21:51:21 UTC -+++ base/test/generate_fontconfig_caches.cc -@@ -59,7 +59,14 @@ int main() { - FcFini(); - - // Check existence of intended fontconfig cache file. -+#if defined(OS_BSD) -+ // Our version of fontconfig is too old to respect .uuid files in font directories, -+ // so we check for the CACHEDIR.TAG file instead - CHECK(base::PathExists( -+ fontconfig_caches.Append("CACHEDIR.TAG"))); -+#else -+ CHECK(base::PathExists( - fontconfig_caches.Append(base::StrCat({uuid, "-le64.cache-7"})))); -+#endif - return 0; - } Property changes on: head/www/chromium/files/patch-base_test_generate__fontconfig__caches.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-third_party_zlib_cpu__features.c =================================================================== --- head/www/chromium/files/patch-third_party_zlib_cpu__features.c (revision 543832) +++ head/www/chromium/files/patch-third_party_zlib_cpu__features.c (nonexistent) @@ -1,55 +0,0 @@ ---- third_party/zlib/cpu_features.c.orig 2020-05-18 20:40:28 UTC -+++ third_party/zlib/cpu_features.c -@@ -24,11 +24,20 @@ int ZLIB_INTERNAL x86_cpu_enable_simd = 0; - - #ifndef CPU_NO_SIMD - --#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_FUCHSIA) -+#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_FUCHSIA) || defined(ARMV8_OS_FREEBSD) - #include - #endif - --#if defined(ARMV8_OS_ANDROID) -+#if defined(ARMV8_OS_FREEBSD) -+#include -+#include -+#ifndef ID_AA64ISAR0_AES_VAL -+#define ID_AA64ISAR0_AES_VAL ID_AA64ISAR0_AES -+#endif -+#ifndef ID_AA64ISAR0_CRC32_VAL -+#define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32 -+#endif -+#elif defined(ARMV8_OS_ANDROID) - #include - #elif defined(ARMV8_OS_LINUX) - #include -@@ -49,7 +58,7 @@ int ZLIB_INTERNAL x86_cpu_enable_simd = 0; - static void _cpu_check_features(void); - #endif - --#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_FUCHSIA) || defined(X86_NOT_WINDOWS) -+#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_FUCHSIA) || defined(X86_NOT_WINDOWS) || defined(ARMV8_OS_FREEBSD) - static pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT; - void ZLIB_INTERNAL cpu_check_features(void) - { -@@ -108,6 +117,13 @@ static void _cpu_check_features(void) - #elif defined(ARMV8_OS_WINDOWS) - arm_cpu_enable_crc32 = IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE); - arm_cpu_enable_pmull = IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE); -+#elif defined(ARMV8_OS_FREEBSD) -+ uint64_t id_aa64isar0; -+ id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); -+ if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) -+ arm_cpu_enable_pmull = 1; -+ if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) -+ arm_cpu_enable_crc32 = 1; - #endif - } - #endif -@@ -145,4 +161,4 @@ static void _cpu_check_features(void) - } - #endif - #endif --#endif -\ No newline at end of file -+#endif Property changes on: head/www/chromium/files/patch-third_party_zlib_cpu__features.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-chrome_browser_extensions_install__signer.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_install__signer.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_extensions_install__signer.cc (nonexistent) @@ -1,18 +0,0 @@ ---- chrome/browser/extensions/install_signer.cc.orig 2020-03-16 18:39:44 UTC -+++ chrome/browser/extensions/install_signer.cc -@@ -294,13 +294,13 @@ void LogRequestStartHistograms() { - DCHECK(g_single_thread_checker.Get().CalledOnValidThread()); - - // Process::Current().CreationTime is only defined on some platforms. --#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) -+#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) - const base::Time process_creation_time = - base::Process::Current().CreationTime(); - UMA_HISTOGRAM_COUNTS_1M( - "ExtensionInstallSigner.UptimeAtTimeOfRequest", - (base::Time::Now() - process_creation_time).InSeconds()); --#endif // defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) -+#endif // defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) - - base::TimeDelta delta; - base::TimeTicks now = base::TimeTicks::Now(); Property changes on: head/www/chromium/files/patch-chrome_browser_extensions_install__signer.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-base_test_fontconfig__util__linux.cc =================================================================== --- head/www/chromium/files/patch-base_test_fontconfig__util__linux.cc (revision 543832) +++ head/www/chromium/files/patch-base_test_fontconfig__util__linux.cc (nonexistent) @@ -1,406 +0,0 @@ ---- base/test/fontconfig_util_linux.cc.orig 2020-02-03 21:52:37 UTC -+++ base/test/fontconfig_util_linux.cc -@@ -6,22 +6,397 @@ - - #include - --#include -- - #include "base/base_paths.h" - #include "base/environment.h" - #include "base/files/file_path.h" -+#include "base/files/file_util.h" - #include "base/logging.h" -+#include "base/macros.h" - #include "base/path_service.h" -+#include "base/strings/string_util.h" - - namespace base { - -+namespace { -+ -+const char kFontsConfTemplate[] = R"( -+ -+ -+ -+ -+ $1 -+ -+ -+ $2 -+ -+ -+ -+ -+ false -+ -+ -+ -+ -+ -+ Times -+ -+ -+ Tinos -+ -+ -+ -+ -+ -+ sans -+ -+ -+ DejaVu Sans -+ -+ -+ -+ -+ -+ sans serif -+ -+ -+ Arimo -+ -+ -+ -+ -+ -+ -+ Helvetica -+ -+ -+ Arimo -+ -+ -+ -+ -+ -+ sans-serif -+ -+ -+ Arimo -+ -+ -+ -+ -+ -+ serif -+ -+ -+ Tinos -+ -+ -+ -+ -+ -+ mono -+ -+ -+ Cousine -+ -+ -+ -+ -+ -+ monospace -+ -+ -+ Cousine -+ -+ -+ -+ -+ -+ Courier -+ -+ -+ Cousine -+ -+ -+ -+ -+ -+ cursive -+ -+ -+ Comic Sans MS -+ -+ -+ -+ -+ -+ fantasy -+ -+ -+ Impact -+ -+ -+ -+ -+ -+ Monaco -+ -+ -+ Tinos -+ -+ -+ -+ -+ -+ Arial -+ -+ -+ Arimo -+ -+ -+ -+ -+ -+ Courier New -+ -+ -+ Cousine -+ -+ -+ -+ -+ -+ Georgia -+ -+ -+ Gelasio -+ -+ -+ -+ -+ -+ Times New Roman -+ -+ -+ Tinos -+ -+ -+ -+ -+ -+ Verdana -+ -+ -+ -+ Arimo -+ -+ -+ -+ -+ -+ -+ NonAntiAliasedSans -+ -+ -+ Arimo -+ -+ -+ false -+ -+ -+ -+ -+ -+ SlightHintedGeorgia -+ -+ -+ Gelasio -+ -+ -+ hintslight -+ -+ -+ -+ -+ -+ NonHintedSans -+ -+ -+ Arimo -+ -+ -+ -+ hintfull -+ -+ -+ false -+ -+ -+ -+ -+ -+ AutohintedSerif -+ -+ -+ Arimo -+ -+ -+ true -+ -+ -+ hintmedium -+ -+ -+ -+ -+ -+ HintedSerif -+ -+ -+ Arimo -+ -+ -+ false -+ -+ -+ hintmedium -+ -+ -+ -+ -+ -+ FullAndAutoHintedSerif -+ -+ -+ Arimo -+ -+ -+ true -+ -+ -+ hintfull -+ -+ -+ -+ -+ -+ SubpixelEnabledArial -+ -+ -+ Arimo -+ -+ -+ rgb -+ -+ -+ -+ -+ -+ SubpixelDisabledArial -+ -+ -+ Arimo -+ -+ -+ none -+ -+ -+ -+ -+ -+ -+ SubpixelPositioning -+ -+ -+ Tinos -+ -+ -+ -+ -+ -+ -+ SubpixelPositioningAhem -+ -+ -+ ahem -+ -+ -+ -+ -+ -+ SlightHintedTimesNewRoman -+ -+ -+ Tinos -+ -+ -+ hintslight -+ -+ -+ -+ -+ -+ -+ DejaVu Sans -+ -+ -+ -+ -+)"; -+ -+} // namespace -+ - void SetUpFontconfig() { -- FilePath dir_module; -- CHECK(PathService::Get(DIR_MODULE, &dir_module)); -+ std::unique_ptr env = Environment::Create(); -+ if (!env->HasVar("FONTCONFIG_FILE")) { -+ // fonts.conf must be generated on-the-fly since it contains absolute paths -+ // which may be different if -+ // 1. The user moves/renames their build directory (or any parent dirs). -+ // 2. The build directory is mapped on a swarming bot at a location -+ // different from the one the buildbot used. -+ FilePath dir_module; -+ PathService::Get(DIR_MODULE, &dir_module); -+ FilePath font_cache = dir_module.Append("fontconfig_caches"); -+ FilePath test_fonts = dir_module.Append("test_fonts"); -+ std::string fonts_conf = ReplaceStringPlaceholders( -+ kFontsConfTemplate, {font_cache.value(), test_fonts.value()}, nullptr); - -- std::unique_ptr env(Environment::Create()); -- CHECK(env->SetVar("FONTCONFIG_SYSROOT", dir_module.value().c_str())); -+ // Write the data to a different file and then atomically rename it to -+ // fonts.conf. This avoids the file being in a bad state when different -+ // parallel tests call this function at the same time. -+ FilePath fonts_conf_file_temp; -+ if(!CreateTemporaryFileInDir(dir_module, &fonts_conf_file_temp)) -+ CHECK(CreateTemporaryFile(&fonts_conf_file_temp)); -+ CHECK( -+ WriteFile(fonts_conf_file_temp, fonts_conf.c_str(), fonts_conf.size())); -+ FilePath fonts_conf_file = dir_module.Append("fonts.conf"); -+ if (ReplaceFile(fonts_conf_file_temp, fonts_conf_file, nullptr)) -+ env->SetVar("FONTCONFIG_FILE", fonts_conf_file.value()); -+ else -+ env->SetVar("FONTCONFIG_FILE", fonts_conf_file_temp.value()); -+ } - } - - } // namespace base Property changes on: head/www/chromium/files/patch-base_test_fontconfig__util__linux.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-ui_message__center_public_cpp_message__center__constants.h =================================================================== --- head/www/chromium/files/patch-ui_message__center_public_cpp_message__center__constants.h (revision 543832) +++ head/www/chromium/files/patch-ui_message__center_public_cpp_message__center__constants.h (nonexistent) @@ -1,11 +0,0 @@ ---- ui/message_center/public/cpp/message_center_constants.h.orig 2020-05-13 18:40:37 UTC -+++ ui/message_center/public/cpp/message_center_constants.h -@@ -109,7 +109,7 @@ const int kButtonHorizontalPadding = 16; // In DIPs. - const int kButtonIconTopPadding = 11; // In DIPs. - const int kButtonIconToTitlePadding = 16; // In DIPs. - --#if !defined(OS_LINUX) || defined(USE_AURA) -+#if (!defined(OS_LINUX) && !defined(OS_BSD)) || defined(USE_AURA) - constexpr SkColor kButtonSeparatorColor = SkColorSetRGB(234, 234, 234); - constexpr SkColor kHoveredButtonBackgroundColor = SkColorSetRGB(243, 243, 243); - #endif Property changes on: head/www/chromium/files/patch-ui_message__center_public_cpp_message__center__constants.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-content_browser_media_media__internals.cc =================================================================== --- head/www/chromium/files/patch-content_browser_media_media__internals.cc (revision 543832) +++ head/www/chromium/files/patch-content_browser_media_media__internals.cc (nonexistent) @@ -1,11 +0,0 @@ ---- content/browser/media/media_internals.cc.orig 2020-05-13 18:40:31 UTC -+++ content/browser/media/media_internals.cc -@@ -560,7 +560,7 @@ void MediaInternals::UpdateVideoCaptureDeviceCapabilit - device_dict->SetString("id", descriptor.device_id); - device_dict->SetString("name", descriptor.GetNameAndModel()); - device_dict->Set("formats", std::move(format_list)); --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \ - defined(OS_ANDROID) - device_dict->SetString("captureApi", descriptor.GetCaptureApiTypeString()); - #endif Property changes on: head/www/chromium/files/patch-content_browser_media_media__internals.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-3p-pdfium_3p_base_allocator_partition__allocator_page__allocator__internals__posix.h =================================================================== --- head/www/chromium/files/patch-3p-pdfium_3p_base_allocator_partition__allocator_page__allocator__internals__posix.h (revision 543832) +++ head/www/chromium/files/patch-3p-pdfium_3p_base_allocator_partition__allocator_page__allocator__internals__posix.h (revision 543833) @@ -1,11 +1,11 @@ ---- third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2020-05-18 18:42:41 UTC +--- third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2020-07-07 22:03:25 UTC +++ third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h @@ -16,7 +16,7 @@ #if defined(OS_ANDROID) #include #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #include #include Index: head/www/chromium/files/patch-BUILD.gn =================================================================== --- head/www/chromium/files/patch-BUILD.gn (revision 543832) +++ head/www/chromium/files/patch-BUILD.gn (revision 543833) @@ -1,87 +1,87 @@ ---- BUILD.gn.orig 2020-06-03 18:40:09 UTC +--- BUILD.gn.orig 2020-07-07 21:58:11 UTC +++ BUILD.gn -@@ -418,7 +418,7 @@ group("gn_all") { +@@ -417,7 +417,7 @@ group("gn_all") { ] } - if (is_linux || is_android) { + if ((is_linux && !is_bsd) || is_android) { deps += [ "//third_party/breakpad:breakpad_unittests", "//third_party/breakpad:core-2-minidump", @@ -459,8 +459,6 @@ group("gn_all") { "//net:disk_cache_memory_test", "//net:quic_client", "//net:quic_server", - "//sandbox/linux:chrome_sandbox", - "//sandbox/linux:sandbox_linux_unittests", "//testing:empty_main", ] @@ -515,10 +513,6 @@ group("gn_all") { "//chrome/test:load_library_perf_tests", "//chrome/test:sync_performance_tests", "//chrome/test/chromedriver:chromedriver", - "//courgette:courgette", - "//courgette:courgette_fuzz", - "//courgette:courgette_minimal_tool", - "//courgette:courgette_unittests", "//media/cast:generate_barcode_video", "//media/cast:generate_timecode_audio", "//net:crash_cache", -@@ -579,10 +573,6 @@ group("gn_all") { +@@ -578,10 +572,6 @@ group("gn_all") { "//mojo:mojo_perftests", "//services/service_manager/public/cpp", "//testing/gmock:gmock_main", - "//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_android) { -@@ -656,7 +646,7 @@ group("gn_all") { +@@ -655,7 +645,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)" ] } -@@ -789,7 +779,6 @@ group("gn_all") { +@@ -788,7 +778,6 @@ group("gn_all") { "//chrome/browser/vr:vr_common_perftests", "//chrome/browser/vr:vr_common_unittests", "//chrome/browser/vr:vr_pixeltests", - "//tools/perf/contrib/vr_benchmarks:vr_perf_tests", ] if (is_desktop_linux && use_ozone) { deps += [ "//chrome/browser/vr/testapp:vr_testapp" ] -@@ -1072,7 +1061,7 @@ if (!is_ios) { +@@ -1074,7 +1063,7 @@ if (!is_ios) { ] } - if (!is_win && !is_android) { + if (!is_win && !is_android && !is_bsd) { data_deps += [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } -@@ -1081,7 +1070,7 @@ if (!is_ios) { +@@ -1083,7 +1072,7 @@ if (!is_ios) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } - if (is_linux) { + if (is_linux && !is_bsd) { data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ] } -@@ -1274,9 +1263,6 @@ group("chromium_builder_perf") { +@@ -1276,9 +1265,6 @@ group("chromium_builder_perf") { if (is_win) { data_deps += [ "//chrome/installer/mini_installer:mini_installer" ] - } else { - data_deps += - [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ] } if (is_win || is_android) { data_deps += [ Index: head/www/chromium/files/patch-apps_app__restore__service__browsertest.cc =================================================================== --- head/www/chromium/files/patch-apps_app__restore__service__browsertest.cc (revision 543832) +++ head/www/chromium/files/patch-apps_app__restore__service__browsertest.cc (revision 543833) @@ -1,11 +1,11 @@ ---- apps/app_restore_service_browsertest.cc.orig 2020-03-23 15:18:04 UTC +--- apps/app_restore_service_browsertest.cc.orig 2020-07-07 21:57:29 UTC +++ apps/app_restore_service_browsertest.cc -@@ -147,7 +147,7 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, FileAcc +@@ -148,7 +148,7 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, FileAcc } // Flaky: crbug.com/269613 -#if defined(OS_LINUX) || defined(OS_WIN) +#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) #define MAYBE_FileAccessIsRestored DISABLED_FileAccessIsRestored #else #define MAYBE_FileAccessIsRestored FileAccessIsRestored Index: head/www/chromium/files/patch-base_BUILD.gn =================================================================== --- head/www/chromium/files/patch-base_BUILD.gn (revision 543832) +++ head/www/chromium/files/patch-base_BUILD.gn (revision 543833) @@ -1,107 +1,107 @@ ---- base/BUILD.gn.orig 2020-05-13 18:40:16 UTC +--- base/BUILD.gn.orig 2020-07-07 21:58:11 UTC +++ base/BUILD.gn -@@ -59,7 +59,7 @@ declare_args() { +@@ -60,7 +60,7 @@ declare_args() { # replacement base::Location::Current(). On by default in non-official builds # for testing purposes. # TODO(https://crbug.com/974061): remove this eventually. - from_here_uses_location_builtins = !is_official_build + from_here_uses_location_builtins = !is_official_build && !is_bsd # Unsafe developer build. Has developer-friendly features that may weaken or # disable security measures like sandboxing or ASLR. -@@ -929,7 +929,7 @@ jumbo_component("base") { +@@ -936,7 +936,7 @@ jumbo_component("base") { "timer/hi_res_timer_manager_posix.cc", ] - if (!is_nacl && !is_mac && !is_ios) { + if (!is_nacl && !is_mac && !is_ios && !is_bsd) { sources += [ "profiler/stack_copier_signal.cc", "profiler/stack_copier_signal.h", -@@ -938,6 +938,12 @@ jumbo_component("base") { +@@ -945,6 +945,12 @@ jumbo_component("base") { "profiler/thread_delegate_posix.h", ] } + + if (is_bsd) { + sources += [ + "profiler/stack_sampler_posix.cc", + ] + } } if (is_win) { -@@ -1321,7 +1327,7 @@ jumbo_component("base") { +@@ -1329,7 +1335,7 @@ jumbo_component("base") { # Needed for if using newer C++ library than sysroot, except if # building inside the cros_sdk environment - use host_toolchain as a # more robust check for this. - if (!use_sysroot && (is_android || (is_linux && !is_chromecast)) && + if (!use_sysroot && (is_android || (is_linux && !is_chromecast) && !is_clang) && host_toolchain != "//build/toolchain/cros:host") { libs += [ "atomic" ] } -@@ -1347,7 +1353,7 @@ jumbo_component("base") { +@@ -1355,7 +1361,7 @@ jumbo_component("base") { "allocator/allocator_shim_override_glibc_weak_symbols.h", ] deps += [ "//base/allocator:tcmalloc" ] - } else if (is_linux && use_allocator == "none") { + } else if ((is_linux && !is_bsd) && use_allocator == "none") { sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ] } else if (is_android && use_allocator == "none") { sources += [ -@@ -1942,6 +1948,33 @@ jumbo_component("base") { +@@ -1952,6 +1958,33 @@ jumbo_component("base") { } } + if (is_bsd) { + sources -= [ + "files/file_path_watcher_linux.cc", + "files/file_util_linux.cc", + "process/memory_linux.cc", + "process/process_handle_linux.cc", + "process/process_iterator_linux.cc", + "process/process_metrics_linux.cc", + "system/sys_info_linux.cc" + ] + sources += [ + "files/file_path_watcher_kqueue.cc", + "files/file_path_watcher_kqueue.h", + "files/file_path_watcher_stub.cc", + "process/memory_stubs.cc", + "process/process_handle_freebsd.cc", + "process/process_iterator_freebsd.cc", + "process/process_metrics_freebsd.cc", + "system/sys_info_freebsd.cc", + ] + libs = [ + "execinfo", # logging.cc + "kvm", # process_metrics_freebsd + "util" # process_metrics_freebsd + ] + } + # iOS if (is_ios) { sources -= [ -@@ -2898,7 +2931,7 @@ test("base_unittests") { +@@ -2946,7 +2979,7 @@ test("base_unittests") { "posix/unix_domain_socket_unittest.cc", "task/thread_pool/task_tracker_posix_unittest.cc", ] - if (!is_nacl && !is_mac && !is_ios) { + if (!is_nacl && !is_mac && !is_ios && !is_bsd) { sources += [ "profiler/stack_copier_signal_unittest.cc" ] } } -@@ -3087,6 +3120,12 @@ test("base_unittests") { +@@ -3154,6 +3187,12 @@ test("base_unittests") { manifest = "//build/config/fuchsia/tests.cmx" } + + if (is_bsd) { + sources -= [ + "debug/proc_maps_linux_unittest.cc", + ] + } if (!is_fuchsia && !is_ios) { sources += [ "files/file_locking_unittest.cc" ] Index: head/www/chromium/files/patch-base_allocator_allocator__shim__unittest.cc =================================================================== --- head/www/chromium/files/patch-base_allocator_allocator__shim__unittest.cc (revision 543832) +++ head/www/chromium/files/patch-base_allocator_allocator__shim__unittest.cc (revision 543833) @@ -1,45 +1,45 @@ ---- base/allocator/allocator_shim_unittest.cc.orig 2020-03-16 18:39:41 UTC +--- base/allocator/allocator_shim_unittest.cc.orig 2020-07-07 21:57:30 UTC +++ base/allocator/allocator_shim_unittest.cc -@@ -348,7 +348,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) { +@@ -355,7 +355,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) { ASSERT_GE(aligned_allocs_intercepted_by_size[61], 1u); #endif // !OS_WIN -#if !defined(OS_WIN) && !defined(OS_MACOSX) +#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_BSD) void* memalign_ptr = memalign(128, 53); ASSERT_NE(nullptr, memalign_ptr); ASSERT_EQ(0u, reinterpret_cast(memalign_ptr) % 128); -@@ -361,7 +361,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) { +@@ -368,7 +368,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) { ASSERT_GE(aligned_allocs_intercepted_by_alignment[kPageSize], 1u); // pvalloc rounds the size up to the next page. ASSERT_GE(aligned_allocs_intercepted_by_size[kPageSize], 1u); -#endif // !OS_WIN && !OS_MACOSX +#endif // !OS_WIN && !OS_MACOSX && !OS_BSD char* realloc_ptr = static_cast(malloc(10)); strcpy(realloc_ptr, "foobar"); -@@ -377,13 +377,13 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) { +@@ -384,13 +384,13 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) { free(zero_alloc_ptr); ASSERT_GE(frees_intercepted_by_addr[Hash(zero_alloc_ptr)], 1u); -#if !defined(OS_WIN) && !defined(OS_MACOSX) +#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_BSD) free(memalign_ptr); ASSERT_GE(frees_intercepted_by_addr[Hash(memalign_ptr)], 1u); free(pvalloc_ptr); ASSERT_GE(frees_intercepted_by_addr[Hash(pvalloc_ptr)], 1u); -#endif // !OS_WIN && !OS_MACOSX +#endif // !OS_WIN && !OS_MACOSX && !OS_BSD #if !defined(OS_WIN) free(posix_memalign_ptr); -@@ -550,7 +550,7 @@ static size_t GetAllocatedSize(void* ptr) { +@@ -557,7 +557,7 @@ static size_t GetAllocatedSize(void* ptr) { static size_t GetAllocatedSize(void* ptr) { return malloc_size(ptr); } -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) static size_t GetAllocatedSize(void* ptr) { return malloc_usable_size(ptr); } Index: head/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__unittest.cc =================================================================== --- head/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__unittest.cc (revision 543832) +++ head/www/chromium/files/patch-base_allocator_partition__allocator_partition__alloc__unittest.cc (revision 543833) @@ -1,17 +1,17 @@ ---- base/allocator/partition_allocator/partition_alloc_unittest.cc.orig 2020-03-23 15:20:45 UTC +--- base/allocator/partition_allocator/partition_alloc_unittest.cc.orig 2020-07-07 21:58:11 UTC +++ base/allocator/partition_allocator/partition_alloc_unittest.cc -@@ -314,9 +314,13 @@ void FreeFullPage(PartitionPage* page) { +@@ -307,9 +307,13 @@ void FreeFullPage(PartitionRoot* root, PartitionRoot:: } } -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) bool CheckPageInCore(void* ptr, bool in_core) { +#if defined(OS_BSD) + char ret = 0; +#else unsigned char ret = 0; +#endif EXPECT_EQ(0, mincore(ptr, kSystemPageSize, &ret)); return in_core == (ret & 1); } Index: head/www/chromium/files/patch-base_cpu.cc =================================================================== --- head/www/chromium/files/patch-base_cpu.cc (revision 543832) +++ head/www/chromium/files/patch-base_cpu.cc (revision 543833) @@ -1,38 +1,38 @@ ---- base/cpu.cc.orig 2019-10-21 19:06:18 UTC +--- base/cpu.cc.orig 2020-07-07 21:57:30 UTC +++ base/cpu.cc -@@ -14,7 +14,7 @@ +@@ -15,7 +15,7 @@ #include "base/stl_util.h" -#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX)) +#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)) #include "base/files/file_util.h" #endif -@@ -135,7 +135,7 @@ uint64_t xgetbv(uint32_t xcr) { +@@ -136,7 +136,7 @@ uint64_t xgetbv(uint32_t xcr) { #endif // ARCH_CPU_X86_FAMILY -#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX)) +#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)) std::string* CpuInfoBrand() { static std::string* brand = []() { // This function finds the value from /proc/cpuinfo under the key "model -@@ -165,7 +165,7 @@ std::string* CpuInfoBrand() { +@@ -166,7 +166,7 @@ std::string* CpuInfoBrand() { return brand; } #endif // defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || - // defined(OS_LINUX)) + // defined(OS_LINUX) || defined(OS_BSD)) } // namespace -@@ -287,7 +287,7 @@ void CPU::Initialize() { +@@ -288,7 +288,7 @@ void CPU::Initialize() { } } #elif defined(ARCH_CPU_ARM_FAMILY) -#if (defined(OS_ANDROID) || defined(OS_LINUX)) +#if (defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)) cpu_brand_ = *CpuInfoBrand(); #elif defined(OS_WIN) // Windows makes high-resolution thread timing information available in Index: head/www/chromium/files/patch-base_debug_debugger__posix.cc =================================================================== --- head/www/chromium/files/patch-base_debug_debugger__posix.cc (revision 543832) +++ head/www/chromium/files/patch-base_debug_debugger__posix.cc (revision 543833) @@ -1,56 +1,56 @@ ---- base/debug/debugger_posix.cc.orig 2020-05-13 18:40:16 UTC +--- base/debug/debugger_posix.cc.orig 2020-07-07 21:58:11 UTC +++ base/debug/debugger_posix.cc -@@ -95,7 +95,7 @@ bool BeingDebugged() { +@@ -98,7 +98,7 @@ bool BeingDebugged() { KERN_PROC, KERN_PROC_PID, getpid() -#if defined(OS_OPENBSD) +#if defined(OS_BSD) , sizeof(struct kinfo_proc), 0 #endif -@@ -103,33 +103,35 @@ bool BeingDebugged() { +@@ -106,33 +106,35 @@ bool BeingDebugged() { // Caution: struct kinfo_proc is marked __APPLE_API_UNSTABLE. The source and // binary interfaces may change. - struct kinfo_proc info; - size_t info_size = sizeof(info); + struct kinfo_proc *info; + size_t info_size; -#if defined(OS_OPENBSD) if (sysctl(mib, base::size(mib), NULL, &info_size, NULL, 0) < 0) return -1; + info = (struct kinfo_proc *)malloc(info_size); mib[5] = (info_size / sizeof(struct kinfo_proc)); -#endif - int sysctl_result = sysctl(mib, base::size(mib), &info, &info_size, NULL, 0); + int sysctl_result = sysctl(mib, base::size(mib), info, &info_size, NULL, 0); DCHECK_EQ(sysctl_result, 0); if (sysctl_result != 0) { is_set = true; being_debugged = false; - return being_debugged; + goto out; } // This process is being debugged if the P_TRACED flag is set. is_set = true; #if defined(OS_FREEBSD) - being_debugged = (info.ki_flag & P_TRACED) != 0; + being_debugged = (info->ki_flag & P_TRACED) != 0; #elif defined(OS_BSD) - being_debugged = (info.p_flag & P_TRACED) != 0; + being_debugged = (info->p_flag & P_TRACED) != 0; #else - being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0; + being_debugged = (info->kp_proc.p_flag & P_TRACED) != 0; #endif + +out: + free(info); return being_debugged; } Index: head/www/chromium/files/patch-base_debug_elf__reader.cc =================================================================== --- head/www/chromium/files/patch-base_debug_elf__reader.cc (revision 543832) +++ head/www/chromium/files/patch-base_debug_elf__reader.cc (revision 543833) @@ -1,28 +1,28 @@ ---- base/debug/elf_reader.cc.orig 2020-02-24 18:39:05 UTC +--- base/debug/elf_reader.cc.orig 2020-07-07 21:57:30 UTC +++ base/debug/elf_reader.cc -@@ -35,7 +35,9 @@ using Nhdr = Elf64_Nhdr; +@@ -36,7 +36,9 @@ using Nhdr = Elf64_Nhdr; using Word = Elf64_Word; #endif +#if !defined(OS_BSD) constexpr char kGnuNoteName[] = "GNU"; +#endif // Returns a pointer to the header of the ELF binary mapped into memory, // or a null pointer if the header is invalid. -@@ -98,6 +100,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, +@@ -99,6 +101,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, bool found = false; while (current_section < section_end) { current_note = reinterpret_cast(current_section); +#if !defined(OS_BSD) if (current_note->n_type == NT_GNU_BUILD_ID) { StringPiece note_name(current_section + sizeof(Nhdr), current_note->n_namesz); -@@ -107,6 +110,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, +@@ -108,6 +111,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, break; } } +#endif size_t section_size = bits::Align(current_note->n_namesz, 4) + bits::Align(current_note->n_descsz, 4) + Index: head/www/chromium/files/patch-base_debug_proc__maps__linux.cc =================================================================== --- head/www/chromium/files/patch-base_debug_proc__maps__linux.cc (revision 543832) +++ head/www/chromium/files/patch-base_debug_proc__maps__linux.cc (revision 543833) @@ -1,141 +1,141 @@ ---- base/debug/proc_maps_linux.cc.orig 2020-03-16 18:39:41 UTC +--- base/debug/proc_maps_linux.cc.orig 2020-07-07 21:57:30 UTC +++ base/debug/proc_maps_linux.cc -@@ -12,7 +12,7 @@ +@@ -13,7 +13,7 @@ #include "base/strings/string_split.h" #include "build/build_config.h" -#if defined(OS_LINUX) || defined(OS_ANDROID) +#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_ANDROID) #include #endif -@@ -28,6 +28,11 @@ +@@ -29,6 +29,11 @@ namespace base { namespace debug { +#if defined(OS_BSD) +const char kProcSelfMapsPath[] = "/proc/curproc/map"; +#else +const char kProcSelfMapsPath[] = "/proc/self/maps"; + // Scans |proc_maps| starting from |pos| returning true if the gate VMA was // found, otherwise returns false. static bool ContainsGateVMA(std::string* proc_maps, size_t pos) { -@@ -43,15 +48,16 @@ static bool ContainsGateVMA(std::string* proc_maps, si +@@ -44,15 +49,16 @@ static bool ContainsGateVMA(std::string* proc_maps, si return false; #endif } +#endif bool ReadProcMaps(std::string* proc_maps) { // seq_file only writes out a page-sized amount on each call. Refer to header // file for details. const long kReadSize = sysconf(_SC_PAGESIZE); - base::ScopedFD fd(HANDLE_EINTR(open("/proc/self/maps", O_RDONLY))); + base::ScopedFD fd(HANDLE_EINTR(open(kProcSelfMapsPath, O_RDONLY))); if (!fd.is_valid()) { - DPLOG(ERROR) << "Couldn't open /proc/self/maps"; + DPLOG(ERROR) << "Couldn't open " << kProcSelfMapsPath; return false; } proc_maps->clear(); -@@ -65,7 +71,7 @@ bool ReadProcMaps(std::string* proc_maps) { +@@ -66,7 +72,7 @@ bool ReadProcMaps(std::string* proc_maps) { ssize_t bytes_read = HANDLE_EINTR(read(fd.get(), buffer, kReadSize)); if (bytes_read < 0) { - DPLOG(ERROR) << "Couldn't read /proc/self/maps"; + DPLOG(ERROR) << "Couldn't read " << kProcSelfMapsPath; proc_maps->clear(); return false; } -@@ -76,6 +82,7 @@ bool ReadProcMaps(std::string* proc_maps) { +@@ -77,6 +83,7 @@ bool ReadProcMaps(std::string* proc_maps) { if (bytes_read == 0) break; +#if !defined(OS_BSD) // The gate VMA is handled as a special case after seq_file has finished // iterating through all entries in the virtual memory table. // -@@ -86,6 +93,7 @@ bool ReadProcMaps(std::string* proc_maps) { +@@ -87,6 +94,7 @@ bool ReadProcMaps(std::string* proc_maps) { // Avoid this by searching for the gate VMA and breaking early. if (ContainsGateVMA(proc_maps, pos)) break; +#endif } return true; -@@ -114,10 +122,32 @@ bool ParseProcMaps(const std::string& input, +@@ -115,10 +123,32 @@ bool ParseProcMaps(const std::string& input, MappedMemoryRegion region; const char* line = lines[i].c_str(); char permissions[5] = {'\0'}; // Ensure NUL-terminated string. + int path_index = 0; + +#if defined(OS_BSD) + if (lines[i].empty()) + continue; + + + char cow; + + // Format: + // + // start end resident private_resident obj perms ref_count shadow_count flags cow needs_copy type fullpath cred ruid + // 0x200000 0x202000 2 6 0xfffff80005be9000 r-- 3 1 0x1000 COW NC vnode /bin/cat NCH -1 + // + if (sscanf(line, "%" SCNxPTR " %" SCNxPTR " %*ld %*ld %*llx %3c %*d %*d %*x %c%*s %*s %*s %n", + ®ion.start, ®ion.end, permissions, &cow, &path_index) < 4) { + DPLOG(WARNING) << "sscanf failed for line: " << line; + return false; + } + + const char* fullpath = line + path_index; + const char* cred = strchr(fullpath, ' '); +#else uint8_t dev_major = 0; uint8_t dev_minor = 0; long inode = 0; - int path_index = 0; // Sample format from man 5 proc: // -@@ -133,6 +163,7 @@ bool ParseProcMaps(const std::string& input, +@@ -134,6 +164,7 @@ bool ParseProcMaps(const std::string& input, DPLOG(WARNING) << "sscanf failed for line: " << line; return false; } +#endif region.permissions = 0; -@@ -151,14 +182,31 @@ bool ParseProcMaps(const std::string& input, +@@ -152,14 +183,31 @@ bool ParseProcMaps(const std::string& input, else if (permissions[2] != '-') return false; +#if defined(OS_BSD) + if (cow == 'C') { + region.permissions |= MappedMemoryRegion::PRIVATE; + } else if (cow != 'N') { + DPLOG(WARNING) << "unknown value for COW in line " << line << ": " << cow; + return false; + } +#else if (permissions[3] == 'p') region.permissions |= MappedMemoryRegion::PRIVATE; else if (permissions[3] != 's' && permissions[3] != 'S') // Shared memory. return false; +#endif // Pushing then assigning saves us a string copy. regions.push_back(region); +#if defined(OS_BSD) + if (cred != nullptr) { + regions.back().path.assign(line + path_index, cred - fullpath); + } else { + regions.back().path.assign(line + path_index); + } +#else regions.back().path.assign(line + path_index); +#endif } regions_out->swap(regions); Index: head/www/chromium/files/patch-base_files_file__path__watcher__unittest.cc =================================================================== --- head/www/chromium/files/patch-base_files_file__path__watcher__unittest.cc (revision 543832) +++ head/www/chromium/files/patch-base_files_file__path__watcher__unittest.cc (revision 543833) @@ -1,41 +1,41 @@ ---- base/files/file_path_watcher_unittest.cc.orig 2020-05-13 18:40:16 UTC +--- base/files/file_path_watcher_unittest.cc.orig 2020-07-07 21:58:11 UTC +++ base/files/file_path_watcher_unittest.cc -@@ -430,7 +430,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { +@@ -424,7 +424,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) { VLOG(1) << "Waiting for file1 creation"; ASSERT_TRUE(WaitForEvents()); -#if !defined(OS_MACOSX) +#if !defined(OS_MACOSX) && !defined(OS_BSD) // Mac implementation does not detect files modified in a directory. ASSERT_TRUE(WriteFile(file1, "content v2")); VLOG(1) << "Waiting for file1 modification"; -@@ -803,7 +803,7 @@ enum Permission { +@@ -797,7 +797,7 @@ enum Permission { Execute }; -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_BSD) bool ChangeFilePermissions(const FilePath& path, Permission perm, bool allow) { struct stat stat_buf; -@@ -832,9 +832,9 @@ bool ChangeFilePermissions(const FilePath& path, Permi +@@ -826,9 +826,9 @@ bool ChangeFilePermissions(const FilePath& path, Permi } return chmod(path.value().c_str(), stat_buf.st_mode) == 0; } -#endif // defined(OS_MACOSX) +#endif // defined(OS_MACOSX) || defined(OS_BSD) -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_BSD) // Linux implementation of FilePathWatcher doesn't catch attribute changes. // http://crbug.com/78043 // Windows implementation of FilePathWatcher catches attribute changes that -@@ -869,7 +869,7 @@ TEST_F(FilePathWatcherTest, DirAttributesChanged) { +@@ -863,7 +863,7 @@ TEST_F(FilePathWatcherTest, DirAttributesChanged) { ASSERT_TRUE(ChangeFilePermissions(test_dir1, Execute, true)); } -#endif // OS_MACOSX +#endif // OS_MACOSX || OS_BSD } // namespace } // namespace base Index: head/www/chromium/files/patch-base_files_file__util.h =================================================================== --- head/www/chromium/files/patch-base_files_file__util.h (revision 543832) +++ head/www/chromium/files/patch-base_files_file__util.h (revision 543833) @@ -1,11 +1,11 @@ ---- base/files/file_util.h.orig 2020-03-16 18:39:41 UTC +--- base/files/file_util.h.orig 2020-07-07 21:58:11 UTC +++ base/files/file_util.h -@@ -519,7 +519,7 @@ BASE_EXPORT bool VerifyPathControlledByAdmin(const bas +@@ -552,7 +552,7 @@ BASE_EXPORT bool VerifyPathControlledByAdmin(const bas // the directory |path|, in the number of FilePath::CharType, or -1 on failure. BASE_EXPORT int GetMaximumPathComponentLength(const base::FilePath& path); -#if defined(OS_LINUX) || defined(OS_AIX) +#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) // Broad categories of file systems as returned by statfs() on Linux. enum FileSystemType { FILE_SYSTEM_UNKNOWN, // statfs failed. Index: head/www/chromium/files/patch-base_files_file__util__unittest.cc =================================================================== --- head/www/chromium/files/patch-base_files_file__util__unittest.cc (revision 543832) +++ head/www/chromium/files/patch-base_files_file__util__unittest.cc (revision 543833) @@ -1,20 +1,20 @@ ---- base/files/file_util_unittest.cc.orig 2020-03-23 13:34:59 UTC +--- base/files/file_util_unittest.cc.orig 2020-07-07 21:58:11 UTC +++ base/files/file_util_unittest.cc -@@ -3434,7 +3434,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { +@@ -3465,7 +3465,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) { } #endif // defined(OS_WIN) -#if defined(OS_POSIX) && !defined(OS_MACOSX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) TEST_F(FileUtilTest, ReadFileToStringWithProcFileSystem) { FilePath file_path("/proc/cpuinfo"); std::string data = "temp"; -@@ -3452,7 +3452,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithProcFileSyste +@@ -3483,7 +3483,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithProcFileSyste EXPECT_FALSE(ReadFileToStringWithMaxSize(file_path, nullptr, 4)); } -#endif // defined(OS_POSIX) && !defined(OS_MACOSX) +#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) TEST_F(FileUtilTest, ReadFileToStringWithLargeFile) { std::string data(kLargeFileSize, 'c'); Index: head/www/chromium/files/patch-base_logging__unittest.cc =================================================================== --- head/www/chromium/files/patch-base_logging__unittest.cc (revision 543832) +++ head/www/chromium/files/patch-base_logging__unittest.cc (revision 543833) @@ -1,11 +1,11 @@ ---- base/logging_unittest.cc.orig 2019-12-16 21:51:21 UTC +--- base/logging_unittest.cc.orig 2020-07-07 21:58:11 UTC +++ base/logging_unittest.cc -@@ -591,7 +591,7 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo +@@ -552,7 +552,7 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo // need the arch-specific boilerplate below, which is inspired by breakpad. // At the same time, on OSX, ucontext.h is deprecated but si_addr works fine. uintptr_t crash_addr = 0; -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_BSD) crash_addr = reinterpret_cast(info->si_addr); #else // OS_POSIX && !OS_MACOSX ucontext_t* context = reinterpret_cast(context_ptr); Index: head/www/chromium/files/patch-base_memory_platform__shared__memory__region__posix.cc =================================================================== --- head/www/chromium/files/patch-base_memory_platform__shared__memory__region__posix.cc (revision 543832) +++ head/www/chromium/files/patch-base_memory_platform__shared__memory__region__posix.cc (revision 543833) @@ -1,38 +1,38 @@ ---- base/memory/platform_shared_memory_region_posix.cc.orig 2020-05-13 18:40:16 UTC +--- base/memory/platform_shared_memory_region_posix.cc.orig 2020-07-07 21:57:30 UTC +++ base/memory/platform_shared_memory_region_posix.cc -@@ -69,7 +69,7 @@ FDPair ScopedFDPair::get() const { +@@ -70,7 +70,7 @@ FDPair ScopedFDPair::get() const { return {fd.get(), readonly_fd.get()}; } -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) // static ScopedFD PlatformSharedMemoryRegion::ExecutableRegion::CreateFD(size_t size) { PlatformSharedMemoryRegion region = -@@ -78,7 +78,7 @@ ScopedFD PlatformSharedMemoryRegion::ExecutableRegion: +@@ -79,7 +79,7 @@ ScopedFD PlatformSharedMemoryRegion::ExecutableRegion: return region.PassPlatformHandle().fd; return ScopedFD(); } -#endif // defined(OS_LINUX) +#endif // defined(OS_LINUX) || defined(OS_BSD) // static PlatformSharedMemoryRegion PlatformSharedMemoryRegion::Take( -@@ -203,7 +203,7 @@ bool PlatformSharedMemoryRegion::MapAtInternal(off_t o +@@ -204,7 +204,7 @@ bool PlatformSharedMemoryRegion::MapAtInternal(off_t o // static PlatformSharedMemoryRegion PlatformSharedMemoryRegion::Create(Mode mode, size_t size -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) , bool executable #endif -@@ -232,7 +232,7 @@ PlatformSharedMemoryRegion PlatformSharedMemoryRegion: +@@ -233,7 +233,7 @@ PlatformSharedMemoryRegion PlatformSharedMemoryRegion: // flag. FilePath directory; if (!GetShmemTempDir( -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) executable, #else false /* executable */, Index: head/www/chromium/files/patch-base_path__service__unittest.cc =================================================================== --- head/www/chromium/files/patch-base_path__service__unittest.cc (revision 543832) +++ head/www/chromium/files/patch-base_path__service__unittest.cc (revision 543833) @@ -1,11 +1,11 @@ ---- base/path_service_unittest.cc.orig 2020-03-23 15:23:42 UTC +--- base/path_service_unittest.cc.orig 2020-07-07 21:57:30 UTC +++ base/path_service_unittest.cc -@@ -36,7 +36,7 @@ bool ReturnsValidPath(int dir_type) { +@@ -37,7 +37,7 @@ bool ReturnsValidPath(int dir_type) { if (dir_type == DIR_CACHE) check_path_exists = false; #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) // On the linux try-bots: a path is returned (e.g. /home/chrome-bot/Desktop), // but it doesn't exist. if (dir_type == DIR_USER_DESKTOP) Index: head/www/chromium/files/patch-base_process_memory.cc =================================================================== --- head/www/chromium/files/patch-base_process_memory.cc (revision 543832) +++ head/www/chromium/files/patch-base_process_memory.cc (revision 543833) @@ -1,20 +1,20 @@ ---- base/process/memory.cc.orig 2020-03-16 18:39:41 UTC +--- base/process/memory.cc.orig 2020-07-07 21:57:30 UTC +++ base/process/memory.cc -@@ -42,7 +42,7 @@ void OnNoMemoryInternal(size_t size) { +@@ -44,7 +44,7 @@ NOINLINE void OnNoMemoryInternal(size_t size) { } // namespace internal // Defined in memory_win.cc for Windows. -#if !defined(OS_WIN) +#if !defined(OS_WIN) && !defined(OS_BSD) namespace { -@@ -61,7 +61,7 @@ void TerminateBecauseOutOfMemory(size_t size) { +@@ -63,7 +63,7 @@ void TerminateBecauseOutOfMemory(size_t size) { #endif // !defined(OS_WIN) // Defined in memory_mac.mm for Mac. -#if !defined(OS_MACOSX) +#if !defined(OS_MACOSX) && !defined(OS_BSD) bool UncheckedCalloc(size_t num_items, size_t size, void** result) { const size_t alloc_size = num_items * size; Index: head/www/chromium/files/patch-base_process_process__linux.cc =================================================================== --- head/www/chromium/files/patch-base_process_process__linux.cc (revision 543832) +++ head/www/chromium/files/patch-base_process_process__linux.cc (revision 543833) @@ -1,31 +1,31 @@ ---- base/process/process_linux.cc.orig 2020-03-16 18:39:41 UTC +--- base/process/process_linux.cc.orig 2020-07-07 21:57:30 UTC +++ base/process/process_linux.cc -@@ -79,6 +79,9 @@ Time Process::CreationTime() const { +@@ -80,6 +80,9 @@ Time Process::CreationTime() const { internal::VM_STARTTIME) : internal::ReadProcStatsAndGetFieldAsInt64( Pid(), internal::VM_STARTTIME); +#if defined(OS_BSD) + return Time::FromTimeT(start_ticks); +#else if (!start_ticks) return Time(); TimeDelta start_offset = internal::ClockTicksToTimeDelta(start_ticks); -@@ -86,8 +89,10 @@ Time Process::CreationTime() const { +@@ -87,8 +90,10 @@ Time Process::CreationTime() const { if (boot_time.is_null()) return Time(); return Time(boot_time + start_offset); +#endif } +#if !defined(OS_BSD) // static bool Process::CanBackgroundProcesses() { #if defined(OS_CHROMEOS) -@@ -139,6 +144,7 @@ bool Process::SetProcessBackgrounded(bool background) +@@ -140,6 +145,7 @@ bool Process::SetProcessBackgrounded(bool background) DPCHECK(result == 0); return result == 0; } +#endif // !defined(OS_BSD) #if defined(OS_CHROMEOS) bool IsProcessBackgroundedCGroup(const StringPiece& cgroup_contents) { Index: head/www/chromium/files/patch-base_process_process__metrics.cc =================================================================== --- head/www/chromium/files/patch-base_process_process__metrics.cc (revision 543832) +++ head/www/chromium/files/patch-base_process_process__metrics.cc (revision 543833) @@ -1,38 +1,38 @@ ---- base/process/process_metrics.cc.orig 2019-07-24 18:58:02 UTC +--- base/process/process_metrics.cc.orig 2020-07-07 21:57:30 UTC +++ base/process/process_metrics.cc -@@ -57,7 +57,7 @@ SystemMetrics SystemMetrics::Sample() { +@@ -58,7 +58,7 @@ SystemMetrics SystemMetrics::Sample() { SystemMetrics system_metrics; system_metrics.committed_memory_ = GetSystemCommitCharge(); -#if defined(OS_LINUX) || defined(OS_ANDROID) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) GetSystemMemoryInfo(&system_metrics.memory_info_); GetVmStatInfo(&system_metrics.vmstat_info_); GetSystemDiskInfo(&system_metrics.disk_info_); -@@ -75,7 +75,7 @@ std::unique_ptr SystemMetrics::ToValue() const +@@ -76,7 +76,7 @@ std::unique_ptr SystemMetrics::ToValue() const std::unique_ptr res(new DictionaryValue()); res->SetIntKey("committed_memory", static_cast(committed_memory_)); -#if defined(OS_LINUX) || defined(OS_ANDROID) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) std::unique_ptr meminfo = memory_info_.ToValue(); std::unique_ptr vmstat = vmstat_info_.ToValue(); meminfo->MergeDictionary(vmstat.get()); -@@ -126,7 +126,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( +@@ -127,7 +127,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( } #endif -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) int ProcessMetrics::CalculateIdleWakeupsPerSecond( uint64_t absolute_idle_wakeups) { return CalculateEventsPerSecond(absolute_idle_wakeups, -@@ -138,7 +138,7 @@ int ProcessMetrics::GetIdleWakeupsPerSecond() { +@@ -139,7 +139,7 @@ int ProcessMetrics::GetIdleWakeupsPerSecond() { NOTIMPLEMENTED(); // http://crbug.com/120488 return 0; } -#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) +#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) #if defined(OS_MACOSX) int ProcessMetrics::CalculatePackageIdleWakeupsPerSecond( Index: head/www/chromium/files/patch-base_process_process__metrics__posix.cc =================================================================== --- head/www/chromium/files/patch-base_process_process__metrics__posix.cc (revision 543832) +++ head/www/chromium/files/patch-base_process_process__metrics__posix.cc (revision 543833) @@ -1,20 +1,20 @@ ---- base/process/process_metrics_posix.cc.orig 2019-10-21 19:06:18 UTC +--- base/process/process_metrics_posix.cc.orig 2020-07-07 21:57:30 UTC +++ base/process/process_metrics_posix.cc @@ -20,6 +20,8 @@ #if defined(OS_MACOSX) #include +#elif defined(OS_FREEBSD) +#include #else #include #endif -@@ -117,7 +119,7 @@ size_t ProcessMetrics::GetMallocUsage() { +@@ -126,7 +128,7 @@ size_t ProcessMetrics::GetMallocUsage() { #else return minfo.hblkhd + minfo.arena; #endif -#elif defined(OS_FUCHSIA) +#elif defined(OS_FUCHSIA) || defined(OS_BSD) // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. return 0; #endif Index: head/www/chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc =================================================================== --- head/www/chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc (nonexistent) +++ head/www/chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc (revision 543833) @@ -0,0 +1,11 @@ +--- base/profiler/stack_sampling_profiler_test_util.cc.orig 2020-07-13 13:09:53 UTC ++++ base/profiler/stack_sampling_profiler_test_util.cc +@@ -23,7 +23,7 @@ + // Fortunately, it provides _alloca, which functions identically. + #include + #define alloca _alloca +-#else ++#elif !defined(OS_BSD) + #include + #endif + Property changes on: head/www/chromium/files/patch-base_profiler_stack__sampling__profiler__test__util.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/chromium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc =================================================================== --- head/www/chromium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc (revision 543832) +++ head/www/chromium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc (revision 543833) @@ -1,11 +1,11 @@ ---- base/profiler/stack_sampling_profiler_unittest.cc.orig 2020-05-13 18:40:16 UTC +--- base/profiler/stack_sampling_profiler_unittest.cc.orig 2020-07-07 21:58:11 UTC +++ base/profiler/stack_sampling_profiler_unittest.cc -@@ -43,7 +43,7 @@ +@@ -41,7 +41,7 @@ #include #include #include -#else +#elif !defined(OS_BSD) #include #endif Index: head/www/chromium/files/patch-base_security__unittest.cc =================================================================== --- head/www/chromium/files/patch-base_security__unittest.cc (revision 543832) +++ head/www/chromium/files/patch-base_security__unittest.cc (revision 543833) @@ -1,11 +1,11 @@ ---- base/security_unittest.cc.orig 2019-04-30 22:22:28 UTC +--- base/security_unittest.cc.orig 2020-07-07 21:57:30 UTC +++ base/security_unittest.cc -@@ -60,7 +60,7 @@ NOINLINE Type HideValueFromCompiler(volatile Type valu +@@ -59,7 +59,7 @@ NOINLINE Type HideValueFromCompiler(volatile Type valu // FAILS_ is too clunky. void OverflowTestsSoftExpectTrue(bool overflow_detected) { if (!overflow_detected) { -#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_MACOSX) +#if defined(OS_POSIX) && !defined(OS_NACL) // Sadly, on Linux, Android, and OSX we don't have a good story yet. Don't // fail the test, but report. printf("Platform has overflow: %s\n", Index: head/www/chromium/files/patch-base_synchronization_lock__impl.h =================================================================== --- head/www/chromium/files/patch-base_synchronization_lock__impl.h (revision 543832) +++ head/www/chromium/files/patch-base_synchronization_lock__impl.h (revision 543833) @@ -1,16 +1,16 @@ ---- base/synchronization/lock_impl.h.orig 2020-03-08 08:35:16 UTC +--- base/synchronization/lock_impl.h.orig 2020-07-07 21:58:11 UTC +++ base/synchronization/lock_impl.h -@@ -67,10 +67,13 @@ void LockImpl::Unlock() { +@@ -69,10 +69,13 @@ void LockImpl::Unlock() { ::ReleaseSRWLockExclusive(reinterpret_cast(&native_handle_)); } #elif defined(OS_POSIX) || defined(OS_FUCHSIA) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wthread-safety-analysis" void LockImpl::Unlock() { int rv = pthread_mutex_unlock(&native_handle_); DCHECK_EQ(rv, 0) << ". " << strerror(rv); } +#pragma GCC diagnostic pop #endif // This is an implementation used for AutoLock templated on the lock type. Index: head/www/chromium/files/patch-base_system_sys__info__freebsd.cc =================================================================== --- head/www/chromium/files/patch-base_system_sys__info__freebsd.cc (revision 543832) +++ head/www/chromium/files/patch-base_system_sys__info__freebsd.cc (revision 543833) @@ -1,83 +1,93 @@ ---- base/system/sys_info_freebsd.cc.orig 2020-06-15 18:59:42 UTC +--- base/system/sys_info_freebsd.cc.orig 2020-07-07 21:57:30 UTC +++ base/system/sys_info_freebsd.cc -@@ -9,30 +9,76 @@ +@@ -9,30 +9,86 @@ #include - #include "base/logging.h" + #include "base/notreached.h" +#include "base/strings/string_util.h" namespace base { int64_t SysInfo::AmountOfPhysicalMemoryImpl() { - int pages, page_size; + int pages, page_size, r = 0; size_t size = sizeof(pages); - sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); - sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); - if (pages == -1 || page_size == -1) { -+ if(r == 0) ++ ++ if (r == 0) + r = sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0); -+ if(r == 0) -+ r =sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); -+ if(r == -1) { ++ if (r == 0) ++ r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); ++ ++ if (r == -1) { NOTREACHED(); return 0; } ++ return static_cast(pages) * page_size; } +int64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() { + int page_size, r = 0; -+ unsigned pgfree, pginact, pgcache; ++ unsigned int pgfree, pginact, pgcache; + size_t size = sizeof(page_size); + size_t szpg = sizeof(pgfree); -+ if(r == 0) ++ ++ if (r == 0) + r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0); -+ if(r == 0) ++ if (r == 0) + r = sysctlbyname("vm.stats.vm.v_free_count", &pgfree, &szpg, NULL, 0); -+ if(r == 0) ++ if (r == 0) + r = sysctlbyname("vm.stats.vm.v_inactive_count", &pginact, &szpg, NULL, 0); -+ if(r == 0) ++ if (r == 0) + r = sysctlbyname("vm.stats.vm.v_cache_count", &pgcache, &szpg, NULL, 0); -+ if(r == -1) { ++ ++ if (r == -1) { + NOTREACHED(); + return 0; + } ++ + return static_cast((pgfree + pginact + pgcache) * page_size); +} + // static +std::string SysInfo::CPUModelName() { + int mib[] = { CTL_HW, HW_MODEL }; + char name[256]; + size_t size = base::size(name); -+ if (sysctl(mib, base::size(mib), &name, &size, NULL, 0) == 0) ++ ++ if (sysctl(mib, base::size(mib), &name, &size, NULL, 0) == 0) { + return name; ++ } ++ + return std::string(); +} + +// static uint64_t SysInfo::MaxSharedMemorySize() { size_t limit; size_t size = sizeof(limit); + if (sysctlbyname("kern.ipc.shmmax", &limit, &size, NULL, 0) < 0) { NOTREACHED(); return 0; } + return static_cast(limit); +} + +SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() { + HardwareInfo info; -+ // Set the manufacturer to "FreeBSD" and the model to -+ // an empty string. ++ + info.manufacturer = "FreeBSD"; + info.model = HardwareModelName(); ++ + DCHECK(IsStringUTF8(info.manufacturer)); + DCHECK(IsStringUTF8(info.model)); ++ + return info; } } // namespace base Index: head/www/chromium/files/patch-base_test_BUILD.gn =================================================================== --- head/www/chromium/files/patch-base_test_BUILD.gn (nonexistent) +++ head/www/chromium/files/patch-base_test_BUILD.gn (revision 543833) @@ -0,0 +1,15 @@ +--- base/test/BUILD.gn.orig 2020-07-13 15:42:25 UTC ++++ base/test/BUILD.gn +@@ -408,7 +408,11 @@ if (is_linux) { + + copy("fonts_conf") { + sources = [ "fonts.conf" ] +- outputs = [ "${root_build_dir}/etc/fonts/{{source_file_part}}" ] ++ if (is_bsd) { ++ outputs = [ "${root_build_dir}/usr/local/etc/fonts/{{source_file_part}}" ] ++ } else { ++ outputs = [ "${root_build_dir}/etc/fonts/{{source_file_part}}" ] ++ } + } + + if (current_toolchain == host_toolchain) { Property changes on: head/www/chromium/files/patch-base_test_BUILD.gn ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/chromium/files/patch-base_test_launcher_test__launcher.cc =================================================================== --- head/www/chromium/files/patch-base_test_launcher_test__launcher.cc (revision 543832) +++ head/www/chromium/files/patch-base_test_launcher_test__launcher.cc (revision 543833) @@ -1,19 +1,19 @@ ---- base/test/launcher/test_launcher.cc.orig 2020-03-16 18:40:27 UTC +--- base/test/launcher/test_launcher.cc.orig 2020-07-07 21:58:11 UTC +++ base/test/launcher/test_launcher.cc @@ -55,6 +55,7 @@ #include "testing/gtest/include/gtest/gtest.h" #if defined(OS_POSIX) +#include #include #include "base/files/file_descriptor_watcher_posix.h" -@@ -551,7 +552,7 @@ ChildProcessResults DoLaunchChildTestProcess( +@@ -557,7 +558,7 @@ ChildProcessResults DoLaunchChildTestProcess( #if !defined(OS_FUCHSIA) options.new_process_group = true; #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) options.kill_on_parent_death = true; #endif Index: head/www/chromium/files/patch-base_test_test__file__util__posix.cc =================================================================== --- head/www/chromium/files/patch-base_test_test__file__util__posix.cc (revision 543832) +++ head/www/chromium/files/patch-base_test_test__file__util__posix.cc (revision 543833) @@ -1,11 +1,11 @@ ---- base/test/test_file_util_posix.cc.orig 2020-02-03 21:52:37 UTC +--- base/test/test_file_util_posix.cc.orig 2020-07-07 21:57:30 UTC +++ base/test/test_file_util_posix.cc -@@ -84,7 +84,7 @@ void SyncPageCacheToDisk() { +@@ -85,7 +85,7 @@ void SyncPageCacheToDisk() { sync(); } -#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) +#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) bool EvictFileFromSystemCache(const FilePath& file) { // There doesn't seem to be a POSIX way to cool the disk cache. NOTIMPLEMENTED(); Index: head/www/chromium/files/patch-base_threading_scoped__blocking__call__unittest.cc =================================================================== --- head/www/chromium/files/patch-base_threading_scoped__blocking__call__unittest.cc (nonexistent) +++ head/www/chromium/files/patch-base_threading_scoped__blocking__call__unittest.cc (revision 543833) @@ -0,0 +1,11 @@ +--- base/threading/scoped_blocking_call_unittest.cc.orig 2020-07-13 13:43:07 UTC ++++ base/threading/scoped_blocking_call_unittest.cc +@@ -273,7 +273,7 @@ TEST_F(ScopedBlockingCallIOJankMonitoringTest, ManyInA + } + + TEST_F(ScopedBlockingCallIOJankMonitoringTest, OverlappingMultipleWindows) { +- constexpr auto kJankTiming = ++ auto kJankTiming = + internal::IOJankMonitoringWindow::kMonitoringWindow * 3 + + internal::IOJankMonitoringWindow::kIOJankInterval * 5; + Property changes on: head/www/chromium/files/patch-base_threading_scoped__blocking__call__unittest.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/chromium/files/patch-base_threading_thread__task__runner__handle.cc =================================================================== --- head/www/chromium/files/patch-base_threading_thread__task__runner__handle.cc (revision 543832) +++ head/www/chromium/files/patch-base_threading_thread__task__runner__handle.cc (revision 543833) @@ -1,26 +1,26 @@ ---- base/threading/thread_task_runner_handle.cc.orig 2019-12-16 21:50:40 UTC +--- base/threading/thread_task_runner_handle.cc.orig 2020-07-07 21:57:30 UTC +++ base/threading/thread_task_runner_handle.cc @@ -8,6 +8,7 @@ #include #include "base/bind.h" +#include "base/callback_helpers.h" + #include "base/check_op.h" #include "base/lazy_instance.h" - #include "base/logging.h" #include "base/run_loop.h" @@ -38,6 +39,7 @@ bool ThreadTaskRunnerHandle::IsSet() { return !!thread_task_runner_tls.Pointer()->Get(); } +#if defined(OS_BSD) // static ScopedClosureRunner ThreadTaskRunnerHandle::OverrideForTesting( scoped_refptr overriding_task_runner) { @@ -82,6 +84,7 @@ ScopedClosureRunner ThreadTaskRunnerHandle::OverrideFo base::Unretained(ttrh->task_runner_.get()), std::move(no_running_during_override))); } +#endif ThreadTaskRunnerHandle::ThreadTaskRunnerHandle( scoped_refptr task_runner) Index: head/www/chromium/files/patch-build_config_compiler_BUILD.gn =================================================================== --- head/www/chromium/files/patch-build_config_compiler_BUILD.gn (revision 543832) +++ head/www/chromium/files/patch-build_config_compiler_BUILD.gn (revision 543833) @@ -1,92 +1,101 @@ ---- build/config/compiler/BUILD.gn.orig 2020-06-03 18:40:10 UTC +--- build/config/compiler/BUILD.gn.orig 2020-07-07 21:58:11 UTC +++ build/config/compiler/BUILD.gn -@@ -138,7 +138,7 @@ declare_args() { +@@ -133,7 +133,7 @@ declare_args() { # 'is_android' breaks content_shell_test_apk on android-kitkat-arm-rel. # 'use_xcode_clang' may call old clang. init_stack_vars = - !is_android && !use_xcode_clang && (!is_official_build || is_linux) + !is_android && !use_xcode_clang && (!is_official_build || is_linux) && !is_bsd # This argument is to control whether enabling text section splitting in the # final binary. When enabled, the separated text sections with prefix -@@ -307,7 +307,7 @@ config("compiler") { +@@ -287,7 +287,7 @@ config("compiler") { } # Linker warnings. - if (fatal_linker_warnings && !is_mac && !is_ios && current_os != "aix") { + if (fatal_linker_warnings && !is_mac && !is_ios && !is_bsd && current_os != "aix") { ldflags += [ "-Wl,--fatal-warnings" ] } if (fatal_linker_warnings && (is_mac || is_ios)) { -@@ -401,7 +401,7 @@ config("compiler") { +@@ -381,7 +381,7 @@ config("compiler") { # Compiler instrumentation can introduce dependencies in DSOs to symbols in # the executable they are loaded into, so they are unresolved at link-time. - if (!using_sanitizer) { + if (!using_sanitizer && !is_bsd) { ldflags += [ "-Wl,-z,defs", "-Wl,--as-needed", -@@ -500,7 +500,7 @@ config("compiler") { +@@ -472,7 +472,7 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } - if (is_clang && !is_nacl && !use_xcode_clang) { + if (is_clang && !is_nacl && !use_xcode_clang && !is_bsd) { cflags += [ "-fcrash-diagnostics-dir=" + rebase_path("//tools/clang/crashreports", root_build_dir) ] -@@ -770,7 +770,7 @@ config("compiler_cpu_abi") { +@@ -735,7 +735,7 @@ config("compiler_cpu_abi") { cflags += [ "-mtune=$arm_tune" ] } } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_nacl && !is_fuchsia) { + if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) { cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] } -@@ -1120,7 +1120,7 @@ config("compiler_deterministic") { +@@ -1085,7 +1085,7 @@ config("compiler_deterministic") { "-Xclang", ".", ] - if (!is_win) { + if (!is_win && !is_bsd) { # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167) asmflags = [ "-Wa,-fdebug-compilation-dir,." ] } -@@ -1503,7 +1503,7 @@ config("default_warnings") { - cflags += [ "-Wno-nonportable-include-path" ] +@@ -1476,7 +1476,7 @@ config("default_warnings") { + cflags += [ "-Wno-max-tokens" ] } - if (current_toolchain == host_toolchain || !use_xcode_clang) { + if ((current_toolchain == host_toolchain || !use_xcode_clang) && !is_bsd) { # Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not # recognize. cflags += [ -@@ -1753,7 +1753,7 @@ config("thin_archive") { +@@ -1638,7 +1638,7 @@ config("no_chromium_code") { + # suppressing them individually, we just blanket suppress them here. + "-Wno-unused-variable", + ] +- if (!is_nacl && (current_toolchain == host_toolchain || !use_xcode_clang)) { ++ if (!is_nacl && (current_toolchain == host_toolchain || !use_xcode_clang) && !is_bsd) { + cflags += [ + # TODO(https://crbug.com/1031169): Clean up and enable. + "-Wno-misleading-indentation", +@@ -1716,7 +1716,7 @@ config("thin_archive") { # Mac and iOS use the mac-specific "libtool" command, not ar, which doesn't # have a "thin archive" mode (it does accept -T, but it means truncating # archive names to 16 characters, which is not what we want). - if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) { + if ((is_posix && !is_nacl && !is_mac && !is_ios && !is_bsd) || is_fuchsia) { arflags = [ "-T" ] } else if (is_win && use_lld) { arflags = [ "/llvmlibthin" ] -@@ -2277,7 +2277,7 @@ config("symbols") { +@@ -2246,7 +2246,7 @@ config("symbols") { # flag, so we can use use -g1 for pnacl and nacl-clang compiles. # gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang. if (!is_nacl || is_clang) { - cflags += [ "-g2" ] + cflags += [ "-g0" ] } if (is_clang && !is_nacl && !use_xcode_clang) { -@@ -2305,7 +2305,7 @@ config("symbols") { +@@ -2274,7 +2274,7 @@ config("symbols") { # DWARF info may be corrupt; offsets in a range list entry are in different # sections" there. Maybe just a bug in nacl_switch_32.S. if (!is_mac && !is_ios && !is_nacl && current_cpu != "x86" && - (use_gold || use_lld)) { + (use_gold || use_lld) && !is_bsd) { if (is_clang) { # This flag enables the GNU-format pubnames and pubtypes sections, # which lld needs in order to generate a correct GDB index. Index: head/www/chromium/files/patch-build_config_compiler_compiler.gni =================================================================== --- head/www/chromium/files/patch-build_config_compiler_compiler.gni (revision 543832) +++ head/www/chromium/files/patch-build_config_compiler_compiler.gni (revision 543833) @@ -1,20 +1,11 @@ ---- build/config/compiler/compiler.gni.orig 2020-05-13 18:40:16 UTC +--- build/config/compiler/compiler.gni.orig 2020-07-07 21:58:11 UTC +++ build/config/compiler/compiler.gni -@@ -47,7 +47,7 @@ declare_args() { - # only two architectures that are currently checked in). Turn this off when - # you are using a custom toolchain and need to control -B in cflags. - linux_use_bundled_binutils = -- linux_use_bundled_binutils_override && is_linux && -+ linux_use_bundled_binutils_override && (is_linux && !is_bsd) && - (current_cpu == "x64" || current_cpu == "x86") - binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", - root_build_dir) -@@ -190,7 +190,7 @@ declare_args() { +@@ -176,7 +176,7 @@ declare_args() { declare_args() { # Whether to use the gold linker from binutils instead of lld or bfd. use_gold = - !use_lld && !(is_chromecast && is_linux && + !is_bsd && !use_lld && !(is_chromecast && is_linux && (current_cpu == "arm" || current_cpu == "mipsel")) && ((is_linux && (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm" || current_cpu == "arm64" || Index: head/www/chromium/files/patch-cc_BUILD.gn =================================================================== --- head/www/chromium/files/patch-cc_BUILD.gn (revision 543832) +++ head/www/chromium/files/patch-cc_BUILD.gn (revision 543833) @@ -1,19 +1,19 @@ ---- cc/BUILD.gn.orig 2020-05-13 18:40:16 UTC +--- cc/BUILD.gn.orig 2020-07-07 21:58:11 UTC +++ cc/BUILD.gn -@@ -589,7 +589,7 @@ cc_test_static_library("test_support") { +@@ -599,7 +599,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" ] } } -@@ -790,7 +790,6 @@ cc_test("cc_unittests") { +@@ -801,7 +801,6 @@ cc_test("cc_unittests") { ] data_deps = [ "//testing/buildbot/filters:cc_unittests_filters", - "//third_party/mesa_headers", ] defines = [] Index: head/www/chromium/files/patch-cc_layers_scrollbar__layer__impl__base.cc =================================================================== --- head/www/chromium/files/patch-cc_layers_scrollbar__layer__impl__base.cc (revision 543832) +++ head/www/chromium/files/patch-cc_layers_scrollbar__layer__impl__base.cc (revision 543833) @@ -1,13 +1,13 @@ ---- cc/layers/scrollbar_layer_impl_base.cc.orig 2019-12-16 21:50:40 UTC +--- cc/layers/scrollbar_layer_impl_base.cc.orig 2020-07-07 21:58:11 UTC +++ cc/layers/scrollbar_layer_impl_base.cc -@@ -220,8 +220,8 @@ gfx::Rect ScrollbarLayerImplBase::ComputeThumbQuadRect +@@ -219,8 +219,8 @@ gfx::Rect ScrollbarLayerImplBase::ComputeThumbQuadRect int thumb_offset = TrackStart(); if (maximum > 0) { float ratio = clamped_current_pos / maximum; - float max_offset = track_length - thumb_length; - thumb_offset += static_cast(ratio * max_offset); + float _max_offset = track_length - thumb_length; + thumb_offset += static_cast(ratio * _max_offset); } float thumb_thickness_adjustment = Index: head/www/chromium/files/patch-cc_test_layer__tree__test.cc =================================================================== --- head/www/chromium/files/patch-cc_test_layer__tree__test.cc (nonexistent) +++ head/www/chromium/files/patch-cc_test_layer__tree__test.cc (revision 543833) @@ -0,0 +1,11 @@ +--- cc/test/layer_tree_test.cc.orig 2020-07-13 09:14:49 UTC ++++ cc/test/layer_tree_test.cc +@@ -645,7 +645,7 @@ LayerTreeTest::LayerTreeTest(LayerTreeTest::RendererTy + init_vulkan = true; + } else if (renderer_type_ == RENDERER_SKIA_DAWN) { + scoped_feature_list_.InitAndEnableFeature(features::kSkiaDawn); +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + init_vulkan = true; + #elif defined(OS_WIN) + // TODO(sgilhuly): Initialize D3D12 for Windows. Property changes on: head/www/chromium/files/patch-cc_test_layer__tree__test.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/chromium/files/patch-cc_test_pixel__test.cc =================================================================== --- head/www/chromium/files/patch-cc_test_pixel__test.cc (nonexistent) +++ head/www/chromium/files/patch-cc_test_pixel__test.cc (revision 543833) @@ -0,0 +1,11 @@ +--- cc/test/pixel_test.cc.orig 2020-07-13 09:15:14 UTC ++++ cc/test/pixel_test.cc +@@ -69,7 +69,7 @@ PixelTest::PixelTest(GraphicsBackend backend) + init_vulkan = true; + } else if (backend == kSkiaDawn) { + scoped_feature_list_.InitAndEnableFeature(features::kSkiaDawn); +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + init_vulkan = true; + #elif defined(OS_WIN) + // TODO(sgilhuly): Initialize D3D12 for Windows. Property changes on: head/www/chromium/files/patch-cc_test_pixel__test.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/chromium/files/patch-cc_trees_frame__rate__estimator.cc =================================================================== --- head/www/chromium/files/patch-cc_trees_frame__rate__estimator.cc (nonexistent) +++ head/www/chromium/files/patch-cc_trees_frame__rate__estimator.cc (revision 543833) @@ -0,0 +1,11 @@ +--- cc/trees/frame_rate_estimator.cc.orig 2020-07-13 17:25:44 UTC ++++ cc/trees/frame_rate_estimator.cc +@@ -48,7 +48,7 @@ void FrameRateEstimator::WillDraw(base::TimeTicks now) + // frequency is lower than that, then using a lower frame rate is permitted. + // The delta below is to account for minor offsets in frame times. + constexpr auto kFudgeDelta = base::TimeDelta::FromMilliseconds(1); +- constexpr auto kMinDelta = ++ auto kMinDelta = + (viz::BeginFrameArgs::DefaultInterval() * 2) + kFudgeDelta; + if (draw_delta < kMinDelta) + num_of_consecutive_frames_with_min_delta_++; Property changes on: head/www/chromium/files/patch-cc_trees_frame__rate__estimator.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/chromium/files/patch-cc_trees_property__tree.cc =================================================================== --- head/www/chromium/files/patch-cc_trees_property__tree.cc (revision 543832) +++ head/www/chromium/files/patch-cc_trees_property__tree.cc (revision 543833) @@ -1,20 +1,20 @@ ---- cc/trees/property_tree.cc.orig 2020-05-13 18:40:17 UTC +--- cc/trees/property_tree.cc.orig 2020-07-07 21:58:11 UTC +++ cc/trees/property_tree.cc -@@ -1241,13 +1241,13 @@ gfx::ScrollOffset ScrollTree::MaxScrollOffset(int scro +@@ -1245,13 +1245,13 @@ gfx::ScrollOffset ScrollTree::MaxScrollOffset(int scro gfx::Size clip_layer_bounds = container_bounds(scroll_node->id); - gfx::ScrollOffset max_offset( + gfx::ScrollOffset _max_offset( scaled_scroll_bounds.width() - clip_layer_bounds.width(), scaled_scroll_bounds.height() - clip_layer_bounds.height()); - max_offset.Scale(1 / scale_factor); - max_offset.SetToMax(gfx::ScrollOffset()); - return max_offset; + _max_offset.Scale(1 / scale_factor); + _max_offset.SetToMax(gfx::ScrollOffset()); + return _max_offset; } gfx::SizeF ScrollTree::scroll_bounds(int scroll_node_id) const { Index: head/www/chromium/files/patch-chrome_app_BUILD.gn =================================================================== --- head/www/chromium/files/patch-chrome_app_BUILD.gn (revision 543832) +++ head/www/chromium/files/patch-chrome_app_BUILD.gn (revision 543833) @@ -1,11 +1,11 @@ ---- chrome/app/BUILD.gn.orig 2020-05-18 10:34:00 UTC +--- chrome/app/BUILD.gn.orig 2020-07-07 21:58:12 UTC +++ chrome/app/BUILD.gn -@@ -138,7 +138,7 @@ static_library("test_support") { +@@ -139,7 +139,7 @@ static_library("test_support") { "//v8:v8_headers", ] - if (!is_fuchsia) { + if (!is_fuchsia && !is_bsd) { # TODO(crbug.com/753619): Enable crash reporting on Fuchsia. deps += [ "//components/crash/core/app", Index: head/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc =================================================================== --- head/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc (revision 543833) @@ -1,195 +1,195 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2020-05-13 18:40:17 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2020-07-07 21:58:12 UTC +++ chrome/app/chrome_main_delegate.cc -@@ -102,7 +102,7 @@ +@@ -107,7 +107,7 @@ #include "chrome/app/shutdown_signal_handlers_posix.h" #endif -#if BUILDFLAG(ENABLE_NACL) && defined(OS_LINUX) +#if BUILDFLAG(ENABLE_NACL) && defined(OS_LINUX) && !defined(OS_BSD) #include "components/nacl/common/nacl_paths.h" #include "components/nacl/zygote/nacl_fork_delegate_linux.h" #endif -@@ -145,12 +145,12 @@ +@@ -144,12 +144,12 @@ #include "v8/include/v8.h" #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #include "base/environment.h" #endif #if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_ANDROID) || \ - defined(OS_LINUX) + defined(OS_LINUX) || defined(OS_BSD) #include "chrome/browser/policy/policy_path_parser.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -276,7 +276,7 @@ void SetUpExtendedCrashReporting(bool is_browser_proce +@@ -266,7 +266,7 @@ void SetUpExtendedCrashReporting(bool is_browser_proce #endif // defined(OS_WIN) -#if defined(OS_LINUX) +#if defined(OS_LINUX) && !defined(OS_BSD) void AdjustLinuxOOMScore(const std::string& process_type) { int score = -1; -@@ -316,13 +316,13 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -306,13 +306,13 @@ void AdjustLinuxOOMScore(const std::string& process_ty if (score > -1) base::AdjustOOMScore(base::GetCurrentProcId(), score); } -#endif // defined(OS_LINUX) +#endif // defined(OS_LINUX) && !defined(OS_BSD) // Returns true if this subprocess type needs the ResourceBundle initialized // and resources loaded. bool SubprocessNeedsResourceBundle(const std::string& process_type) { return -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) // The zygote process opens the resources for the renderers. process_type == service_manager::switches::kZygoteProcess || #endif -@@ -361,7 +361,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -351,7 +351,7 @@ bool HandleVersionSwitches(const base::CommandLine& co return false; } -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_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) || -@@ -371,7 +371,7 @@ void HandleHelpSwitches(const base::CommandLine& comma +@@ -361,7 +361,7 @@ void HandleHelpSwitches(const base::CommandLine& comma PLOG(FATAL) << "execlp failed"; } } -#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) +#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) #if !defined(OS_MACOSX) && !defined(OS_ANDROID) void SIGTERMProfilingShutdown(int signal) { -@@ -425,7 +425,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -415,7 +415,7 @@ void InitializeUserDataDir(base::CommandLine* command_ std::string process_type = command_line->GetSwitchValueASCII(switches::kProcessType); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_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. -@@ -437,7 +437,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -427,7 +427,7 @@ void InitializeUserDataDir(base::CommandLine* command_ user_data_dir = base::FilePath::FromUTF8Unsafe(user_data_dir_string); } } -#endif // OS_LINUX +#endif // OS_LINUX || OS_BSD #if defined(OS_MACOSX) policy::path_parser::CheckUserDataDirPolicy(&user_data_dir); #endif // OS_MAC -@@ -509,7 +509,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat +@@ -498,7 +498,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat startup_metric_utils::RecordApplicationStartTime(now); #endif -#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) +#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) // Record the startup process creation time on supported platforms. startup_metric_utils::RecordStartupProcessCreationTime( base::Process::Current().CreationTime()); -@@ -701,7 +701,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi +@@ -691,7 +691,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi v8_crashpad_support::SetUp(); #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) && !defined(OS_BSD) if (!crash_reporter::IsCrashpadEnabled()) { breakpad::SetFirstChanceExceptionHandler(v8::TryHandleWebAssemblyTrapPosix); } -@@ -712,7 +712,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi +@@ -702,7 +702,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi *exit_code = 0; return true; // Got a --version switch; exit with a success error code. } -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) // This will directly exit if the user asked for help. HandleHelpSwitches(command_line); #endif -@@ -736,7 +736,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi +@@ -726,7 +726,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi #if defined(OS_CHROMEOS) chromeos::RegisterPathProvider(); #endif -#if BUILDFLAG(ENABLE_NACL) && defined(OS_LINUX) +#if BUILDFLAG(ENABLE_NACL) && defined(OS_LINUX) && !defined(OS_BSD) nacl::RegisterPathProvider(); #endif -@@ -916,7 +916,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -906,7 +906,7 @@ void ChromeMainDelegate::PreSandboxStartup() { crash_reporter::InitializeCrashKeys(); -#if defined(OS_POSIX) +#if defined(OS_POSIX) && !defined(OS_BSD) ChromeCrashReporterClient::Create(); #endif -@@ -928,7 +928,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -918,7 +918,7 @@ void ChromeMainDelegate::PreSandboxStartup() { #if defined(OS_WIN) child_process_logging::Init(); #endif -#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX)) +#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)) // Create an instance of the CPU class to parse /proc/cpuinfo and cache // cpu_brand info. base::CPU cpu_info; -@@ -1047,7 +1047,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1037,7 +1037,7 @@ void ChromeMainDelegate::PreSandboxStartup() { locale; } -#if defined(OS_POSIX) && !defined(OS_MACOSX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != service_manager::switches::kZygoteProcess) { #if defined(OS_ANDROID) -@@ -1068,7 +1068,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1058,7 +1058,7 @@ void ChromeMainDelegate::PreSandboxStartup() { } #endif // defined(OS_ANDROID) } -#endif // defined(OS_POSIX) && !defined(OS_MACOSX) +#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) // After all the platform Breakpads have been initialized, store the command // line for crash reporting. -@@ -1082,7 +1082,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1072,7 +1072,7 @@ void ChromeMainDelegate::PreSandboxStartup() { void ChromeMainDelegate::SandboxInitialized(const std::string& process_type) { // Note: If you are adding a new process type below, be sure to adjust the // AdjustLinuxOOMScore function too. -#if defined(OS_LINUX) +#if defined(OS_LINUX) && !defined(OS_BSD) AdjustLinuxOOMScore(process_type); #endif #if defined(OS_WIN) -@@ -1128,7 +1128,7 @@ int ChromeMainDelegate::RunProcess( +@@ -1114,7 +1114,7 @@ int ChromeMainDelegate::RunProcess( + // This entry is not needed on Linux, where the NaCl loader // process is launched via nacl_helper instead. - #if BUILDFLAG(ENABLE_NACL) && !defined(CHROME_MULTIPLE_DLL_BROWSER) && \ -- !defined(OS_LINUX) -+ !defined(OS_LINUX) && !defined(OS_BSD) +-#if BUILDFLAG(ENABLE_NACL) && !defined(OS_LINUX) ++#if BUILDFLAG(ENABLE_NACL) && !defined(OS_LINUX) && !defined(OS_BSD) {switches::kNaClLoaderProcess, NaClMain}, #else - {"", NULL}, // To avoid constant array of size 0 -@@ -1156,7 +1156,7 @@ void ChromeMainDelegate::ProcessExiting(const std::str + {"", nullptr}, // To avoid constant array of size 0 +@@ -1142,7 +1142,7 @@ void ChromeMainDelegate::ProcessExiting(const std::str #endif // !defined(OS_ANDROID) } -#if defined(OS_LINUX) +#if defined(OS_LINUX) && !defined(OS_BSD) void ChromeMainDelegate::ZygoteStarting( std::vector>* delegates) { -@@ -1194,7 +1194,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1180,7 +1180,7 @@ void ChromeMainDelegate::ZygoteForked() { crash_keys::SetCrashKeysFromCommandLine(*command_line); } -#endif // defined(OS_LINUX) +#endif // defined(OS_LINUX) && !defined(OS_BSD) content::ContentClient* ChromeMainDelegate::CreateContentClient() { return &chrome_content_client_; Index: head/www/chromium/files/patch-chrome_app_chromium__strings.grd =================================================================== --- head/www/chromium/files/patch-chrome_app_chromium__strings.grd (revision 543832) +++ head/www/chromium/files/patch-chrome_app_chromium__strings.grd (revision 543833) @@ -1,29 +1,29 @@ ---- chrome/app/chromium_strings.grd.orig 2020-05-13 18:40:17 UTC +--- chrome/app/chromium_strings.grd.orig 2020-07-07 21:58:12 UTC +++ chrome/app/chromium_strings.grd -@@ -680,7 +680,7 @@ Chromium is unable to recover your settings. +@@ -681,7 +681,7 @@ Chromium is unable to recover your settings. - + Your system administrator has configured Chromium to open an alternative browser to access $1example.com. -@@ -781,7 +781,7 @@ Chromium is unable to recover your settings. +@@ -782,7 +782,7 @@ Chromium is unable to recover your settings. - + The profile appears to be in use by another Chromium process ($112345) on another computer ($2example.com). Chromium has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chromium. -@@ -1003,7 +1003,7 @@ Chromium is unable to recover your settings. +@@ -1004,7 +1004,7 @@ Chromium is unable to recover your settings. - + Restart Chromium to enable $1Flash Index: head/www/chromium/files/patch-chrome_app_generated__resources.grd =================================================================== --- head/www/chromium/files/patch-chrome_app_generated__resources.grd (revision 543832) +++ head/www/chromium/files/patch-chrome_app_generated__resources.grd (revision 543833) @@ -1,29 +1,29 @@ ---- chrome/app/generated_resources.grd.orig 2020-05-13 18:40:17 UTC +--- chrome/app/generated_resources.grd.orig 2020-07-07 21:58:12 UTC +++ chrome/app/generated_resources.grd -@@ -5137,7 +5137,7 @@ Keep your key file in a safe place. You will need it t +@@ -5181,7 +5181,7 @@ Keep your key file in a safe place. You will need it t - + Legacy Browser Support -@@ -6880,7 +6880,7 @@ the Bookmarks menu."> +@@ -6928,7 +6928,7 @@ the Bookmarks menu."> Google Pay - + Use system title bar and borders -@@ -7806,7 +7806,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -7854,7 +7854,7 @@ Please help our engineers fix this problem. Tell us wh Set as default - + Minimize Index: head/www/chromium/files/patch-chrome_app_google__chrome__strings.grd =================================================================== --- head/www/chromium/files/patch-chrome_app_google__chrome__strings.grd (revision 543832) +++ head/www/chromium/files/patch-chrome_app_google__chrome__strings.grd (revision 543833) @@ -1,29 +1,29 @@ ---- chrome/app/google_chrome_strings.grd.orig 2020-05-13 18:40:17 UTC +--- chrome/app/google_chrome_strings.grd.orig 2020-07-07 21:58:12 UTC +++ chrome/app/google_chrome_strings.grd -@@ -692,7 +692,7 @@ Google Chrome is unable to recover your settings. +@@ -688,7 +688,7 @@ Google Chrome is unable to recover your settings. - + Your system administrator has configured Google Chrome to open an alternative browser to access $1example.com. -@@ -793,7 +793,7 @@ Google Chrome is unable to recover your settings. +@@ -789,7 +789,7 @@ Google Chrome is unable to recover your settings. - + The profile appears to be in use by another Google Chrome process ($112345) on another computer ($2example.com). Chrome has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chrome. -@@ -1022,7 +1022,7 @@ Google Chrome is unable to recover your settings. +@@ -1018,7 +1018,7 @@ Google Chrome is unable to recover your settings. - + Restart Chrome to enable $1Flash Index: head/www/chromium/files/patch-chrome_app_settings__strings.grdp =================================================================== --- head/www/chromium/files/patch-chrome_app_settings__strings.grdp (revision 543832) +++ head/www/chromium/files/patch-chrome_app_settings__strings.grdp (revision 543833) @@ -1,20 +1,20 @@ ---- chrome/app/settings_strings.grdp.orig 2020-05-13 18:40:22 UTC +--- chrome/app/settings_strings.grdp.orig 2020-07-07 21:58:13 UTC +++ chrome/app/settings_strings.grdp -@@ -111,7 +111,7 @@ +@@ -83,7 +83,7 @@ Themes - + GTK+ -@@ -125,7 +125,7 @@ +@@ -97,7 +97,7 @@ Use Classic - + Reset to default Index: head/www/chromium/files/patch-chrome_browser_BUILD.gn =================================================================== --- head/www/chromium/files/patch-chrome_browser_BUILD.gn (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_BUILD.gn (revision 543833) @@ -1,22 +1,22 @@ ---- chrome/browser/BUILD.gn.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/BUILD.gn.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/BUILD.gn -@@ -4195,7 +4195,9 @@ jumbo_static_library("browser") { - configs += [ "//build/config/linux:x11" ] +@@ -4209,7 +4209,9 @@ static_library("browser") { + if (use_x11) { deps += [ "//ui/gfx/x" ] } - deps += [ "//services/service_manager/zygote" ] + if (!is_bsd) { + deps += [ "//services/service_manager/zygote" ] + } if (use_allocator == "tcmalloc") { deps += [ "//chrome/common/performance_manager/mojom" ] -@@ -4408,7 +4410,7 @@ jumbo_static_library("browser") { +@@ -4424,7 +4426,7 @@ static_library("browser") { ] } - if (is_posix && !is_mac) { + if (is_posix && !is_mac && !is_bsd) { # TODO(crbug.com/753619): Enable crash reporting on Fuchsia. sources += [ "//chrome/app/chrome_crash_reporter_client.cc", Index: head/www/chromium/files/patch-chrome_browser_about__flags.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_about__flags.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_about__flags.cc (revision 543833) @@ -1,208 +1,183 @@ ---- chrome/browser/about_flags.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/about_flags.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/about_flags.cc -@@ -173,7 +173,7 @@ +@@ -179,7 +179,7 @@ #include "ui/gl/gl_switches.h" #include "ui/native_theme/native_theme_features.h" -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #include "base/allocator/buildflags.h" #endif -@@ -873,7 +873,7 @@ const FeatureEntry::Choice kMemlogSamplingRateChoices[ +@@ -879,7 +879,7 @@ const FeatureEntry::Choice kMemlogSamplingRateChoices[ heap_profiling::kMemlogSamplingRate5MB}, }; -#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) const FeatureEntry::FeatureParam kOmniboxDocumentProviderServerScoring[] = { {"DocumentUseServerScore", "true"}, {"DocumentUseClientScore", "false"}, -@@ -1038,7 +1038,7 @@ const FeatureEntry::FeatureVariation kOmniboxRichAutoc +@@ -1044,7 +1044,7 @@ const FeatureEntry::FeatureVariation kOmniboxRichAutoc nullptr, }}; -#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) +#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) const FeatureEntry::FeatureParam kOmniboxOnFocusSuggestionsParamSERP[] = { - {"ZeroSuggestVariant:6:*", "RemoteSendUrl"}}; -@@ -1154,14 +1154,14 @@ const FeatureEntry::FeatureVariation kOmniboxMaxURLMat - {"6 matches", kOmniboxMaxURLMatches6, base::size(kOmniboxMaxURLMatches6), - nullptr}}; - --#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || \ -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) || \ - defined(OS_CHROMEOS) - const FeatureEntry::FeatureParam kTranslateBubbleUITab[] = { - {language::kTranslateUIBubbleKey, language::kTranslateUIBubbleTabValue}}; - - const FeatureEntry::FeatureVariation kTranslateBubbleUIVariations[] = { - {"Tab", kTranslateBubbleUITab, base::size(kTranslateBubbleUITab), nullptr}}; --#endif // OS_LINUX || OS_MACOSX || OS_WIN || OS_CHROMEOS -+#endif // OS_LINUX || OS_MACOSX || OS_WIN || OS_CHROMEOS || OS_BSD - - const FeatureEntry::FeatureParam kMarkHttpAsDangerous[] = { - {security_state::features::kMarkHttpAsFeatureParameterName, -@@ -2264,13 +2264,13 @@ const FeatureEntry kFeatureEntries[] = { + {"ZeroSuggestVariant:6:*", "RemoteSendUrl"}, +@@ -2485,13 +2485,13 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kCloudPrintXpsDescription, kOsWin, SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps)}, #endif // OS_WIN -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) {"enable-webgl2-compute-context", flag_descriptions::kWebGL2ComputeContextName, flag_descriptions::kWebGL2ComputeContextDescription, kOsWin | kOsLinux | kOsCrOS, SINGLE_VALUE_TYPE(switches::kEnableWebGL2ComputeContext)}, -#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) +#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) {"enable-webgl-draft-extensions", flag_descriptions::kWebglDraftExtensionsName, flag_descriptions::kWebglDraftExtensionsDescription, kOsAll, -@@ -2307,14 +2307,14 @@ const FeatureEntry kFeatureEntries[] = { - "OverrideTranslateTriggerInIndia")}, - #endif // OS_ANDROID - --#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || \ -+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) || \ - defined(OS_CHROMEOS) - {"translate-ui-bubble-options", flag_descriptions::kTranslateBubbleUIName, - flag_descriptions::kTranslateBubbleUIDescription, kOsDesktop, - FEATURE_WITH_PARAMS_VALUE_TYPE(language::kUseButtonTranslateBubbleUi, - kTranslateBubbleUIVariations, - "UseButtonTranslateBubbleUI")}, --#endif // OS_LINUX || OS_MACOSX || OS_WIN || OS_CHROMEOS -+#endif // OS_LINUX || OS_MACOSX || OS_WIN || OS_CHROMEOS || OS_BSD - - #if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS) && !defined(OS_CHROMEOS) - {"enable-native-notifications", -@@ -2404,13 +2404,13 @@ const FeatureEntry kFeatureEntries[] = { +@@ -2614,13 +2614,13 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kTerminalSystemAppSplitsDescription, kOsCrOS, FEATURE_VALUE_TYPE(features::kTerminalSystemAppSplits)}, #endif // OS_CHROMEOS -#if defined(OS_CHROMEOS) || defined(OS_LINUX) +#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) #if BUILDFLAG(USE_TCMALLOC) {"dynamic-tcmalloc-tuning", flag_descriptions::kDynamicTcmallocName, flag_descriptions::kDynamicTcmallocDescription, kOsCrOS | kOsLinux, FEATURE_VALUE_TYPE(performance_manager::features::kDynamicTcmallocTuning)}, #endif // BUILDFLAG(USE_TCMALLOC) -#endif // OS_CHROMEOS || OS_LINUX +#endif // OS_CHROMEOS || OS_LINUX || defined(OS_BSD) #if defined(OS_ANDROID) {"enable-credit-card-assist", flag_descriptions::kCreditCardAssistName, flag_descriptions::kCreditCardAssistDescription, kOsAndroid, -@@ -2475,7 +2475,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kEnableLitePageServerPreviewsDescription, kOsAndroid, - FEATURE_VALUE_TYPE(previews::features::kLitePageServerPreviews)}, +@@ -2675,7 +2675,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kEnableOfflinePreviewsDescription, kOsAndroid, + FEATURE_VALUE_TYPE(previews::features::kOfflinePreviews)}, #endif // OS_ANDROID -#if defined(OS_CHROMEOS) || defined(OS_LINUX) +#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) {"enable-save-data", flag_descriptions::kEnableSaveDataName, - flag_descriptions::kEnableSaveDataDescription, kOsCrOS, + flag_descriptions::kEnableSaveDataDescription, kOsCrOS | kOsLinux, SINGLE_VALUE_TYPE( -@@ -3149,7 +3149,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -2685,7 +2685,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kEnableNavigationPredictorDescription, + kOsCrOS | kOsLinux, + FEATURE_VALUE_TYPE(blink::features::kNavigationPredictor)}, +-#endif // OS_CHROMEOS || OS_LINUX ++#endif // OS_CHROMEOS || OS_LINUX || OS_BSD + {"enable-preconnect-to-search", + flag_descriptions::kEnablePreconnectToSearchName, + flag_descriptions::kEnablePreconnectToSearchDescription, kOsAll, +@@ -3399,7 +3399,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE( omnibox::kHistoryQuickProviderAllowMidwordContinuations)}, -#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) {"omnibox-experimental-keyword-mode", flag_descriptions::kOmniboxExperimentalKeywordModeName, flag_descriptions::kOmniboxExperimentalKeywordModeDescription, kOsDesktop, -@@ -3204,7 +3204,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -3454,7 +3454,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kRichAutocompletion, kOmniboxRichAutocompletionVariations, "OmniboxBundledExperimentV1")}, -#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) +#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) {"enable-speculative-service-worker-start-on-query-input", flag_descriptions::kSpeculativeServiceWorkerStartOnQueryInputName, -@@ -3416,13 +3416,13 @@ const FeatureEntry kFeatureEntries[] = { +@@ -3670,13 +3670,13 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kClickToOpenPDFDescription, kOsAll, FEATURE_VALUE_TYPE(features::kClickToOpenPDFPlaceholder)}, -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) {"direct-manipulation-stylus", flag_descriptions::kDirectManipulationStylusName, flag_descriptions::kDirectManipulationStylusDescription, kOsWin | kOsMac | kOsLinux, FEATURE_VALUE_TYPE(features::kDirectManipulationStylus)}, -#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) #if !defined(OS_ANDROID) {"ntp-confirm-suggestion-removals", -@@ -4052,7 +4052,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4361,7 +4361,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(kClickToCallUI)}, #endif // BUILDFLAG(ENABLE_CLICK_TO_CALL) -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \ defined(OS_CHROMEOS) {"remote-copy-receiver", flag_descriptions::kRemoteCopyReceiverName, flag_descriptions::kRemoteCopyReceiverDescription, kOsDesktop, -@@ -4065,7 +4065,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4378,7 +4378,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kRemoteCopyProgressNotificationName, flag_descriptions::kRemoteCopyProgressNotificationDescription, kOsDesktop, FEATURE_VALUE_TYPE(kRemoteCopyProgressNotification)}, -#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || +#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || // defined(OS_CHROMEOS) {"shared-clipboard-ui", flag_descriptions::kSharedClipboardUIName, -@@ -4107,7 +4107,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kSharingDeriveVapidKeyDescription, kOsAll, - FEATURE_VALUE_TYPE(kSharingDeriveVapidKey)}, +@@ -4404,7 +4404,7 @@ const FeatureEntry kFeatureEntries[] = { + FEATURE_VALUE_TYPE( + send_tab_to_self::kSendTabToSelfOmniboxSendingAnimation)}, -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \ defined(OS_CHROMEOS) {"sharing-peer-connection-receiver", flag_descriptions::kSharingPeerConnectionReceiverName, -@@ -4118,7 +4118,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4415,7 +4415,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kSharingPeerConnectionSenderName, flag_descriptions::kSharingPeerConnectionSenderDescription, kOsDesktop, FEATURE_VALUE_TYPE(kSharingPeerConnectionSender)}, -#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || -+#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || ++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) // defined(OS_CHROMEOS) - {"sharing-qr-code-generator", -@@ -4193,13 +4193,13 @@ const FeatureEntry kFeatureEntries[] = { + {"sharing-prefer-vapid", flag_descriptions::kSharingPreferVapidName, +@@ -4490,13 +4490,13 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(printing::features::kEnableCustomMacPaperSizes)}, #endif -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \ defined(OS_CHROMEOS) {"enable-reopen-tab-in-product-help", flag_descriptions::kReopenTabInProductHelpName, flag_descriptions::kReopenTabInProductHelpDescription, kOsDesktop, FEATURE_VALUE_TYPE(feature_engagement::kIPHReopenTabFeature)}, -#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || +#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || // defined(OS_CHROMEOS) {"enable-audio-focus-enforcement", -@@ -4654,7 +4654,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4937,7 +4937,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kEnableSyncUSSNigoriDescription, kOsAll, FEATURE_VALUE_TYPE(switches::kSyncUSSNigori)}, -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) {"global-media-controls", flag_descriptions::kGlobalMediaControlsName, flag_descriptions::kGlobalMediaControlsDescription, kOsWin | kOsMac | kOsLinux, -@@ -4671,7 +4671,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4954,7 +4954,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kGlobalMediaControlsPictureInPictureDescription, kOsWin | kOsMac | kOsLinux | kOsCrOS, FEATURE_VALUE_TYPE(media::kGlobalMediaControlsPictureInPicture)}, -#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) #if BUILDFLAG(ENABLE_SPELLCHECK) && defined(OS_WIN) {"win-use-native-spellchecker", Index: head/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc (revision 543833) @@ -1,11 +1,11 @@ ---- chrome/browser/background/background_mode_manager.cc.orig 2020-02-03 21:52:39 UTC +--- chrome/browser/background/background_mode_manager.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/background/background_mode_manager.cc -@@ -797,7 +797,7 @@ gfx::ImageSkia GetStatusTrayIcon() { +@@ -849,7 +849,7 @@ gfx::ImageSkia GetStatusTrayIcon() { return gfx::ImageSkia(); return family->CreateExact(size).AsImageSkia(); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( IDR_PRODUCT_LOGO_128); #elif defined(OS_MACOSX) Index: head/www/chromium/files/patch-chrome_browser_browser__resources.grd =================================================================== --- head/www/chromium/files/patch-chrome_browser_browser__resources.grd (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_browser__resources.grd (revision 543833) @@ -1,11 +1,11 @@ ---- chrome/browser/browser_resources.grd.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/browser_resources.grd.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/browser_resources.grd -@@ -63,7 +63,7 @@ +@@ -64,7 +64,7 @@ - + Index: head/www/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_chrome__browser__interface__binders.cc (revision 543833) @@ -1,20 +1,20 @@ ---- chrome/browser/chrome_browser_interface_binders.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/chrome_browser_interface_binders.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/chrome_browser_interface_binders.cc -@@ -109,7 +109,7 @@ - #include "chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.h" +@@ -113,7 +113,7 @@ + #include "media/mojo/mojom/speech_recognition_service.mojom.h" #endif -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \ defined(OS_CHROMEOS) #include "chrome/browser/ui/webui/discards/discards.mojom.h" #include "chrome/browser/ui/webui/discards/discards_ui.h" -@@ -532,7 +532,7 @@ void PopulateChromeWebUIFrameBinders( +@@ -551,7 +551,7 @@ void PopulateChromeWebUIFrameBinders( media_app_ui::mojom::PageHandlerFactory, chromeos::MediaAppUI>(map); #endif -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \ defined(OS_CHROMEOS) RegisterWebUIControllerInterfaceBinder(map); Index: head/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc (revision 543833) @@ -1,69 +1,69 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -208,11 +208,11 @@ +@@ -207,11 +207,11 @@ #include "components/arc/metrics/stability_metrics_manager.h" #endif // defined(OS_CHROMEOS) -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) #include "chrome/browser/first_run/upgrade_util_linux.h" -#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) +#endif // (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) -#if defined(OS_LINUX) +#if defined(OS_LINUX) && !defined(OS_BSD) #include "components/crash/core/app/breakpad_linux.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -246,7 +246,7 @@ +@@ -245,7 +245,7 @@ #endif // defined(OS_WIN) #if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)) #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h" #include "chrome/browser/profiles/profile_activity_metrics_recorder.h" #endif -@@ -919,7 +919,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -918,7 +918,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { AddFirstRunNewTabs(browser_creator_.get(), master_prefs_->new_tabs); } -#if defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_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 . -@@ -928,7 +928,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -927,7 +927,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { &user_native_messaging_dir)); if (!base::PathExists(user_native_messaging_dir)) base::CreateDirectory(user_native_messaging_dir); -#endif // defined(OS_MACOSX) || defined(OS_LINUX) +#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) } #endif // !defined(OS_ANDROID) && !defined(OS_CHROMEOS) -@@ -966,7 +966,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { - } +@@ -954,7 +954,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { + #endif // BUILDFLAG(ENABLE_VR) && OS_WIN #if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)) metrics::DesktopSessionDurationTracker::Initialize(); ProfileActivityMetricsRecorder::Initialize(); #endif -@@ -1119,6 +1119,7 @@ void ChromeBrowserMainParts::PostBrowserStart() { +@@ -1107,6 +1107,7 @@ void ChromeBrowserMainParts::PostBrowserStart() { base::TimeDelta::FromMinutes(1)); #if !defined(OS_ANDROID) +#if !defined(OS_BSD) if (base::FeatureList::IsEnabled(features::kWebUsb)) { web_usb_detector_.reset(new WebUsbDetector()); base::PostTask( -@@ -1127,6 +1128,7 @@ void ChromeBrowserMainParts::PostBrowserStart() { +@@ -1115,6 +1116,7 @@ void ChromeBrowserMainParts::PostBrowserStart() { base::BindOnce(&WebUsbDetector::Initialize, base::Unretained(web_usb_detector_.get()))); } +#endif if (base::FeatureList::IsEnabled(features::kTabMetricsLogging)) { // Initialize the TabActivityWatcher to begin logging tab activity events. resource_coordinator::TabActivityWatcher::GetInstance(); Index: head/www/chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc (revision 543833) @@ -1,20 +1,20 @@ ---- chrome/browser/chrome_browser_main_posix.cc.orig 2019-06-04 18:55:16 UTC +--- chrome/browser/chrome_browser_main_posix.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/chrome_browser_main_posix.cc -@@ -70,7 +70,7 @@ void ExitHandler::ExitWhenPossibleOnUIThread(int signa +@@ -71,7 +71,7 @@ void ExitHandler::ExitWhenPossibleOnUIThread(int signa // ExitHandler takes care of deleting itself. new ExitHandler(); } else { -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) switch (signal) { case SIGINT: case SIGHUP: -@@ -166,7 +166,7 @@ void ChromeBrowserMainPartsPosix::PostMainMessageLoopS +@@ -167,7 +167,7 @@ void ChromeBrowserMainPartsPosix::PostMainMessageLoopS void ChromeBrowserMainPartsPosix::ShowMissingLocaleMessageBox() { #if defined(OS_CHROMEOS) NOTREACHED(); // Should not ever happen on ChromeOS. -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_BSD) // Not called on Mac because we load the locale files differently. NOTREACHED(); #elif defined(USE_AURA) Index: head/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc (revision 543833) @@ -1,121 +1,121 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -396,7 +396,7 @@ +@@ -407,7 +407,7 @@ #include "components/user_manager/user.h" #include "components/user_manager/user_manager.h" #include "services/service_manager/public/mojom/interface_provider_spec.mojom.h" -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) #include "chrome/browser/chrome_browser_main_linux.h" #elif defined(OS_ANDROID) #include "base/android/application_status_listener.h" -@@ -450,12 +450,12 @@ +@@ -460,12 +460,12 @@ #endif // !defined(OS_ANDROID) #if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) #include "chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h" #include "services/service_manager/sandbox/features.h" #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) && !defined(OS_BSD) #include "components/crash/core/app/crash_switches.h" #include "components/crash/core/app/crashpad.h" #endif -@@ -483,7 +483,7 @@ +@@ -493,7 +493,7 @@ #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" #endif -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" #endif -@@ -789,11 +789,13 @@ breakpad::CrashHandlerHostLinux* CreateCrashHandlerHos +@@ -801,11 +801,13 @@ breakpad::CrashHandlerHostLinux* CreateCrashHandlerHos } int GetCrashSignalFD(const base::CommandLine& command_line) { +#if !defined(OS_BSD) if (crash_reporter::IsCrashpadEnabled()) { int fd; pid_t pid; return crash_reporter::GetHandlerSocket(&fd, &pid) ? fd : -1; } +#endif // Extensions have the same process type as renderers. if (command_line.HasSwitch(extensions::switches::kExtensionProcess)) { -@@ -1230,7 +1232,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( +@@ -1311,7 +1313,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( #elif defined(OS_CHROMEOS) main_parts = std::make_unique( parameters, startup_data_); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) main_parts = std::make_unique(parameters, startup_data_); #elif defined(OS_ANDROID) -@@ -1256,7 +1258,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( +@@ -1337,7 +1339,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( // Construct additional browser parts. Stages are called in the order in // which they are added. #if defined(TOOLKIT_VIEWS) -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) main_parts->AddParts(new ChromeBrowserMainExtraPartsViewsLinux()); #else main_parts->AddParts(new ChromeBrowserMainExtraPartsViews()); -@@ -1979,7 +1981,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2082,7 +2084,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin command_line->AppendSwitchASCII(switches::kMetricsClientID, client_info->client_id); } -#elif defined(OS_POSIX) +#elif defined(OS_POSIX) && !defined(OS_BSD) #if defined(OS_ANDROID) bool enable_crash_reporter = true; #else -@@ -2256,7 +2258,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2377,7 +2379,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin StackSamplingConfiguration::Get()->AppendCommandLineSwitchForChildProcess( process_type, command_line); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) // Processes may only query perf_event_open with the BPF sandbox disabled. if (browser_command_line.HasSwitch(switches::kEnableThreadInstructionCount) && command_line->HasSwitch(service_manager::switches::kNoSandbox)) { -@@ -3546,7 +3548,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -3638,7 +3640,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst } } -#if defined(OS_POSIX) && !defined(OS_MACOSX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, -@@ -3681,7 +3683,7 @@ void ChromeContentBrowserClient::BindCredentialManager - } +@@ -3758,7 +3760,7 @@ bool ChromeContentBrowserClient::IsRendererCodeIntegri + #endif // defined(OS_WIN) #if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) bool ShouldEnableAudioSandbox(const policy::PolicyMap& policies) { const base::Value* audio_sandbox_enabled_policy_value = policies.GetValue(policy::key::kAudioSandboxEnabled); -@@ -3699,7 +3701,7 @@ bool ShouldEnableAudioSandbox(const policy::PolicyMap& +@@ -3776,7 +3778,7 @@ bool ShouldEnableAudioSandbox(const policy::PolicyMap& void ChromeContentBrowserClient::WillStartServiceManager() { #if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) if (startup_data_) { auto* chrome_feature_list_creator = startup_data_->chrome_feature_list_creator(); -@@ -3984,7 +3986,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4043,7 +4045,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati } #if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) - MaybeAddThrottle(&throttles, - browser_switcher::BrowserSwitcherNavigationThrottle:: - MaybeCreateThrottleFor(handle)); + MaybeAddThrottle(browser_switcher::BrowserSwitcherNavigationThrottle:: + MaybeCreateThrottleFor(handle), + &throttles); Index: head/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h =================================================================== --- head/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h (revision 543833) @@ -1,17 +1,17 @@ ---- chrome/browser/chrome_content_browser_client.h.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -369,12 +369,12 @@ class ChromeContentBrowserClient : public content::Con +@@ -377,12 +377,12 @@ class ChromeContentBrowserClient : public content::Con void OverridePageVisibilityState( content::RenderFrameHost* render_frame_host, content::PageVisibilityState* visibility_state) override; -#if defined(OS_POSIX) && !defined(OS_MACOSX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, content::PosixFileDescriptorInfo* mappings) override; -#endif // defined(OS_POSIX) && !defined(OS_MACOSX) +#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD) #if defined(OS_WIN) bool PreSpawnRenderer(sandbox::TargetPolicy* policy, RendererSpawnFlags flags) override; Index: head/www/chromium/files/patch-chrome_browser_custom__handlers_protocol__handler__registry.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_custom__handlers_protocol__handler__registry.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_custom__handlers_protocol__handler__registry.cc (revision 543833) @@ -1,11 +1,11 @@ ---- chrome/browser/custom_handlers/protocol_handler_registry.cc.orig 2020-02-03 21:52:39 UTC +--- chrome/browser/custom_handlers/protocol_handler_registry.cc.orig 2020-07-07 21:57:32 UTC +++ chrome/browser/custom_handlers/protocol_handler_registry.cc -@@ -42,7 +42,7 @@ const ProtocolHandler& LookupHandler( +@@ -43,7 +43,7 @@ const ProtocolHandler& LookupHandler( // If true default protocol handlers will be removed if the OS level // registration for a protocol is no longer Chrome. bool ShouldRemoveHandlersNotInOS() { -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) // We don't do this on Linux as the OS registration there is not reliable, // and Chrome OS doesn't have any notion of OS registration. // TODO(benwells): When Linux support is more reliable remove this Index: head/www/chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc (revision 543833) @@ -1,20 +1,20 @@ ---- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2020-03-16 18:40:29 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1249,7 +1249,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1266,7 +1266,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe target_info->is_filetype_handled_safely) DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) if (item->GetOriginalMimeType() == "application/x-x509-user-cert") DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true); #endif -@@ -1273,7 +1273,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1290,7 +1290,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile( const base::FilePath& path) { -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) { return !download_prefs_->ShouldOpenPdfInSystemReader(); } Index: head/www/chromium/files/patch-chrome_browser_download_download__item__model.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_download_download__item__model.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_download_download__item__model.cc (revision 543833) @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_item_model.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/download/download_item_model.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/download/download_item_model.cc -@@ -595,7 +595,7 @@ bool DownloadItemModel::IsCommandChecked( +@@ -599,7 +599,7 @@ bool DownloadItemModel::IsCommandChecked( return download_->GetOpenWhenComplete() || download_crx_util::IsExtensionDownload(*download_); case DownloadCommands::ALWAYS_OPEN_TYPE: -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) if (download_commands->CanOpenPdfInSystemViewer()) { DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile()); return prefs->ShouldOpenPdfInSystemReader(); -@@ -635,7 +635,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand +@@ -639,7 +639,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand bool is_checked = IsCommandChecked(download_commands, DownloadCommands::ALWAYS_OPEN_TYPE); DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile()); -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) if (download_commands->CanOpenPdfInSystemViewer()) { prefs->SetShouldOpenPdfInSystemReader(!is_checked); SetShouldPreferOpeningInBrowser(is_checked); Index: head/www/chromium/files/patch-chrome_browser_download_download__prefs.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_download_download__prefs.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_download_download__prefs.cc (revision 543833) @@ -1,65 +1,65 @@ ---- chrome/browser/download/download_prefs.cc.orig 2020-02-03 21:52:39 UTC +--- chrome/browser/download/download_prefs.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/download/download_prefs.cc -@@ -63,7 +63,7 @@ namespace { +@@ -66,7 +66,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 defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) base::FilePath home_dir = base::GetHomeDir(); if (download_path == home_dir) { return true; -@@ -159,7 +159,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi +@@ -171,7 +171,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi GetDefaultDownloadDirectoryForProfile())); #endif // defined(OS_CHROMEOS) -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) should_open_pdf_in_system_reader_ = prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader); #endif -@@ -261,7 +261,7 @@ void DownloadPrefs::RegisterProfilePrefs( +@@ -291,7 +291,7 @@ void DownloadPrefs::RegisterProfilePrefs( default_download_path); registry->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory, default_download_path); -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false); #endif #if defined(OS_ANDROID) -@@ -360,7 +360,7 @@ bool DownloadPrefs::IsDownloadPathManaged() const { +@@ -391,7 +391,7 @@ bool DownloadPrefs::IsDownloadPathManaged() const { } - bool DownloadPrefs::IsAutoOpenUsed() const { + bool DownloadPrefs::IsAutoOpenByUserUsed() const { -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) if (ShouldOpenPdfInSystemReader()) return true; #endif -@@ -374,7 +374,7 @@ bool DownloadPrefs::IsAutoOpenEnabledBasedOnExtension( +@@ -405,7 +405,7 @@ bool DownloadPrefs::IsAutoOpenEnabled(const GURL& url, return false; DCHECK(extension[0] == base::FilePath::kExtensionSeparator); extension.erase(0, 1); -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) if (base::FilePath::CompareEqualIgnoreCase(extension, FILE_PATH_LITERAL("pdf")) && ShouldOpenPdfInSystemReader()) -@@ -411,7 +411,7 @@ void DownloadPrefs::DisableAutoOpenBasedOnExtension( +@@ -455,7 +455,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens SaveAutoOpenState(); } -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) void DownloadPrefs::SetShouldOpenPdfInSystemReader(bool should_open) { if (should_open_pdf_in_system_reader_ == should_open) return; -@@ -432,7 +432,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons +@@ -476,7 +476,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons #endif - void DownloadPrefs::ResetAutoOpen() { + void DownloadPrefs::ResetAutoOpenByUser() { -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) SetShouldOpenPdfInSystemReader(false); #endif - auto_open_.clear(); + auto_open_by_user_.clear(); Index: head/www/chromium/files/patch-chrome_browser_download_download__prefs.h =================================================================== --- head/www/chromium/files/patch-chrome_browser_download_download__prefs.h (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_download_download__prefs.h (revision 543833) @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_prefs.h.orig 2019-06-04 18:55:17 UTC +--- chrome/browser/download/download_prefs.h.orig 2020-07-07 21:57:32 UTC +++ chrome/browser/download/download_prefs.h -@@ -102,7 +102,7 @@ class DownloadPrefs { +@@ -110,7 +110,7 @@ class DownloadPrefs { // Disables auto-open based on file extension. - void DisableAutoOpenBasedOnExtension(const base::FilePath& file_name); + void DisableAutoOpenByUserBasedOnExtension(const base::FilePath& file_name); -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) // Store the user preference to disk. If |should_open| is true, also disable // the built-in PDF plugin. If |should_open| is false, enable the PDF plugin. void SetShouldOpenPdfInSystemReader(bool should_open); -@@ -150,7 +150,7 @@ class DownloadPrefs { - AutoOpenCompareFunctor> AutoOpenSet; - AutoOpenSet auto_open_; +@@ -167,7 +167,7 @@ class DownloadPrefs { + + std::unique_ptr auto_open_allowed_by_urls_; -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) bool should_open_pdf_in_system_reader_; #endif Index: head/www/chromium/files/patch-chrome_browser_download_download__query.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_download_download__query.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_download_download__query.cc (revision 543833) @@ -1,14 +1,14 @@ ---- chrome/browser/download/download_query.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/download/download_query.cc.orig 2020-07-07 21:57:32 UTC +++ chrome/browser/download/download_query.cc -@@ -27,7 +27,11 @@ +@@ -28,7 +28,11 @@ #include "components/download/public/common/download_item.h" #include "components/url_formatter/url_formatter.h" #include "content/public/browser/content_browser_client.h" +#if defined(OS_BSD) +#include +#else #include "third_party/re2/src/re2/re2.h" +#endif #include "url/gurl.h" using download::DownloadDangerType; Index: head/www/chromium/files/patch-chrome_browser_download_download__shelf__context__menu.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_download_download__shelf__context__menu.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_download_download__shelf__context__menu.cc (revision 543833) @@ -1,11 +1,11 @@ ---- chrome/browser/download/download_shelf_context_menu.cc.orig 2020-03-16 18:39:43 UTC +--- chrome/browser/download/download_shelf_context_menu.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/download/download_shelf_context_menu.cc -@@ -147,7 +147,7 @@ base::string16 DownloadShelfContextMenu::GetLabelForCo +@@ -149,7 +149,7 @@ base::string16 DownloadShelfContextMenu::GetLabelForCo : IDS_DOWNLOAD_MENU_PLATFORM_OPEN_ALWAYS; break; } -#elif defined(OS_MACOSX) || defined(OS_LINUX) +#elif defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) if (can_open_pdf_in_system_viewer) { id = IDS_DOWNLOAD_MENU_PLATFORM_OPEN_ALWAYS; break; Index: head/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn (revision 543833) @@ -1,15 +1,15 @@ ---- chrome/browser/extensions/BUILD.gn.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1185,6 +1185,12 @@ jumbo_static_library("extensions") { +@@ -1186,6 +1186,12 @@ static_library("extensions") { deps += [ "//chrome/common:service_process_mojom" ] } + if (is_bsd) { + sources -= [ + "api/image_writer_private/removable_storage_provider_linux.cc", + ] + } + if (enable_service_discovery) { sources += [ "api/mdns/mdns_api.cc", Index: head/www/chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_device__info__fetcher.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_device__info__fetcher.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_extensions_api_enterprise__reporting__private_device__info__fetcher.cc (revision 543833) @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/device_info_fetcher.cc.orig 2020-03-17 09:37:45 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/device_info_fetcher.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/device_info_fetcher.cc -@@ -11,7 +11,7 @@ +@@ -10,7 +10,7 @@ #include "chrome/browser/extensions/api/enterprise_reporting_private/device_info_fetcher_mac.h" #elif defined(OS_WIN) #include "chrome/browser/extensions/api/enterprise_reporting_private/device_info_fetcher_win.h" -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) #include "chrome/browser/extensions/api/enterprise_reporting_private/device_info_fetcher_linux.h" #endif -@@ -58,7 +58,7 @@ std::unique_ptr DeviceInfoFetcher:: +@@ -57,7 +57,7 @@ std::unique_ptr DeviceInfoFetcher:: return std::make_unique(); #elif defined(OS_WIN) return std::make_unique(); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) return std::make_unique(); #else return std::make_unique(); Index: head/www/chromium/files/patch-chrome_browser_extensions_api_erp_chrome_desktop_report_request_helper.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_api_erp_chrome_desktop_report_request_helper.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_extensions_api_erp_chrome_desktop_report_request_helper.cc (revision 543833) @@ -1,29 +1,29 @@ ---- chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc.orig 2020-05-18 18:39:09 UTC +--- chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/extensions/api/enterprise_reporting_private/chrome_desktop_report_request_helper.cc @@ -40,7 +40,7 @@ #include "base/win/registry.h" #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #include "base/environment.h" #include "base/nix/xdg_util.h" #endif @@ -384,7 +384,7 @@ base::FilePath GetEndpointVerificationDir() { return *GetEndpointVerificationDirOverride(); #if defined(OS_WIN) if (!base::PathService::Get(base::DIR_LOCAL_APP_DATA, &path)) -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) std::unique_ptr env(base::Environment::Create()); path = base::nix::GetXDGDirectory(env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir); @@ -395,7 +395,7 @@ base::FilePath GetEndpointVerificationDir() { if (true) #endif return path; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) path = path.AppendASCII("google"); #else path = path.AppendASCII("Google"); Index: head/www/chromium/files/patch-chrome_browser_extensions_api_extension__action_browser__action__interactive__test.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_api_extension__action_browser__action__interactive__test.cc (nonexistent) +++ head/www/chromium/files/patch-chrome_browser_extensions_api_extension__action_browser__action__interactive__test.cc (revision 543833) @@ -0,0 +1,11 @@ +--- chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc.orig 2020-07-13 09:17:42 UTC ++++ chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc +@@ -280,7 +280,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, T + frame_observer.Wait(); + // Non-Aura Linux uses a singleton for the popup, so it looks like all windows + // have popups if there is any popup open. +-#if !(defined(OS_LINUX) && !defined(USE_AURA)) ++#if !((defined(OS_LINUX) || defined(OS_BSD)) && !defined(USE_AURA)) + // Starting window does not have a popup. + EXPECT_FALSE(ExtensionActionTestHelper::Create(browser())->HasPopup()); + #endif Property changes on: head/www/chromium/files/patch-chrome_browser_extensions_api_extension__action_browser__action__interactive__test.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc (revision 543833) @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2019-04-30 22:22:33 UTC +--- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2020-07-07 21:57:32 UTC +++ chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc -@@ -299,6 +299,8 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor +@@ -292,6 +292,8 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor info->os = extensions::api::runtime::PLATFORM_OS_CROS; } else if (strcmp(os, "linux") == 0) { info->os = extensions::api::runtime::PLATFORM_OS_LINUX; + } else if (strcmp(os, "freebsd") == 0) { + info->os = extensions::api::runtime::PLATFORM_OS_FREEBSD; } else if (strcmp(os, "openbsd") == 0) { info->os = extensions::api::runtime::PLATFORM_OS_OPENBSD; } else { Index: head/www/chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc (revision 543833) @@ -1,41 +1,41 @@ ---- chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig 2020-07-07 21:57:32 UTC +++ chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc -@@ -29,7 +29,7 @@ +@@ -30,7 +30,7 @@ #include "extensions/browser/process_manager.h" #include "extensions/common/error_utils.h" -#if defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "extensions/common/permissions/permissions_data.h" #endif -@@ -38,7 +38,7 @@ namespace { +@@ -39,7 +39,7 @@ namespace { bool CanEnableAudioDebugRecordingsFromExtension( const extensions::Extension* extension) { bool enabled_by_permissions = false; -#if defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) if (extension) { enabled_by_permissions = extension->permissions_data()->active_permissions().HasAPIPermission( -@@ -569,7 +569,7 @@ void WebrtcLoggingPrivateStartEventLoggingFunction::Fi +@@ -570,7 +570,7 @@ void WebrtcLoggingPrivateStartEventLoggingFunction::Fi ExtensionFunction::ResponseAction WebrtcLoggingPrivateGetLogsDirectoryFunction::Run() { -#if defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Unlike other WebrtcLoggingPrivate functions that take a RequestInfo object, // this function shouldn't be called by a component extension on behalf of // some web code. It returns a DirectoryEntry for use directly in the calling -@@ -592,9 +592,9 @@ WebrtcLoggingPrivateGetLogsDirectoryFunction::Run() { +@@ -593,9 +593,9 @@ WebrtcLoggingPrivateGetLogsDirectoryFunction::Run() { &WebrtcLoggingPrivateGetLogsDirectoryFunction::FireErrorCallback, this)); return RespondLater(); -#else // defined(OS_LINUX) || defined(OS_CHROMEOS) +#else // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) return RespondNow(Error("Not supported on the current OS")); -#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) } void WebrtcLoggingPrivateGetLogsDirectoryFunction::FireCallback( Index: head/www/chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc (revision 543833) @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/extensions/browser_context_keyed_service_factories.cc @@ -53,7 +53,7 @@ #include "extensions/browser/api/networking_private/networking_private_delegate_factory.h" #include "ppapi/buildflags/buildflags.h" -#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) +#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" #endif -@@ -96,7 +96,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() +@@ -103,7 +103,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() extensions::IdentityAPI::GetFactoryInstance(); extensions::InstallTrackerFactory::GetInstance(); extensions::InstallVerifierFactory::GetInstance(); -#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) +#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) extensions::InputImeAPI::GetFactoryInstance(); #endif extensions::LanguageSettingsPrivateDelegateFactory::GetInstance(); Index: head/www/chromium/files/patch-chrome_browser_flag__descriptions.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_flag__descriptions.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_flag__descriptions.cc (revision 543833) @@ -1,65 +1,65 @@ ---- chrome/browser/flag_descriptions.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/flag_descriptions.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/flag_descriptions.cc -@@ -3723,7 +3723,7 @@ const char kZeroStateFilesDescription[] = +@@ -3923,7 +3923,7 @@ const char kZeroCopyVideoCaptureDescription[] = #endif // defined(OS_CHROMEOS) -#if defined(OS_CHROMEOS) || defined(OS_LINUX) +#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) #if BUILDFLAG(USE_TCMALLOC) const char kDynamicTcmallocName[] = "Dynamic Tcmalloc Tuning"; -@@ -3732,7 +3732,7 @@ const char kDynamicTcmallocDescription[] = +@@ -3932,7 +3932,7 @@ const char kDynamicTcmallocDescription[] = "utilization."; #endif // BUILDFLAG(USE_TCMALLOC) -#endif // #if defined(OS_CHROMEOS) || defined(OS_LINUX) +#endif // #if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) // All views-based platforms -------------------------------------------------- -@@ -3757,13 +3757,13 @@ const char kReopenTabInProductHelpDescription[] = +@@ -3962,13 +3962,13 @@ const char kReopenTabInProductHelpDescription[] = // Random platform combinations ----------------------------------------------- -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) const char kWebGL2ComputeContextName[] = "WebGL 2.0 Compute"; const char kWebGL2ComputeContextDescription[] = "Enable the use of WebGL 2.0 Compute API."; -#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) +#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #if BUILDFLAG(ENABLE_CLICK_TO_CALL) -@@ -3775,7 +3775,7 @@ const char kClickToCallUIDescription[] = +@@ -3980,7 +3980,7 @@ const char kClickToCallUIDescription[] = #endif // BUILDFLAG(ENABLE_CLICK_TO_CALL) -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \ defined(OS_CHROMEOS) - const char kRemoteCopyReceiverName[] = -@@ -3796,16 +3796,16 @@ const char kRemoteCopyProgressNotificationDescription[ + const char kEnableMediaFeedsName[] = "Enables Media Feeds"; +@@ -4012,16 +4012,16 @@ const char kRemoteCopyProgressNotificationDescription[ "Enables progress notifications to be shown for the remote copy feature " "when receiving a message."; -#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || +#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || // defined(OS_CHROMEOS) -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) const char kDirectManipulationStylusName[] = "Direct Manipulation Stylus"; const char kDirectManipulationStylusDescription[] = "If enabled, Chrome will scroll web pages on stylus drag."; -#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) Index: head/www/chromium/files/patch-chrome_browser_flag__descriptions.h =================================================================== --- head/www/chromium/files/patch-chrome_browser_flag__descriptions.h (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_flag__descriptions.h (revision 543833) @@ -1,74 +1,74 @@ ---- chrome/browser/flag_descriptions.h.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/flag_descriptions.h.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/flag_descriptions.h -@@ -18,9 +18,9 @@ +@@ -19,9 +19,9 @@ #include "ppapi/buildflags/buildflags.h" #include "printing/buildflags/buildflags.h" -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #include "base/allocator/buildflags.h" -#endif // defined(OS_LINUX) +#endif // defined(OS_LINUX) || defined(OS_BSD) // This file declares strings used in chrome://flags. These messages are not // translated, because instead of end-users they target Chromium developers and -@@ -2167,14 +2167,14 @@ extern const char kZeroStateFilesDescription[]; +@@ -2303,14 +2303,14 @@ extern const char kZeroStateFilesDescription[]; #endif // #if defined(OS_CHROMEOS) -#if defined(OS_CHROMEOS) || defined(OS_LINUX) +#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) #if BUILDFLAG(USE_TCMALLOC) extern const char kDynamicTcmallocName[]; extern const char kDynamicTcmallocDescription[]; #endif // BUILDFLAG(USE_TCMALLOC) -#endif // #if defined(OS_CHROMEOS) || defined(OS_LINUX) +#endif // #if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) // All views-based platforms -------------------------------------------------- -@@ -2193,12 +2193,12 @@ extern const char kReopenTabInProductHelpDescription[] +@@ -2332,12 +2332,12 @@ extern const char kReopenTabInProductHelpDescription[] // Random platform combinations ----------------------------------------------- -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) extern const char kWebGL2ComputeContextName[]; extern const char kWebGL2ComputeContextDescription[]; -#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) +#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #if BUILDFLAG(ENABLE_CLICK_TO_CALL) -@@ -2207,7 +2207,7 @@ extern const char kClickToCallUIDescription[]; +@@ -2346,7 +2346,7 @@ extern const char kClickToCallUIDescription[]; #endif // BUILDFLAG(ENABLE_CLICK_TO_CALL) -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \ defined(OS_CHROMEOS) - extern const char kRemoteCopyReceiverName[]; -@@ -2219,15 +2219,15 @@ extern const char kRemoteCopyImageNotificationDescript + extern const char kEnableMediaFeedsName[]; +@@ -2364,15 +2364,15 @@ extern const char kRemoteCopyPersistentNotificationDes extern const char kRemoteCopyProgressNotificationName[]; extern const char kRemoteCopyProgressNotificationDescription[]; -#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || +#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) // defined(OS_CHROMEOS) -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) extern const char kDirectManipulationStylusName[]; extern const char kDirectManipulationStylusDescription[]; -#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) Index: head/www/chromium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc (revision 543833) @@ -1,14 +1,14 @@ ---- chrome/browser/media_galleries/media_file_system_registry.cc.orig 2019-04-30 22:22:34 UTC +--- chrome/browser/media_galleries/media_file_system_registry.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/media_galleries/media_file_system_registry.cc -@@ -732,7 +732,10 @@ class MediaFileSystemRegistry::MediaFileSystemContextI +@@ -736,7 +736,10 @@ class MediaFileSystemRegistry::MediaFileSystemContextI // Constructor in 'private' section because depends on private class definition. MediaFileSystemRegistry::MediaFileSystemRegistry() : file_system_context_(new MediaFileSystemContextImpl) { - StorageMonitor::GetInstance()->AddObserver(this); + // This conditional is needed for shutdown. Destructors + // try to get the media file system registry. + if (StorageMonitor::GetInstance()) + StorageMonitor::GetInstance()->AddObserver(this); } MediaFileSystemRegistry::~MediaFileSystemRegistry() { Index: head/www/chromium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc (revision 543833) @@ -1,27 +1,30 @@ ---- chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc.orig 2020-07-07 21:57:32 UTC +++ chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc -@@ -9,8 +9,6 @@ +@@ -9,7 +9,11 @@ #include #include --#include -- ++#include "build/build_config.h" ++ ++#if !defined(OS_BSD) + #include ++#endif + + #include "base/check.h" #include "base/files/scoped_file.h" - #include "base/logging.h" - #include "net/base/network_interfaces_linux.h" -@@ -20,6 +18,7 @@ namespace media_router { +@@ -20,6 +24,7 @@ namespace media_router { bool MaybeGetWifiSSID(const std::string& if_name, std::string* ssid_out) { DCHECK(ssid_out); +#if !defined(OS_BSD) base::ScopedFD ioctl_socket(socket(AF_INET, SOCK_DGRAM, 0)); if (!ioctl_socket.is_valid()) { // AF_INET is for IPv4, so it may fail for IPv6-only hosts even when there -@@ -41,6 +40,7 @@ bool MaybeGetWifiSSID(const std::string& if_name, std: +@@ -41,6 +46,7 @@ bool MaybeGetWifiSSID(const std::string& if_name, std: ssid_out->assign(ssid); return true; } +#endif return false; } Index: head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc (revision 543833) @@ -1,33 +1,33 @@ ---- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2020-03-16 18:39:44 UTC +--- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/media/webrtc/webrtc_logging_controller.cc -@@ -24,10 +24,10 @@ +@@ -23,10 +23,10 @@ + #include "content/public/browser/browser_context.h" #include "content/public/browser/render_process_host.h" - #include "services/service_manager/public/cpp/connector.h" -#if defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) #include "content/public/browser/child_process_security_policy.h" #include "storage/browser/file_system/isolated_context.h" -#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) using webrtc_event_logging::WebRtcEventLogManager; -@@ -270,7 +270,7 @@ void WebRtcLoggingController::StartEventLogging( +@@ -269,7 +269,7 @@ void WebRtcLoggingController::StartEventLogging( web_app_id, callback); } -#if defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) void WebRtcLoggingController::GetLogsDirectory( const LogsDirectoryCallback& callback, const LogsDirectoryErrorCallback& error_callback) { -@@ -315,7 +315,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess +@@ -314,7 +314,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess base::SequencedTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(callback, file_system.id(), registered_name)); } -#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) void WebRtcLoggingController::OnRtpPacket( std::unique_ptr packet_header, Index: head/www/chromium/files/patch-chrome_browser_memory__details.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_memory__details.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_memory__details.cc (revision 543833) @@ -1,20 +1,20 @@ ---- chrome/browser/memory_details.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/memory_details.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/memory_details.cc @@ -39,7 +39,7 @@ #include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h" #include "ui/base/l10n/l10n_util.h" -#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) #include "services/service_manager/zygote/zygote_host_linux.h" #endif -@@ -337,7 +337,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() { +@@ -340,7 +340,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() { process.titles.push_back(title); } -#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD) if (service_manager::ZygoteHost::GetInstance()->IsZygotePid(process.pid)) { process.process_type = content::PROCESS_TYPE_ZYGOTE; } Index: head/www/chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc (revision 543833) @@ -1,21 +1,21 @@ ---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2019-09-09 21:55:09 UTC +--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc -@@ -47,7 +47,9 @@ +@@ -51,7 +51,9 @@ #if defined(OS_LINUX) && !defined(OS_CHROMEOS) #include +#endif +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) #include "base/linux_util.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" -@@ -55,7 +57,7 @@ +@@ -59,7 +61,7 @@ #if defined(USE_X11) #include "ui/base/x/x11_util.h" #endif -#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) #if defined(USE_OZONE) || defined(USE_X11) #include "ui/events/devices/device_data_manager.h" Index: head/www/chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc (revision 543833) @@ -1,25 +1,25 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -679,11 +679,11 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -680,11 +680,11 @@ void ChromeMetricsServiceClient::RegisterMetricsServic #endif // defined(OS_WIN) #if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) metrics_service_->RegisterMetricsProvider( std::make_unique()); #endif // defined(OS_WIN) || defined(OS_MACOSX) || \ - // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) #if BUILDFLAG(ENABLE_PLUGINS) plugin_metrics_provider_ = new PluginMetricsProvider(local_state); -@@ -941,7 +941,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -942,7 +942,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve } #endif #if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) // This creates the DesktopProfileSessionDurationsServices if it didn't exist // already. metrics::DesktopProfileSessionDurationsServiceFactory::GetForBrowserContext( Index: head/www/chromium/files/patch-chrome_browser_metrics_process__memory__metrics__emitter.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_metrics_process__memory__metrics__emitter.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_metrics_process__memory__metrics__emitter.cc (revision 543833) @@ -1,20 +1,20 @@ ---- chrome/browser/metrics/process_memory_metrics_emitter.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/metrics/process_memory_metrics_emitter.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/metrics/process_memory_metrics_emitter.cc -@@ -462,7 +462,7 @@ void EmitProcessUmaAndUkm(const GlobalMemoryDump::Proc +@@ -489,7 +489,7 @@ void EmitProcessUmaAndUkm(const GlobalMemoryDump::Proc - builder->SetPrivateMemoryFootprint(pmd.os_dump().private_footprint_kb / 1024); - builder->SetSharedMemoryFootprint(pmd.os_dump().shared_footprint_kb / 1024); + builder->SetPrivateMemoryFootprint(pmd.os_dump().private_footprint_kb / kKiB); + builder->SetSharedMemoryFootprint(pmd.os_dump().shared_footprint_kb / kKiB); -#if defined(OS_LINUX) || defined(OS_ANDROID) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) builder->SetPrivateSwapFootprint(pmd.os_dump().private_footprint_swap_kb / - 1024); + kKiB); #endif -@@ -485,7 +485,7 @@ void EmitProcessUmaAndUkm(const GlobalMemoryDump::Proc +@@ -512,7 +512,7 @@ void EmitProcessUmaAndUkm(const GlobalMemoryDump::Proc MEMORY_METRICS_HISTOGRAM_MB(std::string(kMemoryHistogramPrefix) + process_name + ".SharedMemoryFootprint", - pmd.os_dump().shared_footprint_kb / 1024); + pmd.os_dump().shared_footprint_kb / kKiB); -#if defined(OS_LINUX) || defined(OS_ANDROID) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) MEMORY_METRICS_HISTOGRAM_MB(std::string(kMemoryHistogramPrefix) + process_name + ".PrivateSwapFootprint", - pmd.os_dump().private_footprint_swap_kb / 1024); + pmd.os_dump().private_footprint_swap_kb / kKiB); Index: head/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.cc (revision 543833) @@ -1,64 +1,64 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/net/system_network_context_manager.cc -@@ -74,11 +74,11 @@ +@@ -75,11 +75,11 @@ #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" #endif // defined(OS_CHROMEOS) -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) #include "chrome/common/chrome_paths_internal.h" #include "chrome/grit/chromium_strings.h" #include "ui/base/l10n/l10n_util.h" -#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) +#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) #if BUILDFLAG(ENABLE_EXTENSIONS) #include "extensions/common/constants.h" -@@ -137,10 +137,10 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut +@@ -138,10 +138,10 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut auth_dynamic_params->enable_negotiate_port = local_state->GetBoolean(prefs::kEnableAuthNegotiatePort); -#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD) auth_dynamic_params->delegate_by_kdc_policy = local_state->GetBoolean(prefs::kAuthNegotiateDelegateByKdcPolicy); -#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD) #if defined(OS_POSIX) auth_dynamic_params->ntlm_v2_enabled = -@@ -349,10 +349,10 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -352,10 +352,10 @@ SystemNetworkContextManager::SystemNetworkContextManag pref_change_registrar_.Add(prefs::kEnableAuthNegotiatePort, auth_pref_callback); -#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD) pref_change_registrar_.Add(prefs::kAuthNegotiateDelegateByKdcPolicy, auth_pref_callback); -#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD) #if defined(OS_POSIX) pref_change_registrar_.Add(prefs::kNtlmV2Enabled, auth_pref_callback); -@@ -397,10 +397,10 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -402,10 +402,10 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe registry->RegisterStringPref(prefs::kAuthServerWhitelist, std::string()); registry->RegisterStringPref(prefs::kAuthNegotiateDelegateWhitelist, std::string()); -#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD) registry->RegisterBooleanPref(prefs::kAuthNegotiateDelegateByKdcPolicy, false); -#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD) #if defined(OS_POSIX) registry->RegisterBooleanPref( -@@ -485,7 +485,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea +@@ -490,7 +490,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea // NetworkContext is created, but before anything has the chance to use it. stub_resolver_config_reader_.UpdateNetworkService(true /* record_metrics */); -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); Index: head/www/chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc (revision 543833) @@ -1,14 +1,14 @@ ---- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2020-03-16 18:40:29 UTC +--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/password_manager/chrome_password_manager_client.cc -@@ -88,7 +88,11 @@ +@@ -92,7 +92,11 @@ #include "net/base/url_util.h" #include "net/cert/cert_status_flags.h" #include "services/metrics/public/cpp/ukm_recorder.h" +#if defined(OS_BSD) +#include +#else #include "third_party/re2/src/re2/re2.h" +#endif #include "url/url_constants.h" #if BUILDFLAG(FULL_SAFE_BROWSING) Index: head/www/chromium/files/patch-chrome_browser_password__manager_password__store__factory.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_password__manager_password__store__factory.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_password__manager_password__store__factory.cc (revision 543833) @@ -1,11 +1,11 @@ ---- chrome/browser/password_manager/password_store_factory.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/password_manager/password_store_factory.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/password_manager/password_store_factory.cc @@ -189,7 +189,7 @@ PasswordStoreFactory::BuildServiceInstanceFor( base::TimeDelta::FromSeconds(20)); #if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) std::unique_ptr notifier = std::make_unique( - profile); + IdentityManagerFactory::GetForProfile(profile)); Index: head/www/chromium/files/patch-chrome_browser_pdf_pdf__extension__test.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_pdf_pdf__extension__test.cc (nonexistent) +++ head/www/chromium/files/patch-chrome_browser_pdf_pdf__extension__test.cc (revision 543833) @@ -0,0 +1,11 @@ +--- chrome/browser/pdf/pdf_extension_test.cc.orig 2020-07-13 09:21:17 UTC ++++ chrome/browser/pdf/pdf_extension_test.cc +@@ -1796,7 +1796,7 @@ class PDFExtensionClipboardTest : public PDFExtensionT + + // Checks the Linux selection clipboard by polling. + void CheckSelectionClipboard(const std::string& expected) { +-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) + CheckClipboard(ui::ClipboardBuffer::kSelection, expected); + #endif + } Property changes on: head/www/chromium/files/patch-chrome_browser_pdf_pdf__extension__test.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/chromium/files/patch-chrome_browser_performance__monitor_process__metrics__history.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_performance__monitor_process__metrics__history.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_performance__monitor_process__metrics__history.cc (revision 543833) @@ -1,38 +1,38 @@ ---- chrome/browser/performance_monitor/process_metrics_history.cc.orig 2019-10-21 19:06:22 UTC +--- chrome/browser/performance_monitor/process_metrics_history.cc.orig 2020-07-07 21:57:32 UTC +++ chrome/browser/performance_monitor/process_metrics_history.cc @@ -47,7 +47,7 @@ void ProcessMetricsHistory::SampleMetrics() { #if defined(OS_WIN) disk_usage_ = process_metrics_->GetDiskUsageBytesPerSecond(); #endif -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) idle_wakeups_ = process_metrics_->GetIdleWakeupsPerSecond(); #endif #if defined(OS_MACOSX) -@@ -88,7 +88,7 @@ void ProcessMetricsHistory::RunPerformanceTriggers() { +@@ -90,7 +90,7 @@ void ProcessMetricsHistory::UpdateHistograms() { kDiskUsageHistogramMin, kDiskUsageHistogramMax, kDiskUsageHistogramBucketCount); #endif -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) UMA_HISTOGRAM_COUNTS_10000( "PerformanceMonitor.IdleWakeups.BrowserProcess", idle_wakeups_); #endif -@@ -109,7 +109,7 @@ void ProcessMetricsHistory::RunPerformanceTriggers() { +@@ -111,7 +111,7 @@ void ProcessMetricsHistory::UpdateHistograms() { UMA_HISTOGRAM_BOOLEAN("PerformanceMonitor.HighCPU.RendererProcess", true); } -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) UMA_HISTOGRAM_COUNTS_10000( "PerformanceMonitor.IdleWakeups.RendererProcess", idle_wakeups_); #endif -@@ -129,7 +129,7 @@ void ProcessMetricsHistory::RunPerformanceTriggers() { +@@ -131,7 +131,7 @@ void ProcessMetricsHistory::UpdateHistograms() { kHistogramBucketCount); if (cpu_usage_ > kHighCPUUtilizationThreshold) UMA_HISTOGRAM_BOOLEAN("PerformanceMonitor.HighCPU.GPUProcess", true); -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) UMA_HISTOGRAM_COUNTS_10000("PerformanceMonitor.IdleWakeups.GPUProcess", idle_wakeups_); #endif Index: head/www/chromium/files/patch-chrome_browser_performance__monitor_process__metrics__history.h =================================================================== --- head/www/chromium/files/patch-chrome_browser_performance__monitor_process__metrics__history.h (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_performance__monitor_process__metrics__history.h (revision 543833) @@ -1,11 +1,11 @@ ---- chrome/browser/performance_monitor/process_metrics_history.h.orig 2019-06-04 18:55:17 UTC +--- chrome/browser/performance_monitor/process_metrics_history.h.orig 2020-07-07 21:57:32 UTC +++ chrome/browser/performance_monitor/process_metrics_history.h -@@ -72,7 +72,7 @@ class ProcessMetricsHistory { +@@ -71,7 +71,7 @@ class ProcessMetricsHistory { uint64_t disk_usage_ = 0; #endif -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) int idle_wakeups_ = 0; #endif #if defined(OS_MACOSX) Index: head/www/chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc (revision 543833) @@ -1,30 +1,30 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -1162,11 +1162,11 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1193,11 +1193,11 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) -#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD) { key::kAuthNegotiateDelegateByKdcPolicy, prefs::kAuthNegotiateDelegateByKdcPolicy, base::Value::Type::BOOLEAN }, -#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD) #if !defined(OS_MACOSX) { key::kFullscreenAllowed, -@@ -1234,11 +1234,11 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1265,11 +1265,11 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(ENABLE_SPELLCHECK) -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) { key::kAllowNativeNotifications, prefs::kAllowNativeNotifications, base::Value::Type::BOOLEAN }, -#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) +#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) #if defined(OS_CHROMEOS) { key::kRequiredClientCertificateForUser, Index: head/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc (revision 543833) @@ -1,20 +1,20 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -375,7 +375,7 @@ +@@ -380,7 +380,7 @@ #endif #if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) #include "chrome/browser/browser_switcher/browser_switcher_prefs.h" #endif -@@ -1078,7 +1078,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -1075,7 +1075,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync #endif #if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); #endif Index: head/www/chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc (revision 543833) @@ -1,11 +1,11 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2020-03-16 18:40:29 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -295,7 +295,7 @@ void ChromeBrowserMainExtraPartsProfiles:: - if (base::FeatureList::IsEnabled(media::kUseMediaHistoryStore)) - media_history::MediaHistoryKeyedServiceFactory::GetInstance(); +@@ -301,7 +301,7 @@ void ChromeBrowserMainExtraPartsProfiles:: + media_router::MediaRouterUIServiceFactory::GetInstance(); + #endif #if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance(); #endif ModelTypeStoreServiceFactory::GetInstance(); Index: head/www/chromium/files/patch-chrome_browser_profiles_profile__attributes__entry.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_profiles_profile__attributes__entry.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_profiles_profile__attributes__entry.cc (revision 543833) @@ -1,11 +1,11 @@ ---- chrome/browser/profiles/profile_attributes_entry.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/profiles/profile_attributes_entry.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/profiles/profile_attributes_entry.cc -@@ -135,7 +135,7 @@ void ProfileAttributesEntry::Initialize(ProfileInfoCac +@@ -136,7 +136,7 @@ void ProfileAttributesEntry::Initialize(ProfileInfoCac if (is_force_signin_enabled_) { if (!IsAuthenticated()) is_force_signin_profile_locked_ = true; -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) } else if (IsSigninRequired()) { // Profiles that require signin in the absence of an enterprise policy are // left-overs from legacy supervised users. Just unlock them, so users can Index: head/www/chromium/files/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc (revision 543833) @@ -1,29 +1,29 @@ ---- chrome/browser/renderer_context_menu/render_view_context_menu.cc.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/renderer_context_menu/render_view_context_menu.cc.orig 2020-07-07 21:58:13 UTC +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -1678,7 +1678,7 @@ void RenderViewContextMenu::AppendEditableItems() { +@@ -1700,7 +1700,7 @@ void RenderViewContextMenu::AppendEditableItems() { // 'Undo' and 'Redo' for text input with no suggestions and no text selected. // We make an exception for OS X as context clicking will select the closest // word. In this case both items are always shown. -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_BSD) menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_UNDO, IDS_CONTENT_CONTEXT_UNDO); menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_REDO, -@@ -1720,7 +1720,7 @@ void RenderViewContextMenu::AppendLanguageSettings() { +@@ -1742,7 +1742,7 @@ void RenderViewContextMenu::AppendLanguageSettings() { if (!use_spelling) return; -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_BSD) menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS, IDS_CONTENT_CONTEXT_LANGUAGE_SETTINGS); #else -@@ -2059,7 +2059,7 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) +@@ -2083,7 +2083,7 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) case IDC_CHECK_SPELLING_WHILE_TYPING: return prefs->GetBoolean(spellcheck::prefs::kSpellCheckEnable); -#if !defined(OS_MACOSX) && defined(OS_POSIX) +#if !defined(OS_MACOSX) && !defined(OS_BSD) && defined(OS_POSIX) // TODO(suzhe): this should not be enabled for password fields. case IDC_INPUT_METHODS_MENU: return true; Index: head/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.js =================================================================== --- head/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.js (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.js (revision 543833) @@ -1,20 +1,20 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js.orig 2020-07-07 21:57:32 UTC +++ chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js -@@ -24,7 +24,7 @@ cr.define('settings', function() { +@@ -23,7 +23,7 @@ export class AppearanceBrowserProxy { - useDefaultTheme() {} + useDefaultTheme() {} -- // -+ // - useSystemTheme() {} +- // ++ // + useSystemTheme() {} - // -@@ -64,7 +64,7 @@ cr.define('settings', function() { - chrome.send('useDefaultTheme'); - } + // +@@ -63,7 +63,7 @@ export class AppearanceBrowserProxyImpl { + chrome.send('useDefaultTheme'); + } -- // -+ // - /** @override */ - useSystemTheme() { - chrome.send('useSystemTheme'); +- // ++ // + /** @override */ + useSystemTheme() { + chrome.send('useSystemTheme'); Index: head/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html =================================================================== --- head/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html (revision 543832) +++ head/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html (revision 543833) @@ -1,29 +1,29 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2020-05-13 18:40:22 UTC +--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2020-07-07 21:57:32 UTC +++ chrome/browser/resources/settings/appearance_page/appearance_page.html -@@ -52,7 +52,7 @@ +@@ -27,7 +27,7 @@ - + - +