Index: head/www/chromium/Makefile =================================================================== --- head/www/chromium/Makefile (revision 528071) +++ head/www/chromium/Makefile (revision 528072) @@ -1,347 +1,349 @@ # Created by: Florent Thoumie # $FreeBSD$ PORTNAME= chromium -PORTVERSION= 79.0.3945.130 +PORTVERSION= 80.0.3987.132 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 \ ${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 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 \ jumbo_file_merge_limit=8 \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator="none" \ use_allocator_shim=false \ use_aura=true \ use_bundled_fontconfig=false \ use_custom_libcxx=false \ use_gnome_keyring=false \ - use_jumbo_build=true \ 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 \ - GN_ARGS+=enable_hevc_demuxing=true + GN_ARGS+=enable_platform_hevc=true CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \ GN_ARGS+=proprietary_codecs=false \ - GN_ARGS+=enable_hevc_demuxing=false + GN_ARGS+=enable_platform_hevc=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 freetype harfbuzz-ng libdrm libusb libwebp libxml libxslt openh264 opus snappy yasm || ${FALSE} + ffmpeg flac fontconfig freetype harfbuzz-ng libdrm libpng libwebp libxml libxslt openh264 opus snappy yasm || ${FALSE} .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 .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 icudtl.dat mksnapshot natives_blob.bin snapshot_blob.bin v8_context_snapshot.bin +.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 528071) +++ head/www/chromium/distinfo (revision 528072) @@ -1,7 +1,7 @@ -TIMESTAMP = 1579261549 -SHA256 (chromium-79.0.3945.130.tar.xz) = 56193431ab9d1193773b133d86b419bfae8d8b9196eea253660895e0e8f87ba0 -SIZE (chromium-79.0.3945.130.tar.xz) = 778319112 -SHA256 (chromium-79.0.3945.130-testdata.tar.xz) = da0b544e2f9a3022c5120a0dc21b945e4565e7e4b64f086eefd720e2c1e516d8 -SIZE (chromium-79.0.3945.130-testdata.tar.xz) = 252386344 +TIMESTAMP = 1583291717 +SHA256 (chromium-80.0.3987.132.tar.xz) = 2c0012059046a5a7e2bf6e9502f1898f1953226d63b724b82fc18226e285c201 +SIZE (chromium-80.0.3987.132.tar.xz) = 796975056 +SHA256 (chromium-80.0.3987.132-testdata.tar.xz) = 6cbe559778ab75386c90b2de29416bc63b5b6d5b1232876b6a7626359362a91b +SIZE (chromium-80.0.3987.132-testdata.tar.xz) = 251267384 SHA256 (test_fonts.tar.xz) = cf9cbe3b7f1c4c42d426bddc65ec178d333ad7e205a36fe0a606a3c0c545ece1 SIZE (test_fonts.tar.xz) = 200040 Index: head/www/chromium/files/patch-BUILD.gn =================================================================== --- head/www/chromium/files/patch-BUILD.gn (revision 528071) +++ head/www/chromium/files/patch-BUILD.gn (revision 528072) @@ -1,95 +1,95 @@ ---- BUILD.gn.orig 2019-12-16 21:51:21 UTC +--- BUILD.gn.orig 2020-03-03 18:53:46 UTC +++ BUILD.gn @@ -411,7 +411,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", @@ -452,8 +452,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", ] @@ -508,10 +506,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", @@ -567,10 +561,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) { @@ -644,7 +634,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)" ] } @@ -782,7 +772,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" ] -@@ -905,7 +894,6 @@ if (is_chromeos) { +@@ -918,7 +907,6 @@ if (is_chromeos) { "//ppapi/examples/video_decode", "//sandbox/linux:chrome_sandbox", "//sandbox/linux:sandbox_linux_unittests", - "//third_party/breakpad:minidump_stackwalk($host_toolchain)", # Blocked on https://github.com/catapult-project/catapult/issues/2297 #"//third_party/catapult/telemetry:bitmaptools", -@@ -1076,7 +1064,7 @@ if (!is_ios) { +@@ -1069,7 +1057,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)" ] } -@@ -1085,7 +1073,7 @@ if (!is_ios) { +@@ -1078,7 +1066,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)" ] } -@@ -1227,9 +1215,6 @@ group("chromium_builder_perf") { +@@ -1220,9 +1208,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-ash_display_mirror__window__controller.cc =================================================================== --- head/www/chromium/files/patch-ash_display_mirror__window__controller.cc (revision 528071) +++ head/www/chromium/files/patch-ash_display_mirror__window__controller.cc (revision 528072) @@ -1,14 +1,14 @@ ---- ash/display/mirror_window_controller.cc.orig 2019-03-11 22:00:51 UTC +--- ash/display/mirror_window_controller.cc.orig 2020-03-03 18:53:46 UTC +++ ash/display/mirror_window_controller.cc -@@ -274,7 +274,11 @@ void MirrorWindowController::UpdateWindow( +@@ -298,7 +298,11 @@ void MirrorWindowController::UpdateWindow( return info.id() == iter->first; }) == display_info_list.end()) { CloseAndDeleteHost(iter->second, true); +#if defined(__llvm__) + mirroring_host_info_map_.erase(iter++); +#else iter = mirroring_host_info_map_.erase(iter); +#endif } else { ++iter; } Index: head/www/chromium/files/patch-base_BUILD.gn =================================================================== --- head/www/chromium/files/patch-base_BUILD.gn (revision 528071) +++ head/www/chromium/files/patch-base_BUILD.gn (revision 528072) @@ -1,67 +1,67 @@ ---- base/BUILD.gn.orig 2019-12-16 21:51:21 UTC +--- base/BUILD.gn.orig 2020-03-03 18:53:46 UTC +++ base/BUILD.gn -@@ -1274,7 +1274,7 @@ jumbo_component("base") { +@@ -1302,7 +1302,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" ] } -@@ -1300,7 +1300,7 @@ jumbo_component("base") { +@@ -1328,7 +1328,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 += [ -@@ -1903,6 +1903,33 @@ jumbo_component("base") { +@@ -1919,6 +1919,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) { - set_sources_assignment_filter([]) -@@ -3071,6 +3098,12 @@ test("base_unittests") { - ] - set_sources_assignment_filter(sources_assignment_filter) + sources -= [ +@@ -3069,6 +3096,12 @@ test("base_unittests") { + + manifest = "//build/config/fuchsia/tests.cmx" } + + if (is_bsd) { + sources -= [ + "debug/proc_maps_linux_unittest.cc", + ] + } - if (is_win) { - deps += [ "//base:scoped_handle_test_dll" ] + if (!is_fuchsia && !is_ios) { + sources += [ "files/file_locking_unittest.cc" ] Index: head/www/chromium/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc =================================================================== --- head/www/chromium/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc (revision 528071) +++ head/www/chromium/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc (revision 528072) @@ -1,76 +1,76 @@ ---- base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig 2019-07-24 18:58:01 UTC +--- base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig 2020-03-03 18:52:59 UTC +++ base/allocator/allocator_shim_default_dispatch_to_glibc.cc -@@ -5,18 +5,28 @@ - #include "base/allocator/allocator_shim.h" +@@ -6,18 +6,28 @@ + #include "base/compiler_specific.h" #include -#include +#include +#include +#include // This translation unit defines a default dispatch for the allocator shim which // routes allocations to libc functions. -// The code here is strongly inspired from tcmalloc's libc_override_glibc.h. +// The code here is strongly inspired from tcmalloc's override_glibc.h. extern "C" { -void* __libc_malloc(size_t size); -void* __libc_calloc(size_t n, size_t size); -void* __libc_realloc(void* address, size_t size); -void* __libc_memalign(size_t alignment, size_t size); -void __libc_free(void* ptr); +void* __malloc(size_t size); +void* __calloc(size_t n, size_t size); +void* __realloc(void* address, size_t len); +void* __memalign(size_t alignment, size_t size) { + void *ret; + if (__posix_memalign(&ret, alignment, size) != 0) { + return nullptr; + } else { + return ret; + } +} +int __posix_memalign(void **ptr, size_t alignment, size_t size); +void __free(void* ptr); } // extern "C" namespace { -@@ -24,32 +34,32 @@ namespace { +@@ -25,32 +35,32 @@ namespace { using base::allocator::AllocatorDispatch; void* GlibcMalloc(const AllocatorDispatch*, size_t size, void* context) { - return __libc_malloc(size); + return __malloc(size); } void* GlibcCalloc(const AllocatorDispatch*, size_t n, size_t size, void* context) { - return __libc_calloc(n, size); + return __calloc(n, size); } void* GlibcRealloc(const AllocatorDispatch*, void* address, size_t size, void* context) { - return __libc_realloc(address, size); + return __realloc(address, size); } void* GlibcMemalign(const AllocatorDispatch*, size_t alignment, size_t size, void* context) { - return __libc_memalign(alignment, size); + return __memalign(alignment, size); } void GlibcFree(const AllocatorDispatch*, void* address, void* context) { - __libc_free(address); + __free(address); } - size_t GlibcGetSizeEstimate(const AllocatorDispatch*, + NO_SANITIZE("cfi-icall") Index: head/www/chromium/files/patch-base_debug_elf__reader.cc =================================================================== --- head/www/chromium/files/patch-base_debug_elf__reader.cc (revision 528071) +++ head/www/chromium/files/patch-base_debug_elf__reader.cc (revision 528072) @@ -1,18 +1,18 @@ ---- base/debug/elf_reader.cc.orig 2019-06-04 18:55:15 UTC +--- base/debug/elf_reader.cc.orig 2020-03-03 18:52:59 UTC +++ base/debug/elf_reader.cc -@@ -83,6 +83,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, - reinterpret_cast(elf_base + header.p_vaddr); +@@ -98,6 +98,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, bool found = false; - while (current_note < section_end) { + while (current_section < section_end) { + current_note = reinterpret_cast(current_section); +#if !defined(OS_BSD) if (current_note->n_type == NT_GNU_BUILD_ID) { - const char* note_name = - reinterpret_cast(current_note) + sizeof(Nhdr); -@@ -92,6 +93,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, + StringPiece note_name(current_section + sizeof(Nhdr), + current_note->n_namesz); +@@ -107,6 +108,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, break; } } +#endif - current_note = reinterpret_cast( - reinterpret_cast(current_note) + sizeof(Nhdr) + + 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_files_file__util__posix.cc =================================================================== --- head/www/chromium/files/patch-base_files_file__util__posix.cc (revision 528071) +++ head/www/chromium/files/patch-base_files_file__util__posix.cc (revision 528072) @@ -1,11 +1,11 @@ ---- base/files/file_util_posix.cc.orig 2019-12-16 21:51:21 UTC +--- base/files/file_util_posix.cc.orig 2020-03-03 18:52:59 UTC +++ base/files/file_util_posix.cc -@@ -435,7 +435,7 @@ bool CreatePipe(ScopedFD* read_fd, ScopedFD* write_fd, +@@ -411,7 +411,7 @@ bool CreatePipe(ScopedFD* read_fd, ScopedFD* write_fd, } bool CreateLocalNonBlockingPipe(int fds[2]) { -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) return pipe2(fds, O_CLOEXEC | O_NONBLOCK) == 0; #else int raw_fds[2]; Index: head/www/chromium/files/patch-base_i18n_icu__util.cc =================================================================== --- head/www/chromium/files/patch-base_i18n_icu__util.cc (revision 528071) +++ head/www/chromium/files/patch-base_i18n_icu__util.cc (revision 528072) @@ -1,20 +1,20 @@ --- base/i18n/icu_util.cc.orig 2019-12-16 21:51:21 UTC +++ base/i18n/icu_util.cc -@@ -20,7 +20,7 @@ - #include "build/build_config.h" - #include "third_party/icu/source/common/unicode/putil.h" - #include "third_party/icu/source/common/unicode/udata.h" --#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_ANDROID) -+#if (defined(OS_LINUX) || defined(OS_BSD) && !defined(OS_CHROMEOS)) || defined(OS_ANDROID) - #include "third_party/icu/source/i18n/unicode/timezone.h" +@@ -43,7 +43,7 @@ #endif -@@ -365,7 +365,7 @@ bool InitializeICU() { - // TODO(jungshik): Some callers do not care about tz at all. If necessary, - // add a boolean argument to this function to init'd the default tz only - // when requested. --#if defined(OS_LINUX) && !defined(OS_CHROMEOS) -+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) - if (result) - std::unique_ptr zone(icu::TimeZone::createDefault()); + #if defined(OS_ANDROID) || defined(OS_FUCHSIA) || \ +- (defined(OS_LINUX) && !defined(IS_CHROMECAST)) ++ (defined(OS_LINUX) && !defined(IS_CHROMECAST)) || defined(OS_BSD) + #include "third_party/icu/source/i18n/unicode/timezone.h" #endif + +@@ -288,7 +288,7 @@ void InitializeIcuTimeZone() { + fuchsia::IntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization(); + icu::TimeZone::adoptDefault( + icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id))); +-#elif defined(OS_LINUX) && !defined(IS_CHROMECAST) ++#elif (defined(OS_LINUX) && !defined(IS_CHROMECAST)) || defined(OS_BSD) + // To respond to the timezone change properly, the default timezone + // cache in ICU has to be populated on starting up. + // See TimeZoneMonitorLinux::NotifyClientsFromImpl(). Index: head/www/chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc =================================================================== --- head/www/chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc (nonexistent) +++ head/www/chromium/files/patch-base_memory_madv__free__discardable__memory__posix.cc (revision 528072) @@ -0,0 +1,11 @@ +--- base/memory/madv_free_discardable_memory_posix.cc.orig 2020-03-03 18:53:47 UTC ++++ base/memory/madv_free_discardable_memory_posix.cc +@@ -267,7 +267,7 @@ void MadvFreeDiscardableMemoryPosix::SetKeepMemoryForT + + bool MadvFreeDiscardableMemoryPosix::IsResident() const { + DFAKE_SCOPED_RECURSIVE_LOCK(thread_collision_warner_); +-#ifdef OS_MACOSX ++#if defined(OS_MACOSX) || defined(OS_BSD) + std::vector vec(allocated_pages_); + #else + std::vector vec(allocated_pages_); Property changes on: head/www/chromium/files/patch-base_memory_madv__free__discardable__memory__posix.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_memory_platform__shared__memory__region.h =================================================================== --- head/www/chromium/files/patch-base_memory_platform__shared__memory__region.h (revision 528071) +++ head/www/chromium/files/patch-base_memory_platform__shared__memory__region.h (revision 528072) @@ -1,29 +1,29 @@ ---- base/memory/platform_shared_memory_region.h.orig 2019-09-16 12:06:15 UTC +--- base/memory/platform_shared_memory_region.h.orig 2020-03-03 18:52:59 UTC +++ base/memory/platform_shared_memory_region.h -@@ -28,7 +28,7 @@ +@@ -27,7 +27,7 @@ #include "base/files/scoped_file.h" #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) namespace content { class SandboxIPCHandler; } -@@ -122,7 +122,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { +@@ -121,7 +121,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { kMaxValue = GET_SHMEM_TEMP_DIR_FAILURE }; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) // Structure to limit access to executable region creation. struct ExecutableRegion { private: -@@ -276,7 +276,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { +@@ -266,7 +266,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion { CheckPlatformHandlePermissionsCorrespondToMode); static PlatformSharedMemoryRegion Create(Mode mode, size_t size -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) , bool executable = false #endif 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 528071) +++ head/www/chromium/files/patch-base_memory_platform__shared__memory__region__posix.cc (revision 528072) @@ -1,38 +1,38 @@ ---- base/memory/platform_shared_memory_region_posix.cc.orig 2019-09-16 12:05:39 UTC +--- base/memory/platform_shared_memory_region_posix.cc.orig 2020-03-03 18:52:59 UTC +++ base/memory/platform_shared_memory_region_posix.cc -@@ -76,7 +76,7 @@ FDPair ScopedFDPair::get() const { +@@ -75,7 +75,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 = -@@ -85,7 +85,7 @@ ScopedFD PlatformSharedMemoryRegion::ExecutableRegion: +@@ -84,7 +84,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( -@@ -224,7 +224,7 @@ bool PlatformSharedMemoryRegion::MapAtInternal(off_t o +@@ -209,7 +209,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 -@@ -255,7 +255,7 @@ PlatformSharedMemoryRegion PlatformSharedMemoryRegion: +@@ -240,7 +240,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_process_launch.h =================================================================== --- head/www/chromium/files/patch-base_process_launch.h (revision 528071) +++ head/www/chromium/files/patch-base_process_launch.h (revision 528072) @@ -1,20 +1,20 @@ ---- base/process/launch.h.orig 2019-06-04 18:55:15 UTC +--- base/process/launch.h.orig 2020-03-03 18:52:59 UTC +++ base/process/launch.h -@@ -181,7 +181,7 @@ struct BASE_EXPORT LaunchOptions { +@@ -180,7 +180,7 @@ struct BASE_EXPORT LaunchOptions { bool clear_environment = false; #endif // OS_WIN || OS_POSIX || OS_FUCHSIA -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) // If non-zero, start the process using clone(), using flags as provided. // Unlike in clone, clone_flags may not contain a custom termination signal // that is sent to the parent when the child dies. The termination signal will -@@ -194,7 +194,7 @@ struct BASE_EXPORT LaunchOptions { +@@ -193,7 +193,7 @@ struct BASE_EXPORT LaunchOptions { // Sets parent process death signal to SIGKILL. bool kill_on_parent_death = false; -#endif // defined(OS_LINUX) +#endif // defined(OS_LINUX) || defined(OS_BSD) #if defined(OS_MACOSX) && !defined(OS_IOS) // Mach ports that will be accessible to the child process. These are not Index: head/www/chromium/files/patch-base_profiler_register__context.h =================================================================== --- head/www/chromium/files/patch-base_profiler_register__context.h (nonexistent) +++ head/www/chromium/files/patch-base_profiler_register__context.h (revision 528072) @@ -0,0 +1,60 @@ +--- base/profiler/register_context.h.orig 2020-03-03 18:53:47 UTC ++++ base/profiler/register_context.h +@@ -17,7 +17,7 @@ + #include + #elif defined(OS_MACOSX) + #include +-#elif defined(OS_ANDROID) || defined(OS_LINUX) ++#elif defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) + #include + #endif + +@@ -152,6 +152,48 @@ inline uintptr_t& RegisterContextInstructionPointer(mc + } + + #endif // #if defined(ARCH_CPU_ARM_FAMILY) && defined(ARCH_CPU_32_BITS) ++ ++#elif defined(OS_FREEBSD) ++ ++using RegisterContext = mcontext_t; ++ ++#if defined(ARCH_CPU_X86_64) ++inline uintptr_t& RegisterContextStackPointer(mcontext_t* context) { ++ return AsUintPtr(&context->mc_rsp); ++} ++ ++inline uintptr_t& RegisterContextFramePointer(mcontext_t* context) { ++ return AsUintPtr(&context->mc_rbp); ++} ++ ++inline uintptr_t& RegisterContextInstructionPointer(mcontext_t* context) { ++ return AsUintPtr(&context->mc_rip); ++} ++#elif defined(ARCH_CPU_X86) ++inline uintptr_t& RegisterContextStackPointer(mcontext_t* context) { ++ return AsUintPtr(&context->mc_esp); ++} ++ ++inline uintptr_t& RegisterContextFramePointer(mcontext_t* context) { ++ return AsUintPtr(&context->mc_ebp); ++} ++ ++inline uintptr_t& RegisterContextInstructionPointer(mcontext_t* context) { ++ return AsUintPtr(&context->mc_eip); ++} ++#elif defined(ARCH_CPU_ARM64) ++inline uintptr_t& RegisterContextStackPointer(mcontext_t* context) { ++ return AsUintPtr(&context->mc_gpregs.gp_sp); ++} ++ ++inline uintptr_t& RegisterContextFramePointer(mcontext_t* context) { ++ return AsUintPtr(&context->mc_gpregs.gp_x[29]); ++} ++ ++inline uintptr_t& RegisterContextInstructionPointer(mcontext_t* context) { ++ return AsUintPtr(&context->mc_gpregs.gp_elr); ++} ++#endif + + #else // #if defined(OS_WIN) + Property changes on: head/www/chromium/files/patch-base_profiler_register__context.h ___________________________________________________________________ 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_sampling__profiler__thread__token.cc =================================================================== --- head/www/chromium/files/patch-base_profiler_sampling__profiler__thread__token.cc (nonexistent) +++ head/www/chromium/files/patch-base_profiler_sampling__profiler__thread__token.cc (revision 528072) @@ -0,0 +1,11 @@ +--- base/profiler/sampling_profiler_thread_token.cc.orig 2020-03-03 18:52:59 UTC ++++ base/profiler/sampling_profiler_thread_token.cc +@@ -7,7 +7,7 @@ + namespace base { + + SamplingProfilerThreadToken GetSamplingProfilerCurrentThreadToken() { +-#if defined(OS_ANDROID) || defined(OS_LINUX) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) + return {PlatformThread::CurrentId(), pthread_self()}; + #else + return {PlatformThread::CurrentId()}; Property changes on: head/www/chromium/files/patch-base_profiler_sampling__profiler__thread__token.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_sampling__profiler__thread__token.h =================================================================== --- head/www/chromium/files/patch-base_profiler_sampling__profiler__thread__token.h (nonexistent) +++ head/www/chromium/files/patch-base_profiler_sampling__profiler__thread__token.h (revision 528072) @@ -0,0 +1,20 @@ +--- base/profiler/sampling_profiler_thread_token.h.orig 2020-03-05 05:52:21 UTC ++++ base/profiler/sampling_profiler_thread_token.h +@@ -9,7 +9,7 @@ + #include "base/threading/platform_thread.h" + #include "build/build_config.h" + +-#if defined(OS_ANDROID) || defined(OS_LINUX) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) + #include + #endif + +@@ -21,7 +21,7 @@ namespace base { + // functions used to obtain the stack base address. + struct SamplingProfilerThreadToken { + PlatformThreadId id; +-#if defined(OS_ANDROID) || defined(OS_LINUX) ++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) + pthread_t pthread_id; + #endif + }; Property changes on: head/www/chromium/files/patch-base_profiler_sampling__profiler__thread__token.h ___________________________________________________________________ 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__copier__signal.cc =================================================================== --- head/www/chromium/files/patch-base_profiler_stack__copier__signal.cc (nonexistent) +++ head/www/chromium/files/patch-base_profiler_stack__copier__signal.cc (revision 528072) @@ -0,0 +1,65 @@ +--- base/profiler/stack_copier_signal.cc.orig 2020-03-03 18:53:47 UTC ++++ base/profiler/stack_copier_signal.cc +@@ -4,10 +4,16 @@ + + #include "base/profiler/stack_copier_signal.h" + ++#if defined(OS_LINUX) + #include ++#include ++#elif defined(OS_FREEBSD) ++#include ++#include ++#include ++#endif + #include + #include +-#include + + #include + +@@ -35,8 +41,13 @@ class AsyncSafeWaitableEvent { + // for a pthread mutex. So, also check the condition. + while (true) { + int res = ++#if defined(OS_LINUX) + syscall(SYS_futex, futex_int_ptr(), FUTEX_WAIT | FUTEX_PRIVATE_FLAG, + 0, nullptr, nullptr, 0); ++#elif defined(OS_FREEBSD) ++ _umtx_op(futex_int_ptr(), UMTX_OP_WAIT_UINT_PRIVATE, 0, nullptr, ++ nullptr); ++#endif + if (futex_.load(std::memory_order_acquire) != 0) + return true; + if (res != 0) +@@ -46,8 +57,12 @@ class AsyncSafeWaitableEvent { + + void Signal() { + futex_.store(1, std::memory_order_release); ++#if defined(OS_LINUX) + syscall(SYS_futex, futex_int_ptr(), FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1, + nullptr, nullptr, 0); ++#elif defined(OS_FREEBSD) ++ _umtx_op(futex_int_ptr(), UMTX_OP_WAKE_PRIVATE, 1, nullptr, nullptr); ++#endif + } + + private: +@@ -201,11 +216,17 @@ bool StackCopierSignal::CopyStack(StackBuffer* stack_b + if (!scoped_sigaction.succeeded()) + return false; + ++#if defined(OS_LINUX) + if (syscall(SYS_tgkill, getpid(), thread_delegate_->GetThreadId(), + SIGURG) != 0) { + NOTREACHED(); + return false; + } ++#elif defined(OS_FREEBSD) ++ if (thr_kill2(getpid(), thread_delegate_->GetThreadId(), SIGURG) != 0) { ++ return false; ++ } ++#endif + bool finished_waiting = wait_event.Wait(); + TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("cpu_profiler.debug"), + "StackCopierSignal copy stack"); Property changes on: head/www/chromium/files/patch-base_profiler_stack__copier__signal.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_thread__delegate__posix.cc =================================================================== --- head/www/chromium/files/patch-base_profiler_thread__delegate__posix.cc (nonexistent) +++ head/www/chromium/files/patch-base_profiler_thread__delegate__posix.cc (revision 528072) @@ -0,0 +1,63 @@ +--- base/profiler/thread_delegate_posix.cc.orig 2020-03-03 18:53:47 UTC ++++ base/profiler/thread_delegate_posix.cc +@@ -3,6 +3,9 @@ + // found in the LICENSE file. + + #include ++#if defined(__FreeBSD__) ++#include ++#endif + + #include "base/process/process_handle.h" + #include "base/profiler/thread_delegate_posix.h" +@@ -17,12 +20,20 @@ namespace { + uintptr_t GetThreadStackBaseAddressImpl( + SamplingProfilerThreadToken thread_token) { + pthread_attr_t attr; ++#if defined(OS_FREEBSD) ++ pthread_attr_init(&attr); ++ pthread_attr_get_np(thread_token.pthread_id, &attr); ++#elif defined(OS_LINUX) + pthread_getattr_np(thread_token.pthread_id, &attr); ++#endif + // See crbug.com/617730 for limitations of this approach on Linux. + void* address; + size_t size; + pthread_attr_getstack(&attr, &address, &size); + const uintptr_t base_address = reinterpret_cast(address) + size; ++#if defined(OS_FREEBSD) ++ pthread_attr_destroy(&attr); ++#endif + return base_address; + } + +@@ -88,11 +99,19 @@ std::vector ThreadDelegatePosix::GetRegist + for (size_t i = 19; i <= 29; ++i) + registers.push_back(reinterpret_cast(&thread_context->regs[i])); + return registers; +-#elif defined(ARCH_CPU_X86_64) // #if defined(ARCH_CPU_ARM_FAMILY) && +- // defined(ARCH_CPU_32_BITS) ++#elif defined(ARCH_CPU_X86_64) + return { + // Return the set of callee-save registers per the x86-64 System V ABI + // section 3.2.1, plus the stack pointer. ++#if defined(OS_FREEBSD) ++ reinterpret_cast(&thread_context->mc_rbp), ++ reinterpret_cast(&thread_context->mc_rbx), ++ reinterpret_cast(&thread_context->mc_r12), ++ reinterpret_cast(&thread_context->mc_r13), ++ reinterpret_cast(&thread_context->mc_r14), ++ reinterpret_cast(&thread_context->mc_r15), ++ reinterpret_cast(&thread_context->mc_rsp), ++#else + reinterpret_cast(&thread_context->gregs[REG_RBP]), + reinterpret_cast(&thread_context->gregs[REG_RBX]), + reinterpret_cast(&thread_context->gregs[REG_R12]), +@@ -100,6 +119,7 @@ std::vector ThreadDelegatePosix::GetRegist + reinterpret_cast(&thread_context->gregs[REG_R14]), + reinterpret_cast(&thread_context->gregs[REG_R15]), + reinterpret_cast(&thread_context->gregs[REG_RSP]), ++#endif + }; + #else // #if defined(ARCH_CPU_ARM_FAMILY) && defined(ARCH_CPU_32_BITS) + // Unimplemented for other architectures. Property changes on: head/www/chromium/files/patch-base_profiler_thread__delegate__posix.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_test_fontconfig__util__linux.cc =================================================================== --- head/www/chromium/files/patch-base_test_fontconfig__util__linux.cc (revision 528071) +++ head/www/chromium/files/patch-base_test_fontconfig__util__linux.cc (revision 528072) @@ -1,408 +1,406 @@ --- base/test/fontconfig_util_linux.cc.orig 2019-04-30 22:22:28 UTC +++ base/test/fontconfig_util_linux.cc -@@ -6,24 +6,397 @@ +@@ -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()); -- // TODO(thomasanderson): This still stat()'s the real /etc/fonts/fonts.conf. -- // Prevent fontconfig from doing this. - 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 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 528071) +++ head/www/chromium/files/patch-base_test_test__file__util__posix.cc (revision 528072) @@ -1,11 +1,11 @@ ---- base/test/test_file_util_posix.cc.orig 2019-03-11 22:00:51 UTC +--- base/test/test_file_util_posix.cc.orig 2020-03-03 18:52:59 UTC +++ base/test/test_file_util_posix.cc -@@ -85,7 +85,7 @@ void SyncPageCacheToDisk() { +@@ -84,7 +84,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_platform__thread.h =================================================================== --- head/www/chromium/files/patch-base_threading_platform__thread.h (revision 528071) +++ head/www/chromium/files/patch-base_threading_platform__thread.h (revision 528072) @@ -1,11 +1,20 @@ ---- base/threading/platform_thread.h.orig 2019-10-21 19:06:18 UTC +--- base/threading/platform_thread.h.orig 2020-03-03 18:52:59 UTC +++ base/threading/platform_thread.h -@@ -221,7 +221,7 @@ class BASE_EXPORT PlatformThread { +@@ -36,6 +36,8 @@ typedef DWORD PlatformThreadId; + typedef zx_handle_t PlatformThreadId; + #elif defined(OS_MACOSX) + typedef mach_port_t PlatformThreadId; ++#elif defined(OS_FREEBSD) ++typedef long PlatformThreadId; + #elif defined(OS_POSIX) + typedef pid_t PlatformThreadId; + #endif +@@ -221,7 +223,7 @@ class BASE_EXPORT PlatformThread { static ThreadPriority GetCurrentThreadPriority(); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) // Toggles a specific thread's priority at runtime. This can be used to // change the priority of a thread in a different process and will fail // if the calling process does not have proper permissions. The Index: head/www/chromium/files/patch-base_threading_platform__thread__posix.cc =================================================================== --- head/www/chromium/files/patch-base_threading_platform__thread__posix.cc (revision 528071) +++ head/www/chromium/files/patch-base_threading_platform__thread__posix.cc (revision 528072) @@ -1,11 +1,33 @@ ---- base/threading/platform_thread_posix.cc.orig 2019-03-11 22:00:51 UTC +--- base/threading/platform_thread_posix.cc.orig 2020-03-03 18:53:47 UTC +++ base/threading/platform_thread_posix.cc -@@ -66,7 +66,7 @@ void* ThreadFunc(void* params) { +@@ -32,6 +32,10 @@ + #include + #endif + ++#if defined(OS_FREEBSD) ++#include ++#endif ++ + #if defined(OS_FUCHSIA) + #include + #else +@@ -66,7 +70,7 @@ void* ThreadFunc(void* params) { if (!thread_params->joinable) base::ThreadRestrictions::SetSingletonAllowed(false); -#if !defined(OS_NACL) +#if !defined(OS_NACL) && !defined(OS_BSD) // Threads on linux/android may inherit their priority from the thread // where they were created. This explicitly sets the priority of all new // threads. +@@ -188,6 +192,10 @@ PlatformThreadId PlatformThread::CurrentId() { + return g_thread_id; + #elif defined(OS_ANDROID) + return gettid(); ++#elif defined(OS_FREEBSD) ++ long x; ++ thr_self(&x); ++ return x; + #elif defined(OS_FUCHSIA) + return zx_thread_self(); + #elif defined(OS_SOLARIS) || defined(OS_QNX) Index: head/www/chromium/files/patch-build_config_BUILD.gn =================================================================== --- head/www/chromium/files/patch-build_config_BUILD.gn (revision 528071) +++ head/www/chromium/files/patch-build_config_BUILD.gn (revision 528072) @@ -1,30 +1,30 @@ ---- build/config/BUILD.gn.orig 2019-10-21 19:06:18 UTC +--- build/config/BUILD.gn.orig 2020-03-03 18:53:47 UTC +++ build/config/BUILD.gn -@@ -149,7 +149,7 @@ config("debug") { +@@ -133,7 +133,7 @@ config("debug") { # builds, and we have to tell it to turn it off. defines += [ "_HAS_ITERATOR_DEBUGGING=0" ] } - } else if (is_linux && current_cpu == "x64" && enable_iterator_debugging) { + } else if ((is_linux || is_bsd) && current_cpu == "x64" && enable_iterator_debugging) { # Enable libstdc++ debugging facilities to help catch problems early, see # http://crbug.com/65151 . # TODO(phajdan.jr): Should we enable this for all of POSIX? -@@ -247,9 +247,7 @@ config("default_libs") { +@@ -231,9 +231,7 @@ config("default_libs") { ] } else if (is_linux) { libs = [ - "dl", "pthread", - "rt", ] } } -@@ -337,7 +335,7 @@ config("executable_config") { +@@ -321,7 +319,7 @@ config("executable_config") { "//build/config/ios:ios_dynamic_flags", "//build/config/ios:ios_executable_flags", ] - } else if (is_linux || is_android || current_os == "aix") { + } else if (is_linux || is_bsd || is_android || current_os == "aix") { configs += [ "//build/config/gcc:executable_config" ] if (is_chromecast) { configs += [ "//build/config/chromecast:executable_config" ] Index: head/www/chromium/files/patch-build_config_compiler_BUILD.gn =================================================================== --- head/www/chromium/files/patch-build_config_compiler_BUILD.gn (revision 528071) +++ head/www/chromium/files/patch-build_config_compiler_BUILD.gn (revision 528072) @@ -1,92 +1,92 @@ ---- build/config/compiler/BUILD.gn.orig 2019-12-16 21:51:21 UTC +--- build/config/compiler/BUILD.gn.orig 2020-03-03 18:53:47 UTC +++ build/config/compiler/BUILD.gn @@ -57,7 +57,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) -@@ -303,7 +303,7 @@ config("compiler") { +@@ -308,7 +308,7 @@ config("compiler") { # Linker warnings. if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") && - !is_mac && !is_ios && current_os != "aix") { + !is_mac && !is_ios && current_os != "aix" && !is_bsd) { # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 ldflags += [ "-Wl,--fatal-warnings" ] } -@@ -398,7 +398,7 @@ config("compiler") { +@@ -403,7 +403,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", -@@ -498,7 +498,7 @@ config("compiler") { +@@ -503,7 +503,7 @@ config("compiler") { } } - 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) ] -@@ -768,7 +768,7 @@ config("compiler_cpu_abi") { +@@ -773,7 +773,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" ] } -@@ -1119,7 +1119,7 @@ config("compiler_deterministic") { +@@ -1124,7 +1124,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,." ] } -@@ -1508,7 +1508,7 @@ config("default_warnings") { +@@ -1513,7 +1513,7 @@ config("default_warnings") { cflags += [ "-Wno-nonportable-include-path" ] } - 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 += [ -@@ -1738,7 +1738,7 @@ config("thin_archive") { +@@ -1761,7 +1761,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" ] -@@ -2328,7 +2328,7 @@ config("symbols") { +@@ -2351,7 +2351,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 (use_debug_fission && !is_nacl && !is_android) { -@@ -2349,7 +2349,7 @@ config("symbols") { +@@ -2372,7 +2372,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 528071) +++ head/www/chromium/files/patch-build_config_compiler_compiler.gni (revision 528072) @@ -1,11 +1,11 @@ ---- build/config/compiler/compiler.gni.orig 2019-12-16 21:51:21 UTC +--- build/config/compiler/compiler.gni.orig 2020-03-03 18:53:47 UTC +++ build/config/compiler/compiler.gni -@@ -192,7 +192,7 @@ declare_args() { +@@ -187,7 +187,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-build_linux_unbundle_libxml.gn =================================================================== --- head/www/chromium/files/patch-build_linux_unbundle_libxml.gn (nonexistent) +++ head/www/chromium/files/patch-build_linux_unbundle_libxml.gn (revision 528072) @@ -0,0 +1,53 @@ +--- build/linux/unbundle/libxml.gn.orig 2020-03-03 18:53:47 UTC ++++ build/linux/unbundle/libxml.gn +@@ -8,11 +8,48 @@ pkg_config("system_libxml") { + packages = [ "libxml-2.0" ] + } + +-static_library("libxml") { ++source_set("libxml") { ++ public_configs = [ ":system_libxml" ] ++} ++ ++static_library("libxml_utils") { ++ # Do not expand this visibility list without first consulting with the ++ # Security Team. ++ visibility = [ ++ ":xml_reader", ++ ":xml_writer", ++ "//base/test:test_support", ++ "//services/data_decoder:xml_parser_fuzzer", ++ ] + sources = [ + "chromium/libxml_utils.cc", + "chromium/libxml_utils.h", + ] +- + public_configs = [ ":system_libxml" ] ++} ++ ++static_library("xml_reader") { ++ # Do not expand this visibility list without first consulting with the ++ # Security Team. ++ visibility = [ ++ "//base/test:test_support", ++ "//components/policy/core/common:unit_tests", ++ "//services/data_decoder:*", ++ "//tools/traffic_annotation/auditor:auditor_sources", ++ ] ++ sources = [ ++ "chromium/xml_reader.cc", ++ "chromium/xml_reader.h", ++ ] ++ deps = [ ":libxml_utils" ] ++} ++ ++static_library("xml_writer") { ++ # The XmlWriter is considered safe to use from any target. ++ visibility = [ "*" ] ++ sources = [ ++ "chromium/xml_writer.cc", ++ "chromium/xml_writer.h", ++ ] ++ deps = [ ":libxml_utils" ] + } Property changes on: head/www/chromium/files/patch-build_linux_unbundle_libxml.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-cc_BUILD.gn =================================================================== --- head/www/chromium/files/patch-cc_BUILD.gn (revision 528071) +++ head/www/chromium/files/patch-cc_BUILD.gn (revision 528072) @@ -1,21 +1,21 @@ ---- cc/BUILD.gn.orig 2019-12-16 21:51:21 UTC +--- cc/BUILD.gn.orig 2020-03-03 18:53:47 UTC +++ cc/BUILD.gn -@@ -576,7 +576,7 @@ cc_test_static_library("test_support") { +@@ -578,7 +578,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", ] -@@ -780,9 +780,6 @@ cc_test("cc_unittests") { +@@ -783,9 +783,6 @@ cc_test("cc_unittests") { "//ui/gfx/geometry", "//ui/gl", "//ui/gl:test_support", - ] - data_deps = [ - "//third_party/mesa_headers", ] if (enable_vulkan) { Index: head/www/chromium/files/patch-cc_trees_property__tree.cc =================================================================== --- head/www/chromium/files/patch-cc_trees_property__tree.cc (revision 528071) +++ head/www/chromium/files/patch-cc_trees_property__tree.cc (revision 528072) @@ -1,20 +1,20 @@ ---- cc/trees/property_tree.cc.orig 2019-12-16 21:51:22 UTC +--- cc/trees/property_tree.cc.orig 2020-03-03 18:53:47 UTC +++ cc/trees/property_tree.cc -@@ -1229,13 +1229,13 @@ gfx::ScrollOffset ScrollTree::MaxScrollOffset(int scro +@@ -1234,13 +1234,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_chrome__command__ids.h =================================================================== --- head/www/chromium/files/patch-chrome_app_chrome__command__ids.h (revision 528071) +++ head/www/chromium/files/patch-chrome_app_chrome__command__ids.h (revision 528072) @@ -1,11 +1,11 @@ ---- chrome/app/chrome_command_ids.h.orig 2019-03-11 22:00:52 UTC +--- chrome/app/chrome_command_ids.h.orig 2020-03-03 18:53:48 UTC +++ chrome/app/chrome_command_ids.h -@@ -63,7 +63,7 @@ +@@ -62,7 +62,7 @@ #define IDC_VISIT_DESKTOP_OF_LRU_USER_2 34049 #define IDC_VISIT_DESKTOP_OF_LRU_USER_3 34050 -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) #define IDC_USE_SYSTEM_TITLE_BAR 34051 #define IDC_RESTORE_WINDOW 34052 #endif Index: head/www/chromium/files/patch-chrome_app_chrome__content__browser__overlay__manifest.cc =================================================================== --- head/www/chromium/files/patch-chrome_app_chrome__content__browser__overlay__manifest.cc (revision 528071) +++ head/www/chromium/files/patch-chrome_app_chrome__content__browser__overlay__manifest.cc (revision 528072) @@ -1,20 +1,20 @@ ---- chrome/app/chrome_content_browser_overlay_manifest.cc.orig 2019-12-16 21:51:22 UTC +--- chrome/app/chrome_content_browser_overlay_manifest.cc.orig 2020-03-03 18:53:48 UTC +++ chrome/app/chrome_content_browser_overlay_manifest.cc -@@ -70,7 +70,7 @@ +@@ -60,7 +60,7 @@ #include "chrome/browser/ui/webui/app_management/app_management.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" #endif -@@ -189,7 +189,7 @@ const service_manager::Manifest& GetChromeContentBrows +@@ -145,7 +145,7 @@ const service_manager::Manifest& GetChromeContentBrows #else app_management::mojom::PageHandlerFactory, #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) discards::mojom::DetailsProvider, discards::mojom::GraphDump, #endif Index: head/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc =================================================================== --- head/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc (revision 528071) +++ head/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc (revision 528072) @@ -1,144 +1,144 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2019-12-16 21:51:22 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2020-03-03 18:53:48 UTC +++ chrome/app/chrome_main_delegate.cc @@ -100,7 +100,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 -@@ -139,7 +139,7 @@ +@@ -142,7 +142,7 @@ #include "v8/include/v8.h" #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #include "base/environment.h" #endif -@@ -243,7 +243,7 @@ bool UseHooks() { +@@ -246,7 +246,7 @@ bool UseHooks() { #endif // defined(OS_WIN) -#if defined(OS_LINUX) +#if defined(OS_LINUX) && !defined(OS_BSD) void AdjustLinuxOOMScore(const std::string& process_type) { // Browsers and zygotes should still be killable, but killed last. const int kZygoteScore = 0; -@@ -302,13 +302,13 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -305,13 +305,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 -@@ -347,7 +347,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -350,7 +350,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) || -@@ -357,7 +357,7 @@ void HandleHelpSwitches(const base::CommandLine& comma +@@ -360,7 +360,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) { -@@ -411,7 +411,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -414,7 +414,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. -@@ -423,7 +423,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -426,7 +426,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 -@@ -480,7 +480,7 @@ void InitLogging(const std::string& process_type) { +@@ -483,7 +483,7 @@ void InitLogging(const std::string& process_type) { void RecordMainStartupMetrics(base::TimeTicks exe_entry_point_ticks) { if (!exe_entry_point_ticks.is_null()) startup_metric_utils::RecordExeMainEntryPointTicks(exe_entry_point_ticks); -#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()); -@@ -665,7 +665,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi +@@ -684,7 +684,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 -@@ -689,7 +689,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi +@@ -708,7 +708,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 -@@ -883,7 +883,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -902,7 +902,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; -@@ -1007,7 +1007,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1026,7 +1026,7 @@ void ChromeMainDelegate::PreSandboxStartup() { InitializePDF(); #endif -#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) -@@ -1028,7 +1028,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1047,7 +1047,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. -@@ -1038,7 +1038,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1057,7 +1057,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) Index: head/www/chromium/files/patch-chrome_app_chromium__strings.grd =================================================================== --- head/www/chromium/files/patch-chrome_app_chromium__strings.grd (revision 528071) +++ head/www/chromium/files/patch-chrome_app_chromium__strings.grd (revision 528072) @@ -1,29 +1,29 @@ ---- chrome/app/chromium_strings.grd.orig 2019-12-16 21:51:22 UTC +--- chrome/app/chromium_strings.grd.orig 2020-03-03 18:53:48 UTC +++ chrome/app/chromium_strings.grd -@@ -602,7 +602,7 @@ Chromium is unable to recover your settings. +@@ -623,7 +623,7 @@ Chromium is unable to recover your settings. - + Your system administrator has configured Chromium to open an alternative browser to access $1example.com. -@@ -713,7 +713,7 @@ Chromium is unable to recover your settings. +@@ -727,7 +727,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. -@@ -946,7 +946,7 @@ Chromium is unable to recover your settings. +@@ -960,7 +960,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 528071) +++ head/www/chromium/files/patch-chrome_app_generated__resources.grd (revision 528072) @@ -1,29 +1,29 @@ ---- chrome/app/generated_resources.grd.orig 2019-12-16 21:51:22 UTC +--- chrome/app/generated_resources.grd.orig 2020-03-03 18:53:48 UTC +++ chrome/app/generated_resources.grd -@@ -4922,7 +4922,7 @@ Keep your key file in a safe place. You will need it t +@@ -5008,7 +5008,7 @@ Keep your key file in a safe place. You will need it t - + Legacy Browser Support -@@ -6571,7 +6571,7 @@ the Bookmarks menu."> +@@ -6712,7 +6712,7 @@ the Bookmarks menu."> Google Pay - + Use system title bar and borders -@@ -7521,7 +7521,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -7669,7 +7669,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 528071) +++ head/www/chromium/files/patch-chrome_app_google__chrome__strings.grd (revision 528072) @@ -1,29 +1,29 @@ ---- chrome/app/google_chrome_strings.grd.orig 2019-12-16 21:51:22 UTC +--- chrome/app/google_chrome_strings.grd.orig 2020-03-03 18:53:48 UTC +++ chrome/app/google_chrome_strings.grd -@@ -614,7 +614,7 @@ Google Chrome is unable to recover your settings. +@@ -635,7 +635,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. -@@ -725,7 +725,7 @@ Google Chrome is unable to recover your settings. +@@ -739,7 +739,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. -@@ -965,7 +965,7 @@ Google Chrome is unable to recover your settings. +@@ -979,7 +979,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 528071) +++ head/www/chromium/files/patch-chrome_app_settings__strings.grdp (revision 528072) @@ -1,20 +1,20 @@ ---- chrome/app/settings_strings.grdp.orig 2019-12-16 21:51:23 UTC +--- chrome/app/settings_strings.grdp.orig 2020-03-03 18:53:51 UTC +++ chrome/app/settings_strings.grdp -@@ -760,7 +760,7 @@ +@@ -784,7 +784,7 @@ Themes - + GTK+ -@@ -774,7 +774,7 @@ +@@ -798,7 +798,7 @@ Use Classic - + Reset to default Index: head/www/chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd =================================================================== --- head/www/chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd (revision 528071) +++ head/www/chromium/files/patch-chrome_app_theme_chrome__unscaled__resources.grd (revision 528072) @@ -1,20 +1,11 @@ --- chrome/app/theme/chrome_unscaled_resources.grd.orig 2019-09-09 21:55:08 UTC +++ chrome/app/theme/chrome_unscaled_resources.grd @@ -18,7 +18,7 @@ - + -@@ -109,7 +109,7 @@ - - - -- -+ - - - Index: head/www/chromium/files/patch-chrome_browser_about__flags.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_about__flags.cc (revision 528071) +++ head/www/chromium/files/patch-chrome_browser_about__flags.cc (revision 528072) @@ -1,252 +1,175 @@ ---- chrome/browser/about_flags.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/about_flags.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/about_flags.cc -@@ -164,7 +164,7 @@ +@@ -166,7 +166,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 -@@ -715,7 +715,7 @@ const FeatureEntry::FeatureVariation - nullptr}}; - #endif // OS_ANDROID - --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - const FeatureEntry::FeatureParam - kAutofillSaveCreditCardUsesImprovedMessagingStoreCard[] = { - {autofill::features:: -@@ -762,7 +762,7 @@ const FeatureEntry::FeatureVariation - kAutofillSaveCreditCardUsesImprovedMessagingConfirmAndSaveCard), - nullptr}, - }; --#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - - const FeatureEntry::Choice kMemlogModeChoices[] = { - {flags_ui::kGenericExperimentChoiceDisabled, "", ""}, -@@ -815,7 +815,7 @@ const FeatureEntry::Choice kMemlogSamplingRateChoices[ +@@ -804,7 +804,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"}, -@@ -853,7 +853,7 @@ const FeatureEntry::FeatureVariation kOmniboxDocumentP - base::size(kOmniboxDocumentProviderClientScoring), nullptr}, - {"server and client scores", kOmniboxDocumentProviderServerAndClientScoring, - base::size(kOmniboxDocumentProviderServerAndClientScoring), nullptr}}; --#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) -+#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) - - #ifdef OS_ANDROID - const FeatureEntry::FeatureParam kOmniboxNTPZPSLocal[] = { -@@ -967,7 +967,7 @@ const FeatureEntry::FeatureVariation kOmniboxMaxURLMat +@@ -956,7 +956,7 @@ 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 kTranslateBubbleUIButton[] = { - {language::kTranslateUIBubbleKey, language::kTranslateUIBubbleButtonValue}}; -@@ -983,7 +983,7 @@ const FeatureEntry::FeatureVariation kTranslateBubbleU - {"Tab", kTranslateBubbleUITab, base::size(kTranslateBubbleUITab), nullptr}, - {"Button_GM2", kTranslateBubbleUIButtonGM2, - base::size(kTranslateBubbleUIButton), nullptr}}; --#endif // OS_LINUX || OS_MACOSX || OS_WIN || OS_CHROMEOS -+#endif // OS_LINUX || OS_MACOSX || OS_WIN || OS_BSD || OS_CHROMEOS - - const FeatureEntry::FeatureParam kMarkHttpAsDangerous[] = { - {security_state::features::kMarkHttpAsFeatureParameterName, -@@ -1913,13 +1913,13 @@ const FeatureEntry kFeatureEntries[] = { + const FeatureEntry::FeatureParam kTranslateBubbleUITab[] = { + {language::kTranslateUIBubbleKey, language::kTranslateUIBubbleTabValue}}; +@@ -1981,13 +1981,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, -@@ -1971,14 +1971,14 @@ const FeatureEntry kFeatureEntries[] = { +@@ -2031,14 +2031,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", -@@ -2044,7 +2044,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kCrostiniBackupDescription, kOsCrOS, - FEATURE_VALUE_TYPE(chromeos::features::kCrostiniBackup)}, - #endif // OS_CHROMEOS --#if defined(OS_CHROMEOS) || defined(OS_LINUX) -+#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) - {"terminal-system-app", flag_descriptions::kTerminalSystemAppName, - flag_descriptions::kTerminalSystemAppDescription, kOsCrOS | kOsLinux, - FEATURE_VALUE_TYPE(features::kTerminalSystemApp)}, -@@ -2053,7 +2053,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -2119,7 +2119,7 @@ const FeatureEntry kFeatureEntries[] = { 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, -@@ -2131,7 +2131,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -2197,7 +2197,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kEnableLitePageServerPreviewsDescription, kOsAndroid, FEATURE_VALUE_TYPE(previews::features::kLitePageServerPreviews)}, #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, SINGLE_VALUE_TYPE( -@@ -2810,7 +2810,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kOmniboxLocalEntitySuggestionsDescription, kOsDesktop, - FEATURE_VALUE_TYPE(omnibox::kOmniboxLocalEntitySuggestions)}, +@@ -2858,7 +2858,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kOmniboxExperimentalSuggestScoringDescription, kOsAll, + FEATURE_VALUE_TYPE(omnibox::kOmniboxExperimentalSuggestScoring)}, -#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, -@@ -2850,7 +2850,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -2903,7 +2903,7 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kOmniboxAutocompleteTitlesName, flag_descriptions::kOmniboxAutocompleteTitlesDescription, kOsDesktop, FEATURE_VALUE_TYPE(omnibox::kAutocompleteTitles)}, -#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, -@@ -3084,13 +3084,13 @@ const FeatureEntry kFeatureEntries[] = { +@@ -3136,13 +3136,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) {"chrome-colors", flag_descriptions::kChromeColorsName, -@@ -3889,13 +3889,13 @@ const FeatureEntry kFeatureEntries[] = { +@@ -3965,13 +3965,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", -@@ -4269,7 +4269,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kAudioWorkletRealtimeThreadDescription, kOsAll, - FEATURE_VALUE_TYPE(blink::features::kAudioWorkletRealtimeThread)}, - --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - {"enable-autofill-save-credit-card-uses-improved-messaging", - flag_descriptions::kEnableAutofillSaveCreditCardUsesImprovedMessagingName, - flag_descriptions:: -@@ -4279,7 +4279,7 @@ const FeatureEntry kFeatureEntries[] = { - autofill::features::kAutofillSaveCreditCardUsesImprovedMessaging, - kAutofillSaveCreditCardUsesImprovedMessagingVariations, - "AutofillSaveCreditCardUsesImprovedMessaging")}, --#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_CHROMEOS) - {"release-notes", flag_descriptions::kReleaseNotesName, -@@ -4367,12 +4367,12 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4425,12 +4425,12 @@ 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, FEATURE_VALUE_TYPE(media::kGlobalMediaControls)}, -#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", -@@ -4385,12 +4385,12 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4450,12 +4450,12 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kSafetyTipDescription, kOsAll, FEATURE_VALUE_TYPE(security_state::features::kSafetyTipUI)}, -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) {"animated-avatar-button", flag_descriptions::kAnimatedAvatarButtonName, flag_descriptions::kAnimatedAvatarButtonDescription, kOsWin | kOsMac | kOsLinux, FEATURE_VALUE_TYPE(features::kAnimatedAvatarButton)}, -#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_CHROMEOS) {"crostini-webui-installer", flag_descriptions::kCrostiniWebUIInstallerName, -@@ -4526,12 +4526,12 @@ const FeatureEntry kFeatureEntries[] = { +@@ -4587,12 +4587,12 @@ const FeatureEntry kFeatureEntries[] = { chrome::android::kDarkenWebsitesCheckboxInThemesSetting)}, #endif // defined(OS_ANDROID) -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) {"profile-menu-revamp", flag_descriptions::kProfileMenuRevampName, flag_descriptions::kProfileMenuRevampDescription, kOsWin | kOsMac | kOsLinux, FEATURE_VALUE_TYPE(features::kProfileMenuRevamp)}, -#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) {"password-leak-detection", flag_descriptions::kPasswordLeakDetectionName, flag_descriptions::kPasswordLeakDetectionDescription, kOsAll, -@@ -4605,11 +4605,11 @@ const FeatureEntry kFeatureEntries[] = { - content_settings::kImprovedCookieControlsForThirdPartyCookieBlocking)}, - #endif // !defined(OS_ANDROID) - --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - {"sync-clipboard-service", flag_descriptions::kSyncClipboardServiceName, - flag_descriptions::kSyncClipboardServiceDescription, kOsDesktop, - FEATURE_VALUE_TYPE(features::kSyncClipboardServiceFeature)}, --#endif // OS_WIN || OS_MACOSX || OS_LINUX -+#endif // OS_WIN || OS_MACOSX || OS_LINUX || defined(OS_BSD) - - #if !defined(OS_ANDROID) - {"accessibility-internals-page-improvements", 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 528071) +++ head/www/chromium/files/patch-chrome_browser_background_background__mode__manager.cc (revision 528072) @@ -1,11 +1,11 @@ ---- chrome/browser/background/background_mode_manager.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/background/background_mode_manager.cc.orig 2020-03-03 18:53:01 UTC +++ chrome/browser/background/background_mode_manager.cc -@@ -770,7 +770,7 @@ gfx::ImageSkia GetStatusTrayIcon() { +@@ -797,7 +797,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 528071) +++ head/www/chromium/files/patch-chrome_browser_browser__resources.grd (revision 528072) @@ -1,20 +1,20 @@ ---- chrome/browser/browser_resources.grd.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/browser_resources.grd.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/browser_resources.grd -@@ -108,7 +108,7 @@ - +@@ -54,7 +54,7 @@ + - + -@@ -550,7 +550,7 @@ +@@ -457,7 +457,7 @@ - + Index: head/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc (revision 528071) +++ head/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc (revision 528072) @@ -1,66 +1,66 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -220,9 +220,9 @@ +@@ -223,9 +223,9 @@ #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) #include "components/crash/content/app/breakpad_linux.h" -@@ -260,7 +260,7 @@ +@@ -264,7 +264,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 -@@ -1071,7 +1071,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1073,7 +1073,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 . -@@ -1080,7 +1080,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1082,7 +1082,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) -@@ -1119,7 +1119,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1121,7 +1121,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { } #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 @@ -1274,6 +1274,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( @@ -1282,6 +1283,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__content__browser__client.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc (revision 528071) +++ head/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc (revision 528072) @@ -1,101 +1,107 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -388,7 +388,7 @@ +@@ -382,7 +382,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" -@@ -442,7 +442,7 @@ +@@ -435,12 +435,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 -@@ -475,7 +475,7 @@ + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include "components/crash/content/app/crash_switches.h" + #include "components/crash/content/app/crashpad.h" + #endif +@@ -468,7 +468,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) #if defined(USE_X11) #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux_x11.h" #else -@@ -1193,7 +1193,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( +@@ -1222,7 +1222,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) -@@ -1219,7 +1219,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts( +@@ -1248,7 +1248,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) #if defined(USE_X11) main_parts->AddParts(new ChromeBrowserMainExtraPartsViewsLinuxX11()); #else -@@ -1955,7 +1955,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -1987,7 +1987,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 -@@ -2212,7 +2212,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -2252,7 +2252,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)) { -@@ -3526,7 +3526,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -3553,7 +3553,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, -@@ -3666,7 +3666,7 @@ void ChromeContentBrowserClient::BindCredentialManager +@@ -3683,7 +3683,7 @@ void ChromeContentBrowserClient::BindCredentialManager } #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); -@@ -3684,7 +3684,7 @@ bool ShouldEnableAudioSandbox(const policy::PolicyMap& +@@ -3701,7 +3701,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(); -@@ -3977,7 +3977,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -3988,7 +3988,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)); 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 528071) +++ head/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h (revision 528072) @@ -1,17 +1,17 @@ ---- chrome/browser/chrome_content_browser_client.h.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -367,12 +367,12 @@ class ChromeContentBrowserClient : public content::Con +@@ -371,12 +371,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 528071) +++ head/www/chromium/files/patch-chrome_browser_custom__handlers_protocol__handler__registry.cc (revision 528072) @@ -1,11 +1,11 @@ ---- chrome/browser/custom_handlers/protocol_handler_registry.cc.orig 2019-10-21 19:06:21 UTC +--- chrome/browser/custom_handlers/protocol_handler_registry.cc.orig 2020-03-03 18:53:01 UTC +++ chrome/browser/custom_handlers/protocol_handler_registry.cc -@@ -43,7 +43,7 @@ const ProtocolHandler& LookupHandler( +@@ -42,7 +42,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_devtools_devtools__eye__dropper.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc (revision 528071) +++ head/www/chromium/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc (revision 528072) @@ -1,11 +1,11 @@ ---- chrome/browser/devtools/devtools_eye_dropper.cc.orig 2019-09-09 21:55:09 UTC +--- chrome/browser/devtools/devtools_eye_dropper.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/devtools/devtools_eye_dropper.cc -@@ -163,7 +163,7 @@ void DevToolsEyeDropper::UpdateCursor() { +@@ -164,7 +164,7 @@ void DevToolsEyeDropper::UpdateCursor() { // magnified projection only with centered hotspot. // Mac Retina requires cursor to be > 120px in order to render smoothly. -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) const float kCursorSize = 63; const float kDiameter = 63; const float kHotspotOffset = 32; Index: head/www/chromium/files/patch-chrome_browser_download_download__prefs.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_download_download__prefs.cc (revision 528071) +++ head/www/chromium/files/patch-chrome_browser_download_download__prefs.cc (revision 528072) @@ -1,65 +1,65 @@ ---- chrome/browser/download/download_prefs.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/download/download_prefs.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/download/download_prefs.cc @@ -63,7 +63,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 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( 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) -@@ -358,7 +358,7 @@ bool DownloadPrefs::IsDownloadPathManaged() const { +@@ -360,7 +360,7 @@ bool DownloadPrefs::IsDownloadPathManaged() const { } bool DownloadPrefs::IsAutoOpenUsed() 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 -@@ -372,7 +372,7 @@ bool DownloadPrefs::IsAutoOpenEnabledBasedOnExtension( +@@ -374,7 +374,7 @@ bool DownloadPrefs::IsAutoOpenEnabledBasedOnExtension( 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()) -@@ -409,7 +409,7 @@ void DownloadPrefs::DisableAutoOpenBasedOnExtension( +@@ -411,7 +411,7 @@ void DownloadPrefs::DisableAutoOpenBasedOnExtension( 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; -@@ -430,7 +430,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons +@@ -432,7 +432,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons #endif void DownloadPrefs::ResetAutoOpen() { -#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(); 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 528071) +++ head/www/chromium/files/patch-chrome_browser_download_download__shelf__context__menu.cc (revision 528072) @@ -1,11 +1,11 @@ ---- chrome/browser/download/download_shelf_context_menu.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/download/download_shelf_context_menu.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/download/download_shelf_context_menu.cc -@@ -135,7 +135,7 @@ base::string16 DownloadShelfContextMenu::GetLabelForCo +@@ -137,7 +137,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 528071) +++ head/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn (revision 528072) @@ -1,15 +1,15 @@ ---- chrome/browser/extensions/BUILD.gn.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1135,6 +1135,12 @@ jumbo_static_library("extensions") { +@@ -1154,6 +1154,12 @@ jumbo_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_settings__private_prefs__util.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc (revision 528071) +++ head/www/chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc (revision 528072) @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -159,7 +159,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelist +@@ -158,7 +158,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelist (*s_whitelist)[bookmarks::prefs::kShowBookmarkBar] = settings_api::PrefType::PREF_TYPE_BOOLEAN; -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) (*s_whitelist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::PREF_TYPE_BOOLEAN; #endif -@@ -169,7 +169,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelist +@@ -168,7 +168,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelist // Appearance settings. (*s_whitelist)[::prefs::kCurrentThemeID] = settings_api::PrefType::PREF_TYPE_STRING; -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) (*s_whitelist)[::prefs::kUsesSystemTheme] = settings_api::PrefType::PREF_TYPE_BOOLEAN; #endif 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 528071) +++ head/www/chromium/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc (revision 528072) @@ -1,20 +1,20 @@ --- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig 2019-09-09 21:55:09 UTC +++ chrome/browser/extensions/browser_context_keyed_service_factories.cc -@@ -55,7 +55,7 @@ - #include "chrome/browser/chromeos/extensions/input_method_api.h" - #include "chrome/browser/chromeos/extensions/media_player_api.h" +@@ -52,7 +52,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" --#elif defined(OS_LINUX) || defined(OS_WIN) -+#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) - #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" #endif -@@ -94,7 +94,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt() - #if defined(OS_CHROMEOS) - extensions::InputImeAPI::GetFactoryInstance(); - extensions::InputMethodAPI::GetFactoryInstance(); --#elif defined(OS_LINUX) || defined(OS_WIN) -+#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) +@@ -88,7 +88,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 528071) +++ head/www/chromium/files/patch-chrome_browser_flag__descriptions.cc (revision 528072) @@ -1,54 +1,36 @@ ---- chrome/browser/flag_descriptions.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/flag_descriptions.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/flag_descriptions.cc -@@ -3744,7 +3744,7 @@ const char kZeroStateFilesDescription[] = - - #endif // defined(OS_CHROMEOS) - --#if defined(OS_CHROMEOS) || defined(OS_LINUX) -+#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) - const char kTerminalSystemAppName[] = "Terminal System App"; - const char kTerminalSystemAppDescription[] = - "Enables the Terminal System App at chrome://terminal which is used for " -@@ -3757,7 +3757,7 @@ const char kDynamicTcmallocDescription[] = +@@ -3861,7 +3861,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 -------------------------------------------------- -@@ -3782,13 +3782,13 @@ const char kReopenTabInProductHelpDescription[] = +@@ -3886,13 +3886,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) -@@ -3806,7 +3806,7 @@ const char kClickToCallUIDescription[] = +@@ -3921,7 +3921,7 @@ const char kRemoteCopyReceiverDescription[] = + #endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || + // defined(OS_CHROMEOS) - #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) const char kDirectManipulationStylusName[] = "Direct Manipulation Stylus"; const char kDirectManipulationStylusDescription[] = -@@ -3825,7 +3825,7 @@ const char kSyncClipboardServiceName[] = "Sync Clipboa - const char kSyncClipboardServiceDescription[] = - "Enables clipboard syncing via Chrome Sync."; - --#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_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 528071) +++ head/www/chromium/files/patch-chrome_browser_flag__descriptions.h (revision 528072) @@ -1,65 +1,47 @@ ---- chrome/browser/flag_descriptions.h.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/flag_descriptions.h.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/flag_descriptions.h @@ -20,9 +20,9 @@ #include "ui/android/buildflags.h" #endif // defined(OS_ANDROID) -#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 -@@ -2233,7 +2233,7 @@ 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) - extern const char kTerminalSystemAppName[]; - extern const char kTerminalSystemAppDescription[]; - -@@ -2242,7 +2242,7 @@ extern const char kDynamicTcmallocName[]; +@@ -2299,7 +2299,7 @@ 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 -------------------------------------------------- -@@ -2261,12 +2261,12 @@ extern const char kReopenTabInProductHelpDescription[] +@@ -2318,12 +2318,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) -@@ -2278,7 +2278,7 @@ extern const char kClickToCallUIDescription[]; +@@ -2344,7 +2344,7 @@ extern const char kRemoteCopyReceiverDescription[]; + #endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || + // defined(OS_CHROMEOS) - #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) extern const char kDirectManipulationStylusName[]; extern const char kDirectManipulationStylusDescription[]; -@@ -2292,7 +2292,7 @@ extern const char kProfileMenuRevampDescription[]; - extern const char kSyncClipboardServiceName[]; - extern const char kSyncClipboardServiceDescription[]; - --#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_MACOSX) || defined(OS_CHROMEOS) - Index: head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc (revision 528071) +++ head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc (revision 528072) @@ -1,11 +1,11 @@ ---- chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2020-03-03 18:53:01 UTC +++ chrome/browser/media/webrtc/webrtc_event_log_uploader.cc -@@ -37,7 +37,7 @@ constexpr size_t kExpectedMimeOverheadBytes = 1000; / +@@ -38,7 +38,7 @@ constexpr size_t kExpectedMimeOverheadBytes = 1000; / const char kProduct[] = "Chrome"; #elif defined(OS_MACOSX) const char kProduct[] = "Chrome_Mac"; -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) const char kProduct[] = "Chrome_Linux"; #elif defined(OS_ANDROID) const char kProduct[] = "Chrome_Android"; 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 528071) +++ head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc (revision 528072) @@ -1,33 +1,33 @@ --- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2019-10-30 15:49:45 UTC +++ chrome/browser/media/webrtc/webrtc_logging_controller.cc @@ -24,10 +24,10 @@ #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/fileapi/isolated_context.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; @@ -267,7 +267,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) { @@ -312,7 +312,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_metrics_chrome__metrics__service__client.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc (revision 528071) +++ head/www/chromium/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc (revision 528072) @@ -1,25 +1,25 @@ ---- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -704,11 +704,11 @@ void ChromeMetricsServiceClient::RegisterMetricsServic +@@ -708,11 +708,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); -@@ -947,7 +947,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve +@@ -955,7 +955,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 528071) +++ head/www/chromium/files/patch-chrome_browser_metrics_process__memory__metrics__emitter.cc (revision 528072) @@ -1,20 +1,20 @@ ---- chrome/browser/metrics/process_memory_metrics_emitter.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/metrics/process_memory_metrics_emitter.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/metrics/process_memory_metrics_emitter.cc -@@ -375,7 +375,7 @@ void EmitProcessUmaAndUkm(const GlobalMemoryDump::Proc +@@ -425,7 +425,7 @@ void EmitProcessUmaAndUkm(const GlobalMemoryDump::Proc builder->SetPrivateMemoryFootprint(pmd.os_dump().private_footprint_kb / 1024); builder->SetSharedMemoryFootprint(pmd.os_dump().shared_footprint_kb / 1024); -#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); #endif -@@ -398,7 +398,7 @@ void EmitProcessUmaAndUkm(const GlobalMemoryDump::Proc +@@ -448,7 +448,7 @@ void EmitProcessUmaAndUkm(const GlobalMemoryDump::Proc MEMORY_METRICS_HISTOGRAM_MB(std::string(kMemoryHistogramPrefix) + process_name + ".SharedMemoryFootprint", pmd.os_dump().shared_footprint_kb / 1024); -#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); 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 528071) +++ head/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.cc (revision 528072) @@ -1,64 +1,64 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/net/system_network_context_manager.cc -@@ -81,11 +81,11 @@ +@@ -79,11 +79,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" -@@ -209,10 +209,10 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut + #if defined(OS_WIN) || defined(OS_MACOSX) + #include "content/public/common/network_service_util.h" +@@ -211,10 +211,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 = -@@ -476,10 +476,10 @@ SystemNetworkContextManager::SystemNetworkContextManag +@@ -480,10 +480,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); -@@ -531,10 +531,10 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe +@@ -535,10 +535,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( -@@ -645,7 +645,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea +@@ -643,7 +643,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea insecure_stub_resolver_enabled, secure_dns_mode, std::move(dns_over_https_servers)); -#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_notifications_notification__display__service__impl.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc (revision 528071) +++ head/www/chromium/files/patch-chrome_browser_notifications_notification__display__service__impl.cc (revision 528072) @@ -1,20 +1,20 @@ ---- chrome/browser/notifications/notification_display_service_impl.cc.orig 2019-10-21 19:06:22 UTC +--- chrome/browser/notifications/notification_display_service_impl.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/notifications/notification_display_service_impl.cc -@@ -33,7 +33,7 @@ +@@ -34,7 +34,7 @@ #include "chrome/browser/notifications/notification_platform_bridge_message_center.h" #endif -#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) #include "chrome/browser/send_tab_to_self/desktop_notification_handler.h" #endif -@@ -122,7 +122,7 @@ NotificationDisplayServiceImpl::NotificationDisplaySer +@@ -123,7 +123,7 @@ NotificationDisplayServiceImpl::NotificationDisplaySer AddNotificationHandler(NotificationHandler::Type::WEB_PERSISTENT, std::make_unique()); -#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) AddNotificationHandler( NotificationHandler::Type::SEND_TAB_TO_SELF, std::make_unique( 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 528071) +++ head/www/chromium/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc (revision 528072) @@ -1,14 +1,14 @@ ---- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/password_manager/chrome_password_manager_client.cc -@@ -85,7 +85,11 @@ +@@ -87,7 +87,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_plugins_plugin__info__host__impl.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_plugins_plugin__info__host__impl.cc (revision 528071) +++ head/www/chromium/files/patch-chrome_browser_plugins_plugin__info__host__impl.cc (revision 528072) @@ -1,11 +1,11 @@ ---- chrome/browser/plugins/plugin_info_host_impl.cc.orig 2019-10-21 19:06:22 UTC +--- chrome/browser/plugins/plugin_info_host_impl.cc.orig 2020-03-03 18:53:01 UTC +++ chrome/browser/plugins/plugin_info_host_impl.cc -@@ -383,7 +383,7 @@ void PluginInfoHostImpl::ComponentPluginLookupDone( +@@ -382,7 +382,7 @@ void PluginInfoHostImpl::ComponentPluginLookupDone( std::unique_ptr cus_plugin_info) { if (cus_plugin_info) { output->status = chrome::mojom::PluginStatus::kComponentUpdateRequired; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) if (cus_plugin_info->version != base::Version("0")) { output->status = chrome::mojom::PluginStatus::kRestartRequired; } Index: head/www/chromium/files/patch-chrome_browser_plugins_plugins__resource__service.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_plugins_plugins__resource__service.cc (revision 528071) +++ head/www/chromium/files/patch-chrome_browser_plugins_plugins__resource__service.cc (revision 528072) @@ -1,11 +1,11 @@ ---- chrome/browser/plugins/plugins_resource_service.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/plugins/plugins_resource_service.cc.orig 2020-03-03 18:53:01 UTC +++ chrome/browser/plugins/plugins_resource_service.cc -@@ -63,7 +63,7 @@ GURL GetPluginsServerURL() { +@@ -62,7 +62,7 @@ GURL GetPluginsServerURL() { filename = "plugins_win.json"; #elif defined(OS_CHROMEOS) filename = "plugins_chromeos.json"; -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) filename = "plugins_linux.json"; #elif defined(OS_MACOSX) filename = "plugins_mac.json"; 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 528071) +++ head/www/chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc (revision 528072) @@ -1,43 +1,43 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -113,7 +113,7 @@ +@@ -117,7 +117,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 -@@ -352,11 +352,11 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - prefs::kSafeBrowsingSendFilesForMalwareCheck, - base::Value::Type::INTEGER - }, +@@ -357,11 +357,11 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + { key::kWebComponentsV0Enabled, + prefs::kWebComponentsV0Enabled, + base::Value::Type::BOOLEAN }, -#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_POSIX) { key::kNtlmV2Enabled, prefs::kNtlmV2Enabled, -@@ -1141,7 +1141,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1147,7 +1147,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + prefs::kExternalProtocolDialogShowAlwaysOpenCheckbox, base::Value::Type::BOOLEAN }, - #if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) { key::kAlternativeBrowserPath, browser_switcher::prefs::kAlternativeBrowserPath, base::Value::Type::STRING }, -@@ -1205,7 +1205,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = +@@ -1208,7 +1208,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = browser_switcher::prefs::kChromeParameters, base::Value::Type::LIST }, #endif -#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_MACOSX) +#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) { key::kBrowserGuestModeEnforced, prefs::kBrowserGuestModeEnforced, base::Value::Type::BOOLEAN }, 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 528071) +++ head/www/chromium/files/patch-chrome_browser_policy_policy__prefs__browsertest.cc (revision 528072) @@ -1,11 +1,11 @@ ---- chrome/browser/policy/policy_prefs_browsertest.cc.orig 2019-10-21 19:06:22 UTC +--- chrome/browser/policy/policy_prefs_browsertest.cc.orig 2020-03-03 18:53:01 UTC +++ chrome/browser/policy/policy_prefs_browsertest.cc -@@ -184,6 +184,8 @@ class PolicyTestCase { +@@ -250,6 +250,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 Index: head/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc (revision 528071) +++ head/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc (revision 528072) @@ -1,20 +1,20 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -346,7 +346,7 @@ +@@ -352,7 +352,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 -@@ -978,7 +978,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -1005,7 +1005,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 528071) +++ head/www/chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc (revision 528072) @@ -1,29 +1,11 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -186,7 +186,7 @@ - #include "chrome/browser/safe_browsing/advanced_protection_status_manager_factory.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) - #include "chrome/browser/sync/sync_clipboard_service_factory.h" - #endif - -@@ -352,7 +352,7 @@ void ChromeBrowserMainExtraPartsProfiles:: - MediaGalleriesPreferencesFactory::GetInstance(); - #endif +@@ -292,7 +292,7 @@ void ChromeBrowserMainExtraPartsProfiles:: + if (base::FeatureList::IsEnabled(media::kUseMediaHistoryStore)) + media_history::MediaHistoryKeyedServiceFactory::GetInstance(); #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(); -@@ -415,7 +415,7 @@ void ChromeBrowserMainExtraPartsProfiles:: - StorageNotificationServiceFactory::GetInstance(); - #endif - suggestions::SuggestionsServiceFactory::GetInstance(); --#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) -+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - SyncClipboardServiceFactory::GetInstance(); - #endif - TabRestoreServiceFactory::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 528071) +++ head/www/chromium/files/patch-chrome_browser_profiles_profile__attributes__entry.cc (revision 528072) @@ -1,11 +1,11 @@ ---- chrome/browser/profiles/profile_attributes_entry.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/profiles/profile_attributes_entry.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/profiles/profile_attributes_entry.cc -@@ -102,7 +102,7 @@ void ProfileAttributesEntry::Initialize(ProfileInfoCac +@@ -115,7 +115,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 528071) +++ head/www/chromium/files/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc (revision 528072) @@ -1,29 +1,29 @@ ---- chrome/browser/renderer_context_menu/render_view_context_menu.cc.orig 2019-12-16 21:51:23 UTC +--- chrome/browser/renderer_context_menu/render_view_context_menu.cc.orig 2020-03-03 18:53:51 UTC +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -1710,7 +1710,7 @@ void RenderViewContextMenu::AppendEditableItems() { +@@ -1701,7 +1701,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, -@@ -1752,7 +1752,7 @@ void RenderViewContextMenu::AppendLanguageSettings() { +@@ -1743,7 +1743,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 -@@ -2057,7 +2057,7 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) +@@ -2082,7 +2082,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__page.html =================================================================== --- head/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html (revision 528071) +++ head/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html (revision 528072) @@ -1,29 +1,29 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2019-10-21 19:06:23 UTC +--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2020-03-03 18:53:52 UTC +++ chrome/browser/resources/settings/appearance_page/appearance_page.html -@@ -67,7 +67,7 @@ +@@ -66,7 +66,7 @@ - + - +