MFH: r475101
www/chromium: update to 67.0.3396.87 Changelog: https://chromium.googlesource.com/chromium/src/+log/65.0.3325.181..67.0.3396.87?pretty=fuller&n=10000 Security: https://vuxml.freebsd.org/freebsd/36ff7a74-47b1-11e8-a7d6-54e1ad544088.html Security: https://vuxml.freebsd.org/freebsd/006bee4e-4c49-11e8-9c32-54ee754af08e.html Security: https://vuxml.freebsd.org/freebsd/e457978b-5484-11e8-9b85-54ee754af08e.html Security: https://vuxml.freebsd.org/freebsd/427b0f58-644c-11e8-9e1b-e8e0b747a45a.html Security: https://vuxml.freebsd.org/freebsd/4cb49a23-6c89-11e8-8b33-e8e0b747a45a.html Approved by: ports-secteam (miwi)
This commit is contained in:
parent
8b35960b5b
commit
1a3c107985
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/branches/2018Q3/; revision=475158
|
@ -2,8 +2,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= chromium
|
||||
PORTVERSION= 65.0.3325.181
|
||||
PORTREVISION= 6
|
||||
PORTVERSION= 67.0.3396.87
|
||||
CATEGORIES?= www
|
||||
MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
|
||||
|
@ -19,7 +18,8 @@ BUILD_DEPENDS= bash:shells/bash \
|
|||
${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \
|
||||
|
||||
.if !defined(GN_ONLY)
|
||||
BUILD_DEPENDS+= gperf:devel/gperf \
|
||||
BUILD_DEPENDS+= git:devel/git \
|
||||
gperf:devel/gperf \
|
||||
yasm:devel/yasm \
|
||||
ffmpeg>=3.2.2,1:multimedia/ffmpeg \
|
||||
flock:sysutils/flock \
|
||||
|
@ -49,7 +49,6 @@ LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \
|
|||
libpng.so:graphics/png \
|
||||
libwebp.so:graphics/webp \
|
||||
libavcodec.so:multimedia/ffmpeg \
|
||||
libvpx.so:multimedia/libvpx \
|
||||
libopenh264.so:multimedia/openh264 \
|
||||
libfreetype.so:print/freetype2 \
|
||||
libharfbuzz.so:print/harfbuzz \
|
||||
|
@ -121,7 +120,6 @@ GN_ARGS+= clang_use_chrome_plugins=false \
|
|||
use_system_freetype=true \
|
||||
use_system_harfbuzz=true \
|
||||
use_system_libjpeg=true \
|
||||
use_system_sqlite=false \
|
||||
extra_cxxflags="-I${LOCALBASE}/include" \
|
||||
extra_ldflags="-L${LOCALBASE}/lib"
|
||||
# TODO: investigate building with these options:
|
||||
|
@ -243,7 +241,7 @@ pre-configure:
|
|||
#./build/linux/unbundle/remove_bundled_libraries.py [list of preserved]
|
||||
cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \
|
||||
./build/linux/unbundle/replace_gn_files.py --system-libraries \
|
||||
ffmpeg flac freetype harfbuzz-ng libdrm libvpx libwebp libxml libxslt openh264 opus snappy yasm || ${FALSE}
|
||||
ffmpeg flac freetype harfbuzz-ng libdrm libusb libwebp libxml libxslt openh264 opus snappy yasm || ${FALSE}
|
||||
.endif
|
||||
|
||||
do-configure:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
TIMESTAMP = 1521889794
|
||||
SHA256 (chromium-65.0.3325.181.tar.xz) = 93666448c6b96ec83e6a35a64cff40db4eb92a154fe1db4e7dab4761d0e38687
|
||||
SIZE (chromium-65.0.3325.181.tar.xz) = 570386836
|
||||
SHA256 (chromium-65.0.3325.181-testdata.tar.xz) = 03018143ffe8c96ca2710e0c48bb19f1e122cf07394f15b73a814c2f6b2a3cdb
|
||||
SIZE (chromium-65.0.3325.181-testdata.tar.xz) = 252462976
|
||||
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
|
||||
|
|
|
@ -167,10 +167,10 @@ std::unique_ptr<media::AudioManager> CreateAudioManager(
|
|||
DLOG(WARNING) << "CreateAudioManager";
|
||||
#if defined(USE_SNDIO)
|
||||
UMA_HISTOGRAM_ENUMERATION("Media.OpenBSDAudioIO", kSndio, kAudioIOMax + 1);
|
||||
return base::MakeUnique<AudioManagerOpenBSD>(std::move(audio_thread),
|
||||
return std::make_unique<AudioManagerOpenBSD>(std::move(audio_thread),
|
||||
audio_log_factory);
|
||||
#else
|
||||
return base::MakeUnique<FakeAudioManager>(std::move(audio_thread),
|
||||
return std::make_unique<FakeAudioManager>(std::move(audio_thread),
|
||||
audio_log_factory);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -43,3 +43,79 @@
|
|||
|
||||
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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- build/toolchain/gcc_toolchain.gni.orig 2017-06-05 19:03:01 UTC
|
||||
+++ build/toolchain/gcc_toolchain.gni
|
||||
@@ -19,6 +19,11 @@ analyzer_wrapper =
|
||||
--- build/toolchain/gcc_toolchain.gni.orig 2018-06-13 00:10:02.000000000 +0200
|
||||
+++ build/toolchain/gcc_toolchain.gni 2018-07-21 12:38:45.107087000 +0200
|
||||
@@ -25,6 +25,11 @@
|
||||
rebase_path("//build/toolchain/clang_static_analyzer_wrapper.py",
|
||||
root_build_dir) + " --mode=clang"
|
||||
|
||||
|
@ -12,7 +12,22 @@
|
|||
# This template defines a toolchain for something that works like gcc
|
||||
# (including clang).
|
||||
#
|
||||
@@ -548,13 +553,22 @@ template("clang_toolchain") {
|
||||
@@ -343,12 +348,12 @@
|
||||
# We use slightly different arflags for AIX.
|
||||
extra_arflags = "-r -c -s"
|
||||
} else {
|
||||
- extra_arflags = "-r -c -s -D"
|
||||
+ extra_arflags = "rcsD"
|
||||
}
|
||||
|
||||
# Almost all targets build with //build/config/compiler:thin_archive which
|
||||
# adds -T to arflags.
|
||||
- command = "$python_path \"$ar_wrapper\"$whitelist_flag --output={{output}} --ar=\"$ar\" \"{{arflags}} $extra_arflags\" @\"$rspfile\""
|
||||
+ command = "$python_path \"$ar_wrapper\"$whitelist_flag --output={{output}} --ar=\"$ar\" {{arflags}} $extra_arflags @\"$rspfile\""
|
||||
description = "AR {{output}}"
|
||||
rspfile_content = "{{inputs}}"
|
||||
outputs = [
|
||||
@@ -608,13 +613,22 @@
|
||||
}
|
||||
|
||||
gcc_toolchain(target_name) {
|
||||
|
@ -42,3 +57,92 @@
|
|||
|
||||
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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- BUILD.gn.orig 2018-02-24 16:25:08.000000000 +0100
|
||||
+++ BUILD.gn 2018-03-03 19:04:30.972689000 +0100
|
||||
@@ -361,7 +361,7 @@
|
||||
--- BUILD.gn.orig 2018-06-13 00:09:58.000000000 +0200
|
||||
+++ BUILD.gn 2018-07-14 12:26:56.482016000 +0200
|
||||
@@ -359,7 +359,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,16 +9,16 @@
|
|||
deps += [
|
||||
"//third_party/breakpad:breakpad_unittests",
|
||||
"//third_party/breakpad:core-2-minidump",
|
||||
@@ -406,8 +406,6 @@
|
||||
@@ -401,8 +401,6 @@
|
||||
"//net:disk_cache_memory_test",
|
||||
"//net:quic_client",
|
||||
"//net:quic_server",
|
||||
- "//sandbox/linux:chrome_sandbox",
|
||||
- "//sandbox/linux:sandbox_linux_unittests",
|
||||
"//testing:empty_main",
|
||||
]
|
||||
|
||||
if (use_dbus) {
|
||||
@@ -464,10 +462,6 @@
|
||||
@@ -460,10 +458,6 @@
|
||||
"//chrome/test/chromedriver:chromedriver",
|
||||
"//chrome/test/chromedriver:chromedriver_tests",
|
||||
"//components/sync:run_sync_testserver",
|
||||
|
@ -29,8 +29,8 @@
|
|||
"//media/cast:generate_barcode_video",
|
||||
"//media/cast:generate_timecode_audio",
|
||||
"//net:crash_cache",
|
||||
@@ -522,10 +516,6 @@
|
||||
"//mojo/edk/test:mojo_public_system_perftests",
|
||||
@@ -519,10 +513,6 @@
|
||||
"//mojo:mojo_perftests",
|
||||
"//services/service_manager/public/cpp",
|
||||
"//testing/gmock:gmock_main",
|
||||
- "//third_party/breakpad:dump_syms($host_toolchain)",
|
||||
|
@ -40,16 +40,16 @@
|
|||
]
|
||||
|
||||
if (!is_android) {
|
||||
@@ -593,7 +583,7 @@
|
||||
deps +=
|
||||
[ "//chrome/installer/mini_installer:next_version_mini_installer" ]
|
||||
@@ -598,7 +588,7 @@
|
||||
host_os == "win") {
|
||||
deps += [ "//chrome/test/mini_installer:mini_installer_tests" ]
|
||||
}
|
||||
- } else if (!is_android && !is_ios && !is_fuchsia) {
|
||||
+ } else if (!is_android && !is_ios && !is_fuchsia && !is_bsd) {
|
||||
deps += [ "//third_party/breakpad:symupload($host_toolchain)" ]
|
||||
}
|
||||
|
||||
@@ -835,7 +825,6 @@
|
||||
@@ -818,7 +808,6 @@
|
||||
"//ppapi/examples/video_decode",
|
||||
"//sandbox/linux:chrome_sandbox",
|
||||
"//sandbox/linux:sandbox_linux_unittests",
|
||||
|
@ -57,7 +57,7 @@
|
|||
|
||||
# Blocked on https://github.com/catapult-project/catapult/issues/2297
|
||||
#"//third_party/catapult/telemetry:bitmaptools",
|
||||
@@ -939,7 +928,7 @@
|
||||
@@ -921,7 +910,7 @@
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
|||
data_deps +=
|
||||
[ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
|
||||
}
|
||||
@@ -948,7 +937,7 @@
|
||||
@@ -930,7 +919,7 @@
|
||||
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@
|
|||
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
|
||||
}
|
||||
|
||||
@@ -1064,9 +1053,6 @@
|
||||
@@ -1055,9 +1044,6 @@
|
||||
|
||||
if (is_win) {
|
||||
data_deps += [ "//chrome/installer/mini_installer:mini_installer" ]
|
||||
|
@ -84,4 +84,4 @@
|
|||
- [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
|
||||
}
|
||||
if (is_win || is_android) {
|
||||
data_deps += [ "//chrome/test:angle_perftests" ]
|
||||
data_deps += [
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
--- base/files/file_path_watcher_stub.cc.orig 2018-07-19 23:00:07.807326000 +0200
|
||||
+++ base/files/file_path_watcher_stub.cc 2018-07-19 23:05:24.785603000 +0200
|
||||
@@ -1,14 +1,15 @@
|
||||
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
+// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
-// This file exists for Unix systems which don't have the inotify headers, and
|
||||
-// thus cannot build file_watcher_inotify.cc
|
||||
|
||||
-#include "base/files/file_path_watcher.h"
|
||||
+#include <memory>
|
||||
|
||||
+#include "base/files/file_path_watcher.h"
|
||||
+#include "base/files/file_path_watcher_kqueue.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
+#include "build/build_config.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
@@ -22,12 +23,26 @@
|
||||
bool Watch(const FilePath& path,
|
||||
bool recursive,
|
||||
const FilePathWatcher::Callback& callback) override {
|
||||
- return false;
|
||||
+ DCHECK(!impl_.get());
|
||||
+ if (recursive) {
|
||||
+ if (!FilePathWatcher::RecursiveWatchAvailable())
|
||||
+ return false;
|
||||
+ } else {
|
||||
+ impl_ = std::make_unique<FilePathWatcherKQueue>();
|
||||
+ }
|
||||
+ DCHECK(impl_.get());
|
||||
+ return impl_->Watch(path, recursive, callback);
|
||||
}
|
||||
|
||||
- void Cancel() override {}
|
||||
+ void Cancel() override {
|
||||
+ if (impl_.get())
|
||||
+ impl_->Cancel();
|
||||
+ set_cancelled();
|
||||
+ }
|
||||
|
||||
private:
|
||||
+ std::unique_ptr<PlatformDelegate> impl_;
|
||||
+
|
||||
DISALLOW_COPY_AND_ASSIGN(FilePathWatcherImpl);
|
||||
};
|
||||
|
11
www/chromium/files/patch-base_process_kill.h
Normal file
11
www/chromium/files/patch-base_process_kill.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- base/process/kill.h.orig 2018-07-19 22:11:43.638992000 +0200
|
||||
+++ base/process/kill.h 2018-07-19 22:12:06.613065000 +0200
|
||||
@@ -111,7 +111,7 @@
|
||||
BASE_EXPORT TerminationStatus GetKnownDeadTerminationStatus(
|
||||
ProcessHandle handle, int* exit_code);
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
// Spawns a thread to wait asynchronously for the child |process| to exit
|
||||
// and then reaps it.
|
||||
BASE_EXPORT void EnsureProcessGetsReaped(Process process);
|
11
www/chromium/files/patch-base_process_kill_posix.cc
Normal file
11
www/chromium/files/patch-base_process_kill_posix.cc
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- base/process/kill_posix.cc.orig 2018-07-19 22:11:49.327358000 +0200
|
||||
+++ base/process/kill_posix.cc 2018-07-19 22:12:22.837132000 +0200
|
||||
@@ -167,7 +167,7 @@
|
||||
0, new BackgroundReaper(std::move(process), TimeDelta::FromSeconds(2)));
|
||||
}
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
void EnsureProcessGetsReaped(Process process) {
|
||||
DCHECK(!process.is_current());
|
||||
|
11
www/chromium/files/patch-base_process_process__handle.cc
Normal file
11
www/chromium/files/patch-base_process_process__handle.cc
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- base/process/process_handle.cc.orig 2018-07-19 22:31:30.212555000 +0200
|
||||
+++ base/process/process_handle.cc 2018-07-19 22:32:27.185612000 +0200
|
||||
@@ -39,7 +39,7 @@
|
||||
return g_unique_id;
|
||||
}
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_AIX)
|
||||
+#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
|
||||
|
||||
void InitUniqueIdForProcessInPidNamespace(ProcessId pid_outside_of_namespace) {
|
||||
g_unique_id = MangleProcessId(pid_outside_of_namespace);
|
11
www/chromium/files/patch-base_process_process__handle.h
Normal file
11
www/chromium/files/patch-base_process_process__handle.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- base/process/process_handle.h.orig 2018-07-19 22:31:39.988330000 +0200
|
||||
+++ base/process/process_handle.h 2018-07-19 22:32:06.977544000 +0200
|
||||
@@ -64,7 +64,7 @@
|
||||
// a process's PID.
|
||||
BASE_EXPORT uint32_t GetUniqueIdForProcess();
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
// When a process is started in a different PID namespace from the browser
|
||||
// process, this function must be called with the process's PID in the browser's
|
||||
// PID namespace in order to initialize its unique ID. Not thread safe.
|
|
@ -1,8 +1,8 @@
|
|||
--- base/process/process_metrics_freebsd.cc.orig 2018-02-24 16:25:08.000000000 +0100
|
||||
+++ base/process/process_metrics_freebsd.cc 2018-03-03 19:25:40.067505000 +0100
|
||||
@@ -12,6 +12,10 @@
|
||||
#include "base/macros.h"
|
||||
--- 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"
|
||||
#include "base/process/process_metrics_iocounters.h"
|
||||
|
||||
+#include <unistd.h> /* getpagesize() */
|
||||
+#include <fcntl.h> /* O_RDONLY */
|
||||
|
@ -11,19 +11,7 @@
|
|||
namespace base {
|
||||
|
||||
ProcessMetrics::ProcessMetrics(ProcessHandle process)
|
||||
@@ -25,6 +29,11 @@
|
||||
return WrapUnique(new ProcessMetrics(process));
|
||||
}
|
||||
|
||||
+bool GetVmStatInfo(VmStatInfo* vmstat) {
|
||||
+ NOTIMPLEMENTED();
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
size_t ProcessMetrics::GetPagefileUsage() const {
|
||||
struct kinfo_proc info;
|
||||
int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process_ };
|
||||
@@ -118,6 +127,60 @@
|
||||
@@ -61,6 +65,65 @@
|
||||
pagesize = getpagesize();
|
||||
|
||||
return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
|
||||
|
@ -81,6 +69,11 @@
|
|||
+ meminfo->swap_free = (swap_total - swap_used) * pagesizeKB;
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+uint64_t ProcessMetrics::GetVmSwapBytes() const {
|
||||
+ NOTIMPLEMENTED();
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
} // namespace base
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
--- build/config/allocator.gni.orig 2017-07-25 21:04:48.000000000 +0200
|
||||
+++ build/config/allocator.gni 2017-08-01 23:13:58.535952000 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
--- build/config/allocator.gni.orig 2018-06-13 00:10:02.000000000 +0200
|
||||
+++ build/config/allocator.gni 2018-07-14 13:12:35.947359000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
# Temporarily disable tcmalloc on arm64 linux to get rid of compilation errors.
|
||||
if (is_android || current_cpu == "mipsel" || is_mac || is_ios || is_asan ||
|
||||
is_lsan || is_tsan || is_msan || is_win || is_syzyasan || is_fuchsia ||
|
||||
- (is_linux && target_cpu == "arm64")) {
|
||||
+ (is_linux && target_cpu == "arm64") || is_bsd) {
|
||||
if (is_android || is_mac || is_ios || is_asan || is_lsan || is_tsan ||
|
||||
- is_msan || is_win || is_fuchsia || (is_linux && target_cpu == "arm64")) {
|
||||
+ is_msan || is_win || is_fuchsia || (is_linux && target_cpu == "arm64") || is_bsd) {
|
||||
_default_allocator = "none"
|
||||
} else {
|
||||
_default_allocator = "tcmalloc"
|
||||
@@ -18,7 +18,7 @@
|
||||
@@ -17,7 +17,7 @@
|
||||
# against the debug CRT with "is_nacl=false".
|
||||
if ((is_linux || is_android || is_mac ||
|
||||
(is_win && !is_component_build && !is_debug)) && !is_asan && !is_lsan &&
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
--- build/config/compiler/BUILD.gn.orig 2018-03-20 23:05:14.000000000 +0100
|
||||
+++ build/config/compiler/BUILD.gn 2018-03-24 12:40:43.469299000 +0100
|
||||
@@ -48,7 +48,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)
|
||||
@@ -365,8 +365,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.
|
||||
@@ -469,7 +467,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",
|
||||
@@ -667,7 +665,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" ]
|
||||
}
|
||||
@@ -1317,27 +1315,8 @@
|
||||
# TODO(hans): https://crbug.com/637306
|
||||
"-Wno-address-of-packed-member",
|
||||
|
||||
- # TODO(hans): https://crbug.com/681136
|
||||
- "-Wno-unused-lambda-capture",
|
||||
-
|
||||
# TODO(thakis ): https://crbug.com/683349
|
||||
"-Wno-user-defined-warnings",
|
||||
-
|
||||
- # TODO(thakis): https://crbug.com/753973
|
||||
- "-Wno-enum-compare-switch",
|
||||
-
|
||||
- # TODO(hans): https://crbug.com/763392
|
||||
- "-Wno-tautological-unsigned-zero-compare",
|
||||
-
|
||||
- # TODO(hans): https://crbug.com/766891
|
||||
- "-Wno-null-pointer-arithmetic",
|
||||
-
|
||||
- # TODO(hans): https://crbug.com/767059
|
||||
- # Disable -Wtautological-constant-compare (and implicitly also
|
||||
- # -Wtautological-unsigned-enum-zero-compare), but re-enable
|
||||
- # useful sub-diagnostics in that group.
|
||||
- "-Wno-tautological-constant-compare",
|
||||
- "-Wtautological-constant-out-of-range-compare",
|
||||
]
|
||||
} else if (use_xcode_clang) {
|
||||
cflags += [
|
||||
@@ -1952,7 +1931,7 @@
|
||||
# [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f
|
||||
cflags += [ "-gdwarf-3" ]
|
||||
}
|
||||
- cflags += [ "-g2" ]
|
||||
+ cflags += [ "-g0" ]
|
||||
}
|
||||
if (use_debug_fission && !is_nacl) {
|
||||
cflags += [ "-gsplit-dwarf" ]
|
||||
@@ -1966,7 +1945,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.
|
||||
@@ -2052,7 +2031,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
|
11
www/chromium/files/patch-build_config_linux_BUILD.gn
Normal file
11
www/chromium/files/patch-build_config_linux_BUILD.gn
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- build/config/linux/BUILD.gn.orig 2018-07-19 22:09:59.968726000 +0200
|
||||
+++ build/config/linux/BUILD.gn 2018-07-19 22:10:16.334896000 +0200
|
||||
@@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
if ((!is_chromeos || default_toolchain != "//build/toolchain/cros:target") &&
|
||||
- (!use_custom_libcxx || current_cpu == "mipsel")) {
|
||||
+ (!use_custom_libcxx || current_cpu == "mipsel") && !is_bsd) {
|
||||
libs = [ "atomic" ]
|
||||
}
|
||||
}
|
22
www/chromium/files/patch-build_linux_unbundle_ffmpeg.gn
Normal file
22
www/chromium/files/patch-build_linux_unbundle_ffmpeg.gn
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- build/linux/unbundle/ffmpeg.gn.orig 2018-07-20 01:03:59.604084000 +0200
|
||||
+++ build/linux/unbundle/ffmpeg.gn 2018-07-20 01:04:45.406745000 +0200
|
||||
@@ -14,8 +14,8 @@
|
||||
]
|
||||
}
|
||||
|
||||
-buildflag_header("ffmpeg_buildflags") {
|
||||
- header = "ffmpeg_buildflags.h"
|
||||
+buildflag_header("ffmpeg_features") {
|
||||
+ header = "ffmpeg_features.h"
|
||||
flags = [ "USE_SYSTEM_FFMPEG=true" ]
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
source_set("ffmpeg") {
|
||||
deps = [
|
||||
- ":ffmpeg_buildflags",
|
||||
+ ":ffmpeg_features",
|
||||
":ffmpeg_shim",
|
||||
]
|
||||
public_configs = [ ":system_ffmpeg" ]
|
27
www/chromium/files/patch-build_linux_unbundle_libusb.gn
Normal file
27
www/chromium/files/patch-build_linux_unbundle_libusb.gn
Normal file
|
@ -0,0 +1,27 @@
|
|||
--- build/linux/unbundle/libusb.gn.orig 2018-07-20 03:07:05.793992000 +0200
|
||||
+++ build/linux/unbundle/libusb.gn 2018-07-20 03:07:35.792417000 +0200
|
||||
@@ -0,0 +1,24 @@
|
||||
+# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
+# Use of this source code is governed by a BSD-style license that can be
|
||||
+# found in the LICENSE file.
|
||||
+
|
||||
+import("//build/config/linux/pkg_config.gni")
|
||||
+import("//build/shim_headers.gni")
|
||||
+
|
||||
+pkg_config("system_libusb") {
|
||||
+ packages = [ "libusb-1.0" ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("libusb_shim") {
|
||||
+ root_path = "src/libusb"
|
||||
+ headers = [
|
||||
+ "libusb.h",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+source_set("libusb") {
|
||||
+ deps = [
|
||||
+ ":libusb_shim",
|
||||
+ ]
|
||||
+ public_configs = [ ":system_libusb" ]
|
||||
+}
|
|
@ -0,0 +1,10 @@
|
|||
--- build/linux/unbundle/replace_gn_files.py.orig 2018-07-20 03:07:59.446131000 +0200
|
||||
+++ build/linux/unbundle/replace_gn_files.py 2018-07-20 03:08:31.519350000 +0200
|
||||
@@ -27,6 +27,7 @@
|
||||
'libevent': 'base/third_party/libevent/BUILD.gn',
|
||||
'libjpeg': 'third_party/libjpeg.gni',
|
||||
'libpng': 'third_party/libpng/BUILD.gn',
|
||||
+ 'libusb': 'third_party/libusb/BUILD.gn',
|
||||
'libvpx': 'third_party/libvpx/BUILD.gn',
|
||||
'libwebp': 'third_party/libwebp/BUILD.gn',
|
||||
'libxml': 'third_party/libxml/BUILD.gn',
|
|
@ -1,6 +1,15 @@
|
|||
--- chrome/browser/about_flags.cc.orig 2018-03-20 23:05:16.000000000 +0100
|
||||
+++ chrome/browser/about_flags.cc 2018-03-24 13:04:35.001279000 +0100
|
||||
@@ -2429,12 +2429,12 @@
|
||||
--- 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 @@
|
||||
flag_descriptions::kEnableMaterialDesignExtensionsDescription, kOsDesktop,
|
||||
FEATURE_VALUE_TYPE(features::kMaterialDesignExtensions)},
|
||||
#endif // ENABLE_EXTENSIONS
|
||||
|
@ -15,7 +24,7 @@
|
|||
{"enable-origin-trials", flag_descriptions::kOriginTrialsName,
|
||||
flag_descriptions::kOriginTrialsDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(features::kOriginTrials)},
|
||||
@@ -3047,7 +3047,7 @@
|
||||
@@ -3058,7 +3058,7 @@
|
||||
flag_descriptions::kLeftToRightUrlsDescription, kOsDesktop,
|
||||
FEATURE_VALUE_TYPE(features::kLeftToRightUrls)},
|
||||
|
||||
|
@ -24,7 +33,7 @@
|
|||
{"omnibox-entity-suggestions",
|
||||
flag_descriptions::kOmniboxEntitySuggestionsName,
|
||||
flag_descriptions::kOmniboxEntitySuggestionsDescription, kOsDesktop,
|
||||
@@ -3066,7 +3066,7 @@
|
||||
@@ -3077,7 +3077,7 @@
|
||||
{"enable-new-app-menu-icon", flag_descriptions::kEnableNewAppMenuIconName,
|
||||
flag_descriptions::kEnableNewAppMenuIconDescription, kOsDesktop,
|
||||
FEATURE_VALUE_TYPE(features::kAnimatedAppMenuIcon)},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- chrome/browser/browser_process_impl.cc.orig 2017-12-15 02:04:08.000000000 +0100
|
||||
+++ chrome/browser/browser_process_impl.cc 2017-12-24 00:34:24.918627000 +0100
|
||||
@@ -170,7 +170,7 @@
|
||||
--- chrome/browser/browser_process_impl.cc.orig 2018-06-13 00:10:04.000000000 +0200
|
||||
+++ chrome/browser/browser_process_impl.cc 2018-07-14 13:27:02.197056000 +0200
|
||||
@@ -180,7 +180,7 @@
|
||||
#include "chrome/browser/media/webrtc/webrtc_log_uploader.h"
|
||||
#endif
|
||||
|
||||
|
@ -9,12 +9,12 @@
|
|||
#include "chrome/browser/resource_coordinator/tab_manager.h"
|
||||
#endif
|
||||
|
||||
@@ -813,7 +813,7 @@
|
||||
@@ -856,7 +856,7 @@
|
||||
|
||||
resource_coordinator::TabManager* BrowserProcessImpl::GetTabManager() {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
|
||||
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
|
||||
if (!tab_manager_)
|
||||
tab_manager_ = base::MakeUnique<resource_coordinator::TabManager>();
|
||||
return tab_manager_.get();
|
||||
if (!tab_manager_) {
|
||||
tab_manager_ = std::make_unique<resource_coordinator::TabManager>();
|
||||
tab_lifecycle_unit_source_ =
|
||||
|
|
|
@ -1,24 +1,6 @@
|
|||
--- chrome/browser/browser_resources.grd.orig 2018-02-24 16:25:09.000000000 +0100
|
||||
+++ chrome/browser/browser_resources.grd 2018-03-04 09:28:51.895810000 +0100
|
||||
@@ -77,7 +77,7 @@
|
||||
</if>
|
||||
</structures>
|
||||
<includes>
|
||||
- <if expr="is_win or is_macosx or is_linux">
|
||||
+ <if expr="is_win or is_macosx or is_posix">
|
||||
<include name="IDR_ABOUT_DISCARDS_CSS" file="resources\discards\discards.css" type="BINDATA" />
|
||||
<include name="IDR_ABOUT_DISCARDS_HTML" file="resources\discards\discards.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
|
||||
<include name="IDR_ABOUT_DISCARDS_JS" file="resources\discards\discards.js" type="BINDATA" />
|
||||
@@ -369,7 +369,7 @@
|
||||
<if expr="chromeos">
|
||||
<include name="IDR_PLUGIN_DB_JSON" file="resources\plugin_metadata\plugins_chromeos.json" type="BINDATA" />
|
||||
</if>
|
||||
- <if expr="desktop_linux or (is_android and enable_plugins)">
|
||||
+ <if expr="desktop_linux or (is_android and enable_plugins) or is_posix">
|
||||
<include name="IDR_PLUGIN_DB_JSON" file="resources\plugin_metadata\plugins_linux.json" type="BINDATA" />
|
||||
</if>
|
||||
<if expr="is_android">
|
||||
@@ -619,7 +619,7 @@
|
||||
--- chrome/browser/browser_resources.grd.orig 2018-06-13 00:10:04.000000000 +0200
|
||||
+++ chrome/browser/browser_resources.grd 2018-07-14 13:48:09.392254000 +0200
|
||||
@@ -634,7 +634,7 @@
|
||||
<include name="IDR_WELCOME_WIN10_PIN_WEBP" file="resources\welcome\pin.webp" type="BINDATA" />
|
||||
</if>
|
||||
<include name="IDR_SSL_ERROR_ASSISTANT_PB" file="${root_gen_dir}/chrome/browser/resources/ssl/ssl_error_assistant/ssl_error_assistant.pb" use_base_dir="false" type="BINDATA" />
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- chrome/browser/chrome_browser_main.cc.orig 2018-03-20 23:05:16.000000000 +0100
|
||||
+++ chrome/browser/chrome_browser_main.cc 2018-03-24 22:37:46.110352000 +0100
|
||||
@@ -206,7 +206,7 @@
|
||||
--- chrome/browser/chrome_browser_main.cc.orig 2018-06-13 00:10:04.000000000 +0200
|
||||
+++ chrome/browser/chrome_browser_main.cc 2018-07-14 13:55:52.288113000 +0200
|
||||
@@ -211,7 +211,7 @@
|
||||
#include "chromeos/settings/cros_settings_names.h"
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
|||
#include "chrome/browser/first_run/upgrade_util_linux.h"
|
||||
#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
@@ -251,7 +251,7 @@
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
#if defined(OS_WIN) || defined(OS_MACOSX) || \
|
||||
|
@ -18,8 +18,21 @@
|
|||
#include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h"
|
||||
#endif
|
||||
|
||||
@@ -737,7 +737,7 @@
|
||||
field_trial_synchronizer_ = new FieldTrialSynchronizer();
|
||||
@@ -1342,10 +1342,10 @@
|
||||
}
|
||||
#endif // !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_OPENBSD)
|
||||
+#if defined(OS_LINUX)
|
||||
// Set the product channel for crash reports.
|
||||
breakpad::SetChannelCrashKey(chrome::GetChannelName());
|
||||
-#endif // defined(OS_LINUX) || defined(OS_OPENBSD)
|
||||
+#endif // defined(OS_LINUX)
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
// Get the Keychain API to register for distributed notifications on the main
|
||||
@@ -1369,7 +1369,7 @@
|
||||
}
|
||||
|
||||
#if defined(OS_WIN) || defined(OS_MACOSX) || \
|
||||
- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
|
||||
|
@ -27,16 +40,7 @@
|
|||
metrics::DesktopSessionDurationTracker::Initialize();
|
||||
#endif
|
||||
metrics::RendererUptimeTracker::Initialize();
|
||||
@@ -1145,7 +1145,7 @@
|
||||
}
|
||||
#endif // !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_OPENBSD)
|
||||
+#if defined(OS_LINUX)
|
||||
// Set the product channel for crash reports.
|
||||
breakpad::SetChannelCrashKey(chrome::GetChannelString());
|
||||
#endif // defined(OS_LINUX) || defined(OS_OPENBSD)
|
||||
@@ -1351,7 +1351,7 @@
|
||||
@@ -1514,7 +1514,7 @@
|
||||
|
||||
// Start the tab manager here so that we give the most amount of time for the
|
||||
// other services to start up before we start adjusting the oom priority.
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
--- chrome/browser/chrome_content_browser_client.cc.orig 2018-02-24 16:25:09.000000000 +0100
|
||||
+++ chrome/browser/chrome_content_browser_client.cc 2018-03-03 20:34:31.799512000 +0100
|
||||
@@ -281,7 +281,7 @@
|
||||
--- 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 @@
|
||||
#include "chromeos/chromeos_switches.h"
|
||||
#include "components/user_manager/user_manager.h"
|
||||
#include "services/service_manager/public/interfaces/interface_provider_spec.mojom.h"
|
||||
#include "services/service_manager/public/mojom/interface_provider_spec.mojom.h"
|
||||
-#elif defined(OS_LINUX)
|
||||
+#elif defined(OS_LINUX) || defined(OS_BSD)
|
||||
#include "chrome/browser/chrome_browser_main_linux.h"
|
||||
#elif defined(OS_ANDROID)
|
||||
#include "base/android/application_status_listener.h"
|
||||
@@ -316,7 +316,7 @@
|
||||
@@ -342,7 +342,7 @@
|
||||
#include "chrome/common/importer/profile_import.mojom.h"
|
||||
#endif
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
#include "chrome/browser/webshare/share_service_impl.h"
|
||||
#endif
|
||||
|
||||
@@ -330,7 +330,7 @@
|
||||
@@ -356,7 +356,7 @@
|
||||
#include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h"
|
||||
#endif
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
#include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h"
|
||||
#endif
|
||||
|
||||
@@ -912,7 +912,7 @@
|
||||
@@ -1033,7 +1033,7 @@
|
||||
main_parts = new ChromeBrowserMainPartsMac(parameters);
|
||||
#elif defined(OS_CHROMEOS)
|
||||
main_parts = new chromeos::ChromeBrowserMainPartsChromeos(parameters);
|
||||
|
@ -36,7 +36,7 @@
|
|||
main_parts = new ChromeBrowserMainPartsLinux(parameters);
|
||||
#elif defined(OS_ANDROID)
|
||||
main_parts = new ChromeBrowserMainPartsAndroid(parameters);
|
||||
@@ -928,7 +928,7 @@
|
||||
@@ -1049,7 +1049,7 @@
|
||||
// Construct additional browser parts. Stages are called in the order in
|
||||
// which they are added.
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
|
@ -45,7 +45,7 @@
|
|||
main_parts->AddParts(new ChromeBrowserMainExtraPartsViewsLinux());
|
||||
#else
|
||||
main_parts->AddParts(new ChromeBrowserMainExtraPartsViews());
|
||||
@@ -1651,7 +1651,7 @@
|
||||
@@ -1789,7 +1789,7 @@
|
||||
command_line->AppendSwitchASCII(switches::kMetricsClientID,
|
||||
client_info->client_id);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@
|
|||
bool enable_crash_reporter = breakpad::IsCrashReporterEnabled();
|
||||
#if defined(OS_CHROMEOS)
|
||||
// Chrome OS uses the OS-level crash_reporter for mash services, so disable
|
||||
@@ -2913,7 +2913,7 @@
|
||||
@@ -3096,7 +3096,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
|||
void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
|
||||
const base::CommandLine& command_line,
|
||||
int child_process_id,
|
||||
@@ -2949,7 +2949,7 @@
|
||||
@@ -3132,7 +3132,7 @@
|
||||
}
|
||||
#endif // defined(OS_ANDROID)
|
||||
}
|
||||
|
@ -72,7 +72,7 @@
|
|||
|
||||
#if defined(OS_WIN)
|
||||
base::string16 ChromeContentBrowserClient::GetAppContainerSidForSandboxType(
|
||||
@@ -3630,7 +3630,7 @@
|
||||
@@ -3806,7 +3806,7 @@
|
||||
#if defined(OS_ANDROID)
|
||||
frame_interfaces_parameterized_->AddInterface(base::Bind(
|
||||
&ForwardToJavaWebContentsRegistry<blink::mojom::ShareService>));
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
--- chrome/browser/chrome_content_browser_client.h.orig 2017-12-15 02:04:08.000000000 +0100
|
||||
+++ chrome/browser/chrome_content_browser_client.h 2017-12-24 00:50:35.917227000 +0100
|
||||
@@ -291,12 +291,12 @@
|
||||
--- chrome/browser/chrome_content_browser_client.h.orig 2018-06-13 00:10:04.000000000 +0200
|
||||
+++ chrome/browser/chrome_content_browser_client.h 2018-07-14 14:13:02.407023000 +0200
|
||||
@@ -299,12 +299,12 @@
|
||||
void OverridePageVisibilityState(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
blink::WebPageVisibilityState* visibility_state) override;
|
||||
|
||||
blink::mojom::PageVisibilityState* visibility_state) override;
|
||||
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
|
||||
+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
|
||||
void GetAdditionalMappedFilesForChildProcess(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- chrome/browser/download/download_commands.cc.orig 2017-06-05 19:03:02 UTC
|
||||
+++ chrome/browser/download/download_commands.cc
|
||||
@@ -219,7 +219,7 @@ bool DownloadCommands::IsCommandChecked(Command comman
|
||||
--- chrome/browser/download/download_commands.cc.orig 2018-06-13 00:10:05.000000000 +0200
|
||||
+++ chrome/browser/download/download_commands.cc 2018-07-14 14:30:03.853964000 +0200
|
||||
@@ -249,7 +249,7 @@
|
||||
return download_item_->GetOpenWhenComplete() ||
|
||||
download_crx_util::IsExtensionDownload(*download_item_);
|
||||
case ALWAYS_OPEN_TYPE:
|
||||
|
@ -8,17 +8,17 @@
|
|||
+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
|
||||
if (CanOpenPdfInSystemViewer()) {
|
||||
DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(
|
||||
download_item_->GetBrowserContext());
|
||||
@@ -263,7 +263,7 @@ void DownloadCommands::ExecuteCommand(Command command)
|
||||
content::DownloadItemUtils::GetBrowserContext(download_item_));
|
||||
@@ -293,7 +293,7 @@
|
||||
bool is_checked = IsCommandChecked(ALWAYS_OPEN_TYPE);
|
||||
DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(
|
||||
download_item_->GetBrowserContext());
|
||||
content::DownloadItemUtils::GetBrowserContext(download_item_));
|
||||
-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
|
||||
+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
|
||||
if (CanOpenPdfInSystemViewer()) {
|
||||
prefs->SetShouldOpenPdfInSystemReader(!is_checked);
|
||||
DownloadItemModel(download_item_)
|
||||
@@ -376,7 +376,7 @@ Browser* DownloadCommands::GetBrowser() const {
|
||||
@@ -408,7 +408,7 @@
|
||||
return browser_displayer.browser();
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
bool DownloadCommands::IsDownloadPdf() const {
|
||||
base::FilePath path = download_item_->GetTargetFilePath();
|
||||
return path.MatchesExtension(FILE_PATH_LITERAL(".pdf"));
|
||||
@@ -393,7 +393,7 @@ bool DownloadCommands::CanOpenPdfInSystemViewer() cons
|
||||
@@ -425,7 +425,7 @@
|
||||
return IsDownloadPdf() &&
|
||||
(IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date
|
||||
: true);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
--- chrome/browser/download/download_query.cc.orig 2017-04-19 19:06:29 UTC
|
||||
+++ chrome/browser/download/download_query.cc
|
||||
--- chrome/browser/download/download_query.cc.orig 2018-06-13 00:10:05.000000000 +0200
|
||||
+++ chrome/browser/download/download_query.cc 2018-07-15 13:01:15.987418000 +0200
|
||||
@@ -27,7 +27,11 @@
|
||||
#include "components/download/public/common/download_item.h"
|
||||
#include "components/url_formatter/url_formatter.h"
|
||||
#include "content/public/browser/content_browser_client.h"
|
||||
#include "content/public/browser/download_item.h"
|
||||
+#if defined(OS_BSD)
|
||||
+#include <re2/re2.h>
|
||||
+#else
|
||||
|
@ -11,4 +11,4 @@
|
|||
+#endif
|
||||
#include "url/gurl.h"
|
||||
|
||||
using content::DownloadDangerType;
|
||||
using download::DownloadDangerType;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- chrome/browser/download/download_status_updater.cc.orig 2017-06-05 19:03:02 UTC
|
||||
+++ chrome/browser/download/download_status_updater.cc
|
||||
--- chrome/browser/download/download_status_updater.cc.orig 2018-06-13 00:10:05.000000000 +0200
|
||||
+++ chrome/browser/download/download_status_updater.cc 2018-07-15 13:07:15.012034000 +0200
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "build/build_config.h"
|
||||
|
@ -9,10 +9,10 @@
|
|||
#include "ui/views/linux_ui/linux_ui.h"
|
||||
#endif
|
||||
|
||||
@@ -136,7 +136,7 @@ void DownloadStatusUpdater::OnDownloadUpdated(
|
||||
@@ -136,7 +136,7 @@
|
||||
#if defined(OS_ANDROID) || (defined(USE_AURA) && !defined(OS_WIN))
|
||||
void DownloadStatusUpdater::UpdateAppIconDownloadProgress(
|
||||
content::DownloadItem* download) {
|
||||
download::DownloadItem* download) {
|
||||
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
|
||||
const views::LinuxUI* linux_ui = views::LinuxUI::instance();
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
--- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig 2017-09-05 21:05:12.000000000 +0200
|
||||
+++ chrome/browser/extensions/browser_context_keyed_service_factories.cc 2017-09-06 18:14:17.437338000 +0200
|
||||
@@ -61,7 +61,7 @@
|
||||
#include "chrome/browser/chromeos/extensions/input_method_api.h"
|
||||
--- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig 2018-06-13 00:10:06.000000000 +0200
|
||||
+++ chrome/browser/extensions/browser_context_keyed_service_factories.cc 2018-07-15 13:15:07.666902000 +0200
|
||||
@@ -57,7 +57,7 @@
|
||||
#include "chrome/browser/chromeos/extensions/media_player_api.h"
|
||||
#include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
|
||||
#include "chrome/browser/extensions/api/screenlock_private/screenlock_private_api.h"
|
||||
-#elif defined(OS_LINUX) || defined(OS_WIN)
|
||||
+#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
|
||||
#include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
|
||||
#endif
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
@@ -99,7 +99,7 @@
|
||||
#if defined(OS_CHROMEOS)
|
||||
extensions::InputImeAPI::GetFactoryInstance();
|
||||
extensions::InputMethodAPI::GetFactoryInstance();
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
--- chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider.cc.orig 2018-07-21 15:25:50.187627000 +0200
|
||||
+++ chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider.cc 2018-07-21 15:28:47.631030000 +0200
|
||||
@@ -111,6 +111,11 @@
|
||||
bool incognito,
|
||||
CreateRouteCallback callback) {
|
||||
DCHECK(!base::ContainsKey(presentations_, presentation_id));
|
||||
+#if defined(OS_BSD) // XXX
|
||||
+ std::move(callback).Run(base::nullopt, std::string("Not implemented"),
|
||||
+ RouteRequestResult::UNKNOWN_ERROR);
|
||||
+ return;
|
||||
+#else
|
||||
base::Optional<Display> display = GetDisplayBySinkId(sink_id);
|
||||
if (!display) {
|
||||
std::move(callback).Run(base::nullopt, std::string("Display not found"),
|
||||
@@ -135,6 +140,7 @@
|
||||
presentation.receiver()->Start(presentation_id, GURL(media_source));
|
||||
std::move(callback).Run(route, base::nullopt, RouteRequestResult::OK);
|
||||
NotifyRouteObservers();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void WiredDisplayMediaRouteProvider::JoinRoute(
|
|
@ -0,0 +1,11 @@
|
|||
--- chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2018-07-19 22:14:21.658215000 +0200
|
||||
+++ chrome/browser/media/webrtc/webrtc_event_log_uploader.cc 2018-07-19 22:14:37.578585000 +0200
|
||||
@@ -51,7 +51,7 @@
|
||||
const char kProduct[] = "Chrome";
|
||||
#elif defined(OS_MACOSX)
|
||||
const char kProduct[] = "Chrome_Mac";
|
||||
-#elif defined(OS_LINUX)
|
||||
+#elif defined(OS_LINUX) || defined(OS_BSD)
|
||||
const char kProduct[] = "Chrome_Linux";
|
||||
#elif defined(OS_ANDROID)
|
||||
const char kProduct[] = "Chrome_Android";
|
|
@ -1,14 +1,13 @@
|
|||
--- chrome/browser/memory_details_linux.cc.orig 2017-06-05 19:03:02 UTC
|
||||
+++ chrome/browser/memory_details_linux.cc
|
||||
@@ -71,9 +71,10 @@ ProcessData GetProcessDataMemoryInformation(
|
||||
--- chrome/browser/memory_details_linux.cc.orig 2018-06-13 00:10:06.000000000 +0200
|
||||
+++ chrome/browser/memory_details_linux.cc 2018-07-20 00:12:53.799188000 +0200
|
||||
@@ -70,8 +70,10 @@
|
||||
|
||||
std::unique_ptr<base::ProcessMetrics> metrics(
|
||||
base::ProcessMetrics::CreateProcessMetrics(pid));
|
||||
metrics->GetWorkingSetKBytes(&pmi.working_set);
|
||||
+#if !defined(OS_BSD)
|
||||
pmi.num_open_fds = metrics->GetOpenFdCount();
|
||||
pmi.open_fds_soft_limit = metrics->GetOpenFdSoftLimit();
|
||||
-
|
||||
+#endif
|
||||
|
||||
process_data.processes.push_back(pmi);
|
||||
}
|
||||
return process_data;
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2017-12-15 02:04:10.000000000 +0100
|
||||
+++ chrome/browser/resources/settings/appearance_page/appearance_page.html 2017-12-24 02:04:05.313610000 +0100
|
||||
@@ -77,7 +77,7 @@
|
||||
--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2018-06-13 00:10:07.000000000 +0200
|
||||
+++ chrome/browser/resources/settings/appearance_page/appearance_page.html 2018-07-15 13:34:27.093948000 +0200
|
||||
@@ -75,7 +75,7 @@
|
||||
hidden="[[!pageVisibility.setTheme]]"
|
||||
label="$i18n{themes}" sub-label="[[themeSublabel_]]"
|
||||
on-tap="openThemeUrl_"></button>
|
||||
on-click="openThemeUrl_"></cr-link-row>
|
||||
-<if expr="not is_linux or chromeos">
|
||||
+<if expr="not is_posix or chromeos">
|
||||
<template is="dom-if" if="[[prefs.extensions.theme.id.value]]">
|
||||
<div class="separator"></div>
|
||||
<paper-button id="useDefault" on-tap="onUseDefaultTap_"
|
||||
@@ -86,7 +86,7 @@
|
||||
<paper-button id="useDefault" on-click="onUseDefaultTap_"
|
||||
@@ -84,7 +84,7 @@
|
||||
</paper-button>
|
||||
</template>
|
||||
</if>
|
||||
|
@ -18,7 +18,7 @@
|
|||
<div class="settings-row continuation"
|
||||
hidden="[[!showThemesSecondary_(
|
||||
prefs.extensions.theme.id.value, useSystemTheme_)]]"
|
||||
@@ -151,7 +151,7 @@
|
||||
@@ -149,7 +149,7 @@
|
||||
pref="{{prefs.bookmark_bar.show_on_all_tabs}}"
|
||||
label="$i18n{showBookmarksBar}">
|
||||
</settings-toggle-button>
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- chrome/browser/safe_browsing/permission_reporter.cc.orig 2017-06-05 19:03:03 UTC
|
||||
+++ chrome/browser/safe_browsing/permission_reporter.cc
|
||||
@@ -188,7 +188,7 @@ bool PermissionReporter::BuildReport(const PermissionR
|
||||
#if defined(OS_ANDROID)
|
||||
report.set_platform_type(PermissionReport::ANDROID_PLATFORM);
|
||||
#elif defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_CHROMEOS) || \
|
||||
- defined(OS_LINUX)
|
||||
+ defined(OS_LINUX) || defined(OS_BSD)
|
||||
report.set_platform_type(PermissionReport::DESKTOP_PLATFORM);
|
||||
#else
|
||||
#error Unsupported platform.
|
|
@ -1,20 +1,20 @@
|
|||
--- chrome/browser/ui/views/profiles/avatar_button.cc.orig 2018-02-24 16:25:10.000000000 +0100
|
||||
+++ chrome/browser/ui/views/profiles/avatar_button.cc 2018-03-03 22:06:11.687961000 +0100
|
||||
@@ -211,7 +211,7 @@
|
||||
label()->font_list().DeriveWithHeightUpperBound(kDisplayFontHeight));
|
||||
|
||||
bool apply_ink_drop = IsCondensible();
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
DCHECK_EQ(AvatarButtonStyle::THEMED, button_style);
|
||||
apply_ink_drop = true;
|
||||
#endif
|
||||
@@ -229,7 +229,7 @@
|
||||
--- chrome/browser/ui/views/profiles/avatar_button.cc.orig 2018-06-13 00:10:08.000000000 +0200
|
||||
+++ chrome/browser/ui/views/profiles/avatar_button.cc 2018-07-18 22:53:21.770071000 +0200
|
||||
@@ -250,7 +250,7 @@
|
||||
} else if (apply_ink_drop) {
|
||||
SetInkDropMode(InkDropMode::ON);
|
||||
SetFocusPainter(nullptr);
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
set_ink_drop_base_color(SK_ColorWHITE);
|
||||
SetBorder(base::MakeUnique<AvatarButtonThemedBorder>());
|
||||
SetBorder(std::make_unique<AvatarButtonThemedBorder>());
|
||||
generic_avatar_ =
|
||||
@@ -544,7 +544,7 @@
|
||||
#endif
|
||||
}
|
||||
bool AvatarButton::ShouldApplyInkDrop() const {
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
DCHECK_EQ(AvatarButtonStyle::THEMED, button_style_);
|
||||
return true;
|
||||
#elif defined(OS_MACOSX)
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
--- chrome/browser/ui/webui/settings/appearance_handler.cc.orig 2017-12-24 02:59:37.041407000 +0100
|
||||
+++ chrome/browser/ui/webui/settings/appearance_handler.cc 2017-12-24 03:00:20.310448000 +0100
|
||||
@@ -33,7 +33,7 @@
|
||||
--- chrome/browser/ui/webui/settings/appearance_handler.cc.orig 2018-06-13 00:10:09.000000000 +0200
|
||||
+++ chrome/browser/ui/webui/settings/appearance_handler.cc 2018-07-18 23:00:36.362422000 +0200
|
||||
@@ -31,7 +31,7 @@
|
||||
"useDefaultTheme",
|
||||
base::Bind(&AppearanceHandler::HandleUseDefaultTheme,
|
||||
base::Unretained(this)));
|
||||
base::BindRepeating(&AppearanceHandler::HandleUseDefaultTheme,
|
||||
base::Unretained(this)));
|
||||
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD) && !defined(OS_CHROMEOS)
|
||||
web_ui()->RegisterMessageCallback(
|
||||
"useSystemTheme",
|
||||
base::Bind(&AppearanceHandler::HandleUseSystemTheme,
|
||||
@@ -61,7 +61,7 @@
|
||||
base::BindRepeating(&AppearanceHandler::HandleUseSystemTheme,
|
||||
@@ -59,7 +59,7 @@
|
||||
ThemeServiceFactory::GetForProfile(profile_)->UseDefaultTheme();
|
||||
}
|
||||
|
||||
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD) && !defined(OS_CHROMEOS)
|
||||
void AppearanceHandler::HandleUseSystemTheme(const base::ListValue* args) {
|
||||
if (profile_->IsSupervised())
|
||||
NOTREACHED();
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- chrome/browser/vr/sample_queue.cc.orig 2018-03-24 12:29:50.123017000 +0100
|
||||
+++ chrome/browser/vr/sample_queue.cc 2018-03-24 12:30:25.632912000 +0100
|
||||
@@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
+#include <stdint.h>
|
||||
+
|
||||
#include "chrome/browser/vr/sample_queue.h"
|
||||
|
||||
namespace vr {
|
|
@ -1,6 +1,6 @@
|
|||
--- chrome/common/chrome_features.cc.orig 2017-09-07 15:16:44.309916000 +0200
|
||||
+++ chrome/common/chrome_features.cc 2017-09-07 15:17:16.971600000 +0200
|
||||
@@ -57,13 +57,13 @@
|
||||
--- 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 @@
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
#endif // defined(OS_WIN) || defined(OS_MACOSX)
|
||||
|
||||
|
@ -16,3 +16,12 @@
|
|||
|
||||
// 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
|
||||
|
||||
-#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
|
||||
+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) || defined(OS_BSD)
|
||||
// Enables the dual certificate verification trial feature.
|
||||
// https://crbug.com/649026
|
||||
const base::Feature kCertDualVerificationTrialFeature{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- chrome/common/chrome_features.h.orig 2017-09-07 15:16:51.725565000 +0200
|
||||
+++ chrome/common/chrome_features.h 2017-09-07 15:17:47.995642000 +0200
|
||||
@@ -43,9 +43,9 @@
|
||||
--- 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 @@
|
||||
extern const base::Feature kAutomaticTabDiscarding;
|
||||
#endif // defined(OS_WIN) || defined(OS_MACOSX)
|
||||
|
||||
|
@ -12,3 +12,12 @@
|
|||
|
||||
extern const base::Feature kBlockPromptsIfDismissedOften;
|
||||
extern const base::Feature kBlockPromptsIfIgnoredOften;
|
||||
@@ -76,7 +76,7 @@
|
||||
extern const base::Feature kTabStripKeyboardFocus;
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
-#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
|
||||
+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) || defined(OS_BSD)
|
||||
extern const base::Feature kCertDualVerificationTrialFeature;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
--- chromecast/browser/cast_content_browser_client.cc.orig 2017-06-05 19:03:05 UTC
|
||||
+++ chromecast/browser/cast_content_browser_client.cc
|
||||
@@ -316,7 +316,7 @@ void CastContentBrowserClient::AppendExtraCommandLineS
|
||||
command_line->AppendSwitch(switches::kAllowHiddenMediaPlayback);
|
||||
}
|
||||
|
||||
--- chromecast/browser/cast_content_browser_client.cc.orig 2018-06-13 00:10:12.000000000 +0200
|
||||
+++ chromecast/browser/cast_content_browser_client.cc 2018-07-18 23:13:48.741141000 +0200
|
||||
@@ -416,7 +416,7 @@
|
||||
switches::kAudioOutputChannels));
|
||||
}
|
||||
} else if (process_type == switches::kGpuProcess) {
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
// Necessary for accelerated 2d canvas. By default on Linux, Chromium assumes
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- components/assist_ranker/ranker_example_util.cc.orig 2018-03-24 12:31:52.824752000 +0100
|
||||
+++ components/assist_ranker/ranker_example_util.cc 2018-03-24 12:32:32.654498000 +0100
|
||||
@@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
+#include <math.h>
|
||||
+
|
||||
#include "components/assist_ranker/ranker_example_util.h"
|
||||
#include "base/bit_cast.h"
|
||||
#include "base/format_macros.h"
|
|
@ -1,9 +1,9 @@
|
|||
--- components/autofill/content/renderer/password_form_conversion_utils.cc.orig 2017-09-05 21:05:17.000000000 +0200
|
||||
+++ components/autofill/content/renderer/password_form_conversion_utils.cc 2017-09-06 19:05:07.569456000 +0200
|
||||
@@ -31,7 +31,11 @@
|
||||
#include "third_party/WebKit/public/web/WebFormControlElement.h"
|
||||
#include "third_party/WebKit/public/web/WebInputElement.h"
|
||||
#include "third_party/WebKit/public/web/WebLocalFrame.h"
|
||||
--- 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 @@
|
||||
#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"
|
||||
+#if defined(OS_BSD)
|
||||
+#include <re2/re2.h>
|
||||
+#else
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
--- components/crash/content/app/BUILD.gn.orig 2018-02-24 16:25:12.000000000 +0100
|
||||
+++ components/crash/content/app/BUILD.gn 2018-03-03 22:43:15.726779000 +0100
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
if (is_mac || is_win) {
|
||||
--- components/crash/content/app/BUILD.gn.orig 2018-06-13 00:10:13.000000000 +0200
|
||||
+++ components/crash/content/app/BUILD.gn 2018-07-18 23:31:26.635837000 +0200
|
||||
@@ -36,7 +36,7 @@
|
||||
sources += [ "crashpad.cc" ]
|
||||
- } else if (is_android || is_linux) {
|
||||
+ } else if (is_android || is_linux && !is_bsd) {
|
||||
}
|
||||
|
||||
- if (is_android || is_linux) {
|
||||
+ if (is_android || is_linux && !is_bsd) {
|
||||
# Want these files on both Linux and Android.
|
||||
set_sources_assignment_filter([])
|
||||
sources += [
|
||||
@@ -64,7 +64,6 @@
|
||||
"//components/crash/core/common",
|
||||
@@ -73,7 +73,6 @@
|
||||
"//content/public/common:content_descriptors",
|
||||
"//content/public/common:result_codes",
|
||||
"//sandbox",
|
||||
- "//third_party/breakpad:client",
|
||||
]
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
--- 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 @@
|
||||
// as processed by the backend.
|
||||
DCHECK(browser_process || process_type == "Chrome Installer" ||
|
||||
process_type == "notification-helper");
|
||||
-#elif defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
+#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
|
||||
DCHECK(browser_process);
|
||||
#else
|
||||
#error Port.
|
||||
@@ -184,7 +184,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;
|
||||
-#elif defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
+#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
|
||||
const bool should_initialize_database_and_set_upload_policy = browser_process;
|
||||
#endif
|
||||
if (should_initialize_database_and_set_upload_policy) {
|
||||
@@ -253,7 +253,11 @@
|
||||
}
|
||||
|
||||
void DumpWithoutCrashing() {
|
||||
+#if defined(OS_BSD)
|
||||
+ NOTIMPLEMENTED();
|
||||
+#else
|
||||
CRASHPAD_SIMULATE_CRASH();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void GetReports(std::vector<Report>* reports) {
|
|
@ -1,5 +1,5 @@
|
|||
--- components/crash/content/browser/BUILD.gn.orig 2017-12-15 02:04:14.000000000 +0100
|
||||
+++ components/crash/content/browser/BUILD.gn 2017-12-24 11:42:34.318970000 +0100
|
||||
--- components/crash/content/browser/BUILD.gn.orig 2018-06-13 00:10:13.000000000 +0200
|
||||
+++ components/crash/content/browser/BUILD.gn 2018-07-18 23:37:00.046473000 +0200
|
||||
@@ -24,10 +24,9 @@
|
||||
"//components/crash/content/app",
|
||||
"//content/public/browser",
|
||||
|
@ -16,8 +16,8 @@
|
|||
|
||||
# This is not in the GYP build but this target includes breakpad client
|
||||
# headers, so add the dependency here.
|
||||
- if (is_posix && !is_ios) {
|
||||
+ if (is_posix && !is_ios && !is_bsd) {
|
||||
- if ((is_posix && !is_ios) || is_fuchsia) {
|
||||
+ if ((is_posix && !is_ios && !is_bsd) || is_fuchsia) {
|
||||
configs += [ "//third_party/breakpad:client_config" ]
|
||||
public_configs = [ "//third_party/breakpad:client_config" ]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
--- components/download/quarantine/quarantine_linux.cc.orig 2018-07-19 22:21:43.332341000 +0200
|
||||
+++ components/download/quarantine/quarantine_linux.cc 2018-07-19 22:24:04.361819000 +0200
|
||||
@@ -2,11 +2,15 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
+#include "build/build_config.h"
|
||||
+
|
||||
#include "components/download/quarantine/quarantine.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
+#if !defined(OS_BSD)
|
||||
#include <sys/xattr.h>
|
||||
+#endif
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/file_util.h"
|
||||
@@ -29,17 +33,20 @@
|
||||
size_t value_size,
|
||||
int flags) {
|
||||
base::AssertBlockingAllowed();
|
||||
+#if !defined(OS_BSD)
|
||||
int result = setxattr(path, name, value, value_size, flags);
|
||||
if (result) {
|
||||
DPLOG(ERROR) << "Could not set extended attribute " << name << " on file "
|
||||
<< path;
|
||||
return false;
|
||||
}
|
||||
+#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string GetExtendedFileAttribute(const char* path, const char* name) {
|
||||
base::AssertBlockingAllowed();
|
||||
+#if !defined(OS_BSD)
|
||||
ssize_t len = getxattr(path, name, nullptr, 0);
|
||||
if (len <= 0)
|
||||
return std::string();
|
||||
@@ -49,6 +56,9 @@
|
||||
if (len < static_cast<ssize_t>(buffer.size()))
|
||||
return std::string();
|
||||
return std::string(buffer.begin(), buffer.end());
|
||||
+#else
|
||||
+ return std::string();
|
||||
+#endif
|
||||
}
|
||||
|
||||
} // namespace
|
|
@ -1,10 +1,10 @@
|
|||
--- components/gcm_driver/gcm_client.h.orig 2017-04-19 19:06:32 UTC
|
||||
+++ components/gcm_driver/gcm_client.h
|
||||
@@ -82,6 +82,7 @@ class GCMClient {
|
||||
--- components/gcm_driver/gcm_client.h.orig 2018-06-13 00:10:13.000000000 +0200
|
||||
+++ components/gcm_driver/gcm_client.h 2018-07-18 23:49:52.697459000 +0200
|
||||
@@ -82,6 +82,7 @@
|
||||
PLATFORM_CROS,
|
||||
PLATFORM_IOS,
|
||||
PLATFORM_ANDROID,
|
||||
+ PLATFORM_BSD,
|
||||
PLATFORM_UNKNOWN
|
||||
PLATFORM_UNSPECIFIED
|
||||
};
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
--- components/gcm_driver/gcm_client_impl.cc.orig 2017-04-19 19:06:32 UTC
|
||||
+++ components/gcm_driver/gcm_client_impl.cc
|
||||
@@ -136,6 +136,9 @@ void ToCheckinProtoVersion(
|
||||
--- components/gcm_driver/gcm_client_impl.cc.orig 2018-06-13 00:10:13.000000000 +0200
|
||||
+++ components/gcm_driver/gcm_client_impl.cc 2018-07-18 23:56:44.202609000 +0200
|
||||
@@ -152,6 +152,9 @@
|
||||
case GCMClient::PLATFORM_CROS:
|
||||
platform = checkin_proto::ChromeBuildProto_Platform_PLATFORM_CROS;
|
||||
break;
|
||||
+ case GCMClient::PLATFORM_BSD: // TODO what the hell are those?
|
||||
+ case GCMClient::PLATFORM_BSD:
|
||||
+ platform = checkin_proto::ChromeBuildProto_Platform_PLATFORM_LINUX;
|
||||
+ break;
|
||||
case GCMClient::PLATFORM_UNKNOWN:
|
||||
case GCMClient::PLATFORM_UNSPECIFIED:
|
||||
// For unknown platform, return as LINUX.
|
||||
platform = checkin_proto::ChromeBuildProto_Platform_PLATFORM_LINUX;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
--- components/plugins/renderer/plugin_placeholder.cc.orig 2017-04-19 19:06:33 UTC
|
||||
+++ components/plugins/renderer/plugin_placeholder.cc
|
||||
--- components/plugins/renderer/plugin_placeholder.cc.orig 2018-06-13 00:10:13.000000000 +0200
|
||||
+++ components/plugins/renderer/plugin_placeholder.cc 2018-07-19 00:02:51.619981000 +0200
|
||||
@@ -11,7 +11,11 @@
|
||||
#include "gin/object_template_builder.h"
|
||||
#include "third_party/WebKit/public/web/WebElement.h"
|
||||
#include "third_party/WebKit/public/web/WebPluginContainer.h"
|
||||
#include "third_party/blink/public/web/web_element.h"
|
||||
#include "third_party/blink/public/web/web_plugin_container.h"
|
||||
+#if defined(OS_BSD)
|
||||
+#include <re2/re2.h>
|
||||
+#else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- components/filesystem/file_system_app.cc.orig 2017-06-05 19:03:05 UTC
|
||||
+++ components/filesystem/file_system_app.cc
|
||||
@@ -22,7 +22,7 @@
|
||||
--- 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
|
||||
@@ -20,7 +20,7 @@
|
||||
#elif defined(OS_ANDROID)
|
||||
#include "base/base_paths_android.h"
|
||||
#include "base/path_service.h"
|
||||
|
@ -9,12 +9,12 @@
|
|||
#include "base/environment.h"
|
||||
#include "base/nix/xdg_util.h"
|
||||
#elif defined(OS_MACOSX)
|
||||
@@ -78,7 +78,7 @@ base::FilePath FileSystemApp::GetUserDataDir() {
|
||||
@@ -75,7 +75,7 @@
|
||||
CHECK(PathService::Get(base::DIR_APP_DATA, &path));
|
||||
#elif defined(OS_ANDROID)
|
||||
CHECK(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());
|
||||
path = base::nix::GetXDGDirectory(env.get(),
|
||||
base::nix::kXdgConfigHomeEnvVar,
|
||||
path = base::nix::GetXDGDirectory(
|
||||
env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir);
|
|
@ -1,9 +1,9 @@
|
|||
--- components/webcrypto/algorithms/test_helpers.cc.orig 2017-04-19 19:06:33 UTC
|
||||
+++ components/webcrypto/algorithms/test_helpers.cc
|
||||
--- components/webcrypto/algorithms/test_helpers.cc.orig 2018-06-13 00:10:16.000000000 +0200
|
||||
+++ components/webcrypto/algorithms/test_helpers.cc 2018-07-19 00:07:52.270703000 +0200
|
||||
@@ -25,7 +25,11 @@
|
||||
#include "components/webcrypto/status.h"
|
||||
#include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h"
|
||||
#include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h"
|
||||
#include "third_party/blink/public/platform/web_crypto_algorithm_params.h"
|
||||
#include "third_party/blink/public/platform/web_crypto_key_algorithm.h"
|
||||
+#if defined(OS_BSD)
|
||||
+#include <re2/re2.h>
|
||||
+#else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- content/app/content_main_runner.cc.orig 2018-02-24 16:25:14.000000000 +0100
|
||||
+++ content/app/content_main_runner.cc 2018-03-03 23:04:17.370076000 +0100
|
||||
@@ -82,10 +82,10 @@
|
||||
--- 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 @@
|
||||
#include "base/posix/global_descriptors.h"
|
||||
#include "content/public/common/content_descriptors.h"
|
||||
|
||||
|
@ -11,18 +11,18 @@
|
|||
-#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"
|
||||
#endif
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
}
|
||||
|
||||
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \
|
||||
- !defined(OS_FUCHSIA)
|
||||
+ !defined(OS_FUCHSIA) && !defined(OS_BSD)
|
||||
// Zygote startup is special -- see RunZygote comments above
|
||||
// for why we don't use ZygoteMain directly.
|
||||
if (process_type == switches::kZygoteProcess)
|
||||
@@ -499,10 +499,10 @@
|
||||
@@ -153,7 +153,7 @@
|
||||
namespace content {
|
||||
extern int GpuMain(const content::MainFunctionParams&);
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
-#if !defined(OS_LINUX)
|
||||
+#if !defined(OS_LINUX) && !defined(OS_BSD)
|
||||
extern int PluginMain(const content::MainFunctionParams&);
|
||||
#endif
|
||||
extern int PpapiPluginMain(const MainFunctionParams&);
|
||||
@@ -702,10 +702,10 @@
|
||||
kFieldTrialDescriptor + base::GlobalDescriptors::kBaseDescriptor);
|
||||
#endif // !OS_ANDROID
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
--- content/browser/browser_main_loop.cc.orig 2018-03-20 23:05:23.000000000 +0100
|
||||
+++ content/browser/browser_main_loop.cc 2018-03-24 14:03:10.531359000 +0100
|
||||
@@ -212,7 +212,7 @@
|
||||
--- 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"
|
||||
#include "content/browser/zygote_host/zygote_host_impl_linux.h"
|
||||
#endif
|
||||
|
||||
@@ -254,6 +254,11 @@
|
||||
@@ -240,6 +240,11 @@
|
||||
#include "services/ui/common/image_cursors_set.h"
|
||||
#endif
|
||||
|
||||
|
@ -21,15 +21,10 @@
|
|||
// One of the linux specific headers defines this as a macro.
|
||||
#ifdef DestroyAll
|
||||
#undef DestroyAll
|
||||
@@ -655,10 +660,15 @@
|
||||
TRACE_EVENT0("startup", "BrowserMainLoop::EarlyInitialization");
|
||||
|
||||
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \
|
||||
- !defined(OS_FUCHSIA)
|
||||
+ !defined(OS_FUCHSIA) && !defined(OS_BSD)
|
||||
// No thread should be created before this call, as SetupSandbox()
|
||||
// will end-up using fork().
|
||||
SetupSandbox(parsed_command_line_);
|
||||
@@ -548,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());
|
||||
+#elif defined(OS_BSD)
|
||||
+ SandboxHostLinux::GetInstance()->Init();
|
||||
+ base::FileHandleMappingVector fds_to_map;
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
--- content/browser/download/base_file.cc.orig 2017-06-05 19:03:06 UTC
|
||||
+++ content/browser/download/base_file.cc
|
||||
@@ -387,7 +387,7 @@ DownloadInterruptReason BaseFile::LogInterruptReason(
|
||||
return reason;
|
||||
}
|
||||
|
||||
-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
|
||||
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -470,7 +470,7 @@ DownloadInterruptReason BaseFile::AnnotateWithSourceIn
|
||||
}
|
||||
return DOWNLOAD_INTERRUPT_REASON_FILE_FAILED;
|
||||
}
|
||||
-#else // !OS_WIN && !OS_MACOSX && !OS_LINUX
|
||||
+#else // !OS_WIN && !OS_MACOSX && !OS_LINUX && !OS_BSD
|
||||
DownloadInterruptReason BaseFile::AnnotateWithSourceInformation(
|
||||
const std::string& client_guid,
|
||||
const GURL& source_url,
|
|
@ -0,0 +1,16 @@
|
|||
--- content/browser/memory/swap_metrics_driver_impl_linux.cc.orig 2018-06-13 00:10:16.000000000 +0200
|
||||
+++ content/browser/memory/swap_metrics_driver_impl_linux.cc 2018-07-21 00:28:47.747286000 +0200
|
||||
@@ -44,9 +44,13 @@
|
||||
SwapMetricsDriver::SwapMetricsUpdateResult
|
||||
SwapMetricsDriverImplLinux::UpdateMetricsInternal(base::TimeDelta interval) {
|
||||
base::VmStatInfo vmstat;
|
||||
+#if !defined(OS_BSD)
|
||||
if (!base::GetVmStatInfo(&vmstat)) {
|
||||
return SwapMetricsDriver::SwapMetricsUpdateResult::kSwapMetricsUpdateFailed;
|
||||
}
|
||||
+#else
|
||||
+ return SwapMetricsDriver::SwapMetricsUpdateResult::kSwapMetricsUpdateFailed;
|
||||
+#endif
|
||||
|
||||
uint64_t in_counts = vmstat.pswpin - last_pswpin_;
|
||||
uint64_t out_counts = vmstat.pswpout - last_pswpout_;
|
|
@ -1,7 +1,7 @@
|
|||
--- content/browser/renderer_host/render_message_filter.cc.orig 2018-02-24 16:25:14.000000000 +0100
|
||||
+++ content/browser/renderer_host/render_message_filter.cc 2018-03-04 01:08:51.920706000 +0100
|
||||
@@ -80,7 +80,7 @@
|
||||
#include "content/common/mac/font_loader.h"
|
||||
--- content/browser/renderer_host/render_message_filter.cc.orig 2018-06-13 00:10:17.000000000 +0200
|
||||
+++ content/browser/renderer_host/render_message_filter.cc 2018-07-19 11:46:53.426069000 +0200
|
||||
@@ -76,7 +76,7 @@
|
||||
#if defined(OS_MACOSX)
|
||||
#include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
|
||||
#endif
|
||||
-#if defined(OS_LINUX)
|
||||
|
@ -9,8 +9,8 @@
|
|||
#include "base/linux_util.h"
|
||||
#include "base/threading/platform_thread.h"
|
||||
#endif
|
||||
@@ -211,7 +211,7 @@
|
||||
#endif // defined(OS_MACOSX)
|
||||
@@ -194,7 +194,7 @@
|
||||
std::move(callback).Run(route_id);
|
||||
}
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
|
@ -18,12 +18,12 @@
|
|||
void RenderMessageFilter::SetThreadPriorityOnFileThread(
|
||||
base::PlatformThreadId ns_tid,
|
||||
base::ThreadPriority priority) {
|
||||
@@ -234,7 +234,7 @@
|
||||
@@ -215,7 +215,7 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
void RenderMessageFilter::SetThreadPriority(int32_t ns_tid,
|
||||
base::ThreadPriority priority) {
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
void RenderMessageFilter::SetThreadPriority(int32_t ns_tid,
|
||||
base::ThreadPriority priority) {
|
||||
constexpr base::TaskTraits kTraits = {
|
||||
base::MayBlock(), base::TaskPriority::USER_BLOCKING,
|
||||
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN};
|
||||
|
|
|
@ -1,11 +1,19 @@
|
|||
--- content/browser/renderer_host/render_message_filter.h.orig 2017-06-05 19:03:07 UTC
|
||||
+++ content/browser/renderer_host/render_message_filter.h
|
||||
@@ -130,7 +130,7 @@ class CONTENT_EXPORT RenderMessageFilter
|
||||
bool has_gpu);
|
||||
--- content/browser/renderer_host/render_message_filter.h.orig 2018-06-13 00:10:17.000000000 +0200
|
||||
+++ content/browser/renderer_host/render_message_filter.h 2018-07-20 17:25:54.254096000 +0200
|
||||
@@ -114,14 +114,14 @@
|
||||
const url::Origin& cache_storage_origin,
|
||||
const std::string& cache_storage_cache_name) override;
|
||||
void HasGpuProcess(HasGpuProcessCallback callback) override;
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
void SetThreadPriority(int32_t ns_tid,
|
||||
base::ThreadPriority priority) override;
|
||||
#endif
|
||||
|
||||
void OnResolveProxy(const GURL& url, IPC::Message* reply_msg);
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
void SetThreadPriorityOnFileThread(base::PlatformThreadId ns_tid,
|
||||
base::ThreadPriority priority);
|
||||
void OnSetThreadPriority(base::PlatformThreadId ns_tid,
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
--- content/browser/webui/web_ui_data_source_impl.cc.orig 2018-07-19 22:40:51.613006000 +0200
|
||||
+++ content/browser/webui/web_ui_data_source_impl.cc 2018-07-19 22:47:18.163395000 +0200
|
||||
@@ -112,24 +112,24 @@
|
||||
WebUIDataSourceImpl::~WebUIDataSourceImpl() {
|
||||
}
|
||||
|
||||
-void WebUIDataSourceImpl::AddString(base::StringPiece name,
|
||||
+void WebUIDataSourceImpl::AddString(const std::string& name,
|
||||
const base::string16& value) {
|
||||
// TODO(dschuyler): Share only one copy of these strings.
|
||||
localized_strings_.SetKey(name, base::Value(value));
|
||||
- replacements_[name.as_string()] = base::UTF16ToUTF8(value);
|
||||
+ replacements_[name] = base::UTF16ToUTF8(value);
|
||||
}
|
||||
|
||||
-void WebUIDataSourceImpl::AddString(base::StringPiece name,
|
||||
+void WebUIDataSourceImpl::AddString(const std::string& name,
|
||||
const std::string& value) {
|
||||
localized_strings_.SetKey(name, base::Value(value));
|
||||
- replacements_[name.as_string()] = value;
|
||||
+ replacements_[name] = value;
|
||||
}
|
||||
|
||||
-void WebUIDataSourceImpl::AddLocalizedString(base::StringPiece name, int ids) {
|
||||
+void WebUIDataSourceImpl::AddLocalizedString(const std::string& name, int ids) {
|
||||
std::string utf8_str =
|
||||
base::UTF16ToUTF8(GetContentClient()->GetLocalizedString(ids));
|
||||
localized_strings_.SetKey(name, base::Value(utf8_str));
|
||||
- replacements_[name.as_string()] = utf8_str;
|
||||
+ replacements_[name] = utf8_str;
|
||||
}
|
||||
|
||||
void WebUIDataSourceImpl::AddLocalizedStrings(
|
||||
@@ -139,7 +139,7 @@
|
||||
&replacements_);
|
||||
}
|
||||
|
||||
-void WebUIDataSourceImpl::AddBoolean(base::StringPiece name, bool value) {
|
||||
+void WebUIDataSourceImpl::AddBoolean(const std::string& name, bool value) {
|
||||
localized_strings_.SetBoolean(name, value);
|
||||
// TODO(dschuyler): Change name of |localized_strings_| to |load_time_data_|
|
||||
// or similar. These values haven't been found as strings for
|
||||
@@ -148,21 +148,21 @@
|
||||
// replacements.
|
||||
}
|
||||
|
||||
-void WebUIDataSourceImpl::AddInteger(base::StringPiece name, int32_t value) {
|
||||
+void WebUIDataSourceImpl::AddInteger(const std::string& name, int32_t value) {
|
||||
localized_strings_.SetInteger(name, value);
|
||||
}
|
||||
|
||||
-void WebUIDataSourceImpl::SetJsonPath(base::StringPiece path) {
|
||||
+void WebUIDataSourceImpl::SetJsonPath(const std::string& path) {
|
||||
DCHECK(json_path_.empty());
|
||||
DCHECK(!path.empty());
|
||||
|
||||
- json_path_ = path.as_string();
|
||||
+ json_path_ = path;
|
||||
excluded_paths_.insert(json_path_);
|
||||
}
|
||||
|
||||
-void WebUIDataSourceImpl::AddResourcePath(base::StringPiece path,
|
||||
+void WebUIDataSourceImpl::AddResourcePath(const std::string &path,
|
||||
int resource_id) {
|
||||
- path_to_idr_map_[path.as_string()] = resource_id;
|
||||
+ path_to_idr_map_[path] = resource_id;
|
||||
}
|
||||
|
||||
void WebUIDataSourceImpl::SetDefaultResource(int resource_id) {
|
|
@ -0,0 +1,25 @@
|
|||
--- content/browser/webui/web_ui_data_source_impl.h.orig 2018-07-19 22:41:03.715788000 +0200
|
||||
+++ content/browser/webui/web_ui_data_source_impl.h 2018-07-19 22:49:20.849552000 +0200
|
||||
@@ -30,15 +30,15 @@
|
||||
public WebUIDataSource {
|
||||
public:
|
||||
// WebUIDataSource implementation:
|
||||
- void AddString(base::StringPiece name, const base::string16& value) override;
|
||||
- void AddString(base::StringPiece name, const std::string& value) override;
|
||||
- void AddLocalizedString(base::StringPiece name, int ids) override;
|
||||
+ void AddString(const std::string& name, const base::string16& value) override;
|
||||
+ void AddString(const std::string& name, const std::string& value) override;
|
||||
+ void AddLocalizedString(const std::string& name, int ids) override;
|
||||
void AddLocalizedStrings(
|
||||
const base::DictionaryValue& localized_strings) override;
|
||||
- void AddBoolean(base::StringPiece name, bool value) override;
|
||||
- void AddInteger(base::StringPiece name, int32_t value) override;
|
||||
- void SetJsonPath(base::StringPiece path) override;
|
||||
- void AddResourcePath(base::StringPiece path, int resource_id) override;
|
||||
+ void AddBoolean(const std::string& name, bool value) override;
|
||||
+ void AddInteger(const std::string& name, int32_t value) override;
|
||||
+ void SetJsonPath(const std::string& path) override;
|
||||
+ void AddResourcePath(const std::string& path, int resource_id) override;
|
||||
void SetDefaultResource(int resource_id) override;
|
||||
void SetRequestFilter(
|
||||
const WebUIDataSource::HandleRequestCallback& callback) override;
|
|
@ -0,0 +1,14 @@
|
|||
--- content/browser/webui/web_ui_impl.cc.orig 2018-07-19 22:41:18.526274000 +0200
|
||||
+++ content/browser/webui/web_ui_impl.cc 2018-07-19 22:50:47.735965000 +0200
|
||||
@@ -247,9 +247,9 @@
|
||||
ExecuteJavascript(GetJavascriptCall(function_name, args));
|
||||
}
|
||||
|
||||
-void WebUIImpl::RegisterMessageCallback(base::StringPiece message,
|
||||
+void WebUIImpl::RegisterMessageCallback(const std::string &message,
|
||||
const MessageCallback& callback) {
|
||||
- message_callbacks_.emplace(message, callback);
|
||||
+ message_callbacks_.insert(std::make_pair(message, callback));
|
||||
}
|
||||
|
||||
void WebUIImpl::ProcessWebUIMessage(const GURL& source_url,
|
11
www/chromium/files/patch-content_browser_webui_web_ui_impl.h
Normal file
11
www/chromium/files/patch-content_browser_webui_web_ui_impl.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- content/browser/webui/web_ui_impl.h.orig 2018-07-19 22:41:27.362717000 +0200
|
||||
+++ content/browser/webui/web_ui_impl.h 2018-07-19 22:51:17.719203000 +0200
|
||||
@@ -52,7 +52,7 @@
|
||||
int GetBindings() const override;
|
||||
void SetBindings(int bindings) override;
|
||||
void AddMessageHandler(std::unique_ptr<WebUIMessageHandler> handler) override;
|
||||
- void RegisterMessageCallback(base::StringPiece message,
|
||||
+ void RegisterMessageCallback(const std::string& message,
|
||||
const MessageCallback& callback) override;
|
||||
void ProcessWebUIMessage(const GURL& source_url,
|
||||
const std::string& message,
|
|
@ -0,0 +1,40 @@
|
|||
--- 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
|
||||
@@ -72,6 +72,7 @@
|
||||
}
|
||||
|
||||
void ZygoteHostImpl::Init(const base::CommandLine& command_line) {
|
||||
+#if !defined(OS_BSD)
|
||||
if (command_line.HasSwitch(switches::kNoSandbox)) {
|
||||
return;
|
||||
}
|
||||
@@ -130,6 +131,7 @@
|
||||
"you can try using --"
|
||||
<< switches::kNoSandbox << ".";
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
void ZygoteHostImpl::AddZygotePid(pid_t pid) {
|
||||
@@ -154,6 +156,7 @@
|
||||
base::CommandLine* cmd_line,
|
||||
base::ScopedFD* control_fd,
|
||||
base::FileHandleMappingVector additional_remapped_fds) {
|
||||
+#if !defined(OS_BSD)
|
||||
int fds[2];
|
||||
CHECK_EQ(0, socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds));
|
||||
CHECK(base::UnixDomainSocket::EnableReceiveProcessId(fds[0]));
|
||||
@@ -218,9 +221,12 @@
|
||||
|
||||
AddZygotePid(pid);
|
||||
return pid;
|
||||
+#else
|
||||
+ return 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
-#if !defined(OS_OPENBSD)
|
||||
+#if !defined(OS_BSD)
|
||||
void ZygoteHostImpl::AdjustRendererOOMScore(base::ProcessHandle pid,
|
||||
int score) {
|
||||
// 1) You can't change the oom_score_adj of a non-dumpable process
|
|
@ -1,10 +1,10 @@
|
|||
--- content/browser/zygote_host/zygote_host_impl_linux.h.orig 2017-09-07 23:31:20.865003000 +0200
|
||||
+++ content/browser/zygote_host/zygote_host_impl_linux.h 2017-09-07 23:32:15.495651000 +0200
|
||||
@@ -37,8 +37,10 @@
|
||||
int GetRendererSandboxStatus() const override;
|
||||
--- 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 @@
|
||||
base::ScopedFD* control_fd,
|
||||
base::FileHandleMappingVector additional_remapped_fds);
|
||||
|
||||
pid_t LaunchZygote(base::CommandLine* cmd_line, base::ScopedFD* control_fd);
|
||||
+#if !defined(OS_FREEBSD)
|
||||
+#if !defined(OS_BSD)
|
||||
void AdjustRendererOOMScore(base::ProcessHandle process_handle,
|
||||
int score) override;
|
||||
+#endif
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
--- content/common/BUILD.gn.orig 2018-03-20 23:05:24.000000000 +0100
|
||||
+++ content/common/BUILD.gn 2018-03-29 12:47:23.480593000 +0200
|
||||
@@ -431,6 +431,13 @@
|
||||
--- content/common/BUILD.gn.orig 2018-06-13 00:10:17.000000000 +0200
|
||||
+++ content/common/BUILD.gn 2018-07-20 00:38:14.267181000 +0200
|
||||
@@ -430,6 +430,12 @@
|
||||
libs += [ "android" ]
|
||||
}
|
||||
|
||||
+ if (is_bsd) {
|
||||
+ sources -= [
|
||||
+ "quarantine/quarantine_linux.cc",
|
||||
+ "sandbox_init_linux.cc",
|
||||
+ ]
|
||||
+ }
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- content/gpu/BUILD.gn.orig 2018-03-04 17:22:26.995017000 +0100
|
||||
+++ content/gpu/BUILD.gn 2018-03-04 17:22:46.556822000 +0100
|
||||
@@ -121,7 +121,7 @@
|
||||
}
|
||||
--- content/gpu/BUILD.gn.orig 2018-06-13 00:10:17.000000000 +0200
|
||||
+++ content/gpu/BUILD.gn 2018-07-19 12:07:20.670815000 +0200
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
# Use DRI on desktop Linux builds.
|
||||
- if (is_desktop_linux && (!is_chromecast || is_cast_desktop_build)) {
|
||||
+ if (is_desktop_linux && (!is_chromecast || is_cast_desktop_build) && !is_bsd) {
|
||||
if (current_cpu != "s390x" && current_cpu != "ppc64" && is_desktop_linux &&
|
||||
- (!is_chromecast || is_cast_desktop_build)) {
|
||||
+ (!is_chromecast || is_cast_desktop_build) && !is_bsd) {
|
||||
configs += [ "//build/config/linux/dri" ]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
--- content/network/BUILD.gn.orig 2018-03-29 12:51:25.325665000 +0200
|
||||
+++ content/network/BUILD.gn 2018-03-29 12:56:34.023437000 +0200
|
||||
@@ -75,6 +75,10 @@
|
||||
"url_request_context_builder_mojo.cc",
|
||||
]
|
||||
|
||||
+ if (is_bsd) {
|
||||
+ sources -= [ "network_sandbox_hook_linux.cc" ]
|
||||
+ }
|
||||
+
|
||||
configs += [ "//content:content_implementation" ]
|
||||
|
||||
deps = [
|
19
www/chromium/files/patch-content_public_browser_web_ui.h
Normal file
19
www/chromium/files/patch-content_public_browser_web_ui.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
--- content/public/browser/web_ui.h.orig 2018-07-20 15:49:47.533832000 +0200
|
||||
+++ content/public/browser/web_ui.h 2018-07-20 15:50:46.750401000 +0200
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/strings/string16.h"
|
||||
-#include "base/strings/string_piece.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "ui/base/page_transition_types.h"
|
||||
|
||||
@@ -73,7 +72,7 @@
|
||||
// Used by WebUIMessageHandlers. If the given message is already registered,
|
||||
// the call has no effect.
|
||||
using MessageCallback = base::RepeatingCallback<void(const base::ListValue*)>;
|
||||
- virtual void RegisterMessageCallback(base::StringPiece message,
|
||||
+ virtual void RegisterMessageCallback(const std::string& message,
|
||||
const MessageCallback& callback) = 0;
|
||||
|
||||
// This is only needed if an embedder overrides handling of a WebUIMessage and
|
|
@ -0,0 +1,51 @@
|
|||
--- content/public/browser/web_ui_data_source.h.orig 2018-07-20 15:50:02.520469000 +0200
|
||||
+++ content/public/browser/web_ui_data_source.h 2018-07-20 15:53:16.811577000 +0200
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/strings/string16.h"
|
||||
-#include "base/strings/string_piece.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
||||
namespace base {
|
||||
@@ -45,33 +44,33 @@
|
||||
std::unique_ptr<base::DictionaryValue> update);
|
||||
|
||||
// Adds a string keyed to its name to our dictionary.
|
||||
- virtual void AddString(base::StringPiece name,
|
||||
+ virtual void AddString(const std::string& name,
|
||||
const base::string16& value) = 0;
|
||||
|
||||
// Adds a string keyed to its name to our dictionary.
|
||||
- virtual void AddString(base::StringPiece name, const std::string& value) = 0;
|
||||
+ virtual void AddString(const std::string& name, const std::string& value) = 0;
|
||||
|
||||
// Adds a localized string with resource |ids| keyed to its name to our
|
||||
// dictionary.
|
||||
- virtual void AddLocalizedString(base::StringPiece name, int ids) = 0;
|
||||
+ virtual void AddLocalizedString(const std::string& name, int ids) = 0;
|
||||
|
||||
// Add strings from |localized_strings| to our dictionary.
|
||||
virtual void AddLocalizedStrings(
|
||||
const base::DictionaryValue& localized_strings) = 0;
|
||||
|
||||
// Adds a boolean keyed to its name to our dictionary.
|
||||
- virtual void AddBoolean(base::StringPiece name, bool value) = 0;
|
||||
+ virtual void AddBoolean(const std::string& name, bool value) = 0;
|
||||
|
||||
// Adds a signed 32-bit integer keyed to its name to our dictionary. Larger
|
||||
// integers may not be exactly representable in JavaScript. See
|
||||
// MAX_SAFE_INTEGER in /v8/src/globals.h.
|
||||
- virtual void AddInteger(base::StringPiece name, int32_t value) = 0;
|
||||
+ virtual void AddInteger(const std::string& name, int32_t value) = 0;
|
||||
|
||||
// Sets the path which will return the JSON strings.
|
||||
- virtual void SetJsonPath(base::StringPiece path) = 0;
|
||||
+ virtual void SetJsonPath(const std::string& path) = 0;
|
||||
|
||||
// Adds a mapping between a path name and a resource to return.
|
||||
- virtual void AddResourcePath(base::StringPiece path, int resource_id) = 0;
|
||||
+ virtual void AddResourcePath(const std::string& path, int resource_id) = 0;
|
||||
|
||||
// Sets the resource to returned when no other paths match.
|
||||
virtual void SetDefaultResource(int resource_id) = 0;
|
|
@ -0,0 +1,11 @@
|
|||
--- content/renderer/media/stream/processed_local_audio_source.cc.orig 2018-07-19 12:34:51.152323000 +0200
|
||||
+++ content/renderer/media/stream/processed_local_audio_source.cc 2018-07-19 12:35:37.574081000 +0200
|
||||
@@ -282,7 +282,7 @@
|
||||
bool key_pressed) {
|
||||
#if defined(OS_WIN) || defined(OS_MACOSX)
|
||||
DCHECK_LE(volume, 1.0);
|
||||
-#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_OPENBSD)
|
||||
+#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
|
||||
// We have a special situation on Linux where the microphone volume can be
|
||||
// "higher than maximum". The input volume slider in the sound preference
|
||||
// allows the user to set a scaling that is higher than 100%. It means that
|
|
@ -1,13 +0,0 @@
|
|||
--- content/renderer/media/webrtc/processed_local_audio_source.cc.orig 2017-06-05 19:03:07 UTC
|
||||
+++ content/renderer/media/webrtc/processed_local_audio_source.cc
|
||||
@@ -269,8 +269,8 @@ void ProcessedLocalAudioSource::Capture(const media::A
|
||||
bool key_pressed) {
|
||||
#if defined(OS_WIN) || defined(OS_MACOSX)
|
||||
DCHECK_LE(volume, 1.0);
|
||||
-#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_OPENBSD)
|
||||
- // We have a special situation on Linux where the microphone volume can be
|
||||
+#elif defined(OS_POSIX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ // We have a special situation on POSIX where the microphone volume can be
|
||||
// "higher than maximum". The input volume slider in the sound preference
|
||||
// allows the user to set a scaling that is higher than 100%. It means that
|
||||
// even if the reported maximum levels is N, the actual microphone level can
|
|
@ -1,6 +1,6 @@
|
|||
--- content/renderer/render_thread_impl.cc.orig 2018-02-24 16:25:14.000000000 +0100
|
||||
+++ content/renderer/render_thread_impl.cc 2018-03-04 01:40:50.991485000 +0100
|
||||
@@ -224,12 +224,22 @@
|
||||
--- 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 @@
|
||||
#include "content/common/external_ipc_dumper.h"
|
||||
#endif
|
||||
|
||||
|
@ -17,13 +17,12 @@
|
|||
+#include <stdint.h>
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/sysctl.h>
|
||||
+#include <sys/user.h>
|
||||
+#endif
|
||||
+
|
||||
using base::ThreadRestrictions;
|
||||
using blink::WebDocument;
|
||||
using blink::WebFrame;
|
||||
@@ -973,7 +983,7 @@
|
||||
@@ -1096,7 +1105,7 @@
|
||||
GetConnector()->BindInterface(mojom::kBrowserServiceName,
|
||||
mojo::MakeRequest(&storage_partition_service_));
|
||||
|
||||
|
@ -32,17 +31,17 @@
|
|||
render_message_filter()->SetThreadPriority(
|
||||
ChildProcess::current()->io_thread_id(), base::ThreadPriority::DISPLAY);
|
||||
render_message_filter()->SetThreadPriority(
|
||||
@@ -1184,7 +1194,7 @@
|
||||
FROM_HERE,
|
||||
base::BindOnce(base::IgnoreResult(&ThreadRestrictions::SetIOAllowed),
|
||||
@@ -1304,7 +1313,7 @@
|
||||
false));
|
||||
GetContentClient()->renderer()->PostCompositorThreadCreated(
|
||||
compositor_task_runner_.get());
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
render_message_filter()->SetThreadPriority(compositor_thread_->ThreadId(),
|
||||
base::ThreadPriority::DISPLAY);
|
||||
#endif
|
||||
@@ -1499,7 +1509,7 @@
|
||||
!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
|
||||
@@ -1584,7 +1593,7 @@
|
||||
gpu::kGpuFeatureStatusEnabled);
|
||||
const bool enable_gpu_memory_buffer_video_frames =
|
||||
!is_gpu_compositing_disabled_ &&
|
||||
-#if defined(OS_MACOSX) || defined(OS_LINUX)
|
||||
|
@ -50,30 +49,3 @@
|
|||
!cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames);
|
||||
#elif defined(OS_WIN)
|
||||
!cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames) &&
|
||||
@@ -1847,7 +1857,26 @@
|
||||
blink_stats.blink_gc_total_allocated_bytes / 1024;
|
||||
std::unique_ptr<base::ProcessMetrics> metric(
|
||||
base::ProcessMetrics::CreateCurrentProcessMetrics());
|
||||
+#if defined(OS_BSD)
|
||||
+ struct kinfo_proc *info;
|
||||
+ size_t length, malloc_usage = 0;
|
||||
+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid(),
|
||||
+ sizeof(struct kinfo_proc), 0 };
|
||||
+
|
||||
+ if (sysctl(mib, arraysize(mib), NULL, &length, NULL, 0) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ info = (struct kinfo_proc *)malloc(length);
|
||||
+
|
||||
+ mib[5] = (length / sizeof(struct kinfo_proc));
|
||||
+
|
||||
+ if (!sysctl(mib, arraysize(mib), info, &length, NULL, 0))
|
||||
+ malloc_usage = (((unsigned long long)(info->ki_tsize + info->ki_dsize + info->ki_ssize)*getpagesize()));
|
||||
+
|
||||
+ free(info);
|
||||
+#else
|
||||
size_t malloc_usage = metric->GetMallocUsage();
|
||||
+#endif
|
||||
memory_metrics->malloc_mb = malloc_usage / 1024 / 1024;
|
||||
|
||||
discardable_memory::ClientDiscardableSharedMemoryManager::Statistics
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- content/renderer/renderer_blink_platform_impl.cc.orig 2017-12-15 02:04:18.000000000 +0100
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc 2017-12-31 05:15:48.537395000 +0100
|
||||
@@ -124,7 +124,7 @@
|
||||
--- content/renderer/renderer_blink_platform_impl.cc.orig 2018-06-13 00:10:17.000000000 +0200
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc 2018-07-19 13:00:02.053483000 +0200
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
#if defined(OS_POSIX)
|
||||
#include "base/file_descriptor_posix.h"
|
||||
|
@ -9,7 +9,7 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
@@ -249,7 +249,7 @@
|
||||
scoped_refptr<mojom::ThreadSafeFileUtilitiesHostPtr> file_utilities_host_;
|
||||
};
|
||||
|
||||
|
@ -18,16 +18,16 @@
|
|||
class RendererBlinkPlatformImpl::SandboxSupport
|
||||
: public blink::WebSandboxSupport {
|
||||
public:
|
||||
@@ -267,7 +267,7 @@
|
||||
default_task_runner_(renderer_scheduler->DefaultTaskRunner()),
|
||||
@@ -293,7 +293,7 @@
|
||||
default_task_runner_(main_thread_scheduler->DefaultTaskRunner()),
|
||||
web_scrollbar_behavior_(new WebScrollbarBehaviorImpl),
|
||||
renderer_scheduler_(renderer_scheduler) {
|
||||
main_thread_scheduler_(main_thread_scheduler) {
|
||||
-#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA)
|
||||
+#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FUCHSIA) && !defined(OS_BSD)
|
||||
if (g_sandbox_enabled && sandboxEnabled()) {
|
||||
sandbox_support_.reset(new RendererBlinkPlatformImpl::SandboxSupport);
|
||||
} else {
|
||||
@@ -316,7 +316,7 @@
|
||||
@@ -341,7 +341,7 @@
|
||||
}
|
||||
|
||||
void RendererBlinkPlatformImpl::Shutdown() {
|
||||
|
@ -36,7 +36,7 @@
|
|||
// SandboxSupport contains a map of WebFallbackFont objects, which hold
|
||||
// WebStrings and WebVectors, which become invalidated when blink is shut
|
||||
// down. Hence, we need to clear that map now, just before blink::shutdown()
|
||||
@@ -417,7 +417,7 @@
|
||||
@@ -449,7 +449,7 @@
|
||||
}
|
||||
|
||||
blink::WebSandboxSupport* RendererBlinkPlatformImpl::GetSandboxSupport() {
|
||||
|
@ -45,8 +45,8 @@
|
|||
// These platforms do not require sandbox support.
|
||||
return NULL;
|
||||
#else
|
||||
@@ -610,7 +610,7 @@
|
||||
return FontLoader::CGFontRefFromBuffer(font_data, font_data_size, out);
|
||||
@@ -657,7 +657,7 @@
|
||||
return content::LoadFont(src_font, out, font_id);
|
||||
}
|
||||
|
||||
-#elif defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- device/sensors/data_fetcher_shared_memory.h.orig 2017-06-05 19:03:07 UTC
|
||||
+++ device/sensors/data_fetcher_shared_memory.h
|
||||
@@ -44,7 +44,7 @@ class DEVICE_SENSOR_EXPORT DataFetcherSharedMemory
|
||||
bool Start(ConsumerType consumer_type, void* buffer) override;
|
||||
bool Stop(ConsumerType consumer_type) override;
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
|
||||
+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
|
||||
#if !defined(OS_CHROMEOS)
|
||||
DeviceMotionHardwareBuffer* motion_buffer_ = nullptr;
|
||||
DeviceOrientationHardwareBuffer* orientation_buffer_ = nullptr;
|
|
@ -1,20 +1,6 @@
|
|||
--- device/usb/usb_context.cc.orig 2017-06-05 19:03:07 UTC
|
||||
+++ device/usb/usb_context.cc
|
||||
@@ -9,8 +9,13 @@
|
||||
#include "base/macros.h"
|
||||
#include "base/threading/simple_thread.h"
|
||||
#include "device/usb/usb_error.h"
|
||||
+#if defined(OS_FREEBSD)
|
||||
+#include "libusb.h"
|
||||
+#define LIBUSB_CALL
|
||||
+#else
|
||||
#include "third_party/libusb/src/libusb/interrupt.h"
|
||||
#include "third_party/libusb/src/libusb/libusb.h"
|
||||
+#endif
|
||||
|
||||
namespace device {
|
||||
|
||||
@@ -58,7 +63,9 @@ void UsbContext::UsbEventHandler::Run() {
|
||||
--- device/usb/usb_context.cc.orig 2018-06-13 00:10:18.000000000 +0200
|
||||
+++ device/usb/usb_context.cc 2018-07-20 12:52:29.240720000 +0200
|
||||
@@ -58,7 +58,9 @@
|
||||
|
||||
void UsbContext::UsbEventHandler::Stop() {
|
||||
base::subtle::Release_Store(&running_, 0);
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
--- device/usb/usb_context_unittest.cc.orig 2017-04-19 19:06:34 UTC
|
||||
+++ device/usb/usb_context_unittest.cc
|
||||
@@ -7,7 +7,11 @@
|
||||
#include "build/build_config.h"
|
||||
#include "device/usb/usb_context.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
+#if defined(OS_FREEBSD)
|
||||
+#include "libusb.h"
|
||||
+#else
|
||||
#include "third_party/libusb/src/libusb/libusb.h"
|
||||
+#endif
|
||||
|
||||
namespace device {
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
--- device/usb/usb_device_handle_impl.cc.orig 2018-03-20 23:05:25.000000000 +0100
|
||||
+++ device/usb/usb_device_handle_impl.cc 2018-03-24 17:28:45.532305000 +0100
|
||||
@@ -25,7 +25,11 @@
|
||||
#include "device/usb/usb_device_impl.h"
|
||||
#include "device/usb/usb_error.h"
|
||||
#include "device/usb/usb_service.h"
|
||||
+#if defined(OS_FREEBSD)
|
||||
+#include "libusb.h"
|
||||
+#else
|
||||
#include "third_party/libusb/src/libusb/libusb.h"
|
||||
+#endif
|
||||
|
||||
namespace device {
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
--- device/usb/usb_device_handle_impl.h.orig 2017-04-19 19:06:34 UTC
|
||||
+++ device/usb/usb_device_handle_impl.h
|
||||
@@ -18,7 +18,12 @@
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/threading/thread_checker.h"
|
||||
#include "device/usb/usb_device_handle.h"
|
||||
+#if defined(OS_FREEBSD)
|
||||
+#include "libusb.h"
|
||||
+#define LIBUSB_CALL
|
||||
+#else
|
||||
#include "third_party/libusb/src/libusb/libusb.h"
|
||||
+#endif
|
||||
|
||||
namespace base {
|
||||
class SequencedTaskRunner;
|
|
@ -1,14 +0,0 @@
|
|||
--- device/usb/usb_device_impl.cc.orig 2017-07-25 21:04:56.000000000 +0200
|
||||
+++ device/usb/usb_device_impl.cc 2017-08-02 13:51:03.580494000 +0200
|
||||
@@ -24,7 +24,11 @@
|
||||
#include "device/usb/usb_device_handle_impl.h"
|
||||
#include "device/usb/usb_error.h"
|
||||
#include "device/usb/usb_service.h"
|
||||
+#if defined(OS_FREEBSD)
|
||||
+#include "libusb.h"
|
||||
+#else
|
||||
#include "third_party/libusb/src/libusb/libusb.h"
|
||||
+#endif
|
||||
|
||||
namespace device {
|
||||
|
|
@ -1,14 +1,11 @@
|
|||
--- device/usb/usb_error.cc.orig 2017-04-19 19:06:34 UTC
|
||||
+++ device/usb/usb_error.cc
|
||||
@@ -4,7 +4,11 @@
|
||||
|
||||
#include "device/usb/usb_error.h"
|
||||
|
||||
+#if defined(OS_FREEBSD)
|
||||
+#include "libusb.h"
|
||||
+#else
|
||||
#include "third_party/libusb/src/libusb/libusb.h"
|
||||
+#endif
|
||||
|
||||
--- device/usb/usb_error.cc.orig 2018-06-13 00:10:18.000000000 +0200
|
||||
+++ device/usb/usb_error.cc 2018-07-20 12:55:34.901660000 +0200
|
||||
@@ -9,7 +9,7 @@
|
||||
namespace device {
|
||||
|
||||
std::string ConvertPlatformUsbErrorToString(int errcode) {
|
||||
- return libusb_strerror(static_cast<libusb_error>(errcode));
|
||||
+ return "";
|
||||
}
|
||||
|
||||
} // namespace device
|
||||
|
|
|
@ -1,18 +1,6 @@
|
|||
--- device/usb/usb_service_impl.cc.orig 2018-03-20 23:05:25.000000000 +0100
|
||||
+++ device/usb/usb_service_impl.cc 2018-03-24 17:34:53.453193000 +0100
|
||||
@@ -27,7 +27,11 @@
|
||||
#include "device/usb/usb_device_handle.h"
|
||||
#include "device/usb/usb_error.h"
|
||||
#include "device/usb/webusb_descriptors.h"
|
||||
+#if defined(OS_FREEBSD)
|
||||
+#include "libusb.h"
|
||||
+#else
|
||||
#include "third_party/libusb/src/libusb/libusb.h"
|
||||
+#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#define INITGUID
|
||||
@@ -227,8 +231,10 @@
|
||||
--- device/usb/usb_service_impl.cc.orig 2018-06-13 00:10:18.000000000 +0200
|
||||
+++ device/usb/usb_service_impl.cc 2018-07-20 12:49:59.699912000 +0200
|
||||
@@ -239,8 +239,10 @@
|
||||
}
|
||||
|
||||
UsbServiceImpl::~UsbServiceImpl() {
|
||||
|
@ -20,10 +8,10 @@
|
|||
if (hotplug_enabled_)
|
||||
libusb_hotplug_deregister_callback(context_->context(), hotplug_handle_);
|
||||
+#endif // !defined(OS_FREEBSD)
|
||||
for (auto* platform_device : ignored_devices_)
|
||||
libusb_unref_device(platform_device);
|
||||
}
|
||||
@@ -285,6 +291,7 @@
|
||||
|
||||
void UsbServiceImpl::GetDevices(const GetDevicesCallback& callback) {
|
||||
@@ -295,6 +297,7 @@
|
||||
|
||||
context_ = std::move(context);
|
||||
|
||||
|
@ -31,7 +19,7 @@
|
|||
int rv = libusb_hotplug_register_callback(
|
||||
context_->context(),
|
||||
static_cast<libusb_hotplug_event>(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED |
|
||||
@@ -297,6 +304,7 @@
|
||||
@@ -307,6 +310,7 @@
|
||||
|
||||
// This will call any enumeration callbacks queued while initializing.
|
||||
RefreshDevices();
|
||||
|
@ -39,19 +27,19 @@
|
|||
|
||||
#if defined(OS_WIN)
|
||||
DeviceMonitorWin* device_monitor = DeviceMonitorWin::GetForAllInterfaces();
|
||||
@@ -496,6 +504,7 @@
|
||||
@@ -503,6 +507,7 @@
|
||||
device->OnDisconnect();
|
||||
}
|
||||
|
||||
+#if !defined(OS_FREEBSD)
|
||||
// static
|
||||
int LIBUSB_CALL UsbServiceImpl::HotplugCallback(libusb_context* context,
|
||||
PlatformUsbDevice device,
|
||||
@@ -526,6 +535,7 @@
|
||||
libusb_device* device_raw,
|
||||
@@ -537,6 +542,7 @@
|
||||
|
||||
return 0;
|
||||
}
|
||||
+#endif // !defined(OS_FREEBSD)
|
||||
|
||||
void UsbServiceImpl::OnPlatformDeviceAdded(PlatformUsbDevice platform_device) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
void UsbServiceImpl::OnPlatformDeviceAdded(
|
||||
ScopedLibusbDeviceRef platform_device) {
|
||||
|
|
|
@ -1,35 +1,20 @@
|
|||
--- device/usb/usb_service_impl.h.orig 2017-06-05 19:03:07 UTC
|
||||
+++ device/usb/usb_service_impl.h
|
||||
@@ -15,8 +15,14 @@
|
||||
#include "build/build_config.h"
|
||||
#include "device/usb/usb_context.h"
|
||||
#include "device/usb/usb_device_impl.h"
|
||||
+#if defined(OS_FREEBSD)
|
||||
+#include "libusb.h"
|
||||
+#define LIBUSB_CALL
|
||||
+#else
|
||||
#include "third_party/libusb/src/libusb/libusb.h"
|
||||
+#endif
|
||||
|
||||
+
|
||||
#if defined(OS_WIN)
|
||||
#include "base/scoped_observer.h"
|
||||
#include "device/base/device_monitor_win.h"
|
||||
@@ -73,11 +79,13 @@ class UsbServiceImpl :
|
||||
--- device/usb/usb_service_impl.h.orig 2018-06-13 00:10:18.000000000 +0200
|
||||
+++ device/usb/usb_service_impl.h 2018-07-20 12:47:42.413625000 +0200
|
||||
@@ -73,11 +73,13 @@
|
||||
scoped_refptr<UsbDeviceImpl> device);
|
||||
void RemoveDevice(scoped_refptr<UsbDeviceImpl> device);
|
||||
|
||||
+#if !defined(OS_FREEBSD)
|
||||
// Handle hotplug events from libusb.
|
||||
static int LIBUSB_CALL HotplugCallback(libusb_context* context,
|
||||
PlatformUsbDevice device,
|
||||
libusb_device* device,
|
||||
libusb_hotplug_event event,
|
||||
void* user_data);
|
||||
+#endif
|
||||
// These functions release a reference to the provided platform device.
|
||||
void OnPlatformDeviceAdded(PlatformUsbDevice platform_device);
|
||||
void OnPlatformDeviceRemoved(PlatformUsbDevice platform_device);
|
||||
@@ -94,7 +102,9 @@ class UsbServiceImpl :
|
||||
void OnPlatformDeviceAdded(ScopedLibusbDeviceRef platform_device);
|
||||
void OnPlatformDeviceRemoved(ScopedLibusbDeviceRef platform_device);
|
||||
@@ -95,7 +97,9 @@
|
||||
// connected instead of only when a full enumeration is requested.
|
||||
// TODO(reillyg): Support this on all platforms. crbug.com/411715
|
||||
bool hotplug_enabled_ = false;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
--- extensions/browser/api/web_request/form_data_parser.cc.orig 2017-04-19 19:06:34 UTC
|
||||
+++ extensions/browser/api/web_request/form_data_parser.cc
|
||||
--- extensions/browser/api/web_request/form_data_parser.cc.orig 2018-06-13 00:10:18.000000000 +0200
|
||||
+++ extensions/browser/api/web_request/form_data_parser.cc 2018-07-19 13:36:19.375722000 +0200
|
||||
@@ -15,7 +15,11 @@
|
||||
#include "base/values.h"
|
||||
#include "net/base/escape.h"
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "net/http/http_request_headers.h"
|
||||
+#if defined(OS_BSD)
|
||||
+#include <re2/re2.h>
|
||||
+#else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- gpu/config/gpu_info_collector_freebsd.cc.orig 2018-03-26 13:34:20.147630000 +0200
|
||||
+++ gpu/config/gpu_info_collector_freebsd.cc 2018-03-26 13:35:09.089367000 +0200
|
||||
@@ -0,0 +1,28 @@
|
||||
--- gpu/config/gpu_info_collector_freebsd.cc.orig 2018-07-20 13:47:10.021258000 +0200
|
||||
+++ gpu/config/gpu_info_collector_freebsd.cc 2018-07-20 15:44:42.380444000 +0200
|
||||
@@ -0,0 +1,20 @@
|
||||
+// Copyright 2017 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.
|
||||
|
@ -9,23 +9,15 @@
|
|||
+
|
||||
+namespace gpu {
|
||||
+
|
||||
+CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) {
|
||||
+bool CollectContextGraphicsInfo(GPUInfo* gpu_info) {
|
||||
+ NOTIMPLEMENTED();
|
||||
+ return kCollectInfoFatalFailure;
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) {
|
||||
+bool CollectBasicGraphicsInfo(GPUInfo* gpu_info) {
|
||||
+ NOTIMPLEMENTED();
|
||||
+ return kCollectInfoFatalFailure;
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+CollectInfoResult CollectDriverInfoGL(GPUInfo* gpu_info) {
|
||||
+ NOTIMPLEMENTED();
|
||||
+ return kCollectInfoFatalFailure;
|
||||
+}
|
||||
+
|
||||
+void MergeGPUInfo(GPUInfo* basic_gpu_info, const GPUInfo& context_gpu_info) {
|
||||
+ MergeGPUInfoGL(basic_gpu_info, context_gpu_info);
|
||||
+}
|
||||
+
|
||||
+} // namespace gpu
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
--- gpu/ipc/client/gpu_memory_buffer_impl.cc.orig 2017-08-02 17:20:25.306294000 +0200
|
||||
+++ gpu/ipc/client/gpu_memory_buffer_impl.cc 2017-08-02 17:20:50.656124000 +0200
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "gpu/ipc/client/gpu_memory_buffer_impl_io_surface.h"
|
||||
#endif
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
#include "gpu/ipc/client/gpu_memory_buffer_impl_native_pixmap.h"
|
||||
#endif
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
return GpuMemoryBufferImplIOSurface::CreateFromHandle(
|
||||
handle, size, format, usage, callback);
|
||||
#endif
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
case gfx::NATIVE_PIXMAP:
|
||||
return GpuMemoryBufferImplNativePixmap::CreateFromHandle(
|
||||
handle, size, format, usage, callback);
|
|
@ -1,15 +1,31 @@
|
|||
--- gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2018-02-24 16:25:15.000000000 +0100
|
||||
+++ gpu/ipc/common/gpu_memory_buffer_support.cc 2018-03-04 02:34:29.021605000 +0100
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "base/logging.h"
|
||||
#include "build/build_config.h"
|
||||
--- gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2018-06-13 00:10:19.000000000 +0200
|
||||
+++ gpu/ipc/common/gpu_memory_buffer_support.cc 2018-07-19 13:54:11.502121000 +0200
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "gpu/ipc/common/gpu_memory_buffer_impl_io_surface.h"
|
||||
#endif
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
#include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h"
|
||||
#include "ui/gfx/client_native_pixmap_factory.h"
|
||||
#include "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h"
|
||||
@@ -36,13 +36,13 @@
|
||||
GpuMemoryBufferSupport::GpuMemoryBufferSupport() {
|
||||
#if defined(USE_OZONE)
|
||||
client_native_pixmap_factory_ = ui::CreateClientNativePixmapFactoryOzone();
|
||||
-#elif defined(OS_LINUX)
|
||||
+#elif defined(OS_LINUX) || defined(OS_BSD)
|
||||
client_native_pixmap_factory_.reset(
|
||||
gfx::CreateClientNativePixmapFactoryDmabuf());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
-#if defined(OS_LINUX) || defined(USE_OZONE)
|
||||
+#if defined(OS_LINUX) || defined(USE_OZONE) || defined(OS_BSD)
|
||||
GpuMemoryBufferSupport::GpuMemoryBufferSupport(
|
||||
std::unique_ptr<gfx::ClientNativePixmapFactory>
|
||||
client_native_pixmap_factory)
|
||||
@@ -57,7 +57,7 @@
|
||||
return gfx::IO_SURFACE_BUFFER;
|
||||
#elif defined(OS_ANDROID)
|
||||
return gfx::ANDROID_HARDWARE_BUFFER;
|
||||
|
@ -18,12 +34,21 @@
|
|||
return gfx::NATIVE_PIXMAP;
|
||||
#elif defined(OS_WIN)
|
||||
return gfx::DXGI_SHARED_HANDLE;
|
||||
@@ -81,7 +81,7 @@
|
||||
}
|
||||
NOTREACHED();
|
||||
@@ -112,7 +112,7 @@
|
||||
return false;
|
||||
#elif defined(USE_OZONE)
|
||||
return client_native_pixmap_factory_->IsConfigurationSupported(format, usage);
|
||||
-#elif defined(OS_LINUX)
|
||||
+#elif defined(OS_LINUX) || defined(OS_BSD)
|
||||
if (!gfx::ClientNativePixmapFactory::GetInstance()) {
|
||||
// unittests don't have to set ClientNativePixmapFactory.
|
||||
return false;
|
||||
return false; // TODO(julian.isorce): Add linux support.
|
||||
#elif defined(OS_WIN)
|
||||
switch (usage) {
|
||||
@@ -168,7 +168,7 @@
|
||||
return GpuMemoryBufferImplIOSurface::CreateFromHandle(
|
||||
handle, size, format, usage, callback);
|
||||
#endif
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
case gfx::NATIVE_PIXMAP:
|
||||
return GpuMemoryBufferImplNativePixmap::CreateFromHandle(
|
||||
client_native_pixmap_factory(), handle, size, format, usage,
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
--- gpu/ipc/common/gpu_memory_buffer_support.h.orig 2018-07-19 13:55:08.335420000 +0200
|
||||
+++ gpu/ipc/common/gpu_memory_buffer_support.h 2018-07-19 13:56:28.243213000 +0200
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "ui/gfx/geometry/size.h"
|
||||
#include "ui/gfx/gpu_memory_buffer.h"
|
||||
|
||||
-#if defined(OS_LINUX) || defined(USE_OZONE)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE)
|
||||
namespace gfx {
|
||||
class ClientNativePixmapFactory;
|
||||
}
|
||||
@@ -29,7 +29,7 @@
|
||||
class GPU_EXPORT GpuMemoryBufferSupport {
|
||||
public:
|
||||
GpuMemoryBufferSupport();
|
||||
-#if defined(OS_LINUX) || defined(USE_OZONE)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE)
|
||||
GpuMemoryBufferSupport(std::unique_ptr<gfx::ClientNativePixmapFactory>
|
||||
client_native_pixmap_factory);
|
||||
#endif
|
||||
@@ -43,7 +43,7 @@
|
||||
bool IsNativeGpuMemoryBufferConfigurationSupported(gfx::BufferFormat format,
|
||||
gfx::BufferUsage usage);
|
||||
|
||||
-#if defined(OS_LINUX) || defined(USE_OZONE)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE)
|
||||
gfx::ClientNativePixmapFactory* client_native_pixmap_factory() {
|
||||
return client_native_pixmap_factory_.get();
|
||||
}
|
||||
@@ -66,7 +66,7 @@
|
||||
const GpuMemoryBufferImpl::DestructionCallback& callback);
|
||||
|
||||
private:
|
||||
-#if defined(OS_LINUX) || defined(USE_OZONE)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_OZONE)
|
||||
std::unique_ptr<gfx::ClientNativePixmapFactory> client_native_pixmap_factory_;
|
||||
#endif
|
||||
|
|
@ -1,24 +1,15 @@
|
|||
--- gpu/ipc/service/gpu_init.cc.orig 2018-03-20 23:05:26.000000000 +0100
|
||||
+++ gpu/ipc/service/gpu_init.cc 2018-03-26 13:24:11.299258000 +0200
|
||||
@@ -41,7 +41,7 @@
|
||||
#if !defined(OS_MACOSX)
|
||||
void CollectGraphicsInfo(GPUInfo* gpu_info) {
|
||||
DCHECK(gpu_info);
|
||||
-#if defined(OS_FUCHSIA)
|
||||
+#if defined(OS_FUCHSIA) || defined(OS_BSD)
|
||||
// TODO(crbug.com/707031): Implement this.
|
||||
NOTIMPLEMENTED();
|
||||
return;
|
||||
@@ -84,7 +84,7 @@
|
||||
--- gpu/ipc/service/gpu_init.cc.orig 2018-06-13 00:10:19.000000000 +0200
|
||||
+++ gpu/ipc/service/gpu_init.cc 2018-07-19 14:45:14.322631000 +0200
|
||||
@@ -70,7 +70,7 @@
|
||||
}
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_BSD)
|
||||
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST)
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST) && !defined(OS_BSD)
|
||||
bool CanAccessNvidiaDeviceFile() {
|
||||
bool res = true;
|
||||
base::AssertBlockingAllowed();
|
||||
@@ -120,7 +120,7 @@
|
||||
@@ -106,7 +106,7 @@
|
||||
// crash during feature collection.
|
||||
gpu::SetKeysForCrashLogging(gpu_info_);
|
||||
|
||||
|
@ -27,7 +18,7 @@
|
|||
if (gpu_info_.gpu.vendor_id == 0x10de && // NVIDIA
|
||||
gpu_info_.driver_vendor == "NVIDIA" && !CanAccessNvidiaDeviceFile())
|
||||
return false;
|
||||
@@ -179,7 +179,7 @@
|
||||
@@ -172,7 +172,7 @@
|
||||
sandbox_helper_->PreSandboxStartup();
|
||||
|
||||
bool attempted_startsandbox = false;
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
https://chromium.googlesource.com/chromium/src/+/a568ded46a67%5E%21/
|
||||
|
||||
--- media/base/decoder_buffer.h.orig 2018-03-20 22:05:27 UTC
|
||||
+++ media/base/decoder_buffer.h
|
||||
@@ -37,7 +37,7 @@ class MEDIA_EXPORT DecoderBuffer
|
||||
: public base::RefCountedThreadSafe<DecoderBuffer> {
|
||||
public:
|
||||
enum {
|
||||
- kPaddingSize = 32,
|
||||
+ kPaddingSize = 64,
|
||||
#if defined(ARCH_CPU_ARM_FAMILY)
|
||||
kAlignmentSize = 16
|
||||
#else
|
|
@ -1,19 +0,0 @@
|
|||
--- media/capture/BUILD.gn.orig 2017-06-05 19:03:08 UTC
|
||||
+++ media/capture/BUILD.gn
|
||||
@@ -160,6 +160,16 @@ component("capture_lib") {
|
||||
]
|
||||
}
|
||||
|
||||
+ if (is_bsd) {
|
||||
+ sources -= [
|
||||
+ "video/linux/video_capture_device_linux.cc",
|
||||
+ "video/linux/video_capture_device_linux.h",
|
||||
+ "video/linux/video_capture_device_factory_linux.cc",
|
||||
+ "video/linux/video_capture_device_factory_linux.h",
|
||||
+ "video/linux/v4l2_capture_delegate.cc",
|
||||
+ ]
|
||||
+ }
|
||||
+
|
||||
if (is_win) {
|
||||
deps += [ "//media/base/win" ]
|
||||
libs = [
|
|
@ -1,9 +1,9 @@
|
|||
--- media/capture/video/video_capture_device_factory.cc.orig 2017-12-15 02:04:21.000000000 +0100
|
||||
+++ media/capture/video/video_capture_device_factory.cc 2017-12-24 17:18:54.671292000 +0100
|
||||
@@ -19,6 +19,10 @@
|
||||
VideoCaptureDeviceFactory::CreateFactory(
|
||||
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
|
||||
gpu::GpuMemoryBufferManager* gpu_buffer_manager) {
|
||||
--- media/capture/video/video_capture_device_factory.cc.orig 2018-06-13 00:10:20.000000000 +0200
|
||||
+++ media/capture/video/video_capture_device_factory.cc 2018-07-20 21:26:51.824846000 +0200
|
||||
@@ -21,6 +21,10 @@
|
||||
gpu::GpuMemoryBufferManager* gpu_buffer_manager,
|
||||
MojoJpegDecodeAcceleratorFactoryCB jda_factory,
|
||||
MojoJpegEncodeAcceleratorFactoryCB jea_factory) {
|
||||
+#if defined(OS_BSD)
|
||||
+ return std::unique_ptr<VideoCaptureDeviceFactory>(
|
||||
+ new media::FakeVideoCaptureDeviceFactory());
|
||||
|
@ -11,16 +11,16 @@
|
|||
const base::CommandLine* command_line =
|
||||
base::CommandLine::ForCurrentProcess();
|
||||
// Use a Fake or File Video Device Factory if the command line flags are
|
||||
@@ -43,6 +47,7 @@
|
||||
return std::unique_ptr<VideoCaptureDeviceFactory>(
|
||||
CreateVideoCaptureDeviceFactory(ui_task_runner, gpu_buffer_manager));
|
||||
@@ -47,6 +51,7 @@
|
||||
std::move(jda_factory),
|
||||
std::move(jea_factory)));
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() {
|
||||
@@ -52,7 +57,7 @@
|
||||
VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() {}
|
||||
@@ -56,7 +61,7 @@
|
||||
VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() = default;
|
||||
|
||||
#if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \
|
||||
- !defined(OS_WIN)
|
||||
|
|
21
www/chromium/files/patch-media_ffmpeg_ffmpeg_common.h
Normal file
21
www/chromium/files/patch-media_ffmpeg_ffmpeg_common.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
--- 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;
|
139
www/chromium/files/patch-media_filters_ffmpeg_demuxer.cc
Normal file
139
www/chromium/files/patch-media_filters_ffmpeg_demuxer.cc
Normal file
|
@ -0,0 +1,139 @@
|
|||
--- 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};
|
|
@ -0,0 +1,56 @@
|
|||
--- 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.
|
|
@ -1,15 +1,6 @@
|
|||
--- net/base/address_tracker_linux.cc.orig 2018-01-21 13:54:41.810603000 +0100
|
||||
+++ net/base/address_tracker_linux.cc 2018-01-21 14:00:43.013272000 +0100
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "net/base/address_tracker_linux.h"
|
||||
|
||||
#include <errno.h>
|
||||
-#include <linux/if.h>
|
||||
+#include <net/if.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
@@ -18,96 +18,9 @@
|
||||
--- 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 @@
|
||||
namespace net {
|
||||
namespace internal {
|
||||
|
||||
|
@ -103,11 +94,12 @@
|
|||
- if (ioctl(ioctl_socket.get(), SIOCGIFNAME, &ifr) == 0)
|
||||
- strncpy(buf, ifr.ifr_name, IFNAMSIZ - 1);
|
||||
- return buf;
|
||||
+ NOTIMPLEMENTED();
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
AddressTrackerLinux::AddressTrackerLinux()
|
||||
@@ -150,93 +63,8 @@
|
||||
@@ -151,93 +65,8 @@
|
||||
}
|
||||
|
||||
void AddressTrackerLinux::Init() {
|
||||
|
@ -191,7 +183,7 @@
|
|||
-
|
||||
- if (tracking_) {
|
||||
- rv = base::MessageLoopForIO::current()->WatchFileDescriptor(
|
||||
- netlink_fd_, true, base::MessageLoopForIO::WATCH_READ, &watcher_, this);
|
||||
- netlink_fd_, true, base::MessagePumpForIO::WATCH_READ, &watcher_, this);
|
||||
- if (rv < 0) {
|
||||
- PLOG(ERROR) << "Could not watch NETLINK socket";
|
||||
- AbortAndForceOnline();
|
||||
|
@ -203,7 +195,7 @@
|
|||
}
|
||||
|
||||
void AddressTrackerLinux::AbortAndForceOnline() {
|
||||
@@ -247,25 +75,6 @@
|
||||
@@ -248,25 +77,6 @@
|
||||
connection_type_initialized_cv_.Broadcast();
|
||||
}
|
||||
|
||||
|
@ -229,7 +221,7 @@
|
|||
NetworkChangeNotifier::ConnectionType
|
||||
AddressTrackerLinux::GetCurrentConnectionType() {
|
||||
// http://crbug.com/125097
|
||||
@@ -316,102 +125,7 @@
|
||||
@@ -317,102 +127,7 @@
|
||||
bool* address_changed,
|
||||
bool* link_changed,
|
||||
bool* tunnel_changed) {
|
||||
|
@ -333,7 +325,7 @@
|
|||
}
|
||||
|
||||
void AddressTrackerLinux::OnFileCanReadWithoutBlocking(int fd) {
|
||||
@@ -443,34 +157,7 @@
|
||||
@@ -449,34 +164,7 @@
|
||||
}
|
||||
|
||||
void AddressTrackerLinux::UpdateCurrentConnectionType() {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
--- net/http/http_network_session.cc.orig 2017-04-19 19:06:36 UTC
|
||||
+++ net/http/http_network_session.cc
|
||||
@@ -23,7 +23,9 @@
|
||||
--- net/http/http_network_session.cc.orig 2018-06-13 00:10:22.000000000 +0200
|
||||
+++ net/http/http_network_session.cc 2018-07-19 15:24:13.890886000 +0200
|
||||
@@ -20,7 +20,9 @@
|
||||
#include "base/trace_event/memory_dump_request_args.h"
|
||||
#include "base/trace_event/process_memory_dump.h"
|
||||
#include "base/values.h"
|
||||
#include "net/base/network_throttle_manager_impl.h"
|
||||
+#if defined(USE_KERBEROS)
|
||||
#include "net/http/http_auth_handler_factory.h"
|
||||
+#endif
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
--- net/proxy/proxy_service.cc.orig 2017-12-15 02:04:23.000000000 +0100
|
||||
+++ net/proxy/proxy_service.cc 2017-12-24 17:38:51.402197000 +0100
|
||||
@@ -46,7 +46,7 @@
|
||||
#elif defined(OS_MACOSX)
|
||||
#include "net/proxy/proxy_config_service_mac.h"
|
||||
#include "net/proxy/proxy_resolver_mac.h"
|
||||
-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#elif (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
|
||||
#include "net/proxy/proxy_config_service_linux.h"
|
||||
#elif defined(OS_ANDROID)
|
||||
#include "net/proxy/proxy_config_service_android.h"
|
||||
@@ -1496,7 +1496,7 @@
|
||||
<< "profile_io_data.cc::CreateProxyConfigService and this should "
|
||||
<< "be used only for examples.";
|
||||
return std::make_unique<UnsetProxyConfigService>();
|
||||
-#elif defined(OS_LINUX)
|
||||
+#elif defined(OS_LINUX) || defined(OS_BSD)
|
||||
std::unique_ptr<ProxyConfigServiceLinux> linux_config_service(
|
||||
new ProxyConfigServiceLinux());
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
--- net/proxy/proxy_config_service_linux.cc.orig 2018-03-20 23:05:28.000000000 +0100
|
||||
+++ net/proxy/proxy_config_service_linux.cc 2018-03-24 18:11:27.991396000 +0100
|
||||
--- net/proxy_resolution/proxy_config_service_linux.cc.orig 2018-07-19 15:35:02.171066000 +0200
|
||||
+++ net/proxy_resolution/proxy_config_service_linux.cc 2018-07-19 15:37:12.958237000 +0200
|
||||
@@ -6,7 +6,9 @@
|
||||
|
||||
#include <errno.h>
|
||||
|
@ -10,7 +10,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include <map>
|
||||
@@ -483,6 +485,7 @@
|
||||
@@ -495,6 +497,7 @@
|
||||
return default_value;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
// This is the KDE version that reads kioslaverc and simulates gsettings.
|
||||
// Doing this allows the main Delegate code, as well as the unit tests
|
||||
// for it, to stay the same - and the settings map fairly well besides.
|
||||
@@ -976,6 +979,7 @@
|
||||
@@ -984,6 +987,7 @@
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SettingGetterImplKDE);
|
||||
};
|
||||
|
@ -26,7 +26,7 @@
|
|||
|
||||
} // namespace
|
||||
|
||||
@@ -1173,8 +1177,10 @@
|
||||
@@ -1199,8 +1203,10 @@
|
||||
case base::nix::DESKTOP_ENVIRONMENT_KDE3:
|
||||
case base::nix::DESKTOP_ENVIRONMENT_KDE4:
|
||||
case base::nix::DESKTOP_ENVIRONMENT_KDE5:
|
|
@ -0,0 +1,29 @@
|
|||
--- net/proxy_resolution/proxy_resolution_service.cc.orig 2018-07-19 15:31:33.121813000 +0200
|
||||
+++ net/proxy_resolution/proxy_resolution_service.cc 2018-07-19 15:32:46.994020000 +0200
|
||||
@@ -47,7 +47,7 @@
|
||||
#elif defined(OS_MACOSX)
|
||||
#include "net/proxy_resolution/proxy_config_service_mac.h"
|
||||
#include "net/proxy_resolution/proxy_resolver_mac.h"
|
||||
-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#elif (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
|
||||
#include "net/proxy_resolution/proxy_config_service_linux.h"
|
||||
#elif defined(OS_ANDROID)
|
||||
#include "net/proxy_resolution/proxy_config_service_android.h"
|
||||
@@ -61,7 +61,7 @@
|
||||
namespace {
|
||||
|
||||
#if defined(OS_WIN) || defined(OS_IOS) || defined(OS_MACOSX) || \
|
||||
- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
|
||||
+ ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS))
|
||||
constexpr net::NetworkTrafficAnnotationTag kSystemProxyConfigTrafficAnnotation =
|
||||
net::DefineNetworkTrafficAnnotation("proxy_config_system", R"(
|
||||
semantics {
|
||||
@@ -1507,7 +1507,7 @@
|
||||
<< "profile_io_data.cc::CreateProxyConfigService and this should "
|
||||
<< "be used only for examples.";
|
||||
return std::make_unique<UnsetProxyConfigService>();
|
||||
-#elif defined(OS_LINUX)
|
||||
+#elif defined(OS_LINUX) || defined(OS_BSD)
|
||||
std::unique_ptr<ProxyConfigServiceLinux> linux_config_service(
|
||||
new ProxyConfigServiceLinux());
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--- net/socket/udp_socket_posix.cc.orig 2018-02-24 16:25:17.000000000 +0100
|
||||
+++ net/socket/udp_socket_posix.cc 2018-03-04 03:08:15.161087000 +0100
|
||||
@@ -69,7 +69,7 @@
|
||||
--- net/socket/udp_socket_posix.cc.orig 2018-06-13 00:10:23.000000000 +0200
|
||||
+++ net/socket/udp_socket_posix.cc 2018-07-20 14:49:13.507247000 +0200
|
||||
@@ -72,7 +72,7 @@
|
||||
const base::TimeDelta kActivityMonitorMsThreshold =
|
||||
base::TimeDelta::FromMilliseconds(100);
|
||||
|
||||
|
@ -9,7 +9,16 @@
|
|||
|
||||
// When enabling multicast using setsockopt(IP_MULTICAST_IF) MacOS and Fuchsia
|
||||
// require passing IPv4 address instead of interface index. This function
|
||||
@@ -647,13 +647,16 @@
|
||||
@@ -656,7 +656,7 @@
|
||||
}
|
||||
|
||||
void UDPSocketPosix::SetMsgConfirm(bool confirm) {
|
||||
-#if !defined(OS_MACOSX) && !defined(OS_IOS)
|
||||
+#if !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_BSD)
|
||||
if (confirm) {
|
||||
sendto_flags_ |= MSG_CONFIRM;
|
||||
} else {
|
||||
@@ -677,13 +677,16 @@
|
||||
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
|
||||
int value = broadcast ? 1 : 0;
|
||||
int rv;
|
||||
|
@ -27,7 +36,7 @@
|
|||
rv = setsockopt(socket_, SOL_SOCKET, SO_REUSEPORT, &value, sizeof(value));
|
||||
if (rv != 0)
|
||||
return MapSystemError(errno);
|
||||
@@ -860,19 +863,24 @@
|
||||
@@ -925,19 +928,24 @@
|
||||
if (multicast_interface_ != 0) {
|
||||
switch (addr_family_) {
|
||||
case AF_INET: {
|
||||
|
@ -54,7 +63,7 @@
|
|||
if (rv)
|
||||
return MapSystemError(errno);
|
||||
break;
|
||||
@@ -934,7 +942,7 @@
|
||||
@@ -999,7 +1007,7 @@
|
||||
if (addr_family_ != AF_INET)
|
||||
return ERR_ADDRESS_INVALID;
|
||||
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
--- net/tools/cert_verify_tool/verify_using_path_builder.cc.orig 2017-06-05 19:03:10 UTC
|
||||
+++ net/tools/cert_verify_tool/verify_using_path_builder.cc
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "net/cert/internal/trust_store_nss.h"
|
||||
#endif
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
#include "net/proxy/proxy_config.h"
|
||||
#include "net/proxy/proxy_config_service_fixed.h"
|
||||
#endif
|
||||
@@ -187,7 +187,7 @@ void SetUpOnNetworkThread(std::unique_ptr<net::URLRequ
|
||||
// (similar to VERIFY_CERT_IO_ENABLED flag for CertVerifyProc).
|
||||
net::URLRequestContextBuilder url_request_context_builder;
|
||||
url_request_context_builder.set_user_agent(GetUserAgent());
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
// On Linux, use a fixed ProxyConfigService, since the default one
|
||||
// depends on glib.
|
||||
//
|
|
@ -0,0 +1,20 @@
|
|||
--- net/tools/cert_verify_tool/cert_verify_tool.cc.orig 2018-07-19 22:18:26.747684000 +0200
|
||||
+++ net/tools/cert_verify_tool/cert_verify_tool.cc 2018-07-19 22:18:48.374229000 +0200
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "net/url_request/url_request_context_builder.h"
|
||||
#include "net/url_request/url_request_context_getter.h"
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
#include "net/proxy_resolution/proxy_config.h"
|
||||
#include "net/proxy_resolution/proxy_config_service_fixed.h"
|
||||
#endif
|
||||
@@ -45,7 +45,7 @@
|
||||
base::WaitableEvent* initialization_complete_event) {
|
||||
net::URLRequestContextBuilder url_request_context_builder;
|
||||
url_request_context_builder.set_user_agent(GetUserAgent());
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
// On Linux, use a fixed ProxyConfigService, since the default one
|
||||
// depends on glib.
|
||||
//
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user