Index: head/www/chromium/Makefile
===================================================================
--- head/www/chromium/Makefile
+++ head/www/chromium/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= chromium
-PORTVERSION= 52.0.2743.116
-PORTREVISION= 4
+PORTVERSION= 54.0.2840.100
CATEGORIES= www
MASTER_SITES= http://commondatastorage.googleapis.com/chromium-browser-official/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} # default, but needed to get distinfo correct if TEST is on
@@ -14,9 +13,7 @@
LICENSE= BSD3CLAUSE LGPL21 MPL
LICENSE_COMB= multi
-BROKEN_FreeBSD_9=does not patch
-
-CFLAGS+= -isystem${LOCALBASE}/include -I${PREFIX}/include/atk-1.0
+BROKEN_FreeBSD_9=does not configure
BUILD_DEPENDS= ${LOCALBASE}/bin/gperf:devel/gperf \
bash:shells/bash \
@@ -28,8 +25,7 @@
${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply \
${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib
-LIB_DEPENDS= libasound.so:audio/alsa-lib \
- libcairo.so:graphics/cairo \
+LIB_DEPENDS= libcairo.so:graphics/cairo \
libcups.so:print/cups \
libdbus-1.so:devel/dbus \
libdbus-glib-1.so:devel/dbus-glib \
@@ -39,7 +35,6 @@
libfreetype.so:print/freetype2 \
libgnome-keyring.so:security/libgnome-keyring \
libharfbuzz.so:print/harfbuzz \
- libevent.so:devel/libevent2 \
libexif.so:graphics/libexif \
libfontconfig.so:x11-fonts/fontconfig \
libgcrypt.so:security/libgcrypt \
@@ -56,101 +51,60 @@
libwebp.so:graphics/webp \
libxml2.so:textproc/libxml2
-RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \
- alsa-lib>=1.1.1_1:audio/alsa-lib \
- droid-fonts-ttf>0:x11-fonts/droid-fonts-ttf \
+RUN_DEPENDS= droid-fonts-ttf>0:x11-fonts/droid-fonts-ttf \
xdg-open:devel/xdg-utils
ONLY_FOR_ARCHS= i386 amd64
-USES= bison cpe desktop-file-utils execinfo jpeg \
+USES= compiler bison cpe desktop-file-utils execinfo jpeg \
ninja perl5 pkgconfig python:2,build shebangfix tar:xz
-# chromium requires a recent compiler (C++11 capable, but clang 3.4 is
-# not able to build chromium. OTOH clang36 on FreeBSD 9.3 cannot build
-# chromium as the libc++ includes are not up to the task. USES flags
-# have to be set before bsd.ports.pre.mk and thereby cannot depend on
-# bsd.ports.pre.mk's variables, so I'm using a hack here.
-.if exists(/usr/lib/libc++.a)
-USES+= compiler:c++14-lang
-.else
-USES+= compiler:c++11-lib
-.endif
CPE_VENDOR= google
CPE_PRODUCT= chrome
USE_PERL5= build
USE_XORG= scrnsaverproto x11 xcomposite xcursor xext xdamage xfixes xi \
xproto xrandr xrender xscrnsaver xtst
-USE_GNOME= atk glib20 gtk20 dconf libxslt
+USE_GNOME= atk glib20 gtk20 dconf libxslt libxml2
MAKE_ARGS= -C out/${BUILDTYPE}
SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper
ALL_TARGET= chrome
INSTALLS_ICONS= yes
-#TODO bz@ : install libwidevinecdm.so (see
-# third_party/widevine/cdm/widevine_cdm.gyp)
-# See build/common.gypi for all the available variables.
-GYP_DEFINES+= \
- clang_use_chrome_plugins=0 \
- linux_breakpad=0 \
- linux_use_heapchecker=0 \
- linux_strip_binary=1 \
- use_aura=1 \
- test_isolation_mode=noop \
- disable_nacl=1 \
- enable_extensions=1 \
- enable_one_click_signin=1 \
- enable_openmax=1 \
- enable_webrtc=1 \
- werror= \
- no_gc_sections=1 \
- OS=freebsd \
- os_ver=${OSVERSION} \
- prefix_dir=${LOCALBASE} \
- python_ver=${PYTHON_VER} \
- use_allocator=none \
- use_cups=1 \
- linux_link_gsettings=1 \
- linux_link_libpci=1 \
- linux_link_libspeechd=1 \
- libspeechd_h_prefix=speech-dispatcher/ \
- usb_ids_path=${LOCALBASE}/share/usbids/usb.ids \
- want_separate_host_toolset=0 \
- use_system_bzip2=1 \
- use_system_flac=1 \
- use_system_harfbuzz=1 \
- use_system_icu=1 \
- use_system_jsoncpp=1 \
- use_system_libevent=1 \
- use_system_libexif=1 \
- use_system_libjpeg=1 \
- use_system_libpng=1 \
- use_system_libusb=1 \
- use_system_libwebp=1 \
- use_system_libxml=1 \
- use_system_libxslt=1 \
- use_system_nspr=1 \
- use_system_protobuf=0 \
- use_system_re2=1 \
- use_system_snappy=1 \
- use_system_speex=1 \
- use_system_xdg_utils=1 \
- use_system_yasm=1 \
- v8_use_external_startup_data=0
-# allow removal of third_party/adobe
-GYP_DEFINES+= flapper_version_h_file='${WRKSRC}/flapper_version.h'
+# TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn)
+#
+# Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all the 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_hevc_demuxing=true \
+ enable_media_router=true \
+ enable_nacl=false \
+ enable_remoting=false \
+ toolkit_views=true \
+ use_allocator="none" \
+ use_aura=true \
+ use_experimental_allocator_shim=true \
+ treat_warnings_as_errors=false \
+ use_sysroot=false \
+ use_system_libjpeg=true \
+ use_system_sqlite=false # chrome has additional patches
+# TODO: investigate building with these options:
+# use_system_icu use_system_harfbuzz use_system_minigbm
+GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild
# 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.
-GYP_DEFINES+= google_api_key=AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8 \
- google_default_client_id=996322985003.apps.googleusercontent.com \
- google_default_client_secret=IR1za9-1VK0zZ0f_O8MVFicn
+GN_ARGS+= google_api_key="AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8" \
+ google_default_client_id="996322985003.apps.googleusercontent.com" \
+ google_default_client_secret="IR1za9-1VK0zZ0f_O8MVFicn"
SUB_FILES= chromium-browser.desktop chrome
SUB_LIST+= COMMENT="${COMMENT}"
-OPTIONS_DEFINE= CODECS GCONF PULSEAUDIO TEST KERBEROS DEBUG DRIVER
+OPTIONS_DEFINE= ALSA CODECS GCONF PULSEAUDIO TEST KERBEROS DEBUG DRIVER
CODECS_DESC= Compile and enable patented codecs like H.264
DRIVER_DESC= Install chromedriver
@@ -158,44 +112,39 @@
OPTIONS_SUB= yes
GCONF_USE= GNOME=gconf2
+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
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
DRIVER_MAKE_ARGS=chromedriver
TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX}
.include
+.if ${PORT_OPTIONS:MALSA}
+GN_ARGS+= use_alsa=true
+.else
+GN_ARGS+= use_alsa=false
+.endif
+
.if ${PORT_OPTIONS:MCODECS}
-GYP_DEFINES+= ffmpeg_branding=Chrome
-GYP_DEFINES+= proprietary_codecs=1
+GN_ARGS+= ffmpeg_branding="Chrome"
+GN_ARGS+= proprietary_codecs=true
.else
-GYP_DEFINES+= ffmpeg_branding=Chromium
-GYP_DEFINES+= proprietary_codecs=0
+GN_ARGS+= ffmpeg_branding="Chromium"
+GN_ARGS+= proprietary_codecs=false
.endif
.if ${PORT_OPTIONS:MGCONF}
-GYP_DEFINES+= use_gconf=1
+GN_ARGS+= use_gconf=true
.else
-GYP_DEFINES+= use_gconf=0
+GN_ARGS+= use_gconf=false
.endif
.if ${PORT_OPTIONS:MPULSEAUDIO}
-GYP_DEFINES+= use_pulseaudio=1
+GN_ARGS+= use_pulseaudio=true
.else
-GYP_DEFINES+= use_pulseaudio=0
-.endif
-
-.if empty(MACHINE_CPU:Msse2)
-GYP_DEFINES+= disable_sse2=1
-.endif
-
-.if !exists(/usr/libdata/pkgconfig/libusb-1.0.pc)
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-libusb-pc
-.endif
-
-# pointed out by "Tomek" on freebsd-chromium@
-.if !exists(/usr/lib/libexecinfo.so)
-CFLAGS+= -fno-omit-frame-pointer
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-fixup-ffmpeg
+GN_ARGS+= use_pulseaudio=false
.endif
.if ${PORT_OPTIONS:MTEST}
@@ -206,180 +155,80 @@
DEBUG_MAKE_ENV= V=1
.if ${PORT_OPTIONS:MDEBUG}
BUILDTYPE= Debug
+GN_ARGS+= is_debug=true
+GN_BOOTSTRAP_FLAGS+= --debug
+#GN_ARGS+= is_component_build = true
.else
BUILDTYPE= Release
+.if ${ARCH} == amd64
+GN_ARGS+= use_lld=true # harder, better, faster, stronger
+.endif
+GN_ARGS+= is_debug=false
+GN_ARGS+= symbol_level=0
+GN_ARGS+= remove_webcore_debug_symbols=true
.endif
-CONFIGURE_ENV+= CC="${CC}" \
- CXX="${CXX}" \
- GYP_GENERATORS=ninja \
- GYP_DEFINES="${GYP_DEFINES}"
MAKE_ENV+= BUILDTYPE=${BUILDTYPE} \
GPERF="${LOCALBASE}/bin/gperf"
.include
.if ${CHOSEN_COMPILER_TYPE} == gcc
-GYP_DEFINES+= gcc_version=${CXX:S/g++//}
+GN_ARGS+= gcc_version=${CXX:S/g++//}
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-gcc
-CFLAGS+= -fno-stack-protector # gcc 4.8 cannot find __stack_chk_fail_local
.else
-GYP_DEFINES+= clang=1
-CFLAGS+= -Wno-unknown-warning-option \
- -D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1 # work around base r261801
+BUILD_DEPENDS+= clang39:devel/llvm39
+CC= clang39
+CXX= clang++39
+# /usr/local/include unlike gcc isn't clang's default
+MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \
+ CPLUS_INCLUDE_PATH=${LOCALBASE}/include
+GN_ARGS+= is_clang=true
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang
-CONFIGURE_ENV+= AR=/usr/bin/ar
.endif
-.if ! ${PORT_OPTIONS:MKERBEROS}
-GYP_DEFINES+= use_kerberos=0
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1002000
+BUILD_DEPENDS+= ${LOCALBASE}/lib/c++/libstdc++.so:devel/libc++
+CXXFLAGS+= -stdlib=libc++ -isystem ${LOCALBASE}/include/c++/v1
.endif
-# according to portlint the below is passed via bsd.port.mk,
-# but 'make -V CONFIGURE_ENV' does not show it:
-CONFIGURE_ENV+= CFLAGS="${CFLAGS}" \
- CPPFLAGS="${CPPFLAGS}" \
- CXXFLAGS="${CXXFLAGS}" \
- LDFLAGS="${LDFLAGS}"
+.if ${OSVERSION} < 1100000
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-10
+.endif
+
+.if ! ${PORT_OPTIONS:MKERBEROS}
+GN_ARGS+= use_kerberos=true
+.endif
pre-everything::
@${ECHO_MSG}
- @${ECHO_MSG} "To build Chromium, you should have around 2 GB of memory"
+ @${ECHO_MSG} "To build Chromium, you should have around 2GB of memory,"
.if ${PORT_OPTIONS:MDEBUG}
- @${ECHO_MSG} "and lots of free diskspace (~ 8.5GB)."
+ @${ECHO_MSG} "lots of free diskspace (~ 40GB)"
+ @${ECHO_MSG} "and no less then 16GB of memory for linking."
.else
@${ECHO_MSG} "and a fair amount of free diskspace (~ 3.7GB)."
.endif
@${ECHO_MSG}
@${ECHO_MSG} "Make sure you have Python build with the SEM option ON"
@${ECHO_MSG} "(default in python27-2.7.8 since r361735)"
-
-post-patch:
- @${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|" \
- ${WRKSRC}/crypto/crypto.gyp \
- ${WRKSRC}/v8/src/v8.gyp \
- ${WRKSRC}/v8/gypfiles/toolchain.gypi
- @${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|" \
- ${WRKSRC}/chrome/common/chrome_paths.cc \
- ${WRKSRC}/base/base.gyp
+ @${ECHO_MSG}
pre-configure:
- # phajdan-jr: list of things *not* to remove, so maybe the script
- # should be called "keep_bundled_libraries.py"
+ # We used to remove bundled libraries to be sure that chromium uses
+ # system libraries and not shippen ones.
+ # cd ${WRKSRC} && ${PYTHON_CMD} \
+ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved]
cd ${WRKSRC} && ${PYTHON_CMD} \
- ./build/linux/unbundle/remove_bundled_libraries.py \
- 'base/third_party/dmg_fp' \
- 'base/third_party/dynamic_annotations' \
- 'base/third_party/icu' \
- 'base/third_party/nspr' \
- 'base/third_party/superfasthash' \
- 'base/third_party/symbolize' \
- 'base/third_party/valgrind' \
- 'base/third_party/xdg_mime' \
- 'base/third_party/xdg_user_dirs' \
- 'breakpad/src/third_party/curl' \
- 'chrome/third_party/mock4js' \
- 'chrome/third_party/mozilla_security_manager' \
- 'courgette/third_party' \
- 'net/third_party/mozilla_security_manager' \
- 'net/third_party/nss' \
- 'third_party/WebKit' \
- 'third_party/analytics' \
- 'third_party/angle' \
- 'third_party/angle/src/third_party' \
- 'third_party/blanketjs' \
- 'third_party/brotli' \
- 'third_party/boringssl' \
- 'third_party/cacheinvalidation' \
- 'third_party/catapult' \
- 'third_party/catapult/third_party/beautifulsoup4' \
- 'third_party/catapult/third_party/py_vulcanize' \
- 'third_party/catapult/third_party/py_vulcanize/py_vulcanize' \
- 'third_party/catapult/third_party/py_vulcanize/third_party/rcssmin' \
- 'third_party/catapult/third_party/py_vulcanize/third_party/rjsmin' \
- 'third_party/catapult/tracing' \
- 'third_party/catapult/tracing/third_party' \
- 'third_party/cld' \
- 'third_party/cros_system_api' \
- 'third_party/dom_distiller_js' \
- 'third_party/dom_distiller_js/dist/proto_gen/third_party/dom_distiller_js' \
- 'third_party/ffmpeg' \
- 'third_party/gardiner_mod' \
- 'third_party/fips181' \
- 'third_party/flot' \
- 'third_party/google_input_tools' \
- 'third_party/google_input_tools/third_party/closure_library' \
- 'third_party/google_input_tools/third_party/closure_library/third_party/closure' \
- 'third_party/hunspell' \
- 'third_party/iccjpeg' \
- 'third_party/icu/icu.isolate' \
- 'third_party/jinja2' \
- 'third_party/jstemplate' \
- 'third_party/khronos' \
- 'third_party/leveldatabase' \
- 'third_party/libaddressinput' \
- 'third_party/libjingle' \
- 'third_party/libphonenumber' \
- 'third_party/libsrtp' \
- 'third_party/libvpx' \
- 'third_party/libvpx/source/libvpx/third_party/x86inc' \
- 'third_party/libwebm' \
- 'third_party/libxml/chromium' \
- 'third_party/libXNVCtrl' \
- 'third_party/libyuv' \
- 'third_party/lss' \
- 'third_party/lzma_sdk' \
- 'third_party/markupsafe' \
- 'third_party/mesa' \
- 'third_party/modp_b64' \
- 'third_party/mt19937ar' \
- 'third_party/openh264' \
- 'third_party/openmax_dl' \
- 'third_party/opus' \
- 'third_party/ots' \
- 'third_party/pdfium' \
- 'third_party/pdfium/third_party' \
- 'third_party/ply' \
- 'third_party/polymer' \
- 'third_party/protobuf' \
- 'third_party/protobuf/third_party' \
- 'third_party/protobuf/third_party/six' \
- 'third_party/pywebsocket' \
- 'third_party/qcms' \
- 'third_party/qunit' \
- 'third_party/sfntly' \
- 'third_party/sinonjs' \
- 'third_party/skia' \
- 'third_party/smhasher' \
- 'third_party/sqlite' \
- 'third_party/tcmalloc' \
- 'third_party/tlslite' \
- 'third_party/usrsctp' \
- 'third_party/web-animations-js' \
- 'third_party/webdriver' \
- 'third_party/webrtc' \
- 'third_party/widevine' \
- 'third_party/woff2' \
- 'third_party/x86inc' \
- 'third_party/yasm' \
- 'third_party/zlib' \
- 'url/third_party/mozilla' \
- 'v8/src/third_party/valgrind' \
- 'v8/src/third_party/fdlibm' \
- --do-remove || ${FALSE}
- cd ${WRKSRC} && ${PYTHON_CMD} \
- ./build/linux/unbundle/replace_gyp_files.py \
- ${GYP_DEFINES:C/^/-D/} || ${FALSE}
- # allow removal of third_party/adobe
- ${ECHO_CMD} > ${WRKSRC}/flapper_version.h
- # missing file: file is in -testdata only, but configure stage
- # will fail if it's not there. do not break TESTS build while
- # allowing regular build without pulling in -testdata.
- ${TOUCH} ${WRKSRC}/chrome/test/data/webui/i18n_process_css_test.html
+ ./build/linux/unbundle/replace_gn_files.py --system-libraries \
+ flac harfbuzz-ng libwebp libxml libxslt snappy yasm || ${FALSE}
do-configure:
- cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \
- ./build/gyp_chromium chrome/chrome.gyp --depth .
+ # GN generator bootstrapping and generating ninja files
+ cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} ${PYTHON_CMD} \
+ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS}
+ cd ${WRKSRC} && ${SETENV} ./out/${BUILDTYPE}/gn \
+ gen --args='${GN_ARGS}' out/${BUILDTYPE}
test regression-test: build
.for t in ${TEST_TARGETS}
@@ -397,14 +246,17 @@
.endfor
${INSTALL_SCRIPT} ${WRKSRC}/chrome/tools/build/linux/chrome-wrapper \
${STAGEDIR}${DATADIR}
-.for p in chrome_100_percent content_resources keyboard_resources resources
+.for p in chrome_100_percent chrome_200_percent keyboard_resources resources
${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${p}.pak \
${STAGEDIR}${DATADIR}
.endfor
+.for d in icudtl.dat natives_blob.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 pseudo_locales resources" ${STAGEDIR}${DATADIR}
+ ${COPYTREE_SHARE} "locales resources" ${STAGEDIR}${DATADIR}
@${MKDIR} ${STAGEDIR}${DESKTOPDIR}
${INSTALL_DATA} ${WRKDIR}/chromium-browser.desktop \
${STAGEDIR}${DESKTOPDIR}
Index: head/www/chromium/distinfo
===================================================================
--- head/www/chromium/distinfo
+++ head/www/chromium/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1470404034
-SHA256 (chromium-52.0.2743.116.tar.xz) = a194ae1edb041024b3d4b6ba438f32fefdb6f1ecb24a96c50248a486b237a101
-SIZE (chromium-52.0.2743.116.tar.xz) = 458156660
-SHA256 (chromium-52.0.2743.116-testdata.tar.xz) = d3d059e1215702d8665f02b47a10e14458f54f423c323a9fcc987e6e43767c0b
-SIZE (chromium-52.0.2743.116-testdata.tar.xz) = 122423496
+TIMESTAMP = 1478859835
+SHA256 (chromium-54.0.2840.100.tar.xz) = e2e7f54a780c93ec2e933af09e1126837e6cf940b57213d39f36d58df10c89df
+SIZE (chromium-54.0.2840.100.tar.xz) = 479762112
+SHA256 (chromium-54.0.2840.100-testdata.tar.xz) = 44319fea6de4dbb1f6d0bbeeec633b69b7064f53a54893df5b720935a6d27460
+SIZE (chromium-54.0.2840.100-testdata.tar.xz) = 123519620
Index: head/www/chromium/files/extra-patch-10
===================================================================
--- head/www/chromium/files/extra-patch-10
+++ head/www/chromium/files/extra-patch-10
@@ -0,0 +1,10 @@
+--- content/renderer/devtools/v8_sampling_profiler.cc.orig 2016-10-06 04:02:19.000000000 +0300
++++ content/renderer/devtools/v8_sampling_profiler.cc 2016-10-30 03:00:33.775227000 +0300
+@@ -22,6 +22,7 @@
+
+ #if defined(OS_POSIX)
+ #include
++#include
+ #define USE_SIGNALS
+ #endif
+
Index: head/www/chromium/files/extra-patch-clang
===================================================================
--- head/www/chromium/files/extra-patch-clang
+++ head/www/chromium/files/extra-patch-clang
@@ -1,13 +1,14 @@
---- base/strings/safe_sprintf_unittest.cc 2015-04-15 00:18:48.000000000 +0200
-+++ base/strings/safe_sprintf_unittest.cc 2015-04-18 22:08:45.000000000 +0200
-@@ -729,12 +729,14 @@
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wconversion-null"
- #endif
+--- base/strings/safe_sprintf_unittest.cc.orig 2016-10-06 04:02:08.000000000 +0300
++++ base/strings/safe_sprintf_unittest.cc 2016-10-25 21:42:28.951114000 +0300
+@@ -728,6 +728,7 @@
+ }
+
+ TEST(SafeSPrintfTest, EmitNULL) {
+/* Avoid compiler error: http://pastebin.com/1edWUE84
- EXPECT_EQ(1, SafeSPrintf(buf, "%d", NULL));
- EXPECT_EQ("0", std::string(buf));
- EXPECT_EQ(3, SafeSPrintf(buf, "%p", NULL));
+ char buf[40];
+ #if defined(__GNUC__)
+ #pragma GCC diagnostic push
+@@ -739,6 +740,7 @@
EXPECT_EQ("0x0", std::string(buf));
EXPECT_EQ(6, SafeSPrintf(buf, "%s", NULL));
EXPECT_EQ("", std::string(buf));
@@ -41,7 +42,7 @@
+++ base/tracked_objects_unittest.cc 2015-09-03 09:20:53.370191000 -0400
@@ -58,9 +58,9 @@
Births* birth = ThreadData::TallyABirthIfActive(location);
-
+
if (ThreadData::status() == ThreadData::DEACTIVATED)
- EXPECT_EQ(reinterpret_cast(NULL), birth);
+ EXPECT_EQ(static_cast(NULL), birth);
@@ -49,7 +50,7 @@
- EXPECT_NE(reinterpret_cast(NULL), birth);
+ EXPECT_NE(static_cast(NULL), birth);
}
-
+
// Helper function to verify the most common test expectations.
--- components/sync_sessions/synced_session_tracker.cc.orig 2016-01-21 13:04:41.772845558 +0100
+++ components/sync_sessions/synced_session_tracker.cc 2016-01-21 13:05:17.652842509 +0100
@@ -70,34 +71,34 @@
.Times(2)
- .WillRepeatedly(Return(reinterpret_cast(NULL)));
+ .WillRepeatedly(Return(static_cast(NULL)));
-
+
EXPECT_CALL(callback_, OnError(_))
.Times(2);
--- third_party/hunspell/src/hunspell/affentry.hxx.orig 2015-07-21 18:46:37.322427000 -0400
+++ third_party/hunspell/src/hunspell/affentry.hxx 2015-07-21 18:48:02.034251000 -0400
@@ -27,7 +27,7 @@
- struct hentry * checkword(const char * word, int len, char in_compound,
+ struct hentry * checkword(const char * word, int len, char in_compound,
const FLAG needflag = FLAG_NULL);
-
+
- struct hentry * check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
+ struct hentry * check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = 0);
-
+
char * check_morph(const char * word, int len, char in_compound,
const FLAG needflag = FLAG_NULL);
@@ -90,7 +90,7 @@
// const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, char in_compound=IN_CPD_NOT);
const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, const FLAG badflag = 0);
-
+
- struct hentry * check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
+ struct hentry * check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = 0);
-
+
char * check_twosfx_morph(const char * word, int len, int optflags,
PfxEntry* ppfx, const FLAG needflag = FLAG_NULL);
--- third_party/sfntly/src/cpp/src/sfntly/table/core/cmap_table.cc 2015-04-15 00:31:48.000000000 +0200
+++ third_party/sfntly/src/cpp/src/sfntly/table/core/cmap_table.cc 2015-04-18 22:05:41.000000000 +0200
@@ -439,7 +439,7 @@
}
-
+
CMapTable::CMapFormat0::Builder::Builder(const CMapId& cmap_id)
- : CMap::Builder(reinterpret_cast(NULL),
+ : CMap::Builder(static_cast(NULL),
@@ -133,13 +134,13 @@
glyph_id_array_(glyph_id_array->begin(), glyph_id_array->end()) {
@@ -966,7 +966,7 @@
}
-
+
CMapTable::CMapFormat4::Builder::Builder(const CMapId& cmap_id)
- : CMap::Builder(reinterpret_cast(NULL),
+ : CMap::Builder(static_cast(NULL),
CMapFormat::kFormat4, cmap_id) {
}
-
+
--- third_party/webrtc/base/taskrunner.cc 2015-04-15 00:32:17.000000000 +0200
+++ third_party/webrtc/base/taskrunner.cc 2015-04-18 22:10:53.000000000 +0200
@@ -102,7 +102,7 @@
@@ -148,6 +149,6 @@
tasks_.end(),
- reinterpret_cast(NULL));
+ static_cast(NULL));
-
+
tasks_.erase(it, tasks_.end());
-
+
Index: head/www/chromium/files/extra-patch-fixup-ffmpeg
===================================================================
--- head/www/chromium/files/extra-patch-fixup-ffmpeg
+++ head/www/chromium/files/extra-patch-fixup-ffmpeg
@@ -1,18 +0,0 @@
---- third_party/ffmpeg/ffmpeg.gyp.orig 2014-10-27 20:27:40.000000000 +0100
-+++ third_party/ffmpeg/ffmpeg.gyp 2014-11-06 22:53:10.000000000 +0100
-@@ -213,6 +213,15 @@
- 'cflags!': [
- '-fno-omit-frame-pointer',
- ],
-+ # "Tomek" from freebsd-chromium@ figured this out, rene is
-+ # puzzled why this is needed. Fixes runtime on FreeBSD < 10
-+ 'cflags_c': [
-+ '-fomit-frame-pointer',
-+ ],
-+ 'cflags_cc': [
-+ '-fomit-frame-pointer',
-+ ],
-+ # back to upstream code
- 'debug_extra_cflags!': [
- '-fno-omit-frame-pointer',
- ],
Index: head/www/chromium/files/extra-patch-gcc
===================================================================
--- head/www/chromium/files/extra-patch-gcc
+++ head/www/chromium/files/extra-patch-gcc
@@ -3,27 +3,27 @@
@@ -5,6 +5,7 @@
#ifndef MEDIA_FILTERS_FILE_DATA_SOURCE_H_
#define MEDIA_FILTERS_FILE_DATA_SOURCE_H_
-
+
+#include
#include
-
+
#include "base/files/file.h"
--- content/public/common/child_process_sandbox_support_linux.h.orig 2013-10-11 19:30:28.000000000 +0200
+++ content/public/common/child_process_sandbox_support_linux.h 2013-10-16 15:29:00.000000000 +0200
@@ -7,6 +7,7 @@
-
+
#include
#include
+#include
-
+
#include "content/common/content_export.h"
-
+
--- third_party/ffmpeg/libavutil/cpu.c.orig 2013-11-16 01:26:14.000000000 +0100
+++ third_party/ffmpeg/libavutil/cpu.c 2013-11-19 00:24:53.000000000 +0100
@@ -24,6 +24,9 @@
#include "opt.h"
#include "common.h"
-
+
+/* TODO(rene) work around a compile error with GCC 4.6.4 on FreeBSD */
+#define __BSD_VISIBLE 1
+
@@ -35,22 +35,22 @@
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
+
+#include
+
#include "content/browser/browser_shutdown_profile_dumper.h"
-
+
#include "base/base_switches.h"
--- testing/perf/perf_test.cc 2014-03-03 12:59:30.000000000 -0500
+++ testing/perf/perf_test.cc.orig 2014-02-20 15:28:27.000000000 -0500
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
+
+#include
+
#include "testing/perf/perf_test.h"
-
+
-#include
-
#include "base/logging.h"
@@ -59,7 +59,7 @@
--- ui/gfx/codec/jpeg_codec.cc.orig 2014-10-02 19:19:03.000000000 +0200
+++ ui/gfx/codec/jpeg_codec.cc 2014-10-05 22:38:28.000000000 +0200
@@ -13,6 +13,7 @@
-
+
extern "C" {
#if defined(USE_SYSTEM_LIBJPEG)
+#include
@@ -70,77 +70,44 @@
+++ third_party/webrtc/common_audio/wav_file.h 2014-10-18 12:04:03.000000000 +0200
@@ -14,6 +14,7 @@
#ifdef __cplusplus
-
+
#include
+#include
#include
#include
-
+
--- v8/src/base/platform/platform.h.orig 2015-01-27 03:22:59.000000000 +0100
+++ v8/src/base/platform/platform.h 2015-01-28 18:37:43.268781292 +0100
@@ -22,6 +22,7 @@
#define V8_BASE_PLATFORM_PLATFORM_H_
-
+
#include
+#include
#include
#include
-
+
--- v8/src/compiler/graph-visualizer.cc.orig 2015-04-28 22:29:10.000000000 +0200
+++ v8/src/compiler/graph-visualizer.cc 2015-05-02 21:01:32.086593000 +0200
@@ -5,6 +5,7 @@
#include "src/compiler/graph-visualizer.h"
-
+
#include
+#include
#include
-
+
#include "src/code-stubs.h"
-@@ -25,7 +26,7 @@
- namespace compiler {
-
-
--FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase,
-+std::FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase,
- const char* suffix, const char* mode) {
- EmbeddedVector filename;
- SmartArrayPointer function_name;
--- third_party/ffmpeg/libavutil/autorename_libavutil_cpu.c.orig 2015-07-24 22:27:11.000000000 +0200
+++ third_party/ffmpeg/libavutil/autorename_libavutil_cpu.c 2015-07-26 17:38:40.937606000 +0200
-@@ -34,6 +34,7 @@
- #include
- #endif
- #if HAVE_SYSCTL
+@@ -1,2 +1,3 @@
+ // File automatically generated. See crbug.com/495833.
+#define __BSD_VISIBLE 1
- #if HAVE_SYS_PARAM_H
- #include
- #endif
---- v8/src/compiler/graph-visualizer.h.orig 2015-07-24 22:28:03.000000000 +0200
-+++ v8/src/compiler/graph-visualizer.h 2015-07-26 18:37:45.488253000 +0200
-@@ -5,7 +5,7 @@
- #ifndef V8_COMPILER_GRAPH_VISUALIZER_H_
- #define V8_COMPILER_GRAPH_VISUALIZER_H_
-
--#include
-+#include
- #include
-
- namespace v8 {
-@@ -21,7 +21,7 @@
- class Schedule;
- class SourcePositionTable;
-
--FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase,
-+std::FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase,
- const char* suffix, const char* mode);
-
- struct AsDOT {
+ #include "cpu.c"
--- v8/src/log-utils.h.orig 2015-10-13 21:04:45.000000000 +0200
+++ v8/src/log-utils.h 2015-10-17 10:17:35.535561000 +0200
@@ -5,6 +5,9 @@
#ifndef V8_LOG_UTILS_H_
#define V8_LOG_UTILS_H_
-
+
+#include
+#include
+
@@ -151,7 +118,7 @@
+++ third_party/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc 2015-11-01 11:32:36.293750000 +0100
@@ -11,6 +11,7 @@
#include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h"
-
+
#include
+#include
#include
@@ -162,15 +129,15 @@
@@ -42,7 +42,7 @@
else if (hue * 3.0 < 2.0)
result = temp1 + (temp2 - temp1) * (2.0 / 3.0 - hue) * 6.0;
-
+
- return static_cast(std::round(result * 255));
+ return static_cast(round(result * 255));
}
-
+
// Assumes sRGB.
@@ -85,7 +85,7 @@
}
-
+
uint8_t GetLuma(SkColor color) {
- return static_cast(std::round((0.299 * SkColorGetR(color)) +
+ return static_cast(round((0.299 * SkColorGetR(color)) +
@@ -188,12 +155,12 @@
+ static_cast(round(g)),
+ static_cast(round(b)));
}
-
+
void BuildLumaHistogram(const SkBitmap& bitmap, int histogram[256]) {
@@ -275,10 +275,10 @@
double b = (SkColorGetB(foreground) * f_weight +
SkColorGetB(background) * b_weight) / 255.0;
-
+
- return SkColorSetARGB(static_cast(std::round(normalizer)),
- static_cast(std::round(r)),
- static_cast(std::round(g)),
@@ -203,18 +170,18 @@
+ static_cast(round(g)),
+ static_cast(round(b)));
}
-
+
bool IsDark(SkColor color) {
--- media/filters/audio_clock.cc.orig 2016-04-07 11:55:00.678817033 +0200
+++ media/filters/audio_clock.cc 2016-04-07 11:55:28.152814716 +0200
@@ -121,7 +121,7 @@
}
-
+
return base::TimeDelta::FromMicroseconds(
- std::round(frames_until_timestamp * microseconds_per_frame_));
+ round(frames_until_timestamp * microseconds_per_frame_));
}
-
+
void AudioClock::ContiguousAudioDataBufferedForTesting(
--- media/filters/audio_clock.h.orig 2016-04-08 14:22:02.833940146 +0200
+++ media/filters/audio_clock.h 2016-04-08 14:22:14.433876920 +0200
@@ -230,7 +197,7 @@
- std::round(back_timestamp_micros_));
+ round(back_timestamp_micros_));
}
-
+
// Returns the amount of wall time until |timestamp| will be played by the
--- content/browser/web_contents/web_contents_impl.cc.orig 2016-04-08 15:44:21.989537858 +0200
+++ content/browser/web_contents/web_contents_impl.cc 2016-04-08 15:44:44.574535099 +0200
@@ -246,7 +213,7 @@
--- chrome/browser/ui/views/frame/browser_root_view.cc.orig 2016-04-08 17:23:19.749128496 +0200
+++ chrome/browser/ui/views/frame/browser_root_view.cc 2016-04-08 17:23:30.609126494 +0200
@@ -139,10 +139,10 @@
-
+
// Number of integer scroll events that have passed in each direction.
int whole_scroll_amount_x =
- std::lround(static_cast(scroll_remainder_x_) /
@@ -256,16 +223,16 @@
- std::lround(static_cast(scroll_remainder_y_) /
+ lround(static_cast(scroll_remainder_y_) /
ui::MouseWheelEvent::kWheelDelta);
-
+
// Adjust the remainder such that any whole scrolls we have taken action
--- base/process/memory.h.orig 2016-06-06 21:05:12.000000000 +0200
+++ base/process/memory.h 2016-06-12 20:04:24.000000000 +0200
@@ -6,6 +6,7 @@
#define BASE_PROCESS_MEMORY_H_
-
+
#include
+#include
-
+
#include "base/base_export.h"
#include "base/process/process_handle.h"
--- media/audio/audio_output_device.cc.orig 2016-06-06 21:05:19.000000000 +0200
@@ -278,61 +245,39 @@
+ render_callback_->Render(output_bus_.get(), round(frames_delayed),
frames_skipped);
}
-
+
--- media/audio/audio_output_stream_sink.cc.orig 2016-06-06 21:05:19.000000000 +0200
+++ media/audio/audio_output_stream_sink.cc 2016-06-12 20:35:05.000000000 +0200
@@ -85,7 +85,7 @@
if (!active_render_callback_)
return 0;
-
+
- uint32_t frames_delayed = std::round(static_cast(total_bytes_delay) /
+ uint32_t frames_delayed = round(static_cast(total_bytes_delay) /
active_params_.GetBytesPerFrame());
-
+
return active_render_callback_->Render(dest, frames_delayed, frames_skipped);
---- media/base/audio_renderer_mixer_input.cc.orig 2016-06-06 21:05:19.000000000 +0200
-+++ media/base/audio_renderer_mixer_input.cc 2016-06-12 20:50:35.000000000 +0200
-@@ -164,7 +164,7 @@
- // TODO(chcunningham): Delete this conversion and change ProvideInput to more
- // precisely describe delay as a count of frames delayed instead of TimeDelta.
- // See http://crbug.com/587522.
-- uint32_t frames_delayed = std::round(buffer_delay.InMicroseconds() /
-+ uint32_t frames_delayed = round(buffer_delay.InMicroseconds() /
- params_.GetMicrosecondsPerFrame());
-
- int frames_filled = callback_->Render(audio_bus, frames_delayed, 0);
---- media/base/audio_renderer_mixer.cc.orig 2016-06-06 21:05:19.000000000 +0200
-+++ media/base/audio_renderer_mixer.cc 2016-06-12 20:52:34.000000000 +0200
-@@ -138,7 +138,7 @@
- // expect a count of frames delayed instead of TimeDelta (less precise).
- // See http://crbug.com/587522.
- base::TimeDelta audio_delay = base::TimeDelta::FromMicroseconds(
-- std::round(frames_delayed * output_params_.GetMicrosecondsPerFrame()));
-+ round(frames_delayed * output_params_.GetMicrosecondsPerFrame()));
-
- master_converter_.ConvertWithDelay(audio_delay, audio_bus);
- return audio_bus->frames();
--- third_party/WebKit/Source/modules/battery/battery_status.h.orig 2016-06-06 21:05:36.000000000 +0200
+++ third_party/WebKit/Source/modules/battery/battery_status.h 2016-06-13 20:21:31.000000000 +0200
@@ -46,7 +46,7 @@
// of reducing the possibility of fingerprinting and triggers less level
// change events on platforms where the granularity is high.
- ASSERT(level >= 0 && level <= 1);
+ DCHECK(level >= 0 && level <= 1);
- return std::round(level * 100) / 100.f;
+ return round(level * 100) / 100.f;
}
-
+
bool charging_;
--- chrome/common/channel_info_posix.cc.orig 2016-06-06 21:05:14.000000000 +0200
+++ chrome/common/channel_info_posix.cc 2016-06-13 21:36:53.000000000 +0200
@@ -8,6 +8,8 @@
#include "build/build_config.h"
#include "components/version_info/version_info.h"
-
+
+#include
+
namespace chrome {
-
+
namespace {
--- chrome/browser/ui/views/tabs/tab_strip.cc.orig 2016-06-06 21:05:14.000000000 +0200
+++ chrome/browser/ui/views/tabs/tab_strip.cc 2016-06-13 22:03:03.000000000 +0200
@@ -360,3 +305,13 @@
CreateShadowDrawLooper(SkColorSetA(stroke_color, alpha)));
canvas->DrawPath(fill, paint);
+--- base/trace_event/heap_profiler_allocation_context_tracker.cc.orig 2016-08-03 22:02:10.000000000 +0300
++++ base/trace_event/heap_profiler_allocation_context_tracker.cc 2016-08-21 04:17:53.717876000 +0300
+@@ -13,6 +13,7 @@
+ #include "base/threading/thread_local_storage.h"
+ #include "base/trace_event/heap_profiler_allocation_context.h"
+
++#include
+ #if defined(OS_LINUX) || defined(OS_ANDROID)
+ #include
+ #endif
Index: head/www/chromium/files/extra-patch-libusb-pc
===================================================================
--- head/www/chromium/files/extra-patch-libusb-pc
+++ head/www/chromium/files/extra-patch-libusb-pc
@@ -1,20 +0,0 @@
---- build/linux/unbundle/libusb.gyp.orig 2014-08-12 21:02:52.000000000 +0200
-+++ build/linux/unbundle/libusb.gyp 2014-08-17 16:21:03.000000000 +0200
-@@ -18,14 +18,14 @@
- ],
- 'direct_dependent_settings': {
- 'cflags': [
-- '
++#include
++#include
+
+ // This translation unit defines a default dispatch for the allocator shim which
+ // routes allocations to libc functions.
+-// The code here is strongly inspired from tcmalloc's libc_override_glibc.h.
++// The code here is strongly inspired from tcmalloc's override_glibc.h.
+
+ extern "C" {
+-void* __libc_malloc(size_t size);
+-void* __libc_calloc(size_t n, size_t size);
+-void* __libc_realloc(void* address, size_t size);
+-void* __libc_memalign(size_t alignment, size_t size);
+-void __libc_free(void* ptr);
++void* __malloc(size_t size);
++void* __calloc(size_t n, size_t size);
++void* __realloc(void* address, size_t size);
++void* __memalign(size_t alignment, size_t size) {
++ void *ret;
++ if (__posix_memalign(&ret, alignment, size) != 0) {
++ return nullptr;
++ } else {
++ return ret;
++ }
++}
++int __posix_memalign(void **ptr, size_t alignment, size_t size);
++void __free(void* ptr);
+ } // extern "C"
+
+ namespace {
+@@ -21,23 +32,27 @@
+ using base::allocator::AllocatorDispatch;
+
+ void* GlibcMalloc(const AllocatorDispatch*, size_t size) {
+- return __libc_malloc(size);
++ return __malloc(size);
+ }
+
+ void* GlibcCalloc(const AllocatorDispatch*, size_t n, size_t size) {
+- return __libc_calloc(n, size);
++ return __calloc(n, size);
+ }
+
+ void* GlibcRealloc(const AllocatorDispatch*, void* address, size_t size) {
+- return __libc_realloc(address, size);
++ return __realloc(address, size);
+ }
+
+ void* GlibcMemalign(const AllocatorDispatch*, size_t alignment, size_t size) {
+- return __libc_memalign(alignment, size);
++ return __memalign(alignment, size);
+ }
+
++/* int GlibcPosixMemalign(const AllocatorDispatch*, void** ptr, size_t alignment, size_t size) { */
++/* return __posix_memalign(ptr, alignment, size); */
++/* } */
++
+ void GlibcFree(const AllocatorDispatch*, void* address) {
+- __libc_free(address);
++ __free(address);
+ }
+
+ } // namespace
Index: head/www/chromium/files/patch-base_allocator_allocator__shim__override__libc__symbols.h
===================================================================
--- head/www/chromium/files/patch-base_allocator_allocator__shim__override__libc__symbols.h
+++ head/www/chromium/files/patch-base_allocator_allocator__shim__override__libc__symbols.h
@@ -0,0 +1,11 @@
+--- base/allocator/allocator_shim_override_libc_symbols.h.orig 2016-08-13 16:23:28.370905000 +0300
++++ base/allocator/allocator_shim_override_libc_symbols.h 2016-08-13 16:23:33.784774000 +0300
+@@ -10,7 +10,7 @@
+ #endif
+ #define BASE_ALLOCATOR_ALLOCATOR_SHIM_OVERRIDE_LIBC_SYMBOLS_H_
+
+-#include
++#include
+
+ #include "base/allocator/allocator_shim_internals.h"
+
Index: head/www/chromium/files/patch-base_allocator_allocator__shim__unittest.cc
===================================================================
--- head/www/chromium/files/patch-base_allocator_allocator__shim__unittest.cc
+++ head/www/chromium/files/patch-base_allocator_allocator__shim__unittest.cc
@@ -0,0 +1,61 @@
+--- base/allocator/allocator_shim_unittest.cc.orig 2016-10-06 04:02:08.000000000 +0300
++++ base/allocator/allocator_shim_unittest.cc 2016-10-25 21:48:23.218013000 +0300
+@@ -4,7 +4,6 @@
+
+ #include "base/allocator/allocator_shim.h"
+
+-#include
+ #include
+ #include
+
+@@ -193,11 +192,13 @@
+ ASSERT_GE(zero_allocs_intercepted_by_size[2 * 23], 1u);
+
+ #if !defined(OS_WIN)
++#if !defined(OS_BSD)
+ void* memalign_ptr = memalign(128, 53);
+ ASSERT_NE(nullptr, memalign_ptr);
+ ASSERT_EQ(0u, reinterpret_cast(memalign_ptr) % 128);
+ ASSERT_GE(aligned_allocs_intercepted_by_alignment[128], 1u);
+ ASSERT_GE(aligned_allocs_intercepted_by_size[53], 1u);
++#endif
+
+ void* posix_memalign_ptr = nullptr;
+ int res = posix_memalign(&posix_memalign_ptr, 256, 59);
+@@ -214,12 +215,14 @@
+ ASSERT_GE(aligned_allocs_intercepted_by_alignment[kPageSize], 1u);
+ ASSERT_GE(aligned_allocs_intercepted_by_size[61], 1u);
+
++#if !defined(OS_BSD)
+ void* pvalloc_ptr = pvalloc(67);
+ ASSERT_NE(nullptr, pvalloc_ptr);
+ ASSERT_EQ(0u, reinterpret_cast(pvalloc_ptr) % kPageSize);
+ ASSERT_GE(aligned_allocs_intercepted_by_alignment[kPageSize], 1u);
+ // pvalloc rounds the size up to the next page.
+ ASSERT_GE(aligned_allocs_intercepted_by_size[kPageSize], 1u);
++#endif
+ #endif // OS_WIN
+
+ char* realloc_ptr = static_cast(realloc(nullptr, 71));
+@@ -240,8 +243,10 @@
+ ASSERT_GE(frees_intercepted_by_addr[Hash(zero_alloc_ptr)], 1u);
+
+ #if !defined(OS_WIN)
++#if !defined(OS_BSD)
+ free(memalign_ptr);
+ ASSERT_GE(frees_intercepted_by_addr[Hash(memalign_ptr)], 1u);
++#endif
+
+ free(posix_memalign_ptr);
+ ASSERT_GE(frees_intercepted_by_addr[Hash(posix_memalign_ptr)], 1u);
+@@ -249,8 +254,10 @@
+ free(valloc_ptr);
+ ASSERT_GE(frees_intercepted_by_addr[Hash(valloc_ptr)], 1u);
+
++#if !defined(OS_BSD)
+ free(pvalloc_ptr);
+ ASSERT_GE(frees_intercepted_by_addr[Hash(pvalloc_ptr)], 1u);
++#endif
+ #endif // OS_WIN
+
+ free(realloc_ptr);
Index: head/www/chromium/files/patch-base_base.gyp
===================================================================
--- head/www/chromium/files/patch-base_base.gyp
+++ head/www/chromium/files/patch-base_base.gyp
@@ -1,40 +0,0 @@
---- ./base/base.gyp.orig 2016-07-22 00:06:49.000000000 -0400
-+++ ./base/base.gyp 2016-08-05 08:28:39.441243000 -0400
-@@ -114,7 +114,7 @@
- ],
- 'link_settings': {
- 'libraries': [
-- '-L/usr/local/lib -lexecinfo',
-+ '-L/usr/local/lib -lexecinfo -lkvm',
- ],
- },
- }],
-@@ -286,13 +286,13 @@
- ],
- }],
- ['icu_use_data_file_flag==1', {
-- 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'],
-+ 'defines': ['ICU_UTIL_DATA_IMPL=0'],
- }, { # else icu_use_data_file_flag !=1
- 'conditions': [
- ['OS=="win"', {
-- 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'],
-+ 'defines': ['ICU_UTIL_DATA_IMPL=1'],
- }, {
-- 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'],
-+ 'defines': ['ICU_UTIL_DATA_IMPL=2'],
- }],
- ],
- }],
-@@ -773,6 +773,11 @@
- 'sync_socket_unittest.cc',
- ],
- }],
-+ ['OS == "freebsd"', {
-+ 'sources!': [
-+ 'debug/proc_maps_linux_unittest.cc',
-+ ],
-+ }],
- ], # target_conditions
- },
- {
Index: head/www/chromium/files/patch-base_base.gypi
===================================================================
--- head/www/chromium/files/patch-base_base.gypi
+++ head/www/chromium/files/patch-base_base.gypi
@@ -1,20 +0,0 @@
---- base/base.gypi.orig 2016-05-11 19:02:11 UTC
-+++ base/base.gypi
-@@ -999,11 +999,16 @@
- 'process/memory_stubs.cc',
- ],
- 'sources/': [
-+ ['exclude', '^debug/proc_maps_linux\\.cc$'],
- ['exclude', '^files/file_path_watcher_linux\\.cc$'],
-- ['exclude', '^files/file_path_watcher_stub\\.cc$'],
- ['exclude', '^files/file_util_linux\\.cc$'],
-+ ['exclude', '^process/memory_linux\\.cc$'],
- ['exclude', '^process/process_linux\\.cc$'],
- ['exclude', '^sys_info_linux\\.cc$'],
-+ ['exclude', '^process/process_iterator_linux\\.cc$'],
-+ ['exclude', '^process/process_metrics_linux\\.cc$'],
-+ ['exclude', '^files/file_path_watcher_fsevents\\.cc$'],
-+ ['exclude', '^files/file_path_watcher_fsevents\\.h$'],
- ],
- }],
- # Remove all unnecessary files for build_nexe.py to avoid exceeding
Index: head/www/chromium/files/patch-base_debug_proc__maps__linux.cc
===================================================================
--- head/www/chromium/files/patch-base_debug_proc__maps__linux.cc
+++ head/www/chromium/files/patch-base_debug_proc__maps__linux.cc
@@ -0,0 +1,11 @@
+--- base/debug/proc_maps_linux.cc.orig 2016-08-03 22:02:10.000000000 +0300
++++ base/debug/proc_maps_linux.cc 2016-09-05 22:49:53.622055000 +0300
+@@ -12,7 +12,7 @@
+ #include "base/strings/string_split.h"
+ #include "build/build_config.h"
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_ANDROID)
+ #include
+ #endif
+
Index: head/www/chromium/files/patch-base_files_file__path__unittest.cc
===================================================================
--- head/www/chromium/files/patch-base_files_file__path__unittest.cc
+++ head/www/chromium/files/patch-base_files_file__path__unittest.cc
@@ -0,0 +1,11 @@
+--- base/files/file_path_unittest.cc.orig 2016-10-06 04:02:08.000000000 +0300
++++ base/files/file_path_unittest.cc 2016-10-25 21:44:53.079388000 +0300
+@@ -1133,7 +1133,7 @@
+ "\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
+++ head/www/chromium/files/patch-base_files_file__util.h
@@ -0,0 +1,11 @@
+--- base/files/file_util.h.orig 2016-08-03 22:02:10.000000000 +0300
++++ base/files/file_util.h 2016-09-05 23:00:09.940024000 +0300
+@@ -391,7 +391,7 @@
+ // 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)
++#if defined(OS_LINUX) || 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_linux__util.cc
===================================================================
--- head/www/chromium/files/patch-base_linux__util.cc
+++ head/www/chromium/files/patch-base_linux__util.cc
@@ -0,0 +1,18 @@
+--- base/linux_util.cc.orig 2016-08-13 05:03:14.838982000 +0300
++++ base/linux_util.cc 2016-08-13 05:04:48.912092000 +0300
+@@ -86,12 +86,14 @@
+ "CrOS";
+ #elif defined(OS_ANDROID)
+ "Android";
++#elif defined(OS_BSD)
++ "BSD";
+ #else // if defined(OS_LINUX)
+ "Unknown";
+ #endif
+
+ std::string GetLinuxDistro() {
+-#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
++#if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD)
+ return g_linux_distro;
+ #elif defined(OS_LINUX)
+ LinuxDistroHelper* distro_state_singleton = LinuxDistroHelper::GetInstance();
Index: head/www/chromium/files/patch-base_native__library__posix.cc
===================================================================
--- head/www/chromium/files/patch-base_native__library__posix.cc
+++ head/www/chromium/files/patch-base_native__library__posix.cc
@@ -0,0 +1,11 @@
+--- base/native_library_posix.cc.orig 2016-10-06 04:02:08.000000000 +0300
++++ base/native_library_posix.cc 2016-10-14 03:14:48.329757000 +0300
+@@ -35,7 +35,7 @@
+ // versions. Crash here to warn developers that they're trying to rely on
+ // uncertain behavior.
+ CHECK(!options.prefer_own_symbols);
+-#else
++#elif !defined(OS_BSD)
+ if (options.prefer_own_symbols)
+ flags |= RTLD_DEEPBIND;
+ #endif
Index: head/www/chromium/files/patch-base_posix_unix__domain__socket__linux.cc
===================================================================
--- head/www/chromium/files/patch-base_posix_unix__domain__socket__linux.cc
+++ head/www/chromium/files/patch-base_posix_unix__domain__socket__linux.cc
@@ -1,10 +1,10 @@
---- base/posix/unix_domain_socket_linux.cc.orig 2016-03-25 13:04:44 UTC
-+++ base/posix/unix_domain_socket_linux.cc
+--- base/posix/unix_domain_socket_linux.cc.orig 2016-08-03 22:02:10.000000000 +0300
++++ base/posix/unix_domain_socket_linux.cc 2016-09-06 23:39:53.563078000 +0300
@@ -23,6 +23,15 @@
namespace base {
-+#if defined(__FreeBSD__)
++#if defined(OS_BSD)
+// Port over Linux ucred structure
+struct ucred {
+ pid_t pid; // process ID of the sending process
@@ -16,25 +16,26 @@
const size_t UnixDomainSocket::kMaxFileDescriptors = 16;
#if !defined(OS_NACL_NONSFI)
-@@ -41,7 +50,13 @@ static bool CreateSocketPair(ScopedFD* o
+@@ -40,8 +49,14 @@
+
// static
bool UnixDomainSocket::EnableReceiveProcessId(int fd) {
- const int enable = 1;
-+#if defined(__FreeBSD__)
++#if defined(OS_BSD)
+ // XXX(rene) do this? :
+ // taken from dbus, Academic Free License 2.1 / GPL 2+
+ return 0; // fake OK
+#else
+ const int enable = 1;
return setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable)) == 0;
+#endif
}
#endif // !defined(OS_NACL_NONSFI)
-@@ -147,7 +162,11 @@ ssize_t UnixDomainSocket::RecvMsgWithFla
+@@ -147,7 +162,11 @@
// The PNaCl toolchain for Non-SFI binary build does not support
// SCM_CREDENTIALS.
if (cmsg->cmsg_level == SOL_SOCKET &&
-+#if defined(__FreeBSD__)
++#if defined(OS_BSD)
+ 1) { // XXX(rene) carpet getting full ...
+#else
cmsg->cmsg_type == SCM_CREDENTIALS) {
Index: head/www/chromium/files/patch-base_process_launch.h
===================================================================
--- head/www/chromium/files/patch-base_process_launch.h
+++ head/www/chromium/files/patch-base_process_launch.h
@@ -1,20 +1,20 @@
---- base/process/launch.h.orig 2016-05-11 19:02:11 UTC
-+++ base/process/launch.h
-@@ -135,7 +135,7 @@ struct BASE_EXPORT LaunchOptions {
+--- base/process/launch.h.orig 2016-10-06 04:02:08.000000000 +0300
++++ base/process/launch.h 2016-10-13 04:27:24.908534000 +0300
+@@ -138,7 +138,7 @@
// will be the same as its pid.
- bool new_process_group;
+ bool new_process_group = false;
-#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_FREEBSD)
++#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
-@@ -148,7 +148,7 @@ struct BASE_EXPORT LaunchOptions {
+@@ -151,7 +151,7 @@
// Sets parent process death signal to SIGKILL.
- bool kill_on_parent_death;
+ bool kill_on_parent_death = false;
-#endif // defined(OS_LINUX)
-+#endif // defined(OS_LINUX) || defined(OS_FREEBSD)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
#if defined(OS_POSIX)
- // If not empty, change to this directory before execing the new process.
+ // If non-null, a delegate to be run immediately prior to executing the new
Index: head/www/chromium/files/patch-base_process_launch.cc
===================================================================
--- head/www/chromium/files/patch-base_process_launch.cc
+++ head/www/chromium/files/patch-base_process_launch.cc
@@ -1,16 +1,11 @@
---- base/process/launch.cc.orig 2016-04-08 16:02:06 UTC
-+++ base/process/launch.cc
-@@ -25,11 +25,11 @@ LaunchOptions::LaunchOptions()
- fds_to_remap(NULL),
- maximize_rlimits(NULL),
- new_process_group(false)
+--- base/process/launch.cc.orig 2016-10-06 04:02:08.000000000 +0300
++++ base/process/launch.cc 2016-10-13 04:27:47.136877000 +0300
+@@ -15,7 +15,7 @@
+
+ LaunchOptions LaunchOptionsForTest() {
+ LaunchOptions options;
-#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_FREEBSD)
- , clone_flags(0)
- , allow_new_privs(false)
- , kill_on_parent_death(false)
--#endif // OS_LINUX
-+#endif // OS_LINUX || OS_FREEBSD
- #if defined(OS_POSIX)
- , pre_exec_delegate(NULL)
- #endif // OS_POSIX
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // To prevent accidental privilege sharing to an untrusted child, processes
+ // are started with PR_SET_NO_NEW_PRIVS. Do not set that here, since this
+ // new child will be used for testing only.
Index: head/www/chromium/files/patch-base_process_launch__posix.cc
===================================================================
--- head/www/chromium/files/patch-base_process_launch__posix.cc
+++ head/www/chromium/files/patch-base_process_launch__posix.cc
@@ -0,0 +1,10 @@
+--- base/process/launch_posix.cc.orig 2016-10-06 04:02:08.000000000 +0300
++++ base/process/launch_posix.cc 2016-10-16 15:45:00.730008000 +0300
+@@ -62,6 +62,7 @@
+ #include
+ #else
+ extern char** environ;
++#pragma weak environ
+ #endif
+
+ namespace base {
Index: head/www/chromium/files/patch-base_process_memory.h
===================================================================
--- head/www/chromium/files/patch-base_process_memory.h
+++ head/www/chromium/files/patch-base_process_memory.h
@@ -0,0 +1,11 @@
+--- base/process/memory.h.orig 2016-08-03 22:02:10.000000000 +0300
++++ base/process/memory.h 2016-09-11 01:10:36.394804000 +0300
+@@ -32,7 +32,7 @@
+ // Crash reporting classifies such crashes as OOM.
+ BASE_EXPORT void TerminateBecauseOutOfMemory(size_t size);
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_ANDROID)
+ BASE_EXPORT extern size_t g_oom_size;
+
+ // The maximum allowed value for the OOM score.
Index: head/www/chromium/files/patch-base_process_memory.cc
===================================================================
--- head/www/chromium/files/patch-base_process_memory.cc
+++ head/www/chromium/files/patch-base_process_memory.cc
@@ -1,39 +0,0 @@
---- base/process/memory.cc.orig 2016-03-25 13:04:44 UTC
-+++ base/process/memory.cc
-@@ -46,4 +46,36 @@ bool UncheckedCalloc(size_t num_items, s
-
- #endif
-
-+#if defined(OS_FREEBSD)
-+
-+#if defined(USE_TCMALLOC)
-+// Used by UncheckedMalloc. If tcmalloc is linked to the executable
-+// this will be replaced by a strong symbol that actually implement
-+// the semantics and don't call new handler in case the allocation fails.
-+extern "C" {
-+
-+__attribute__((weak, visibility("default")))
-+void* tc_malloc_skip_new_handler_weak(size_t size);
-+
-+void* tc_malloc_skip_new_handler_weak(size_t size) {
-+ return malloc(size);
-+}
-+
-+}
-+#endif
-+
-+bool UncheckedMalloc(size_t size, void** result) {
-+#if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || \
-+ (!defined(LIBC_GLIBC) && !defined(USE_TCMALLOC))
-+ *result = malloc(size);
-+#elif defined(LIBC_GLIBC) && !defined(USE_TCMALLOC)
-+ *result = __libc_malloc(size);
-+#elif defined(USE_TCMALLOC)
-+ *result = tc_malloc_skip_new_handler_weak(size);
-+#endif
-+ return *result != NULL;
-+}
-+
-+#endif // defined(OS_FREEBSD)
-+
- } // namespace base
Index: head/www/chromium/files/patch-base_process_memory__unittest.cc
===================================================================
--- head/www/chromium/files/patch-base_process_memory__unittest.cc
+++ head/www/chromium/files/patch-base_process_memory__unittest.cc
@@ -1,23 +1,22 @@
---- base/process/memory_unittest.cc.orig 2016-05-11 19:02:11 UTC
-+++ base/process/memory_unittest.cc
-@@ -140,11 +140,11 @@ TEST(ProcessMemoryTest, MacTerminateOnHe
- #endif // defined(OS_MACOSX)
+--- base/process/memory_unittest.cc.orig 2016-10-06 04:02:08.000000000 +0300
++++ base/process/memory_unittest.cc 2016-10-13 04:32:50.457987000 +0300
+@@ -82,10 +82,10 @@
+ ASSERT_TRUE(base::allocator::IsAllocatorInitialized());
+ }
- // Android doesn't implement set_new_handler, so we can't use the
--// OutOfMemoryTest cases. OpenBSD does not support these tests either.
-+// OutOfMemoryTest cases. OpenBSD and FreeBSD do not support these tests either.
- // Don't test these on ASan/TSan/MSan configurations: only test the real
- // allocator.
+-// OpenBSD does not support these tests. Don't test these on ASan/TSan/MSan
++// BSD does not support these tests. Don't test these on ASan/TSan/MSan
+ // configurations: only test the real allocator.
// Windows only supports these tests with the allocator shim in place.
--#if !defined(OS_ANDROID) && !defined(OS_OPENBSD) && \
-+#if !defined(OS_ANDROID) && !defined(OS_BSD) && \
- !(defined(OS_WIN) && !defined(ALLOCATOR_SHIM)) && \
+-#if !defined(OS_OPENBSD) && \
++#if !defined(OS_BSD) && \
+ BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) && \
!defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
-@@ -474,5 +474,5 @@ TEST_F(OutOfMemoryHandledTest, Unchecked
+@@ -439,5 +439,5 @@
+ EXPECT_FALSE(base::UncheckedCalloc(1, test_size_, &value_));
EXPECT_TRUE(value_ == NULL);
}
- #endif // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
--#endif // !defined(OS_ANDROID) && !defined(OS_OPENBSD) && !(defined(OS_WIN) &&
-+#endif // !defined(OS_ANDROID) && !defined(OS_BSD) && !(defined(OS_WIN) &&
- // !defined(ALLOCATOR_SHIM)) && !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
+-#endif // !defined(OS_OPENBSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) &&
++#endif // !defined(OS_BSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) &&
+ // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
Index: head/www/chromium/files/patch-base_process_process__handle__freebsd.cc
===================================================================
--- head/www/chromium/files/patch-base_process_process__handle__freebsd.cc
+++ head/www/chromium/files/patch-base_process_process__handle__freebsd.cc
@@ -0,0 +1,11 @@
+--- base/process/process_handle_freebsd.cc.orig 2016-10-06 04:02:08.000000000 +0300
++++ base/process/process_handle_freebsd.cc 2016-10-26 19:55:22.341492000 +0300
+@@ -16,7 +16,7 @@
+
+ ProcessId GetParentProcessId(ProcessHandle process) {
+ struct kinfo_proc info;
+- size_t length;
++ size_t length = sizeof(struct kinfo_proc);
+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process };
+
+ if (sysctl(mib, arraysize(mib), &info, &length, NULL, 0) < 0)
Index: head/www/chromium/files/patch-base_process_process__metrics.h
===================================================================
--- head/www/chromium/files/patch-base_process_process__metrics.h
+++ head/www/chromium/files/patch-base_process_process__metrics.h
@@ -1,6 +1,6 @@
---- base/process/process_metrics.h.orig 2016-05-11 19:02:11 UTC
-+++ base/process/process_metrics.h
-@@ -21,6 +21,13 @@
+--- base/process/process_metrics.h.orig 2016-10-06 04:02:08.000000000 +0300
++++ base/process/process_metrics.h 2016-10-13 12:58:13.818273000 +0300
+@@ -22,6 +22,12 @@
#include "base/values.h"
#include "build/build_config.h"
@@ -8,13 +8,12 @@
+#include
+#include
+#include
-+#include
+#endif
+
#if defined(OS_MACOSX)
#include
#include "base/process/port_provider_mac.h"
-@@ -314,13 +321,17 @@ BASE_EXPORT bool GetSystemMemoryInfo(Sys
+@@ -326,13 +332,17 @@
// CPU-related ticks. Returns -1 on parse error.
// Exposed for testing.
BASE_EXPORT int ParseProcStatCPU(const std::string& input);
Index: head/www/chromium/files/patch-base_process_process__posix.cc
===================================================================
--- head/www/chromium/files/patch-base_process_process__posix.cc
+++ head/www/chromium/files/patch-base_process_process__posix.cc
@@ -1,5 +1,5 @@
---- base/process/process_posix.cc.orig 2016-03-25 13:04:44 UTC
-+++ base/process/process_posix.cc
+--- base/process/process_posix.cc.orig 2016-08-03 22:02:10.000000000 +0300
++++ base/process/process_posix.cc 2016-09-11 02:18:36.481940000 +0300
@@ -20,8 +20,18 @@
#include
#endif
@@ -19,32 +19,15 @@
#if !defined(OS_NACL_NONSFI)
bool WaitpidWithTimeout(base::ProcessHandle handle,
-@@ -86,7 +96,7 @@ bool WaitpidWithTimeout(base::ProcessHan
- return ret_pid > 0;
- }
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_BSD)
- // Using kqueue on Mac so that we can wait on non-child processes.
- // We can't use kqueues on child processes because we need to reap
- // our own children using wait.
-@@ -175,7 +185,7 @@ static bool WaitForSingleNonChildProcess
-
- return true;
- }
--#endif // OS_MACOSX
-+#endif // OS_MACOSX || OS_BSD
-
- bool WaitForExitWithTimeoutImpl(base::ProcessHandle handle,
- int* exit_code,
-@@ -183,13 +193,13 @@ bool WaitForExitWithTimeoutImpl(base::Pr
+@@ -183,13 +193,13 @@
base::ProcessHandle parent_pid = base::GetParentProcessId(handle);
base::ProcessHandle our_pid = base::GetCurrentProcessHandle();
if (parent_pid != our_pid) {
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) || defined(OS_BSD)
// On Mac we can wait on non child processes.
- return WaitForSingleNonChildProcess(handle, timeout);
+- return WaitForSingleNonChildProcess(handle, timeout);
++ /* return WaitForSingleNonChildProcess(handle, timeout); */
#else
// Currently on Linux we can't handle non child processes.
NOTIMPLEMENTED();
@@ -53,7 +36,7 @@
}
int status;
-@@ -256,12 +266,16 @@ Process Process::DeprecatedGetProcessFro
+@@ -256,12 +266,16 @@
return Process(handle);
}
@@ -72,7 +55,7 @@
bool Process::IsValid() const {
return process_ != kNullProcessHandle;
-@@ -361,15 +375,32 @@ bool Process::WaitForExitWithTimeout(Tim
+@@ -361,15 +375,32 @@
bool Process::IsProcessBackgrounded() const {
// See SetProcessBackgrounded().
DCHECK(IsValid());
Index: head/www/chromium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc
===================================================================
--- head/www/chromium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc
+++ head/www/chromium/files/patch-base_profiler_stack__sampling__profiler__unittest.cc
@@ -0,0 +1,11 @@
+--- base/profiler/stack_sampling_profiler_unittest.cc.orig 2016-10-06 04:02:08.000000000 +0300
++++ base/profiler/stack_sampling_profiler_unittest.cc 2016-10-25 21:31:13.576230000 +0300
+@@ -30,7 +30,7 @@
+ #include
+ #include
+ #include
+-#else
++#elif !defined(OS_BSD)
+ #include
+ #endif
+
Index: head/www/chromium/files/patch-base_sys__info__freebsd.cc
===================================================================
--- head/www/chromium/files/patch-base_sys__info__freebsd.cc
+++ head/www/chromium/files/patch-base_sys__info__freebsd.cc
@@ -1,5 +1,5 @@
---- base/sys_info_freebsd.cc.orig 2016-03-25 13:04:44 UTC
-+++ base/sys_info_freebsd.cc
+--- base/sys_info_freebsd.cc.orig 2016-10-06 04:02:08.000000000 +0300
++++ base/sys_info_freebsd.cc 2016-10-13 10:20:37.344204000 +0300
@@ -12,12 +12,34 @@
namespace base {
@@ -39,11 +39,14 @@
NOTREACHED();
return 0;
}
-@@ -35,4 +57,25 @@ uint64_t SysInfo::MaxSharedMemorySize()
- return static_cast(limit);
+@@ -25,14 +47,24 @@
}
-+// static
+ // static
+-uint64_t SysInfo::MaxSharedMemorySize() {
+- size_t limit;
+- size_t size = sizeof(limit);
+- if (sysctlbyname("kern.ipc.shmmax", &limit, &size, NULL, 0) < 0) {
+std::string SysInfo::CPUModelName() {
+ int mib[] = { CTL_HW, HW_MODEL };
+ char name[256];
@@ -58,10 +61,12 @@
+ int ncpu;
+ size_t size = sizeof(ncpu);
+ if (sysctl(mib, arraysize(mib), &ncpu, &size, NULL, 0) == -1) {
-+ NOTREACHED();
+ NOTREACHED();
+- return 0;
+ return 1;
-+ }
+ }
+- return static_cast(limit);
+ return ncpu;
-+}
-+
+ }
+
} // namespace base
Index: head/www/chromium/files/patch-base_sys__info__posix.cc
===================================================================
--- head/www/chromium/files/patch-base_sys__info__posix.cc
+++ head/www/chromium/files/patch-base_sys__info__posix.cc
@@ -1,11 +1,20 @@
---- base/sys_info_posix.cc.orig 2016-03-25 13:04:44 UTC
-+++ base/sys_info_posix.cc
-@@ -77,7 +77,7 @@ base::LazyInstance<
+--- base/sys_info_posix.cc.orig 2016-08-03 22:02:10.000000000 +0300
++++ base/sys_info_posix.cc 2016-09-24 01:27:31.548122000 +0300
+@@ -30,7 +30,7 @@
+
+ namespace {
+
+-#if !defined(OS_OPENBSD)
++#if !defined(OS_BSD)
+ 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.
+@@ -77,7 +77,7 @@
namespace base {
-#if !defined(OS_OPENBSD)
-+#if !defined(OS_OPENBSD) && !defined(OS_FREEBSD)
++#if !defined(OS_BSD)
int SysInfo::NumberOfProcessors() {
return g_lazy_number_of_processors.Get().value();
}
Index: head/www/chromium/files/patch-base_test_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-base_test_BUILD.gn
+++ head/www/chromium/files/patch-base_test_BUILD.gn
@@ -0,0 +1,11 @@
+--- base/test/BUILD.gn.orig 2016-08-03 22:02:10.000000000 +0300
++++ base/test/BUILD.gn 2016-09-02 23:56:39.647089000 +0300
+@@ -249,7 +249,7 @@
+ ]
+ }
+
+-if (is_linux) {
++if (is_linux || is_bsd) {
+ shared_library("malloc_wrapper") {
+ testonly = true
+ sources = [
Index: head/www/chromium/files/patch-base_test_test__file__util__posix.cc
===================================================================
--- head/www/chromium/files/patch-base_test_test__file__util__posix.cc
+++ head/www/chromium/files/patch-base_test_test__file__util__posix.cc
@@ -0,0 +1,11 @@
+--- base/test/test_file_util_posix.cc.orig 2016-10-06 04:02:08.000000000 +0300
++++ base/test/test_file_util_posix.cc 2016-10-25 21:44:27.287523000 +0300
+@@ -79,7 +79,7 @@
+ return DeleteFile(file, recurse);
+ }
+
+-#if !defined(OS_LINUX) && !defined(OS_MACOSX)
++#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ bool EvictFileFromSystemCache(const FilePath& file) {
+ // There doesn't seem to be a POSIX way to cool the disk cache.
+ NOTIMPLEMENTED();
Index: head/www/chromium/files/patch-base_third__party_libevent_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-base_third__party_libevent_BUILD.gn
+++ head/www/chromium/files/patch-base_third__party_libevent_BUILD.gn
@@ -0,0 +1,12 @@
+--- base/third_party/libevent/BUILD.gn.orig 2016-08-03 22:02:10.000000000 +0300
++++ base/third_party/libevent/BUILD.gn 2016-10-12 18:30:43.933710000 +0300
+@@ -29,6 +29,9 @@
+ } else if (is_linux) {
+ sources += [ "epoll.c" ]
+ include_dirs = [ "linux" ]
++ } else if (is_bsd) {
++ sources += [ "kqueue.c" ]
++ include_dirs = [ "freebsd" ]
+ } else if (is_android) {
+ sources += [ "epoll.c" ]
+ include_dirs = [ "android" ]
Index: head/www/chromium/files/patch-base_third__party_libevent_libevent.gyp
===================================================================
--- head/www/chromium/files/patch-base_third__party_libevent_libevent.gyp
+++ head/www/chromium/files/patch-base_third__party_libevent_libevent.gyp
@@ -1,83 +0,0 @@
---- base/third_party/libevent/libevent.gyp.orig 2016-05-20 17:19:03 UTC
-+++ base/third_party/libevent/libevent.gyp
-@@ -1,4 +1,4 @@
--# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+# Copyright 2013 The Chromium Authors. All rights reserved.
- # Use of this source code is governed by a BSD-style license that can be
- # found in the LICENSE file.
-
-@@ -6,59 +6,22 @@
- 'targets': [
- {
- 'target_name': 'libevent',
-- 'product_name': 'event',
-- 'type': 'static_library',
-+ 'type': 'none',
- 'toolsets': ['host', 'target'],
-- 'sources': [
-- 'buffer.c',
-- 'evbuffer.c',
-- 'evdns.c',
-- 'event.c',
-- 'event_tagging.c',
-- 'evrpc.c',
-- 'evutil.c',
-- 'http.c',
-- 'log.c',
-- 'poll.c',
-- 'select.c',
-- 'signal.c',
-- 'strlcpy.c',
-- ],
-- 'defines': [
-- 'HAVE_CONFIG_H',
-- ],
-- 'include_dirs': [
-- '../../..',
-- ],
-- 'conditions': [
-- # libevent has platform-specific implementation files. Since its
-- # native build uses autoconf, platform-specific config.h files are
-- # provided and live in platform-specific directories.
-- [ 'OS == "linux" or (OS == "android" and _toolset == "host")', {
-- 'sources': [ 'epoll.c' ],
-- 'include_dirs': [ 'linux' ],
-- 'link_settings': {
-- 'libraries': [
-- # We need rt for clock_gettime().
-- # TODO(port) Maybe on FreeBSD as well?
-- '-lrt',
-- ],
-- },
-- }],
-- [ 'OS == "android" and _toolset == "target"', {
-- # On android, clock_gettime() is in libc.so, so no need to link librt.
-- 'sources': [ 'epoll.c' ],
-- 'include_dirs': [ 'android' ],
-- }],
-- [ 'OS == "mac" or OS == "ios" or os_bsd==1', {
-- 'sources': [ 'kqueue.c' ],
-- 'include_dirs': [ 'mac' ]
-- }],
-- [ 'OS == "solaris"', {
-- 'sources': [ 'devpoll.c', 'evport.c' ],
-- 'include_dirs': [ 'solaris' ]
-- }],
-+ 'variables': {
-+ 'headers_root_path': '.',
-+ 'header_filenames': [
-+ 'event.h',
-+ ],
-+ },
-+ 'includes': [
-+ '../../../build/shim_headers.gypi',
- ],
-- },
-+ 'link_settings': {
-+ 'libraries': [
-+ '-levent',
-+ ],
-+ },
-+ }
- ],
- }
Index: head/www/chromium/files/patch-base_threading_platform__thread__linux.cc
===================================================================
--- head/www/chromium/files/patch-base_threading_platform__thread__linux.cc
+++ head/www/chromium/files/patch-base_threading_platform__thread__linux.cc
@@ -1,21 +0,0 @@
---- base/threading/platform_thread_linux.cc.orig 2016-04-08 16:02:06 UTC
-+++ base/threading/platform_thread_linux.cc
-@@ -17,7 +17,9 @@
-
- #if !defined(OS_NACL)
- #include
-+#if !defined(OS_BSD)
- #include
-+#endif
- #include
- #include
- #endif
-@@ -70,7 +72,7 @@ void PlatformThread::SetName(const std::
- ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
- tracked_objects::ThreadData::InitializeThreadContext(name);
-
--#if !defined(OS_NACL)
-+#if !defined(OS_NACL) && !defined(OS_BSD)
- // On linux we can get the thread names to show up in the debugger by setting
- // the process name for the LWP. We don't want to do this for the main
- // thread because that would rename the process, causing tools like killall
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
+++ head/www/chromium/files/patch-base_trace__event_malloc__dump__provider.cc
@@ -0,0 +1,11 @@
+--- base/trace_event/malloc_dump_provider.cc.orig 2016-07-20 22:03:18.000000000 +0300
++++ base/trace_event/malloc_dump_provider.cc 2016-08-14 13:06:10.819247000 +0300
+@@ -20,7 +20,7 @@
+ #if defined(OS_MACOSX)
+ #include
+ #else
+-#include
++#include
+ #endif
+
+ namespace base {
Index: head/www/chromium/files/patch-breakpad_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-breakpad_BUILD.gn
+++ head/www/chromium/files/patch-breakpad_BUILD.gn
@@ -0,0 +1,11 @@
+--- breakpad/BUILD.gn.orig 2016-08-03 22:02:10.000000000 +0300
++++ breakpad/BUILD.gn 2016-09-03 00:07:22.742094000 +0300
+@@ -420,7 +420,7 @@
+ }
+ }
+
+-if (is_linux || is_android) {
++if (is_linux || is_bsd || is_android) {
+ if (current_toolchain == host_toolchain) {
+ executable("symupload") {
+ sources = [
Index: head/www/chromium/files/patch-build_common.gypi
===================================================================
--- head/www/chromium/files/patch-build_common.gypi
+++ head/www/chromium/files/patch-build_common.gypi
@@ -1,40 +0,0 @@
---- build/common.gypi.orig 2016-07-22 00:06:49.000000000 -0400
-+++ build/common.gypi 2016-08-03 11:18:18.437811000 -0400
-@@ -726,6 +726,12 @@
- 'os_bsd%': 0,
- }],
-
-+ ['OS=="freebsd" or OS=="openbsd"', {
-+ 'icu_use_data_file_flag%': 0,
-+ }, {
-+ 'icu_use_data_file_flag%': 1,
-+ }],
-+
- # NSS usage.
- ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris")', {
- 'use_nss_certs%': 1,
-@@ -1303,6 +1309,10 @@
- # able to turn it off for various reasons.
- 'linux_disable_pie%': 0,
-
-+ # XXX(rene) More options, keep them?
-+ 'os_ver%': 0,
-+ 'use_system_libjpeg%': 0,
-+
- # The release channel that this build targets. This is used to restrict
- # channel-specific build options, like which installer packages to create.
- # The default is 'all', which does no channel-specific filtering.
-@@ -4709,6 +4719,13 @@
- 'ldflags': [
- '-Wl,--no-keep-memory',
- ],
-+ 'ldflags!': [
-+ '-ldl',
-+ '-pie'
-+ ],
-+ 'libraries!': [
-+ '-ldl',
-+ ],
- },
- }],
- # Android-specific options; note that most are set above with Linux.
Index: head/www/chromium/files/patch-build_config_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-build_config_BUILD.gn
+++ head/www/chromium/files/patch-build_config_BUILD.gn
@@ -0,0 +1,20 @@
+--- build/config/BUILD.gn.orig 2016-10-06 04:02:08.000000000 +0300
++++ build/config/BUILD.gn 2016-10-13 04:42:48.294016000 +0300
+@@ -297,7 +297,7 @@
+ # 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?
+@@ -411,7 +411,7 @@
+ ]
+ } else if (is_ios) {
+ configs += [ "//build/config/ios:ios_dynamic_flags" ]
+- } else if (is_linux || is_android) {
++ } else if (is_linux || is_android || is_bsd) {
+ configs += [ "//build/config/gcc:executable_ldconfig" ]
+ if (is_android) {
+ configs += [ "//build/config/android:executable_config" ]
Index: head/www/chromium/files/patch-build_config_BUILDCONFIG.gn
===================================================================
--- head/www/chromium/files/patch-build_config_BUILDCONFIG.gn
+++ head/www/chromium/files/patch-build_config_BUILDCONFIG.gn
@@ -0,0 +1,66 @@
+--- build/config/BUILDCONFIG.gn.orig 2016-10-06 04:02:08.000000000 +0300
++++ build/config/BUILDCONFIG.gn 2016-10-13 04:48:31.029743000 +0300
+@@ -134,12 +134,13 @@
+ is_debug = !is_official_build
+
+ # Whether we're a traditional desktop unix.
+- is_desktop_linux = current_os == "linux"
++ is_desktop_linux = current_os == "linux" || current_os == "bsd"
+
+ # Set to true when compiling with the Clang compiler. Typically this is used
+ # to configure warnings.
+ is_clang = current_os == "mac" || current_os == "ios" ||
+- current_os == "linux" || current_os == "chromeos"
++ current_os == "linux" || current_os == "chromeos" ||
++ current_os == "bsd"
+
+ # Allows the path to a custom target toolchain to be injected as a single
+ # argument, and set as the default toolchain.
+@@ -183,8 +184,8 @@
+ # TODO(dpranke): Add some sort of assert here that verifies that
+ # no toolchain omitted host_toolchain from its toolchain_args().
+
+- if (host_os == "linux") {
+- if (target_os != "linux") {
++ if (host_os == "linux" || host_os == "bsd") {
++ if (target_os != "linux" || target_os != "bsd") {
+ # TODO(dpranke) - is_clang normally applies only to the target
+ # build, and there is no way to indicate that you want to override
+ # it for both the target build *and* the host build. Do we need to
+@@ -220,7 +221,7 @@
+ } else {
+ _default_toolchain = "//build/toolchain/android:$target_cpu"
+ }
+-} else if (target_os == "chromeos" || target_os == "linux") {
++} else if (target_os == "chromeos" || target_os == "linux" || target_os == "bsd") {
+ # See comments in build/toolchain/cros/BUILD.gn about board compiles.
+ if (is_clang) {
+ _default_toolchain = "//build/toolchain/linux:clang_$target_cpu"
+@@ -340,8 +341,17 @@
+ is_nacl = false
+ is_posix = true
+ is_win = false
++} else if (current_os == "bsd") {
++ is_android = false
++ is_chromeos = false
++ is_ios = false
++ is_linux = false
++ is_bsd = true
++ is_mac = false
++ is_nacl = false
++ is_posix = true
++ is_win = false
+ }
+-
+ # =============================================================================
+ # SOURCES FILTERS
+ # =============================================================================
+@@ -410,7 +420,7 @@
+ if (!is_mac && !is_ios) {
+ sources_assignment_filter += [ "*.mm" ]
+ }
+-if (!is_linux) {
++if (!is_linux && !is_bsd) {
+ sources_assignment_filter += [
+ "*_linux.h",
+ "*_linux.cc",
Index: head/www/chromium/files/patch-build_config_allocator.gni
===================================================================
--- head/www/chromium/files/patch-build_config_allocator.gni
+++ head/www/chromium/files/patch-build_config_allocator.gni
@@ -0,0 +1,11 @@
+--- build/config/allocator.gni.orig 2016-10-06 04:02:08.000000000 +0300
++++ build/config/allocator.gni 2016-10-13 10:29:19.634367000 +0300
+@@ -44,7 +44,7 @@
+ assert(!is_win || use_allocator == "none", "Tcmalloc doesn't work on Windows.")
+
+ assert(
+- !use_experimental_allocator_shim || is_linux || is_android || is_win,
++ !use_experimental_allocator_shim || is_linux || is_android || is_win || is_bsd,
+ "use_experimental_allocator_shim supported only on Linux, Android and Windows targets")
+
+ if (is_win && use_experimental_allocator_shim) {
Index: head/www/chromium/files/patch-build_config_clang_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-build_config_clang_BUILD.gn
+++ head/www/chromium/files/patch-build_config_clang_BUILD.gn
@@ -0,0 +1,20 @@
+--- build/config/clang/BUILD.gn.orig 2016-08-03 22:02:10.000000000 +0300
++++ build/config/clang/BUILD.gn 2016-09-03 01:38:15.236274000 +0300
+@@ -21,7 +21,7 @@
+ "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib",
+ root_build_dir),
+ ]
+- } else if (is_linux || is_android) {
++ } else if (is_linux || is_bsd || is_android) {
+ cflags += [
+ "-Xclang",
+ "-load",
+@@ -51,7 +51,7 @@
+ "check-implicit-copy-ctors",
+ ]
+
+- if ((is_linux || is_android) && !is_chromecast) {
++ if ((is_linux || is_bsd || is_android) && !is_chromecast) {
+ cflags += [
+ "-Xclang",
+ "-plugin-arg-find-bad-constructs",
Index: head/www/chromium/files/patch-build_config_compiler_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-build_config_compiler_BUILD.gn
+++ head/www/chromium/files/patch-build_config_compiler_BUILD.gn
@@ -0,0 +1,100 @@
+--- build/config/compiler/BUILD.gn.orig 2016-10-06 04:02:08.000000000 +0300
++++ build/config/compiler/BUILD.gn 2016-10-24 23:25:32.101459000 +0300
+@@ -141,7 +141,7 @@
+ configs += [ "//build/config/win:compiler" ]
+ } else if (is_android) {
+ configs += [ "//build/config/android:compiler" ]
+- } else if (is_linux) {
++ } else if (is_linux || is_bsd) {
+ configs += [ "//build/config/linux:compiler" ]
+ } else if (is_nacl) {
+ configs += [ "//build/config/nacl:compiler" ]
+@@ -271,7 +271,7 @@
+
+ # Linux/Android common flags setup.
+ # ---------------------------------
+- if (is_linux || is_android) {
++ if (is_linux || is_bsd || is_android) {
+ cflags += [
+ "-fPIC",
+ "-pipe", # Use pipes for communicating between sub-processes. Faster.
+@@ -376,14 +376,14 @@
+ # clang-cl (used if is_win) doesn't expose this flag.
+ # Currently disabled for nacl since its toolchain lacks this flag (too old).
+ # TODO(zforman): Once nacl's toolchain is updated, remove check.
+- if (is_clang && is_linux) {
++ if (is_clang && (is_linux || is_bsd)) {
+ absolute_path = rebase_path("//.")
+ cflags += [ "-fdebug-prefix-map=$absolute_path=." ]
+ }
+
+ # C++11 compiler flags setup.
+ # ---------------------------
+- if (is_linux || is_android || (is_nacl && is_clang)) {
++ if (is_linux || is_bsd || is_android || (is_nacl && is_clang)) {
+ # gnu++11 instead of c++11 is needed because some code uses typeof() (a
+ # GNU extension).
+ # TODO(thakis): Eventually switch this to c++11 instead,
+@@ -441,7 +441,7 @@
+ ldflags += [ "-flto" ]
+
+ # Apply a lower LTO optimization level as the default is too slow.
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ if (use_lld) {
+ ldflags += [ "-Wl,--lto-O1" ]
+ } else {
+@@ -460,7 +460,7 @@
+ # targeting ARM, without this flag, LTO produces a .text section that is
+ # larger than the maximum call displacement, preventing the linker from
+ # relocating calls (http://llvm.org/PR22999).
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ ldflags += [ "-Wl,-plugin-opt,-function-sections" ]
+ }
+
+@@ -738,7 +738,7 @@
+ # configs -= [ "//build/config/compiler:clang_stackrealign" ]
+ # See https://crbug.com/556393 for details of where it must be avoided.
+ config("clang_stackrealign") {
+- if (is_clang && current_cpu == "x86" && is_linux) {
++ if (is_clang && current_cpu == "x86" && (is_linux || is_bsd)) {
+ cflags = [
+ # Align the stack on 16-byte boundaries, http://crbug.com/418554.
+ "-mstack-alignment=16",
+@@ -773,7 +773,7 @@
+ # smaller.
+ if (is_win) {
+ configs += [ "//build/config/win:runtime_library" ]
+- } else if (is_linux) {
++ } else if (is_linux || is_bsd) {
+ configs += [ "//build/config/linux:runtime_library" ]
+ } else if (is_ios) {
+ configs += [ "//build/config/ios:runtime_library" ]
+@@ -1032,7 +1032,7 @@
+ "-Wno-nonportable-include-path",
+
+ # TODO(hans): https://crbug.com/637306
+- "-Wno-address-of-packed-member",
++ # "-Wno-address-of-packed-member",
+ ]
+ }
+ }
+@@ -1064,7 +1064,7 @@
+ ]
+
+ if (!is_debug && !using_sanitizer &&
+- (!is_linux || !is_clang || is_official_build)) {
++ (!is_linux || !is_bsd || !is_clang || is_official_build)) {
+ # _FORTIFY_SOURCE isn't really supported by Clang now, see
+ # http://llvm.org/bugs/show_bug.cgi?id=16821.
+ # It seems to work fine with Ubuntu 12 headers though, so use it in
+@@ -1124,7 +1124,7 @@
+ ]
+ }
+
+- if (is_linux || is_android) {
++ if (is_linux || is_bsd || is_android) {
+ cflags_cc += [
+ # Don't warn about hash_map in third-party code.
+ "-Wno-deprecated",
Index: head/www/chromium/files/patch-build_config_crypto.gni
===================================================================
--- head/www/chromium/files/patch-build_config_crypto.gni
+++ head/www/chromium/files/patch-build_config_crypto.gni
@@ -0,0 +1,8 @@
+--- build/config/crypto.gni.orig 2016-08-03 22:02:10.000000000 +0300
++++ build/config/crypto.gni 2016-09-03 01:37:11.785915000 +0300
+@@ -20,4 +20,4 @@
+
+ # True if NSS is used for certificate handling. It is possible to use OpenSSL
+ # for the crypto library, but NSS for the platform certificate library.
+-use_nss_certs = is_linux
++use_nss_certs = is_linux || is_bsd
Index: head/www/chromium/files/patch-build_config_features.gni
===================================================================
--- head/www/chromium/files/patch-build_config_features.gni
+++ head/www/chromium/files/patch-build_config_features.gni
@@ -0,0 +1,37 @@
+--- build/config/features.gni.orig 2016-08-03 22:02:10.000000000 +0300
++++ build/config/features.gni 2016-09-01 02:42:02.955488000 +0300
+@@ -22,7 +22,7 @@
+
+ declare_args() {
+ # Multicast DNS.
+- enable_mdns = is_win || is_linux
++ enable_mdns = is_win || is_linux || is_bsd
+
+ enable_extensions = !is_android && !is_ios
+ enable_plugins = (!is_android && !is_ios) || is_chromecast
+@@ -100,13 +100,13 @@
+ # libudev usage. This currently only affects the content layer.
+ use_udev = is_linux && !is_chromecast
+
+- use_dbus = is_linux && !is_chromecast
++ use_dbus = (is_linux || is_bsd) && !is_chromecast
+
+ # Option controlling the use of GConf (the classic GNOME configuration
+ # system).
+- use_gconf = is_linux && !is_chromeos && !is_chromecast
++ use_gconf = (is_linux || is_bsd) && !is_chromeos && !is_chromecast
+
+- use_gio = is_linux && !is_chromeos && !is_chromecast
++ use_gio = (is_linux || is_bsd) && !is_chromeos && !is_chromecast
+
+ # Enable basic printing support and UI.
+ enable_basic_printing = !is_chromeos && !is_chromecast && !is_ios
+@@ -126,7 +126,7 @@
+
+ # Enables the use of CDMs in pepper plugins.
+ enable_pepper_cdms =
+- enable_plugins && (is_linux || is_mac || is_win) && !is_chromecast
++ enable_plugins && (is_linux || is_bsd || is_mac || is_win) && !is_chromecast
+
+ # The seccomp-bpf sandbox is only supported on five architectures
+ # currently.
Index: head/www/chromium/files/patch-build_config_linux_gtk2_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-build_config_linux_gtk2_BUILD.gn
+++ head/www/chromium/files/patch-build_config_linux_gtk2_BUILD.gn
@@ -0,0 +1,11 @@
+--- build/config/linux/gtk2/BUILD.gn.orig 2016-08-03 22:02:10.000000000 +0300
++++ build/config/linux/gtk2/BUILD.gn 2016-09-02 22:54:36.628597000 +0300
+@@ -4,7 +4,7 @@
+
+ import("//build/config/linux/pkg_config.gni")
+
+-assert(is_linux, "This file should only be referenced on Linux")
++assert(is_linux || is_bsd, "This file should only be referenced on Linux")
+
+ # Depend on //build/config/linux/gtk2 to use GTKv2.
+ #
Index: head/www/chromium/files/patch-build_config_linux_gtk3_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-build_config_linux_gtk3_BUILD.gn
+++ head/www/chromium/files/patch-build_config_linux_gtk3_BUILD.gn
@@ -0,0 +1,11 @@
+--- build/config/linux/gtk3/BUILD.gn.orig 2016-08-03 22:02:10.000000000 +0300
++++ build/config/linux/gtk3/BUILD.gn 2016-09-03 01:35:58.974361000 +0300
+@@ -4,7 +4,7 @@
+
+ import("//build/config/linux/pkg_config.gni")
+
+-assert(is_linux, "This file should only be referenced on Linux")
++assert(is_linux || is_bsd, "This file should only be referenced on Linux")
+
+ # Depend on //build/config/linux/gtk3 to use GTKv3.
+ #
Index: head/www/chromium/files/patch-build_config_linux_pkg-config.py
===================================================================
--- head/www/chromium/files/patch-build_config_linux_pkg-config.py
+++ head/www/chromium/files/patch-build_config_linux_pkg-config.py
@@ -0,0 +1,26 @@
+--- build/config/linux/pkg-config.py.orig 2016-08-03 22:02:10.000000000 +0300
++++ build/config/linux/pkg-config.py 2016-09-04 01:43:37.226981000 +0300
+@@ -57,8 +57,12 @@
+ print "You must specify an architecture via -a if using a sysroot."
+ sys.exit(1)
+
+- libdir = sysroot + '/usr/' + options.system_libdir + '/pkgconfig'
+- libdir += ':' + sysroot + '/usr/share/pkgconfig'
++ if "linux" in sys.platform:
++ libdir = sysroot + '/libdata/' + options.system_libdir + '/pkgconfig'
++ libdir += ':' + sysroot + '/usr/share/pkgconfig'
++ elif "bsd" in sys.platform:
++ libdir = sysroot + '/libdata/pkgconfig'
++ libdir += ':' + '/usr/libdata/pkgconfig'
+ os.environ['PKG_CONFIG_LIBDIR'] = libdir
+ return libdir
+
+@@ -107,7 +111,7 @@
+ # If this is run on non-Linux platforms, just return nothing and indicate
+ # success. This allows us to "kind of emulate" a Linux build from other
+ # platforms.
+- if "linux" not in sys.platform:
++ if "bsd" not in sys.platform:
+ print "[[],[],[],[],[]]"
+ return 0
+
Index: head/www/chromium/files/patch-build_config_sanitizers_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-build_config_sanitizers_BUILD.gn
+++ head/www/chromium/files/patch-build_config_sanitizers_BUILD.gn
@@ -0,0 +1,20 @@
+--- build/config/sanitizers/BUILD.gn.orig 2016-08-03 22:02:10.000000000 +0300
++++ build/config/sanitizers/BUILD.gn 2016-09-03 00:19:39.656881000 +0300
+@@ -280,7 +280,7 @@
+
+ config("msan_flags") {
+ if (is_msan) {
+- assert(is_linux, "msan only supported on linux x86_64")
++ assert(is_linux || is_bsd, "msan only supported on linux x86_64")
+ msan_blacklist_path =
+ rebase_path("//tools/msan/blacklist.txt", root_build_dir)
+ cflags = [
+@@ -293,7 +293,7 @@
+
+ config("tsan_flags") {
+ if (is_tsan) {
+- assert(is_linux, "tsan only supported on linux x86_64")
++ assert(is_linux || is_bsd, "tsan only supported on linux x86_64")
+ tsan_blacklist_path =
+ rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir)
+ cflags = [
Index: head/www/chromium/files/patch-build_config_sanitizers_sanitizers.gni
===================================================================
--- head/www/chromium/files/patch-build_config_sanitizers_sanitizers.gni
+++ head/www/chromium/files/patch-build_config_sanitizers_sanitizers.gni
@@ -0,0 +1,13 @@
+--- build/config/sanitizers/sanitizers.gni.orig 2016-10-06 04:02:08.000000000 +0300
++++ build/config/sanitizers/sanitizers.gni 2016-10-24 22:57:06.565590000 +0300
+@@ -53,8 +53,8 @@
+ # See http://clang.llvm.org/docs/ControlFlowIntegrity.html
+ #
+ # TODO(pcc): Remove this flag if/when CFI is enabled in all official builds.
+- is_cfi = target_os == "linux" && !is_chromeos && target_cpu == "x64" &&
+- is_chrome_branded && is_official_build
++ is_cfi = (target_os == "linux" || target_os == "bsd") && !is_chromeos &&
++ target_cpu == "x64" && is_chrome_branded && is_official_build
+
+ # Enable checks for bad casts: derived cast and unrelated cast.
+ # TODO(krasin): remove this, when we're ready to add these checks by default.
Index: head/www/chromium/files/patch-build_config_ui.gni
===================================================================
--- head/www/chromium/files/patch-build_config_ui.gni
+++ head/www/chromium/files/patch-build_config_ui.gni
@@ -0,0 +1,43 @@
+--- build/config/ui.gni.orig 2016-10-06 04:02:08.000000000 +0300
++++ build/config/ui.gni 2016-10-13 05:04:25.545377000 +0300
+@@ -31,7 +31,7 @@
+
+ # Indicates if Aura is enabled. Aura is a low-level windowing library, sort
+ # of a replacement for GDI or GTK.
+- use_aura = is_win || is_linux
++ use_aura = is_win || is_linux || is_bsd
+
+ # True means the UI is built using the "views" framework.
+ toolkit_views =
+@@ -47,7 +47,7 @@
+ use_xkbcommon = false
+
+ # Whether we should use glib, a low level C utility library.
+- use_glib = is_linux
++ use_glib = is_linux || is_bsd
+
+ # Indicates if Wayland display server support is enabled.
+ enable_wayland_server = is_chromeos
+@@ -65,19 +65,19 @@
+
+ # Use GPU accelerated cross process image transport by default on linux builds
+ # with the Aura window manager.
+-ui_compositor_image_transport = use_aura && is_linux
++ui_compositor_image_transport = use_aura && (is_linux || is_bsd)
+
+ use_default_render_theme = use_aura && !is_android
+
+ # Indicates if the UI toolkit depends on X11.
+-use_x11 = is_linux && !use_ozone
++use_x11 = (is_linux || is_bsd) && !use_ozone
+
+ # Turn off glib if Ozone is enabled.
+ if (use_ozone) {
+ use_glib = false
+ }
+
+-if (is_linux && !use_ozone) {
++if ((is_linux || is_bsd) && !use_ozone) {
+ use_cairo = true
+ use_pango = true
+ } else {
Index: head/www/chromium/files/patch-build_filename__rules.gypi
===================================================================
--- head/www/chromium/files/patch-build_filename__rules.gypi
+++ head/www/chromium/files/patch-build_filename__rules.gypi
@@ -1,11 +0,0 @@
---- build/filename_rules.gypi.orig 2016-04-08 16:02:06 UTC
-+++ build/filename_rules.gypi
-@@ -89,7 +89,7 @@
- ['exclude', '_ashwin\\.(h|cc)$']
- ]
- }],
-- ['<(use_aura)==0 or OS!="linux" or >(nacl_untrusted_build)==1', {
-+ ['<(use_aura)==0 or (OS!="linux" and OS!="openbsd" and OS!="freebsd") or >(nacl_untrusted_build)==1', {
- 'sources/': [ ['exclude', '_auralinux\\.(h|cc)$'] ]
- }],
- ['<(use_ozone)==0 or >(nacl_untrusted_build)==1', {
Index: head/www/chromium/files/patch-build_linux_libpci_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-build_linux_libpci_BUILD.gn
+++ head/www/chromium/files/patch-build_linux_libpci_BUILD.gn
@@ -0,0 +1,54 @@
+--- build/linux/libpci/BUILD.gn.orig 2016-10-06 04:02:08.000000000 +0300
++++ build/linux/libpci/BUILD.gn 2016-10-29 18:17:51.990988000 +0300
+@@ -3,20 +3,36 @@
+ # found in the LICENSE file.
+
+ import("//tools/generate_library_loader/generate_library_loader.gni")
++import("//build/config/linux/pkg_config.gni")
+
+-# This generates a target named "libpci".
+-generate_library_loader("libpci") {
+- name = "LibPciLoader"
+- output_h = "libpci.h"
+- output_cc = "libpci_loader.cc"
+- header = ""
+-
+- functions = [
+- "pci_alloc",
+- "pci_init",
+- "pci_cleanup",
+- "pci_scan_bus",
+- "pci_fill_info",
+- "pci_lookup_name",
+- ]
++declare_args() {
++ use_system_libpci = is_bsd
++}
++
++if (use_system_libpci) {
++ pkg_config("system_libpci") {
++ packages = [ "libpci" ]
++ }
++
++ source_set("libpci") {
++ public_configs = [ ":system_libpci" ]
++ }
++
++} else {
++ # This generates a target named "libpci".
++ generate_library_loader("libpci") {
++ name = "LibPciLoader"
++ output_h = "libpci.h"
++ output_cc = "libpci_loader.cc"
++ header = ""
++
++ functions = [
++ "pci_alloc",
++ "pci_init",
++ "pci_cleanup",
++ "pci_scan_bus",
++ "pci_fill_info",
++ "pci_lookup_name",
++ ]
++ }
+ }
Index: head/www/chromium/files/patch-build_linux_system.gyp
===================================================================
--- head/www/chromium/files/patch-build_linux_system.gyp
+++ head/www/chromium/files/patch-build_linux_system.gyp
@@ -1,16 +0,0 @@
---- build/linux/system.gyp.orig 2016-05-11 19:02:12 UTC
-+++ build/linux/system.gyp
-@@ -1051,6 +1051,13 @@
- 'include_dirs': [
- '../..',
- ],
-+ 'conditions' : [
-+ ['OS=="freebsd"', {
-+ 'include_dirs': [
-+ '<(prefix_dir)/include',
-+ ],
-+ }],
-+ ],
- 'hard_dependency': 1,
- 'actions': [
- {
Index: head/www/chromium/files/patch-build_linux_unbundle_libwebp.gyp
===================================================================
--- head/www/chromium/files/patch-build_linux_unbundle_libwebp.gyp
+++ head/www/chromium/files/patch-build_linux_unbundle_libwebp.gyp
@@ -1,17 +0,0 @@
---- build/linux/unbundle/libwebp.gyp.orig 2016-03-25 13:04:44 UTC
-+++ build/linux/unbundle/libwebp.gyp
-@@ -14,13 +14,7 @@
- },
- 'link_settings': {
- 'libraries': [
-- # Check for presence of webpdemux library, use it if present.
-- '= clang39")
++ # cxx = getenv("CXX")
++ # assert(cxx != "", "CXX env must me set with >= clang++39")
++ # ld = cxx
++ cc = "${toolprefix}clang39"
++ cxx = "${toolprefix}clang++39"
++ ld = cxx
++ readelf = "readelf"
++ ar = "${toolprefix}llvm-ar39"
++ nm = "${toolprefix}llvm-nm39"
++ } else {
++ prefix = rebase_path("$clang_base_path/bin", root_build_dir)
++ cc = "$prefix/clang"
++ cxx = "$prefix/clang++"
++ ld = cxx
+
+- readelf = "${toolprefix}readelf"
+- ar = "${toolprefix}ar"
+- nm = "${toolprefix}nm"
++ readelf = "${toolprefix}readelf"
++ ar = "${toolprefix}ar"
++ nm = "${toolprefix}nm"
++ }
+
+ forward_variables_from(invoker, [ "strip" ])
+
Index: head/www/chromium/files/patch-build_toolchain_get__concurrent__links.py
===================================================================
--- head/www/chromium/files/patch-build_toolchain_get__concurrent__links.py
+++ head/www/chromium/files/patch-build_toolchain_get__concurrent__links.py
@@ -0,0 +1,17 @@
+--- build/toolchain/get_concurrent_links.py.orig 2016-10-06 04:02:08.000000000 +0300
++++ build/toolchain/get_concurrent_links.py 2016-10-13 05:28:45.448027000 +0300
+@@ -45,6 +45,14 @@
+ return int(subprocess.check_output(['sysctl', '-n', 'hw.memsize']))
+ except Exception:
+ return 0
++ elif sys.platform.startswith('freebsd'):
++ try:
++ avail_bytes = int(subprocess.check_output(['sysctl', '-n', 'hw.physmem']))
++ # With -fuse-lld it doesn't take a lot of ram, feel free to change that
++ # 1 * ... to needed amount
++ return max(1, avail_bytes / (1 * (2 ** 30))) # total / 4GB
++ except Exception:
++ return 1
+ # TODO(scottmg): Implement this for other platforms.
+ return 0
+
Index: head/www/chromium/files/patch-chrome_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-chrome_BUILD.gn
+++ head/www/chromium/files/patch-chrome_BUILD.gn
@@ -0,0 +1,29 @@
+--- chrome/BUILD.gn.orig 2016-08-03 22:02:10.000000000 +0300
++++ chrome/BUILD.gn 2016-09-03 00:02:50.206193000 +0300
+@@ -86,7 +86,7 @@
+ data = [
+ "$root_out_dir/resources.pak",
+ ]
+- if (is_linux || is_win) {
++ if (is_linux || is_bsd || is_win) {
+ data += [
+ "$root_out_dir/chrome_100_percent.pak",
+ "$root_out_dir/locales/en-US.pak",
+@@ -160,7 +160,7 @@
+ sources += [ "app/chrome_exe_main_aura.cc" ]
+ }
+
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ sources += [
+ "app/chrome_dll_resource.h",
+ "app/chrome_main.cc",
+@@ -1461,7 +1461,7 @@
+ }
+ }
+
+-if (is_linux) {
++if (is_linux || is_bsd) {
+ action("manpage") {
+ if (is_chrome_branded) {
+ name = "Google Chrome"
Index: head/www/chromium/files/patch-chrome_app_chrome__command__ids.h
===================================================================
--- head/www/chromium/files/patch-chrome_app_chrome__command__ids.h
+++ head/www/chromium/files/patch-chrome_app_chrome__command__ids.h
@@ -0,0 +1,11 @@
+--- chrome/app/chrome_command_ids.h.orig 2016-10-06 04:02:10.000000000 +0300
++++ chrome/app/chrome_command_ids.h 2016-10-14 06:38:03.530973000 +0300
+@@ -75,7 +75,7 @@
+ #define IDC_VISIT_DESKTOP_OF_LRU_USER_2 34049
+ #define IDC_VISIT_DESKTOP_OF_LRU_USER_3 34050
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ #define IDC_USE_SYSTEM_TITLE_BAR 34051
+ #endif
+
Index: head/www/chromium/files/patch-chrome_app_generated__resources.grd
===================================================================
--- head/www/chromium/files/patch-chrome_app_generated__resources.grd
+++ head/www/chromium/files/patch-chrome_app_generated__resources.grd
@@ -1,11 +1,38 @@
---- chrome/app/generated_resources.grd.orig 2016-05-11 19:02:13 UTC
-+++ chrome/app/generated_resources.grd
-@@ -6564,7 +6564,7 @@ Keep your key file in a safe place. You
+--- chrome/app/generated_resources.grd.orig 2016-10-06 04:02:10.000000000 +0300
++++ chrome/app/generated_resources.grd 2016-10-14 07:09:15.305398000 +0300
+@@ -6841,7 +6841,7 @@
Right-to-left
-
-+
++
Enable Input IME API
+@@ -10134,7 +10134,7 @@
+
+ Appearance
+
+-
++
+
+ Themes
+
+@@ -10142,7 +10142,7 @@
+
+ Reset to default theme
+
+-
++
+
+ Use GTK+ theme
+
+@@ -11429,7 +11429,7 @@
+ Set as default
+
+
+-
++
+
+ Use system title bar and borders
+
Index: head/www/chromium/files/patch-chrome_browser_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-chrome_browser_BUILD.gn
+++ head/www/chromium/files/patch-chrome_browser_BUILD.gn
@@ -0,0 +1,52 @@
+--- chrome/browser/BUILD.gn.orig 2016-08-03 22:02:11.000000000 +0300
++++ chrome/browser/BUILD.gn 2016-09-27 09:40:30.879973000 +0300
+@@ -540,7 +540,7 @@
+ deps += [ "//device/udev_linux" ]
+ }
+
+- if (is_linux && !is_chromeos) {
++ if ((is_linux || is_bsd) && !is_chromeos) {
+ deps += [ "//third_party/speech-dispatcher" ]
+ }
+
+@@ -730,6 +730,22 @@
+ sources += rebase_path(gypi_values.chrome_browser_non_mobile_sources,
+ ".",
+ "//chrome")
++ if (is_bsd) {
++ sources -= [
++ "media_galleries/linux/mtp_device_delegate_impl_linux.cc",
++ "media_galleries/linux/mtp_device_delegate_impl_linux.h",
++ "media_galleries/linux/mtp_device_object_enumerator.cc",
++ "media_galleries/linux/mtp_device_object_enumerator.h",
++ "media_galleries/linux/mtp_device_task_helper.cc",
++ "media_galleries/linux/mtp_device_task_helper.h",
++ "media_galleries/linux/mtp_device_task_helper_map_service.cc",
++ "media_galleries/linux/mtp_device_task_helper_map_service.h",
++ "media_galleries/linux/mtp_read_file_worker.cc",
++ "media_galleries/linux/mtp_read_file_worker.h",
++ "media_galleries/linux/snapshot_file_details.cc",
++ "media_galleries/linux/snapshot_file_details.h",
++ ]
++ }
+ }
+
+ if (!is_chrome_branded) {
+@@ -857,7 +873,7 @@
+ }
+ }
+
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ if (use_aura) {
+ configs += [ "//build/config/linux/dbus" ]
+ deps += [
+@@ -871,7 +887,7 @@
+ }
+ }
+
+- if (is_linux || is_win) {
++ if (is_linux || is_bsd || is_win) {
+ sources += rebase_path(gypi_values.chrome_browser_non_mac_desktop_sources,
+ ".",
+ "//chrome")
Index: head/www/chromium/files/patch-chrome_browser_browser__process__impl.h
===================================================================
--- head/www/chromium/files/patch-chrome_browser_browser__process__impl.h
+++ head/www/chromium/files/patch-chrome_browser_browser__process__impl.h
@@ -0,0 +1,11 @@
+--- chrome/browser/browser_process_impl.h.orig 2016-10-06 04:02:11.000000000 +0300
++++ chrome/browser/browser_process_impl.h 2016-10-16 22:37:41.017296000 +0300
+@@ -336,7 +336,7 @@
+
+ std::unique_ptr device_client_;
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ // Any change to this #ifdef must be reflected as well in
+ // chrome/browser/memory/tab_manager_browsertest.cc
+ std::unique_ptr tab_manager_;
Index: head/www/chromium/files/patch-chrome_browser_browser__process__impl.cc
===================================================================
--- head/www/chromium/files/patch-chrome_browser_browser__process__impl.cc
+++ head/www/chromium/files/patch-chrome_browser_browser__process__impl.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/browser_process_impl.cc.orig 2016-10-06 04:02:11.000000000 +0300
++++ chrome/browser/browser_process_impl.cc 2016-10-16 22:35:35.925144000 +0300
+@@ -161,7 +161,7 @@
+ #include "chrome/browser/media/webrtc_log_uploader.h"
+ #endif
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ #include "chrome/browser/memory/tab_manager.h"
+ #endif
+
+@@ -765,7 +765,7 @@
+
+ memory::TabManager* BrowserProcessImpl::GetTabManager() {
+ DCHECK(CalledOnValidThread());
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ if (!tab_manager_.get())
+ tab_manager_.reset(new memory::TabManager());
+ return tab_manager_.get();
Index: head/www/chromium/files/patch-chrome_browser_browser__resources.grd
===================================================================
--- head/www/chromium/files/patch-chrome_browser_browser__resources.grd
+++ head/www/chromium/files/patch-chrome_browser_browser__resources.grd
@@ -1,11 +0,0 @@
---- chrome/browser/browser_resources.grd.orig 2016-05-11 19:02:13 UTC
-+++ chrome/browser/browser_resources.grd
-@@ -280,7 +280,7 @@
-
-
-
--
-+
-
-
-
Index: head/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn
+++ head/www/chromium/files/patch-chrome_browser_extensions_BUILD.gn
@@ -0,0 +1,24 @@
+--- chrome/browser/extensions/BUILD.gn.orig 2016-10-06 04:02:11.000000000 +0300
++++ chrome/browser/extensions/BUILD.gn 2016-10-13 05:50:49.572236000 +0300
+@@ -186,7 +186,7 @@
+ sources -= [ "global_shortcut_listener_ozone.cc" ]
+ }
+
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ deps += [ "//build/linux:fontconfig" ]
+
+ if (use_dbus) {
+@@ -252,6 +252,12 @@
+ defines += [ "ENABLE_HOTWORDING" ]
+ }
+
++ if (is_bsd) {
++ sources -= [
++ "api/image_writer_private/removable_storage_provider_linux.cc",
++ ]
++ }
++
+ if (enable_service_discovery) {
+ sources += rebase_path(
+ gypi_values.chrome_browser_extensions_service_discovery_sources,
Index: head/www/chromium/files/patch-chrome_browser_extensions_window__open__apitest.cc
===================================================================
--- head/www/chromium/files/patch-chrome_browser_extensions_window__open__apitest.cc
+++ head/www/chromium/files/patch-chrome_browser_extensions_window__open__apitest.cc
@@ -1,11 +0,0 @@
---- chrome/browser/extensions/window_open_apitest.cc.orig 2016-05-11 19:02:14 UTC
-+++ chrome/browser/extensions/window_open_apitest.cc
-@@ -285,7 +285,7 @@ IN_PROC_BROWSER_TEST_F(WindowOpenPanelTe
- << message_;
- }
-
--#if defined(USE_ASH_PANELS) || defined(OS_LINUX)
-+#if defined(USE_ASH_PANELS) || defined(OS_LINUX) || defined(OS_FREEBSD)
- // On Ash, this currently fails because we're currently opening new panel
- // windows as popup windows instead.
- // We're also failing on Linux-aura due to the panel is not opened in the
Index: head/www/chromium/files/patch-chrome_browser_memory__details.cc
===================================================================
--- head/www/chromium/files/patch-chrome_browser_memory__details.cc
+++ head/www/chromium/files/patch-chrome_browser_memory__details.cc
@@ -1,6 +1,6 @@
---- chrome/browser/memory_details.cc.orig 2016-05-11 19:02:14 UTC
-+++ chrome/browser/memory_details.cc
-@@ -33,7 +33,7 @@
+--- chrome/browser/memory_details.cc.orig 2016-08-03 22:02:12.000000000 +0300
++++ chrome/browser/memory_details.cc 2016-09-30 22:07:01.106885000 +0300
+@@ -32,7 +32,7 @@
#include "content/public/common/content_constants.h"
#include "ui/base/l10n/l10n_util.h"
@@ -9,8 +9,8 @@
#include "content/public/browser/zygote_host_linux.h"
#endif
-@@ -365,7 +365,7 @@ void MemoryDetails::CollectChildInfoOnUI
- }
+@@ -334,7 +334,7 @@
+ process.titles.push_back(title);
}
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
Index: head/www/chromium/files/patch-chrome_browser_resources_safe__browsing_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-chrome_browser_resources_safe__browsing_BUILD.gn
+++ head/www/chromium/files/patch-chrome_browser_resources_safe__browsing_BUILD.gn
@@ -0,0 +1,11 @@
+--- chrome/browser/resources/safe_browsing/BUILD.gn.orig 2016-08-03 22:02:13.000000000 +0300
++++ chrome/browser/resources/safe_browsing/BUILD.gn 2016-09-20 02:51:43.112078000 +0300
+@@ -26,6 +26,8 @@
+ target_arch = "mac"
+ } else if (is_linux) {
+ target_arch = "linux"
++ } else if (is_bsd) {
++ target_arch = "bsd"
+ } else {
+ # This will cause the script to fail.
+ target_arch = "unknown_target_arch"
Index: head/www/chromium/files/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py
===================================================================
--- head/www/chromium/files/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py
+++ head/www/chromium/files/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py
@@ -1,10 +1,10 @@
---- chrome/browser/resources/safe_browsing/gen_file_type_proto.py.orig 2016-08-04 11:13:17.290964000 -0400
-+++ chrome/browser/resources/safe_browsing/gen_file_type_proto.py 2016-08-04 11:13:54.901432000 -0400
+--- chrome/browser/resources/safe_browsing/gen_file_type_proto.py.orig 2016-08-03 22:02:13.000000000 +0300
++++ chrome/browser/resources/safe_browsing/gen_file_type_proto.py 2016-09-20 02:52:27.389763000 +0300
@@ -39,6 +39,7 @@
"android": config_pb2.DownloadFileType.PLATFORM_ANDROID,
"chromeos": config_pb2.DownloadFileType.PLATFORM_CHROME_OS,
"linux": config_pb2.DownloadFileType.PLATFORM_LINUX,
-+ "freebsd": config_pb2.DownloadFileType.PLATFORM_LINUX,
++ "bsd": config_pb2.DownloadFileType.PLATFORM_LINUX,
"mac": config_pb2.DownloadFileType.PLATFORM_MAC,
"win": config_pb2.DownloadFileType.PLATFORM_WINDOWS,
}
@@ -13,7 +13,7 @@
parser.add_option('-t', '--type',
help='The platform type. One of android, chromeos, ' +
- 'linux, mac, win')
-+ 'linux, freebsd, mac, win')
++ 'linux, bsd, mac, win')
parser.add_option('-i', '--infile',
help='The ASCII DownloadFileType-proto file to read.')
parser.add_option('-o', '--outfile',
Index: head/www/chromium/files/patch-chrome_browser_safe__browsing_permission__reporter.cc
===================================================================
--- head/www/chromium/files/patch-chrome_browser_safe__browsing_permission__reporter.cc
+++ head/www/chromium/files/patch-chrome_browser_safe__browsing_permission__reporter.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/safe_browsing/permission_reporter.cc.orig 2016-10-06 04:02:12.000000000 +0300
++++ chrome/browser/safe_browsing/permission_reporter.cc 2016-10-14 06:15:01.051089000 +0300
+@@ -190,7 +190,7 @@
+ #if defined(OS_ANDROID)
+ report.set_platform_type(PermissionReport::ANDROID_PLATFORM);
+ #elif defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_CHROMEOS) || \
+- defined(OS_LINUX)
++ defined(OS_LINUX) || defined(OS_BSD)
+ report.set_platform_type(PermissionReport::DESKTOP_PLATFORM);
+ #else
+ #error Unsupported platform.
Index: head/www/chromium/files/patch-chrome_browser_ui_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-chrome_browser_ui_BUILD.gn
+++ head/www/chromium/files/patch-chrome_browser_ui_BUILD.gn
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/BUILD.gn.orig 2016-08-03 22:02:13.000000000 +0300
++++ chrome/browser/ui/BUILD.gn 2016-09-03 00:04:02.109457000 +0300
+@@ -503,7 +503,7 @@
+ "//ui/events:dom_keycode_converter",
+ ]
+ }
+- if (is_linux) { # Both desktop Linux and ChromeOS.
++ if (is_linux || is_bsd) { # Both desktop Linux and ChromeOS.
+ sources += rebase_path(gypi_values.chrome_browser_ui_linux_sources,
+ ".",
+ "//chrome")
Index: head/www/chromium/files/patch-chrome_browser_ui_browser__command__controller.cc
===================================================================
--- head/www/chromium/files/patch-chrome_browser_ui_browser__command__controller.cc
+++ head/www/chromium/files/patch-chrome_browser_ui_browser__command__controller.cc
@@ -1,15 +1,15 @@
---- chrome/browser/ui/browser_command_controller.cc.orig 2016-05-11 19:02:16 UTC
-+++ chrome/browser/ui/browser_command_controller.cc
-@@ -77,7 +77,7 @@
+--- chrome/browser/ui/browser_command_controller.cc.orig 2016-10-06 04:02:13.000000000 +0300
++++ chrome/browser/ui/browser_command_controller.cc 2016-10-13 05:57:01.306342000 +0300
+@@ -76,7 +76,7 @@
#include "chrome/browser/ui/browser_commands_chromeos.h"
#endif
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h"
+ #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h"
#endif
-@@ -221,7 +221,7 @@ bool BrowserCommandController::IsReserve
+@@ -216,7 +216,7 @@
if (window()->IsFullscreen() && command_id == IDC_FULLSCREEN)
return true;
@@ -18,7 +18,7 @@
// If this key was registered by the user as a content editing hotkey, then
// it is not reserved.
ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
-@@ -414,7 +414,7 @@ void BrowserCommandController::ExecuteCo
+@@ -419,7 +419,7 @@
break;
#endif
@@ -27,7 +27,7 @@
case IDC_USE_SYSTEM_TITLE_BAR: {
PrefService* prefs = browser_->profile()->GetPrefs();
prefs->SetBoolean(prefs::kUseCustomChromeFrame,
-@@ -815,7 +815,7 @@ void BrowserCommandController::InitComma
+@@ -812,7 +812,7 @@
command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_2, true);
command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_3, true);
#endif
Index: head/www/chromium/files/patch-chrome_browser_ui_browser__view__prefs.cc
===================================================================
--- head/www/chromium/files/patch-chrome_browser_ui_browser__view__prefs.cc
+++ head/www/chromium/files/patch-chrome_browser_ui_browser__view__prefs.cc
@@ -1,5 +1,5 @@
---- chrome/browser/ui/browser_view_prefs.cc.orig 2016-05-11 19:02:16 UTC
-+++ chrome/browser/ui/browser_view_prefs.cc
+--- chrome/browser/ui/browser_view_prefs.cc.orig 2016-10-06 04:02:13.000000000 +0300
++++ chrome/browser/ui/browser_view_prefs.cc 2016-10-13 05:59:52.802478000 +0300
@@ -10,7 +10,7 @@
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
@@ -9,12 +9,12 @@
#include "ui/base/x/x11_util.h"
#endif
-@@ -43,7 +43,7 @@ void RegisterBrowserViewLocalPrefs(PrefR
+@@ -32,7 +32,7 @@
+
void RegisterBrowserViewProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
- bool custom_frame_default = false;
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
- custom_frame_default = ui::GetCustomFramePrefDefault();
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ registry->RegisterBooleanPref(prefs::kUseCustomChromeFrame,
+ ui::GetCustomFramePrefDefault());
#endif
-
Index: head/www/chromium/files/patch-chrome_browser_ui_libgtk2ui_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-chrome_browser_ui_libgtk2ui_BUILD.gn
+++ head/www/chromium/files/patch-chrome_browser_ui_libgtk2ui_BUILD.gn
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/libgtk2ui/BUILD.gn.orig 2016-08-03 22:02:13.000000000 +0300
++++ chrome/browser/ui/libgtk2ui/BUILD.gn 2016-09-03 00:03:44.741182000 +0300
+@@ -2,7 +2,7 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+
+-assert(is_linux, "This file should only be referenced on Linux")
++assert(is_linux || is_bsd, "This file should only be referenced on Linux")
+
+ import("//build/config/features.gni")
+ import("//build/config/ui.gni")
Index: head/www/chromium/files/patch-chrome_browser_ui_panels_panel__manager.cc
===================================================================
--- head/www/chromium/files/patch-chrome_browser_ui_panels_panel__manager.cc
+++ head/www/chromium/files/patch-chrome_browser_ui_panels_panel__manager.cc
@@ -1,11 +0,0 @@
---- chrome/browser/ui/panels/panel_manager.cc.orig 2016-05-11 19:02:16 UTC
-+++ chrome/browser/ui/panels/panel_manager.cc
-@@ -142,7 +142,7 @@ bool PanelManager::ShouldUsePanels(const
- // static
- bool PanelManager::IsPanelStackingEnabled() {
- // Stacked panel mode is not supported in linux-aura.
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_FREEBSD)
- return false;
- #else
- return true;
Index: head/www/chromium/files/patch-chrome_browser_ui_views_first__run__dialog.cc
===================================================================
--- head/www/chromium/files/patch-chrome_browser_ui_views_first__run__dialog.cc
+++ head/www/chromium/files/patch-chrome_browser_ui_views_first__run__dialog.cc
@@ -1,20 +1,13 @@
---- chrome/browser/ui/views/first_run_dialog.cc.orig 2016-05-11 19:02:16 UTC
-+++ chrome/browser/ui/views/first_run_dialog.cc
-@@ -114,12 +114,16 @@ views::View* FirstRunDialog::CreateExtra
- bool FirstRunDialog::Accept() {
- GetWidget()->Hide();
+--- chrome/browser/ui/views/first_run_dialog.cc.orig 2016-10-06 04:02:13.000000000 +0300
++++ chrome/browser/ui/views/first_run_dialog.cc 2016-10-15 10:10:45.850050000 +0300
+@@ -35,8 +35,10 @@
+ namespace {
-+#if !defined(OS_BSD)
- if (report_crashes_ && report_crashes_->checked()) {
- if (GoogleUpdateSettings::SetCollectStatsConsent(true))
- breakpad::InitCrashReporter(std::string());
-- } else {
-+ } else
-+#else
-+ {
- GoogleUpdateSettings::SetCollectStatsConsent(false);
- }
+ void InitCrashReporterIfEnabled(bool enabled) {
++#ifndef OS_BSD
+ if (enabled)
+ breakpad::InitCrashReporter(std::string());
+#endif
+ }
- if (make_default_ && make_default_->checked())
- shell_integration::SetAsDefaultBrowser();
+ } // namespace
Index: head/www/chromium/files/patch-chrome_browser_ui_views_panels_panel__frame__view.cc
===================================================================
--- head/www/chromium/files/patch-chrome_browser_ui_views_panels_panel__frame__view.cc
+++ head/www/chromium/files/patch-chrome_browser_ui_views_panels_panel__frame__view.cc
@@ -1,11 +0,0 @@
---- chrome/browser/ui/views/panels/panel_frame_view.cc.orig 2016-05-11 19:02:16 UTC
-+++ chrome/browser/ui/views/panels/panel_frame_view.cc
-@@ -589,7 +589,7 @@ bool PanelFrameView::OnMousePressed(cons
- }
-
- bool PanelFrameView::OnMouseDragged(const ui::MouseEvent& event) {
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- // Converting the mouse location to screen coordinates returns an incorrect
- // location while the panel is moving. See crbug.com/353393 for more details.
- // TODO(pkotwicz): Fix conversion to screen coordinates
Index: head/www/chromium/files/patch-chrome_browser_ui_webui_about__ui.cc
===================================================================
--- head/www/chromium/files/patch-chrome_browser_ui_webui_about__ui.cc
+++ head/www/chromium/files/patch-chrome_browser_ui_webui_about__ui.cc
@@ -1,40 +1,56 @@
---- chrome/browser/ui/webui/about_ui.cc.orig 2016-05-11 19:02:16 UTC
-+++ chrome/browser/ui/webui/about_ui.cc
-@@ -74,7 +74,7 @@
+--- chrome/browser/ui/webui/about_ui.cc.orig 2016-07-20 22:03:21.000000000 +0300
++++ chrome/browser/ui/webui/about_ui.cc 2016-08-10 15:53:44.885419000 +0300
+@@ -73,7 +73,7 @@
#include "chrome/browser/ui/webui/theme_source.h"
#endif
-
+
-#if defined(OS_LINUX) || defined(OS_OPENBSD)
+#if defined(OS_LINUX) || defined(OS_BSD)
#include "content/public/browser/zygote_host_linux.h"
#include "content/public/common/sandbox_linux.h"
#endif
-@@ -707,7 +707,7 @@ void FinishMemoryDataRequest(
- }
- }
-
+@@ -642,7 +642,7 @@
+ DISALLOW_COPY_AND_ASSIGN(AboutDnsHandler);
+ };
+
-#if defined(OS_LINUX) || defined(OS_OPENBSD)
+#if defined(OS_LINUX) || defined(OS_BSD)
std::string AboutLinuxProxyConfig() {
std::string data;
AppendHeader(&data, 0,
-@@ -723,6 +723,7 @@ std::string AboutLinuxProxyConfig() {
+@@ -658,6 +658,7 @@
return data;
}
-
+
+#if !defined(OS_BSD)
void AboutSandboxRow(std::string* data, int name_id, bool good) {
data->append("");
data->append(l10n_util::GetStringUTF8(name_id));
-@@ -791,6 +792,7 @@ std::string AboutSandbox() {
- return data;
+@@ -672,6 +673,7 @@
+ }
+ data->append(" |
");
}
- #endif
+#endif
-
- // AboutMemoryHandler ----------------------------------------------------------
-
-@@ -963,7 +965,7 @@ void AboutUIHTMLSource::StartDataRequest
+
+ std::string AboutSandbox() {
+ std::string data;
+@@ -681,6 +683,7 @@
+ data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_TITLE));
+ data.append("");
+
++#if !defined(OS_BSD)
+ // Get expected sandboxing status of renderers.
+ const int status =
+ content::ZygoteHost::GetInstance()->GetRendererSandboxStatus();
+@@ -721,6 +724,7 @@
+ data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_BAD));
+ }
+ data.append("
");
++#endif
+
+ AppendFooter(&data);
+ return data;
+@@ -769,7 +773,7 @@
} else if (source_name_ == chrome::kChromeUIDNSHost) {
AboutDnsHandler::Start(profile(), callback);
return;
@@ -43,12 +59,12 @@
} else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) {
response = AboutLinuxProxyConfig();
#endif
-@@ -977,7 +979,7 @@ void AboutUIHTMLSource::StartDataRequest
+@@ -778,7 +782,7 @@
ChromeOSCreditsHandler::Start(path, callback);
return;
#endif
-#if defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_FREEBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
} else if (source_name_ == chrome::kChromeUISandboxHost) {
response = AboutSandbox();
#endif
Index: head/www/chromium/files/patch-chrome_chrome__browser.gypi
===================================================================
--- head/www/chromium/files/patch-chrome_chrome__browser.gypi
+++ head/www/chromium/files/patch-chrome_chrome__browser.gypi
@@ -1,51 +0,0 @@
---- chrome/chrome_browser.gypi.orig 2016-05-11 19:02:17 UTC
-+++ chrome/chrome_browser.gypi
-@@ -3638,7 +3638,7 @@
- '../device/media_transfer_protocol/media_transfer_protocol.gyp:device_media_transfer_protocol',
- ],
- }],
-- ['OS=="linux" and chromeos==0', {
-+ ['(OS=="linux" and chromeos==0) or os_bsd==1', {
- 'dependencies': [
- '../build/linux/system.gyp:libspeechd',
- ],
-@@ -3702,7 +3702,7 @@
- ['use_x11==1', {
- 'sources': [ '<@(chrome_browser_x11_sources)' ],
- }],
-- ['os_posix == 1 and OS != "mac" and OS != "ios"', {
-+ ['os_posix == 1 and OS != "mac" and OS != "ios" and os_bsd != 1', {
- 'sources': [
- 'app/chrome_crash_reporter_client.cc',
- 'app/chrome_crash_reporter_client.h',
-@@ -3834,6 +3834,12 @@
- }],
- ],
- }],
-+ ['os_bsd==1', {
-+ 'sources/': [
-+ ['exclude', '^browser/media_galleries/linux/'],
-+ ['exclude', '^browser/memory/system_memory_stats_recorder_linux.cc'],
-+ ],
-+ }],
- ['OS=="mac"', {
- 'dependencies': [
- '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
-@@ -3943,7 +3949,7 @@
- }],
- ],
- }],
-- ['OS=="linux"', {
-+ ['OS=="linux" or os_bsd==1', {
- 'conditions': [
- ['use_aura==1', {
- 'dependencies': [
-@@ -3962,7 +3968,7 @@
- }],
- ],
- }],
-- ['OS=="linux" or OS=="win"', {
-+ ['OS=="linux" or OS=="win" or os_bsd==1', {
- 'sources': [ '<@(chrome_browser_non_mac_desktop_sources)' ],
- }],
- ['desktop_linux==1', {
Index: head/www/chromium/files/patch-chrome_chrome__browser__extensions.gypi
===================================================================
--- head/www/chromium/files/patch-chrome_chrome__browser__extensions.gypi
+++ head/www/chromium/files/patch-chrome_chrome__browser__extensions.gypi
@@ -1,23 +0,0 @@
---- chrome/chrome_browser_extensions.gypi.orig 2016-05-25 15:00:58.000000000 -0400
-+++ chrome/chrome_browser_extensions.gypi 2016-05-27 09:56:46.969693000 -0400
-@@ -1019,6 +1019,11 @@
- '<@(chrome_browser_extensions_task_manager_enabled_sources)',
- ],
- }],
-+ ['os_bsd==1', {
-+ 'sources/': [
-+ ['exclude', '^browser/extensions/api/image_writer_private/removable_storage_provider_linux.cc'],
-+ ],
-+ }],
- ['chromeos==1', {
- 'dependencies': [
- '../build/linux/system.gyp:dbus',
-@@ -1061,7 +1066,7 @@
- '../ui/views/views.gyp:views',
- ],
- }],
-- ['OS=="linux"', {
-+ ['OS=="linux" or os_bsd==1', {
- 'conditions': [
- ['use_aura==1', {
- 'dependencies': [
Index: head/www/chromium/files/patch-chrome_chrome__browser__ui.gypi
===================================================================
--- head/www/chromium/files/patch-chrome_chrome__browser__ui.gypi
+++ head/www/chromium/files/patch-chrome_chrome__browser__ui.gypi
@@ -1,20 +0,0 @@
---- chrome/chrome_browser_ui.gypi.orig 2016-05-11 19:02:17 UTC
-+++ chrome/chrome_browser_ui.gypi
-@@ -3069,7 +3069,7 @@
- }],
- ],
- }],
-- ['use_aura==1 and chromeos==0 and use_ozone==0 and OS=="linux"', {
-+ ['use_aura==1 and chromeos==0 and use_ozone==0 and (OS=="linux" or OS=="freebsd" or OS=="openbsd")', {
- 'dependencies': [
- # gtk2 is the only component that can interact with gtk2 in our new
- # world.
-@@ -3251,7 +3251,7 @@
- ],
- 'sources': [ '<@(chrome_browser_ui_desktop_linux_sources)' ],
- }],
-- ['OS=="linux"', { # Both desktop Linux and ChromeOS.
-+ ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { # Both desktop Linux and ChromeOS.
- 'sources': [ '<@(chrome_browser_ui_linux_sources)' ],
- 'conditions': [
- ['use_aura==1', {
Index: head/www/chromium/files/patch-chrome_chrome__common.gypi
===================================================================
--- head/www/chromium/files/patch-chrome_chrome__common.gypi
+++ head/www/chromium/files/patch-chrome_chrome__common.gypi
@@ -1,22 +0,0 @@
---- chrome/chrome_common.gypi.orig 2016-05-11 19:02:17 UTC
-+++ chrome/chrome_common.gypi
-@@ -30,8 +30,8 @@
- 'common/common_param_traits.cc',
- 'common/common_param_traits.h',
- 'common/common_param_traits_macros.h',
-- 'common/component_flash_hint_file_linux.cc',
-- 'common/component_flash_hint_file_linux.h',
-+# 'common/component_flash_hint_file_linux.cc',
-+# 'common/component_flash_hint_file_linux.h',
- 'common/content_restriction.h',
- 'common/content_settings_pattern_serializer.cc',
- 'common/content_settings_pattern_serializer.h',
-@@ -381,7 +381,7 @@
- ['chromeos==1', {
- 'sources': [ '<@(chrome_common_extensions_chromeos_sources)' ],
- }],
-- ['OS=="win" or OS=="linux"', {
-+ ['OS=="win" or OS=="linux" or os_bsd==1', {
- 'sources': [
- 'common/extensions/api/input_ime/input_components_handler.cc',
- 'common/extensions/api/input_ime/input_components_handler.h',
Index: head/www/chromium/files/patch-chrome_chrome__exe.gypi
===================================================================
--- head/www/chromium/files/patch-chrome_chrome__exe.gypi
+++ head/www/chromium/files/patch-chrome_chrome__exe.gypi
@@ -1,11 +0,0 @@
---- chrome/chrome_exe.gypi.orig 2016-05-11 19:02:17 UTC
-+++ chrome/chrome_exe.gypi
-@@ -182,7 +182,7 @@
- '../build/linux/system.gyp:xext',
- ],
- }],
-- ['OS=="linux" and enable_plugins==1', {
-+ ['(OS=="linux" or os_bsd==1) and enable_plugins==1', {
- 'dependencies': [
- '../pdf/pdf.gyp:pdf',
- ],
Index: head/www/chromium/files/patch-chrome_chrome__resources.gyp
===================================================================
--- head/www/chromium/files/patch-chrome_chrome__resources.gyp
+++ head/www/chromium/files/patch-chrome_chrome__resources.gyp
@@ -1,11 +0,0 @@
---- chrome/chrome_resources.gyp.orig 2016-08-04 11:15:29.707642000 -0400
-+++ chrome/chrome_resources.gyp 2016-08-04 11:17:02.866434000 -0400
-@@ -321,6 +321,8 @@
- 'platform': 'chromeos'
- }, 'OS=="linux"', {
- 'platform': 'linux'
-+ }, 'OS=="freebsd"', {
-+ 'platform': 'freebsd'
- }, 'OS=="mac"', {
- 'platform': 'mac'
- }, 'OS=="win"', {
Index: head/www/chromium/files/patch-chrome_common_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-chrome_common_BUILD.gn
+++ head/www/chromium/files/patch-chrome_common_BUILD.gn
@@ -0,0 +1,16 @@
+--- chrome/common/BUILD.gn.orig 2016-08-03 22:02:14.000000000 +0300
++++ chrome/common/BUILD.gn 2016-09-27 19:17:20.410265000 +0300
+@@ -156,6 +156,13 @@
+ ]
+ }
+
++ if (is_bsd) {
++ sources -= [
++ "component_flash_hint_file_linux.cc",
++ "component_flash_hint_file_linux.h",
++ ]
++ }
++
+ if (enable_extensions) {
+ sources += rebase_path(gypi_values.chrome_common_extensions_sources,
+ ".",
Index: head/www/chromium/files/patch-chrome_common_chrome__switches.h
===================================================================
--- head/www/chromium/files/patch-chrome_common_chrome__switches.h
+++ head/www/chromium/files/patch-chrome_common_chrome__switches.h
@@ -1,11 +1,11 @@
---- chrome/common/chrome_switches.h.orig 2016-05-25 15:00:58.000000000 -0400
-+++ chrome/common/chrome_switches.h 2016-05-27 10:00:47.232609000 -0400
-@@ -387,7 +387,7 @@
+--- chrome/common/chrome_switches.h.orig 2016-10-06 04:02:14.000000000 +0300
++++ chrome/common/chrome_switches.h 2016-10-13 06:13:55.604411000 +0300
+@@ -378,7 +378,7 @@
extern const char kEnableWaylandServer[];
#endif
-#if defined(OS_WIN) || defined(OS_LINUX)
+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
- extern const char kEnableInputImeAPI[];
extern const char kDisableInputImeAPI[];
+ extern const char kEnableInputImeAPI[];
#endif
Index: head/www/chromium/files/patch-chrome_common_chrome__switches.cc
===================================================================
--- head/www/chromium/files/patch-chrome_common_chrome__switches.cc
+++ head/www/chromium/files/patch-chrome_common_chrome__switches.cc
@@ -1,11 +1,11 @@
---- chrome/common/chrome_switches.cc.orig 2016-05-25 15:00:58.000000000 -0400
-+++ chrome/common/chrome_switches.cc 2016-05-27 09:57:28.188798000 -0400
-@@ -1298,7 +1298,7 @@
- "tab-management-experiment-type-elderberry";
- #endif // defined(OS_ANDROID)
+--- chrome/common/chrome_switches.cc.orig 2016-10-06 04:02:14.000000000 +0300
++++ chrome/common/chrome_switches.cc 2016-10-13 06:11:21.058074000 +0300
+@@ -1277,7 +1277,7 @@
+ const char kEnableWaylandServer[] = "enable-wayland-server";
+ #endif
-#if defined(OS_WIN) || defined(OS_LINUX)
+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
- extern const char kEnableInputImeAPI[] = "enable-input-ime-api";
extern const char kDisableInputImeAPI[] = "disable-input-ime-api";
+ extern const char kEnableInputImeAPI[] = "enable-input-ime-api";
#endif
Index: head/www/chromium/files/patch-chrome_common_component__flash__hint__file__linux.h
===================================================================
--- head/www/chromium/files/patch-chrome_common_component__flash__hint__file__linux.h
+++ head/www/chromium/files/patch-chrome_common_component__flash__hint__file__linux.h
@@ -1,14 +0,0 @@
---- chrome/common/component_flash_hint_file_linux.h.orig 2016-03-25 13:04:46 UTC
-+++ chrome/common/component_flash_hint_file_linux.h
-@@ -7,9 +7,9 @@
-
- #include "build/build_config.h"
-
--#if !defined(OS_LINUX)
-+#if !defined(OS_LINUX) && !defined(OS_FREEBSD)
- #error "This file only applies to the Linux component update of Flash."
--#endif // !defined(OS_LINUX)
-+#endif // !defined(OS_LINUX) && !defined(OS_FREEBSD)
-
- #include
-
Index: head/www/chromium/files/patch-chrome_common_extensions_api_schemas.gni
===================================================================
--- head/www/chromium/files/patch-chrome_common_extensions_api_schemas.gni
+++ head/www/chromium/files/patch-chrome_common_extensions_api_schemas.gni
@@ -0,0 +1,11 @@
+--- chrome/common/extensions/api/schemas.gni.orig 2016-10-06 04:02:14.000000000 +0300
++++ chrome/common/extensions/api/schemas.gni 2016-10-13 06:16:40.629706000 +0300
+@@ -19,7 +19,7 @@
+ }
+ if (is_chromeos) {
+ schema_sources += gypi_values.chromeos_schema_files
+-} else if (is_linux || is_win) {
++} else if (is_linux || is_win || is_bsd) {
+ schema_sources += gypi_values.input_ime_schema_file
+ }
+ if (enable_service_discovery) {
Index: head/www/chromium/files/patch-chrome_common_extensions_api_schemas.gypi
===================================================================
--- head/www/chromium/files/patch-chrome_common_extensions_api_schemas.gypi
+++ head/www/chromium/files/patch-chrome_common_extensions_api_schemas.gypi
@@ -1,11 +0,0 @@
---- chrome/common/extensions/api/schemas.gypi.orig 2016-05-21 16:05:09 UTC
-+++ chrome/common/extensions/api/schemas.gypi
-@@ -177,7 +177,7 @@
- ],
- }, { # chromeos==0
- 'conditions': [
-- ['OS=="linux" or OS=="win"', {
-+ ['OS=="linux" or OS=="win" or os_bsd==1', {
- 'schema_files': [
- '<@(input_ime_schema_file)',
- ],
Index: head/www/chromium/files/patch-chrome_common_features.gni
===================================================================
--- head/www/chromium/files/patch-chrome_common_features.gni
+++ head/www/chromium/files/patch-chrome_common_features.gni
@@ -0,0 +1,11 @@
+--- chrome/common/features.gni.orig 2016-10-06 04:02:14.000000000 +0300
++++ chrome/common/features.gni 2016-10-13 06:19:10.348914000 +0300
+@@ -21,7 +21,7 @@
+ enable_background = !is_ios && !is_android && !is_chromecast
+
+ enable_one_click_signin =
+- is_win || is_mac || (is_linux && !is_chromeos && !is_chromecast)
++ is_win || is_mac || is_bsd || (is_linux && !is_chromeos && !is_chromecast)
+
+ # Google Now is disabled to prepare for its removal.
+ # http://crbug.com/539674
Index: head/www/chromium/files/patch-chrome_common_pref__names.h
===================================================================
--- head/www/chromium/files/patch-chrome_common_pref__names.h
+++ head/www/chromium/files/patch-chrome_common_pref__names.h
@@ -1,15 +1,24 @@
---- chrome/common/pref_names.h.orig 2016-05-25 15:00:58.000000000 -0400
-+++ chrome/common/pref_names.h 2016-05-27 10:03:13.560677000 -0400
-@@ -307,7 +307,7 @@
- extern const char kDeleteTimePeriod[];
+--- chrome/common/pref_names.h.orig 2016-10-06 04:02:14.000000000 +0300
++++ chrome/common/pref_names.h 2016-10-14 07:01:22.105649000 +0300
+@@ -315,7 +315,7 @@
+ extern const char kAllowedDomainsForApps[];
extern const char kLastClearBrowsingDataTime[];
extern const char kClearBrowsingDataHistoryNoticeShownTimes[];
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
extern const char kUsesSystemTheme[];
#endif
extern const char kCurrentThemePackFilename[];
-@@ -477,7 +477,7 @@
+@@ -347,7 +347,7 @@
+ #if defined(OS_MACOSX)
+ extern const char kShowUpdatePromotionInfoBar[];
+ #endif
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ extern const char kUseCustomChromeFrame[];
+ #endif
+ extern const char kBackShortcutBubbleShownCount[];
+@@ -496,7 +496,7 @@
extern const char kDownloadDefaultDirectory[];
extern const char kDownloadExtensionsToOpen[];
extern const char kDownloadDirUpgraded[];
Index: head/www/chromium/files/patch-chrome_common_pref__names.cc
===================================================================
--- head/www/chromium/files/patch-chrome_common_pref__names.cc
+++ head/www/chromium/files/patch-chrome_common_pref__names.cc
@@ -1,15 +1,24 @@
---- chrome/common/pref_names.cc.orig 2016-05-11 19:02:17 UTC
-+++ chrome/common/pref_names.cc
-@@ -885,7 +885,7 @@ const char kForceYouTubeSafetyMode[] = "
- // supervised users.
- const char kRecordHistory[] = "settings.history_recorded";
+--- chrome/common/pref_names.cc.orig 2016-10-06 04:02:14.000000000 +0300
++++ chrome/common/pref_names.cc 2016-10-14 06:57:51.856679000 +0300
+@@ -952,7 +952,7 @@
+ // only using an account that belongs to one of the domains from this pref.
+ const char kAllowedDomainsForApps[] = "settings.allowed_domains_for_apps";
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
// Linux specific preference on whether we should match the system theme.
const char kUsesSystemTheme[] = "extensions.theme.use_system";
#endif
-@@ -1348,7 +1348,7 @@ const char kDownloadDefaultDirectory[] =
+@@ -1035,7 +1035,7 @@
+ "browser.show_update_promotion_info_bar";
+ #endif
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ // Boolean that is false if we should show window manager decorations. If
+ // true, we draw a custom chrome frame (thicker title bar and blue border).
+ const char kUseCustomChromeFrame[] = "browser.custom_chrome_frame";
+@@ -1408,7 +1408,7 @@
// upgrade a unsafe location to a safe location.
const char kDownloadDirUpgraded[] = "download.directory_upgrade";
Index: head/www/chromium/files/patch-chrome_common_variations_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-chrome_common_variations_BUILD.gn
+++ head/www/chromium/files/patch-chrome_common_variations_BUILD.gn
@@ -0,0 +1,11 @@
+--- chrome/common/variations/BUILD.gn.orig 2016-08-03 22:02:14.000000000 +0300
++++ chrome/common/variations/BUILD.gn 2016-09-03 23:17:02.937969000 +0300
+@@ -12,7 +12,7 @@
+ if (is_mac) {
+ source = "//testing/variations/fieldtrial_testing_config_mac.json"
+ }
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ source = "//testing/variations/fieldtrial_testing_config_linux.json"
+ }
+ if (is_chromeos) {
Index: head/www/chromium/files/patch-chrome_common_variations_fieldtrial__testing__config.gyp
===================================================================
--- head/www/chromium/files/patch-chrome_common_variations_fieldtrial__testing__config.gyp
+++ head/www/chromium/files/patch-chrome_common_variations_fieldtrial__testing__config.gyp
@@ -1,11 +0,0 @@
---- chrome/common/variations/fieldtrial_testing_config.gyp.orig 2016-03-25 13:04:46 UTC
-+++ chrome/common/variations/fieldtrial_testing_config.gyp
-@@ -19,7 +19,7 @@
- 'conditions': [
- ['OS!="android"', {'sources/': [['exclude', '_android\\.json$']]}],
- ['OS!="win"', {'sources/': [['exclude', '_win\\.json$']]}],
-- ['OS!="linux" or chromeos==1', {'sources/': [['exclude', '_linux\\.json$']]}],
-+ ['(OS!="linux" or chromeos==1) and os_bsd!=1', {'sources/': [['exclude', '_linux\\.json$']]}],
- ['OS!="mac"', {'sources/': [['exclude', '_mac\\.json$']]}],
- ['chromeos!=1', {'sources/': [['exclude', '_chromeos\\.json$']]}],
- ['OS!="ios"', {'sources/': [['exclude', '_ios\\.json$']]}],
Index: head/www/chromium/files/patch-chrome_test_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-chrome_test_BUILD.gn
+++ head/www/chromium/files/patch-chrome_test_BUILD.gn
@@ -0,0 +1,176 @@
+--- chrome/test/BUILD.gn.orig 2016-10-06 04:02:14.000000000 +0300
++++ chrome/test/BUILD.gn 2016-10-13 06:28:37.584668000 +0300
+@@ -179,7 +179,7 @@
+ ]
+ }
+
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ public_deps += [ "//crypto:platform" ]
+ }
+ if (is_mac) {
+@@ -383,7 +383,7 @@
+ "$root_out_dir/test_page.css.mock-http-headers",
+ "$root_out_dir/ui_test.pak",
+ ]
+- if (is_linux || is_win) {
++ if (is_linux || is_bsd || is_win) {
+ data += [
+ "$root_out_dir/chrome_100_percent.pak",
+ "$root_out_dir/chrome_200_percent.pak",
+@@ -391,7 +391,7 @@
+ "$root_out_dir/locales/fr.pak",
+ ]
+ }
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ data += [ "$root_out_dir/libppapi_tests.so" ]
+ }
+
+@@ -462,7 +462,7 @@
+ ".",
+ "//chrome")
+ }
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ if (!is_chromeos) {
+ # Desktop linux.
+ sources -= [
+@@ -1097,14 +1097,14 @@
+ sources += [ "//third_party/liblouis/nacl_wrapper/liblouis_wrapper_browsertest.cc" ]
+ deps += [ "//chrome/browser/chromeos" ]
+ data_deps += [ "//third_party/liblouis:liblouis_test_data" ]
+- } else if (is_linux || is_win) {
++ } else if (is_linux || is_bsd || is_win) {
+ sources += [
+ "../browser/ui/views/ime/ime_warning_bubble_browsertest.cc",
+ "../browser/ui/views/ime/ime_window_browsertest.cc",
+ ]
+ }
+
+- if (is_win || is_linux) {
++ if (is_win || is_linux || is_bsd) {
+ sources += [ "../browser/nacl_host/test/nacl_gdb_browsertest.cc" ]
+ data_deps += [ "//chrome/browser/nacl_host/test:mock_nacl_gdb" ]
+ }
+@@ -1116,7 +1116,7 @@
+ configs +=
+ [ "//build/config/win:default_large_module_incremental_linking" ]
+ }
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ data_deps += [ "//components/nacl/loader:nacl_helper" ]
+
+ if (enable_nacl_nonsfi) {
+@@ -1176,7 +1176,7 @@
+ }
+ }
+
+- if (is_linux && !is_component_build) {
++ if ((is_linux || is_bsd) && !is_component_build) {
+ # Set rpath to find the CDM adapter even in a non-component build.
+ configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
+ }
+@@ -1226,7 +1226,7 @@
+ if (toolkit_views) {
+ sources -= [ "../browser/ui/views/select_file_dialog_extension_browsertest.cc" ]
+ }
+- if (is_win || is_linux) {
++ if (is_win || is_linux || is_bsd) {
+ sources +=
+ [ "../browser/ui/views/ime/input_ime_apitest_nonchromeos.cc" ]
+ }
+@@ -1385,7 +1385,7 @@
+ ]
+ deps += [ "//components/wifi:test_support" ]
+ }
+- if (is_linux || is_win) {
++ if (is_linux || is_bsd || is_win) {
+ sources += rebase_path(
+ chrome_tests_gypi_values.chrome_browser_tests_non_mac_desktop_sources,
+ ".",
+@@ -1400,7 +1400,7 @@
+ "../browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc",
+ ]
+ }
+- if (is_mac || is_win || (is_linux && !is_chromeos)) {
++ if (is_mac || is_win || is_bsd || (is_linux && !is_chromeos)) {
+ sources += rebase_path(
+ chrome_tests_gypi_values.chrome_browser_tests_non_mobile_non_cros_sources,
+ ".",
+@@ -1519,7 +1519,7 @@
+ "$root_out_dir/pyproto/",
+ ]
+
+- if (is_linux || is_win) {
++ if (is_linux || is_bsd || is_win) {
+ data += [
+ "$root_out_dir/chrome_100_percent.pak",
+ "$root_out_dir/chrome_200_percent.pak",
+@@ -1768,7 +1768,7 @@
+ "$root_out_dir/locales/en-US.pak",
+ ]
+ }
+- if (is_linux || is_win) {
++ if (is_linux || is_bsd || is_win) {
+ data += [ "$root_out_dir/chrome_200_percent.pak" ]
+ }
+
+@@ -1974,7 +1974,7 @@
+ "//ui/wm",
+ ]
+ }
+- if (!is_chromeos && is_linux) {
++ if (!is_chromeos && (is_linux || is_bsd)) {
+ sources += rebase_path(
+ chrome_tests_unit_gypi_values.chrome_unit_tests_desktop_linux_sources,
+ ".",
+@@ -1991,7 +1991,7 @@
+ if (use_gio) {
+ deps += [ "//build/linux/libgio" ]
+ }
+- if (!is_chromeos && !use_ozone && is_linux) {
++ if (!is_chromeos && !use_ozone && (is_linux || is_bsd)) {
+ deps += [ "//chrome/browser/ui/libgtk2ui" ]
+ }
+
+@@ -2119,18 +2119,18 @@
+ "//components/os_crypt:gnome_keyring_direct",
+ ]
+ }
+- if (is_linux && !is_chromeos) {
++ if ((is_linux || is_bsd) && !is_chromeos) {
+ sources +=
+ [ "../browser/password_manager/native_backend_libsecret_unittest.cc" ]
+ deps += [ "//third_party/libsecret" ]
+ }
+- if (is_linux && use_aura) {
++ if ((is_linux || is_bsd) && use_aura) {
+ deps += [ "//ui/aura:test_support" ]
+ if (use_dbus) {
+ deps += [ "//dbus:test_support" ]
+ }
+ }
+- if (is_linux && is_chrome_branded && current_cpu == "x86") {
++ if ((is_linux || is_bsd) && is_chrome_branded && current_cpu == "x86") {
+ ldflags = [ "-Wl,--strip-debug" ]
+ }
+ if (is_mac) {
+@@ -2365,7 +2365,7 @@
+ }
+ }
+
+-if (!is_android) {
++if (!is_android && !is_bsd) {
+ # TODO(609855): Make this compile on Android and run on the bots.
+ test("chrome_app_unittests") {
+ sources = [
+@@ -2391,7 +2391,7 @@
+ }
+ }
+
+-if (!is_android && !is_ios && !is_chromecast) {
++if (!is_android && !is_ios && !is_chromecast && !is_bsd) {
+ test("performance_browser_tests") {
+ sources =
+ rebase_path(chrome_tests_gypi_values.performance_browser_tests_sources,
Index: head/www/chromium/files/patch-chromecast_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-chromecast_BUILD.gn
+++ head/www/chromium/files/patch-chromecast_BUILD.gn
@@ -0,0 +1,11 @@
+--- chromecast/BUILD.gn.orig 2016-08-03 22:02:15.000000000 +0300
++++ chromecast/BUILD.gn 2016-09-03 01:38:51.775473000 +0300
+@@ -44,7 +44,7 @@
+ "//ui/base:ui_base_unittests",
+ ]
+
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ tests += [ "//chromecast/crash:cast_crash_unittests" ]
+ }
+
Index: head/www/chromium/files/patch-chromecast_browser_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-chromecast_browser_BUILD.gn
+++ head/www/chromium/files/patch-chromecast_browser_BUILD.gn
@@ -0,0 +1,11 @@
+--- chromecast/browser/BUILD.gn.orig 2016-08-03 22:02:15.000000000 +0300
++++ chromecast/browser/BUILD.gn 2016-09-03 01:39:34.973425000 +0300
+@@ -114,7 +114,7 @@
+ "//ui/gl",
+ ]
+
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ sources += [
+ "cast_memory_pressure_monitor.cc",
+ "cast_memory_pressure_monitor.h",
Index: head/www/chromium/files/patch-chromecast_browser_metrics_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-chromecast_browser_metrics_BUILD.gn
+++ head/www/chromium/files/patch-chromecast_browser_metrics_BUILD.gn
@@ -0,0 +1,11 @@
+--- chromecast/browser/metrics/BUILD.gn.orig 2016-08-03 22:02:15.000000000 +0300
++++ chromecast/browser/metrics/BUILD.gn 2016-09-03 01:39:05.920888000 +0300
+@@ -26,7 +26,7 @@
+ "//content/public/common",
+ ]
+
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ sources += [
+ "external_metrics.cc",
+ "external_metrics.h",
Index: head/www/chromium/files/patch-chromecast_crash_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-chromecast_crash_BUILD.gn
+++ head/www/chromium/files/patch-chromecast_crash_BUILD.gn
@@ -0,0 +1,11 @@
+--- chromecast/crash/BUILD.gn.orig 2016-08-03 22:02:15.000000000 +0300
++++ chromecast/crash/BUILD.gn 2016-09-03 01:38:37.198322000 +0300
+@@ -48,7 +48,7 @@
+ ]
+ }
+
+-if (is_linux) {
++if (is_linux || is_bsd) {
+ test("cast_crash_unittests") {
+ sources = [
+ "cast_crashdump_uploader_unittest.cc",
Index: head/www/chromium/files/patch-components_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-components_BUILD.gn
+++ head/www/chromium/files/patch-components_BUILD.gn
@@ -0,0 +1,13 @@
+--- components/BUILD.gn.orig 2016-08-03 22:02:15.000000000 +0300
++++ components/BUILD.gn 2016-09-13 13:15:29.852531000 +0300
+@@ -167,8 +167,8 @@
+ "//components/autofill/content/renderer:unit_tests",
+ "//components/cast_certificate:unit_tests",
+ "//components/certificate_transparency:unit_tests",
+- "//components/crash/content/app:unit_tests",
+- "//components/crash/core/common:unit_tests",
++ #"//components/crash/content/app:unit_tests",
++ #"//components/crash/core/common:unit_tests",
+ "//components/data_reduction_proxy/content/browser:unit_tests",
+ "//components/data_use_measurement/content:unit_tests",
+ "//components/devtools_http_handler:unit_tests",
Index: head/www/chromium/files/patch-components_content__settings_core_browser_website__settings__registry.h
===================================================================
--- head/www/chromium/files/patch-components_content__settings_core_browser_website__settings__registry.h
+++ head/www/chromium/files/patch-components_content__settings_core_browser_website__settings__registry.h
@@ -0,0 +1,15 @@
+--- components/content_settings/core/browser/website_settings_registry.h.orig 2016-10-06 04:02:16.000000000 +0300
++++ components/content_settings/core/browser/website_settings_registry.h 2016-10-13 13:24:49.647706000 +0300
+@@ -36,10 +36,11 @@
+ PLATFORM_MAC = 1 << 3,
+ PLATFORM_ANDROID = 1 << 4,
+ PLATFORM_IOS = 1 << 5,
++ PLATFORM_BSD = 1 << 6,
+
+ // Settings only applied to win, mac, linux and chromeos.
+ DESKTOP =
+- PLATFORM_WINDOWS | PLATFORM_LINUX | PLATFORM_CHROMEOS | PLATFORM_MAC,
++ PLATFORM_WINDOWS | PLATFORM_LINUX | PLATFORM_CHROMEOS | PLATFORM_MAC | PLATFORM_BSD,
+
+ // Settings applied to all platforms, including win, mac, linux, chromeos,
+ // android, ios.
Index: head/www/chromium/files/patch-components_content__settings_core_browser_website__settings__registry.cc
===================================================================
--- head/www/chromium/files/patch-components_content__settings_core_browser_website__settings__registry.cc
+++ head/www/chromium/files/patch-components_content__settings_core_browser_website__settings__registry.cc
@@ -0,0 +1,12 @@
+--- components/content_settings/core/browser/website_settings_registry.cc.orig 2016-10-06 04:02:16.000000000 +0300
++++ components/content_settings/core/browser/website_settings_registry.cc 2016-10-13 13:04:35.828985000 +0300
+@@ -88,6 +88,9 @@
+ // doesn't allow the settings to be managed in the same way. See
+ // crbug.com/642184.
+ sync_status = WebsiteSettingsInfo::UNSYNCABLE;
++#elif defined(OS_BSD)
++ if (!(platform & PLATFORM_BSD))
++ return nullptr;
+ #else
+ #error "Unsupported platform"
+ #endif
Index: head/www/chromium/files/patch-components_crash_content_app_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-components_crash_content_app_BUILD.gn
+++ head/www/chromium/files/patch-components_crash_content_app_BUILD.gn
@@ -0,0 +1,11 @@
+--- components/crash/content/app/BUILD.gn.orig 2016-08-03 22:02:16.000000000 +0300
++++ components/crash/content/app/BUILD.gn 2016-09-18 01:39:59.921593000 +0300
+@@ -141,7 +141,7 @@
+
+ #'../breakpad/breakpad.gyp:breakpad_sender', TODO(GYP)
+ ]
+- } else if (is_posix && !is_ios) {
++ } else if (is_posix && !is_ios && !is_bsd) {
+ deps += [ "//breakpad:client" ]
+ }
+ }
Index: head/www/chromium/files/patch-components_crash_content_browser_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-components_crash_content_browser_BUILD.gn
+++ head/www/chromium/files/patch-components_crash_content_browser_BUILD.gn
@@ -0,0 +1,21 @@
+--- components/crash/content/browser/BUILD.gn.orig 2016-08-03 22:02:16.000000000 +0300
++++ components/crash/content/browser/BUILD.gn 2016-09-13 13:38:48.133784000 +0300
+@@ -16,7 +16,7 @@
+
+ deps = [
+ "//base",
+- "//breakpad:client",
++ #"//breakpad:client",
+ "//components/crash/content/app",
+ "//content/public/browser",
+ "//content/public/common",
+@@ -39,7 +39,7 @@
+ # This is not in the GYP build but this target includes breakpad client
+ # headers, so add the dependency here.
+ if (is_posix && !is_ios) {
+- configs += [ "//breakpad:client_config" ]
+- public_configs = [ "//breakpad:client_config" ]
++ #configs += [ "//breakpad:client_config" ]
++ #public_configs = [ "//breakpad:client_config" ]
+ }
+ }
Index: head/www/chromium/files/patch-components_dom__distiller_core_page__features.cc
===================================================================
--- head/www/chromium/files/patch-components_dom__distiller_core_page__features.cc
+++ head/www/chromium/files/patch-components_dom__distiller_core_page__features.cc
@@ -1,15 +0,0 @@
---- components/dom_distiller/core/page_features.cc.orig 2016-07-22 00:06:53.000000000 -0400
-+++ components/dom_distiller/core/page_features.cc 2016-08-03 11:25:37.908892000 -0400
-@@ -10,7 +10,11 @@
- #include
-
- #include "base/json/json_reader.h"
--#include "third_party/re2/src/re2/re2.h"
-+#if defined(OS_FREEBSD)
-+# include
-+#else
-+# include "third_party/re2/src/re2/re2.h"
-+#endif // defined(OS_FREEBSD)
- #include "url/gurl.h"
-
- namespace dom_distiller {
Index: head/www/chromium/files/patch-components_gcm__driver_gcm__client.h
===================================================================
--- head/www/chromium/files/patch-components_gcm__driver_gcm__client.h
+++ head/www/chromium/files/patch-components_gcm__driver_gcm__client.h
@@ -0,0 +1,10 @@
+--- components/gcm_driver/gcm_client.h.orig 2016-10-06 04:02:16.000000000 +0300
++++ components/gcm_driver/gcm_client.h 2016-10-13 13:05:38.414560000 +0300
+@@ -80,6 +80,7 @@
+ PLATFORM_CROS,
+ PLATFORM_IOS,
+ PLATFORM_ANDROID,
++ PLATFORM_BSD,
+ PLATFORM_UNKNOWN
+ };
+
Index: head/www/chromium/files/patch-components_gcm__driver_gcm__client__impl.cc
===================================================================
--- head/www/chromium/files/patch-components_gcm__driver_gcm__client__impl.cc
+++ head/www/chromium/files/patch-components_gcm__driver_gcm__client__impl.cc
@@ -0,0 +1,12 @@
+--- components/gcm_driver/gcm_client_impl.cc.orig 2016-10-06 04:02:16.000000000 +0300
++++ components/gcm_driver/gcm_client_impl.cc 2016-10-13 13:07:14.340338000 +0300
+@@ -137,6 +137,9 @@
+ case GCMClient::PLATFORM_CROS:
+ platform = checkin_proto::ChromeBuildProto_Platform_PLATFORM_CROS;
+ break;
++ case GCMClient::PLATFORM_BSD: // TODO what the hell are those?
++ platform = checkin_proto::ChromeBuildProto_Platform_PLATFORM_LINUX;
++ break;
+ case GCMClient::PLATFORM_UNKNOWN:
+ // For unknown platform, return as LINUX.
+ platform = checkin_proto::ChromeBuildProto_Platform_PLATFORM_LINUX;
Index: head/www/chromium/files/patch-components_metrics_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-components_metrics_BUILD.gn
+++ head/www/chromium/files/patch-components_metrics_BUILD.gn
@@ -0,0 +1,34 @@
+--- components/metrics/BUILD.gn.orig 2016-10-06 04:02:16.000000000 +0300
++++ components/metrics/BUILD.gn 2016-10-16 20:52:28.476935000 +0300
+@@ -107,6 +107,13 @@
+ if (is_win) {
+ sources -= [ "machine_id_provider_stub.cc" ]
+ }
++
++ if (is_bsd) {
++ sources -= [
++ "system_memory_stats_recorder_linux.cc"
++ ]
++ }
++
+ }
+
+ if (!is_ios) {
+@@ -266,7 +273,7 @@
+ ]
+ }
+
+-if (is_linux) {
++if (is_linux || is_bsd) {
+ # GYP version: components/metrics.gypi:metrics_serialization
+ static_library("serialization") {
+ sources = [
+@@ -321,7 +328,7 @@
+ "//ui/gfx/geometry",
+ ]
+
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ sources += [ "serialization/serialization_utils_unittest.cc" ]
+ deps += [ ":serialization" ]
+ }
Index: head/www/chromium/files/patch-components_os__crypt_os__crypt.h
===================================================================
--- head/www/chromium/files/patch-components_os__crypt_os__crypt.h
+++ head/www/chromium/files/patch-components_os__crypt_os__crypt.h
@@ -0,0 +1,20 @@
+--- components/os_crypt/os_crypt.h.orig 2016-10-06 04:02:17.000000000 +0300
++++ components/os_crypt/os_crypt.h 2016-10-13 11:41:26.429931000 +0300
+@@ -13,7 +13,7 @@
+ #include "base/strings/string16.h"
+ #include "build/build_config.h"
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ #include "components/os_crypt/key_storage_linux.h"
+ #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
+
+@@ -23,7 +23,7 @@
+ // true for Linux, if a password management tool is available.
+ class OSCrypt {
+ public:
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ // If |store_type| is a known password store, we will attempt to use it.
+ // In any other case, we default to auto-detecting the store.
+ // This should not be changed after OSCrypt has been used.
Index: head/www/chromium/files/patch-components_plugins_renderer_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-components_plugins_renderer_BUILD.gn
+++ head/www/chromium/files/patch-components_plugins_renderer_BUILD.gn
@@ -0,0 +1,17 @@
+--- components/plugins/renderer/BUILD.gn.orig 2016-08-03 22:02:16.000000000 +0300
++++ components/plugins/renderer/BUILD.gn 2016-09-26 06:14:10.664010000 +0300
+@@ -25,6 +25,7 @@
+ }
+
+ deps = [
++ "//v8",
+ "//content/public/child",
+ "//content/public/common",
+ "//content/public/renderer",
+@@ -33,6 +34,5 @@
+ "//third_party/WebKit/public:blink",
+ "//third_party/re2",
+ "//ui/base",
+- "//v8",
+ ]
+ }
Index: head/www/chromium/files/patch-components_policy_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-components_policy_BUILD.gn
+++ head/www/chromium/files/patch-components_policy_BUILD.gn
@@ -0,0 +1,11 @@
+--- components/policy/BUILD.gn.orig 2016-08-03 22:02:16.000000000 +0300
++++ components/policy/BUILD.gn 2016-09-03 01:58:22.866259000 +0300
+@@ -141,7 +141,7 @@
+ if (is_android) {
+ outputs += policy_templates_android_outputs
+ }
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ outputs += policy_templates_linux_outputs
+ }
+ if (is_mac) {
Index: head/www/chromium/files/patch-components_policy_resources_policy__templates.json
===================================================================
--- head/www/chromium/files/patch-components_policy_resources_policy__templates.json
+++ head/www/chromium/files/patch-components_policy_resources_policy__templates.json
@@ -1,6 +1,15 @@
---- components/policy/resources/policy_templates.json.orig 2016-05-11 19:02:18 UTC
-+++ components/policy/resources/policy_templates.json
-@@ -1918,7 +1918,7 @@
+--- components/policy/resources/policy_templates.json.orig 2016-10-06 04:02:17.000000000 +0300
++++ components/policy/resources/policy_templates.json 2016-10-17 00:01:03.979810000 +0300
+@@ -909,7 +909,7 @@
+ 'name': 'RemoteAccessHostMatchUsername',
+ 'type': 'main',
+ 'schema': { 'type': 'boolean' },
+- 'supported_on': ['chrome.linux:25-', 'chrome.mac:25-', 'chrome_os:42-'],
++ 'supported_on': ['chrome.linux:25-', 'chrome.freebsd:25-', 'chrome.mac:25-', 'chrome_os:42-'],
+ 'features': {
+ 'dynamic_refresh': True,
+ 'per_profile': False,
+@@ -1930,7 +1930,7 @@
'name': 'GSSAPILibraryName',
'type': 'string',
'schema': { 'type': 'string' },
@@ -9,7 +18,7 @@
'features': {
'dynamic_refresh': False,
'per_profile': False,
-@@ -4581,7 +4581,7 @@
+@@ -4601,7 +4601,7 @@
'name': 'RequireOnlineRevocationChecksForLocalAnchors',
'type': 'main',
'schema': { 'type': 'boolean' },
@@ -18,7 +27,7 @@
'features': {
'dynamic_refresh': True,
'per_profile': False,
-@@ -5410,7 +5410,7 @@
+@@ -5449,7 +5449,7 @@
'name': 'BackgroundModeEnabled',
'type': 'main',
'schema': { 'type': 'boolean' },
@@ -27,3 +36,12 @@
'features': {
'can_be_recommended': True,
'dynamic_refresh': True,
+@@ -5974,7 +5974,7 @@
+ 'name': 'FullscreenAllowed',
+ 'type': 'main',
+ 'schema': { 'type': 'boolean' },
+- 'supported_on': ['chrome.win:31-', 'chrome.linux:31-', 'chrome_os:31-'],
++ 'supported_on': ['chrome.win:31-', 'chrome.linux:31-', 'chrome_os:31-', 'chrome.freebsd:31-'],
+ 'features': {
+ 'dynamic_refresh': True,
+ 'per_profile': True,
Index: head/www/chromium/files/patch-components_policy_tools_generate__policy__source.py
===================================================================
--- head/www/chromium/files/patch-components_policy_tools_generate__policy__source.py
+++ head/www/chromium/files/patch-components_policy_tools_generate__policy__source.py
@@ -1,11 +1,11 @@
---- components/policy/tools/generate_policy_source.py.orig 2016-05-11 19:02:19 UTC
-+++ components/policy/tools/generate_policy_source.py
-@@ -98,7 +98,7 @@ class PolicyDetails:
+--- components/policy/tools/generate_policy_source.py.orig 2016-08-03 22:02:16.000000000 +0300
++++ components/policy/tools/generate_policy_source.py 2016-09-20 17:13:04.971596000 +0300
+@@ -102,7 +102,7 @@
if platform.startswith('chrome.'):
platform_sub = platform[7:]
if platform_sub == '*':
- self.platforms.extend(['win', 'mac', 'linux'])
-+ self.platforms.extend(['win', 'mac', 'linux', 'freebsd'])
++ self.platforms.extend(['win', 'mac', 'linux', 'bsd'])
else:
self.platforms.append(platform_sub)
else:
Index: head/www/chromium/files/patch-components_storage__monitor.gypi
===================================================================
--- head/www/chromium/files/patch-components_storage__monitor.gypi
+++ head/www/chromium/files/patch-components_storage__monitor.gypi
@@ -1,29 +0,0 @@
---- components/storage_monitor.gypi.orig 2016-03-25 13:04:48 UTC
-+++ components/storage_monitor.gypi
-@@ -50,6 +50,26 @@
- 'storage_monitor/volume_mount_watcher_win.h',
- ],
- 'conditions': [
-+ ['os_bsd == 1', {
-+ 'sources!': [
-+ 'storage_monitor/media_transfer_protocol_device_observer_linux.cc',
-+ 'storage_monitor/media_transfer_protocol_device_observer_linux.h',
-+ 'storage_monitor/test_media_transfer_protocol_manager_linux.cc',
-+ 'storage_monitor/test_media_transfer_protocol_manager_linux.h',
-+ 'storage_monitor/mtab_watcher_linux.cc',
-+ 'storage_monitor/mtab_watcher_linux.h',
-+ 'storage_monitor/storage_monitor_linux.cc',
-+ 'storage_monitor/storage_monitor_linux.h',
-+ 'storage_monitor/udev_util_linux.cc',
-+ 'storage_monitor/udev_util_linux.h',
-+ ],
-+ }],
-+ ['OS == "freebsd"', {
-+ 'sources': [
-+ 'storage_monitor/storage_monitor_freebsd.cc',
-+ 'storage_monitor/storage_monitor_freebsd.h',
-+ ],
-+ }],
- ['OS == "mac"', {
- 'link_settings': {
- 'libraries': [
Index: head/www/chromium/files/patch-components_storage__monitor_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-components_storage__monitor_BUILD.gn
+++ head/www/chromium/files/patch-components_storage__monitor_BUILD.gn
@@ -0,0 +1,40 @@
+--- components/storage_monitor/BUILD.gn.orig 2016-08-03 22:02:16.000000000 +0300
++++ components/storage_monitor/BUILD.gn 2016-09-27 19:34:46.322065000 +0300
+@@ -64,6 +64,23 @@
+ ]
+ }
+
++ if (is_bsd) {
++ sources -= [
++ "media_transfer_protocol_device_observer_linux.cc",
++ "media_transfer_protocol_device_observer_linux.h",
++ "mtab_watcher_linux.cc",
++ "mtab_watcher_linux.h",
++ "storage_monitor_linux.cc",
++ "storage_monitor_linux.h",
++ "udev_util_linux.cc",
++ "udev_util_linux.h",
++ ]
++ sources += [
++ "storage_monitor_freebsd.cc",
++ "storage_monitor_freebsd.h",
++ ]
++ }
++
+ if (use_udev) {
+ deps += [ "//device/udev_linux" ]
+ } else if (is_linux) {
+@@ -119,6 +136,13 @@
+ ]
+ }
+
++ if (is_bsd) {
++ sources -= [
++ "test_media_transfer_protocol_manager_linux.cc",
++ "test_media_transfer_protocol_manager_linux.h",
++ ]
++ }
++
+ if (is_win) {
+ deps = [
+ "//testing/gtest",
Index: head/www/chromium/files/patch-components_sync_base_get__session__name__linux.cc
===================================================================
--- head/www/chromium/files/patch-components_sync_base_get__session__name__linux.cc
+++ head/www/chromium/files/patch-components_sync_base_get__session__name__linux.cc
@@ -0,0 +1,22 @@
+--- components/sync/base/get_session_name_linux.cc.orig 2016-10-06 04:02:17.000000000 +0300
++++ components/sync/base/get_session_name_linux.cc 2016-10-13 13:40:16.075193000 +0300
+@@ -4,7 +4,7 @@
+
+ #include "components/sync/base/get_session_name_linux.h"
+
+-#include // for HOST_NAME_MAX
++#include // for _POSIX_HOST_NAME_MAX
+ #include // for gethostname()
+
+ #include "base/linux_util.h"
+@@ -13,8 +13,8 @@
+ namespace internal {
+
+ std::string GetHostname() {
+- char hostname[HOST_NAME_MAX];
+- if (gethostname(hostname, HOST_NAME_MAX) == 0) // Success.
++ char hostname[_POSIX_HOST_NAME_MAX];
++ if (gethostname(hostname, _POSIX_HOST_NAME_MAX) == 0) // Success.
+ return hostname;
+ return base::GetLinuxDistro();
+ }
Index: head/www/chromium/files/patch-components_variations_proto_study.proto
===================================================================
--- head/www/chromium/files/patch-components_variations_proto_study.proto
+++ head/www/chromium/files/patch-components_variations_proto_study.proto
@@ -0,0 +1,10 @@
+--- components/variations/proto/study.proto.orig 2016-10-06 04:02:18.000000000 +0300
++++ components/variations/proto/study.proto 2016-10-13 13:02:20.586397000 +0300
+@@ -189,6 +189,7 @@
+ PLATFORM_CHROMEOS = 3;
+ PLATFORM_ANDROID = 4;
+ PLATFORM_IOS = 5;
++ PLATFORM_BSD = 6;
+ }
+
+ // Possible form factors Chrome is running on.
Index: head/www/chromium/files/patch-content_app_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-content_app_BUILD.gn
+++ head/www/chromium/files/patch-content_app_BUILD.gn
@@ -0,0 +1,11 @@
+--- content/app/BUILD.gn.orig 2016-10-06 04:02:18.000000000 +0300
++++ content/app/BUILD.gn 2016-10-13 06:35:58.585406000 +0300
+@@ -66,7 +66,7 @@
+ ]
+ }
+
+- if (is_linux && enable_plugins) {
++ if ((is_linux || is_bsd) && enable_plugins) {
+ content_app_deps += [ "//content/ppapi_plugin:ppapi_plugin_sources" ]
+ }
+
Index: head/www/chromium/files/patch-content_browser_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-content_browser_BUILD.gn
+++ head/www/chromium/files/patch-content_browser_BUILD.gn
@@ -0,0 +1,58 @@
+--- content/browser/BUILD.gn.orig 2016-10-06 04:02:18.000000000 +0300
++++ content/browser/BUILD.gn 2016-10-13 10:50:30.206508000 +0300
+@@ -196,7 +196,7 @@
+ "//third_party/webrtc/media:rtc_media",
+ "//third_party/webrtc/modules/desktop_capture:primitives",
+ ]
+- if (is_linux || is_mac || is_win) {
++ if (is_linux || is_bsd || is_mac || is_win) {
+ sources += [
+ "media/capture/desktop_capture_device.cc",
+ "media/capture/desktop_capture_device.h",
+@@ -288,7 +288,7 @@
+ }
+ }
+
+- if (is_linux && use_aura) {
++ if ((is_linux || is_bsd) && use_aura) {
+ deps += [ "//build/linux:fontconfig" ]
+ }
+
+@@ -368,6 +368,19 @@
+ "//chromeos",
+ "//chromeos:power_manager_proto",
+ ]
++ } else if (is_bsd) {
++ sources -= [
++ "zygote_host/zygote_communication_linux.cc",
++ "zygote_host/zygote_communication_linux.h",
++ "zygote_host/zygote_handle_linux.cc",
++ "zygote_host/zygote_host_impl_linux.cc",
++ "zygote_host/zygote_host_impl_linux.h",
++ "../zygote/zygote_linux.cc",
++ "../zygote/zygote_linux.h",
++ "../zygote/zygote_main_linux.cc",
++ "download/file_metadata_linux.cc",
++ "download/file_metadata_linux.h",
++ ]
+ }
+
+ if (use_aura) {
+@@ -450,7 +463,7 @@
+ deps += [ "//third_party/flac" ]
+ }
+
+- if (is_linux && use_dbus) {
++ if ((is_linux || is_bsd) && use_dbus) {
+ deps += [ "//dbus" ]
+ }
+
+@@ -461,7 +474,7 @@
+ ]
+ }
+
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ deps += [ "//third_party/boringssl" ]
+ }
+
Index: head/www/chromium/files/patch-content_browser_browser__main__loop.cc
===================================================================
--- head/www/chromium/files/patch-content_browser_browser__main__loop.cc
+++ head/www/chromium/files/patch-content_browser_browser__main__loop.cc
@@ -1,6 +1,6 @@
---- content/browser/browser_main_loop.cc.orig 2016-05-11 19:02:20 UTC
-+++ content/browser/browser_main_loop.cc
-@@ -191,7 +191,7 @@
+--- content/browser/browser_main_loop.cc.orig 2016-07-20 22:03:24.000000000 +0300
++++ content/browser/browser_main_loop.cc 2016-08-18 02:39:59.331387000 +0300
+@@ -203,7 +203,7 @@
namespace content {
namespace {
@@ -9,7 +9,7 @@
void SetupSandbox(const base::CommandLine& parsed_command_line) {
TRACE_EVENT0("startup", "SetupSandbox");
base::FilePath sandbox_binary;
-@@ -444,7 +444,7 @@ void BrowserMainLoop::EarlyInitializatio
+@@ -467,7 +467,7 @@
TRACE_EVENT0("startup", "BrowserMainLoop::EarlyInitialization");
TRACK_SCOPED_REGION("Startup", "BrowserMainLoop::EarlyInitialization");
@@ -18,3 +18,12 @@
// No thread should be created before this call, as SetupSandbox()
// will end-up using fork().
SetupSandbox(parsed_command_line_);
+@@ -507,7 +507,7 @@
+ // We use quite a few file descriptors for our IPC, and the default limit on
+ // the Mac is low (256), so bump it up.
+ base::SetFdLimit(1024);
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ // Same for Linux. The default various per distro, but it is 1024 on Fedora.
+ // Low soft limits combined with liberal use of file descriptors means power
+ // users can easily hit this limit with many open tabs. Bump up the limit to
Index: head/www/chromium/files/patch-content_browser_device__sensors_data__fetcher__shared__memory.h
===================================================================
--- head/www/chromium/files/patch-content_browser_device__sensors_data__fetcher__shared__memory.h
+++ head/www/chromium/files/patch-content_browser_device__sensors_data__fetcher__shared__memory.h
@@ -0,0 +1,11 @@
+--- content/browser/device_sensors/data_fetcher_shared_memory.h.orig 2016-10-06 04:02:18.000000000 +0300
++++ content/browser/device_sensors/data_fetcher_shared_memory.h 2016-10-14 15:15:34.071484000 +0300
+@@ -45,7 +45,7 @@
+ bool Start(ConsumerType consumer_type, void* buffer) override;
+ bool Stop(ConsumerType consumer_type) override;
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+ #if !defined(OS_CHROMEOS)
+ DeviceMotionHardwareBuffer* motion_buffer_ = nullptr;
+ DeviceOrientationHardwareBuffer* orientation_buffer_ = nullptr;
Index: head/www/chromium/files/patch-content_browser_devtools_protocol_color__picker.cc
===================================================================
--- head/www/chromium/files/patch-content_browser_devtools_protocol_color__picker.cc
+++ head/www/chromium/files/patch-content_browser_devtools_protocol_color__picker.cc
@@ -0,0 +1,11 @@
+--- content/browser/devtools/protocol/color_picker.cc.orig 2016-07-20 22:03:24.000000000 +0300
++++ content/browser/devtools/protocol/color_picker.cc 2016-08-18 02:35:16.268652000 +0300
+@@ -151,7 +151,7 @@
+ // 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-content_browser_geolocation_location__arbitrator__impl.cc
===================================================================
--- head/www/chromium/files/patch-content_browser_geolocation_location__arbitrator__impl.cc
+++ head/www/chromium/files/patch-content_browser_geolocation_location__arbitrator__impl.cc
@@ -1,11 +0,0 @@
---- content/browser/geolocation/location_arbitrator_impl.cc.orig 2016-05-11 19:02:20 UTC
-+++ content/browser/geolocation/location_arbitrator_impl.cc
-@@ -163,7 +163,7 @@ LocationProvider* LocationArbitratorImpl
- }
-
- LocationProvider* LocationArbitratorImpl::NewSystemLocationProvider() {
--#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
-+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD)
- return NULL;
- #else
- return content::NewSystemLocationProvider();
Index: head/www/chromium/files/patch-content_browser_geolocation_wifi__data__provider__freebsd.h
===================================================================
--- head/www/chromium/files/patch-content_browser_geolocation_wifi__data__provider__freebsd.h
+++ head/www/chromium/files/patch-content_browser_geolocation_wifi__data__provider__freebsd.h
@@ -1,33 +0,0 @@
---- content/browser/geolocation/wifi_data_provider_freebsd.h.orig 2016-05-20 17:18:26 UTC
-+++ content/browser/geolocation/wifi_data_provider_freebsd.h
-@@ -0,0 +1,30 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_FREEBSD_H_
-+#define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_FREEBSD_H_
-+
-+#include "base/compiler_specific.h"
-+#include "content/browser/geolocation/wifi_data_provider_common.h"
-+#include "content/common/content_export.h"
-+
-+namespace content {
-+
-+class CONTENT_EXPORT WifiDataProviderFreeBSD : public WifiDataProviderCommon {
-+ public:
-+ WifiDataProviderFreeBSD();
-+
-+ private:
-+ virtual ~WifiDataProviderFreeBSD();
-+
-+ // WifiDataProviderCommon
-+ virtual WlanApiInterface* NewWlanApi() override;
-+ virtual WifiPollingPolicy* NewPollingPolicy() override;
-+
-+ DISALLOW_COPY_AND_ASSIGN(WifiDataProviderFreeBSD);
-+};
-+
-+} // namespace content
-+
-+#endif // CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_FREEBSD_H_
Index: head/www/chromium/files/patch-content_browser_geolocation_wifi__data__provider__freebsd.cc
===================================================================
--- head/www/chromium/files/patch-content_browser_geolocation_wifi__data__provider__freebsd.cc
+++ head/www/chromium/files/patch-content_browser_geolocation_wifi__data__provider__freebsd.cc
@@ -1,204 +0,0 @@
---- content/browser/geolocation/wifi_data_provider_freebsd.cc.orig 2016-08-04 10:46:30.800769000 -0400
-+++ content/browser/geolocation/wifi_data_provider_freebsd.cc 2016-08-04 21:41:58.417450000 -0400
-@@ -0,0 +1,201 @@
-+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+// For FreeBSD we use the getifaddrs(3) to obtain the list of interfaces
-+// and then check for those with an 802.11 media type and able to return
-+// a list of stations. This is similar to ifconfig(8).
-+
-+#include "content/browser/geolocation/wifi_data_provider_freebsd.h"
-+
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+#include
-+
-+#include "base/strings/utf_string_conversions.h"
-+#include "content/browser/geolocation/wifi_data_provider_common.h"
-+#include "content/browser/geolocation/wifi_data_provider_manager.h"
-+
-+namespace content {
-+namespace {
-+// The time periods, in milliseconds, between successive polls of the wifi data.
-+const int kDefaultPollingInterval = 10000; // 10s
-+const int kNoChangePollingInterval = 120000; // 2 mins
-+const int kTwoNoChangePollingInterval = 600000; // 10 mins
-+const int kNoWifiPollingIntervalMilliseconds = 20 * 1000; // 20s
-+
-+// Convert a wifi frequency to the corresponding channel.
-+// Taken from wifi_data_provider_linux.cc where it says this was
-+// adapted from geolocaiton/wifilib.cc in googleclient (internal to google).
-+int frquency_to_channel(int frequency_Mhz) {
-+ if (frequency_Mhz >= 2412 && frequency_Mhz <= 2472) // Channels 1-13.
-+ return (frequency_Mhz - 2407) / 5;
-+ if (frequency_Mhz == 2484)
-+ return 14;
-+ if (frequency_Mhz > 5000 && frequency_Mhz < 6000) // .11a bands.
-+ return (frequency_Mhz - 5000) / 5;
-+ // Ignore everything else.
-+ return AccessPointData().channel; // invalid channel
-+}
-+
-+// Provides the wifi API binding for FreeBSD.
-+class AccessPointDataFreeBSD : public WifiDataProviderCommon::WlanApiInterface {
-+public:
-+ AccessPointDataFreeBSD();
-+ ~AccessPointDataFreeBSD();
-+
-+ // this does nothing
-+ bool Init();
-+
-+ // get the AP data
-+ virtual bool GetAccessPointData(WifiData::AccessPointDataSet* data);
-+
-+private:
-+ DISALLOW_COPY_AND_ASSIGN(AccessPointDataFreeBSD);
-+};
-+
-+AccessPointDataFreeBSD::AccessPointDataFreeBSD() {
-+}
-+
-+AccessPointDataFreeBSD::~AccessPointDataFreeBSD() {
-+}
-+
-+bool AccessPointDataFreeBSD::Init() {
-+ return true;
-+}
-+
-+bool AccessPointDataFreeBSD::GetAccessPointData(WifiData::AccessPointDataSet* data) {
-+ bool res;
-+ char *dupn;
-+ struct ifaddrs *ifal, *ifa;
-+ struct ifreq ifr;
-+ struct ifmediareq ifmr;
-+ struct ieee80211req i802r;
-+ int s;
-+ char iscanbuf[32*1024], *vsr;
-+ unsigned len;
-+ AccessPointData apd;
-+
-+ res = false;
-+ if (getifaddrs(&ifal) < 0)
-+ return res;
-+
-+ dupn = NULL;
-+ for (ifa = ifal; ifa; ifa = ifa->ifa_next) {
-+ memset(&ifr, 0, sizeof(ifr));
-+
-+ if (dupn != NULL && strcmp(dupn, ifa->ifa_name) == 0)
-+ continue;
-+ dupn = ifa->ifa_name;
-+
-+ strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
-+ ifr.ifr_addr.sa_family = AF_LOCAL;
-+
-+ if ((s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0)) < 0)
-+ continue;
-+
-+ (void) memset(&ifmr, 0, sizeof(ifmr));
-+ (void) strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
-+
-+ if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
-+ close(s);
-+ continue;
-+ }
-+ if (IFM_TYPE(ifmr.ifm_active) != IFM_IEEE80211) {
-+ close(s);
-+ continue;
-+ }
-+
-+ (void) memset(&i802r, 0, sizeof(i802r));
-+ (void) strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
-+ i802r.i_type = IEEE80211_IOC_SCAN_RESULTS;
-+ i802r.i_data = iscanbuf;
-+ i802r.i_len = sizeof(iscanbuf);
-+ if (ioctl(s, SIOCG80211, &i802r) < 0) {
-+ close(s);
-+ continue;
-+ }
-+
-+ close(s);
-+
-+ vsr = (char *) i802r.i_data;
-+ len = i802r.i_len;
-+ while (len >= sizeof(struct ieee80211req_scan_result)) {
-+ struct ieee80211req_scan_result *isr;
-+ char *id;
-+ int idlen;
-+ char ssid[IEEE80211_NWID_LEN+1];
-+
-+ isr = (struct ieee80211req_scan_result *) vsr;
-+
-+ if (isr->isr_meshid_len) {
-+ id = vsr + isr->isr_ie_off + isr->isr_ssid_len;
-+ idlen = isr->isr_meshid_len;
-+ }
-+ else {
-+ id = vsr + isr->isr_ie_off;
-+ idlen = isr->isr_ssid_len;
-+ }
-+ strncpy(ssid, id, idlen);
-+ ssid[idlen] = '\0';
-+ apd.ssid = base::UTF8ToUTF16(ssid);
-+ apd.mac_address = MacAddressAsString16(isr->isr_bssid);
-+ apd.radio_signal_strength = (isr->isr_rssi/2) + isr->isr_noise;
-+ apd.signal_to_noise = apd.radio_signal_strength - isr->isr_noise;
-+ apd.channel = frquency_to_channel(isr->isr_freq);
-+ VLOG(1) << "FreeBSD access point: "
-+ << "SSID: " << apd.ssid << ", "
-+ << "MAC: " << apd.mac_address << ", "
-+ << "Strength: " << apd.radio_signal_strength << ":"
-+ << apd.signal_to_noise << ", "
-+ << "Channel: " << apd.channel;
-+ data->insert(apd);
-+ res = true;
-+ len -= isr->isr_len;
-+ vsr += isr->isr_len;
-+ }
-+ }
-+
-+ freeifaddrs(ifal);
-+
-+ return res;
-+}
-+
-+} // namespace
-+
-+// static
-+WifiDataProvider* WifiDataProviderManager::DefaultFactoryFunction() {
-+ return new WifiDataProviderFreeBSD();
-+}
-+
-+WifiDataProviderFreeBSD::WifiDataProviderFreeBSD() {
-+}
-+
-+WifiDataProviderFreeBSD::~WifiDataProviderFreeBSD() {
-+}
-+
-+WifiDataProviderCommon::WlanApiInterface* WifiDataProviderFreeBSD::NewWlanApi() {
-+
-+ std::unique_ptr wlan_api(new AccessPointDataFreeBSD);
-+ if (wlan_api->Init())
-+ return wlan_api.release();
-+
-+ return NULL;
-+}
-+
-+WifiPollingPolicy* WifiDataProviderFreeBSD::NewPollingPolicy() {
-+ return new GenericWifiPollingPolicy;
-+}
-+
-+} // namespace content
Index: head/www/chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h
===================================================================
--- head/www/chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h
+++ head/www/chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.h
@@ -0,0 +1,11 @@
+--- content/browser/gpu/gpu_data_manager_impl_private.h.orig 2016-07-20 22:03:24.000000000 +0300
++++ content/browser/gpu/gpu_data_manager_impl_private.h 2016-08-18 02:42:16.971805000 +0300
+@@ -154,7 +154,7 @@
+ UnblockOtherDomainFrom3DAPIs);
+ FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest,
+ UnblockThisDomainFrom3DAPIs);
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest,
+ SetGLStrings);
+ FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest,
Index: head/www/chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
===================================================================
--- head/www/chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
+++ head/www/chromium/files/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
@@ -1,34 +1,43 @@
---- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2016-05-11 19:02:20 UTC
-+++ content/browser/gpu/gpu_data_manager_impl_private.cc
-@@ -486,8 +486,10 @@ void GpuDataManagerImplPrivate::SetGLStr
+--- content/browser/gpu/gpu_data_manager_impl_private.cc.orig 2016-10-06 04:02:18.000000000 +0300
++++ content/browser/gpu/gpu_data_manager_impl_private.cc 2016-10-14 17:58:04.977933000 +0300
+@@ -363,7 +363,7 @@
+ // strings even if all features are blacklisted. If all GPU features are
+ // disabled, the GPU process will only initialize GL bindings, create a GL
+ // context, and collect full GPU info.
+-#if !defined(OS_LINUX)
++#if !defined(OS_LINUX) || !defined(OS_BSD)
+ if (reason) {
+ *reason = "All GPU features are blacklisted.";
+ }
+@@ -486,8 +486,10 @@
gpu_info.gl_renderer = gl_renderer;
gpu_info.gl_version = gl_version;
-+#if !defined(OS_FREEBSD)
++#if !defined(OS_BSD)
gpu::IdentifyActiveGPU(&gpu_info);
gpu::CollectDriverInfoGL(&gpu_info);
+#endif
UpdateGpuInfo(gpu_info);
UpdateGpuSwitchingManager(gpu_info);
-@@ -529,10 +531,12 @@ void GpuDataManagerImplPrivate::Initiali
- // Also declare the driver_vendor to be osmesa to be able to specify
- // exceptions based on driver_vendor==osmesa for some blacklist rules.
- gpu_info.driver_vendor = gfx::kGLImplementationOSMesaName;
-+#ifndef __FreeBSD__
- } else {
- TRACE_EVENT0("startup",
- "GpuDataManagerImpl::Initialize:CollectBasicGraphicsInfo");
- gpu::CollectBasicGraphicsInfo(&gpu_info);
+@@ -542,10 +544,12 @@
+ // Skip collecting the basic driver info if SetGpuInfo() is already called.
+ if (IsCompleteGpuInfoAvailable()) {
+ gpu_info = gpu_info_;
++#ifndef OS_BSD
+ } else {
+ TRACE_EVENT0("startup",
+ "GpuDataManagerImpl::Initialize:CollectBasicGraphicsInfo");
+ gpu::CollectBasicGraphicsInfo(&gpu_info);
+#endif
+ }
if (command_line->HasSwitch(switches::kGpuTestingVendorId) &&
- command_line->HasSwitch(switches::kGpuTestingDeviceId)) {
-@@ -631,7 +635,9 @@ void GpuDataManagerImplPrivate::UpdateGp
+@@ -657,7 +661,9 @@
return;
bool was_info_available = IsCompleteGpuInfoAvailable();
-+#ifndef __FreeBSD__
++#ifndef OS_BSD
gpu::MergeGPUInfo(&gpu_info_, gpu_info);
+#endif
if (IsCompleteGpuInfoAvailable()) {
Index: head/www/chromium/files/patch-content_browser_gpu_gpu__process__host.cc
===================================================================
--- head/www/chromium/files/patch-content_browser_gpu_gpu__process__host.cc
+++ head/www/chromium/files/patch-content_browser_gpu_gpu__process__host.cc
@@ -0,0 +1,11 @@
+--- content/browser/gpu/gpu_process_host.cc.orig 2016-07-20 22:03:24.000000000 +0300
++++ content/browser/gpu/gpu_process_host.cc 2016-08-18 02:45:06.533983000 +0300
+@@ -968,7 +968,7 @@
+ base::CommandLine* cmd_line =
+ new base::CommandLine(base::CommandLine::NO_PROGRAM);
+ #else
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ int child_flags = gpu_launcher.empty() ? ChildProcessHost::CHILD_ALLOW_SELF :
+ ChildProcessHost::CHILD_NORMAL;
+ #else
Index: head/www/chromium/files/patch-content_browser_indexed__db_indexed__db__backing__store.cc
===================================================================
--- head/www/chromium/files/patch-content_browser_indexed__db_indexed__db__backing__store.cc
+++ head/www/chromium/files/patch-content_browser_indexed__db_indexed__db__backing__store.cc
@@ -1,11 +0,0 @@
---- content/browser/indexed_db/indexed_db_backing_store.cc.orig 2016-05-11 19:02:20 UTC
-+++ content/browser/indexed_db/indexed_db_backing_store.cc
-@@ -2433,7 +2433,7 @@ bool IndexedDBBackingStore::WriteBlobFil
- // The round-trip can be lossy; round to nearest millisecond.
- int64_t delta =
- (descriptor.last_modified() - info.last_modified).InMilliseconds();
-- if (std::abs(delta) > 1)
-+ if (std::labs(delta) > 1)
- return false;
- }
- if (!base::TouchFile(path, info.last_accessed, info.last_modified)) {
Index: head/www/chromium/files/patch-content_browser_media_media__internals.cc
===================================================================
--- head/www/chromium/files/patch-content_browser_media_media__internals.cc
+++ head/www/chromium/files/patch-content_browser_media_media__internals.cc
@@ -0,0 +1,11 @@
+--- content/browser/media/media_internals.cc.orig 2016-10-06 04:02:18.000000000 +0300
++++ content/browser/media/media_internals.cc 2016-10-13 06:53:50.938946000 +0300
+@@ -724,7 +724,7 @@
+ device_dict->SetString("name", descriptor.GetNameAndModel());
+ device_dict->Set("formats", format_list);
+ #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
+- defined(OS_ANDROID)
++ defined(OS_ANDROID) || defined(OS_BSD)
+ device_dict->SetString("captureApi", descriptor.GetCaptureApiTypeString());
+ #endif
+ video_capture_capabilities_cached_data_.Append(std::move(device_dict));
Index: head/www/chromium/files/patch-content_browser_ppapi__plugin__process__host.cc
===================================================================
--- head/www/chromium/files/patch-content_browser_ppapi__plugin__process__host.cc
+++ head/www/chromium/files/patch-content_browser_ppapi__plugin__process__host.cc
@@ -1,5 +1,5 @@
---- content/browser/ppapi_plugin_process_host.cc.orig 2016-05-11 19:02:20 UTC
-+++ content/browser/ppapi_plugin_process_host.cc
+--- content/browser/ppapi_plugin_process_host.cc.orig 2016-07-20 22:03:24.000000000 +0300
++++ content/browser/ppapi_plugin_process_host.cc 2016-08-18 02:36:09.470007000 +0300
@@ -49,7 +49,7 @@
namespace content {
@@ -9,7 +9,7 @@
ZygoteHandle g_ppapi_zygote;
#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-@@ -113,7 +113,7 @@ class PpapiPluginSandboxedProcessLaunche
+@@ -114,7 +114,7 @@
}
#elif defined(OS_POSIX)
@@ -18,7 +18,7 @@
ZygoteHandle* GetZygote() override {
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();
-@@ -213,7 +213,7 @@ PpapiPluginProcessHost* PpapiPluginProce
+@@ -214,7 +214,7 @@
return NULL;
}
@@ -27,3 +27,12 @@
// static
void PpapiPluginProcessHost::EarlyZygoteLaunch() {
DCHECK(!g_ppapi_zygote);
+@@ -377,7 +377,7 @@
+ base::CommandLine::StringType plugin_launcher =
+ browser_command_line.GetSwitchValueNative(switches::kPpapiPluginLauncher);
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ int flags = plugin_launcher.empty() ? ChildProcessHost::CHILD_ALLOW_SELF :
+ ChildProcessHost::CHILD_NORMAL;
+ #else
Index: head/www/chromium/files/patch-content_browser_renderer__host_media_video__capture__device__client.cc
===================================================================
--- head/www/chromium/files/patch-content_browser_renderer__host_media_video__capture__device__client.cc
+++ head/www/chromium/files/patch-content_browser_renderer__host_media_video__capture__device__client.cc
@@ -0,0 +1,11 @@
+--- content/browser/renderer_host/media/video_capture_device_client.cc.orig 2016-07-20 22:03:24.000000000 +0300
++++ content/browser/renderer_host/media/video_capture_device_client.cc 2016-08-18 02:29:10.788160000 +0300
+@@ -181,7 +181,7 @@
+ // see http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html.
+ // Windows RGB24 defines blue at lowest byte,
+ // see https://msdn.microsoft.com/en-us/library/windows/desktop/dd407253
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ origin_colorspace = libyuv::FOURCC_RAW;
+ #elif defined(OS_WIN)
+ origin_colorspace = libyuv::FOURCC_24BG;
Index: head/www/chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc
===================================================================
--- head/www/chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc
+++ head/www/chromium/files/patch-content_browser_renderer__host_render__process__host__impl.cc
@@ -1,6 +1,6 @@
---- content/browser/renderer_host/render_process_host_impl.cc.orig 2016-05-20 17:18:26 UTC
-+++ content/browser/renderer_host/render_process_host_impl.cc
-@@ -366,7 +366,7 @@ SiteProcessMap* GetSiteProcessMapForBrow
+--- content/browser/renderer_host/render_process_host_impl.cc.orig 2016-07-20 22:03:24.000000000 +0300
++++ content/browser/renderer_host/render_process_host_impl.cc 2016-08-18 02:32:43.439813000 +0300
+@@ -359,7 +359,7 @@
return map;
}
@@ -9,7 +9,7 @@
// This static member variable holds the zygote communication information for
// the renderer.
ZygoteHandle g_render_zygote;
-@@ -399,7 +399,7 @@ class RendererSandboxedProcessLauncherDe
+@@ -392,7 +392,7 @@
}
#elif defined(OS_POSIX)
@@ -18,7 +18,7 @@
ZygoteHandle* GetZygote() override {
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();
-@@ -539,7 +539,7 @@ void RenderProcessHost::SetMaxRendererPr
+@@ -514,7 +514,7 @@
g_max_renderer_count_override = count;
}
@@ -27,3 +27,12 @@
// static
void RenderProcessHostImpl::EarlyZygoteLaunch() {
DCHECK(!g_render_zygote);
+@@ -684,7 +684,7 @@
+ renderer_prefix =
+ browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix);
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ int flags = renderer_prefix.empty() ? ChildProcessHost::CHILD_ALLOW_SELF
+ : ChildProcessHost::CHILD_NORMAL;
+ #else
Index: head/www/chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc
===================================================================
--- head/www/chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc
+++ head/www/chromium/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc
@@ -1,29 +1,29 @@
---- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2016-07-22 00:06:54.000000000 -0400
-+++ content/browser/renderer_host/render_widget_host_view_aura.cc 2016-08-03 12:34:00.357612000 -0400
-@@ -105,7 +105,7 @@
+--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig 2016-10-06 04:02:18.000000000 +0300
++++ content/browser/renderer_host/render_widget_host_view_aura.cc 2016-10-13 07:01:47.728403000 +0300
+@@ -106,7 +106,7 @@
#include "ui/gfx/gdi_util.h"
#endif
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
- #include "content/common/input_messages.h"
- #include "ui/events/linux/text_edit_command_auralinux.h"
- #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h"
-@@ -2376,7 +2376,7 @@
+ #include "ui/base/ime/linux/text_edit_command_auralinux.h"
+ #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h"
+ #endif
+@@ -2479,7 +2479,7 @@
}
bool RenderWidgetHostViewAura::NeedsMouseCapture() {
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
return NeedsInputGrab();
#endif
return false;
-@@ -2608,7 +2608,7 @@
+@@ -2711,7 +2711,7 @@
if (!target_host)
return;
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate =
ui::GetTextEditKeyBindingsDelegate();
std::vector commands;
Index: head/www/chromium/files/patch-content_browser_tracing_tracing__controller__impl.cc
===================================================================
--- head/www/chromium/files/patch-content_browser_tracing_tracing__controller__impl.cc
+++ head/www/chromium/files/patch-content_browser_tracing_tracing__controller__impl.cc
@@ -0,0 +1,11 @@
+--- content/browser/tracing/tracing_controller_impl.cc.orig 2016-07-20 22:03:24.000000000 +0300
++++ content/browser/tracing/tracing_controller_impl.cc 2016-08-18 02:46:09.991782000 +0300
+@@ -496,7 +496,7 @@
+ return;
+ }
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // On Linux the browser process dumps process metrics for child process due to
+ // sandbox.
+ tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess(
Index: head/www/chromium/files/patch-content_browser_utility__process__host__impl.cc
===================================================================
--- head/www/chromium/files/patch-content_browser_utility__process__host__impl.cc
+++ head/www/chromium/files/patch-content_browser_utility__process__host__impl.cc
@@ -1,6 +1,6 @@
---- content/browser/utility_process_host_impl.cc.orig 2016-05-11 19:02:21 UTC
-+++ content/browser/utility_process_host_impl.cc
-@@ -37,7 +37,7 @@
+--- content/browser/utility_process_host_impl.cc.orig 2016-07-20 22:03:24.000000000 +0300
++++ content/browser/utility_process_host_impl.cc 2016-08-18 02:26:27.996136000 +0300
+@@ -38,7 +38,7 @@
#include "ipc/ipc_switches.h"
#include "ui/base/ui_base_switches.h"
@@ -9,7 +9,7 @@
#include "content/public/browser/zygote_handle_linux.h"
#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-@@ -48,7 +48,7 @@
+@@ -49,7 +49,7 @@
namespace content {
@@ -18,7 +18,7 @@
namespace {
ZygoteHandle g_utility_zygote;
} // namespace
-@@ -68,7 +68,7 @@ class UtilitySandboxedProcessLauncherDel
+@@ -69,7 +69,7 @@
launch_elevated_(launch_elevated)
#elif defined(OS_POSIX)
env_(env),
@@ -27,7 +27,7 @@
no_sandbox_(no_sandbox),
#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID)
ipc_fd_(host->TakeClientFileDescriptor())
-@@ -100,7 +100,7 @@ class UtilitySandboxedProcessLauncherDel
+@@ -101,7 +101,7 @@
#elif defined(OS_POSIX)
@@ -36,7 +36,7 @@
ZygoteHandle* GetZygote() override {
if (no_sandbox_ || !exposed_dir_.empty())
return nullptr;
-@@ -122,7 +122,7 @@ class UtilitySandboxedProcessLauncherDel
+@@ -123,7 +123,7 @@
bool launch_elevated_;
#elif defined(OS_POSIX)
base::EnvironmentMap env_;
@@ -45,7 +45,16 @@
bool no_sandbox_;
#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID)
base::ScopedFD ipc_fd_;
-@@ -238,7 +238,7 @@ void UtilityProcessHostImpl::SetName(con
+@@ -151,7 +151,7 @@
+ is_batch_mode_(false),
+ no_sandbox_(false),
+ run_elevated_(false),
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ child_flags_(ChildProcessHost::CHILD_ALLOW_SELF),
+ #else
+ child_flags_(ChildProcessHost::CHILD_NORMAL),
+@@ -232,7 +232,7 @@
name_ = name;
}
Index: head/www/chromium/files/patch-content_common_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-content_common_BUILD.gn
+++ head/www/chromium/files/patch-content_common_BUILD.gn
@@ -0,0 +1,27 @@
+--- content/common/BUILD.gn.orig 2016-08-03 22:02:18.000000000 +0300
++++ content/common/BUILD.gn 2016-10-09 05:21:51.439131000 +0300
+@@ -179,7 +179,7 @@
+ if (use_seccomp_bpf) {
+ defines += [ "USE_SECCOMP_BPF" ]
+ } else {
+- if (is_linux) {
++ if (is_linux || is_bsd) {
+ sources -= [
+ "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
+ "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
+@@ -193,6 +193,15 @@
+ "sandbox_linux/bpf_utility_policy_linux.h",
+ "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
+ "sandbox_linux/sandbox_bpf_base_policy_linux.h",
++ "sandbox_linux/sandbox_seccomp_bpf_linux.cc",
++ "sandbox_linux/sandbox_seccomp_bpf_linux.h",
++ ]
++ }
++ if (is_bsd) {
++ sources -= [
++ "sandbox_linux/sandbox_linux.cc",
++ "sandbox_linux/sandbox_linux.h",
++ "sandbox_linux/sandbox_init_linux.cc",
+ ]
+ }
+ if (is_android) {
Index: head/www/chromium/files/patch-content_content__browser.gypi
===================================================================
--- head/www/chromium/files/patch-content_content__browser.gypi
+++ head/www/chromium/files/patch-content_content__browser.gypi
@@ -1,77 +0,0 @@
---- content/content_browser.gypi.orig 2016-05-11 19:02:21 UTC
-+++ content/content_browser.gypi
-@@ -843,6 +843,8 @@
- 'browser/geolocation/wifi_data_provider_common_win.cc',
- 'browser/geolocation/wifi_data_provider_common_win.h',
- 'browser/geolocation/wifi_data_provider_corewlan_mac.mm',
-+ 'browser/geolocation/wifi_data_provider_freebsd.cc',
-+ 'browser/geolocation/wifi_data_provider_freebsd.h',
- 'browser/geolocation/wifi_data_provider_linux.cc',
- 'browser/geolocation/wifi_data_provider_linux.h',
- 'browser/geolocation/wifi_data_provider_mac.cc',
-@@ -1988,7 +1990,7 @@
- },
- },
- }],
-- ['OS=="linux" and chromeos==0 and use_x11==1', {
-+ ['(os_bsd==1 or OS=="linux") and chromeos==0 and use_x11==1', {
- 'dependencies': [
- '../build/linux/system.gyp:atk',
- '../build/linux/system.gyp:gconf',
-@@ -2014,7 +2016,7 @@
- 'browser/gamepad/gamepad_platform_data_fetcher_linux.cc',
- ],
- }],
-- ['OS=="linux" and use_aura==1', {
-+ ['(os_bsd==1 or OS=="linux") and use_aura==1', {
- 'dependencies': [
- '../build/linux/system.gyp:fontconfig',
- ],
-@@ -2109,8 +2111,24 @@
- ],
- }],
- ['os_bsd==1', {
-- 'sources/': [
-- ['exclude', '^browser/gamepad/gamepad_platform_data_fetcher_linux\\.cc$'],
-+ 'sources!': [
-+ 'public/browser/zygote_host_linux.h',
-+ 'browser/zygote_host/zygote_communication_linux.cc',
-+ 'browser/zygote_host/zygote_communication_linux.h',
-+ 'browser/zygote_host/zygote_handle_linux.cc',
-+ 'browser/zygote_host/zygote_host_impl_linux.cc',
-+ 'browser/zygote_host/zygote_host_impl_linux.h',
-+ 'zygote/zygote_linux.cc',
-+ 'zygote/zygote_linux.h',
-+ 'zygote/zygote_main_linux.cc',
-+ 'browser/device_monitor_linux.cc',
-+ 'browser/download/file_metadata_linux.cc',
-+ 'browser/gamepad/gamepad_platform_data_fetcher_linux.cc',
-+ 'browser/geolocation/wifi_data_provider_linux.cc',
-+ 'browser/udev_linux.cc',
-+ ],
-+ 'dependencies': [
-+ '../build/linux/system.gyp:dbus',
- ],
- }],
- ['use_aura==1', {
-@@ -2159,10 +2177,7 @@
- 'browser/geolocation/empty_wifi_data_provider.cc',
- ],
- }],
-- ['OS == "linux" and use_dbus==1', {
-- 'sources!': [
-- 'browser/geolocation/empty_wifi_data_provider.cc',
-- ],
-+ ['(OS == "linux" or os_bsd==1) and use_dbus==1', {
- 'dependencies': [
- '../build/linux/system.gyp:dbus',
- '../dbus/dbus.gyp:dbus',
-@@ -2178,7 +2193,7 @@
- 'browser/media/cdm/browser_cdm_manager.h',
- ],
- }],
-- ['OS == "linux"', {
-+ ['(os_bsd==1 or OS == "linux")', {
- 'dependencies': [
- '../third_party/boringssl/boringssl.gyp:boringssl',
- ],
Index: head/www/chromium/files/patch-content_content__common.gypi
===================================================================
--- head/www/chromium/files/patch-content_content__common.gypi
+++ head/www/chromium/files/patch-content_content__common.gypi
@@ -1,24 +0,0 @@
---- content/content_common.gypi.orig 2016-05-11 19:02:21 UTC
-+++ content/content_common.gypi
-@@ -737,6 +737,21 @@
- 'content.gyp:common_aidl',
- ],
- }],
-+ ['os_bsd==1', {
-+ 'sources!': [
-+ 'common/sandbox_linux.cc',
-+ 'common/sandbox_linux.h',
-+ 'common/sandbox_init_linux.cc',
-+ 'common/sandbox_seccomp_bpf_linux.cc',
-+ 'common/sandbox_seccomp_bpf_linux.h',
-+ 'common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc',
-+ 'common/sandbox_linux/bpf_gpu_policy_linux.cc',
-+ 'common/sandbox_linux/bpf_ppapi_policy_linux.cc',
-+ 'common/sandbox_linux/bpf_renderer_policy_linux.cc',
-+ 'common/sandbox_linux/sandbox_bpf_base_policy_linux.cc',
-+ 'common/sandbox_linux/sandbox_seccomp_bpf_linux.cc',
-+ ],
-+ }],
- ['use_pango == 1', {
- 'dependencies': [
- '../build/linux/system.gyp:pangocairo',
Index: head/www/chromium/files/patch-content_content__tests.gypi
===================================================================
--- head/www/chromium/files/patch-content_content__tests.gypi
+++ head/www/chromium/files/patch-content_content__tests.gypi
@@ -1,18 +0,0 @@
---- content/content_tests.gypi.orig 2016-05-25 15:01:01.000000000 -0400
-+++ content/content_tests.gypi 2016-05-27 10:58:38.919413000 -0400
-@@ -1186,6 +1186,15 @@
- 'renderer/media/video_track_recorder_unittest.cc',
- ],
- }],
-+ ['OS == "freebsd"', {
-+ 'sources!': [
-+ 'browser/download/file_metadata_unittest_linux.cc',
-+ 'browser/geolocation/wifi_data_provider_linux_unittest.cc',
-+ 'browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc',
-+ 'browser/renderer_host/media/media_stream_manager_unittest.cc',
-+ 'browser/renderer_host/media/media_stream_ui_controller_unittest.cc'
-+ ]
-+ }],
- # Avoid windows due to non-availability of cursor resources in test.
- ['OS != "linux"', {
- 'sources!': [
Index: head/www/chromium/files/patch-content_gpu_BUILD.gn
===================================================================
--- head/www/chromium/files/patch-content_gpu_BUILD.gn
+++ head/www/chromium/files/patch-content_gpu_BUILD.gn
@@ -0,0 +1,10 @@
+--- content/gpu/BUILD.gn.orig 2016-10-06 04:02:19.000000000 +0300
++++ content/gpu/BUILD.gn 2016-10-15 10:05:38.417673000 +0300
+@@ -98,6 +98,7 @@
+
+ if (use_x11) {
+ deps += [ "//ui/events/platform/x11" ]
++ configs += [ "//build/config/linux:x11" ]
+ }
+
+ if (use_ozone) {
Index: head/www/chromium/files/patch-content_gpu_gpu__child__thread.cc
===================================================================
--- head/www/chromium/files/patch-content_gpu_gpu__child__thread.cc
+++ head/www/chromium/files/patch-content_gpu_gpu__child__thread.cc
@@ -1,14 +1,14 @@
---- content/gpu/gpu_child_thread.cc.orig 2016-05-11 19:02:21 UTC
-+++ content/gpu/gpu_child_thread.cc
-@@ -382,6 +382,7 @@ void GpuChildThread::StopWatchdog() {
- }
+--- content/gpu/gpu_child_thread.cc.orig 2016-10-06 04:02:19.000000000 +0300
++++ content/gpu/gpu_child_thread.cc 2016-10-14 15:27:34.081648000 +0300
+@@ -419,6 +419,7 @@
+ if (dead_on_arrival_)
+ return;
- void GpuChildThread::OnCollectGraphicsInfo() {
-+#if !defined(OS_FREEBSD)
++#if !defined(OS_BSD)
#if defined(OS_WIN)
// GPU full info collection should only happen on un-sandboxed GPU process
// or single process/in-process gpu mode on Windows.
-@@ -424,6 +425,7 @@ void GpuChildThread::OnCollectGraphicsIn
+@@ -461,6 +462,7 @@
base::MessageLoop::current()->QuitWhenIdle();
}
#endif // OS_WIN
Index: head/www/chromium/files/patch-content_gpu_gpu__main.cc
===================================================================
--- head/www/chromium/files/patch-content_gpu_gpu__main.cc
+++ head/www/chromium/files/patch-content_gpu_gpu__main.cc
@@ -1,14 +1,14 @@
---- content/gpu/gpu_main.cc.orig 2016-07-22 00:06:54.000000000 -0400
-+++ content/gpu/gpu_main.cc 2016-08-03 12:37:05.590978000 -0400
+--- content/gpu/gpu_main.cc.orig 2016-07-20 22:03:24.000000000 +0300
++++ content/gpu/gpu_main.cc 2016-08-10 15:59:24.697490000 +0300
@@ -102,7 +102,7 @@
const base::CommandLine& command_line);
bool WarmUpSandbox(const base::CommandLine& command_line);
-
+
-#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_FREEBSD) //XXX(rene) added !FreeBSD
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
bool CollectGraphicsInfo(gpu::GPUInfo& gpu_info);
#endif
-
+
@@ -192,13 +192,13 @@
// Use a UI message loop because ANGLE and the desktop GL platform can
// create child windows to render to.
@@ -21,7 +21,7 @@
std::unique_ptr event_source =
ui::PlatformEventSource::CreateDefault();
-#elif defined(OS_LINUX)
-+#elif (defined(OS_LINUX) || defined(OS_BSD))
++#elif defined(OS_LINUX) || defined(OS_BSD)
base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT);
#elif defined(OS_MACOSX)
// This is necessary for CoreAnimation layers hosted in the GPU process to be
@@ -30,16 +30,16 @@
base::TimeTicks before_collect_context_graphics_info =
base::TimeTicks::Now();
-#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_FREEBSD) //XXX(rene) added !FreeBSD
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
if (!CollectGraphicsInfo(gpu_info))
dead_on_arrival = true;
-
+
@@ -491,7 +491,7 @@
return true;
}
-
+
-#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_FREEBSD)//XXX(rene) added !FreeBSD
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
bool CollectGraphicsInfo(gpu::GPUInfo& gpu_info) {
TRACE_EVENT0("gpu,startup", "Collect Graphics Info");
-
+
Index: head/www/chromium/files/patch-content_public_common_child__process__host.h
===================================================================
--- head/www/chromium/files/patch-content_public_common_child__process__host.h
+++ head/www/chromium/files/patch-content_public_common_child__process__host.h
@@ -0,0 +1,20 @@
+--- ./content/public/common/child_process_host.h.orig 2016-07-20 22:03:24.000000000 +0300
++++ ./content/public/common/child_process_host.h 2016-08-18 02:52:30.173927000 +0300
+@@ -50,7 +50,7 @@
+ // No special behavior requested.
+ CHILD_NORMAL = 0,
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Indicates that the child execed after forking may be execced from
+ // /proc/self/exe rather than using the "real" app path. This prevents
+ // autoupdate from confusing us if it changes the file out from under us.
+@@ -59,7 +59,7 @@
+ // gdb). In this case, you'd use GetChildPath to get the real executable
+ // file name, and then prepend the GDB command to the command line.
+ CHILD_ALLOW_SELF = 1 << 0,
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+ };
+
+ // Returns the pathname to be used for a child process. If a subprocess
Index: head/www/chromium/files/patch-content_renderer_devtools_v8__sampling__profiler.cc
===================================================================
--- head/www/chromium/files/patch-content_renderer_devtools_v8__sampling__profiler.cc
+++ head/www/chromium/files/patch-content_renderer_devtools_v8__sampling__profiler.cc
@@ -4,7 +4,7 @@
state.pc = reinterpret_cast(mcontext->__ss.REG_64_32(__rip, __eip));
state.sp = reinterpret_cast(mcontext->__ss.REG_64_32(__rsp, __esp));
state.fp = reinterpret_cast(mcontext->__ss.REG_64_32(__rbp, __ebp));
-+#elif defined(OS_FREEBSD)
++#elif defined(OS_BSD)
+ state.pc = reinterpret_cast(mcontext.REG_64_32(mc_rip, mc_eip));
+ state.sp = reinterpret_cast(mcontext.REG_64_32(mc_rsp, mc_esp));
+ state.fp = reinterpret_cast(mcontext.REG_64_32(mc_rbp, mc_ebp));
Index: head/www/chromium/files/patch-content_renderer_media_webrtc__audio__renderer.cc
===================================================================
--- head/www/chromium/files/patch-content_renderer_media_webrtc__audio__renderer.cc
+++ head/www/chromium/files/patch-content_renderer_media_webrtc__audio__renderer.cc
@@ -1,11 +0,0 @@
---- content/renderer/media/webrtc_audio_renderer.cc.orig 2016-06-08 12:04:14.328279000 -0400
-+++ content/renderer/media/webrtc_audio_renderer.cc 2016-06-08 12:04:28.210758000 -0400
-@@ -162,7 +162,7 @@
- // Windows below.
- int frames_per_buffer = hardware_buffer_size;
-
--#if defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
- // On Linux and MacOS, the low level IO implementations on the browser side
- // supports all buffer size the clients want. We use the native peer
- // connection buffer size (10ms) to achieve best possible performance.
Index: head/www/chromium/files/patch-content_renderer_media_webrtc_processed__local__audio__source.cc
===================================================================
--- head/www/chromium/files/patch-content_renderer_media_webrtc_processed__local__audio__source.cc
+++ head/www/chromium/files/patch-content_renderer_media_webrtc_processed__local__audio__source.cc
@@ -1,11 +1,13 @@
---- ./content/renderer/media/webrtc/processed_local_audio_source.cc.orig 2016-08-03 12:48:04.721257000 -0400
-+++ ./content/renderer/media/webrtc/processed_local_audio_source.cc 2016-08-03 12:48:34.201210000 -0400
-@@ -269,7 +269,7 @@
+--- content/renderer/media/webrtc/processed_local_audio_source.cc.orig 2016-07-20 22:03:24.000000000 +0300
++++ content/renderer/media/webrtc/processed_local_audio_source.cc 2016-08-01 03:25:27.013281000 +0300
+@@ -269,8 +269,8 @@
bool key_pressed) {
#if defined(OS_WIN) || defined(OS_MACOSX)
DCHECK_LE(volume, 1.0);
-#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_OPENBSD)
-+#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
- // We have a special situation on Linux where the microphone volume can be
+- // We have a special situation on Linux where the microphone volume can be
++#elif defined(OS_POSIX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
++ // We have a special situation on POSIX where the microphone volume can be
// "higher than maximum". The input volume slider in the sound preference
// allows the user to set a scaling that is higher than 100%. It means that
+ // even if the reported maximum levels is N, the actual microphone level can
Index: head/www/chromium/files/patch-content_renderer_render__thread__impl.cc
===================================================================
--- head/www/chromium/files/patch-content_renderer_render__thread__impl.cc
+++ head/www/chromium/files/patch-content_renderer_render__thread__impl.cc
@@ -1,5 +1,5 @@
---- content/renderer/render_thread_impl.cc.orig 2016-07-22 00:06:54.000000000 -0400
-+++ content/renderer/render_thread_impl.cc 2016-08-03 14:17:16.736255000 -0400
+--- content/renderer/render_thread_impl.cc.orig 2016-07-20 22:03:24.000000000 +0300
++++ content/renderer/render_thread_impl.cc 2016-08-01 04:09:35.329085000 +0300
@@ -1424,7 +1424,7 @@
const bool enable_video_accelerator =
!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
Index: head/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc
===================================================================
--- head/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc
+++ head/www/chromium/files/patch-content_renderer_renderer__blink__platform__impl.cc
@@ -1,56 +1,56 @@
---- content/renderer/renderer_blink_platform_impl.cc.orig 2016-05-27 22:47:40.255637000 -0400
-+++ content/renderer/renderer_blink_platform_impl.cc 2016-05-28 10:09:25.718992000 -0400
-@@ -116,7 +116,7 @@
+--- content/renderer/renderer_blink_platform_impl.cc.orig 2016-10-06 04:02:19.000000000 +0300
++++ content/renderer/renderer_blink_platform_impl.cc 2016-10-13 07:15:18.714150000 +0300
+@@ -114,7 +114,7 @@
#if defined(OS_POSIX)
#include "base/file_descriptor_posix.h"
-#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_FREEBSD)
++#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
#include