summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos J. Puga Medina <cpm@FreeBSD.org>2018-08-07 13:56:28 +0000
committerCarlos J. Puga Medina <cpm@FreeBSD.org>2018-08-07 13:56:28 +0000
commit76360496491c8b5323b6655362a2193e36b3d774 (patch)
tree0a15731855dec4e02e5f3187543ac18c0bceebd0
parentUpdate to 1.14.0. (diff)
www/chromium: Update to 68.0.3440.84
Changelog: https://chromium.googlesource.com/chromium/src/+log/67.0.3396.87..68.0.3440.84?pretty=fuller&n=10000 At the moment pkg-message says that in order to work around the hanging tabs problem the user may wish to run the following commands: # [ -d ~{user}/.cache/chromium ] || mkdir ~{user}/.cache/chromium # echo "md $(echo ~{user})/.cache/chromium mfs rw,late,-w{user}:{group},-s300m 2 0" >> /etc/fstab # mount ~{user}/.cache/chromium Add fix-hanging-tabs.sh script to the DATADIR [1], which simplifies the process to just running /usr/local/share/chromium/fix-hanging-tabs.sh $user $group PR: 230264 [1] Submitted by: 0mp [1] MFH: 2018Q3 Security: http://vuxml.freebsd.org/freebsd/b9c525d9-9198-11e8-beba-080027ef1a23.html
Notes
Notes: svn path=/head/; revision=476599
-rw-r--r--www/chromium/Makefile5
-rw-r--r--www/chromium/distinfo10
-rw-r--r--www/chromium/files/audio_manager_openbsd.cc6
-rw-r--r--www/chromium/files/extra-patch-llvm-base76
-rw-r--r--www/chromium/files/extra-patch-llvm-port89
-rw-r--r--www/chromium/files/fix-hanging-tabs.sh45
-rw-r--r--www/chromium/files/patch-base__trace_event__process_memory_dump.h11
-rw-r--r--www/chromium/files/patch-base_debug_elf_reader_linux.cc13
-rw-r--r--www/chromium/files/patch-base_process_process__metrics__freebsd.cc16
-rw-r--r--www/chromium/files/patch-base_process_process__metrics__posix.cc22
-rw-r--r--www/chromium/files/patch-base_trace__event_process__memory__dump.cc20
-rw-r--r--www/chromium/files/patch-base_trace__event_process__memory__dump.h11
-rw-r--r--www/chromium/files/patch-build_config_BUILD.gn23
-rw-r--r--www/chromium/files/patch-build_config_BUILDCONFIG.gn46
-rw-r--r--www/chromium/files/patch-build_config_compiler_BUILD.gn89
-rw-r--r--www/chromium/files/patch-build_config_compiler_compiler.gni16
-rw-r--r--www/chromium/files/patch-chrome_browser_about__flags.cc38
-rw-r--r--www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc45
-rw-r--r--www/chromium/files/patch-chrome_browser_memory__details.cc14
-rw-r--r--www/chromium/files/patch-chrome_browser_tracing_crash__service__uploader.cc10
-rw-r--r--www/chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc40
-rw-r--r--www/chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc16
-rw-r--r--www/chromium/files/patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc14
-rw-r--r--www/chromium/files/patch-chrome_common_chrome__features.cc22
-rw-r--r--www/chromium/files/patch-chrome_common_chrome__features.h20
-rw-r--r--www/chromium/files/patch-components_autofill_content_renderer_password__form__conversion__utils.cc8
-rw-r--r--www/chromium/files/patch-components_autofill_strings.grdp23
-rw-r--r--www/chromium/files/patch-components_crash_content_app_crashpad.cc27
-rw-r--r--www/chromium/files/patch-components_crash_core_common_BUILD.gn28
-rw-r--r--www/chromium/files/patch-components_services_filesystem_file_system_app.cc8
-rw-r--r--www/chromium/files/patch-content_app_content_main_runner_impl.cc (renamed from www/chromium/files/patch-content_app_content__main__runner.cc)21
-rw-r--r--www/chromium/files/patch-content_browser_BUILD.gn25
-rw-r--r--www/chromium/files/patch-content_browser_background_fetch_background_fetch_context.cc12
-rw-r--r--www/chromium/files/patch-content_browser_browser__main__loop.cc21
-rw-r--r--www/chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc65
-rw-r--r--www/chromium/files/patch-content_common_common_sandbox_support_linux.cc11
-rw-r--r--www/chromium/files/patch-content_public_common_zygote_features.gni8
-rw-r--r--www/chromium/files/patch-content_renderer_input_input_event_prediction.cc12
-rw-r--r--www/chromium/files/patch-content_renderer_render__thread__impl.cc33
-rw-r--r--www/chromium/files/patch-content_renderer_renderer_main.cc16
-rw-r--r--www/chromium/files/patch-media_ffmpeg_ffmpeg_common.h21
-rw-r--r--www/chromium/files/patch-media_filters_ffmpeg_demuxer.cc139
-rw-r--r--www/chromium/files/patch-media_filters_ffmpeg_demuxer_unittest.cc56
-rw-r--r--www/chromium/files/patch-net_base_address__tracker__linux.cc20
-rw-r--r--www/chromium/files/patch-net_quic_platform_impl_quic__ip__address__impl.cc10
-rw-r--r--www/chromium/files/patch-net_third_party_quic_platform_impl_quic_ip_address_impl.cc10
-rw-r--r--www/chromium/files/patch-pdf_pdfium_pdfium__engine.cc30
-rw-r--r--www/chromium/files/patch-sandbox_linux_BUILD.gn14
-rw-r--r--www/chromium/files/patch-sandbox_linux_services_init_process_reaper.cc15
-rw-r--r--www/chromium/files/patch-services_network_BUILD.gn10
-rw-r--r--www/chromium/files/patch-services_resource_coordinator_public_cpp_memory_instrumentation_os_metrics_linux.cc28
-rw-r--r--www/chromium/files/patch-services_service__manager_zygote_common_zygote_features.gni8
-rw-r--r--www/chromium/files/patch-services_service__manager_zygote_host_zygote_host_impl_linux.cc (renamed from www/chromium/files/patch-content_browser_zygote_host_zygote_host_impl_linux.cc)14
-rw-r--r--www/chromium/files/patch-services_service__manager_zygote_host_zygote_host_impl_linux.h (renamed from www/chromium/files/patch-content_browser_zygote_host_zygote_host_impl_linux.h)6
-rw-r--r--www/chromium/files/patch-services_service__manager_zygote_zygote_host_linux.h (renamed from www/chromium/files/patch-content_public_browser_zygote_host_linux.h)8
-rw-r--r--www/chromium/files/patch-services_service__manager_zygote_zygote_linux.cc15
-rw-r--r--www/chromium/files/patch-services_service__manager_zygote_zygote_main_linux.cc48
-rw-r--r--www/chromium/files/patch-third__party_angle_BUILD.gn22
-rw-r--r--www/chromium/files/patch-third_party_crashpad_crashpad_util_misc_capture_context.h14
-rw-r--r--www/chromium/files/patch-third_party_perfetto_include_perfetto_base_build_config.h37
-rw-r--r--www/chromium/files/patch-third_party_perfetto_include_perfetto_base_watchdog_posix.h11
-rw-r--r--www/chromium/files/patch-third_party_perfetto_src_base_unix_task_runner.cc11
-rw-r--r--www/chromium/files/patch-third_party_perfetto_src_tracing_core_service_impl.cc11
-rw-r--r--www/chromium/files/patch-ui_gfx_BUILD.gn11
-rw-r--r--www/chromium/files/patch-ui_gl_BUILD.gn21
-rw-r--r--www/chromium/files/patch-ui_gl_gl_fence.cc11
-rw-r--r--www/chromium/files/patch-ui_gl_gl_implementation.cc14
-rw-r--r--www/chromium/files/patch-v8_BUILD.gn19
-rw-r--r--www/chromium/files/patch-v8_src_globals.h14
-rw-r--r--www/chromium/files/patch-v8_src_trap-handler_handler-inside.cc16
-rw-r--r--www/chromium/files/sndio_input.cc17
-rw-r--r--www/chromium/files/sndio_input.h1
-rw-r--r--www/chromium/files/sndio_output.cc16
-rw-r--r--www/chromium/pkg-message20
-rw-r--r--www/chromium/pkg-plist3
75 files changed, 875 insertions, 881 deletions
diff --git a/www/chromium/Makefile b/www/chromium/Makefile
index 55308b5c1d56..d42e9ac30e27 100644
--- a/www/chromium/Makefile
+++ b/www/chromium/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= chromium
-PORTVERSION= 67.0.3396.87
-PORTREVISION= 1
+PORTVERSION= 68.0.3440.84
CATEGORIES?= www
MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
@@ -103,7 +102,6 @@ GN_ARGS+= clang_use_chrome_plugins=false \
enable_nacl=false \
enable_one_click_signin=true \
enable_remoting=false \
- enable_webrtc=true \
fieldtrial_testing_like_official_build=true \
is_clang=true \
toolkit_views=true \
@@ -299,6 +297,7 @@ do-install:
${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/swiftshader/${g} \
${STAGEDIR}${DATADIR}/swiftshader
.endfor
+ ${INSTALL_SCRIPT} ${FILESDIR}/fix-hanging-tabs.sh ${STAGEDIR}${DATADIR}
post-install-DEBUG-on:
${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/*.so \
diff --git a/www/chromium/distinfo b/www/chromium/distinfo
index 301e2d681692..90b67bd11483 100644
--- a/www/chromium/distinfo
+++ b/www/chromium/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1531563535
-SHA256 (chromium-67.0.3396.87.tar.xz) = 5d27a72f0cb8247343034f63fdd9747ff388c05b9fceb541668dd04fb372db1d
-SIZE (chromium-67.0.3396.87.tar.xz) = 591491608
-SHA256 (chromium-67.0.3396.87-testdata.tar.xz) = 091923fca8baca0e949d1d8e490cabdec0a536c3af3d67d398c6465b67c5fb3c
-SIZE (chromium-67.0.3396.87-testdata.tar.xz) = 261857908
+TIMESTAMP = 1533378824
+SHA256 (chromium-68.0.3440.84.tar.xz) = 1031d167ae18d8a37f9291ff0e9a3dca2337c0fc1031f2c243d0327b14ecc9d9
+SIZE (chromium-68.0.3440.84.tar.xz) = 630259488
+SHA256 (chromium-68.0.3440.84-testdata.tar.xz) = bdd6906154d7c4a8477da2e8fd25b08eebe472104256e62ec2ab63050218ddd3
+SIZE (chromium-68.0.3440.84-testdata.tar.xz) = 310285796
diff --git a/www/chromium/files/audio_manager_openbsd.cc b/www/chromium/files/audio_manager_openbsd.cc
index 1b021dd0833a..ee293b9d3791 100644
--- a/www/chromium/files/audio_manager_openbsd.cc
+++ b/www/chromium/files/audio_manager_openbsd.cc
@@ -73,7 +73,7 @@ AudioParameters AudioManagerOpenBSD::GetInputStreamParameters(
return AudioParameters(
AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO,
- kDefaultSampleRate, 16, buffer_size);
+ kDefaultSampleRate, buffer_size);
}
AudioManagerOpenBSD::AudioManagerOpenBSD(std::unique_ptr<AudioThread> audio_thread,
@@ -130,10 +130,8 @@ AudioParameters AudioManagerOpenBSD::GetPreferredOutputStreamParameters(
ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO;
int sample_rate = kDefaultSampleRate;
int buffer_size = kDefaultOutputBufferSize;
- int bits_per_sample = 16;
if (input_params.IsValid()) {
sample_rate = input_params.sample_rate();
- bits_per_sample = input_params.bits_per_sample();
channel_layout = input_params.channel_layout();
buffer_size = std::min(buffer_size, input_params.frames_per_buffer());
}
@@ -144,7 +142,7 @@ AudioParameters AudioManagerOpenBSD::GetPreferredOutputStreamParameters(
return AudioParameters(
AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout,
- sample_rate, bits_per_sample, buffer_size);
+ sample_rate, buffer_size);
}
AudioInputStream* AudioManagerOpenBSD::MakeInputStream(
diff --git a/www/chromium/files/extra-patch-llvm-base b/www/chromium/files/extra-patch-llvm-base
index 434eeac7b442..9a32190d6ad9 100644
--- a/www/chromium/files/extra-patch-llvm-base
+++ b/www/chromium/files/extra-patch-llvm-base
@@ -43,79 +43,3 @@
forward_variables_from(invoker,
[
---- build/config/compiler/BUILD.gn.orig 2018-06-13 00:10:02.000000000 +0200
-+++ build/config/compiler/BUILD.gn 2018-07-21 13:05:54.418405000 +0200
-@@ -51,7 +51,7 @@
- # only two architectures that are currently checked in). Turn this off when
- # you are using a custom toolchain and need to control -B in cflags.
- linux_use_bundled_binutils =
-- linux_use_bundled_binutils_override && is_linux &&
-+ linux_use_bundled_binutils_override && (is_linux && !is_bsd) &&
- (current_cpu == "x64" || current_cpu == "x86")
- binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
- root_build_dir)
-@@ -375,8 +375,6 @@
- "-Wl,-z,relro",
- ]
- if (!using_sanitizer) {
-- ldflags += [ "-Wl,-z,defs" ]
--
- # Functions interposed by the sanitizers can make ld think
- # that some libraries aren't needed when they actually are,
- # http://crbug.com/234010. As workaround, disable --as-needed.
-@@ -467,7 +465,7 @@
- # TODO(hans): Remove this once Clang generates better optimized debug info by
- # default. https://crbug.com/765793
- if (is_clang && !is_nacl && current_toolchain == host_toolchain &&
-- target_os != "chromeos") {
-+ target_os != "chromeos" && !is_bsd) {
- cflags += [
- "-Xclang",
- "-mllvm",
-@@ -708,7 +706,7 @@
- cflags += [ "-mtune=$arm_tune" ]
- }
- } else if (current_cpu == "arm64") {
-- if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
-+ if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) {
- cflags += [ "--target=aarch64-linux-gnu" ]
- ldflags += [ "--target=aarch64-linux-gnu" ]
- }
-@@ -1387,10 +1385,6 @@
-
- # TODO(hans): https://crbug.com/766891
- "-Wno-null-pointer-arithmetic",
--
-- # Ignore warnings about MSVC optimization pragmas.
-- # TODO(thakis): Only for no_chromium_code? http://crbug.com/505314
-- "-Wno-ignored-pragma-optimize",
- ]
- if (llvm_force_head_revision) {
- cflags += [
-@@ -2096,7 +2090,7 @@
- # [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f
- cflags += [ "-gdwarf-3" ]
- }
-- cflags += [ "-g2" ]
-+ cflags += [ "-g0" ]
- }
- if (use_debug_fission && !is_nacl) {
- cflags += [ "-gsplit-dwarf" ]
-@@ -2110,7 +2104,7 @@
- # DWARF info may be corrupt; offsets in a range list entry are in different
- # sections" there. Maybe just a bug in nacl_switch_32.S.
- if (!is_mac && !is_ios && !is_nacl && target_cpu != "x86" &&
-- (use_gold || use_lld)) {
-+ (use_gold || use_lld) && !is_bsd) {
- if (is_clang) {
- # This flag enables the GNU-format pubnames and pubtypes sections,
- # which lld needs in order to generate a correct GDB index.
-@@ -2207,7 +2201,7 @@
- if (!is_win && fatal_linker_warnings &&
- !(is_chromeos && current_cpu == "arm") &&
- !(is_android && use_order_profiling) && !is_mac && !is_ios &&
-- current_os != "aix") {
-+ current_os != "aix" && !is_bsd) {
- # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
- # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1
- # crbug.com/485542
diff --git a/www/chromium/files/extra-patch-llvm-port b/www/chromium/files/extra-patch-llvm-port
index a1ef24de0b17..4dd601b5b8e2 100644
--- a/www/chromium/files/extra-patch-llvm-port
+++ b/www/chromium/files/extra-patch-llvm-port
@@ -57,92 +57,3 @@
forward_variables_from(invoker,
[
---- build/config/compiler/BUILD.gn.orig 2018-06-13 00:10:02.000000000 +0200
-+++ build/config/compiler/BUILD.gn 2018-07-21 12:57:03.823912000 +0200
-@@ -51,7 +51,7 @@
- # only two architectures that are currently checked in). Turn this off when
- # you are using a custom toolchain and need to control -B in cflags.
- linux_use_bundled_binutils =
-- linux_use_bundled_binutils_override && is_linux &&
-+ linux_use_bundled_binutils_override && (is_linux && !is_bsd) &&
- (current_cpu == "x64" || current_cpu == "x86")
- binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
- root_build_dir)
-@@ -375,8 +375,6 @@
- "-Wl,-z,relro",
- ]
- if (!using_sanitizer) {
-- ldflags += [ "-Wl,-z,defs" ]
--
- # Functions interposed by the sanitizers can make ld think
- # that some libraries aren't needed when they actually are,
- # http://crbug.com/234010. As workaround, disable --as-needed.
-@@ -467,7 +465,7 @@
- # TODO(hans): Remove this once Clang generates better optimized debug info by
- # default. https://crbug.com/765793
- if (is_clang && !is_nacl && current_toolchain == host_toolchain &&
-- target_os != "chromeos") {
-+ target_os != "chromeos" && !is_bsd) {
- cflags += [
- "-Xclang",
- "-mllvm",
-@@ -708,7 +706,7 @@
- cflags += [ "-mtune=$arm_tune" ]
- }
- } else if (current_cpu == "arm64") {
-- if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
-+ if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) {
- cflags += [ "--target=aarch64-linux-gnu" ]
- ldflags += [ "--target=aarch64-linux-gnu" ]
- }
-@@ -1387,10 +1385,6 @@
-
- # TODO(hans): https://crbug.com/766891
- "-Wno-null-pointer-arithmetic",
--
-- # Ignore warnings about MSVC optimization pragmas.
-- # TODO(thakis): Only for no_chromium_code? http://crbug.com/505314
-- "-Wno-ignored-pragma-optimize",
- ]
- if (llvm_force_head_revision) {
- cflags += [
-@@ -1572,9 +1566,9 @@
- if ((is_posix && !is_nacl) || is_fuchsia) {
- # TODO(thomasanderson): Enable on ChromeOS builds once
- # https://crbug.com/829956 is fixed.
-- if (default_toolchain != "//build/toolchain/cros:target") {
-- arflags = [ "-T" ]
-- }
-+ # if (default_toolchain != "//build/toolchain/cros:target") {
-+ # arflags = [ "-T" ]
-+ # }
- }
- }
-
-@@ -2096,7 +2090,7 @@
- # [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f
- cflags += [ "-gdwarf-3" ]
- }
-- cflags += [ "-g2" ]
-+ cflags += [ "-g0" ]
- }
- if (use_debug_fission && !is_nacl) {
- cflags += [ "-gsplit-dwarf" ]
-@@ -2110,7 +2104,7 @@
- # DWARF info may be corrupt; offsets in a range list entry are in different
- # sections" there. Maybe just a bug in nacl_switch_32.S.
- if (!is_mac && !is_ios && !is_nacl && target_cpu != "x86" &&
-- (use_gold || use_lld)) {
-+ (use_gold || use_lld) && !is_bsd) {
- if (is_clang) {
- # This flag enables the GNU-format pubnames and pubtypes sections,
- # which lld needs in order to generate a correct GDB index.
-@@ -2207,7 +2201,7 @@
- if (!is_win && fatal_linker_warnings &&
- !(is_chromeos && current_cpu == "arm") &&
- !(is_android && use_order_profiling) && !is_mac && !is_ios &&
-- current_os != "aix") {
-+ current_os != "aix" && !is_bsd) {
- # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
- # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1
- # crbug.com/485542
diff --git a/www/chromium/files/fix-hanging-tabs.sh b/www/chromium/files/fix-hanging-tabs.sh
new file mode 100644
index 000000000000..69ed593110cf
--- /dev/null
+++ b/www/chromium/files/fix-hanging-tabs.sh
@@ -0,0 +1,45 @@
+#! /bin/sh -
+#
+# Chromium has a known problem of hanging tabs. The workaround for this
+# problem is to mount ~/.cache/chromium as memory-fs. In order to do this,
+# before you run Chromium, please run this script as root once for each user
+# who uses Chromium.
+#
+# $FreeBSD$
+
+set -e
+
+# Make sure that the user specified both the user and the group.
+if [ ${#} -ne 2 ]; then
+ printf 'Usage: %s user group\n' "${0}" >&2
+ exit 1
+fi
+
+user="${1}"
+group="${2}"
+home="$(awk -F: -v user="${user}" '{if ($1==user) print $6}' /etc/passwd)"
+cachedir="${home}/.cache/chromium"
+fstabrecord="md ${cachedir} mfs rw,late,-w${user}:${group},-s300m 2 0"
+
+# Make sure that the provided user and group are valid.
+if ! id "${user}" >/dev/null 2>&1; then
+ printf 'Invalid user "%s"\n' "${user}" >&2
+ exit 1
+elif [ ! -d "${home}" ]; then
+ printf 'Cannot locate home directory of user "%s"\n' "${user}" >&2
+ exit 1
+elif ! grep "^${group}:" /etc/group >/dev/null; then
+ printf 'Invalid group "%s"\n' "${group}" >&2
+ exit 1
+fi
+
+if grep "${fstabrecord}" /etc/fstab >/dev/null; then
+ printf 'Workaround already configured for user "%s"\n' "${user}" >&2
+ exit 1
+fi
+
+if [ ! -d "${cachedir}" ]; then
+ su -l "${user}" -c 'mkdir "${cachedir}"'
+fi
+printf '%s\n' "${fstabrecord}" >> /etc/fstab
+mount "${cachedir}"
diff --git a/www/chromium/files/patch-base__trace_event__process_memory_dump.h b/www/chromium/files/patch-base__trace_event__process_memory_dump.h
deleted file mode 100644
index b92550a3db42..000000000000
--- a/www/chromium/files/patch-base__trace_event__process_memory_dump.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- base/trace_event/process_memory_dump.h.orig 2017-04-19 19:06:28 UTC
-+++ base/trace_event/process_memory_dump.h
-@@ -24,7 +24,7 @@
-
- // Define COUNT_RESIDENT_BYTES_SUPPORTED if platform supports counting of the
- // resident memory.
--#if (defined(OS_POSIX) && !defined(OS_NACL)) || defined(OS_WIN)
-+#if (defined(OS_POSIX) && !defined(OS_NACL) && !defined(OS_BSD)) || defined(OS_WIN)
- #define COUNT_RESIDENT_BYTES_SUPPORTED
- #endif
-
diff --git a/www/chromium/files/patch-base_debug_elf_reader_linux.cc b/www/chromium/files/patch-base_debug_elf_reader_linux.cc
new file mode 100644
index 000000000000..c532de97e0cc
--- /dev/null
+++ b/www/chromium/files/patch-base_debug_elf_reader_linux.cc
@@ -0,0 +1,13 @@
+--- base/debug/elf_reader_linux.cc.orig 2018-08-04 13:15:46.374048000 +0200
++++ base/debug/elf_reader_linux.cc 2018-08-04 13:16:14.292901000 +0200
+@@ -41,8 +41,10 @@
+ const void* section_end = segment.data() + segment.size_bytes();
+ const Nhdr* note_header = reinterpret_cast<const Nhdr*>(segment.data());
+ while (note_header < section_end) {
++#if !defined(OS_BSD)
+ if (note_header->n_type == NT_GNU_BUILD_ID)
+ break;
++#endif
+ note_header = reinterpret_cast<const Nhdr*>(
+ reinterpret_cast<const char*>(note_header) + sizeof(Nhdr) +
+ bits::Align(note_header->n_namesz, 4) +
diff --git a/www/chromium/files/patch-base_process_process__metrics__freebsd.cc b/www/chromium/files/patch-base_process_process__metrics__freebsd.cc
index 26b1ceef669b..e2ea325713e9 100644
--- a/www/chromium/files/patch-base_process_process__metrics__freebsd.cc
+++ b/www/chromium/files/patch-base_process_process__metrics__freebsd.cc
@@ -1,8 +1,8 @@
---- base/process/process_metrics_freebsd.cc.orig 2018-06-13 00:10:01.000000000 +0200
-+++ base/process/process_metrics_freebsd.cc 2018-07-20 00:07:42.005261000 +0200
-@@ -13,6 +13,10 @@
- #include "base/memory/ptr_util.h"
+--- base/process/process_metrics_freebsd.cc.orig 2018-08-01 00:08:25.000000000 +0200
++++ base/process/process_metrics_freebsd.cc 2018-08-04 21:48:06.554728000 +0200
+@@ -14,11 +14,14 @@
#include "base/process/process_metrics_iocounters.h"
+ #include "base/stl_util.h"
+#include <unistd.h> /* getpagesize() */
+#include <fcntl.h> /* O_RDONLY */
@@ -11,7 +11,13 @@
namespace base {
ProcessMetrics::ProcessMetrics(ProcessHandle process)
-@@ -61,6 +65,65 @@
+- : process_(process),
+- last_cpu_(0) {}
++ : process_(process) {}
+
+ // static
+ std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics(
+@@ -67,6 +70,65 @@
pagesize = getpagesize();
return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
diff --git a/www/chromium/files/patch-base_process_process__metrics__posix.cc b/www/chromium/files/patch-base_process_process__metrics__posix.cc
index 6834f1370e9c..06aa8b4509ad 100644
--- a/www/chromium/files/patch-base_process_process__metrics__posix.cc
+++ b/www/chromium/files/patch-base_process_process__metrics__posix.cc
@@ -1,22 +1,20 @@
---- base/process/process_metrics_posix.cc.orig 2017-09-05 21:05:11.000000000 +0200
-+++ base/process/process_metrics_posix.cc 2017-09-11 19:41:06.103369000 +0200
-@@ -16,6 +16,8 @@
+--- base/process/process_metrics_posix.cc.orig 2018-08-01 00:08:25.000000000 +0200
++++ base/process/process_metrics_posix.cc 2018-08-05 00:53:58.559513000 +0200
+@@ -19,6 +19,8 @@
#if defined(OS_MACOSX)
#include <malloc/malloc.h>
-+#elif defined(OS_BSD)
++#elif defined(OS_FREEBSD)
+#include <stdlib.h>
#else
#include <malloc.h>
#endif
-@@ -103,8 +105,9 @@
+@@ -107,7 +109,7 @@
+ #else
+ return minfo.hblkhd + minfo.arena;
#endif
- #elif defined(OS_FUCHSIA)
+-#elif defined(OS_FUCHSIA)
++#elif defined(OS_FUCHSIA) || defined(OS_BSD)
// TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
-- return 0;
-+ NOTIMPLEMENTED();
+ return 0;
#endif
-+ return 0;
- }
-
- } // namespace base
diff --git a/www/chromium/files/patch-base_trace__event_process__memory__dump.cc b/www/chromium/files/patch-base_trace__event_process__memory__dump.cc
index 264cd13b467c..55db4ea49976 100644
--- a/www/chromium/files/patch-base_trace__event_process__memory__dump.cc
+++ b/www/chromium/files/patch-base_trace__event_process__memory__dump.cc
@@ -1,11 +1,11 @@
---- base/trace_event/process_memory_dump.cc.orig 2017-12-15 02:04:05.000000000 +0100
-+++ base/trace_event/process_memory_dump.cc 2017-12-23 21:58:59.977492000 +0100
-@@ -86,7 +86,7 @@
- const size_t kMaxChunkSize = 8 * 1024 * 1024;
- size_t max_vec_size =
- GetSystemPageCount(std::min(mapped_size, kMaxChunkSize), page_size);
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_BSD)
- std::unique_ptr<char[]> vec(new char[max_vec_size]);
- #elif defined(OS_WIN)
+--- base/trace_event/process_memory_dump.cc.orig 2018-08-01 00:08:26.000000000 +0200
++++ base/trace_event/process_memory_dump.cc 2018-08-04 13:42:42.870211000 +0200
+@@ -95,7 +95,7 @@
+ #if defined(OS_WIN)
std::unique_ptr<PSAPI_WORKING_SET_EX_INFORMATION[]> vec(
+ new PSAPI_WORKING_SET_EX_INFORMATION[max_vec_size]);
+-#elif defined(OS_MACOSX)
++#elif defined(OS_MACOSX) || defined(OS_BSD)
+ std::unique_ptr<char[]> vec(new char[max_vec_size]);
+ #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
+ std::unique_ptr<unsigned char[]> vec(new unsigned char[max_vec_size]);
diff --git a/www/chromium/files/patch-base_trace__event_process__memory__dump.h b/www/chromium/files/patch-base_trace__event_process__memory__dump.h
new file mode 100644
index 000000000000..fef22583380e
--- /dev/null
+++ b/www/chromium/files/patch-base_trace__event_process__memory__dump.h
@@ -0,0 +1,11 @@
+--- base/trace_event/process_memory_dump.h.orig 2018-08-01 00:08:26.000000000 +0200
++++ base/trace_event/process_memory_dump.h 2018-08-04 13:49:22.487126000 +0200
+@@ -22,7 +22,7 @@
+
+ // Define COUNT_RESIDENT_BYTES_SUPPORTED if platform supports counting of the
+ // resident memory.
+-#if !defined(OS_NACL)
++#if !defined(OS_NACL) && !defined(OS_BSD)
+ #define COUNT_RESIDENT_BYTES_SUPPORTED
+ #endif
+
diff --git a/www/chromium/files/patch-build_config_BUILD.gn b/www/chromium/files/patch-build_config_BUILD.gn
index 5cc8f2bb3168..28173c1eb341 100644
--- a/www/chromium/files/patch-build_config_BUILD.gn
+++ b/www/chromium/files/patch-build_config_BUILD.gn
@@ -1,6 +1,6 @@
---- build/config/BUILD.gn.orig 2017-07-25 21:04:48.000000000 +0200
-+++ build/config/BUILD.gn 2017-08-02 23:31:08.597825000 +0200
-@@ -166,7 +166,7 @@
+--- build/config/BUILD.gn.orig 2018-08-01 00:08:26.000000000 +0200
++++ build/config/BUILD.gn 2018-08-05 13:59:34.648903000 +0200
+@@ -167,7 +167,7 @@
# builds, and we have to tell it to turn it off.
defines += [ "_HAS_ITERATOR_DEBUGGING=0" ]
}
@@ -9,16 +9,17 @@
# 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?
-@@ -255,7 +255,7 @@
- "CoreText.framework",
- "Foundation.framework",
+@@ -269,9 +269,7 @@
]
-- } else if (is_linux) {
-+ } else if (is_linux && !is_bsd) {
+ } else if (is_linux) {
libs = [
- "dl",
- "rt",
-@@ -302,7 +302,7 @@
+- "dl",
+ "pthread",
+- "rt",
+ ]
+ }
+ }
+@@ -320,7 +318,7 @@
"//build/config/ios:ios_dynamic_flags",
"//build/config/ios:ios_executable_flags",
]
diff --git a/www/chromium/files/patch-build_config_BUILDCONFIG.gn b/www/chromium/files/patch-build_config_BUILDCONFIG.gn
index 79886dfc72c7..0711b1f39370 100644
--- a/www/chromium/files/patch-build_config_BUILDCONFIG.gn
+++ b/www/chromium/files/patch-build_config_BUILDCONFIG.gn
@@ -1,23 +1,19 @@
---- build/config/BUILDCONFIG.gn.orig 2018-02-24 16:25:08.000000000 +0100
-+++ build/config/BUILDCONFIG.gn 2018-03-03 19:33:34.562749000 +0100
-@@ -131,14 +131,14 @@
+--- build/config/BUILDCONFIG.gn.orig 2018-08-01 00:08:26.000000000 +0200
++++ build/config/BUILDCONFIG.gn 2018-08-04 13:56:21.383564000 +0200
+@@ -131,10 +131,10 @@
is_official_build = false
# 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 == "chromeos" ||
- current_os == "fuchsia" || current_os == "android" ||
-- current_os == "win" ||
-+ current_os == "win" || current_os == "bsd" ||
- (current_os == "linux" && current_cpu != "s390x" &&
- current_cpu != "s390" && current_cpu != "ppc64" &&
- current_cpu != "ppc" && current_cpu != "mips" && current_cpu != "mips64")
-@@ -191,8 +191,8 @@
+ # Set to true when compiling with the Clang compiler.
+- is_clang = current_os != "linux" ||
++ is_clang = current_os != "linux" || current_os == "bsd" ||
+ (current_cpu != "s390x" && current_cpu != "s390" &&
+ current_cpu != "ppc64" && current_cpu != "ppc" &&
+ current_cpu != "mips" && current_cpu != "mips64")
+@@ -186,8 +186,8 @@
# TODO(dpranke): Add some sort of assert here that verifies that
# no toolchain omitted host_toolchain from its toolchain_args().
@@ -28,7 +24,7 @@
# 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
-@@ -226,7 +226,7 @@
+@@ -227,7 +227,7 @@
assert(host_os == "linux" || host_os == "mac",
"Android builds are only supported on Linux and Mac hosts.")
_default_toolchain = "//build/toolchain/android:android_clang_$target_cpu"
@@ -37,7 +33,7 @@
# See comments in build/toolchain/cros/BUILD.gn about board compiles.
if (is_clang) {
_default_toolchain = "//build/toolchain/linux:clang_$target_cpu"
-@@ -296,6 +296,7 @@
+@@ -300,6 +300,7 @@
is_nacl = false
is_posix = false
is_win = true
@@ -45,7 +41,7 @@
} else if (current_os == "mac") {
is_android = false
is_chromeos = false
-@@ -306,6 +307,7 @@
+@@ -310,6 +311,7 @@
is_nacl = false
is_posix = true
is_win = false
@@ -53,7 +49,7 @@
} else if (current_os == "android") {
is_android = true
is_chromeos = false
-@@ -316,6 +318,7 @@
+@@ -320,6 +322,7 @@
is_nacl = false
is_posix = true
is_win = false
@@ -61,7 +57,7 @@
} else if (current_os == "chromeos") {
is_android = false
is_chromeos = true
-@@ -326,6 +329,7 @@
+@@ -330,6 +333,7 @@
is_nacl = false
is_posix = true
is_win = false
@@ -69,7 +65,7 @@
} else if (current_os == "nacl") {
# current_os == "nacl" will be passed by the nacl toolchain definition.
# It is not set by default or on the command line. We treat is as a
-@@ -339,6 +343,7 @@
+@@ -343,6 +347,7 @@
is_nacl = true
is_posix = true
is_win = false
@@ -77,15 +73,15 @@
} else if (current_os == "fuchsia") {
is_android = false
is_chromeos = false
-@@ -349,6 +354,7 @@
+@@ -353,6 +358,7 @@
is_nacl = false
- is_posix = true
+ is_posix = false
is_win = false
+ is_bsd = false
} else if (current_os == "ios") {
is_android = false
is_chromeos = false
-@@ -359,6 +365,7 @@
+@@ -363,6 +369,7 @@
is_nacl = false
is_posix = true
is_win = false
@@ -93,7 +89,7 @@
} else if (current_os == "linux") {
is_android = false
is_chromeos = false
-@@ -369,6 +376,7 @@
+@@ -373,6 +380,7 @@
is_nacl = false
is_posix = true
is_win = false
@@ -101,7 +97,7 @@
} else if (current_os == "aix") {
is_android = false
is_chromeos = false
-@@ -378,6 +386,18 @@
+@@ -383,6 +391,18 @@
is_nacl = false
is_posix = true
is_win = false
diff --git a/www/chromium/files/patch-build_config_compiler_BUILD.gn b/www/chromium/files/patch-build_config_compiler_BUILD.gn
new file mode 100644
index 000000000000..d37f7f2daa12
--- /dev/null
+++ b/www/chromium/files/patch-build_config_compiler_BUILD.gn
@@ -0,0 +1,89 @@
+--- build/config/compiler/BUILD.gn.orig 2018-08-01 00:08:26.000000000 +0200
++++ build/config/compiler/BUILD.gn 2018-08-05 04:12:50.165240000 +0200
+@@ -51,7 +51,7 @@
+ # only two architectures that are currently checked in). Turn this off when
+ # you are using a custom toolchain and need to control -B in cflags.
+ linux_use_bundled_binutils =
+- linux_use_bundled_binutils_override && is_linux &&
++ linux_use_bundled_binutils_override && (is_linux && !is_bsd) &&
+ (current_cpu == "x64" || current_cpu == "x86")
+ binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
+ root_build_dir)
+@@ -266,7 +266,7 @@
+ # Linker warnings.
+ if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") &&
+ !(is_android && use_order_profiling) && !is_mac && !is_ios &&
+- current_os != "aix") {
++ current_os != "aix" && !is_bsd) {
+ # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
+ # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1
+ # crbug.com/485542
+@@ -380,12 +380,6 @@
+ "-Wl,-z,now",
+ "-Wl,-z,relro",
+ ]
+- if (!using_sanitizer) {
+- ldflags += [
+- "-Wl,-z,defs",
+- "-Wl,--as-needed",
+- ]
+- }
+ }
+
+ # Linux-specific compiler flags setup.
+@@ -489,7 +483,7 @@
+ }
+
+ if (is_clang && !is_nacl && current_toolchain == host_toolchain &&
+- target_os != "chromeos") {
++ target_os != "chromeos" && !is_bsd) {
+ cflags += [
+ # TODO(hans): Remove this once Clang generates better optimized debug info
+ # by default. https://crbug.com/765793
+@@ -734,7 +728,7 @@
+ cflags += [ "-mtune=$arm_tune" ]
+ }
+ } else if (current_cpu == "arm64") {
+- if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
++ if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) {
+ cflags += [ "--target=aarch64-linux-gnu" ]
+ ldflags += [ "--target=aarch64-linux-gnu" ]
+ }
+@@ -1415,10 +1409,6 @@
+
+ # TODO(hans): https://crbug.com/766891
+ "-Wno-null-pointer-arithmetic",
+-
+- # Ignore warnings about MSVC optimization pragmas.
+- # TODO(thakis): Only for no_chromium_code? http://crbug.com/505314
+- "-Wno-ignored-pragma-optimize",
+ ]
+ } else if (use_xcode_clang) {
+ cflags += [
+@@ -1594,7 +1584,7 @@
+ # Mac and iOS use the mac-specific "libtool" command, not ar, which doesn't
+ # have a "thin archive" mode (it does accept -T, but it means truncating
+ # archive names to 16 characters, which is not what we want).
+- if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) {
++ if ((is_posix && !is_nacl && !is_mac && !is_ios && !is_bsd) || is_fuchsia) {
+ arflags = [ "-T" ]
+ }
+ }
+@@ -2119,7 +2109,7 @@
+ # [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f
+ cflags += [ "-gdwarf-3" ]
+ }
+- cflags += [ "-g2" ]
++ cflags += [ "-g0" ]
+ }
+ if (use_debug_fission && !is_nacl && !is_android) {
+ # NOTE: Some Chrome OS builds globally set |use_debug_fission| to true,
+@@ -2139,7 +2129,7 @@
+ # DWARF info may be corrupt; offsets in a range list entry are in different
+ # sections" there. Maybe just a bug in nacl_switch_32.S.
+ if (!is_mac && !is_ios && !is_nacl && target_cpu != "x86" &&
+- (use_gold || use_lld)) {
++ (use_gold || use_lld) && !is_bsd) {
+ if (is_clang) {
+ # This flag enables the GNU-format pubnames and pubtypes sections,
+ # which lld needs in order to generate a correct GDB index.
diff --git a/www/chromium/files/patch-build_config_compiler_compiler.gni b/www/chromium/files/patch-build_config_compiler_compiler.gni
index a76b1dce92ce..69fd3e05897a 100644
--- a/www/chromium/files/patch-build_config_compiler_compiler.gni
+++ b/www/chromium/files/patch-build_config_compiler_compiler.gni
@@ -1,11 +1,11 @@
---- build/config/compiler/compiler.gni.orig 2018-06-19 18:20:54.692104000 +0200
-+++ build/config/compiler/compiler.gni 2018-06-19 18:21:18.098165000 +0200
-@@ -164,7 +164,7 @@
+--- build/config/compiler/compiler.gni.orig 2018-08-01 00:08:26.000000000 +0200
++++ build/config/compiler/compiler.gni 2018-08-04 14:04:44.799794000 +0200
+@@ -172,7 +172,7 @@
declare_args() {
# Whether to use the gold linker from binutils instead of lld or bfd.
-- use_gold =
-+ use_gold = !is_bsd &&
- (!use_lld && !(is_chromecast && is_linux &&
- (current_cpu == "arm" || current_cpu == "mipsel")) &&
- (is_linux && (current_cpu == "x64" || current_cpu == "x86" ||
+- use_gold = !use_lld && !(is_chromecast && is_linux &&
++ use_gold = !is_bsd && !use_lld && !(is_chromecast && is_linux &&
+ (current_cpu == "arm" || current_cpu == "mipsel")) &&
+ ((is_linux && (current_cpu == "x64" || current_cpu == "x86" ||
+ current_cpu == "arm" || current_cpu == "mipsel" ||
diff --git a/www/chromium/files/patch-chrome_browser_about__flags.cc b/www/chromium/files/patch-chrome_browser_about__flags.cc
index 13cdee68690f..33681069d558 100644
--- a/www/chromium/files/patch-chrome_browser_about__flags.cc
+++ b/www/chromium/files/patch-chrome_browser_about__flags.cc
@@ -1,15 +1,6 @@
---- chrome/browser/about_flags.cc.orig 2018-06-13 00:10:04.000000000 +0200
-+++ chrome/browser/about_flags.cc 2018-07-20 16:41:11.196156000 +0200
-@@ -593,7 +593,7 @@
- switches::kForceDirectionRTL},
- };
-
--#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
-+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
- // Feature used to enable the identification of open tabs given URLs in
- // suggestions, and converting those suggestions to ones that allow switching to
- // the tab if found. Currently only on the desktop. Includes button option
-@@ -2441,12 +2441,12 @@
+--- chrome/browser/about_flags.cc.orig 2018-08-01 00:08:29.000000000 +0200
++++ chrome/browser/about_flags.cc 2018-08-04 14:12:27.193526000 +0200
+@@ -2408,7 +2408,7 @@
flag_descriptions::kEnableMaterialDesignExtensionsDescription, kOsDesktop,
FEATURE_VALUE_TYPE(features::kMaterialDesignExtensions)},
#endif // ENABLE_EXTENSIONS
@@ -18,27 +9,12 @@
{"enable-input-ime-api", flag_descriptions::kEnableInputImeApiName,
flag_descriptions::kEnableInputImeApiDescription, kOsWin | kOsLinux,
ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInputImeAPI,
- switches::kDisableInputImeAPI)},
--#endif // OS_WIN || OS_LINUX
-+#endif // OS_WIN || OS_LINUX || OS_BSD
- {"enable-origin-trials", flag_descriptions::kOriginTrialsName,
- flag_descriptions::kOriginTrialsDescription, kOsAll,
- FEATURE_VALUE_TYPE(features::kOriginTrials)},
-@@ -3058,7 +3058,7 @@
+@@ -3024,7 +3024,7 @@
flag_descriptions::kLeftToRightUrlsDescription, kOsDesktop,
FEATURE_VALUE_TYPE(features::kLeftToRightUrls)},
-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
- {"omnibox-entity-suggestions",
- flag_descriptions::kOmniboxEntitySuggestionsName,
- flag_descriptions::kOmniboxEntitySuggestionsDescription, kOsDesktop,
-@@ -3077,7 +3077,7 @@
- {"enable-new-app-menu-icon", flag_descriptions::kEnableNewAppMenuIconName,
- flag_descriptions::kEnableNewAppMenuIconDescription, kOsDesktop,
- FEATURE_VALUE_TYPE(features::kAnimatedAppMenuIcon)},
--#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
-+#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
-
- #if defined(OS_ANDROID)
- {"enable-custom-feedback-ui",
+ {"omnibox-new-answer-layout",
+ flag_descriptions::kOmniboxNewAnswerLayoutName,
+ flag_descriptions::kOmniboxNewAnswerLayoutDescription, kOsDesktop,
diff --git a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc
index 4e67be0738ae..a6c69517104f 100644
--- a/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc
+++ b/www/chromium/files/patch-chrome_browser_chrome__content__browser__client.cc
@@ -1,6 +1,6 @@
---- chrome/browser/chrome_content_browser_client.cc.orig 2018-06-13 00:10:04.000000000 +0200
-+++ chrome/browser/chrome_content_browser_client.cc 2018-07-14 14:04:47.872292000 +0200
-@@ -305,7 +305,7 @@
+--- chrome/browser/chrome_content_browser_client.cc.orig 2018-08-01 00:08:29.000000000 +0200
++++ chrome/browser/chrome_content_browser_client.cc 2018-08-04 14:22:56.785429000 +0200
+@@ -309,7 +309,7 @@
#include "chromeos/chromeos_switches.h"
#include "components/user_manager/user_manager.h"
#include "services/service_manager/public/mojom/interface_provider_spec.mojom.h"
@@ -9,7 +9,7 @@
#include "chrome/browser/chrome_browser_main_linux.h"
#elif defined(OS_ANDROID)
#include "base/android/application_status_listener.h"
-@@ -342,7 +342,7 @@
+@@ -347,7 +347,7 @@
#include "chrome/common/importer/profile_import.mojom.h"
#endif
@@ -18,7 +18,7 @@
#include "chrome/browser/webshare/share_service_impl.h"
#endif
-@@ -356,7 +356,7 @@
+@@ -361,7 +361,7 @@
#include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h"
#endif
@@ -27,34 +27,34 @@
#include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h"
#endif
-@@ -1033,7 +1033,7 @@
- main_parts = new ChromeBrowserMainPartsMac(parameters);
+@@ -1061,7 +1061,7 @@
#elif defined(OS_CHROMEOS)
- main_parts = new chromeos::ChromeBrowserMainPartsChromeos(parameters);
+ main_parts = new chromeos::ChromeBrowserMainPartsChromeos(
+ parameters, std::move(service_manifest_data_pack_));
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_BSD)
- main_parts = new ChromeBrowserMainPartsLinux(parameters);
+ main_parts = new ChromeBrowserMainPartsLinux(
+ parameters, std::move(service_manifest_data_pack_));
#elif defined(OS_ANDROID)
- main_parts = new ChromeBrowserMainPartsAndroid(parameters);
-@@ -1049,7 +1049,7 @@
+@@ -1081,7 +1081,7 @@
// Construct additional browser parts. Stages are called in the order in
// which they are added.
#if defined(TOOLKIT_VIEWS)
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)
-+#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)
main_parts->AddParts(new ChromeBrowserMainExtraPartsViewsLinux());
#else
main_parts->AddParts(new ChromeBrowserMainExtraPartsViews());
-@@ -1789,7 +1789,7 @@
+@@ -1823,7 +1823,7 @@
command_line->AppendSwitchASCII(switches::kMetricsClientID,
client_info->client_id);
}
-#elif defined(OS_POSIX)
+#elif defined(OS_POSIX) && !defined(OS_BSD)
- bool enable_crash_reporter = breakpad::IsCrashReporterEnabled();
- #if defined(OS_CHROMEOS)
- // Chrome OS uses the OS-level crash_reporter for mash services, so disable
-@@ -3096,7 +3096,7 @@
+ if (breakpad::IsCrashReporterEnabled()) {
+ std::string switch_value;
+ std::unique_ptr<metrics::ClientInfo> client_info =
+@@ -3177,7 +3177,7 @@
}
}
@@ -63,16 +63,7 @@
void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line,
int child_process_id,
-@@ -3132,7 +3132,7 @@
- }
- #endif // defined(OS_ANDROID)
- }
--#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
-+#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
-
- #if defined(OS_WIN)
- base::string16 ChromeContentBrowserClient::GetAppContainerSidForSandboxType(
-@@ -3806,7 +3806,7 @@
+@@ -3892,7 +3892,7 @@
#if defined(OS_ANDROID)
frame_interfaces_parameterized_->AddInterface(base::Bind(
&ForwardToJavaWebContentsRegistry<blink::mojom::ShareService>));
diff --git a/www/chromium/files/patch-chrome_browser_memory__details.cc b/www/chromium/files/patch-chrome_browser_memory__details.cc
index 0ff492b40442..3abfd44bc04e 100644
--- a/www/chromium/files/patch-chrome_browser_memory__details.cc
+++ b/www/chromium/files/patch-chrome_browser_memory__details.cc
@@ -1,20 +1,20 @@
---- chrome/browser/memory_details.cc.orig 2017-06-05 19:03:02 UTC
-+++ chrome/browser/memory_details.cc
-@@ -35,7 +35,7 @@
- #include "extensions/features/features.h"
+--- chrome/browser/memory_details.cc.orig 2018-08-01 00:08:30.000000000 +0200
++++ chrome/browser/memory_details.cc 2018-08-04 14:30:27.145764000 +0200
+@@ -36,7 +36,7 @@
+ #include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h"
#include "ui/base/l10n/l10n_util.h"
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
- #include "content/public/browser/zygote_host_linux.h"
+ #include "services/service_manager/zygote/zygote_host_linux.h"
#endif
-@@ -344,7 +344,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
+@@ -341,7 +341,7 @@
process.titles.push_back(title);
}
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
- if (content::ZygoteHost::GetInstance()->IsZygotePid(process.pid)) {
+ if (service_manager::ZygoteHost::GetInstance()->IsZygotePid(process.pid)) {
process.process_type = content::PROCESS_TYPE_ZYGOTE;
}
diff --git a/www/chromium/files/patch-chrome_browser_tracing_crash__service__uploader.cc b/www/chromium/files/patch-chrome_browser_tracing_crash__service__uploader.cc
index f6595eb2684f..de186ad74eed 100644
--- a/www/chromium/files/patch-chrome_browser_tracing_crash__service__uploader.cc
+++ b/www/chromium/files/patch-chrome_browser_tracing_crash__service__uploader.cc
@@ -1,9 +1,9 @@
---- chrome/browser/tracing/crash_service_uploader.cc.orig 2017-06-05 19:03:03 UTC
-+++ chrome/browser/tracing/crash_service_uploader.cc
-@@ -157,6 +157,8 @@ void TraceCrashServiceUploader::DoUploadOnFileThread(
+--- chrome/browser/tracing/crash_service_uploader.cc.orig 2018-08-01 00:08:32.000000000 +0200
++++ chrome/browser/tracing/crash_service_uploader.cc 2018-08-04 14:37:55.834228000 +0200
+@@ -158,6 +158,8 @@
+ const char product[] = "Chrome_Linux";
+ #elif defined(OS_ANDROID)
const char product[] = "Chrome_Android";
- #elif defined(OS_CHROMEOS)
- const char product[] = "Chrome_ChromeOS";
+#elif defined(OS_FREEBSD)
+ const char product[] = "Chrome_FreeBSD";
#else
diff --git a/www/chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc b/www/chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc
index 3c6078b19378..c928b32cd7f6 100644
--- a/www/chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc
+++ b/www/chromium/files/patch-chrome_browser_ui_views_accelerator__table.cc
@@ -1,29 +1,29 @@
---- chrome/browser/ui/views/accelerator_table.cc.orig 2017-06-05 19:03:03 UTC
-+++ chrome/browser/ui/views/accelerator_table.cc
-@@ -54,7 +54,7 @@ const AcceleratorMapping kAcceleratorMap[] = {
- { ui::VKEY_S, kPlatformModifier, IDC_SAVE_PAGE },
- { ui::VKEY_9, kPlatformModifier, IDC_SELECT_LAST_TAB },
- { ui::VKEY_NUMPAD9, kPlatformModifier, IDC_SELECT_LAST_TAB },
+--- chrome/browser/ui/views/accelerator_table.cc.orig 2018-08-01 00:08:32.000000000 +0200
++++ chrome/browser/ui/views/accelerator_table.cc 2018-08-04 17:21:33.552862000 +0200
+@@ -44,7 +44,7 @@
+ {ui::VKEY_S, ui::EF_PLATFORM_ACCELERATOR, IDC_SAVE_PAGE},
+ {ui::VKEY_9, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_LAST_TAB},
+ {ui::VKEY_NUMPAD9, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_LAST_TAB},
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- { ui::VKEY_9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB },
- { ui::VKEY_NUMPAD9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB },
- { ui::VKEY_NEXT, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_NEXT },
-@@ -84,7 +84,7 @@ const AcceleratorMapping kAcceleratorMap[] = {
- { ui::VKEY_NUMPAD7, kPlatformModifier, IDC_SELECT_TAB_6 },
- { ui::VKEY_8, kPlatformModifier, IDC_SELECT_TAB_7 },
- { ui::VKEY_NUMPAD8, kPlatformModifier, IDC_SELECT_TAB_7 },
+ {ui::VKEY_9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB},
+ {ui::VKEY_NUMPAD9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB},
+ {ui::VKEY_NEXT, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_NEXT},
+@@ -74,7 +74,7 @@
+ {ui::VKEY_NUMPAD7, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_6},
+ {ui::VKEY_8, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_7},
+ {ui::VKEY_NUMPAD8, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_7},
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- { ui::VKEY_1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0 },
- { ui::VKEY_NUMPAD1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0 },
- { ui::VKEY_2, ui::EF_ALT_DOWN, IDC_SELECT_TAB_1 },
-@@ -129,7 +129,7 @@ const AcceleratorMapping kAcceleratorMap[] = {
+ {ui::VKEY_1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0},
+ {ui::VKEY_NUMPAD1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0},
+ {ui::VKEY_2, ui::EF_ALT_DOWN, IDC_SELECT_TAB_1},
+@@ -119,7 +119,7 @@
#endif // !OS_MACOSX
// Platform-specific key maps.
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
- { ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK },
- { ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD },
- { ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME },
+ {ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK},
+ {ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD},
+ {ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME},
diff --git a/www/chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc b/www/chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc
index 3e5cb4ffc39e..51eae69e08c6 100644
--- a/www/chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc
+++ b/www/chromium/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc
@@ -1,11 +1,11 @@
---- chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc.orig 2017-04-19 19:06:30 UTC
-+++ chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
-@@ -20,7 +20,7 @@ namespace {
+--- chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc.orig 2018-08-01 00:08:32.000000000 +0200
++++ chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc 2018-08-04 17:27:55.912686000 +0200
+@@ -21,7 +21,7 @@
- const int kCaptionButtonHeight = 18;
+ constexpr int kCaptionButtonHeight = 18;
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
- // Default extra space between the top of the frame and the top of the window
- // caption buttons.
- const int kExtraCaption = 2;
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ // Default spacing around window caption buttons.
+ constexpr int kCaptionButtonSpacing = 2;
+ #else
diff --git a/www/chromium/files/patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc b/www/chromium/files/patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc
deleted file mode 100644
index a1510e6881e5..000000000000
--- a/www/chromium/files/patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc
+++ /dev/null
@@ -1,14 +0,0 @@
---- chrome/browser/ui/webui/extensions/extension_loader_handler.cc.orig 2017-04-19 19:06:30 UTC
-+++ chrome/browser/ui/webui/extensions/extension_loader_handler.cc
-@@ -28,7 +28,11 @@
- #include "extensions/common/constants.h"
- #include "extensions/common/extension.h"
- #include "extensions/common/manifest_constants.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- #include "ui/base/l10n/l10n_util.h"
-
- namespace extensions {
diff --git a/www/chromium/files/patch-chrome_common_chrome__features.cc b/www/chromium/files/patch-chrome_common_chrome__features.cc
index 402f15a1d862..c4adbdd17ffb 100644
--- a/www/chromium/files/patch-chrome_common_chrome__features.cc
+++ b/www/chromium/files/patch-chrome_common_chrome__features.cc
@@ -1,6 +1,6 @@
---- chrome/common/chrome_features.cc.orig 2018-06-13 00:10:09.000000000 +0200
-+++ chrome/common/chrome_features.cc 2018-07-20 16:33:58.698475000 +0200
-@@ -85,13 +85,13 @@
+--- chrome/common/chrome_features.cc.orig 2018-08-01 00:08:33.000000000 +0200
++++ chrome/common/chrome_features.cc 2018-08-05 16:46:49.046411000 +0200
+@@ -85,7 +85,7 @@
base::FEATURE_ENABLED_BY_DEFAULT};
#endif // defined(OS_WIN) || defined(OS_MACOSX)
@@ -9,13 +9,6 @@
// Enables the Restart background mode optimization. When all Chrome UI is
// closed and it goes in the background, allows to restart the browser to
// discard memory.
- const base::Feature kBackgroundModeAllowRestart{
- "BackgroundModeAllowRestart", base::FEATURE_DISABLED_BY_DEFAULT};
--#endif // defined(OS_WIN) || defined(OS_LINUX)
-+#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
-
- // Enables or disables whether permission prompts are automatically blocked
- // after the user has explicitly dismissed them too many times.
@@ -142,7 +142,7 @@
base::FEATURE_ENABLED_BY_DEFAULT};
#endif
@@ -25,3 +18,12 @@
// Enables the dual certificate verification trial feature.
// https://crbug.com/649026
const base::Feature kCertDualVerificationTrialFeature{
+@@ -367,7 +367,7 @@
+ "AcknowledgeNtpOverrideOnDeactivate", base::FEATURE_DISABLED_BY_DEFAULT};
+ #endif
+
+-#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++#if defined(OS_WIN) || ((defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS))
+ const base::Feature kWarnBeforeQuitting{"WarnBeforeQuitting",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+ #endif
diff --git a/www/chromium/files/patch-chrome_common_chrome__features.h b/www/chromium/files/patch-chrome_common_chrome__features.h
index 9aa01cd8236c..12669ebbd2ad 100644
--- a/www/chromium/files/patch-chrome_common_chrome__features.h
+++ b/www/chromium/files/patch-chrome_common_chrome__features.h
@@ -1,17 +1,14 @@
---- chrome/common/chrome_features.h.orig 2018-06-13 00:10:09.000000000 +0200
-+++ chrome/common/chrome_features.h 2018-07-20 16:34:38.434106000 +0200
-@@ -52,9 +52,9 @@
+--- chrome/common/chrome_features.h.orig 2018-08-01 00:08:33.000000000 +0200
++++ chrome/common/chrome_features.h 2018-08-05 16:48:04.662112000 +0200
+@@ -52,7 +52,7 @@
extern const base::Feature kAutomaticTabDiscarding;
#endif // defined(OS_WIN) || defined(OS_MACOSX)
-#if defined(OS_WIN) || defined(OS_LINUX)
+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
extern const base::Feature kBackgroundModeAllowRestart;
--#endif // defined(OS_WIN) || defined(OS_LINUX)
-+#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+ #endif // defined(OS_WIN) || defined(OS_LINUX)
- extern const base::Feature kBlockPromptsIfDismissedOften;
- extern const base::Feature kBlockPromptsIfIgnoredOften;
@@ -76,7 +76,7 @@
extern const base::Feature kTabStripKeyboardFocus;
#endif // defined(OS_MACOSX)
@@ -21,3 +18,12 @@
extern const base::Feature kCertDualVerificationTrialFeature;
#endif
+@@ -204,7 +204,7 @@
+ extern const base::Feature kAcknowledgeNtpOverrideOnDeactivate;
+ #endif
+
+-#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++#if defined(OS_WIN) || ((defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS))
+ extern const base::Feature kWarnBeforeQuitting;
+ #endif
+
diff --git a/www/chromium/files/patch-components_autofill_content_renderer_password__form__conversion__utils.cc b/www/chromium/files/patch-components_autofill_content_renderer_password__form__conversion__utils.cc
index dfdbc32bb27b..fe6b89e803bc 100644
--- a/www/chromium/files/patch-components_autofill_content_renderer_password__form__conversion__utils.cc
+++ b/www/chromium/files/patch-components_autofill_content_renderer_password__form__conversion__utils.cc
@@ -1,6 +1,6 @@
---- components/autofill/content/renderer/password_form_conversion_utils.cc.orig 2018-06-13 00:10:12.000000000 +0200
-+++ components/autofill/content/renderer/password_form_conversion_utils.cc 2018-07-18 23:26:07.424533000 +0200
-@@ -34,7 +34,11 @@
+--- components/autofill/content/renderer/password_form_conversion_utils.cc.orig 2018-08-01 00:08:37.000000000 +0200
++++ components/autofill/content/renderer/password_form_conversion_utils.cc 2018-08-04 17:44:14.098469000 +0200
+@@ -38,7 +38,11 @@
#include "third_party/blink/public/web/web_form_control_element.h"
#include "third_party/blink/public/web/web_input_element.h"
#include "third_party/blink/public/web/web_local_frame.h"
@@ -9,6 +9,6 @@
+#else
#include "third_party/re2/src/re2/re2.h"
+#endif
+ #include "url/gurl.h"
- using blink::WebDocument;
using blink::WebFormControlElement;
diff --git a/www/chromium/files/patch-components_autofill_strings.grdp b/www/chromium/files/patch-components_autofill_strings.grdp
index ff2709b5c30b..0afe7db3c296 100644
--- a/www/chromium/files/patch-components_autofill_strings.grdp
+++ b/www/chromium/files/patch-components_autofill_strings.grdp
@@ -1,15 +1,15 @@
---- components/autofill_strings.grdp.orig 2017-12-15 02:04:14.000000000 +0100
-+++ components/autofill_strings.grdp 2017-12-24 11:25:08.009423000 +0100
-@@ -216,7 +216,7 @@
- Do you want Chromium to save this card?
- </message>
- </if>
+--- components/autofill_strings.grdp.orig 2018-08-01 00:08:37.000000000 +0200
++++ components/autofill_strings.grdp 2018-08-04 17:51:10.986958000 +0200
+@@ -195,7 +195,7 @@
+ <message name="IDS_AUTOFILL_SAVE_CARD_PROMPT_CONFIRM" desc="Text to show for the Autofill upload save credit card prompt accept button when more information (e.g., CVC) was needed in order to save the card and was entered.">
+ Confirm
+ </message>
- <if expr="is_linux and not chromeos">
+ <if expr="is_posix and not chromeos">
<then>
<message name="IDS_AUTOFILL_SAVE_CARD_PROMPT_TITLE_TO_CLOUD" desc="Title text for the Autofill save card prompt when the card is to be saved by uploading it to Google Payments and also saved locally. The prompt can be either a bubble or an infobar.">
Do you want to save this card to your Google Account?
-@@ -234,7 +234,7 @@
+@@ -213,7 +213,7 @@
<message name="IDS_AUTOFILL_SAVE_CARD_PROMPT_UPLOAD_EXPLANATION" desc="Explanation of the effect of the Autofill save card prompt when the card is to be saved by uploading it to Google Payments and also saved locally. The prompt can be either a bubble or an infobar.">
Pay quickly on sites and apps across devices using cards you have saved with Google.
</message>
@@ -18,3 +18,12 @@
<then>
<message name="IDS_AUTOFILL_SAVE_CARD_PROMPT_UPLOAD_EXPLANATION_V2" desc="Explanation of the effect of the Autofill save card prompt when the card is to be saved by uploading it to Google Payments, according to June 2017 UI guidelines. The prompt will be shown in a bubble below the omnibox.">
To pay faster next time, save this card to your Google Account.
+@@ -225,7 +225,7 @@
+ </message>
+ </else>
+ </if>
+- <if expr="is_linux and not chromeos">
++ <if expr="is_posix and not chromeos">
+ <then>
+ <message name="IDS_AUTOFILL_SAVE_CARD_PROMPT_UPLOAD_EXPLANATION_V3" desc="Explanation of the effect of the Autofill save card prompt when the card is to be saved by uploading it to Google Payments, according to April 2018 UI guidelines. The prompt will be shown in a bubble below the omnibox.">
+ To pay faster next time, save your card and billing address to your Google Account.
diff --git a/www/chromium/files/patch-components_crash_content_app_crashpad.cc b/www/chromium/files/patch-components_crash_content_app_crashpad.cc
index 6d9612a5ee03..2fb251a44e96 100644
--- a/www/chromium/files/patch-components_crash_content_app_crashpad.cc
+++ b/www/chromium/files/patch-components_crash_content_app_crashpad.cc
@@ -1,6 +1,19 @@
---- components/crash/content/app/crashpad.cc.orig 2018-07-19 00:30:58.065324000 +0200
-+++ components/crash/content/app/crashpad.cc 2018-07-19 00:32:11.350482000 +0200
-@@ -119,7 +119,7 @@
+--- components/crash/content/app/crashpad.cc.orig 2018-08-01 00:08:38.000000000 +0200
++++ components/crash/content/app/crashpad.cc 2018-08-05 12:57:33.862455000 +0200
+@@ -101,6 +101,12 @@
+ const std::string& user_data_dir,
+ const base::FilePath& exe_path,
+ bool embedded_handler) {
++
++#if defined(OS_BSD)
++ NOTIMPLEMENTED();
++ return;
++#endif
++
+ static bool initialized = false;
+ DCHECK(!initialized);
+ initialized = true;
+@@ -119,7 +125,7 @@
// as processed by the backend.
DCHECK(browser_process || process_type == "Chrome Installer" ||
process_type == "notification-helper");
@@ -9,7 +22,7 @@
DCHECK(browser_process);
#else
#error Port.
-@@ -184,7 +184,7 @@
+@@ -184,7 +190,7 @@
// other "main, first process" to initialize things. There is no "relauncher"
// on Windows, so this is synonymous with initial_client.
const bool should_initialize_database_and_set_upload_policy = initial_client;
@@ -18,13 +31,11 @@
const bool should_initialize_database_and_set_upload_policy = browser_process;
#endif
if (should_initialize_database_and_set_upload_policy) {
-@@ -253,7 +253,11 @@
+@@ -253,7 +259,9 @@
}
void DumpWithoutCrashing() {
-+#if defined(OS_BSD)
-+ NOTIMPLEMENTED();
-+#else
++#if !defined(OS_BSD)
CRASHPAD_SIMULATE_CRASH();
+#endif
}
diff --git a/www/chromium/files/patch-components_crash_core_common_BUILD.gn b/www/chromium/files/patch-components_crash_core_common_BUILD.gn
index 2cdf25209585..76e8026f1942 100644
--- a/www/chromium/files/patch-components_crash_core_common_BUILD.gn
+++ b/www/chromium/files/patch-components_crash_core_common_BUILD.gn
@@ -1,10 +1,28 @@
---- components/crash/core/common/BUILD.gn.orig 2018-03-03 20:58:02.430388000 +0100
-+++ components/crash/core/common/BUILD.gn 2018-03-03 20:58:21.875946000 +0100
-@@ -38,7 +38,6 @@
- "crash_key_internal.h",
- ]
+--- components/crash/core/common/BUILD.gn.orig 2018-08-01 00:08:38.000000000 +0200
++++ components/crash/core/common/BUILD.gn 2018-08-05 12:52:29.173813000 +0200
+@@ -6,7 +6,7 @@
+
+ declare_args() {
+ # If set to true, this will stub out and disable the entire crash key system.
+- use_crash_key_stubs = is_fuchsia
++ use_crash_key_stubs = is_fuchsia || is_bsd
+ }
+
+ group("common") {
+@@ -88,7 +88,6 @@
+ ]
+ }
- deps += [ "//third_party/breakpad:client" ]
}
}
+@@ -143,7 +142,7 @@
+ sources += [ "objc_zombie_unittest.mm" ]
+ }
+
+- if (!is_mac && !is_win && !is_fuchsia) {
++ if (!is_mac && !is_win && !is_fuchsia && !is_bsd) {
+ include_dirs = [ "//third_party/breakpad/breakpad/src/" ]
+ sources += [ "crash_key_breakpad_unittest.cc" ]
+ }
diff --git a/www/chromium/files/patch-components_services_filesystem_file_system_app.cc b/www/chromium/files/patch-components_services_filesystem_file_system_app.cc
index 2c62ef86be6a..a199112a5bd5 100644
--- a/www/chromium/files/patch-components_services_filesystem_file_system_app.cc
+++ b/www/chromium/files/patch-components_services_filesystem_file_system_app.cc
@@ -1,5 +1,5 @@
---- components/services/filesystem/file_system_app.cc.orig 2018-07-18 23:43:08.740779000 +0200
-+++ components/services/filesystem/file_system_app.cc 2018-07-18 23:43:41.614940000 +0200
+--- components/services/filesystem/file_system_app.cc.orig 2018-08-01 00:08:40.000000000 +0200
++++ components/services/filesystem/file_system_app.cc 2018-08-04 18:24:22.212419000 +0200
@@ -20,7 +20,7 @@
#elif defined(OS_ANDROID)
#include "base/base_paths_android.h"
@@ -10,9 +10,9 @@
#include "base/nix/xdg_util.h"
#elif defined(OS_MACOSX)
@@ -75,7 +75,7 @@
- CHECK(PathService::Get(base::DIR_APP_DATA, &path));
+ CHECK(base::PathService::Get(base::DIR_APP_DATA, &path));
#elif defined(OS_ANDROID)
- CHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &path));
+ CHECK(base::PathService::Get(base::DIR_ANDROID_APP_DATA, &path));
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_BSD)
std::unique_ptr<base::Environment> env(base::Environment::Create());
diff --git a/www/chromium/files/patch-content_app_content__main__runner.cc b/www/chromium/files/patch-content_app_content_main_runner_impl.cc
index b1d52e71dc4e..5026d5aeaae8 100644
--- a/www/chromium/files/patch-content_app_content__main__runner.cc
+++ b/www/chromium/files/patch-content_app_content_main_runner_impl.cc
@@ -1,19 +1,19 @@
---- content/app/content_main_runner.cc.orig 2018-06-13 00:10:16.000000000 +0200
-+++ content/app/content_main_runner.cc 2018-07-19 00:17:30.909304000 +0200
-@@ -84,10 +84,10 @@
+--- content/app/content_main_runner_impl.cc.orig 2018-08-01 00:08:43.000000000 +0200
++++ content/app/content_main_runner_impl.cc 2018-08-04 18:50:49.262605000 +0200
+@@ -83,10 +83,10 @@
#include "base/posix/global_descriptors.h"
#include "content/public/common/content_descriptors.h"
-#if !defined(OS_MACOSX)
+#if !defined(OS_MACOSX) && !defined(OS_BSD)
- #include "content/public/common/zygote_fork_delegate_linux.h"
+ #include "services/service_manager/zygote/common/zygote_fork_delegate_linux.h"
#endif
-#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
+#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
- #include "content/zygote/zygote_main.h"
#include "sandbox/linux/services/libc_interceptor.h"
+ #include "services/service_manager/zygote/zygote_main.h"
#endif
-@@ -153,7 +153,7 @@
+@@ -150,7 +150,7 @@
namespace content {
extern int GpuMain(const content::MainFunctionParams&);
#if BUILDFLAG(ENABLE_PLUGINS)
@@ -22,14 +22,15 @@
extern int PluginMain(const content::MainFunctionParams&);
#endif
extern int PpapiPluginMain(const MainFunctionParams&);
-@@ -702,10 +702,10 @@
- kFieldTrialDescriptor + base::GlobalDescriptors::kBaseDescriptor);
+@@ -722,11 +722,11 @@
+ base::GlobalDescriptors::kBaseDescriptor);
#endif // !OS_ANDROID
-#if defined(OS_LINUX) || defined(OS_OPENBSD)
+#if defined(OS_LINUX)
- g_fds->Set(kCrashDumpSignal,
- kCrashDumpSignal + base::GlobalDescriptors::kBaseDescriptor);
+ g_fds->Set(service_manager::kCrashDumpSignal,
+ service_manager::kCrashDumpSignal +
+ base::GlobalDescriptors::kBaseDescriptor);
-#endif // OS_LINUX || OS_OPENBSD
+#endif // OS_LINUX
diff --git a/www/chromium/files/patch-content_browser_BUILD.gn b/www/chromium/files/patch-content_browser_BUILD.gn
index 3bdb2d203a92..698caaac8c56 100644
--- a/www/chromium/files/patch-content_browser_BUILD.gn
+++ b/www/chromium/files/patch-content_browser_BUILD.gn
@@ -1,6 +1,6 @@
---- content/browser/BUILD.gn.orig 2018-03-20 23:05:23.000000000 +0100
-+++ content/browser/BUILD.gn 2018-03-24 19:29:32.232928000 +0100
-@@ -1711,11 +1711,6 @@
+--- content/browser/BUILD.gn.orig 2018-08-01 00:08:43.000000000 +0200
++++ content/browser/BUILD.gn 2018-08-04 21:53:48.299617000 +0200
+@@ -1802,11 +1802,6 @@
"tracing/cros_tracing_agent.cc",
"tracing/cros_tracing_agent.h",
]
@@ -11,21 +11,4 @@
- ]
}
- if (is_chromecast && is_linux) {
-@@ -2191,6 +2186,16 @@
- deps += [
- "//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_host_impl_linux.cc",
-+ "zygote_host/zygote_host_impl_linux.h",
-+ "../zygote/zygote_linux.cc",
-+ "../zygote/zygote_linux.h",
-+ "../zygote/zygote_main_linux.cc",
- ]
- }
-
+ if (is_chromeos || is_android || is_chromecast) {
diff --git a/www/chromium/files/patch-content_browser_background_fetch_background_fetch_context.cc b/www/chromium/files/patch-content_browser_background_fetch_background_fetch_context.cc
new file mode 100644
index 000000000000..3e6df5544b5e
--- /dev/null
+++ b/www/chromium/files/patch-content_browser_background_fetch_background_fetch_context.cc
@@ -0,0 +1,12 @@
+--- content/browser/background_fetch/background_fetch_context.cc.orig 2018-08-06 00:37:02.712040000 +0200
++++ content/browser/background_fetch/background_fetch_context.cc 2018-08-06 01:03:47.477355000 +0200
+@@ -218,7 +218,8 @@
+
+ scheduler_->AddJobController(controller.get());
+
+- job_controllers_.insert({unique_id, std::move(controller)});
++ auto pair = std::make_pair(unique_id, std::move(controller));
++ job_controllers_.insert(std::move(pair));
+ std::move(done_closure).Run();
+ }
+
diff --git a/www/chromium/files/patch-content_browser_browser__main__loop.cc b/www/chromium/files/patch-content_browser_browser__main__loop.cc
index 65f818d6fdd9..c5d9dd0876e0 100644
--- a/www/chromium/files/patch-content_browser_browser__main__loop.cc
+++ b/www/chromium/files/patch-content_browser_browser__main__loop.cc
@@ -1,27 +1,20 @@
---- content/browser/browser_main_loop.cc.orig 2018-06-13 00:10:16.000000000 +0200
-+++ content/browser/browser_main_loop.cc 2018-07-19 00:30:26.119970000 +0200
-@@ -205,7 +205,7 @@
- #include "base/fuchsia/default_job.h"
- #endif // defined(OS_FUCHSIA)
-
--#if defined(OS_POSIX) && !defined(OS_MACOSX)
-+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
- #include "content/browser/sandbox_host_linux.h"
- #endif
-
-@@ -240,6 +240,11 @@
+--- content/browser/browser_main_loop.cc.orig 2018-08-01 00:08:43.000000000 +0200
++++ content/browser/browser_main_loop.cc 2018-08-05 15:40:45.172441000 +0200
+@@ -234,6 +234,13 @@
#include "services/ui/common/image_cursors_set.h"
#endif
+#if defined(OS_BSD)
+#include "content/browser/sandbox_host_linux.h"
++#include "services/service_manager/zygote/common/common_sandbox_support_linux.h"
+#include "content/public/common/common_sandbox_support_linux.h"
++#include "services/service_manager/sandbox/sandbox.h"
+#endif
+
// One of the linux specific headers defines this as a macro.
#ifdef DestroyAll
#undef DestroyAll
-@@ -548,6 +553,11 @@
+@@ -546,6 +553,11 @@
// by now since a thread to start the ServiceManager has been created
// before the browser main loop starts.
DCHECK(SandboxHostLinux::GetInstance()->IsInitialized());
@@ -29,7 +22,7 @@
+ SandboxHostLinux::GetInstance()->Init();
+ base::FileHandleMappingVector fds_to_map;
+ const int sfd = SandboxHostLinux::GetInstance()->GetChildSocket();
-+ fds_to_map.push_back(std::make_pair(sfd, GetSandboxFD()));
++ fds_to_map.push_back(std::make_pair(sfd, service_manager::GetSandboxFD()));
#endif
#if defined(USE_X11)
diff --git a/www/chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc b/www/chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc
index 49bb8b74d309..d9ff1d90c71e 100644
--- a/www/chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc
+++ b/www/chromium/files/patch-content_browser_child__process__launcher__helper__linux.cc
@@ -1,24 +1,39 @@
---- content/browser/child_process_launcher_helper_linux.cc.orig 2018-03-20 23:05:23.000000000 +0100
-+++ content/browser/child_process_launcher_helper_linux.cc 2018-03-24 23:20:38.539917000 +0100
-@@ -17,7 +17,9 @@
- #include "content/public/common/content_switches.h"
- #include "content/public/common/result_codes.h"
- #include "content/public/common/sandboxed_process_launcher_delegate.h"
-+#if !defined(OS_BSD)
- #include "content/public/common/zygote_handle.h"
-+#endif
+--- content/browser/child_process_launcher_helper_linux.cc.orig 2018-08-01 00:08:43.000000000 +0200
++++ content/browser/child_process_launcher_helper_linux.cc 2018-08-04 18:57:46.407465000 +0200
+@@ -18,7 +18,9 @@
#include "gpu/config/gpu_switches.h"
#include "services/service_manager/sandbox/linux/sandbox_linux.h"
+ #include "services/service_manager/zygote/common/common_sandbox_support_linux.h"
++#if !defined(OS_BSD)
+ #include "services/service_manager/zygote/common/zygote_handle.h"
++#endif
+ #include "services/service_manager/zygote/host/zygote_communication_linux.h"
+ #include "services/service_manager/zygote/host/zygote_host_impl_linux.h"
-@@ -70,6 +72,7 @@
+@@ -72,6 +74,7 @@
int* launch_result) {
*is_synchronous_launch = true;
+#if !defined(OS_BSD)
- ZygoteHandle zygote_handle =
+ service_manager::ZygoteHandle zygote_handle =
base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote)
? nullptr
-@@ -101,6 +104,7 @@
+@@ -85,7 +88,6 @@
+ GetProcessType());
+ *launch_result = LAUNCH_RESULT_SUCCESS;
+
+-#if !defined(OS_OPENBSD)
+ if (handle) {
+ // This is just a starting score for a renderer or extension (the
+ // only types of processes that will be started this way). It will
+@@ -96,13 +98,13 @@
+ service_manager::ZygoteHostImpl::GetInstance()->AdjustRendererOOMScore(
+ handle, kLowestRendererOomScore);
+ }
+-#endif
+
+ Process process;
+ process.process = base::Process(handle);
process.zygote = zygote_handle;
return process;
}
@@ -26,22 +41,24 @@
Process process;
process.process = base::LaunchProcess(*command_line(), options);
-@@ -118,10 +122,12 @@
+@@ -120,10 +122,14 @@
const ChildProcessLauncherHelper::Process& process,
- bool known_dead,
- int* exit_code) {
+ bool known_dead) {
+ ChildProcessTerminationInfo info;
+#if !defined(OS_BSD)
if (process.zygote) {
- return process.zygote->GetTerminationStatus(
- process.process.Handle(), known_dead, exit_code);
- }
+ info.status = process.zygote->GetTerminationStatus(
+ process.process.Handle(), known_dead, &info.exit_code);
+ } else if (known_dead) {
++#else
++ if (known_dead) {
+#endif
- if (known_dead) {
- return base::GetKnownDeadTerminationStatus(
- process.process.Handle(), exit_code);
-@@ -140,13 +146,17 @@
- ChildProcessLauncherHelper::Process process) {
- process.process.Terminate(RESULT_CODE_NORMAL_EXIT, false);
+ info.status = base::GetKnownDeadTerminationStatus(process.process.Handle(),
+ &info.exit_code);
+ } else {
+@@ -147,13 +153,17 @@
+ DCHECK(CurrentlyOnProcessLauncherTaskRunner());
+ process.process.Terminate(service_manager::RESULT_CODE_NORMAL_EXIT, false);
// On POSIX, we must additionally reap the child.
+#if !defined(OS_BSD)
if (process.zygote) {
diff --git a/www/chromium/files/patch-content_common_common_sandbox_support_linux.cc b/www/chromium/files/patch-content_common_common_sandbox_support_linux.cc
new file mode 100644
index 000000000000..3ecc98082147
--- /dev/null
+++ b/www/chromium/files/patch-content_common_common_sandbox_support_linux.cc
@@ -0,0 +1,11 @@
+--- content/common/common_sandbox_support_linux.cc.orig 2018-08-04 19:46:27.654459000 +0200
++++ content/common/common_sandbox_support_linux.cc 2018-08-04 19:46:40.138833000 +0200
+@@ -5,6 +5,7 @@
+ #include "content/public/common/common_sandbox_support_linux.h"
+
+ #include <sys/stat.h>
++#include <unistd.h>
+
+ #include <limits>
+ #include <memory>
+
diff --git a/www/chromium/files/patch-content_public_common_zygote_features.gni b/www/chromium/files/patch-content_public_common_zygote_features.gni
deleted file mode 100644
index 55aad678596d..000000000000
--- a/www/chromium/files/patch-content_public_common_zygote_features.gni
+++ /dev/null
@@ -1,8 +0,0 @@
---- content/public/common/zygote_features.gni.orig 2018-03-24 12:14:17.829148000 +0100
-+++ content/public/common/zygote_features.gni 2018-03-24 12:14:28.619495000 +0100
-@@ -2,4 +2,4 @@
- # Use of this source code is governed by a BSD-style license that can be
- # found in the LICENSE file.
-
--use_zygote_handle = is_posix && !is_android && !is_mac && !is_fuchsia
-+use_zygote_handle = is_posix && !is_android && !is_mac && !is_fuchsia && !is_bsd
diff --git a/www/chromium/files/patch-content_renderer_input_input_event_prediction.cc b/www/chromium/files/patch-content_renderer_input_input_event_prediction.cc
new file mode 100644
index 000000000000..26e848597c76
--- /dev/null
+++ b/www/chromium/files/patch-content_renderer_input_input_event_prediction.cc
@@ -0,0 +1,12 @@
+--- content/renderer/input/input_event_prediction.cc.orig 2018-08-06 10:06:45.824140000 +0200
++++ content/renderer/input/input_event_prediction.cc 2018-08-06 10:09:29.835896000 +0200
+@@ -119,7 +119,8 @@
+ if (predictor != pointer_id_predictor_map_.end()) {
+ predictor->second->Update(data);
+ } else {
+- pointer_id_predictor_map_.insert({event.id, SetUpPredictor()});
++ auto pair = std::make_pair(event.id, SetUpPredictor());
++ pointer_id_predictor_map_.insert(std::move(pair));
+ pointer_id_predictor_map_[event.id]->Update(data);
+ }
+ }
diff --git a/www/chromium/files/patch-content_renderer_render__thread__impl.cc b/www/chromium/files/patch-content_renderer_render__thread__impl.cc
index 9138489c204c..8ef7609e8c05 100644
--- a/www/chromium/files/patch-content_renderer_render__thread__impl.cc
+++ b/www/chromium/files/patch-content_renderer_render__thread__impl.cc
@@ -1,6 +1,6 @@
---- content/renderer/render_thread_impl.cc.orig 2018-06-13 00:10:17.000000000 +0200
-+++ content/renderer/render_thread_impl.cc 2018-07-19 12:51:34.446042000 +0200
-@@ -214,12 +214,21 @@
+--- content/renderer/render_thread_impl.cc.orig 2018-08-01 00:08:45.000000000 +0200
++++ content/renderer/render_thread_impl.cc 2018-08-04 19:38:18.130085000 +0200
+@@ -199,12 +199,21 @@
#include "content/common/external_ipc_dumper.h"
#endif
@@ -22,7 +22,16 @@
using base::ThreadRestrictions;
using blink::WebDocument;
using blink::WebFrame;
-@@ -1096,7 +1105,7 @@
+@@ -1002,7 +1011,7 @@
+ DCHECK(parsed_num_raster_threads) << string_value;
+ DCHECK_GT(num_raster_threads, 0);
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ categorized_worker_pool_->SetBackgroundingCallback(
+ main_thread_scheduler_->DefaultTaskRunner(),
+ base::BindOnce(
+@@ -1043,7 +1052,7 @@
GetConnector()->BindInterface(mojom::kBrowserServiceName,
mojo::MakeRequest(&storage_partition_service_));
@@ -30,8 +39,8 @@
+#if defined(OS_LINUX) || defined(OS_BSD)
render_message_filter()->SetThreadPriority(
ChildProcess::current()->io_thread_id(), base::ThreadPriority::DISPLAY);
- render_message_filter()->SetThreadPriority(
-@@ -1304,7 +1313,7 @@
+ #endif
+@@ -1248,7 +1257,7 @@
false));
GetContentClient()->renderer()->PostCompositorThreadCreated(
compositor_task_runner_.get());
@@ -40,12 +49,12 @@
render_message_filter()->SetThreadPriority(compositor_thread_->ThreadId(),
base::ThreadPriority::DISPLAY);
#endif
-@@ -1584,7 +1593,7 @@
+@@ -1485,7 +1494,7 @@
gpu::kGpuFeatureStatusEnabled);
- const bool enable_gpu_memory_buffer_video_frames =
+ const bool enable_gpu_memory_buffers =
!is_gpu_compositing_disabled_ &&
--#if defined(OS_MACOSX) || defined(OS_LINUX)
-+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
!cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames);
- #elif defined(OS_WIN)
- !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames) &&
+ #else
+ cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames);
diff --git a/www/chromium/files/patch-content_renderer_renderer_main.cc b/www/chromium/files/patch-content_renderer_renderer_main.cc
index 099f262b76a9..163e6d46450c 100644
--- a/www/chromium/files/patch-content_renderer_renderer_main.cc
+++ b/www/chromium/files/patch-content_renderer_renderer_main.cc
@@ -1,13 +1,7 @@
---- content/renderer/renderer_main.cc.orig 2018-02-24 16:25:14.000000000 +0100
-+++ content/renderer/renderer_main.cc 2018-03-04 02:01:25.568495000 +0100
-@@ -193,9 +193,13 @@
- // is OK.
+--- content/renderer/renderer_main.cc.orig 2018-08-01 00:08:45.000000000 +0200
++++ content/renderer/renderer_main.cc 2018-08-04 19:44:52.562529000 +0200
+@@ -218,7 +218,7 @@
InitializeWebRtcModule();
- #endif
-+#if defined(OS_BSD)
-+ SkFontConfigInterface::SetGlobal(
-+ new FontConfigIPC(GetSandboxFD()))->unref();
-+#endif
{
-#if defined(OS_WIN) || defined(OS_MACOSX)
@@ -15,7 +9,7 @@
// TODO(markus): Check if it is OK to unconditionally move this
// instruction down.
auto render_process = RenderProcessImpl::Create();
-@@ -205,7 +209,7 @@
+@@ -228,7 +228,7 @@
bool run_loop = true;
if (!no_sandbox)
run_loop = platform.EnableSandbox();
@@ -23,4 +17,4 @@
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
auto render_process = RenderProcessImpl::Create();
RenderThreadImpl::Create(std::move(main_message_loop),
- std::move(renderer_scheduler));
+ std::move(main_thread_scheduler));
diff --git a/www/chromium/files/patch-media_ffmpeg_ffmpeg_common.h b/www/chromium/files/patch-media_ffmpeg_ffmpeg_common.h
deleted file mode 100644
index 5ed0123cc34a..000000000000
--- a/www/chromium/files/patch-media_ffmpeg_ffmpeg_common.h
+++ /dev/null
@@ -1,21 +0,0 @@
---- media/ffmpeg/ffmpeg_common.h.orig 2018-07-20 02:33:15.643297000 +0200
-+++ media/ffmpeg/ffmpeg_common.h 2018-07-20 02:34:16.943706000 +0200
-@@ -28,9 +28,6 @@
- MSVC_PUSH_DISABLE_WARNING(4244);
- #include <libavcodec/avcodec.h>
- #include <libavformat/avformat.h>
--#if !BUILDFLAG(USE_SYSTEM_FFMPEG)
--#include <libavformat/internal.h>
--#endif // !BUILDFLAG(USE_SYSTEM_FFMPEG)
- #include <libavformat/avio.h>
- #include <libavutil/avutil.h>
- #include <libavutil/imgutils.h>
-@@ -41,6 +38,8 @@
- } // extern "C"
-
- namespace media {
-+
-+constexpr int64_t kNoFFmpegTimestamp = static_cast<int64_t>(AV_NOPTS_VALUE);
-
- class AudioDecoderConfig;
- class EncryptionScheme;
diff --git a/www/chromium/files/patch-media_filters_ffmpeg_demuxer.cc b/www/chromium/files/patch-media_filters_ffmpeg_demuxer.cc
deleted file mode 100644
index 26f522181511..000000000000
--- a/www/chromium/files/patch-media_filters_ffmpeg_demuxer.cc
+++ /dev/null
@@ -1,139 +0,0 @@
---- media/filters/ffmpeg_demuxer.cc.orig 2018-06-13 00:10:20.000000000 +0200
-+++ media/filters/ffmpeg_demuxer.cc 2018-07-20 16:10:50.322176000 +0200
-@@ -85,29 +85,26 @@
- frames * base::Time::kMicrosecondsPerSecond / sample_rate);
- }
-
--static base::TimeDelta ExtractStartTime(AVStream* stream,
-- base::TimeDelta start_time_estimate) {
-- DCHECK(start_time_estimate != kNoTimestamp);
-- if (stream->start_time == static_cast<int64_t>(AV_NOPTS_VALUE)) {
-- return start_time_estimate == kInfiniteDuration ? base::TimeDelta()
-- : start_time_estimate;
-- }
-+static base::TimeDelta ExtractStartTime(AVStream* stream) {
-+ // The default start time is zero.
-+ base::TimeDelta start_time;
-
-- // First try the lower of the estimate and the |start_time| value.
-- base::TimeDelta start_time =
-- std::min(ConvertFromTimeBase(stream->time_base, stream->start_time),
-- start_time_estimate);
-+ // First try to use the |start_time| value as is.
-+ if (stream->start_time != kNoFFmpegTimestamp)
-+ start_time = ConvertFromTimeBase(stream->time_base, stream->start_time);
-
-- // Next see if the first buffered pts value is usable.
-- if (stream->pts_buffer[0] != static_cast<int64_t>(AV_NOPTS_VALUE)) {
-- const base::TimeDelta buffered_pts =
-- ConvertFromTimeBase(stream->time_base, stream->pts_buffer[0]);
-- if (buffered_pts < start_time)
-- start_time = buffered_pts;
-+ // Next try to use the first DTS value, for codecs where we know PTS == DTS
-+ // (exclude all H26x codecs). The start time must be returned in PTS.
-+ if (stream->first_dts != kNoFFmpegTimestamp &&
-+ stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
-+ stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
-+ stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
-+ const base::TimeDelta first_pts =
-+ ConvertFromTimeBase(stream->time_base, stream->first_dts);
-+ if (first_pts < start_time)
-+ start_time = first_pts;
- }
-
-- // NOTE: Do not use AVStream->first_dts since |start_time| should be a
-- // presentation timestamp.
- return start_time;
- }
-
-@@ -514,7 +511,7 @@
- buffer->set_duration(kNoTimestamp);
- }
-
-- // Note: If pts is AV_NOPTS_VALUE, stream_timestamp will be kNoTimestamp.
-+ // Note: If pts is kNoFFmpegTimestamp, stream_timestamp will be kNoTimestamp.
- const base::TimeDelta stream_timestamp =
- ConvertStreamTimestamp(stream_->time_base, packet->pts);
-
-@@ -557,8 +554,8 @@
- // code paths below; otherwise they should be treated as a parse error.
- if ((!fixup_chained_ogg_ || last_packet_timestamp_ == kNoTimestamp) &&
- buffer->timestamp() < base::TimeDelta()) {
-- MEDIA_LOG(DEBUG, media_log_)
-- << "FFmpegDemuxer: unfixable negative timestamp";
-+ MEDIA_LOG(ERROR, media_log_)
-+ << "FFmpegDemuxer: unfixable negative timestamp.";
- demuxer_->NotifyDemuxerError(DEMUXER_ERROR_COULD_NOT_PARSE);
- return;
- }
-@@ -871,7 +868,7 @@
- base::TimeDelta FFmpegDemuxerStream::ConvertStreamTimestamp(
- const AVRational& time_base,
- int64_t timestamp) {
-- if (timestamp == static_cast<int64_t>(AV_NOPTS_VALUE))
-+ if (timestamp == kNoFFmpegTimestamp)
- return kNoTimestamp;
-
- return ConvertFromTimeBase(time_base, timestamp);
-@@ -1271,42 +1268,6 @@
- AVFormatContext* format_context = glue_->format_context();
- streams_.resize(format_context->nb_streams);
-
-- // Estimate the start time for each stream by looking through the packets
-- // buffered during avformat_find_stream_info(). These values will be
-- // considered later when determining the actual stream start time.
-- //
-- // These packets haven't been completely processed yet, so only look through
-- // these values if the AVFormatContext has a valid start time.
-- //
-- // If no estimate is found, the stream entry will be kInfiniteDuration.
-- std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams,
-- kInfiniteDuration);
--#if !BUILDFLAG(USE_SYSTEM_FFMPEG)
-- const AVFormatInternal* internal = format_context->internal;
-- if (internal && internal->packet_buffer &&
-- format_context->start_time != static_cast<int64_t>(AV_NOPTS_VALUE)) {
-- struct AVPacketList* packet_buffer = internal->packet_buffer;
-- while (packet_buffer != internal->packet_buffer_end) {
-- DCHECK_LT(static_cast<size_t>(packet_buffer->pkt.stream_index),
-- start_time_estimates.size());
-- const AVStream* stream =
-- format_context->streams[packet_buffer->pkt.stream_index];
-- if (packet_buffer->pkt.pts != static_cast<int64_t>(AV_NOPTS_VALUE)) {
-- const base::TimeDelta packet_pts =
-- ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts);
-- // We ignore kNoTimestamp here since -int64_t::min() is possible; see
-- // https://crbug.com/700501. Technically this is a valid value, but in
-- // practice shouldn't occur, so just ignore it when estimating.
-- if (packet_pts != kNoTimestamp && packet_pts != kInfiniteDuration &&
-- packet_pts < start_time_estimates[stream->index]) {
-- start_time_estimates[stream->index] = packet_pts;
-- }
-- }
-- packet_buffer = packet_buffer->next;
-- }
-- }
--#endif // !BUILDFLAG(USE_SYSTEM_FFMPEG)
--
- std::unique_ptr<MediaTracks> media_tracks(new MediaTracks());
-
- DCHECK(track_id_to_demux_stream_map_.empty());
-@@ -1455,8 +1416,7 @@
-
- max_duration = std::max(max_duration, streams_[i]->duration());
-
-- base::TimeDelta start_time =
-- ExtractStartTime(stream, start_time_estimates[i]);
-+ base::TimeDelta start_time = ExtractStartTime(stream);
-
- // Note: This value is used for seeking, so we must take the true value and
- // not the one possibly clamped to zero below.
-@@ -1494,7 +1454,7 @@
- if (text_enabled_)
- AddTextStreams();
-
-- if (format_context->duration != static_cast<int64_t>(AV_NOPTS_VALUE)) {
-+ if (format_context->duration != kNoFFmpegTimestamp) {
- // If there is a duration value in the container use that to find the
- // maximum between it and the duration from A/V streams.
- const AVRational av_time_base = {1, AV_TIME_BASE};
diff --git a/www/chromium/files/patch-media_filters_ffmpeg_demuxer_unittest.cc b/www/chromium/files/patch-media_filters_ffmpeg_demuxer_unittest.cc
deleted file mode 100644
index 4da754c6844e..000000000000
--- a/www/chromium/files/patch-media_filters_ffmpeg_demuxer_unittest.cc
+++ /dev/null
@@ -1,56 +0,0 @@
---- media/filters/ffmpeg_demuxer_unittest.cc.orig 2018-07-20 03:38:14.345859000 +0200
-+++ media/filters/ffmpeg_demuxer_unittest.cc 2018-07-20 03:43:52.359278000 +0200
-@@ -724,12 +724,9 @@
- ReadUntilEndOfStream(GetStream(DemuxerStream::AUDIO));
- }
-
--// TODO(dalecurtis): Test is disabled since FFmpeg does not currently guarantee
--// the order of demuxed packets in OGG containers. Re-enable and fix key frame
--// expectations once we decide to either workaround it or attempt a fix
--// upstream. See http://crbug.com/387996.
--TEST_F(FFmpegDemuxerTest,
-- DISABLED_Read_AudioNegativeStartTimeAndOggDiscard_Bear) {
-+// Android has no Theora support, so these tests doesn't work.
-+#if !defined(OS_ANDROID)
-+TEST_F(FFmpegDemuxerTest, Read_AudioNegativeStartTimeAndOggDiscard_Bear) {
- // Many ogg files have negative starting timestamps, so ensure demuxing and
- // seeking work correctly with a negative start time.
- CreateDemuxer("bear.ogv");
-@@ -739,8 +736,12 @@
- DemuxerStream* video = GetStream(DemuxerStream::VIDEO);
- DemuxerStream* audio = GetStream(DemuxerStream::AUDIO);
-
-- // Run the test twice with a seek in between.
-- for (int i = 0; i < 2; ++i) {
-+ // Run the test once (should be twice..., see note) with a seek in between.
-+ //
-+ // TODO(dalecurtis): We only run the test once since FFmpeg does not currently
-+ // guarantee the order of demuxed packets in OGG containers. See
-+ // http://crbug.com/387996
-+ for (int i = 0; i < 1; ++i) {
- audio->Read(
- NewReadCBWithCheckedDiscard(FROM_HERE, 40, 0, kInfiniteDuration, true));
- base::RunLoop().Run();
-@@ -759,10 +760,10 @@
- video->Read(NewReadCB(FROM_HERE, 5751, 0, true));
- base::RunLoop().Run();
-
-- video->Read(NewReadCB(FROM_HERE, 846, 33367, true));
-+ video->Read(NewReadCB(FROM_HERE, 846, 33367, false));
- base::RunLoop().Run();
-
-- video->Read(NewReadCB(FROM_HERE, 1255, 66733, true));
-+ video->Read(NewReadCB(FROM_HERE, 1255, 66733, false));
- base::RunLoop().Run();
-
- // Seek back to the beginning and repeat the test.
-@@ -775,9 +776,6 @@
- // Same test above, but using sync2.ogv which has video stream muxed before the
- // audio stream, so seeking based only on start time will fail since ffmpeg is
- // essentially just seeking based on file position.
--//
--// Android has no Theora support, so this test doesn't work.
--#if !defined(OS_ANDROID)
- TEST_F(FFmpegDemuxerTest, Read_AudioNegativeStartTimeAndOggDiscard_Sync) {
- // Many ogg files have negative starting timestamps, so ensure demuxing and
- // seeking work correctly with a negative start time.
diff --git a/www/chromium/files/patch-net_base_address__tracker__linux.cc b/www/chromium/files/patch-net_base_address__tracker__linux.cc
index 2146beb80cd8..e89537c7c685 100644
--- a/www/chromium/files/patch-net_base_address__tracker__linux.cc
+++ b/www/chromium/files/patch-net_base_address__tracker__linux.cc
@@ -1,6 +1,6 @@
---- net/base/address_tracker_linux.cc.orig 2018-06-13 00:10:21.000000000 +0200
-+++ net/base/address_tracker_linux.cc 2018-07-19 15:22:53.324530000 +0200
-@@ -19,96 +19,10 @@
+--- net/base/address_tracker_linux.cc.orig 2018-08-01 00:08:53.000000000 +0200
++++ net/base/address_tracker_linux.cc 2018-08-04 20:12:48.684622000 +0200
+@@ -20,96 +20,10 @@
namespace net {
namespace internal {
@@ -99,7 +99,7 @@
}
AddressTrackerLinux::AddressTrackerLinux()
-@@ -151,93 +65,8 @@
+@@ -152,93 +66,8 @@
}
void AddressTrackerLinux::Init() {
@@ -182,7 +182,7 @@
- }
-
- if (tracking_) {
-- rv = base::MessageLoopForIO::current()->WatchFileDescriptor(
+- rv = base::MessageLoopCurrentForIO::Get()->WatchFileDescriptor(
- netlink_fd_, true, base::MessagePumpForIO::WATCH_READ, &watcher_, this);
- if (rv < 0) {
- PLOG(ERROR) << "Could not watch NETLINK socket";
@@ -190,12 +190,12 @@
- return;
- }
- }
-+ NOTIMPLEMENTED();
-+ AbortAndForceOnline();
++NOTIMPLEMENTED();
++AbortAndForceOnline();
}
void AddressTrackerLinux::AbortAndForceOnline() {
-@@ -248,25 +77,6 @@
+@@ -249,25 +78,6 @@
connection_type_initialized_cv_.Broadcast();
}
@@ -221,7 +221,7 @@
NetworkChangeNotifier::ConnectionType
AddressTrackerLinux::GetCurrentConnectionType() {
// http://crbug.com/125097
-@@ -317,102 +127,7 @@
+@@ -318,102 +128,7 @@
bool* address_changed,
bool* link_changed,
bool* tunnel_changed) {
@@ -325,7 +325,7 @@
}
void AddressTrackerLinux::OnFileCanReadWithoutBlocking(int fd) {
-@@ -449,34 +164,7 @@
+@@ -450,34 +165,7 @@
}
void AddressTrackerLinux::UpdateCurrentConnectionType() {
diff --git a/www/chromium/files/patch-net_quic_platform_impl_quic__ip__address__impl.cc b/www/chromium/files/patch-net_quic_platform_impl_quic__ip__address__impl.cc
deleted file mode 100644
index 9b12538e39e4..000000000000
--- a/www/chromium/files/patch-net_quic_platform_impl_quic__ip__address__impl.cc
+++ /dev/null
@@ -1,10 +0,0 @@
---- net/quic/platform/impl/quic_ip_address_impl.cc.orig 2017-04-19 19:06:36 UTC
-+++ net/quic/platform/impl/quic_ip_address_impl.cc
-@@ -12,6 +12,7 @@
- #include <ws2bth.h>
- #elif defined(OS_POSIX)
- #include <netinet/in.h>
-+#include <sys/socket.h>
- #endif
-
- using std::string;
diff --git a/www/chromium/files/patch-net_third_party_quic_platform_impl_quic_ip_address_impl.cc b/www/chromium/files/patch-net_third_party_quic_platform_impl_quic_ip_address_impl.cc
new file mode 100644
index 000000000000..faabac97dedc
--- /dev/null
+++ b/www/chromium/files/patch-net_third_party_quic_platform_impl_quic_ip_address_impl.cc
@@ -0,0 +1,10 @@
+--- net/third_party/quic/platform/impl/quic_ip_address_impl.cc.orig 2018-08-04 20:21:44.470242000 +0200
++++ net/third_party/quic/platform/impl/quic_ip_address_impl.cc 2018-08-04 20:22:01.700604000 +0200
+@@ -13,6 +13,7 @@
+ #include <ws2bth.h>
+ #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
+ #include <netinet/in.h>
++#include <sys/socket.h>
+ #endif
+
+ using std::string;
diff --git a/www/chromium/files/patch-pdf_pdfium_pdfium__engine.cc b/www/chromium/files/patch-pdf_pdfium_pdfium__engine.cc
index b69450a3069b..d46db39d722f 100644
--- a/www/chromium/files/patch-pdf_pdfium_pdfium__engine.cc
+++ b/www/chromium/files/patch-pdf_pdfium_pdfium__engine.cc
@@ -1,15 +1,15 @@
---- pdf/pdfium/pdfium_engine.cc.orig 2017-07-25 21:04:59.000000000 +0200
-+++ pdf/pdfium/pdfium_engine.cc 2017-08-02 14:54:56.250862000 +0200
-@@ -131,7 +131,7 @@
- return page_numbers;
- }
+--- pdf/pdfium/pdfium_engine.cc.orig 2018-08-01 00:08:54.000000000 +0200
++++ pdf/pdfium/pdfium_engine.cc 2018-08-04 20:29:42.077905000 +0200
+@@ -134,7 +134,7 @@
+
+ PDFiumEngine* g_engine_for_fontmapper = nullptr;
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
PP_Instance g_last_instance_id;
-@@ -635,7 +635,7 @@
+@@ -651,7 +651,7 @@
config.m_v8EmbedderSlot = gin::kEmbedderPDFium;
FPDF_InitLibraryWithConfig(&config);
@@ -18,7 +18,7 @@
// Font loading doesn't work in the renderer sandbox in Linux.
FPDF_SetSystemFontInfo(&g_font_info);
#else
-@@ -660,7 +660,7 @@
+@@ -676,7 +676,7 @@
void ShutdownSDK() {
FPDF_DestroyLibrary();
@@ -27,7 +27,7 @@
delete g_font_info;
#endif
TearDownV8();
-@@ -766,7 +766,7 @@
+@@ -712,7 +712,7 @@
IFSDK_PAUSE::user = nullptr;
IFSDK_PAUSE::NeedToPauseNow = Pause_NeedToPauseNow;
@@ -36,26 +36,26 @@
// PreviewModeClient does not know its pp::Instance.
pp::Instance* instance = client_->GetPluginInstance();
if (instance)
-@@ -1496,7 +1496,7 @@
- FPDF_ClosePage(pdf_page);
- }
+@@ -1226,7 +1226,7 @@
+
+ KillFormFocus();
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
g_last_instance_id = client_->GetPluginInstance()->pp_instance();
#endif
-@@ -2918,7 +2918,7 @@
- DCHECK_LT(static_cast<size_t>(progressive_index), progressive_paints_.size());
+@@ -2924,7 +2924,7 @@
DCHECK(image_data);
+ last_progressive_start_time_ = base::Time::Now();
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
g_last_instance_id = client_->GetPluginInstance()->pp_instance();
#endif
-@@ -3368,7 +3368,7 @@
- FORM_DoPageAAction(old_page, form_, FPDFPAGE_AACTION_CLOSE);
+@@ -3402,7 +3402,7 @@
+ FORM_DoPageAAction(old_page, form(), FPDFPAGE_AACTION_CLOSE);
}
most_visible_page_ = index;
-#if defined(OS_LINUX)
diff --git a/www/chromium/files/patch-sandbox_linux_BUILD.gn b/www/chromium/files/patch-sandbox_linux_BUILD.gn
index 1431884418d4..94cf851acd8f 100644
--- a/www/chromium/files/patch-sandbox_linux_BUILD.gn
+++ b/www/chromium/files/patch-sandbox_linux_BUILD.gn
@@ -1,5 +1,5 @@
---- sandbox/linux/BUILD.gn.orig 2018-06-13 00:10:23.000000000 +0200
-+++ sandbox/linux/BUILD.gn 2018-07-20 21:32:57.834564000 +0200
+--- sandbox/linux/BUILD.gn.orig 2018-08-01 00:08:55.000000000 +0200
++++ sandbox/linux/BUILD.gn 2018-08-04 20:49:57.663117000 +0200
@@ -12,12 +12,12 @@
}
@@ -16,7 +16,7 @@
}
if (is_nacl_nonsfi) {
-@@ -396,7 +396,7 @@
+@@ -399,7 +399,7 @@
public_deps += [ ":sandbox_services_headers" ]
}
@@ -25,7 +25,7 @@
cflags = [ "-fgnu-inline-asm" ]
sources -= [
-@@ -404,6 +404,8 @@
+@@ -407,6 +407,8 @@
"services/init_process_reaper.h",
"services/scoped_process.cc",
"services/scoped_process.h",
@@ -34,10 +34,10 @@
"services/yama.cc",
"services/yama.h",
"syscall_broker/broker_channel.cc",
-@@ -420,6 +422,10 @@
- "syscall_broker/broker_permission_list.h",
- "syscall_broker/broker_process.cc",
+@@ -425,6 +427,10 @@
"syscall_broker/broker_process.h",
+ "syscall_broker/broker_simple_message.cc",
+ "syscall_broker/broker_simple_message.h",
+ ]
+ sources += [
+ "services/libc_interceptor.cc",
diff --git a/www/chromium/files/patch-sandbox_linux_services_init_process_reaper.cc b/www/chromium/files/patch-sandbox_linux_services_init_process_reaper.cc
new file mode 100644
index 000000000000..1766c2eb71f8
--- /dev/null
+++ b/www/chromium/files/patch-sandbox_linux_services_init_process_reaper.cc
@@ -0,0 +1,15 @@
+--- sandbox/linux/services/init_process_reaper.cc.orig 2018-08-04 19:26:41.605247000 +0200
++++ sandbox/linux/services/init_process_reaper.cc 2018-08-04 19:27:02.769442000 +0200
+@@ -1,6 +1,7 @@
+ // 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.
++#if 0
+
+ #include "sandbox/linux/services/init_process_reaper.h"
+
+@@ -100,3 +101,4 @@
+ }
+
+ } // namespace sandbox.
++#endif
diff --git a/www/chromium/files/patch-services_network_BUILD.gn b/www/chromium/files/patch-services_network_BUILD.gn
new file mode 100644
index 000000000000..9b859150c51e
--- /dev/null
+++ b/www/chromium/files/patch-services_network_BUILD.gn
@@ -0,0 +1,10 @@
+--- services/network/BUILD.gn.orig 2018-08-04 19:29:41.578469000 +0200
++++ services/network/BUILD.gn 2018-08-04 19:29:55.745503000 +0200
+@@ -138,7 +138,6 @@
+
+ if (is_linux) {
+ deps += [
+- "//sandbox/linux:sandbox_services",
+ "//services/service_manager/sandbox:sandbox",
+ ]
+ }
diff --git a/www/chromium/files/patch-services_resource_coordinator_public_cpp_memory_instrumentation_os_metrics_linux.cc b/www/chromium/files/patch-services_resource_coordinator_public_cpp_memory_instrumentation_os_metrics_linux.cc
index 07d7afbd41f4..f577a19f7b91 100644
--- a/www/chromium/files/patch-services_resource_coordinator_public_cpp_memory_instrumentation_os_metrics_linux.cc
+++ b/www/chromium/files/patch-services_resource_coordinator_public_cpp_memory_instrumentation_os_metrics_linux.cc
@@ -1,6 +1,26 @@
---- services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc.orig 2018-06-13 00:10:24.000000000 +0200
-+++ services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc 2018-07-20 15:29:23.131774000 +0200
-@@ -178,6 +178,9 @@
+--- services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc.orig 2018-08-01 00:08:55.000000000 +0200
++++ services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc 2018-08-04 21:00:31.567932000 +0200
+@@ -16,8 +16,10 @@
+ #include "build/build_config.h"
+ #include "services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics.h"
+
++#if !defined(OS_BSD)
+ // Symbol with virtual address of the start of ELF header of the current binary.
+ extern char __ehdr_start;
++#endif
+
+ namespace memory_instrumentation {
+
+@@ -101,7 +103,7 @@
+ // Build ID is needed to symbolize heap profiles, and is generated only on
+ // official builds. Build ID is only added for the current library (chrome)
+ // since it is racy to read other libraries which can be unmapped any time.
+-#if defined(OFFICIAL_BUILD)
++#if defined(OFFICIAL_BUILD) && !defined(OS_BSD)
+ uintptr_t addr = reinterpret_cast<uintptr_t>(&ParseSmapsHeader);
+ if (addr >= region->start_address && addr < end_addr) {
+ base::Optional<std::string> buildid =
+@@ -196,6 +198,9 @@
// static
bool OSMetrics::FillOSMemoryDump(base::ProcessId pid,
mojom::RawOSMemDump* dump) {
@@ -10,7 +30,7 @@
base::ScopedFD autoclose = OpenStatm(pid);
int statm_fd = autoclose.get();
-@@ -203,6 +206,7 @@
+@@ -221,6 +226,7 @@
dump->resident_set_kb = process_metrics->GetResidentSetSize() / 1024;
return true;
diff --git a/www/chromium/files/patch-services_service__manager_zygote_common_zygote_features.gni b/www/chromium/files/patch-services_service__manager_zygote_common_zygote_features.gni
new file mode 100644
index 000000000000..76a05489c674
--- /dev/null
+++ b/www/chromium/files/patch-services_service__manager_zygote_common_zygote_features.gni
@@ -0,0 +1,8 @@
+--- services/service_manager/zygote/common/zygote_features.gni.orig 2018-08-04 19:05:25.641485000 +0200
++++ services/service_manager/zygote/common/zygote_features.gni 2018-08-04 19:05:36.695208000 +0200
+@@ -2,4 +2,4 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+
+-use_zygote_handle = is_posix && !is_android && !is_mac
++use_zygote_handle = is_posix && !is_android && !is_mac && !is_bsd
diff --git a/www/chromium/files/patch-content_browser_zygote_host_zygote_host_impl_linux.cc b/www/chromium/files/patch-services_service__manager_zygote_host_zygote_host_impl_linux.cc
index b29320544585..0cedce989076 100644
--- a/www/chromium/files/patch-content_browser_zygote_host_zygote_host_impl_linux.cc
+++ b/www/chromium/files/patch-services_service__manager_zygote_host_zygote_host_impl_linux.cc
@@ -1,22 +1,22 @@
---- content/browser/zygote_host/zygote_host_impl_linux.cc.orig 2018-07-19 11:56:14.006818000 +0200
-+++ content/browser/zygote_host/zygote_host_impl_linux.cc 2018-07-19 11:58:05.834024000 +0200
+--- services/service_manager/zygote/host/zygote_host_impl_linux.cc.orig 2018-08-04 19:08:22.136631000 +0200
++++ services/service_manager/zygote/host/zygote_host_impl_linux.cc 2018-08-04 19:11:54.463784000 +0200
@@ -72,6 +72,7 @@
}
void ZygoteHostImpl::Init(const base::CommandLine& command_line) {
+#if !defined(OS_BSD)
- if (command_line.HasSwitch(switches::kNoSandbox)) {
+ if (command_line.HasSwitch(service_manager::switches::kNoSandbox)) {
return;
}
-@@ -130,6 +131,7 @@
+@@ -133,6 +134,7 @@
"you can try using --"
- << switches::kNoSandbox << ".";
+ << service_manager::switches::kNoSandbox << ".";
}
+#endif
}
void ZygoteHostImpl::AddZygotePid(pid_t pid) {
-@@ -154,6 +156,7 @@
+@@ -157,6 +159,7 @@
base::CommandLine* cmd_line,
base::ScopedFD* control_fd,
base::FileHandleMappingVector additional_remapped_fds) {
@@ -24,7 +24,7 @@
int fds[2];
CHECK_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds));
CHECK(base::UnixDomainSocket::EnableReceiveProcessId(fds[0]));
-@@ -218,9 +221,12 @@
+@@ -221,9 +224,12 @@
AddZygotePid(pid);
return pid;
diff --git a/www/chromium/files/patch-content_browser_zygote_host_zygote_host_impl_linux.h b/www/chromium/files/patch-services_service__manager_zygote_host_zygote_host_impl_linux.h
index 8716bf887686..ef3eeef854ec 100644
--- a/www/chromium/files/patch-content_browser_zygote_host_zygote_host_impl_linux.h
+++ b/www/chromium/files/patch-services_service__manager_zygote_host_zygote_host_impl_linux.h
@@ -1,6 +1,6 @@
---- content/browser/zygote_host/zygote_host_impl_linux.h.orig 2018-06-13 00:10:17.000000000 +0200
-+++ content/browser/zygote_host/zygote_host_impl_linux.h 2018-07-19 11:55:28.795795000 +0200
-@@ -41,8 +41,10 @@
+--- services/service_manager/zygote/host/zygote_host_impl_linux.h.orig 2018-08-04 19:08:46.425404000 +0200
++++ services/service_manager/zygote/host/zygote_host_impl_linux.h 2018-08-04 19:09:48.783775000 +0200
+@@ -44,8 +44,10 @@
base::ScopedFD* control_fd,
base::FileHandleMappingVector additional_remapped_fds);
diff --git a/www/chromium/files/patch-content_public_browser_zygote_host_linux.h b/www/chromium/files/patch-services_service__manager_zygote_zygote_host_linux.h
index d118fc1e174b..47e8b1e7ba94 100644
--- a/www/chromium/files/patch-content_public_browser_zygote_host_linux.h
+++ b/www/chromium/files/patch-services_service__manager_zygote_zygote_host_linux.h
@@ -1,10 +1,10 @@
---- content/public/browser/zygote_host_linux.h.orig 2017-09-07 23:29:05.803550000 +0200
-+++ content/public/browser/zygote_host_linux.h 2017-09-07 23:29:43.081801000 +0200
+--- services/service_manager/zygote/zygote_host_linux.h.orig 2018-08-04 19:14:58.401790000 +0200
++++ services/service_manager/zygote/zygote_host_linux.h 2018-08-04 19:15:49.368693000 +0200
@@ -30,11 +30,13 @@
// after the first render has been forked.
virtual int GetRendererSandboxStatus() const = 0;
-+#if !defined(OS_FREEBSD)
++#if !defined(OS_BSD)
// Adjust the OOM score of the given renderer's PID. The allowed
// range for the score is [0, 1000], where higher values are more
// likely to be killed by the OOM killer.
@@ -13,4 +13,4 @@
+#endif
};
- } // namespace content
+ } // namespace service_manager
diff --git a/www/chromium/files/patch-services_service__manager_zygote_zygote_linux.cc b/www/chromium/files/patch-services_service__manager_zygote_zygote_linux.cc
new file mode 100644
index 000000000000..550c5e367bb5
--- /dev/null
+++ b/www/chromium/files/patch-services_service__manager_zygote_zygote_linux.cc
@@ -0,0 +1,15 @@
+--- services/service_manager/zygote/zygote_linux.cc.orig 2018-08-04 19:15:10.269247000 +0200
++++ services/service_manager/zygote/zygote_linux.cc 2018-08-04 19:16:18.712635000 +0200
+@@ -1,6 +1,7 @@
+ // 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.
++#if 0
+
+ #include "services/service_manager/zygote/zygote_linux.h"
+
+@@ -664,3 +665,4 @@
+ }
+
+ } // namespace service_manager
++#endif
diff --git a/www/chromium/files/patch-services_service__manager_zygote_zygote_main_linux.cc b/www/chromium/files/patch-services_service__manager_zygote_zygote_main_linux.cc
new file mode 100644
index 000000000000..c7cdbc5960f8
--- /dev/null
+++ b/www/chromium/files/patch-services_service__manager_zygote_zygote_main_linux.cc
@@ -0,0 +1,48 @@
+--- services/service_manager/zygote/zygote_main_linux.cc.orig 2018-08-04 19:15:20.665086000 +0200
++++ services/service_manager/zygote/zygote_main_linux.cc 2018-08-04 19:17:50.032823000 +0200
+@@ -11,7 +11,9 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <string.h>
++#if !defined(OS_BSD)
+ #include <sys/prctl.h>
++#endif
+ #include <sys/socket.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+@@ -101,6 +103,7 @@
+ // created through the setuid sandbox.
+ static bool EnterSuidSandbox(sandbox::SetuidSandboxClient* setuid_sandbox,
+ base::OnceClosure post_fork_parent_callback) {
++#if !defined(OS_BSD)
+ DCHECK(setuid_sandbox);
+ DCHECK(setuid_sandbox->IsSuidSandboxChild());
+
+@@ -133,6 +136,9 @@
+
+ CHECK(service_manager::SandboxDebugHandling::SetDumpableStatusAndHandlers());
+ return true;
++#else
++ return false;
++#endif
+ }
+
+ static void DropAllCapabilities(int proc_fd) {
+@@ -178,6 +184,7 @@
+
+ bool ZygoteMain(
+ std::vector<std::unique_ptr<ZygoteForkDelegate>> fork_delegates) {
++#if !defined(OS_BSD)
+ sandbox::SetAmZygoteOrRenderer(true, GetSandboxFD());
+
+ auto* linux_sandbox = service_manager::SandboxLinux::GetInstance();
+@@ -240,6 +247,9 @@
+
+ // This function call can return multiple times, once per fork().
+ return zygote.ProcessRequests();
++#else
++ return false;
++#endif
+ }
+
+ } // namespace service_manager
diff --git a/www/chromium/files/patch-third__party_angle_BUILD.gn b/www/chromium/files/patch-third__party_angle_BUILD.gn
index a8eb79d67c76..537a1aebcc4f 100644
--- a/www/chromium/files/patch-third__party_angle_BUILD.gn
+++ b/www/chromium/files/patch-third__party_angle_BUILD.gn
@@ -1,6 +1,6 @@
---- third_party/angle/BUILD.gn.orig 2017-09-05 21:06:47.000000000 +0200
-+++ third_party/angle/BUILD.gn 2017-09-10 02:30:29.868194000 +0200
-@@ -239,6 +239,7 @@
+--- third_party/angle/BUILD.gn.orig 2018-08-01 00:10:50.000000000 +0200
++++ third_party/angle/BUILD.gn 2018-08-04 20:58:43.991734000 +0200
+@@ -271,6 +271,7 @@
"X11",
"Xi",
"Xext",
@@ -8,12 +8,14 @@
]
}
}
-@@ -677,7 +678,7 @@
- sources += rebase_path(util_gypi.util_win32_sources, ".", "util")
+@@ -844,10 +845,6 @@
+ libs = []
+ if (is_linux) {
+ sources += rebase_path(util_gypi.util_linux_sources, ".", "util")
+- libs += [
+- "rt",
+- "dl",
+- ]
}
-- if (is_linux) {
-+ if (is_linux && !is_bsd) {
- sources += rebase_path(util_gypi.util_linux_sources, ".", "util")
- libs = [
- "rt",
+ if (is_mac) {
diff --git a/www/chromium/files/patch-third_party_crashpad_crashpad_util_misc_capture_context.h b/www/chromium/files/patch-third_party_crashpad_crashpad_util_misc_capture_context.h
index 1e16764fda0c..d512c8562424 100644
--- a/www/chromium/files/patch-third_party_crashpad_crashpad_util_misc_capture_context.h
+++ b/www/chromium/files/patch-third_party_crashpad_crashpad_util_misc_capture_context.h
@@ -1,5 +1,5 @@
---- third_party/crashpad/crashpad/util/misc/capture_context.h.orig 2018-06-13 00:11:02.000000000 +0200
-+++ third_party/crashpad/crashpad/util/misc/capture_context.h 2018-07-20 01:55:34.949535000 +0200
+--- third_party/crashpad/crashpad/util/misc/capture_context.h.orig 2018-08-01 00:09:40.000000000 +0200
++++ third_party/crashpad/crashpad/util/misc/capture_context.h 2018-08-04 21:08:07.783574000 +0200
@@ -21,7 +21,7 @@
#include <mach/mach.h>
#elif defined(OS_WIN)
@@ -7,14 +7,14 @@
-#elif defined(OS_LINUX) || defined(OS_ANDROID)
+#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
#include <ucontext.h>
- #endif // OS_MACOSX
-
-@@ -33,7 +33,7 @@
+ #elif defined(OS_FUCHSIA)
+ #include <signal.h>
+@@ -35,7 +35,7 @@
#endif
#elif defined(OS_WIN)
using NativeCPUContext = CONTEXT;
--#elif defined(OS_LINUX) || defined(OS_ANDROID)
-+#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+-#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA)
++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD)
using NativeCPUContext = ucontext_t;
#endif // OS_MACOSX
diff --git a/www/chromium/files/patch-third_party_perfetto_include_perfetto_base_build_config.h b/www/chromium/files/patch-third_party_perfetto_include_perfetto_base_build_config.h
new file mode 100644
index 000000000000..07f15193987f
--- /dev/null
+++ b/www/chromium/files/patch-third_party_perfetto_include_perfetto_base_build_config.h
@@ -0,0 +1,37 @@
+--- third_party/perfetto/include/perfetto/base/build_config.h.orig 2018-08-04 21:12:09.930418000 +0200
++++ third_party/perfetto/include/perfetto/base/build_config.h 2018-08-04 21:14:11.343838000 +0200
+@@ -28,6 +28,7 @@
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 1
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MACOSX() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_FREEBSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WASM() 0
+ #elif defined(__APPLE__)
+@@ -36,22 +37,25 @@
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WASM() 0
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__FreeBSD__)
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MACOSX() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 1
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_FREEBSD() 1
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WASM() 0
+ #elif defined(_WIN32)
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MACOSX() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_FREEBSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 1
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WASM() 0
+ #elif defined(__EMSCRIPTEN__)
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_ANDROID() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_MACOSX() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_LINUX() 0
++#define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_FREEBSD() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WIN() 0
+ #define PERFETTO_BUILDFLAG_DEFINE_PERFETTO_OS_WASM() 1
+ #else
diff --git a/www/chromium/files/patch-third_party_perfetto_include_perfetto_base_watchdog_posix.h b/www/chromium/files/patch-third_party_perfetto_include_perfetto_base_watchdog_posix.h
new file mode 100644
index 000000000000..2e3d4b9571f8
--- /dev/null
+++ b/www/chromium/files/patch-third_party_perfetto_include_perfetto_base_watchdog_posix.h
@@ -0,0 +1,11 @@
+--- third_party/perfetto/include/perfetto/base/watchdog_posix.h.orig 2018-08-04 21:15:43.145900000 +0200
++++ third_party/perfetto/include/perfetto/base/watchdog_posix.h 2018-08-04 21:16:02.944049000 +0200
+@@ -45,7 +45,7 @@
+ Timer(const Timer&) = delete;
+ Timer& operator=(const Timer&) = delete;
+
+- timer_t timerid_ = nullptr;
++ timer_t timerid_ = 0;
+ };
+ virtual ~Watchdog();
+
diff --git a/www/chromium/files/patch-third_party_perfetto_src_base_unix_task_runner.cc b/www/chromium/files/patch-third_party_perfetto_src_base_unix_task_runner.cc
new file mode 100644
index 000000000000..7c7182f4d533
--- /dev/null
+++ b/www/chromium/files/patch-third_party_perfetto_src_base_unix_task_runner.cc
@@ -0,0 +1,11 @@
+--- third_party/perfetto/src/base/unix_task_runner.cc.orig 2018-08-04 21:17:17.721052000 +0200
++++ third_party/perfetto/src/base/unix_task_runner.cc 2018-08-04 21:17:57.424940000 +0200
+@@ -45,7 +45,7 @@
+ control_read_.reset(pipe_fds[0]);
+ control_write_.reset(pipe_fds[1]);
+
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX)
++#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !PERFETTO_BUILDFLAG(PERFETTO_OS_FREEBSD)
+ // We are never expecting to have more than a few bytes in the wake-up pipe.
+ // Reduce the buffer size on Linux. Note that this gets rounded up to the page
+ // size.
diff --git a/www/chromium/files/patch-third_party_perfetto_src_tracing_core_service_impl.cc b/www/chromium/files/patch-third_party_perfetto_src_tracing_core_service_impl.cc
new file mode 100644
index 000000000000..8dd87d8eb725
--- /dev/null
+++ b/www/chromium/files/patch-third_party_perfetto_src_tracing_core_service_impl.cc
@@ -0,0 +1,11 @@
+--- third_party/perfetto/src/tracing/core/service_impl.cc.orig 2018-08-04 21:18:16.978067000 +0200
++++ third_party/perfetto/src/tracing/core/service_impl.cc 2018-08-04 21:18:54.197576000 +0200
+@@ -1041,7 +1041,7 @@
+ protos::TrustedPacket packet;
+ protos::ClockSnapshot* clock_snapshot = packet.mutable_clock_snapshot();
+
+-#if !PERFETTO_BUILDFLAG(PERFETTO_OS_MACOSX) && !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
++#if !PERFETTO_BUILDFLAG(PERFETTO_OS_MACOSX) && !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) && !PERFETTO_BUILDFLAG(PERFETTO_OS_FREEBSD)
+ struct {
+ clockid_t id;
+ protos::ClockSnapshot::Clock::Type type;
diff --git a/www/chromium/files/patch-ui_gfx_BUILD.gn b/www/chromium/files/patch-ui_gfx_BUILD.gn
new file mode 100644
index 000000000000..1ceeeae8c293
--- /dev/null
+++ b/www/chromium/files/patch-ui_gfx_BUILD.gn
@@ -0,0 +1,11 @@
+--- ui/gfx/BUILD.gn.orig 2018-08-01 00:09:48.000000000 +0200
++++ ui/gfx/BUILD.gn 2018-08-04 22:24:28.133674000 +0200
+@@ -568,7 +568,7 @@
+ deps += [ "//third_party/libdrm" ]
+ }
+
+- if (is_linux || is_android) {
++ if ((is_linux || is_android) && !is_bsd) {
+ deps += [ "//third_party/libsync" ]
+ }
+
diff --git a/www/chromium/files/patch-ui_gl_BUILD.gn b/www/chromium/files/patch-ui_gl_BUILD.gn
index 9ad258c4f7f2..d4258fc0e7a2 100644
--- a/www/chromium/files/patch-ui_gl_BUILD.gn
+++ b/www/chromium/files/patch-ui_gl_BUILD.gn
@@ -1,14 +1,23 @@
---- ui/gl/BUILD.gn.orig 2017-12-30 03:59:07.267974000 +0100
-+++ ui/gl/BUILD.gn 2017-12-30 03:59:58.156283000 +0100
-@@ -261,7 +261,6 @@
+--- ui/gl/BUILD.gn.orig 2018-08-01 00:09:48.000000000 +0200
++++ ui/gl/BUILD.gn 2018-08-04 23:32:57.498139000 +0200
+@@ -214,7 +214,7 @@
+ }
+ }
+
+- if (is_posix && !is_fuchsia && !is_mac) {
++ if (is_posix && !is_fuchsia && !is_mac && !is_bsd) {
+ # Windows has USE_EGL but doesn't support base::FileDescriptor.
+ # libsync isn't supported or needed on MacOSX.
+ # Fuchsia is excluded due to a libsync dependency and because it's
+@@ -311,7 +311,6 @@
data_deps += [
"//third_party/angle:libEGL",
"//third_party/angle:libGLESv2",
- "//third_party/mesa:osmesa",
"//third_party/swiftshader",
]
-
-@@ -434,10 +433,6 @@
+ }
+@@ -545,10 +544,6 @@
"//ui/gl/init",
"//ui/platform_window",
"//ui/platform_window:platform_impls",
@@ -17,5 +26,5 @@
- data_deps = [
- "//third_party/mesa:osmesa",
]
- }
+ if (use_x11) {
diff --git a/www/chromium/files/patch-ui_gl_gl_fence.cc b/www/chromium/files/patch-ui_gl_gl_fence.cc
new file mode 100644
index 000000000000..ecec80c3e6eb
--- /dev/null
+++ b/www/chromium/files/patch-ui_gl_gl_fence.cc
@@ -0,0 +1,11 @@
+--- ui/gl/gl_fence.cc.orig 2018-08-04 21:33:30.691170000 +0200
++++ ui/gl/gl_fence.cc 2018-08-04 21:33:47.409485000 +0200
+@@ -19,7 +19,7 @@
+ #endif
+
+ #if defined(USE_EGL) && defined(OS_POSIX) && !defined(OS_FUCHSIA) && \
+- !defined(OS_MACOSX)
++ !defined(OS_MACOSX) && !defined(OS_FREEBSD)
+ #define USE_GL_FENCE_ANDROID_NATIVE_FENCE_SYNC
+ #include "ui/gl/gl_fence_android_native_fence_sync.h"
+ #include "ui/gl/gl_surface_egl.h"
diff --git a/www/chromium/files/patch-ui_gl_gl_implementation.cc b/www/chromium/files/patch-ui_gl_gl_implementation.cc
index a37ed2303af3..7fd77e2c0819 100644
--- a/www/chromium/files/patch-ui_gl_gl_implementation.cc
+++ b/www/chromium/files/patch-ui_gl_gl_implementation.cc
@@ -1,11 +1,11 @@
---- ui/gl/gl_implementation.cc.orig 2017-12-24 20:24:43.427221000 +0100
-+++ ui/gl/gl_implementation.cc 2017-12-24 20:25:40.159567000 +0100
-@@ -104,7 +104,7 @@
- }
+--- ui/gl/gl_implementation.cc.orig 2018-08-01 00:09:48.000000000 +0200
++++ ui/gl/gl_implementation.cc 2018-08-04 21:27:12.545235000 +0200
+@@ -123,7 +123,7 @@
GLImplementation GetSoftwareGLImplementation() {
--#if (defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)))
-+#if (defined(OS_WIN) || ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)))
+ #if (defined(OS_WIN) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)) || \
++ ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)) || \
+ (defined(OS_MACOSX) && defined(USE_EGL)))
return kGLImplementationSwiftShaderGL;
#else
- return kGLImplementationOSMesaGL;
diff --git a/www/chromium/files/patch-v8_BUILD.gn b/www/chromium/files/patch-v8_BUILD.gn
index cc46065ca9fb..0d82e1daa68b 100644
--- a/www/chromium/files/patch-v8_BUILD.gn
+++ b/www/chromium/files/patch-v8_BUILD.gn
@@ -1,7 +1,16 @@
---- v8/BUILD.gn.orig 2017-06-05 19:04:29 UTC
-+++ v8/BUILD.gn
-@@ -2455,7 +2455,7 @@ v8_component("v8_libbase") {
+--- v8/BUILD.gn.orig 2018-08-01 00:10:59.000000000 +0200
++++ v8/BUILD.gn 2018-08-05 12:16:07.941632000 +0200
+@@ -2529,7 +2529,7 @@
+ "src/x64/simulator-x64.h",
+ "src/x64/sse-instr.h",
]
+- if (is_linux) {
++ if (is_linux && !is_bsd) {
+ sources += [
+ "src/trap-handler/handler-inside-linux.cc",
+ "src/trap-handler/handler-outside-linux.cc",
+@@ -2875,7 +2875,7 @@
+ }
}
- if (is_linux) {
@@ -9,7 +18,7 @@
sources += [
"src/base/debug/stack_trace_posix.cc",
"src/base/platform/platform-linux.cc",
-@@ -2465,6 +2465,12 @@ v8_component("v8_libbase") {
+@@ -2895,6 +2895,12 @@
"dl",
"rt",
]
@@ -22,7 +31,7 @@
} else if (is_android) {
if (current_toolchain == host_toolchain) {
libs = [
-@@ -2598,6 +2604,7 @@ if (current_toolchain == v8_snapshot_toolchain) {
+@@ -3064,6 +3070,7 @@
sources = [
"src/snapshot/mksnapshot.cc",
]
diff --git a/www/chromium/files/patch-v8_src_globals.h b/www/chromium/files/patch-v8_src_globals.h
deleted file mode 100644
index c0ea55a4364e..000000000000
--- a/www/chromium/files/patch-v8_src_globals.h
+++ /dev/null
@@ -1,14 +0,0 @@
---- v8/src/globals.h.orig 2018-03-20 23:06:56.000000000 +0100
-+++ v8/src/globals.h 2018-03-24 19:21:33.728280000 +0100
-@@ -195,7 +195,11 @@
- constexpr size_t kMaximalCodeRangeSize = 512 * MB;
- constexpr size_t kCodeRangeAreaAlignment = 64 * KB; // OS page on PPC Linux
- #else
-+#if defined(__FreeBSD__)
- constexpr size_t kMaximalCodeRangeSize = 512 * MB;
-+#else
-+constexpr size_t kMaximalCodeRangeSize = 512 * MB;
-+#endif
- constexpr size_t kCodeRangeAreaAlignment = 4 * KB; // OS page.
- #endif
- #if V8_OS_WIN
diff --git a/www/chromium/files/patch-v8_src_trap-handler_handler-inside.cc b/www/chromium/files/patch-v8_src_trap-handler_handler-inside.cc
deleted file mode 100644
index 6bc21316965f..000000000000
--- a/www/chromium/files/patch-v8_src_trap-handler_handler-inside.cc
+++ /dev/null
@@ -1,16 +0,0 @@
---- v8/src/trap-handler/handler-inside.cc.orig 2017-06-27 01:24:28.401955000 +0200
-+++ v8/src/trap-handler/handler-inside.cc 2017-06-27 01:25:16.190737000 +0200
-@@ -36,11 +36,13 @@
-
- namespace {
-
-+#if V8_TRAP_HANDLER_SUPPORTED && V8_OS_LINUX
- bool IsKernelGeneratedSignal(siginfo_t* info) {
- return info->si_code > 0 && info->si_code != SI_USER &&
- info->si_code != SI_QUEUE && info->si_code != SI_TIMER &&
- info->si_code != SI_ASYNCIO && info->si_code != SI_MESGQ;
- }
-+#endif
-
- #if V8_TRAP_HANDLER_SUPPORTED
- class SigUnmaskStack {
diff --git a/www/chromium/files/sndio_input.cc b/www/chromium/files/sndio_input.cc
index 3cf19a8a2d6d..4a00d8ac1083 100644
--- a/www/chromium/files/sndio_input.cc
+++ b/www/chromium/files/sndio_input.cc
@@ -15,11 +15,13 @@
namespace media {
+static const SampleFormat kSampleFormat = kSampleFormatS16;
+
void sndio_in_onmove(void *arg, int delta) {
NOTIMPLEMENTED();
SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
- self->hw_delay_ = delta - self->params_.GetBytesPerFrame();
+ self->hw_delay_ = delta - self->params_.GetBytesPerFrame(kSampleFormat);
}
void *sndio_in_threadstart(void *arg) {
@@ -36,9 +38,7 @@ SndioAudioInputStream::SndioAudioInputStream(AudioManagerBase* audio_manager,
: audio_manager_(audio_manager),
device_name_(device_name),
params_(params),
- bytes_per_buffer_(params.frames_per_buffer() *
- (params.channels() * params.bits_per_sample()) /
- 8),
+ bytes_per_buffer_(params.GetBytesPerBuffer(kSampleFormat)),
buffer_duration_(base::TimeDelta::FromMicroseconds(
params.frames_per_buffer() * base::Time::kMicrosecondsPerSecond /
static_cast<float>(params.sample_rate()))),
@@ -66,7 +66,7 @@ bool SndioAudioInputStream::Open() {
sio_initpar(&par);
par.rate = params_.sample_rate();
par.pchan = params_.channels();
- par.bits = params_.bits_per_sample();
+ par.bits = SampleFormatToBytesPerChannel(kSampleFormat);
par.bps = par.bits / 8;
par.sig = sig = par.bits != 8 ? 1 : 0;
par.le = SIO_LE_NATIVE;
@@ -88,7 +88,7 @@ bool SndioAudioInputStream::Open() {
if (par.rate != (unsigned int)params_.sample_rate() ||
par.pchan != (unsigned int)params_.channels() ||
- par.bits != (unsigned int)params_.bits_per_sample() ||
+ par.bits != (unsigned int)SampleFormatToBytesPerChannel(kSampleFormat) ||
par.sig != (unsigned int)sig ||
(par.bps > 1 && par.le != SIO_LE_NATIVE) ||
(par.bits != par.bps * 8)) {
@@ -162,4 +162,9 @@ bool SndioAudioInputStream::IsMuted() {
return false;
}
+void SndioAudioInputStream::SetOutputDeviceForAec(
+ const std::string& output_device_id) {
+// Not supported. Do nothing.
+}
+
} // namespace media
diff --git a/www/chromium/files/sndio_input.h b/www/chromium/files/sndio_input.h
index b354f66fd55a..2f3fca97a3a3 100644
--- a/www/chromium/files/sndio_input.h
+++ b/www/chromium/files/sndio_input.h
@@ -59,6 +59,7 @@ class SndioAudioInputStream : public AgcAudioStream<AudioInputStream> {
void SetVolume(double volume) override;
double GetVolume() override;
bool IsMuted() override;
+ void SetOutputDeviceForAec(const std::string& output_device_id) override;
// C-linkage call-backs are friends to access private data
friend void sndio_in_onmove(void *arg, int delta);
diff --git a/www/chromium/files/sndio_output.cc b/www/chromium/files/sndio_output.cc
index 27c6c1db285a..e9053d34b8aa 100644
--- a/www/chromium/files/sndio_output.cc
+++ b/www/chromium/files/sndio_output.cc
@@ -11,6 +11,8 @@
namespace media {
+static const SampleFormat kSampleFormat = kSampleFormatS16;
+
void sndio_onmove(void *arg, int delta) {
SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
@@ -35,7 +37,7 @@ SndioAudioOutputStream::SndioAudioOutputStream(const AudioParameters& params,
: manager(manager),
params(params),
audio_bus(AudioBus::Create(params)),
- bytes_per_frame(params.GetBytesPerFrame()),
+ bytes_per_frame(params.GetBytesPerFrame(kSampleFormat)),
state(kClosed),
mutex(PTHREAD_MUTEX_INITIALIZER) {
}
@@ -57,7 +59,7 @@ bool SndioAudioOutputStream::Open() {
sio_initpar(&par);
par.rate = params.sample_rate();
par.pchan = params.channels();
- par.bits = params.bits_per_sample();
+ par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
par.bps = par.bits / 8;
par.sig = sig = par.bits != 8 ? 1 : 0;
par.le = SIO_LE_NATIVE;
@@ -74,7 +76,7 @@ bool SndioAudioOutputStream::Open() {
}
if (par.rate != (unsigned int)params.sample_rate() ||
par.pchan != (unsigned int)params.channels() ||
- par.bits != (unsigned int)params.bits_per_sample() ||
+ par.bits != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
par.sig != (unsigned int)sig ||
(par.bps > 1 && par.le != SIO_LE_NATIVE) ||
(par.bits != par.bps * 8)) {
@@ -84,7 +86,7 @@ bool SndioAudioOutputStream::Open() {
state = kStopped;
volpending = 0;
vol = 0;
- buffer = new char[audio_bus->frames() * params.GetBytesPerFrame()];
+ buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
sio_onmove(hdl, sndio_onmove, this);
sio_onvol(hdl, sndio_onvol, this);
return true;
@@ -153,16 +155,16 @@ void SndioAudioOutputStream::RealTimeThread(void) {
// Get data to play
const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay, params.sample_rate() * 1000);
count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get());
- audio_bus->ToInterleaved(count, params.bits_per_sample() / 8, buffer);
+ audio_bus->ToInterleaved(count, SampleFormatToBytesPerChannel(kSampleFormat), buffer);
if (count == 0) {
// We have to submit something to the device
count = audio_bus->frames();
- memset(buffer, 0, count * params.GetBytesPerFrame());
+ memset(buffer, 0, count * params.GetBytesPerFrame(kSampleFormat));
LOG(WARNING) << "No data to play, running empty cycle.";
}
// Submit data to the device
- avail = count * params.GetBytesPerFrame();
+ avail = count * params.GetBytesPerFrame(kSampleFormat);
count = sio_write(hdl, buffer, avail);
if (count == 0) {
LOG(WARNING) << "Audio device disconnected.";
diff --git a/www/chromium/pkg-message b/www/chromium/pkg-message
index 4de99f403f42..c727ec8a4fdb 100644
--- a/www/chromium/pkg-message
+++ b/www/chromium/pkg-message
@@ -1,23 +1,21 @@
--I--
For correct operation, shared memory support has to be enabled
-in Chromium by performing the following command as root :
+in Chromium by performing the following command as root:
-# sysctl kern.ipc.shm_allow_removed=1
+ # sysctl kern.ipc.shm_allow_removed=1
To preserve this setting across reboots, append the following
-to /etc/sysctl.conf :
+to /etc/sysctl.conf:
-kern.ipc.shm_allow_removed=1
+ kern.ipc.shm_allow_removed=1
-FreeBSD 11.0-R and newer have this set by default.
+FreeBSD 11.0-RELEASE and newer have this set by default.
--II--
Chromium has a known problem of hanging tabs. The workaround
for this problem is to mount ~/.cache/chromium as memory-fs.
-In order to do this, before you run chromium, please run these
-commands once as root for each user who uses chromium (replace
-{user}/{group} with your user/group names):
+In order to do this, before you run Chromium, please run the
+following script as root once for each user who uses Chromium
+(replace {user}/{group} with your user/group names):
-# [ -d ~{user}/.cache/chromium ] || mkdir ~{user}/.cache/chromium
-# echo "md $(echo ~{user})/.cache/chromium mfs rw,late,-w{user}:{group},-s300m 2 0" >> /etc/fstab
-# mount ~{user}/.cache/chromium
+ # %%DATADIR%%/fix-hanging-tabs.sh {user} {group}
diff --git a/www/chromium/pkg-plist b/www/chromium/pkg-plist
index 97709523d8ba..8ef71dd510c1 100644
--- a/www/chromium/pkg-plist
+++ b/www/chromium/pkg-plist
@@ -3,6 +3,7 @@ bin/chrome
%%DATADIR%%/chrome-wrapper
%%DATADIR%%/chrome_100_percent.pak
%%DATADIR%%/chrome_200_percent.pak
+%%DATADIR%%/fix-hanging-tabs.sh
%%DATADIR%%/font_service.service
%%DATADIR%%/headless_lib.pak
%%DATADIR%%/icudtl.dat
@@ -185,6 +186,7 @@ bin/chrome
%%DATADIR%%/resources/inspector/InspectorBackendCommands.js
%%DATADIR%%/resources/inspector/SupportedCSSProperties.js
%%DATADIR%%/resources/inspector/Tests.js
+%%DATADIR%%/resources/inspector/accessibility/ARIAProperties.js
%%DATADIR%%/resources/inspector/accessibility/accessibility_module.js
%%DATADIR%%/resources/inspector/accessibility_test_runner/accessibility_test_runner_module.js
%%DATADIR%%/resources/inspector/animation/animation_module.js
@@ -269,6 +271,7 @@ bin/chrome
%%DATADIR%%/resources/inspector/inspector.js
%%DATADIR%%/resources/inspector/integration_test_runner.html
%%DATADIR%%/resources/inspector/integration_test_runner.js
+%%DATADIR%%/resources/inspector/javascript_metadata/javascript_metadata_module.js
%%DATADIR%%/resources/inspector/js_app.html
%%DATADIR%%/resources/inspector/js_app.js
%%DATADIR%%/resources/inspector/js_profiler/js_profiler_module.js