Index: head/www/chromium/Makefile =================================================================== --- head/www/chromium/Makefile (revision 502460) +++ head/www/chromium/Makefile (revision 502461) @@ -1,342 +1,341 @@ # Created by: Florent Thoumie # $FreeBSD$ PORTNAME= chromium -PORTVERSION= 73.0.3683.103 -PORTREVISION= 2 +PORTVERSION= 74.0.3729.157 CATEGORIES?= www 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 .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 CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \ GN_ARGS+=proprietary_codecs=false \ GN_ARGS+=enable_hevc_demuxing=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_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="lots of free disk space (~ 13GB)" DEBUG_VARS_OFF= BUILDTYPE=Release \ GN_ARGS+=is_debug=false \ GN_ARGS+=is_official_build=true \ GN_ARGS+=symbol_level=0 \ GN_ARGS+=remove_webcore_debug_symbols=true \ 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} .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 .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 ${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 .for f in libEGL.so libGLESv2.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor # SwiftShader .if ${ARCH} != aarch64 @${MKDIR} ${STAGEDIR}${DATADIR}/swiftshader .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 502460) +++ head/www/chromium/distinfo (revision 502461) @@ -1,7 +1,7 @@ -TIMESTAMP = 1554469972 -SHA256 (chromium-73.0.3683.103.tar.xz) = eb02c419de98bb8849fd0a37a3e7bbb813938c37e3d6b2c2526df3e84f9653af -SIZE (chromium-73.0.3683.103.tar.xz) = 710804864 -SHA256 (chromium-73.0.3683.103-testdata.tar.xz) = 91332c838df414e373721a07a8ae609ca5abd0d1a9f341b2de91b5c55827cbb3 -SIZE (chromium-73.0.3683.103-testdata.tar.xz) = 352670716 +TIMESTAMP = 1558103760 +SHA256 (chromium-74.0.3729.157.tar.xz) = dcbe311d6ba7124496beca4a7ae401ac072c1f8e1a47d17b0919dba1b5962e06 +SIZE (chromium-74.0.3729.157.tar.xz) = 743051004 +SHA256 (chromium-74.0.3729.157-testdata.tar.xz) = fccea72fcbe732495fbfe2b22815fc0a238b459fa88e8fa2ddfc8aaa52492ff9 +SIZE (chromium-74.0.3729.157-testdata.tar.xz) = 350162436 SHA256 (test_fonts.tar.xz) = cf9cbe3b7f1c4c42d426bddc65ec178d333ad7e205a36fe0a606a3c0c545ece1 SIZE (test_fonts.tar.xz) = 200040 Index: head/www/chromium/files/patch-chrome_browser_extensions_bookmark__app__helper.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_bookmark__app__helper.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_extensions_bookmark__app__helper.cc (nonexistent) @@ -1,11 +0,0 @@ ---- chrome/browser/extensions/bookmark_app_helper.cc.orig 2019-03-11 22:00:53 UTC -+++ chrome/browser/extensions/bookmark_app_helper.cc -@@ -503,7 +503,7 @@ void BookmarkAppHelper::FinishInstallation(const Exten - if (create_shortcuts_) { - #if !defined(OS_CHROMEOS) - web_app::ShortcutLocations creation_locations; --#if defined(OS_LINUX) || defined(OS_WIN) -+#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) - creation_locations.on_desktop = true; - #else - creation_locations.on_desktop = false; Property changes on: head/www/chromium/files/patch-chrome_browser_extensions_bookmark__app__helper.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-base_debug_elf__reader__linux.cc =================================================================== --- head/www/chromium/files/patch-base_debug_elf__reader__linux.cc (revision 502460) +++ head/www/chromium/files/patch-base_debug_elf__reader__linux.cc (nonexistent) @@ -1,13 +0,0 @@ ---- base/debug/elf_reader_linux.cc.orig 2019-03-11 22:00:51 UTC -+++ base/debug/elf_reader_linux.cc -@@ -41,8 +41,10 @@ Optional ElfSegmentBuildIDNoteAsString(co - const void* section_end = segment.data() + segment.size_bytes(); - const Nhdr* note_header = reinterpret_cast(segment.data()); - while (note_header < section_end) { -+#if !defined(OS_BSD) - if (note_header->n_type == NT_GNU_BUILD_ID) - break; -+#endif - note_header = reinterpret_cast( - reinterpret_cast(note_header) + sizeof(Nhdr) + - bits::Align(note_header->n_namesz, 4) + Property changes on: head/www/chromium/files/patch-base_debug_elf__reader__linux.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-third__party_googletest_src_googletest_test_googletest-port-test.cc =================================================================== --- head/www/chromium/files/patch-third__party_googletest_src_googletest_test_googletest-port-test.cc (revision 502460) +++ head/www/chromium/files/patch-third__party_googletest_src_googletest_test_googletest-port-test.cc (nonexistent) @@ -1,11 +0,0 @@ ---- third_party/googletest/src/googletest/test/googletest-port-test.cc.orig 2019-03-11 22:08:00 UTC -+++ third_party/googletest/src/googletest/test/googletest-port-test.cc -@@ -286,7 +286,7 @@ TEST(FormatCompilerIndependentFileLocationTest, Format - EXPECT_EQ("unknown file", FormatCompilerIndependentFileLocation(nullptr, -1)); - } - --#if GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_QNX || GTEST_OS_FUCHSIA -+#if GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_QNX || GTEST_OS_FUCHSIA || GTEST_OS_FREEBSD - void* ThreadFunc(void* data) { - internal::Mutex* mutex = static_cast(data); - mutex->Lock(); Property changes on: head/www/chromium/files/patch-third__party_googletest_src_googletest_test_googletest-port-test.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-third__party_googletest_src_googletest_include_gtest_internal_gtest-port.h =================================================================== --- head/www/chromium/files/patch-third__party_googletest_src_googletest_include_gtest_internal_gtest-port.h (revision 502460) +++ head/www/chromium/files/patch-third__party_googletest_src_googletest_include_gtest_internal_gtest-port.h (nonexistent) @@ -1,11 +0,0 @@ ---- third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h.orig 2019-03-11 22:08:00 UTC -+++ third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h -@@ -623,7 +623,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SE - (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_AIX || GTEST_OS_OS2) - - // Determines whether test results can be streamed to a socket. --#if GTEST_OS_LINUX -+#if GTEST_OS_LINUX || GTEST_OS_FREEBSD - # define GTEST_CAN_STREAM_RESULTS_ 1 - #endif - Property changes on: head/www/chromium/files/patch-third__party_googletest_src_googletest_include_gtest_internal_gtest-port.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-components_download_quarantine_quarantine__linux.cc =================================================================== --- head/www/chromium/files/patch-components_download_quarantine_quarantine__linux.cc (revision 502460) +++ head/www/chromium/files/patch-components_download_quarantine_quarantine__linux.cc (nonexistent) @@ -1,36 +0,0 @@ ---- components/download/quarantine/quarantine_linux.cc.orig 2019-03-11 22:00:56 UTC -+++ components/download/quarantine/quarantine_linux.cc -@@ -2,11 +2,15 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -+#include "build/build_config.h" -+ - #include "components/download/quarantine/quarantine.h" - - #include - #include -+#if !defined(OS_BSD) - #include -+#endif - - #include "base/files/file_path.h" - #include "base/logging.h" -@@ -25,7 +29,7 @@ bool SetExtendedFileAttribute(const char* path, - int flags) { - // On Chrome OS, there is no component that can validate these extended - // attributes so there is no need to set them. --#if !defined(OS_CHROMEOS) -+#if !defined(OS_CHROMEOS) && !defined(OS_BSD) - base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::MAY_BLOCK); - int result = setxattr(path, name, value, value_size, flags); - if (result) { -@@ -33,7 +37,7 @@ bool SetExtendedFileAttribute(const char* path, - << path; - return false; - } --#endif // !defined(OS_CHROMEOS) -+#endif // !defined(OS_CHROMEOS) && !defined(OS_BSD) - return true; - } - Property changes on: head/www/chromium/files/patch-components_download_quarantine_quarantine__linux.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-ui_base_ime_ime__engine__handler__interface.h =================================================================== --- head/www/chromium/files/patch-ui_base_ime_ime__engine__handler__interface.h (revision 502460) +++ head/www/chromium/files/patch-ui_base_ime_ime__engine__handler__interface.h (nonexistent) @@ -1,11 +0,0 @@ ---- ui/base/ime/ime_engine_handler_interface.h.orig 2019-03-11 22:01:19 UTC -+++ ui/base/ime/ime_engine_handler_interface.h -@@ -166,7 +166,7 @@ class UI_BASE_IME_EXPORT IMEEngineHandlerInterface { - virtual void SetMirroringEnabled(bool mirroring_enabled) = 0; - virtual void SetCastingEnabled(bool casting_enabled) = 0; - --#elif defined(OS_LINUX) || defined(OS_WIN) -+#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) - - // Get the id of the IME extension. - virtual std::string GetExtensionId() const = 0; Property changes on: head/www/chromium/files/patch-ui_base_ime_ime__engine__handler__interface.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-chrome_browser_ui_input__method_input__method__engine.h =================================================================== --- head/www/chromium/files/patch-chrome_browser_ui_input__method_input__method__engine.h (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_ui_input__method_input__method__engine.h (nonexistent) @@ -1,11 +0,0 @@ ---- chrome/browser/ui/input_method/input_method_engine.h.orig 2019-03-11 22:00:54 UTC -+++ chrome/browser/ui/input_method/input_method_engine.h -@@ -27,7 +27,7 @@ class InputMethodEngine : public InputMethodEngineBase - - // ui::IMEEngineHandlerInterface: - bool IsActive() const override; -- std::string GetExtensionId() const override; -+ std::string GetExtensionId() const; - - // Creates and shows the IME window. - // Returns 0 for errors and |error| will contains the error message. Property changes on: head/www/chromium/files/patch-chrome_browser_ui_input__method_input__method__engine.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-services_catalog_store.cc =================================================================== --- head/www/chromium/files/patch-services_catalog_store.cc (revision 502460) +++ head/www/chromium/files/patch-services_catalog_store.cc (nonexistent) @@ -1,10 +0,0 @@ ---- services/catalog/store.cc.orig 2019-03-11 22:01:01 UTC -+++ services/catalog/store.cc -@@ -38,5 +38,7 @@ const char Store::kRequiredFilesKey_PlatformValue_MacO - const char Store::kRequiredFilesKey_PlatformValue_Android[] = "android"; - // static - const char Store::kRequiredFilesKey_PlatformValue_Fuchsia[] = "fuchsia"; -+// static -+const char Store::kRequiredFilesKey_PlatformValue_FreeBSD[] = "freebsd"; - - } // namespace catalog Property changes on: head/www/chromium/files/patch-services_catalog_store.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-net_http_http__network__session.cc =================================================================== --- head/www/chromium/files/patch-net_http_http__network__session.cc (revision 502460) +++ head/www/chromium/files/patch-net_http_http__network__session.cc (nonexistent) @@ -1,12 +0,0 @@ ---- net/http/http_network_session.cc.orig 2019-03-11 22:01:01 UTC -+++ net/http/http_network_session.cc -@@ -19,7 +19,9 @@ - #include "base/trace_event/memory_dump_request_args.h" - #include "base/trace_event/process_memory_dump.h" - #include "base/values.h" -+#if defined(USE_KERBEROS) - #include "net/http/http_auth_handler_factory.h" -+#endif - #include "net/http/http_response_body_drainer.h" - #include "net/http/http_stream_factory.h" - #include "net/http/url_security_manager.h" Property changes on: head/www/chromium/files/patch-net_http_http__network__session.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-content_public_common_renderer__preferences.h =================================================================== --- head/www/chromium/files/patch-content_public_common_renderer__preferences.h (revision 502460) +++ head/www/chromium/files/patch-content_public_common_renderer__preferences.h (nonexistent) @@ -1,11 +0,0 @@ ---- content/public/common/renderer_preferences.h.orig 2019-03-11 22:00:58 UTC -+++ content/public/common/renderer_preferences.h -@@ -120,7 +120,7 @@ struct CONTENT_EXPORT RendererPreferences { - // Country iso of the mobile network for content detection purpose. - std::string network_contry_iso; - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - std::string system_font_family_name; - #endif - Property changes on: head/www/chromium/files/patch-content_public_common_renderer__preferences.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-components_download_quarantine_test__support__linux.cc =================================================================== --- head/www/chromium/files/patch-components_download_quarantine_test__support__linux.cc (revision 502460) +++ head/www/chromium/files/patch-components_download_quarantine_test__support__linux.cc (nonexistent) @@ -1,20 +0,0 @@ ---- components/download/quarantine/test_support_linux.cc.orig 2019-03-11 22:00:56 UTC -+++ components/download/quarantine/test_support_linux.cc -@@ -21,6 +21,7 @@ namespace download { - namespace { - - std::string GetExtendedFileAttribute(const char* path, const char* name) { -+#if !defined(OS_BSD) - base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::MAY_BLOCK); - ssize_t len = getxattr(path, name, nullptr, 0); - if (len <= 0) -@@ -31,6 +32,9 @@ std::string GetExtendedFileAttribute(const char* path, - if (len < static_cast(buffer.size())) - return std::string(); - return std::string(buffer.begin(), buffer.end()); -+#else -+ return std::string(); -+#endif // !defined(OS_BSD) - } - - } // namespace Property changes on: head/www/chromium/files/patch-components_download_quarantine_test__support__linux.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-services_catalog_store.h =================================================================== --- head/www/chromium/files/patch-services_catalog_store.h (revision 502460) +++ head/www/chromium/files/patch-services_catalog_store.h (nonexistent) @@ -1,10 +0,0 @@ ---- services/catalog/store.h.orig 2019-03-11 22:01:01 UTC -+++ services/catalog/store.h -@@ -38,6 +38,7 @@ class Store { - static const char kRequiredFilesKey_PlatformValue_MacOSX[]; - static const char kRequiredFilesKey_PlatformValue_Android[]; - static const char kRequiredFilesKey_PlatformValue_Fuchsia[]; -+ static const char kRequiredFilesKey_PlatformValue_FreeBSD[]; - }; - - } // namespace catalog Property changes on: head/www/chromium/files/patch-services_catalog_store.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__view.h =================================================================== --- head/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__view.h (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__view.h (nonexistent) @@ -1,20 +0,0 @@ ---- chrome/browser/ui/views/frame/browser_view.h.orig 2019-03-11 22:00:54 UTC -+++ chrome/browser/ui/views/frame/browser_view.h -@@ -50,7 +50,7 @@ - #include "chrome/browser/ui/views/intent_picker_bubble_view.h" - #endif // defined(OS_CHROMEOS) - --#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) -+#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) - #include "chrome/browser/ui/views/quit_instruction_bubble_controller.h" - #endif - -@@ -850,7 +850,7 @@ class BrowserView : public BrowserWindow, - }; - base::Optional interactive_resize_; - --#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) -+#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) - scoped_refptr - quit_instruction_bubble_controller_; - #endif Property changes on: head/www/chromium/files/patch-chrome_browser_ui_views_frame_browser__view.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-services_service__manager_runner_host_BUILD.gn =================================================================== --- head/www/chromium/files/patch-services_service__manager_runner_host_BUILD.gn (revision 502460) +++ head/www/chromium/files/patch-services_service__manager_runner_host_BUILD.gn (nonexistent) @@ -1,11 +0,0 @@ ---- services/service_manager/runner/host/BUILD.gn.orig 2019-03-11 22:01:02 UTC -+++ services/service_manager/runner/host/BUILD.gn -@@ -30,7 +30,7 @@ source_set("lib") { - "//mojo/public/cpp/system", - ] - -- if (is_linux) { -+ if (is_linux && !is_bsd) { - deps += [ "//sandbox/linux:sandbox_services" ] - } - Property changes on: head/www/chromium/files/patch-services_service__manager_runner_host_BUILD.gn ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-third__party_blink_renderer_platform_wtf_threading.cc =================================================================== --- head/www/chromium/files/patch-third__party_blink_renderer_platform_wtf_threading.cc (revision 502460) +++ head/www/chromium/files/patch-third__party_blink_renderer_platform_wtf_threading.cc (nonexistent) @@ -1,29 +0,0 @@ ---- third_party/blink/renderer/platform/wtf/threading.cc.orig 2019-03-11 22:01:04 UTC -+++ third_party/blink/renderer/platform/wtf/threading.cc -@@ -17,12 +17,16 @@ - #error Blink does not support threading on your platform. - #endif - --#if defined(OS_LINUX) -+#if defined(OS_LINUX) || defined(OS_BSD) - #include - #elif defined(OS_ANDROID) - #include - #endif - -+#if defined(OS_BSD) -+#include -+#endif -+ - namespace WTF { - - // Current thread identity -@@ -38,6 +42,8 @@ ThreadIdentifier CurrentThreadSyscall() { - return syscall(__NR_gettid); - #elif defined(OS_ANDROID) - return gettid(); -+#elif defined(OS_BSD) -+ return pthread_getthreadid_np(); - #else - return reinterpret_cast(pthread_self()); - #endif Property changes on: head/www/chromium/files/patch-third__party_blink_renderer_platform_wtf_threading.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/chromium/files/patch-BUILD.gn =================================================================== --- head/www/chromium/files/patch-BUILD.gn (revision 502460) +++ head/www/chromium/files/patch-BUILD.gn (revision 502461) @@ -1,87 +1,87 @@ ---- BUILD.gn.orig 2019-03-11 22:00:51 UTC +--- BUILD.gn.orig 2019-04-30 22:22:25 UTC +++ BUILD.gn -@@ -381,7 +381,7 @@ group("gn_all") { +@@ -387,7 +387,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", -@@ -422,8 +422,6 @@ group("gn_all") { +@@ -428,8 +428,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", ] -@@ -480,10 +478,6 @@ group("gn_all") { +@@ -486,10 +484,6 @@ group("gn_all") { "//chrome/test/chromedriver:chromedriver", "//chrome/test/chromedriver:chromedriver_tests", "//components/sync:run_sync_testserver", - "//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", -@@ -538,10 +532,6 @@ group("gn_all") { +@@ -544,10 +538,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) { -@@ -615,7 +605,7 @@ group("gn_all") { +@@ -621,7 +611,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)" ] } -@@ -873,7 +863,6 @@ if (is_chromeos) { +@@ -878,7 +868,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", -@@ -1001,7 +990,7 @@ if (!is_ios) { +@@ -1029,7 +1018,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)" ] } -@@ -1010,7 +999,7 @@ if (!is_ios) { +@@ -1038,7 +1027,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)" ] } -@@ -1150,9 +1139,6 @@ group("chromium_builder_perf") { +@@ -1178,9 +1167,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-base_BUILD.gn =================================================================== --- head/www/chromium/files/patch-base_BUILD.gn (revision 502460) +++ head/www/chromium/files/patch-base_BUILD.gn (revision 502461) @@ -1,67 +1,67 @@ ---- base/BUILD.gn.orig 2019-03-11 22:00:51 UTC +--- base/BUILD.gn.orig 2019-04-30 22:22:27 UTC +++ base/BUILD.gn -@@ -1185,7 +1185,7 @@ jumbo_component("base") { +@@ -1188,7 +1188,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" ] } -@@ -1211,7 +1211,7 @@ jumbo_component("base") { +@@ -1214,7 +1214,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 += [ -@@ -1751,6 +1751,33 @@ jumbo_component("base") { +@@ -1764,6 +1764,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([]) -@@ -2808,6 +2835,12 @@ test("base_unittests") { +@@ -2840,6 +2867,12 @@ test("base_unittests") { ] set_sources_assignment_filter(sources_assignment_filter) } + + if (is_bsd) { + sources -= [ + "debug/proc_maps_linux_unittest.cc", + ] + } if (is_win) { deps += [ "//base:scoped_handle_test_dll" ] Index: head/www/chromium/files/patch-base_allocator_allocator__shim.cc =================================================================== --- head/www/chromium/files/patch-base_allocator_allocator__shim.cc (revision 502460) +++ head/www/chromium/files/patch-base_allocator_allocator__shim.cc (revision 502461) @@ -1,11 +1,11 @@ ---- base/allocator/allocator_shim.cc.orig 2019-03-11 22:00:51 UTC +--- base/allocator/allocator_shim.cc.orig 2019-04-30 22:22:27 UTC +++ base/allocator/allocator_shim.cc -@@ -70,7 +70,7 @@ inline const allocator::AllocatorDispatch* GetChainHea +@@ -69,7 +69,7 @@ inline const base::allocator::AllocatorDispatch* GetCh // Unfortunately due to that bug NoBarrier_Load() is mistakenly fully // barriered on Linux+Clang, and that causes visible perf regressons. - return reinterpret_cast( + return reinterpret_cast( -#if defined(OS_LINUX) && defined(__clang__) +#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(__clang__) - *static_cast(&g_chain_head) + *static_cast(&g_chain_head) #else - subtle::NoBarrier_Load(&g_chain_head) + base::subtle::NoBarrier_Load(&g_chain_head) Index: head/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h =================================================================== --- head/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h (revision 502460) +++ head/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h (revision 502461) @@ -1,38 +1,38 @@ ---- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2019-03-11 22:00:51 UTC +--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2019-04-30 22:22:27 UTC +++ base/allocator/partition_allocator/page_allocator_internals_posix.h @@ -14,7 +14,7 @@ #if defined(OS_MACOSX) #include #endif -#if defined(OS_LINUX) +#if defined(OS_BSD) || defined(OS_LINUX) #include #include @@ -48,7 +48,7 @@ int GetAccessFlags(PageAccessibilityConfiguration acce } } -#if defined(OS_LINUX) && defined(ARCH_CPU_64_BITS) +#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS) // Multiple guarded memory regions may exceed the process address space limit. // This function will raise or lower the limit by |amount|. @@ -68,7 +68,7 @@ bool AdjustAddressSpaceLimit(int64_t amount) { // schemes that reduce that to 4 GiB. constexpr size_t kMinimumGuardedMemorySize = 1ULL << 32; // 4 GiB -#endif // defined(OS_LINUX) && defined(ARCH_CPU_64_BITS) +#endif // (defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS) void* SystemAllocPagesInternal(void* hint, size_t length, -@@ -134,7 +134,7 @@ void SetSystemPagesAccessInternal( +@@ -144,7 +144,7 @@ void SetSystemPagesAccessInternal( void FreePagesInternal(void* address, size_t length) { CHECK(!munmap(address, length)); -#if defined(OS_LINUX) && defined(ARCH_CPU_64_BITS) +#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS) // Restore the address space limit. if (length >= kMinimumGuardedMemorySize) { CHECK(AdjustAddressSpaceLimit(-base::checked_cast(length))); Index: head/www/chromium/files/patch-base_debug_elf__reader.cc =================================================================== --- head/www/chromium/files/patch-base_debug_elf__reader.cc (nonexistent) +++ head/www/chromium/files/patch-base_debug_elf__reader.cc (revision 502461) @@ -0,0 +1,18 @@ +--- base/debug/elf_reader.cc.orig 2019-04-30 22:22:28 UTC ++++ base/debug/elf_reader.cc +@@ -82,6 +82,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, + reinterpret_cast(elf_base + header.p_offset); + bool found = false; + while (current_note < section_end) { ++#if !defined(OS_BSD) + if (current_note->n_type == NT_GNU_BUILD_ID) { + const char* note_name = + reinterpret_cast(current_note) + sizeof(Nhdr); +@@ -91,6 +92,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, + break; + } + } ++#endif + + current_note = reinterpret_cast( + reinterpret_cast(current_note) + sizeof(Nhdr) + Property changes on: head/www/chromium/files/patch-base_debug_elf__reader.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_files_file__path__unittest.cc =================================================================== --- head/www/chromium/files/patch-base_files_file__path__unittest.cc (revision 502460) +++ head/www/chromium/files/patch-base_files_file__path__unittest.cc (revision 502461) @@ -1,11 +1,11 @@ ---- base/files/file_path_unittest.cc.orig 2019-03-11 22:00:51 UTC +--- base/files/file_path_unittest.cc.orig 2019-04-30 22:22:28 UTC +++ base/files/file_path_unittest.cc -@@ -1138,7 +1138,7 @@ TEST_F(FilePathTest, FromUTF8Unsafe_And_AsUTF8Unsafe) +@@ -1139,7 +1139,7 @@ TEST_F(FilePathTest, FromUTF8Unsafe_And_AsUTF8Unsafe) "\xEF\xBC\xA1\xEF\xBC\xA2\xEF\xBC\xA3.txt" }, }; -#if !defined(SYSTEM_NATIVE_UTF8) && defined(OS_LINUX) +#if !defined(SYSTEM_NATIVE_UTF8) && (defined(OS_LINUX) || defined(OS_BSD)) ScopedLocale locale("en_US.UTF-8"); #endif Index: head/www/chromium/files/patch-base_files_file__util.h =================================================================== --- head/www/chromium/files/patch-base_files_file__util.h (revision 502460) +++ head/www/chromium/files/patch-base_files_file__util.h (revision 502461) @@ -1,11 +1,11 @@ ---- base/files/file_util.h.orig 2019-03-11 22:00:51 UTC +--- base/files/file_util.h.orig 2019-04-30 22:22:28 UTC +++ base/files/file_util.h -@@ -445,7 +445,7 @@ BASE_EXPORT bool VerifyPathControlledByAdmin(const bas +@@ -449,7 +449,7 @@ BASE_EXPORT bool VerifyPathControlledByAdmin(const bas // the directory |path|, in the number of FilePath::CharType, or -1 on failure. BASE_EXPORT int GetMaximumPathComponentLength(const base::FilePath& path); -#if defined(OS_LINUX) || defined(OS_AIX) +#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) // Broad categories of file systems as returned by statfs() on Linux. enum FileSystemType { FILE_SYSTEM_UNKNOWN, // statfs failed. Index: head/www/chromium/files/patch-base_logging__unittest.cc =================================================================== --- head/www/chromium/files/patch-base_logging__unittest.cc (revision 502460) +++ head/www/chromium/files/patch-base_logging__unittest.cc (revision 502461) @@ -1,11 +1,11 @@ ---- base/logging_unittest.cc.orig 2019-03-11 22:00:51 UTC +--- base/logging_unittest.cc.orig 2019-04-30 22:22:28 UTC +++ base/logging_unittest.cc -@@ -420,7 +420,7 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo +@@ -421,7 +421,7 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo // need the arch-specific boilerplate below, which is inspired by breakpad. // At the same time, on OSX, ucontext.h is deprecated but si_addr works fine. uintptr_t crash_addr = 0; -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_BSD) crash_addr = reinterpret_cast(info->si_addr); #else // OS_POSIX && !OS_MACOSX ucontext_t* context = reinterpret_cast(context_ptr); Index: head/www/chromium/files/patch-base_memory_protected__memory__posix.cc =================================================================== --- head/www/chromium/files/patch-base_memory_protected__memory__posix.cc (nonexistent) +++ head/www/chromium/files/patch-base_memory_protected__memory__posix.cc (revision 502461) @@ -0,0 +1,31 @@ +--- base/memory/protected_memory_posix.cc.orig 2019-05-01 17:25:41 UTC ++++ base/memory/protected_memory_posix.cc +@@ -8,9 +8,9 @@ + #include + #include + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #include +-#endif // defined(OS_LINUX) ++#endif // defined(OS_LINUX) || defined(OS_BSD) + + #if defined(OS_MACOSX) && !defined(OS_IOS) + #include +@@ -44,7 +44,7 @@ bool AutoWritableMemory::SetMemoryReadOnly(void* start + return SetMemory(start, end, PROT_READ); + } + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + void AssertMemoryIsReadOnly(const void* ptr) { + #if DCHECK_IS_ON() + const uintptr_t page_mask = ~(base::GetPageSize() - 1); +@@ -74,6 +74,6 @@ void AssertMemoryIsReadOnly(const void* ptr) { + DCHECK_EQ(region_info.protection, VM_PROT_READ); + #endif // DCHECK_IS_ON() + } +-#endif // defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS)) ++#endif // defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_BSD) + + } // namespace base Property changes on: head/www/chromium/files/patch-base_memory_protected__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_process_launch.h =================================================================== --- head/www/chromium/files/patch-base_process_launch.h (revision 502460) +++ head/www/chromium/files/patch-base_process_launch.h (revision 502461) @@ -1,20 +1,20 @@ ---- base/process/launch.h.orig 2019-03-11 22:00:51 UTC +--- base/process/launch.h.orig 2019-04-30 22:22:28 UTC +++ base/process/launch.h -@@ -175,7 +175,7 @@ struct BASE_EXPORT LaunchOptions { +@@ -179,7 +179,7 @@ struct BASE_EXPORT LaunchOptions { FileHandleMappingVector fds_to_remap; #endif // defined(OS_WIN) -#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 -@@ -188,7 +188,7 @@ struct BASE_EXPORT LaunchOptions { +@@ -192,7 +192,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_FUCHSIA) - // If valid, launches the application in that job object. + #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_process_process__metrics.cc =================================================================== --- head/www/chromium/files/patch-base_process_process__metrics.cc (revision 502460) +++ head/www/chromium/files/patch-base_process_process__metrics.cc (revision 502461) @@ -1,20 +1,20 @@ ---- base/process/process_metrics.cc.orig 2019-03-21 01:36:27.000000000 +0100 -+++ base/process/process_metrics.cc 2019-03-24 19:52:47.516944000 +0100 -@@ -126,7 +126,7 @@ +--- base/process/process_metrics.cc.orig 2019-04-30 22:22:28 UTC ++++ base/process/process_metrics.cc +@@ -126,7 +126,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage( } #endif -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) int ProcessMetrics::CalculateIdleWakeupsPerSecond( uint64_t absolute_idle_wakeups) { return CalculateEventsPerSecond(absolute_idle_wakeups, -@@ -138,7 +138,7 @@ +@@ -138,7 +138,7 @@ int ProcessMetrics::GetIdleWakeupsPerSecond() { NOTIMPLEMENTED(); // http://crbug.com/120488 return 0; } -#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) +#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) #if defined(OS_MACOSX) int ProcessMetrics::CalculatePackageIdleWakeupsPerSecond( Index: head/www/chromium/files/patch-base_process_process__metrics.h =================================================================== --- head/www/chromium/files/patch-base_process_process__metrics.h (revision 502460) +++ head/www/chromium/files/patch-base_process_process__metrics.h (revision 502461) @@ -1,112 +1,121 @@ ---- base/process/process_metrics.h.orig 2019-03-21 01:36:27.000000000 +0100 -+++ base/process/process_metrics.h 2019-03-24 19:51:50.158637000 +0100 -@@ -41,7 +41,7 @@ +--- base/process/process_metrics.h.orig 2019-04-30 22:22:28 UTC ++++ base/process/process_metrics.h +@@ -41,7 +41,7 @@ namespace base { // Full declaration is in process_metrics_iocounters.h. struct IoCounters; -#if defined(OS_LINUX) || defined(OS_ANDROID) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) // Minor and major page fault counts since the process creation. // Both counts are process-wide, and exclude child processes. // -@@ -51,7 +51,7 @@ +@@ -51,7 +51,7 @@ struct PageFaultCounts { int64_t minor; int64_t major; }; -#endif // defined(OS_LINUX) || defined(OS_ANDROID) +#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) // Convert a POSIX timeval to microseconds. BASE_EXPORT int64_t TimeValToMicroseconds(const struct timeval& tv); -@@ -92,7 +92,7 @@ +@@ -92,7 +92,7 @@ class BASE_EXPORT ProcessMetrics { // convenience wrapper for CreateProcessMetrics(). static std::unique_ptr CreateCurrentProcessMetrics(); -#if defined(OS_LINUX) || defined(OS_ANDROID) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) // Resident Set Size is a Linux/Android specific memory concept. Do not // attempt to extend this to other platforms. BASE_EXPORT size_t GetResidentSetSize() const; -@@ -199,14 +199,14 @@ +@@ -199,14 +199,14 @@ class BASE_EXPORT ProcessMetrics { int GetOpenFdSoftLimit() const; #endif // defined(OS_POSIX) -#if defined(OS_LINUX) || defined(OS_ANDROID) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) // Bytes of swap as reported by /proc/[pid]/status. uint64_t GetVmSwapBytes() const; // Minor and major page fault count as reported by /proc/[pid]/stat. // Returns true for success. bool GetPageFaultCounts(PageFaultCounts* counts) const; -#endif // defined(OS_LINUX) || defined(OS_ANDROID) +#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) // Returns total memory usage of malloc. size_t GetMallocUsage(); -@@ -218,7 +218,7 @@ +@@ -218,7 +218,7 @@ class BASE_EXPORT ProcessMetrics { ProcessMetrics(ProcessHandle process, PortProvider* port_provider); #endif // !defined(OS_MACOSX) || defined(OS_IOS) -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups); #endif #if defined(OS_MACOSX) -@@ -247,7 +247,7 @@ +@@ -247,7 +247,7 @@ class BASE_EXPORT ProcessMetrics { // Number of bytes transferred to/from disk in bytes. uint64_t last_cumulative_disk_usage_ = 0; -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) // Same thing for idle wakeups. TimeTicks last_idle_wakeups_time_; uint64_t last_absolute_idle_wakeups_; -@@ -293,7 +293,7 @@ +@@ -293,7 +293,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de #endif // defined(OS_POSIX) #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ - defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) + defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) || defined(OS_BSD) // Data about system-wide memory consumption. Values are in KB. Available on // Windows, Mac, Linux, Android and Chrome OS. // -@@ -326,7 +326,7 @@ +@@ -326,7 +326,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { int avail_phys = 0; #endif -#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD) // This provides an estimate of available memory as described here: // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773 // NOTE: this is ONLY valid in kernels 3.14 and up. Its value will always -@@ -341,7 +341,7 @@ +@@ -341,7 +341,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { #endif #if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) || \ - defined(OS_FUCHSIA) + defined(OS_FUCHSIA) || defined(OS_BSD) int buffers = 0; int cached = 0; int active_anon = 0; -@@ -351,7 +351,7 @@ +@@ -351,7 +351,7 @@ struct BASE_EXPORT SystemMemoryInfoKB { int dirty = 0; int reclaimable = 0; #endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) || - // defined(OS_FUCHSIA) + // defined(OS_FUCHSIA) || defined(OS_BSD) #if defined(OS_CHROMEOS) int shmem = 0; -@@ -377,9 +377,9 @@ +@@ -377,9 +377,9 @@ struct BASE_EXPORT SystemMemoryInfoKB { BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo); #endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || - // defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) + // defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA) || defined(OS_BSD) -#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD) // Parse the data found in /proc//stat and return the sum of the // CPU-related ticks. Returns -1 on parse error. // Exposed for testing. +@@ -452,7 +452,7 @@ BASE_EXPORT bool GetSystemDiskInfo(SystemDiskInfo* dis + // Returns the amount of time spent in user space since boot across all CPUs. + BASE_EXPORT TimeDelta GetUserCpuTimeSinceBoot(); + +-#endif // defined(OS_LINUX) || defined(OS_ANDROID) ++#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD) + + #if defined(OS_CHROMEOS) + // Data from files in directory /sys/block/zram0 about ZRAM usage. Index: head/www/chromium/files/patch-base_process_process__metrics__freebsd.cc =================================================================== --- head/www/chromium/files/patch-base_process_process__metrics__freebsd.cc (revision 502460) +++ head/www/chromium/files/patch-base_process_process__metrics__freebsd.cc (revision 502461) @@ -1,122 +1,122 @@ ---- base/process/process_metrics_freebsd.cc.orig 2019-03-21 01:36:27.000000000 +0100 -+++ base/process/process_metrics_freebsd.cc 2019-03-24 22:18:22.764297000 +0100 +--- base/process/process_metrics_freebsd.cc.orig 2019-04-30 22:22:28 UTC ++++ base/process/process_metrics_freebsd.cc @@ -5,6 +5,7 @@ #include "base/process/process_metrics.h" #include +#include #include #include #include @@ -14,11 +15,15 @@ #include "base/process/process_metrics_iocounters.h" #include "base/stl_util.h" +#include /* getpagesize() */ +#include /* O_RDONLY */ +#include +#include + namespace base { ProcessMetrics::ProcessMetrics(ProcessHandle process) - : process_(process), - last_cpu_(0) {} + : process_(process) {} // static std::unique_ptr ProcessMetrics::CreateProcessMetrics( -@@ -69,4 +74,93 @@ +@@ -69,4 +74,93 @@ size_t GetSystemCommitCharge() { return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize); } +int GetNumberOfThreads(ProcessHandle process) { + // Taken from FreeBSD top (usr.bin/top/machine.c) + + kvm_t* kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "kvm_open"); + if (kd == NULL) + return 0; + + struct kinfo_proc* pbase; + int nproc; + pbase = kvm_getprocs(kd, KERN_PROC_PID, process, &nproc); + if (pbase == NULL) + return 0; + + if (kvm_close(kd) == -1) + return 0; + + return nproc; +} + +bool GetSystemMemoryInfo(SystemMemoryInfoKB *meminfo) { + unsigned int mem_total, mem_free, swap_total, swap_used; + size_t length; + int pagesizeKB; + + pagesizeKB = getpagesize() / 1024; + + length = sizeof(mem_total); + if (sysctlbyname("vm.stats.vm.v_page_count", &mem_total, + &length, NULL, 0) != 0 || length != sizeof(mem_total)) + return false; + + length = sizeof(mem_free); + if (sysctlbyname("vm.stats.vm.v_free_count", &mem_free, &length, NULL, 0) + != 0 || length != sizeof(mem_free)) + return false; + + length = sizeof(swap_total); + if (sysctlbyname("vm.swap_size", &swap_total, &length, NULL, 0) + != 0 || length != sizeof(swap_total)) + return false; + + length = sizeof(swap_used); + if (sysctlbyname("vm.swap_anon_use", &swap_used, &length, NULL, 0) + != 0 || length != sizeof(swap_used)) + return false; + + meminfo->total = mem_total * pagesizeKB; + meminfo->free = mem_free * pagesizeKB; + meminfo->swap_total = swap_total * pagesizeKB; + meminfo->swap_free = (swap_total - swap_used) * pagesizeKB; + + return true; +} + +int ProcessMetrics::GetOpenFdCount() const { + struct kinfo_file * kif; + int cnt; + + if ((kif = kinfo_getfile(process_, &cnt)) == NULL) + return -1; + + free(kif); + + return cnt; +} + +int ProcessMetrics::GetOpenFdSoftLimit() const { + size_t length; + int total_count = 0; + int mib[] = { CTL_KERN, KERN_MAXFILESPERPROC }; + + length = sizeof(total_count); + + if (sysctl(mib, base::size(mib), &total_count, &length, NULL, 0) < 0) { + total_count = -1; + } + + return total_count; +} + +uint64_t ProcessMetrics::GetVmSwapBytes() const { + NOTIMPLEMENTED(); + return 0; +} + +int ProcessMetrics::GetIdleWakeupsPerSecond() { + NOTIMPLEMENTED(); + return 0; +} } // namespace base Index: head/www/chromium/files/patch-base_security__unittest.cc =================================================================== --- head/www/chromium/files/patch-base_security__unittest.cc (revision 502460) +++ head/www/chromium/files/patch-base_security__unittest.cc (revision 502461) @@ -1,11 +1,11 @@ ---- base/security_unittest.cc.orig 2019-03-11 22:00:51 UTC +--- base/security_unittest.cc.orig 2019-04-30 22:22:28 UTC +++ base/security_unittest.cc -@@ -59,7 +59,7 @@ NOINLINE Type HideValueFromCompiler(volatile Type valu +@@ -60,7 +60,7 @@ NOINLINE Type HideValueFromCompiler(volatile Type valu // FAILS_ is too clunky. void OverflowTestsSoftExpectTrue(bool overflow_detected) { if (!overflow_detected) { -#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_MACOSX) +#if defined(OS_POSIX) && !defined(OS_NACL) // Sadly, on Linux, Android, and OSX we don't have a good story yet. Don't // fail the test, but report. printf("Platform has overflow: %s\n", Index: head/www/chromium/files/patch-base_syslog__logging.cc =================================================================== --- head/www/chromium/files/patch-base_syslog__logging.cc (nonexistent) +++ head/www/chromium/files/patch-base_syslog__logging.cc (revision 502461) @@ -0,0 +1,20 @@ +--- base/syslog_logging.cc.orig 2019-05-01 17:21:47 UTC ++++ base/syslog_logging.cc +@@ -9,7 +9,7 @@ + #include "base/bind.h" + #include "base/callback_helpers.h" + #include "base/debug/stack_trace.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + // defines LOG_INFO, LOG_WARNING macros that could conflict with + // base::LOG_INFO, base::LOG_WARNING. + #include +@@ -94,7 +94,7 @@ EventLogMessage::~EventLogMessage() { + 1, 0, strings, nullptr)) { + stream() << " !!NOT ADDED TO EVENTLOG!!"; + } +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + const char kEventSource[] = "chrome"; + openlog(kEventSource, LOG_NOWAIT | LOG_PID, LOG_USER); + // We can't use the defined names for the logging severity from syslog.h Property changes on: head/www/chromium/files/patch-base_syslog__logging.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_system_sys__info__posix.cc =================================================================== --- head/www/chromium/files/patch-base_system_sys__info__posix.cc (revision 502460) +++ head/www/chromium/files/patch-base_system_sys__info__posix.cc (revision 502461) @@ -1,38 +1,38 @@ ---- base/system/sys_info_posix.cc.orig 2019-03-11 22:00:51 UTC +--- base/system/sys_info_posix.cc.orig 2019-04-30 22:22:28 UTC +++ base/system/sys_info_posix.cc @@ -38,7 +38,7 @@ namespace { -#if !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) +#if !defined(OS_BSD) && !defined(OS_FUCHSIA) int NumberOfProcessors() { // sysconf returns the number of "logical" (not "physical") processors on both // Mac and Linux. So we get the number of max available "logical" processors. @@ -64,7 +64,7 @@ int NumberOfProcessors() { base::LazyInstance>:: Leaky g_lazy_number_of_processors = LAZY_INSTANCE_INITIALIZER; -#endif // !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) +#endif // !defined(OS_BSD) && !defined(OS_FUCHSIA) #if !defined(OS_FUCHSIA) int64_t AmountOfVirtualMemory() { @@ -132,7 +132,7 @@ bool GetDiskSpaceInfo(const base::FilePath& path, namespace base { -#if !defined(OS_OPENBSD) && !defined(OS_FUCHSIA) +#if !defined(OS_BSD) && !defined(OS_FUCHSIA) int SysInfo::NumberOfProcessors() { return g_lazy_number_of_processors.Get().value(); } -@@ -225,6 +225,8 @@ std::string SysInfo::OperatingSystemArchitecture() { +@@ -227,6 +227,8 @@ std::string SysInfo::OperatingSystemArchitecture() { arch = "x86"; } else if (arch == "amd64") { arch = "x86_64"; + } else if (arch == "arm64") { + arch = "aarch64"; } else if (std::string(info.sysname) == "AIX") { arch = "ppc64"; } Index: head/www/chromium/files/patch-base_test_fontconfig__util__linux.cc =================================================================== --- head/www/chromium/files/patch-base_test_fontconfig__util__linux.cc (nonexistent) +++ head/www/chromium/files/patch-base_test_fontconfig__util__linux.cc (revision 502461) @@ -0,0 +1,408 @@ +--- base/test/fontconfig_util_linux.cc.orig 2019-04-30 22:22:28 UTC ++++ base/test/fontconfig_util_linux.cc +@@ -6,24 +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 Property changes on: head/www/chromium/files/patch-base_test_fontconfig__util__linux.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_generate__fontconfig__caches.cc =================================================================== --- head/www/chromium/files/patch-base_test_generate__fontconfig__caches.cc (revision 502460) +++ head/www/chromium/files/patch-base_test_generate__fontconfig__caches.cc (revision 502461) @@ -1,17 +1,25 @@ ---- base/test/generate_fontconfig_caches.cc.orig 2019-03-11 22:00:51 UTC +--- base/test/generate_fontconfig_caches.cc.orig 2019-04-30 22:22:28 UTC +++ base/test/generate_fontconfig_caches.cc -@@ -57,7 +57,14 @@ int main() { - base::TearDownFontconfig(); +@@ -52,14 +52,21 @@ int main() { + + // Delete directory before generating fontconfig caches. This will notify + // future fontconfig_caches changes. +- CHECK(base::DeleteFile(fontconfig_caches, /*recursive=*/true)); + ++ CHECK(base::DeleteFile(fontconfig_caches, /*recursive=*/true)); + base::SetUpFontconfig(); + FcInit(); + FcFini(); // Check existence of intended fontconfig cache file. +#if defined(OS_BSD) + // Our version of fontconfig is too old to respect .uuid files in font directories, + // so we check for the CACHEDIR.TAG file instead CHECK(base::PathExists( + fontconfig_caches.Append("CACHEDIR.TAG"))); +#else + CHECK(base::PathExists( fontconfig_caches.Append(base::StrCat({uuid, "-le64.cache-7"})))); +#endif return 0; } Index: head/www/chromium/files/patch-base_threading_thread__task__runner__handle.cc =================================================================== --- head/www/chromium/files/patch-base_threading_thread__task__runner__handle.cc (revision 502460) +++ head/www/chromium/files/patch-base_threading_thread__task__runner__handle.cc (revision 502461) @@ -1,26 +1,26 @@ ---- base/threading/thread_task_runner_handle.cc.orig 2019-03-11 22:00:51 UTC +--- base/threading/thread_task_runner_handle.cc.orig 2019-04-30 22:22:28 UTC +++ base/threading/thread_task_runner_handle.cc -@@ -7,6 +7,7 @@ +@@ -8,6 +8,7 @@ #include #include "base/bind.h" +#include "base/callback_helpers.h" #include "base/lazy_instance.h" #include "base/logging.h" - #include "base/memory/ptr_util.h" + #include "base/run_loop.h" @@ -37,6 +38,7 @@ bool ThreadTaskRunnerHandle::IsSet() { return !!thread_task_runner_tls.Pointer()->Get(); } +#if defined(OS_BSD) // static ScopedClosureRunner ThreadTaskRunnerHandle::OverrideForTesting( scoped_refptr overriding_task_runner) { -@@ -86,6 +88,7 @@ ScopedClosureRunner ThreadTaskRunnerHandle::OverrideFo +@@ -81,6 +83,7 @@ ScopedClosureRunner ThreadTaskRunnerHandle::OverrideFo base::Unretained(ttrh->task_runner_.get()), std::move(no_running_during_override))); } +#endif ThreadTaskRunnerHandle::ThreadTaskRunnerHandle( scoped_refptr task_runner) Index: head/www/chromium/files/patch-base_trace__event_malloc__dump__provider.cc =================================================================== --- head/www/chromium/files/patch-base_trace__event_malloc__dump__provider.cc (revision 502460) +++ head/www/chromium/files/patch-base_trace__event_malloc__dump__provider.cc (revision 502461) @@ -1,21 +1,21 @@ ---- base/trace_event/malloc_dump_provider.cc.orig 2019-03-11 22:00:51 UTC +--- base/trace_event/malloc_dump_provider.cc.orig 2019-04-30 22:22:28 UTC +++ base/trace_event/malloc_dump_provider.cc @@ -17,6 +17,8 @@ #if defined(OS_MACOSX) #include +#elif defined(OS_BSD) -+#include "stdlib.h" ++#include #else #include #endif @@ -132,6 +134,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump } #elif defined(OS_FUCHSIA) // TODO(fuchsia): Port, see https://crbug.com/706592. +#elif defined(OS_BSD) + total_virtual_size = 0; + allocated_objects_size = 0; #else struct mallinfo info = mallinfo(); DCHECK_GE(info.arena + info.hblkhd, info.uordblks); Index: head/www/chromium/files/patch-build_config_BUILD.gn =================================================================== --- head/www/chromium/files/patch-build_config_BUILD.gn (revision 502460) +++ head/www/chromium/files/patch-build_config_BUILD.gn (revision 502461) @@ -1,30 +1,30 @@ ---- build/config/BUILD.gn.orig 2019-03-11 22:00:52 UTC +--- build/config/BUILD.gn.orig 2019-04-30 22:22:28 UTC +++ build/config/BUILD.gn @@ -162,7 +162,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? @@ -263,9 +263,7 @@ config("default_libs") { ] } else if (is_linux) { libs = [ - "dl", "pthread", - "rt", ] } } -@@ -342,7 +340,7 @@ config("executable_config") { +@@ -346,7 +344,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_allocator.gni =================================================================== --- head/www/chromium/files/patch-build_config_allocator.gni (revision 502460) +++ head/www/chromium/files/patch-build_config_allocator.gni (revision 502461) @@ -1,20 +1,20 @@ ---- build/config/allocator.gni.orig 2019-03-11 22:00:52 UTC +--- build/config/allocator.gni.orig 2019-04-30 22:22:28 UTC +++ build/config/allocator.gni @@ -6,7 +6,7 @@ import("//build/config/sanitizers/sanitizers.gni") # Temporarily disable tcmalloc on arm64 linux to get rid of compilation errors. if (is_android || is_mac || is_ios || is_asan || is_lsan || is_tsan || - is_msan || is_win || is_fuchsia || (is_linux && target_cpu == "arm64")) { + is_msan || is_win || is_fuchsia || (is_linux && target_cpu == "arm64") || is_bsd) { _default_allocator = "none" } else { _default_allocator = "tcmalloc" @@ -17,7 +17,7 @@ if (is_android || is_mac || is_ios || is_asan || is_ls # against the debug CRT with "is_nacl=false". if ((is_linux || is_android || is_mac || - (is_win && !is_component_build && !is_debug)) && !is_asan && !is_lsan && -- !is_tsan && !is_msan) { -+ !is_tsan && !is_msan && !is_bsd) { + (is_win && !is_component_build && !is_debug)) && !is_asan && !is_hwasan && +- !is_lsan && !is_tsan && !is_msan) { ++ !is_lsan && !is_tsan && !is_msan && !is_bsd) { _default_use_allocator_shim = true } else { _default_use_allocator_shim = false Index: head/www/chromium/files/patch-build_config_compiler_BUILD.gn =================================================================== --- head/www/chromium/files/patch-build_config_compiler_BUILD.gn (revision 502460) +++ head/www/chromium/files/patch-build_config_compiler_BUILD.gn (revision 502461) @@ -1,83 +1,83 @@ ---- build/config/compiler/BUILD.gn.orig 2019-03-11 22:00:52 UTC +--- build/config/compiler/BUILD.gn.orig 2019-04-30 22:22:28 UTC +++ build/config/compiler/BUILD.gn -@@ -53,7 +53,7 @@ declare_args() { +@@ -54,7 +54,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) -@@ -275,7 +275,7 @@ config("compiler") { +@@ -279,7 +279,7 @@ config("compiler") { # Linker warnings. if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") && !(is_android && use_order_profiling) && !is_mac && !is_ios && - current_os != "aix") { + current_os != "aix" && !is_bsd) { # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 # crbug.com/485542 -@@ -394,7 +394,7 @@ config("compiler") { +@@ -381,7 +381,7 @@ config("compiler") { # Compiler instrumentation can introduce dependencies in DSOs to symbols in # the executable they are loaded into, so they are unresolved at link-time. - if (!using_sanitizer) { + if (!using_sanitizer && !is_bsd) { ldflags += [ "-Wl,-z,defs", "-Wl,--as-needed", -@@ -502,7 +502,7 @@ config("compiler") { +@@ -489,7 +489,7 @@ config("compiler") { } } - if (is_clang && !is_nacl && !use_xcode_clang) { + if (is_clang && !is_nacl && !use_xcode_clang && !is_bsd) { cflags += [ # TODO(hans): Remove this once Clang generates better optimized debug info # by default. https://crbug.com/765793 -@@ -809,7 +809,7 @@ config("compiler_cpu_abi") { +@@ -757,7 +757,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" ] } -@@ -1494,7 +1494,7 @@ config("default_warnings") { +@@ -1507,7 +1507,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 += [ -@@ -1694,7 +1694,7 @@ config("thin_archive") { +@@ -1707,7 +1707,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" ] -@@ -2278,7 +2278,7 @@ config("symbols") { +@@ -2291,7 +2291,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) { -@@ -2299,7 +2299,7 @@ config("symbols") { +@@ -2312,7 +2312,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 502460) +++ head/www/chromium/files/patch-build_config_compiler_compiler.gni (revision 502461) @@ -1,11 +1,11 @@ ---- build/config/compiler/compiler.gni.orig 2019-03-11 22:00:52 UTC +--- build/config/compiler/compiler.gni.orig 2019-04-30 22:22:28 UTC +++ build/config/compiler/compiler.gni -@@ -179,7 +179,7 @@ declare_args() { +@@ -181,7 +181,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_detect__host__arch.py =================================================================== --- head/www/chromium/files/patch-build_detect__host__arch.py (revision 502460) +++ head/www/chromium/files/patch-build_detect__host__arch.py (revision 502461) @@ -1,11 +1,11 @@ ---- build/detect_host_arch.py.orig 2019-04-04 10:22:51.354518000 +0200 -+++ build/detect_host_arch.py 2019-04-04 10:23:07.641855000 +0200 +--- build/detect_host_arch.py.orig 2019-04-30 22:22:28 UTC ++++ build/detect_host_arch.py @@ -19,6 +19,8 @@ def HostArch(): host_arch = 'ia32' elif host_arch in ['x86_64', 'amd64']: host_arch = 'x64' + elif host_arch.startswith('arm64'): + host_arch = 'arm64' elif host_arch.startswith('arm'): host_arch = 'arm' elif host_arch.startswith('aarch64'): Index: head/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni =================================================================== --- head/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni (revision 502460) +++ head/www/chromium/files/patch-build_toolchain_gcc__toolchain.gni (revision 502461) @@ -1,45 +1,45 @@ ---- build/toolchain/gcc_toolchain.gni.orig 2019-03-11 22:00:52 UTC +--- build/toolchain/gcc_toolchain.gni.orig 2019-04-30 22:22:28 UTC +++ build/toolchain/gcc_toolchain.gni -@@ -47,6 +47,11 @@ analyzer_wrapper = +@@ -44,6 +44,11 @@ analyzer_wrapper = rebase_path("//build/toolchain/clang_static_analyzer_wrapper.py", root_build_dir) + " --mode=clang" +declare_args() { + extra_cxxflags = "" + extra_ldflags = "" +} + # This template defines a toolchain for something that works like gcc # (including clang). # -@@ -610,13 +615,23 @@ template("clang_toolchain") { +@@ -636,13 +641,23 @@ template("clang_toolchain") { } gcc_toolchain(target_name) { - prefix = rebase_path("$clang_base_path/bin", root_build_dir) - cc = "$prefix/clang" - cxx = "$prefix/clang++" - ld = cxx - readelf = "${toolprefix}readelf" - ar = "${prefix}/llvm-ar" - nm = "${toolprefix}nm" + if (is_bsd) { + prefix = "/usr/local/bin" + cc = "cc" + cxx = "c++" + ld = cxx + readelf = "readelf" + ar = "${prefix}/ar" + nm = "${toolprefix}nm" + } else { + prefix = rebase_path("$clang_base_path/bin", root_build_dir) + cc = "$prefix/clang" + cxx = "$prefix/clang++" + ld = cxx + readelf = "${toolprefix}readelf" + ar = "${prefix}/llvm-ar" + nm = "${toolprefix}nm" + } forward_variables_from(invoker, [ Index: head/www/chromium/files/patch-build_toolchain_linux_BUILD.gn =================================================================== --- head/www/chromium/files/patch-build_toolchain_linux_BUILD.gn (revision 502460) +++ head/www/chromium/files/patch-build_toolchain_linux_BUILD.gn (revision 502461) @@ -1,10 +1,10 @@ ---- build/toolchain/linux/BUILD.gn.orig 2019-03-11 22:00:52 UTC +--- build/toolchain/linux/BUILD.gn.orig 2019-04-30 22:22:28 UTC +++ build/toolchain/linux/BUILD.gn -@@ -14,7 +14,6 @@ clang_toolchain("clang_arm") { +@@ -22,7 +22,6 @@ clang_toolchain("clang_arm") { } clang_toolchain("clang_arm64") { - toolprefix = "aarch64-linux-gnu-" toolchain_args = { current_cpu = "arm64" current_os = "linux" Index: head/www/chromium/files/patch-cc_BUILD.gn =================================================================== --- head/www/chromium/files/patch-cc_BUILD.gn (revision 502460) +++ head/www/chromium/files/patch-cc_BUILD.gn (revision 502461) @@ -1,21 +1,21 @@ ---- cc/BUILD.gn.orig 2019-03-11 22:00:52 UTC +--- cc/BUILD.gn.orig 2019-04-30 22:22:28 UTC +++ cc/BUILD.gn -@@ -548,7 +548,7 @@ cc_test_static_library("test_support") { - "//ui/gl:test_support", - "//ui/latency", - ] +@@ -554,7 +554,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", ] -@@ -746,9 +746,6 @@ cc_test("cc_unittests") { +@@ -753,9 +753,6 @@ cc_test("cc_unittests") { "//ui/gfx/geometry", "//ui/gl", "//ui/gl:test_support", - ] - data_deps = [ - "//third_party/mesa_headers", ] } Index: head/www/chromium/files/patch-cc_trees_property__tree.cc =================================================================== --- head/www/chromium/files/patch-cc_trees_property__tree.cc (revision 502460) +++ head/www/chromium/files/patch-cc_trees_property__tree.cc (revision 502461) @@ -1,20 +1,20 @@ ---- cc/trees/property_tree.cc.orig 2019-03-11 22:00:52 UTC +--- cc/trees/property_tree.cc.orig 2019-04-30 22:22:29 UTC +++ cc/trees/property_tree.cc -@@ -1325,13 +1325,13 @@ gfx::ScrollOffset ScrollTree::MaxScrollOffset(int scro +@@ -1329,13 +1329,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__main.cc =================================================================== --- head/www/chromium/files/patch-chrome_app_chrome__main.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_app_chrome__main.cc (revision 502461) @@ -1,16 +1,16 @@ ---- chrome/app/chrome_main.cc.orig 2019-03-11 22:00:52 UTC +--- chrome/app/chrome_main.cc.orig 2019-04-30 22:22:30 UTC +++ chrome/app/chrome_main.cc -@@ -93,11 +93,11 @@ int ChromeMain(int argc, const char** argv) { +@@ -94,11 +94,11 @@ int ChromeMain(int argc, const char** argv) { #endif // Chrome-specific process modes. -#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) if (command_line->HasSwitch(switches::kHeadless)) { return headless::HeadlessShellMain(params); } -#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) +#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) int rv = content::ContentMain(params); Index: head/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc =================================================================== --- head/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_app_chrome__main__delegate.cc (revision 502461) @@ -1,128 +1,128 @@ ---- chrome/app/chrome_main_delegate.cc.orig 2019-03-11 22:00:52 UTC +--- chrome/app/chrome_main_delegate.cc.orig 2019-04-30 22:22:30 UTC +++ chrome/app/chrome_main_delegate.cc @@ -101,7 +101,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 -@@ -135,7 +135,7 @@ +@@ -137,7 +137,7 @@ #include "v8/include/v8.h" #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #include "base/environment.h" #endif -@@ -232,7 +232,7 @@ bool UseHooks() { +@@ -238,7 +238,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; -@@ -291,7 +291,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty +@@ -297,7 +297,7 @@ 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. -@@ -336,7 +336,7 @@ bool HandleVersionSwitches(const base::CommandLine& co +@@ -342,7 +342,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) || -@@ -346,7 +346,7 @@ void HandleHelpSwitches(const base::CommandLine& comma +@@ -352,7 +352,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) { -@@ -400,7 +400,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -406,7 +406,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. -@@ -412,7 +412,7 @@ void InitializeUserDataDir(base::CommandLine* command_ +@@ -418,7 +418,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 -@@ -469,7 +469,7 @@ void InitLogging(const std::string& process_type) { +@@ -475,7 +475,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()); -@@ -596,7 +596,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi +@@ -613,7 +613,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 -@@ -620,7 +620,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi +@@ -637,7 +637,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 -@@ -936,7 +936,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -953,7 +953,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) -@@ -951,7 +951,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -968,7 +968,7 @@ void ChromeMainDelegate::PreSandboxStartup() { breakpad::InitCrashReporter(process_type); #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. -@@ -961,7 +961,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -978,7 +978,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 502460) +++ head/www/chromium/files/patch-chrome_app_chromium__strings.grd (revision 502461) @@ -1,20 +1,29 @@ ---- chrome/app/chromium_strings.grd.orig 2019-03-11 22:00:52 UTC +--- chrome/app/chromium_strings.grd.orig 2019-04-30 22:22:30 UTC +++ chrome/app/chromium_strings.grd -@@ -809,7 +809,7 @@ Signing in anyway will merge Chromium information like +@@ -690,7 +690,7 @@ Signing in anyway will merge Chromium information like + + + +- ++ + + Your system administrator has configured Chromium to open an alternative browser to access $1example.com. + +@@ -816,7 +816,7 @@ Signing in anyway will merge Chromium information like - + 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. -@@ -1057,7 +1057,7 @@ Please check your email at $2 +@@ -1064,7 +1064,7 @@ Please check your email at $2 - + 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 502460) +++ head/www/chromium/files/patch-chrome_app_generated__resources.grd (revision 502461) @@ -1,29 +1,29 @@ ---- chrome/app/generated_resources.grd.orig 2019-03-11 22:00:52 UTC +--- chrome/app/generated_resources.grd.orig 2019-04-30 22:22:30 UTC +++ chrome/app/generated_resources.grd -@@ -5339,7 +5339,7 @@ the Bookmarks menu."> - +@@ -4737,7 +4737,7 @@ Keep your key file in a safe place. You will need it t -- -+ - - Press |$1Ctrl|+|$2Shift| followed by |$3Q| to exit + +- ++ + + Legacy Browser Support -@@ -6160,7 +6160,7 @@ the Bookmarks menu."> +@@ -6228,7 +6228,7 @@ the Bookmarks menu."> Google Pay - + Use system title bar and borders -@@ -6946,7 +6946,7 @@ Please help our engineers fix this problem. Tell us wh +@@ -7012,7 +7012,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 502460) +++ head/www/chromium/files/patch-chrome_app_google__chrome__strings.grd (revision 502461) @@ -1,20 +1,29 @@ ---- chrome/app/google_chrome_strings.grd.orig 2019-03-11 22:00:52 UTC +--- chrome/app/google_chrome_strings.grd.orig 2019-04-30 22:22:30 UTC +++ chrome/app/google_chrome_strings.grd -@@ -820,7 +820,7 @@ Signing in anyway will merge Chrome information like b +@@ -701,7 +701,7 @@ Signing in anyway will merge Chrome information like b + + + +- ++ + + Your system administrator has configured Google Chrome to open an alternative browser to access $1example.com. + +@@ -827,7 +827,7 @@ Signing in anyway will merge Chrome information like b - + 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. -@@ -1075,7 +1075,7 @@ Please check your email at $2 +@@ -1082,7 +1082,7 @@ Please check your email at $2 - + 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 502460) +++ head/www/chromium/files/patch-chrome_app_settings__strings.grdp (revision 502461) @@ -1,20 +1,20 @@ ---- chrome/app/settings_strings.grdp.orig 2019-03-11 22:00:52 UTC +--- chrome/app/settings_strings.grdp.orig 2019-04-30 22:22:32 UTC +++ chrome/app/settings_strings.grdp -@@ -580,7 +580,7 @@ +@@ -628,7 +628,7 @@ Themes - + GTK+ -@@ -594,7 +594,7 @@ +@@ -642,7 +642,7 @@ Use Classic - + Reset to default Index: head/www/chromium/files/patch-chrome_app_shutdown__signal__handlers__posix.cc =================================================================== --- head/www/chromium/files/patch-chrome_app_shutdown__signal__handlers__posix.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_app_shutdown__signal__handlers__posix.cc (revision 502461) @@ -1,21 +1,21 @@ ---- chrome/app/shutdown_signal_handlers_posix.cc.orig 2019-03-11 22:00:52 UTC +--- chrome/app/shutdown_signal_handlers_posix.cc.orig 2019-04-30 22:22:32 UTC +++ chrome/app/shutdown_signal_handlers_posix.cc -@@ -183,12 +183,18 @@ void InstallShutdownSignalHandlers( +@@ -186,12 +186,18 @@ void InstallShutdownSignalHandlers( g_pipe_pid = getpid(); g_shutdown_pipe_read_fd = pipefd[0]; g_shutdown_pipe_write_fd = pipefd[1]; +#if defined(OS_BSD) + // PTHREAD_STACK_MIN causes chromium to crash under FreeBSD, + // we request the default pthread stack size by specifying 0 here. + const size_t kShutdownDetectorThreadStackSize = 0; +#else #if !defined(ADDRESS_SANITIZER) const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2; #else // ASan instrumentation bloats the stack frames, so we need to increase the // stack size to avoid hitting the guard page. const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4; +#endif #endif ShutdownDetector* detector = new ShutdownDetector( - g_shutdown_pipe_read_fd, shutdown_callback, task_runner); + g_shutdown_pipe_read_fd, std::move(shutdown_callback), task_runner); Index: head/www/chromium/files/patch-chrome_browser_about__flags.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_about__flags.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_about__flags.cc (revision 502461) @@ -1,120 +1,118 @@ ---- chrome/browser/about_flags.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/about_flags.cc.orig 2019-04-30 22:22:32 UTC +++ chrome/browser/about_flags.cc -@@ -749,7 +749,7 @@ const FeatureEntry::FeatureVariation kAutofillPreviewS - {"(Black on GoogleYellow050)", kAutofillPreviewStyleBlackOnYellow050, - base::size(kAutofillPreviewStyleBlackOnYellow050), nullptr}}; - --#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 kPedalSuggestionInSuggestion[] = { - {OmniboxFieldTrial::kPedalSuggestionModeParam, "in_suggestion"}}; - const FeatureEntry::FeatureParam kPedalSuggestionDedicated[] = { -@@ -760,7 +760,7 @@ const FeatureEntry::FeatureVariation kPedalSuggestionV - {"Dedicated Suggestion Line", kPedalSuggestionDedicated, - base::size(kPedalSuggestionDedicated), nullptr}, - }; --#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) -+#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) - - const FeatureEntry::Choice kAutoplayPolicyChoices[] = { - {flags_ui::kGenericExperimentChoiceDefault, "", ""}, -@@ -2362,12 +2362,12 @@ const FeatureEntry kFeatureEntries[] = { +@@ -1615,13 +1615,13 @@ const FeatureEntry kFeatureEntries[] = { + SINGLE_VALUE_TYPE( + spellcheck::switches::kEnableSpellingFeedbackFieldTrial)}, + #endif // ENABLE_SPELLCHECK +-#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, +@@ -2128,12 +2128,12 @@ const FeatureEntry kFeatureEntries[] = { {"force-text-direction", flag_descriptions::kForceTextDirectionName, flag_descriptions::kForceTextDirectionDescription, kOsAll, MULTI_VALUE_TYPE(kForceTextDirectionChoices)}, -#if defined(OS_WIN) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) {"enable-input-ime-api", flag_descriptions::kEnableInputImeApiName, flag_descriptions::kEnableInputImeApiDescription, kOsWin | kOsLinux, ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInputImeAPI, switches::kDisableInputImeAPI)}, -#endif // OS_WIN || OS_LINUX +#endif // OS_WIN || OS_LINUX || OS_BSD {"enable-origin-trials", flag_descriptions::kOriginTrialsName, flag_descriptions::kOriginTrialsDescription, kOsAll, FEATURE_VALUE_TYPE(features::kOriginTrials)}, -@@ -2562,12 +2562,12 @@ const FeatureEntry kFeatureEntries[] = { +@@ -2321,12 +2321,12 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(chrome::android::kAndroidNightMode)}, #endif // BUILDFLAG(ENABLE_ANDROID_NIGHT_MODE) #endif // OS_ANDROID -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) {"passwords-migrate-linux-to-login-db", flag_descriptions::kPasswordsMigrateLinuxToLoginDBName, flag_descriptions::kPasswordsMigrateLinuxToLoginDBDescription, kOsLinux, FEATURE_VALUE_TYPE(password_manager::features::kMigrateLinuxToLoginDB)}, -#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) +#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD) {"enable-experimental-accessibility-features", flag_descriptions::kExperimentalAccessibilityFeaturesName, flag_descriptions::kExperimentalAccessibilityFeaturesDescription, kOsCrOS, -@@ -3001,7 +3001,7 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(omnibox::kOmniboxNewAnswerLayout)}, - #endif // defined(OS_ANDROID) +@@ -2685,7 +2685,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kOmniboxRichEntitySuggestionsDescription, kOsAll, + FEATURE_VALUE_TYPE(omnibox::kOmniboxRichEntitySuggestions)}, -#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) - {"omnibox-reverse-answers", flag_descriptions::kOmniboxReverseAnswersName, - flag_descriptions::kOmniboxReverseAnswersDescription, kOsDesktop, - FEATURE_VALUE_TYPE(omnibox::kOmniboxReverseAnswers)}, -@@ -3026,7 +3026,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kOmniboxDriveSuggestionsName, - flag_descriptions::kOmniboxDriveSuggestionsDescriptions, kOsDesktop, - FEATURE_VALUE_TYPE(omnibox::kDocumentProvider)}, + {"omnibox-experimental-keyword-mode", + flag_descriptions::kOmniboxExperimentalKeywordModeName, + flag_descriptions::kOmniboxExperimentalKeywordModeDescription, kOsDesktop, +@@ -2716,7 +2716,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kOmniboxDeduplicateDriveUrlsName, + flag_descriptions::kOmniboxDeduplicateDriveUrlsDescription, kOsDesktop, + FEATURE_VALUE_TYPE(omnibox::kDedupeGoogleDriveURLs)}, -#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, -@@ -3342,7 +3342,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -3040,7 +3040,7 @@ 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, -@@ -3353,7 +3353,7 @@ const FeatureEntry kFeatureEntries[] = { - flag_descriptions::kShowManagedUiDescription, - kOsWin | kOsMac | kOsLinux | kOsCrOS, - FEATURE_VALUE_TYPE(features::kShowManagedUi)}, +@@ -3057,7 +3057,7 @@ const FeatureEntry kFeatureEntries[] = { + flag_descriptions::kLinkManagedNoticeToChromeUIManagementURLDescription, + kOsWin | kOsMac | kOsLinux, + FEATURE_VALUE_TYPE(features::kLinkManagedNoticeToChromeUIManagementURL)}, -#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) - {"third-party-doodles", flag_descriptions::kThirdPartyDoodlesName, -@@ -4280,7 +4280,7 @@ const FeatureEntry kFeatureEntries[] = { + #if !defined(OS_ANDROID) + {"doodles-on-local-ntp", flag_descriptions::kDoodlesOnLocalNtpName, +@@ -3940,7 +3940,7 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kForceEnableSystemAec)}, #endif // defined(OS_MACOSX) || defined(OS_CHROMEOS) -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) {"autofill-always-show-server-cards-in-sync-transport", flag_descriptions::kAutofillAlwaysShowServerCardsInSyncTransportName, flag_descriptions:: -@@ -4288,7 +4288,7 @@ const FeatureEntry kFeatureEntries[] = { +@@ -3948,7 +3948,7 @@ const FeatureEntry kFeatureEntries[] = { kOsMac | kOsWin | kOsLinux, FEATURE_VALUE_TYPE( autofill::features::kAutofillAlwaysShowServerCardsInSyncTransport)}, -#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_PRINT_PREVIEW) && defined(OS_MACOSX) {"enable-custom-mac-paper-sizes", -@@ -4333,13 +4333,13 @@ const FeatureEntry kFeatureEntries[] = { +@@ -3993,13 +3993,13 @@ const FeatureEntry kFeatureEntries[] = { FEATURE_VALUE_TYPE(features::kCrostiniAppSearch)}, #endif // OS_CHROMEOS -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) {"autofill-settings-split-by-card-type", flag_descriptions::kAutofillSettingsSplitByCardTypeName, flag_descriptions::kAutofillSettingsSplitByCardTypeDescription, kOsMac | kOsWin | kOsLinux, FEATURE_VALUE_TYPE(autofill::features::kAutofillSettingsCardTypeSplit)}, -#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) - #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) + #if !defined(OS_ANDROID) {"hardware-media-key-handling", Index: head/www/chromium/files/patch-chrome_browser_apps_platform__apps_api_music__manager__private_device__id__linux.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_apps_platform__apps_api_music__manager__private_device__id__linux.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_apps_platform__apps_api_music__manager__private_device__id__linux.cc (revision 502461) @@ -1,70 +1,70 @@ ---- chrome/browser/apps/platform_apps/api/music_manager_private/device_id_linux.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/apps/platform_apps/api/music_manager_private/device_id_linux.cc.orig 2019-04-30 22:22:32 UTC +++ chrome/browser/apps/platform_apps/api/music_manager_private/device_id_linux.cc @@ -4,6 +4,11 @@ #include "chrome/browser/apps/platform_apps/api/music_manager_private/device_id.h" +#if defined(OS_FREEBSD) +#include +#include +#endif + #include #include #include -@@ -105,9 +110,36 @@ class MacAddressProcessor { +@@ -106,9 +111,36 @@ class MacAddressProcessor { const char* const prefixes[], size_t prefixes_count) { const int MAC_LENGTH = 6; +#if defined(OS_FREEBSD) + struct ifaddrs *ifap, *ifinfo; +#else struct ifreq ifinfo; +#endif memset(&ifinfo, 0, sizeof(ifinfo)); + +#if defined(OS_FREEBSD) + int result = getifaddrs(&ifap); + + if (result != 0) + return true; + + result = 1; // no MAC found yet + + for (ifinfo = ifap; ifinfo != NULL; ifinfo = ifinfo->ifa_next) { + struct sockaddr* sa = ifinfo->ifa_addr; + if (sa->sa_family == AF_LINK && + !strncmp(ifinfo->ifa_name, ifaddr->ifa_name, + sizeof(ifinfo->ifa_name) - 1)) { + result = 0; + break; + } + } + + char mac_address[6]; + + strncpy(mac_address, (const char*)LLADDR((struct sockaddr_dl*)ifinfo->ifa_addr), sizeof(mac_address)); +#else strncpy(ifinfo.ifr_name, ifaddr->ifa_name, sizeof(ifinfo.ifr_name) - 1); int sd = socket(AF_INET, SOCK_DGRAM, 0); -@@ -119,11 +151,18 @@ class MacAddressProcessor { +@@ -120,11 +152,18 @@ class MacAddressProcessor { const char* mac_address = static_cast(ifinfo.ifr_hwaddr.sa_data); +#endif + if (!is_valid_mac_address_.Run(mac_address, MAC_LENGTH)) return true; +#if defined(OS_FREEBSD) + if (!IsValidPrefix(ifinfo->ifa_name, prefixes, prefixes_count)) + return true; +#else if (!IsValidPrefix(ifinfo.ifr_name, prefixes, prefixes_count)) return true; +#endif // Got one! found_mac_address_ = Index: head/www/chromium/files/patch-chrome_browser_browser__resources.grd =================================================================== --- head/www/chromium/files/patch-chrome_browser_browser__resources.grd (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_browser__resources.grd (revision 502461) @@ -1,11 +1,20 @@ ---- chrome/browser/browser_resources.grd.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/browser_resources.grd.orig 2019-04-30 22:22:32 UTC +++ chrome/browser/browser_resources.grd -@@ -679,7 +679,7 @@ +@@ -81,7 +81,7 @@ + + + +- ++ + + + +@@ -689,7 +689,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 502460) +++ head/www/chromium/files/patch-chrome_browser_chrome__browser__main.cc (revision 502461) @@ -1,72 +1,72 @@ ---- chrome/browser/chrome_browser_main.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/chrome_browser_main.cc.orig 2019-04-30 22:22:32 UTC +++ chrome/browser/chrome_browser_main.cc -@@ -217,7 +217,7 @@ - #include "chromeos/settings/cros_settings_names.h" +@@ -219,7 +219,7 @@ + #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) -@@ -257,7 +257,7 @@ +@@ -259,7 +259,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" #endif -@@ -1043,7 +1043,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1049,7 +1049,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 . -@@ -1052,14 +1052,14 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1058,14 +1058,14 @@ 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) -#if defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_LINUX) // Set the product channel for crash reports. breakpad::SetChannelCrashKey(chrome::GetChannelName()); -#endif // defined(OS_LINUX) || defined(OS_OPENBSD) +#endif // defined(OS_LINUX) #if defined(OS_MACOSX) // Get the Keychain API to register for distributed notifications on the main -@@ -1087,7 +1087,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1093,7 +1093,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(); #endif metrics::RendererUptimeTracker::Initialize(); -@@ -1267,6 +1267,7 @@ void ChromeBrowserMainParts::PostBrowserStart() { +@@ -1266,6 +1266,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()); BrowserThread::PostAfterStartupTask( -@@ -1275,6 +1276,7 @@ void ChromeBrowserMainParts::PostBrowserStart() { +@@ -1274,6 +1275,7 @@ void ChromeBrowserMainParts::PostBrowserStart() { base::BindOnce(&WebUsbDetector::Initialize, base::Unretained(web_usb_detector_.get()))); } +#endif if (base::FeatureList::IsEnabled(features::kTabMetricsLogging)) { // Initialize the TabActivityWatcher to begin logging tab activity events. resource_coordinator::TabActivityWatcher::GetInstance(); Index: head/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_chrome__browser__main__linux.cc (revision 502461) @@ -1,27 +1,27 @@ ---- chrome/browser/chrome_browser_main_linux.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/chrome_browser_main_linux.cc.orig 2019-04-30 22:22:32 UTC +++ chrome/browser/chrome_browser_main_linux.cc -@@ -90,12 +90,14 @@ void ChromeBrowserMainPartsLinux::PreProfileInit() { +@@ -91,12 +91,14 @@ void ChromeBrowserMainPartsLinux::PreProfileInit() { void ChromeBrowserMainPartsLinux::PostProfileInit() { ChromeBrowserMainPartsPosix::PostProfileInit(); +#if !defined(OS_BSD) g_browser_process->metrics_service()->RecordBreakpadRegistration( breakpad::IsCrashReporterEnabled()); +#endif } void ChromeBrowserMainPartsLinux::PostMainMessageLoopStart() { -#if !defined(OS_CHROMEOS) +#if !defined(OS_CHROMEOS) && !defined(OS_BSD) bluez::BluezDBusThreadManager::Initialize(); bluez::BluezDBusManager::Initialize(); #endif -@@ -104,7 +106,7 @@ void ChromeBrowserMainPartsLinux::PostMainMessageLoopS +@@ -105,7 +107,7 @@ void ChromeBrowserMainPartsLinux::PostMainMessageLoopS } void ChromeBrowserMainPartsLinux::PostDestroyThreads() { -#if !defined(OS_CHROMEOS) +#if !defined(OS_CHROMEOS) && !defined(OS_BSD) bluez::BluezDBusManager::Shutdown(); bluez::BluezDBusThreadManager::Shutdown(); #endif Index: head/www/chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_chrome__browser__main__posix.cc (revision 502461) @@ -1,11 +1,11 @@ ---- chrome/browser/chrome_browser_main_posix.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/chrome_browser_main_posix.cc.orig 2019-04-30 22:22:32 UTC +++ chrome/browser/chrome_browser_main_posix.cc -@@ -142,7 +142,7 @@ void ChromeBrowserMainPartsPosix::PostMainMessageLoopS +@@ -167,7 +167,7 @@ void ChromeBrowserMainPartsPosix::PostMainMessageLoopS void ChromeBrowserMainPartsPosix::ShowMissingLocaleMessageBox() { #if defined(OS_CHROMEOS) NOTREACHED(); // Should not ever happen on ChromeOS. -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_BSD) // Not called on Mac because we load the locale files differently. NOTREACHED(); #elif defined(USE_AURA) Index: head/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc (revision 502461) @@ -1,97 +1,83 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2019-04-30 22:22:32 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -395,7 +395,7 @@ +@@ -411,7 +411,7 @@ #include "components/user_manager/user_manager.h" #include "services/service_manager/public/mojom/interface_provider_spec.mojom.h" #include "services/ws/common/switches.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" -@@ -441,11 +441,11 @@ +@@ -457,7 +457,7 @@ #include "components/services/patch/public/interfaces/constants.mojom.h" #endif --#if defined(OS_LINUX) || defined(OS_WIN) -+#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) - #include "chrome/browser/webshare/share_service_impl.h" - #endif - -#if defined(OS_WIN) || defined(OS_MACOSX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) #include "chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h" #endif -@@ -462,7 +462,7 @@ +@@ -474,7 +474,7 @@ #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" #endif -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" #endif -@@ -1144,7 +1144,7 @@ content::BrowserMainParts* ChromeContentBrowserClient: +@@ -1170,7 +1170,7 @@ content::BrowserMainParts* ChromeContentBrowserClient: #elif defined(OS_CHROMEOS) main_parts = new chromeos::ChromeBrowserMainPartsChromeos( parameters, chrome_feature_list_creator_); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) main_parts = new ChromeBrowserMainPartsLinux(parameters, chrome_feature_list_creator_); #elif defined(OS_ANDROID) -@@ -1164,7 +1164,7 @@ content::BrowserMainParts* ChromeContentBrowserClient: +@@ -1190,7 +1190,7 @@ content::BrowserMainParts* ChromeContentBrowserClient: // 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) && !defined(USE_OZONE) +#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && !defined(USE_OZONE) main_parts->AddParts(new ChromeBrowserMainExtraPartsViewsLinux()); #else main_parts->AddParts(new ChromeBrowserMainExtraPartsViews()); -@@ -1956,7 +1956,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -1994,7 +1994,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 -@@ -3550,7 +3550,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst +@@ -3529,7 +3529,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, -@@ -4288,7 +4288,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati +@@ -4281,7 +4281,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati handle)); } -#if defined(OS_WIN) || defined(OS_MACOSX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) std::unique_ptr browser_switcher_throttle = browser_switcher::BrowserSwitcherNavigationThrottle :: -@@ -4409,7 +4409,7 @@ void ChromeContentBrowserClient::InitWebContextInterfa - #if defined(OS_ANDROID) - frame_interfaces_parameterized_->AddInterface(base::Bind( - &ForwardToJavaWebContentsRegistry)); --#elif defined(OS_LINUX) || defined(OS_WIN) -+#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) - frame_interfaces_->AddInterface(base::Bind(&ShareServiceImpl::Create)); - #endif - -@@ -5047,7 +5047,7 @@ std::unique_ptr +@@ -5115,7 +5115,7 @@ std::unique_ptr ChromeContentBrowserClient::CreateWindowForPictureInPicture( content::PictureInPictureWindowController* controller) { #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ - defined(OS_CHROMEOS) + defined(OS_CHROMEOS) || defined(OS_BSD) // Note: content::OverlayWindow::Create() is defined by platform-specific // implementation in chrome/browser/ui/views. This layering hack, which goes // through //content and ContentBrowserClient, allows us to work around the 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 502460) +++ head/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.h (revision 502461) @@ -1,17 +1,17 @@ ---- chrome/browser/chrome_content_browser_client.h.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/chrome_content_browser_client.h.orig 2019-04-30 22:22:32 UTC +++ chrome/browser/chrome_content_browser_client.h -@@ -363,12 +363,12 @@ class ChromeContentBrowserClient : public content::Con +@@ -368,12 +368,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) override; base::string16 GetAppContainerSidForSandboxType( 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 502460) +++ head/www/chromium/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc (revision 502461) @@ -1,11 +1,11 @@ ---- chrome/browser/devtools/devtools_eye_dropper.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/devtools/devtools_eye_dropper.cc.orig 2019-04-30 22:22:33 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_chrome__download__manager__delegate.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc (revision 502461) @@ -1,20 +1,20 @@ ---- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2019-04-30 22:22:33 UTC +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -1231,7 +1231,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1234,7 +1234,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe target_info->is_filetype_handled_safely) DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) if (item->GetOriginalMimeType() == "application/x-x509-user-cert") DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true); #endif -@@ -1251,7 +1251,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe +@@ -1254,7 +1254,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile( const base::FilePath& path) { -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) { return !download_prefs_->ShouldOpenPdfInSystemReader(); } Index: head/www/chromium/files/patch-chrome_browser_download_download__commands.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_download_download__commands.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_download_download__commands.cc (revision 502461) @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_commands.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/download/download_commands.cc.orig 2019-04-30 22:22:33 UTC +++ chrome/browser/download/download_commands.cc -@@ -158,7 +158,7 @@ Browser* DownloadCommands::GetBrowser() const { +@@ -159,7 +159,7 @@ Browser* DownloadCommands::GetBrowser() const { return browser_displayer.browser(); } -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) bool DownloadCommands::IsDownloadPdf() const { base::FilePath path = model_->GetTargetFilePath(); return path.MatchesExtension(FILE_PATH_LITERAL(".pdf")); -@@ -175,7 +175,7 @@ bool DownloadCommands::CanOpenPdfInSystemViewer() cons +@@ -176,7 +176,7 @@ bool DownloadCommands::CanOpenPdfInSystemViewer() cons return IsDownloadPdf() && (IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date : true); -#elif defined(OS_MACOSX) || defined(OS_LINUX) +#elif defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) return IsDownloadPdf(); #endif } Index: head/www/chromium/files/patch-chrome_browser_download_download__prefs.h =================================================================== --- head/www/chromium/files/patch-chrome_browser_download_download__prefs.h (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_download_download__prefs.h (revision 502461) @@ -1,20 +1,20 @@ ---- chrome/browser/download/download_prefs.h.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/download/download_prefs.h.orig 2019-04-30 22:22:33 UTC +++ chrome/browser/download/download_prefs.h -@@ -101,7 +101,7 @@ class DownloadPrefs { +@@ -104,7 +104,7 @@ class DownloadPrefs { // Disables auto-open based on file extension. void DisableAutoOpenBasedOnExtension(const base::FilePath& file_name); -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) // Store the user preference to disk. If |should_open| is true, also disable // the built-in PDF plugin. If |should_open| is false, enable the PDF plugin. void SetShouldOpenPdfInSystemReader(bool should_open); -@@ -145,7 +145,7 @@ class DownloadPrefs { +@@ -148,7 +148,7 @@ class DownloadPrefs { AutoOpenCompareFunctor> AutoOpenSet; AutoOpenSet auto_open_; -#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) bool should_open_pdf_in_system_reader_; #endif Index: head/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn (revision 502461) @@ -1,15 +1,15 @@ ---- chrome/browser/extensions/BUILD.gn.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/extensions/BUILD.gn.orig 2019-04-30 22:22:33 UTC +++ chrome/browser/extensions/BUILD.gn -@@ -1104,6 +1104,12 @@ jumbo_static_library("extensions") { +@@ -1116,6 +1116,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_activity__log_activity__log.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_activity__log_activity__log.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_extensions_activity__log_activity__log.cc (revision 502461) @@ -1,14 +1,14 @@ ---- chrome/browser/extensions/activity_log/activity_log.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/extensions/activity_log/activity_log.cc.orig 2019-04-30 22:22:33 UTC +++ chrome/browser/extensions/activity_log/activity_log.cc -@@ -52,7 +52,11 @@ +@@ -53,7 +53,11 @@ #include "extensions/common/extension.h" #include "extensions/common/extension_messages.h" #include "extensions/common/one_shot_event.h" +#if defined(OS_BSD) +#include +#else #include "third_party/re2/src/re2/re2.h" +#endif #include "url/gurl.h" namespace constants = activity_log_constants; Index: head/www/chromium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc (revision 502461) @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2019-04-30 22:22:33 UTC +++ chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc -@@ -20,6 +20,7 @@ static base::LazyInstancePostTask( FROM_HERE, -@@ -33,6 +34,9 @@ void RemovableStorageProvider::GetAllDevices(DeviceLis +@@ -34,6 +35,9 @@ void RemovableStorageProvider::GetAllDevices(DeviceLis base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}, base::BindOnce(&RemovableStorageProvider::PopulateDeviceList), std::move(callback)); +#else + NOTIMPLEMENTED(); +#endif } // static Index: head/www/chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc (revision 502461) @@ -1,11 +1,11 @@ ---- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2019-04-30 22:22:33 UTC +++ chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc -@@ -296,6 +296,8 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor +@@ -299,6 +299,8 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor info->os = extensions::api::runtime::PLATFORM_OS_CROS; } else if (strcmp(os, "linux") == 0) { info->os = extensions::api::runtime::PLATFORM_OS_LINUX; + } else if (strcmp(os, "freebsd") == 0) { + info->os = extensions::api::runtime::PLATFORM_OS_FREEBSD; } else if (strcmp(os, "openbsd") == 0) { info->os = extensions::api::runtime::PLATFORM_OS_OPENBSD; } else { Index: head/www/chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc (revision 502461) @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2019-04-30 22:22:33 UTC +++ chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -127,7 +127,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelist +@@ -128,7 +128,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelist settings_api::PrefType::PREF_TYPE_BOOLEAN; (*s_whitelist)[bookmarks::prefs::kShowBookmarkBar] = settings_api::PrefType::PREF_TYPE_BOOLEAN; -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) (*s_whitelist)[::prefs::kUseCustomChromeFrame] = settings_api::PrefType::PREF_TYPE_BOOLEAN; #endif -@@ -137,7 +137,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelist +@@ -138,7 +138,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_external__provider__impl.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_extensions_external__provider__impl.cc (revision 502461) @@ -1,20 +1,20 @@ ---- chrome/browser/extensions/external_provider_impl.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/extensions/external_provider_impl.cc.orig 2019-04-30 22:22:33 UTC +++ chrome/browser/extensions/external_provider_impl.cc -@@ -747,7 +747,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -753,7 +753,7 @@ void ExternalProviderImpl::CreateExternalProviders( chromeos::DemoSession::Get()->SetExtensionsExternalLoader(loader); provider_list->push_back(std::move(demo_apps_provider)); } -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) provider_list->push_back(std::make_unique( service, new ExternalPrefLoader(chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS, -@@ -774,7 +774,7 @@ void ExternalProviderImpl::CreateExternalProviders( +@@ -780,7 +780,7 @@ void ExternalProviderImpl::CreateExternalProviders( bundled_extension_creation_flags)); // Define a per-user source of external extensions. -#if defined(OS_MACOSX) || (defined(OS_LINUX) && defined(CHROMIUM_BUILD)) +#if defined(OS_MACOSX) || ((defined(OS_LINUX) || defined(OS_BSD)) && defined(CHROMIUM_BUILD)) provider_list->push_back(std::make_unique( service, new ExternalPrefLoader(chrome::DIR_USER_EXTERNAL_EXTENSIONS, Index: head/www/chromium/files/patch-chrome_browser_flag__descriptions.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_flag__descriptions.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_flag__descriptions.cc (revision 502461) @@ -1,34 +1,44 @@ ---- chrome/browser/flag_descriptions.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/flag_descriptions.cc.orig 2019-04-30 22:22:33 UTC +++ chrome/browser/flag_descriptions.cc -@@ -3656,13 +3656,13 @@ const char kWakeOnPacketsDescription[] = +@@ -3524,21 +3524,21 @@ extern const char kAshNotificationStackingBarRedesignD // Random platform combinations ----------------------------------------------- -#if defined(OS_WIN) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) const char kEnableInputImeApiName[] = "Enable Input IME API"; const char kEnableInputImeApiDescription[] = "Enable the use of chrome.input.ime API."; -#endif // defined(OS_WIN) || defined(OS_LINUX) +#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) +-#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 defined(OS_WIN) || defined(OS_MACOSX) -@@ -3675,13 +3675,13 @@ const char kAutomaticTabDiscardingDescription[] = +@@ -3551,13 +3551,13 @@ const char kAutomaticTabDiscardingDescription[] = #endif // defined(OS_WIN) || defined(OS_MACOSX) -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) const char kDirectManipulationStylusName[] = "Direct Manipulation Stylus"; const char kDirectManipulationStylusDescription[] = "If enabled, Chrome will scroll web pages on stylus drag."; -#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) #if defined(OS_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 502460) +++ head/www/chromium/files/patch-chrome_browser_flag__descriptions.h (revision 502461) @@ -1,32 +1,41 @@ ---- chrome/browser/flag_descriptions.h.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/flag_descriptions.h.orig 2019-04-30 22:22:33 UTC +++ chrome/browser/flag_descriptions.h -@@ -2192,12 +2192,12 @@ extern const char kWakeOnPacketsDescription[]; +@@ -2100,19 +2100,19 @@ extern const char kAshNotificationStackingBarRedesignD // Random platform combinations ----------------------------------------------- -#if defined(OS_WIN) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) extern const char kEnableInputImeApiName[]; extern const char kEnableInputImeApiDescription[]; -#endif // defined(OS_WIN) || defined(OS_LINUX) +#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) +-#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) + extern const char kExperimentalUiName[]; extern const char kExperimentalUiDescription[]; -@@ -2209,12 +2209,12 @@ extern const char kAutomaticTabDiscardingDescription[] +@@ -2124,12 +2124,12 @@ extern const char kAutomaticTabDiscardingDescription[] #endif // defined(OS_WIN) || defined(OS_MACOSX) -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) extern const char kDirectManipulationStylusName[]; extern const char kDirectManipulationStylusDescription[]; -#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) #if defined(OS_MACOSX) || defined(OS_CHROMEOS) Index: head/www/chromium/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc (revision 502461) @@ -1,15 +1,15 @@ ---- chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc.orig 2019-04-30 22:22:34 UTC +++ chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc -@@ -38,10 +38,12 @@ void MTPDeviceMapService::RegisterMTPFileSystem( +@@ -39,10 +39,12 @@ void MTPDeviceMapService::RegisterMTPFileSystem( // Note that this initializes the delegate asynchronously, but since // the delegate will only be used from the IO thread, it is guaranteed // to be created before use of it expects it to be there. +#if !defined(OS_FREEBSD) CreateMTPDeviceAsyncDelegate( device_location, read_only, base::Bind(&MTPDeviceMapService::AddAsyncDelegate, base::Unretained(this), device_location, read_only)); +#endif mtp_device_usage_map_[key] = 0; } Index: head/www/chromium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc (revision 502461) @@ -1,14 +1,14 @@ ---- chrome/browser/media_galleries/media_file_system_registry.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/media_galleries/media_file_system_registry.cc.orig 2019-04-30 22:22:34 UTC +++ chrome/browser/media_galleries/media_file_system_registry.cc -@@ -734,7 +734,10 @@ class MediaFileSystemRegistry::MediaFileSystemContextI +@@ -732,7 +732,10 @@ class MediaFileSystemRegistry::MediaFileSystemContextI // Constructor in 'private' section because depends on private class definition. MediaFileSystemRegistry::MediaFileSystemRegistry() : file_system_context_(new MediaFileSystemContextImpl) { - StorageMonitor::GetInstance()->AddObserver(this); + // This conditional is needed for shutdown. Destructors + // try to get the media file system registry. + if (StorageMonitor::GetInstance()) + StorageMonitor::GetInstance()->AddObserver(this); } MediaFileSystemRegistry::~MediaFileSystemRegistry() { Index: head/www/chromium/files/patch-chrome_browser_media_router_providers_wired__display_wired__display__media__route__provider.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_media_router_providers_wired__display_wired__display__media__route__provider.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_media_router_providers_wired__display_wired__display__media__route__provider.cc (revision 502461) @@ -1,23 +1,23 @@ ---- chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider.cc.orig 2019-04-30 22:22:33 UTC +++ chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider.cc -@@ -111,6 +111,12 @@ void WiredDisplayMediaRouteProvider::CreateRoute( +@@ -112,6 +112,12 @@ void WiredDisplayMediaRouteProvider::CreateRoute( bool incognito, CreateRouteCallback callback) { DCHECK(!base::ContainsKey(presentations_, presentation_id)); +#if defined(OS_BSD) // XXX + std::move(callback).Run(base::nullopt, nullptr, + std::string("Not implemented"), + RouteRequestResult::UNKNOWN_ERROR); + return; +#else base::Optional display = GetDisplayBySinkId(sink_id); if (!display) { std::move(callback).Run(base::nullopt, nullptr, -@@ -137,6 +143,7 @@ void WiredDisplayMediaRouteProvider::CreateRoute( +@@ -138,6 +144,7 @@ void WiredDisplayMediaRouteProvider::CreateRoute( std::move(callback).Run(route, nullptr, base::nullopt, RouteRequestResult::OK); NotifyRouteObservers(); +#endif } void WiredDisplayMediaRouteProvider::JoinRoute( Index: head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc (revision 502461) @@ -1,11 +1,11 @@ ---- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2019-04-30 22:22:34 UTC +++ chrome/browser/media/webrtc/webrtc_log_uploader.cc -@@ -391,6 +391,8 @@ void WebRtcLogUploader::SetupMultipart( +@@ -393,6 +393,8 @@ void WebRtcLogUploader::SetupMultipart( const char product[] = "Chrome_Android"; #elif defined(OS_CHROMEOS) const char product[] = "Chrome_ChromeOS"; +#elif defined(OS_FREEBSD) + const char product[] = "Chrome_FreeBSD"; #else #error Platform not supported. #endif Index: head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__handler__host.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__handler__host.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__handler__host.cc (revision 502461) @@ -1,33 +1,33 @@ ---- chrome/browser/media/webrtc/webrtc_logging_handler_host.cc.orig 2019-03-17 20:01:28 UTC +--- chrome/browser/media/webrtc/webrtc_logging_handler_host.cc.orig 2019-04-30 22:22:34 UTC +++ chrome/browser/media/webrtc/webrtc_logging_handler_host.cc @@ -26,10 +26,10 @@ #include "content/public/browser/content_browser_client.h" #include "content/public/browser/render_process_host.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" -#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) using content::BrowserThread; using webrtc_event_logging::WebRtcEventLogManager; @@ -281,7 +281,7 @@ void WebRtcLoggingHandlerHost::StartEventLogging( - output_period_ms, web_app_id, callback); + web_app_id, callback); } -#if defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) void WebRtcLoggingHandlerHost::GetLogsDirectory( const LogsDirectoryCallback& callback, const LogsDirectoryErrorCallback& error_callback) { @@ -327,7 +327,7 @@ void WebRtcLoggingHandlerHost::GrantLogsDirectoryAcces FROM_HERE, {BrowserThread::UI}, base::BindOnce(callback, filesystem_id, registered_name)); } -#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD void WebRtcLoggingHandlerHost::OnRtpPacket( std::unique_ptr packet_header, Index: head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__handler__host.h =================================================================== --- head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__handler__host.h (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_media_webrtc_webrtc__logging__handler__host.h (revision 502461) @@ -1,36 +1,36 @@ ---- chrome/browser/media/webrtc/webrtc_logging_handler_host.h.orig 2019-03-17 20:00:30 UTC +--- chrome/browser/media/webrtc/webrtc_logging_handler_host.h.orig 2019-04-30 22:22:34 UTC +++ chrome/browser/media/webrtc/webrtc_logging_handler_host.h -@@ -154,13 +154,13 @@ class WebRtcLoggingHandlerHost : public content::Brows +@@ -153,13 +153,13 @@ class WebRtcLoggingHandlerHost : public content::Brows size_t web_app_id, const StartEventLoggingCallback& callback); -#if defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Ensures that the WebRTC Logs directory exists and then grants render // process access to the 'WebRTC Logs' directory, and invokes |callback| with // the ids necessary to create a DirectoryEntry object. void GetLogsDirectory(const LogsDirectoryCallback& callback, const LogsDirectoryErrorCallback& error_callback); -#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) private: friend class content::BrowserThread; -@@ -227,7 +227,7 @@ class WebRtcLoggingHandlerHost : public content::Brows +@@ -226,7 +226,7 @@ class WebRtcLoggingHandlerHost : public content::Brows bool success, const std::string& error_message); -#if defined(OS_LINUX) || defined(OS_CHROMEOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // Grants the render process access to the 'WebRTC Logs' directory, and // invokes |callback| with the ids necessary to create a DirectoryEntry // object. If the |logs_path| couldn't be created or found, |error_callback| -@@ -236,7 +236,7 @@ class WebRtcLoggingHandlerHost : public content::Brows +@@ -235,7 +235,7 @@ class WebRtcLoggingHandlerHost : public content::Brows const LogsDirectoryCallback& callback, const LogsDirectoryErrorCallback& error_callback, const base::FilePath& logs_path); -#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) +#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) // The render process ID this object belongs to. const int render_process_id_; 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 502460) +++ head/www/chromium/files/patch-chrome_browser_net_system__network__context__manager.cc (revision 502461) @@ -1,26 +1,26 @@ ---- chrome/browser/net/system_network_context_manager.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/net/system_network_context_manager.cc.orig 2019-04-30 22:22:34 UTC +++ chrome/browser/net/system_network_context_manager.cc -@@ -69,12 +69,12 @@ +@@ -70,12 +70,12 @@ #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" #endif // defined(OS_CHROMEOS) -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) #include "chrome/common/chrome_paths_internal.h" #include "chrome/common/chrome_switches.h" #include "chrome/grit/chromium_strings.h" #include "ui/base/l10n/l10n_util.h" -#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) +#endif // (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) namespace { -@@ -519,7 +519,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea +@@ -535,7 +535,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea content::GetNetworkService()->ConfigureStubHostResolver( stub_resolver_enabled, 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_password__manager_password__store__factory.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_password__manager_password__store__factory.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_password__manager_password__store__factory.cc (revision 502461) @@ -1,11 +1,11 @@ ---- chrome/browser/password_manager/password_store_factory.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/password_manager/password_store_factory.cc.orig 2019-04-30 22:22:34 UTC +++ chrome/browser/password_manager/password_store_factory.cc -@@ -300,7 +300,7 @@ PasswordStoreFactory::BuildServiceInstanceFor( +@@ -301,7 +301,7 @@ PasswordStoreFactory::BuildServiceInstanceFor( password_manager_util::RemoveUselessCredentials(ps, profile->GetPrefs(), 60, network_context_getter); -#if defined(OS_WIN) || defined(OS_MACOSX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) std::unique_ptr notifier = std::make_unique( 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 502460) +++ head/www/chromium/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc (revision 502461) @@ -1,20 +1,20 @@ ---- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2019-04-30 22:22:34 UTC +++ chrome/browser/policy/configuration_policy_handler_list_factory.cc @@ -107,7 +107,7 @@ #include "chrome/browser/policy/browser_signin_policy_handler.h" #endif -#if defined(OS_WIN) || defined(OS_MACOSX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) #include "chrome/browser/browser_switcher/browser_switcher_prefs.h" #endif -@@ -939,7 +939,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = - prefs::kEnterpriseHardwarePlatformAPIEnabled, +@@ -962,7 +962,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = + prefs::kAllowPopupsDuringPageUnload, base::Value::Type::BOOLEAN }, -#if defined(OS_WIN) || defined(OS_MACOSX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) { key::kAlternativeBrowserPath, browser_switcher::prefs::kAlternativeBrowserPath, Index: head/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_prefs_browser__prefs.cc (revision 502461) @@ -1,20 +1,20 @@ ---- chrome/browser/prefs/browser_prefs.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/prefs/browser_prefs.cc.orig 2019-04-30 22:22:34 UTC +++ chrome/browser/prefs/browser_prefs.cc -@@ -319,7 +319,7 @@ +@@ -331,7 +331,7 @@ #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_prefs_manager.h" #endif -#if defined(OS_WIN) || defined(OS_MACOSX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) #include "chrome/browser/browser_switcher/browser_switcher_prefs.h" #endif -@@ -771,7 +771,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync +@@ -802,7 +802,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync safe_browsing::PostCleanupSettingsResetter::RegisterProfilePrefs(registry); #endif -#if defined(OS_WIN) || defined(OS_MACOSX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry); #endif Index: head/www/chromium/files/patch-chrome_browser_process__singleton__posix.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_process__singleton__posix.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_process__singleton__posix.cc (revision 502461) @@ -1,34 +1,34 @@ ---- chrome/browser/process_singleton_posix.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/process_singleton_posix.cc.orig 2019-04-30 22:22:34 UTC +++ chrome/browser/process_singleton_posix.cc @@ -93,11 +93,11 @@ #include "net/base/network_interfaces.h" #include "ui/base/l10n/l10n_util.h" -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #include "chrome/browser/ui/process_singleton_dialog_linux.h" #endif -#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if defined(TOOLKIT_VIEWS) && (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) #include "ui/views/linux_ui/linux_ui.h" #endif -@@ -325,7 +325,7 @@ bool DisplayProfileInUseError(const base::FilePath& lo +@@ -324,7 +324,7 @@ bool DisplayProfileInUseError(const base::FilePath& lo if (g_disable_prompt) return g_user_opted_unlock_in_use_profile; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) base::string16 relaunch_button_text = l10n_util::GetStringUTF16( IDS_PROFILE_IN_USE_LINUX_RELAUNCH); return ShowProcessSingletonDialog(error, relaunch_button_text); -@@ -904,7 +904,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::Notif +@@ -903,7 +903,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::Notif SendRemoteProcessInteractionResultHistogram(REMOTE_PROCESS_SHUTTING_DOWN); return PROCESS_NONE; } else if (strncmp(buf, kACKToken, base::size(kACKToken) - 1) == 0) { -#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if defined(TOOLKIT_VIEWS) && (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) // Likely NULL in unit tests. views::LinuxUI* linux_ui = views::LinuxUI::instance(); if (linux_ui) 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 502460) +++ head/www/chromium/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc (revision 502461) @@ -1,11 +1,11 @@ ---- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2019-04-30 22:22:34 UTC +++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -326,7 +326,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -325,7 +325,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if !defined(OS_ANDROID) MediaGalleriesPreferencesFactory::GetInstance(); #endif -#if defined(OS_WIN) || defined(OS_MACOSX) || \ +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance(); #endif 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 502460) +++ head/www/chromium/files/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc (revision 502461) @@ -1,29 +1,29 @@ ---- chrome/browser/renderer_context_menu/render_view_context_menu.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/renderer_context_menu/render_view_context_menu.cc.orig 2019-04-30 22:22:34 UTC +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -1507,7 +1507,7 @@ void RenderViewContextMenu::AppendEditableItems() { +@@ -1500,7 +1500,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, -@@ -1549,7 +1549,7 @@ void RenderViewContextMenu::AppendLanguageSettings() { +@@ -1542,7 +1542,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 -@@ -1823,7 +1823,7 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) +@@ -1816,7 +1816,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_renderer__preferences__util.cc =================================================================== --- head/www/chromium/files/patch-chrome_browser_renderer__preferences__util.cc (revision 502460) +++ head/www/chromium/files/patch-chrome_browser_renderer__preferences__util.cc (revision 502461) @@ -1,29 +1,29 @@ ---- chrome/browser/renderer_preferences_util.cc.orig 2019-03-11 22:00:53 UTC +--- chrome/browser/renderer_preferences_util.cc.orig 2019-04-30 22:22:34 UTC +++ chrome/browser/renderer_preferences_util.cc -@@ -28,7 +28,7 @@ +@@ -29,7 +29,7 @@ #include "ui/base/cocoa/defaults_utils.h" #endif -#if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if defined(USE_AURA) && (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" #include "ui/views/linux_ui/linux_ui.h" -@@ -127,7 +127,7 @@ void UpdateFromSystemSettings(content::RendererPrefere +@@ -129,7 +129,7 @@ void UpdateFromSystemSettings(blink::mojom::RendererPr prefs->caret_blink_interval = interval; #endif -#if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if defined(USE_AURA) && (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) views::LinuxUI* linux_ui = views::LinuxUI::instance(); if (linux_ui) { if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) { -@@ -146,7 +146,7 @@ void UpdateFromSystemSettings(content::RendererPrefere +@@ -148,7 +148,7 @@ void UpdateFromSystemSettings(blink::mojom::RendererPr } #endif -#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN) +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_BSD) content::UpdateFontRendererPreferencesFromSystemSettings(prefs); + content::UpdateFocusRingPreferencesFromSystemSettings(prefs); #endif - 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 502460) +++ head/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html (revision 502461) @@ -1,29 +1,29 @@ ---- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2019-03-11 22:00:54 UTC +--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2019-04-30 22:22:35 UTC +++ chrome/browser/resources/settings/appearance_page/appearance_page.html -@@ -65,7 +65,7 @@ - hidden="[[!pageVisibility.setTheme]]" +@@ -64,7 +64,7 @@ + + on-click="openThemeUrl_" external> - + - +