www/iridium: update to 2023.03.111

Approved by:	rene (mentor)
This commit is contained in:
Robert Nagy 2023-03-13 11:56:24 +01:00
parent 5a3e96a0b9
commit 7034f5e54b
531 changed files with 3795 additions and 2624 deletions

View file

@ -1,6 +1,5 @@
PORTNAME= iridium
PORTVERSION= 2023.01.109
PORTREVISION= 1
PORTVERSION= 2023.03.111
CATEGORIES= www wayland
MASTER_SITES= https://downloads.iridiumbrowser.de/source/
PKGNAMESUFFIX= -browser
@ -16,7 +15,7 @@ LICENSE_COMB= multi
ONLY_FOR_ARCHS= aarch64 amd64 i386
PATCH_SITES= https://nerd.hu/distfiles/
PATCHFILES+= disable-privacy-sandbox-7f49edb924b6d2b38fcc9a2c76d4e5e1f857e7b9.patch:-p1
PATCHFILES+= disable-privacy-sandbox-ce036275d9d21a8408ef48ee9839b3c21b8448ca.patch:-p1
BUILD_DEPENDS= bash:shells/bash \
${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \
@ -42,7 +41,9 @@ LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \
libspeex.so:audio/speex \
libdbus-1.so:devel/dbus \
libdbus-glib-1.so:devel/dbus-glib \
libepoll-shim.so:devel/libepoll-shim \
libevent.so:devel/libevent \
libffi.so:devel/libffi \
libicuuc.so:devel/icu \
libjsoncpp.so:devel/jsoncpp \
libpci.so:devel/libpci \
@ -119,9 +120,8 @@ GN_ARGS+= clang_use_chrome_plugins=false \
use_sysroot=false \
use_system_freetype=false \
use_system_harfbuzz=true \
use_system_libffi=true \
use_system_libjpeg=true \
use_system_libwayland=true \
use_system_wayland_scanner=true \
use_udev=false \
extra_cxxflags="${CXXFLAGS}" \
extra_ldflags="${LDFLAGS}"

View file

@ -1,5 +1,5 @@
TIMESTAMP = 1673979574
SHA256 (iridium-browser-2023.01.109.tar.xz) = fb7612c88d0b997c51d427691f55d284369f2155d1a97ebca872c94ea8c93ac0
SIZE (iridium-browser-2023.01.109.tar.xz) = 1497700992
SHA256 (disable-privacy-sandbox-7f49edb924b6d2b38fcc9a2c76d4e5e1f857e7b9.patch) = 946f281504f7ce775a288f7d82371c2479d39e2e6c238f779aeeba1b821cbf07
SIZE (disable-privacy-sandbox-7f49edb924b6d2b38fcc9a2c76d4e5e1f857e7b9.patch) = 4702
TIMESTAMP = 1678693399
SHA256 (iridium-browser-2023.03.111.tar.xz) = 418395ea49900434fdecfc7f202f3e157f0f8fee639f6ca676bc88549f4eb16c
SIZE (iridium-browser-2023.03.111.tar.xz) = 1486956168
SHA256 (disable-privacy-sandbox-ce036275d9d21a8408ef48ee9839b3c21b8448ca.patch) = c8cc1c6a6f735adfe807da0109349ebab87e0eff77f593925757da34bb31f38c
SIZE (disable-privacy-sandbox-ce036275d9d21a8408ef48ee9839b3c21b8448ca.patch) = 4177

View file

@ -1,4 +1,4 @@
--- BUILD.gn.orig 2023-01-17 19:19:00 UTC
--- BUILD.gn.orig 2023-03-13 07:33:08 UTC
+++ BUILD.gn
@@ -60,7 +60,7 @@ declare_args() {
root_extra_deps = []
@ -17,8 +17,8 @@
"//net:net_unittests",
"//sandbox:sandbox_unittests",
"//services:services_unittests",
@@ -434,7 +433,7 @@ group("gn_all") {
]
@@ -417,7 +416,7 @@ group("gn_all") {
}
}
- if (is_linux || is_chromeos || is_android) {
@ -26,8 +26,8 @@
deps += [
"//third_party/breakpad:breakpad_unittests",
"//third_party/breakpad:core-2-minidump",
@@ -637,6 +636,15 @@ group("gn_all") {
deps += [ "//gpu/tools/compositor_model_bench" ]
@@ -616,6 +615,15 @@ group("gn_all") {
}
}
+ if (is_bsd) {
@ -42,7 +42,7 @@
if (is_mac) {
deps += [
"//third_party/breakpad:crash_inspector",
@@ -685,7 +693,7 @@ group("gn_all") {
@@ -664,7 +672,7 @@ group("gn_all") {
host_os == "win") {
deps += [ "//chrome/test/mini_installer:mini_installer_tests" ]
}
@ -51,7 +51,7 @@
deps += [ "//third_party/breakpad:symupload($host_toolchain)" ]
}
@@ -1115,7 +1123,7 @@ if (!is_ios) {
@@ -1086,7 +1094,7 @@ if (!is_ios) {
]
}
@ -60,7 +60,7 @@
# WPT Webdriver tests runner
# chrome/test/chromedriver/test/run_webdriver_tests.py
script_test("webdriver_wpt_tests") {
@@ -1211,7 +1219,7 @@ if (!is_ios) {
@@ -1186,7 +1194,7 @@ if (!is_ios) {
data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ]
}
@ -69,7 +69,7 @@
data_deps +=
[ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
}
@@ -1220,7 +1228,7 @@ if (!is_ios) {
@@ -1195,7 +1203,7 @@ if (!is_ios) {
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
}
@ -78,7 +78,7 @@
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
}
@@ -1660,7 +1668,7 @@ group("chromium_builder_perf") {
@@ -1661,7 +1669,7 @@ group("chromium_builder_perf") {
data_deps += [ "//chrome/test:performance_browser_tests" ]
}

View file

@ -1,6 +1,6 @@
--- base/BUILD.gn.orig 2023-01-17 19:19:00 UTC
--- base/BUILD.gn.orig 2023-03-13 07:33:08 UTC
+++ base/BUILD.gn
@@ -167,7 +167,7 @@ buildflag_header("ios_cronet_buildflags") {
@@ -168,7 +168,7 @@ buildflag_header("ios_cronet_buildflags") {
flags = [ "CRONET_BUILD=$is_cronet_build" ]
}
@ -9,7 +9,7 @@
buildflag_header("message_pump_buildflags") {
header = "message_pump_buildflags.h"
header_dir = "base/message_loop"
@@ -1059,7 +1059,7 @@ mixed_component("base") {
@@ -1053,7 +1053,7 @@ component("base") {
"timer/hi_res_timer_manager_posix.cc",
]
@ -18,7 +18,7 @@
sources += [
"profiler/stack_base_address_posix.cc",
"profiler/stack_base_address_posix.h",
@@ -1070,6 +1070,14 @@ mixed_component("base") {
@@ -1064,6 +1064,14 @@ component("base") {
"profiler/thread_delegate_posix.h",
]
}
@ -33,7 +33,7 @@
}
if (is_win) {
@@ -1569,11 +1577,23 @@ mixed_component("base") {
@@ -1544,11 +1552,23 @@ component("base") {
# Needed for <atomic> if using newer C++ library than sysroot, except if
# building inside the cros_sdk environment - use host_toolchain as a
# more robust check for this.
@ -58,7 +58,7 @@
if (use_allocator_shim) {
sources += [
"allocator/partition_allocator/shim/allocator_shim.cc",
@@ -1601,7 +1621,7 @@ mixed_component("base") {
@@ -1576,7 +1596,7 @@ component("base") {
]
configs += [ "//base/allocator:mac_no_default_new_delete_symbols" ]
}
@ -67,7 +67,7 @@
sources += [
"allocator/partition_allocator/shim/allocator_shim_override_cpp_symbols.h",
"allocator/partition_allocator/shim/allocator_shim_override_glibc_weak_symbols.h",
@@ -1655,7 +1675,7 @@ mixed_component("base") {
@@ -1617,7 +1637,7 @@ component("base") {
# Allow more direct string conversions on platforms with native utf8
# strings
@ -76,7 +76,7 @@
defines += [ "SYSTEM_NATIVE_UTF8" ]
}
@@ -2238,6 +2258,41 @@ mixed_component("base") {
@@ -2208,6 +2228,39 @@ component("base") {
}
}
@ -84,7 +84,6 @@
+ sources -= [
+ "files/file_path_watcher_inotify.cc",
+ "files/scoped_file_linux.cc",
+ "process/memory_linux.cc",
+ "process/process_linux.cc",
+ "system/sys_info_linux.cc",
+ "process/process_iterator_linux.cc",
@ -92,7 +91,6 @@
+ "process/process_handle_linux.cc"
+ ]
+ sources += [
+ "process/memory_stubs.cc",
+ "files/file_path_watcher_kqueue.cc",
+ "files/file_path_watcher_kqueue.h",
+ "files/file_path_watcher_bsd.cc",
@ -118,7 +116,7 @@
# iOS
if (is_ios) {
sources -= [
@@ -2335,7 +2390,7 @@ mixed_component("base") {
@@ -2303,7 +2356,7 @@ component("base") {
}
if (dep_libevent) {
@ -127,7 +125,7 @@
}
if (use_libevent) {
@@ -3605,7 +3660,7 @@ test("base_unittests") {
@@ -3556,7 +3609,7 @@ test("base_unittests") {
}
}
@ -136,7 +134,7 @@
sources += [
"debug/proc_maps_linux_unittest.cc",
"files/scoped_file_linux_unittest.cc",
@@ -3651,7 +3706,7 @@ test("base_unittests") {
@@ -3602,7 +3655,7 @@ test("base_unittests") {
"posix/file_descriptor_shuffle_unittest.cc",
"posix/unix_domain_socket_unittest.cc",
]
@ -145,7 +143,7 @@
sources += [
"profiler/stack_base_address_posix_unittest.cc",
"profiler/stack_copier_signal_unittest.cc",
@@ -3662,7 +3717,7 @@ test("base_unittests") {
@@ -3613,7 +3666,7 @@ test("base_unittests") {
# Allow more direct string conversions on platforms with native utf8
# strings
@ -154,7 +152,7 @@
defines += [ "SYSTEM_NATIVE_UTF8" ]
}
@@ -3869,7 +3924,7 @@ test("base_unittests") {
@@ -3829,7 +3882,7 @@ test("base_unittests") {
}
}

View file

@ -0,0 +1,11 @@
--- base/allocator/dispatcher/tls.h.orig 2023-03-13 07:33:08 UTC
+++ base/allocator/dispatcher/tls.h
@@ -51,7 +51,7 @@ struct BASE_EXPORT MMapAllocator {
partition_alloc::PartitionPageSize();
#elif BUILDFLAG(IS_APPLE)
constexpr static size_t AllocationChunkSize = 16384;
-#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)
+#elif (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)) && defined(ARCH_CPU_ARM64)
constexpr static size_t AllocationChunkSize = 16384;
#else
constexpr static size_t AllocationChunkSize = 4096;

View file

@ -1,4 +1,4 @@
--- base/allocator/partition_allocator/address_space_randomization.h.orig 2022-10-05 07:34:01 UTC
--- base/allocator/partition_allocator/address_space_randomization.h.orig 2023-03-13 07:33:08 UTC
+++ base/allocator/partition_allocator/address_space_randomization.h
@@ -38,7 +38,7 @@ AslrMask(uintptr_t bits) {
@ -9,7 +9,7 @@
// We shouldn't allocate system pages at all for sanitizer builds. However,
// we do, and if random hint addresses interfere with address ranges
@@ -128,7 +128,7 @@ AslrMask(uintptr_t bits) {
@@ -124,7 +124,7 @@ AslrMask(uintptr_t bits) {
return AslrAddress(0x20000000ULL);
}

View file

@ -1,8 +1,8 @@
--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2023-01-17 19:19:00 UTC
--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2023-03-13 07:33:08 UTC
+++ base/allocator/partition_allocator/page_allocator_internals_posix.h
@@ -370,8 +370,12 @@ bool TryRecommitSystemPagesInternal(
@@ -371,8 +371,12 @@ bool TryRecommitSystemPagesInternal(
void DiscardSystemPagesInternal(uintptr_t address, size_t length) {
#if !BUILDFLAG(IS_NACL)
void* ptr = reinterpret_cast<void*>(address);
-#if BUILDFLAG(IS_APPLE)
+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_BSD)

View file

@ -1,6 +1,6 @@
--- base/allocator/partition_allocator/partition_address_space.cc.orig 2023-01-17 19:19:00 UTC
--- base/allocator/partition_allocator/partition_address_space.cc.orig 2023-03-13 07:33:08 UTC
+++ base/allocator/partition_allocator/partition_address_space.cc
@@ -432,7 +432,7 @@ void PartitionAddressSpace::UninitPkeyPoolForTesting()
@@ -416,7 +416,7 @@ void PartitionAddressSpace::UninitPkeyPoolForTesting()
}
#endif

View file

@ -1,7 +1,7 @@
--- base/allocator/partition_allocator/partition_alloc.gni.orig 2023-01-17 19:19:00 UTC
--- base/allocator/partition_allocator/partition_alloc.gni.orig 2023-03-13 07:33:08 UTC
+++ base/allocator/partition_allocator/partition_alloc.gni
@@ -121,7 +121,7 @@ assert(
"Missing dangling pointer checks feature for its performance experiment")
@@ -233,7 +233,7 @@ assert(!use_asan_backup_ref_ptr || use_hookable_raw_pt
"AsanBackupRefPtr requires RawPtrHookableImpl")
declare_args() {
- enable_pkeys = is_linux && target_cpu == "x64"

View file

@ -1,29 +1,29 @@
--- base/allocator/partition_allocator/partition_alloc_config.h.orig 2023-01-17 19:19:00 UTC
--- base/allocator/partition_allocator/partition_alloc_config.h.orig 2023-03-13 07:33:08 UTC
+++ base/allocator/partition_allocator/partition_alloc_config.h
@@ -84,7 +84,7 @@ static_assert(sizeof(void*) != 8, "");
@@ -120,7 +120,7 @@ static_assert(sizeof(void*) != 8, "");
// POSIX is not only UNIX, e.g. macOS and other OSes. We do use Linux-specific
// features such as futex(2).
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
#define PA_HAS_LINUX_KERNEL
#endif
@@ -216,7 +216,7 @@ constexpr bool kUseLazyCommit = false;
#define PA_CONFIG_HAS_LINUX_KERNEL() \
- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID))
+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD))
// On some platforms, we implement locking by spinning in userspace, then going
// into the kernel only if there is contention. This requires platform support,
@@ -267,7 +267,7 @@ constexpr bool kUseLazyCommit = false;
// On these platforms, lock all the partitions before fork(), and unlock after.
// This may be required on more platforms in the future.
-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
#define PA_HAS_ATFORK_HANDLER
#endif
#define PA_CONFIG_HAS_ATFORK_HANDLER() \
- (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS))
+ (BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD))
@@ -257,7 +257,7 @@ constexpr bool kUseLazyCommit = false;
//
// PartitionAlloc uses PartitionRootEnumerator to acquire all
// PartitionRoots at BeforeFork and to release at AfterFork.
@@ -312,7 +312,7 @@ constexpr bool kUseLazyCommit = false;
// Also enabled on ARM64 macOS, as the 16kiB pages on this platform lead to
// larger slot spans.
-#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64))
+#if BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD)
#define PA_PREFER_SMALLER_SLOT_SPANS
#endif // BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64))
#define PA_CONFIG_PREFER_SMALLER_SLOT_SPANS() \
- (BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)))
+ (BUILDFLAG(IS_LINUX) || (BUILDFLAG(IS_MAC) && defined(ARCH_CPU_ARM64)) || BUILDFLAG(IS_BSD))
// Enable shadow metadata.
//

View file

@ -1,4 +1,4 @@
--- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2023-01-17 19:19:00 UTC
--- base/allocator/partition_allocator/partition_alloc_constants.h.orig 2023-03-13 07:33:08 UTC
+++ base/allocator/partition_allocator/partition_alloc_constants.h
@@ -91,7 +91,7 @@ PartitionPageShift() {
return 18; // 256 KiB
@ -9,12 +9,12 @@
PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t
PartitionPageShift() {
return PageAllocationGranularityShift() + 2;
@@ -274,7 +274,7 @@ constexpr size_t kNumPools = 3;
// Special-case Android and iOS, which incur test failures with larger
// pools. Regardless, allocating >8GiB with malloc() on these platforms is
// unrealistic as of 2022.
-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || BUILDFLAG(IS_BSD)
@@ -277,7 +277,7 @@ constexpr size_t kNumPools = 3;
//
// When pointer compression is enabled, we cannot use large pools (at most
// 8GB for each of the glued pools).
-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || PA_CONFIG(POINTER_COMPRESSION)
+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) || PA_CONFIG(POINTER_COMPRESSION) || BUILDFLAG(IS_BSD)
constexpr size_t kPoolMaxSize = 8 * kGiB;
#else
constexpr size_t kPoolMaxSize = 16 * kGiB;

View file

@ -1,6 +1,6 @@
--- base/allocator/partition_allocator/partition_alloc_forward.h.orig 2022-12-01 10:35:46 UTC
--- base/allocator/partition_allocator/partition_alloc_forward.h.orig 2023-03-13 07:33:08 UTC
+++ base/allocator/partition_allocator/partition_alloc_forward.h
@@ -25,9 +25,13 @@ namespace internal {
@@ -27,9 +27,13 @@ namespace internal {
// the second one 16. We could technically return something different for
// malloc() and operator new(), but this would complicate things, and most of
// our allocations are presumably coming from operator new() anyway.

View file

@ -1,4 +1,4 @@
--- base/allocator/partition_allocator/partition_root.cc.orig 2023-01-17 19:19:00 UTC
--- base/allocator/partition_allocator/partition_root.cc.orig 2023-03-13 07:33:08 UTC
+++ base/allocator/partition_allocator/partition_root.cc
@@ -42,7 +42,7 @@
#include "wow64apiset.h"
@ -9,16 +9,16 @@
#include <pthread.h>
#endif
@@ -239,7 +239,7 @@ void PartitionAllocMallocInitOnce() {
if (!g_global_init_called.compare_exchange_strong(expected, true))
@@ -245,7 +245,7 @@ void PartitionAllocMallocInitOnce() {
return;
}
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
// When fork() is called, only the current thread continues to execute in the
// child process. If the lock is held, but *not* by this thread when fork() is
// called, we have a deadlock.
@@ -332,7 +332,7 @@ static size_t PartitionPurgeSlotSpan(
@@ -339,7 +339,7 @@ static size_t PartitionPurgeSlotSpan(
constexpr size_t kMaxSlotCount =
(PartitionPageSize() * kMaxPartitionPagesPerRegularSlotSpan) /
MinPurgeableSlotSize();
@ -27,7 +27,7 @@
// It's better for slot_usage to be stack-allocated and fixed-size, which
// demands that its size be constexpr. On IS_APPLE and Linux on arm64,
// PartitionPageSize() is always SystemPageSize() << 2, so regardless of
@@ -789,7 +789,7 @@ void PartitionRoot<thread_safe>::Init(PartitionOptions
@@ -800,7 +800,7 @@ void PartitionRoot<thread_safe>::Init(PartitionOptions
// apple OSes.
PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) ||
(internal::SystemPageSize() == (size_t{1} << 14)));

View file

@ -1,10 +1,11 @@
--- base/allocator/partition_allocator/spinning_mutex.cc.orig 2022-10-05 07:34:01 UTC
--- base/allocator/partition_allocator/spinning_mutex.cc.orig 2023-03-13 07:33:08 UTC
+++ base/allocator/partition_allocator/spinning_mutex.cc
@@ -18,7 +18,15 @@
@@ -18,7 +18,16 @@
#if defined(PA_HAS_LINUX_KERNEL)
#if PA_CONFIG(HAS_LINUX_KERNEL)
#include <errno.h>
+#if defined(OS_OPENBSD)
+#include <sys/time.h>
+#include <sys/futex.h>
+#elif defined(OS_FREEBSD)
+#include <sys/types.h>
@ -15,14 +16,17 @@
+#endif
#include <sys/syscall.h>
#include <unistd.h>
#endif // defined(PA_HAS_LINUX_KERNEL)
@@ -107,8 +115,13 @@ void SpinningMutex::FutexWait() {
#endif // PA_CONFIG(HAS_LINUX_KERNEL)
@@ -107,8 +116,16 @@ void SpinningMutex::FutexWait() {
// |kLockedContended| anymore. Note that even without spurious wakeups, the
// value of |state_| is not guaranteed when this returns, as another thread
// may get the lock before we get to run.
+#if defined(OS_FREEBSD)
+ int err = _umtx_op(&state_, UMTX_OP_WAIT_UINT_PRIVATE,
+ kLockedContended, nullptr, nullptr);
+#elif defined(OS_OPENBSD)
+ int err = futex(reinterpret_cast<volatile unsigned int *>(&state_), FUTEX_WAIT | FUTEX_PRIVATE_FLAG,
+ kLockedContended, nullptr, nullptr);
+#else
int err = syscall(SYS_futex, &state_, FUTEX_WAIT | FUTEX_PRIVATE_FLAG,
kLockedContended, nullptr, nullptr, 0);
@ -30,18 +34,20 @@
if (err) {
// These are programming error, check them.
@@ -120,8 +133,14 @@ void SpinningMutex::FutexWait() {
@@ -120,8 +137,16 @@ void SpinningMutex::FutexWait() {
void SpinningMutex::FutexWake() {
int saved_errno = errno;
+#if defined(OS_FREEBSD)
+ long retval = _umtx_op(&state_, UMTX_OP_WAKE_PRIVATE,
+ 1 /* wake up a single waiter */, nullptr, nullptr);
+#elif defined(OS_OPENBSD)
+ long retval = futex(reinterpret_cast<volatile unsigned int *>(&state_), FUTEX_WAKE | FUTEX_PRIVATE_FLAG,
+ 1 /* wake up a single waiter */, nullptr, nullptr);
+#else
long retval = syscall(SYS_futex, &state_, FUTEX_WAKE | FUTEX_PRIVATE_FLAG,
1 /* wake up a single waiter */, nullptr, nullptr, 0);
+#endif
+
PA_CHECK(retval != -1);
errno = saved_errno;
}

View file

@ -0,0 +1,21 @@
--- base/debug/stack_trace.cc.orig 2023-03-13 07:33:08 UTC
+++ base/debug/stack_trace.cc
@@ -273,7 +273,9 @@ void StackTrace::Print() const {
}
void StackTrace::OutputToStream(std::ostream* os) const {
+#if !BUILDFLAG(IS_BSD)
OutputToStreamWithPrefix(os, nullptr);
+#endif
}
std::string StackTrace::ToString() const {
@@ -281,7 +283,7 @@ std::string StackTrace::ToString() const {
}
std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
std::stringstream stream;
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD)
OutputToStreamWithPrefix(&stream, prefix_string);
#endif
return stream.str();

View file

@ -1,6 +1,15 @@
--- base/debug/stack_trace_posix.cc.orig 2022-12-01 10:35:46 UTC
--- base/debug/stack_trace_posix.cc.orig 2023-03-13 07:33:08 UTC
+++ base/debug/stack_trace_posix.cc
@@ -39,7 +39,7 @@
@@ -40,7 +40,7 @@
// execinfo.h and backtrace(3) are really only present in glibc and in macOS
// libc.
#if BUILDFLAG(IS_APPLE) || \
- (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX))
+ (defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX) && !BUILDFLAG(IS_BSD))
#define HAVE_BACKTRACE
#include <execinfo.h>
#endif
@@ -58,7 +58,7 @@
#include <AvailabilityMacros.h>
#endif
@ -9,7 +18,7 @@
#include "base/debug/proc_maps_linux.h"
#endif
@@ -699,6 +699,9 @@ class SandboxSymbolizeHelper {
@@ -761,6 +761,9 @@ class SandboxSymbolizeHelper {
// for the modules that are loaded in the current process.
// Returns true on success.
bool CacheMemoryRegions() {
@ -19,7 +28,7 @@
// Reads /proc/self/maps.
std::string contents;
if (!ReadProcMaps(&contents)) {
@@ -716,6 +719,7 @@ class SandboxSymbolizeHelper {
@@ -778,6 +781,7 @@ class SandboxSymbolizeHelper {
is_initialized_ = true;
return true;
@ -27,12 +36,3 @@
}
// Opens all object files and caches their file descriptors.
@@ -872,7 +876,7 @@ size_t CollectStackTrace(void** trace, size_t count) {
// If we do not have unwind tables, then try tracing using frame pointers.
return base::debug::TraceStackFramePointers(const_cast<const void**>(trace),
count, 0);
-#elif !defined(__UCLIBC__) && !defined(_AIX)
+#elif !defined(__UCLIBC__) && !defined(_AIX) && !BUILDFLAG(IS_BSD)
// Though the backtrace API man page does not list any possible negative
// return values, we take no chance.
return base::saturated_cast<size_t>(

View file

@ -0,0 +1,11 @@
--- base/files/file_path_watcher.h.orig 2023-03-13 07:33:08 UTC
+++ base/files/file_path_watcher.h
@@ -59,7 +59,7 @@ class BASE_EXPORT FilePathWatcher {
Type type = Type::kNonRecursive;
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
- BUILDFLAG(IS_FUCHSIA)
+ BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
// The callback will return the full path to a changed file instead of
// the watched path supplied as |path| when Watch is called.
// So the full path can be different from the watched path when a folder is

View file

@ -1,15 +1,15 @@
--- base/files/file_path_watcher_unittest.cc.orig 2022-10-05 07:34:01 UTC
--- base/files/file_path_watcher_unittest.cc.orig 2023-03-13 07:33:08 UTC
+++ base/files/file_path_watcher_unittest.cc
@@ -498,7 +498,7 @@ TEST_F(FilePathWatcherTest, MAYBE_WatchDirectory) {
@@ -521,7 +521,7 @@ TEST_F(FilePathWatcherTest, MAYBE_WatchDirectory) {
VLOG(1) << "Waiting for file1 creation";
ASSERT_TRUE(WaitForEvents());
ASSERT_TRUE(WaitForEvent());
-#if !BUILDFLAG(IS_APPLE)
+#if !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)
// Mac implementation does not detect files modified in a directory.
ASSERT_TRUE(WriteFile(file1, "content v2"));
VLOG(1) << "Waiting for file1 modification";
@@ -1118,7 +1118,7 @@ enum Permission {
@@ -1345,7 +1345,7 @@ enum Permission {
Execute
};
@ -18,7 +18,7 @@
bool ChangeFilePermissions(const FilePath& path, Permission perm, bool allow) {
struct stat stat_buf;
@@ -1149,7 +1149,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi
@@ -1376,7 +1376,7 @@ bool ChangeFilePermissions(const FilePath& path, Permi
}
#endif // BUILDFLAG(IS_APPLE)

View file

@ -1,6 +1,6 @@
--- base/files/file_util_unittest.cc.orig 2023-01-17 19:19:00 UTC
--- base/files/file_util_unittest.cc.orig 2023-03-13 07:33:08 UTC
+++ base/files/file_util_unittest.cc
@@ -3558,7 +3558,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) {
@@ -3749,7 +3749,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) {
}
#endif // BUILDFLAG(IS_WIN)
@ -9,7 +9,7 @@
TEST_F(FileUtilTest, ReadFileToStringWithProcFileSystem) {
FilePath file_path("/proc/cpuinfo");
std::string data = "temp";
@@ -4281,7 +4281,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles
@@ -4472,7 +4472,7 @@ TEST(FileUtilMultiThreadedTest, MultiThreadedTempFiles
NULL);
#else
size_t bytes_written =

View file

@ -0,0 +1,11 @@
--- base/functional/unretained_traits.h.orig 2023-03-13 07:33:08 UTC
+++ base/functional/unretained_traits.h
@@ -130,7 +130,7 @@ struct TypeSupportsUnretained {
// official builds, and then in non-test code as well.
#if !defined(UNIT_TEST) && !defined(OFFICIAL_BUILD)
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \
- defined(FORCE_UNRETAINED_COMPLETENESS_CHECKS_FOR_TESTS)
+ || BUILDFLAGS(IS_BSD) || defined(FORCE_UNRETAINED_COMPLETENESS_CHECKS_FOR_TESTS)
static_assert(IsCompleteTypeV<T> ||
IsIncompleteTypeSafeForUnretained<std::remove_cv_t<T>>,
"T must be fully defined.");

View file

@ -1,6 +1,6 @@
--- base/i18n/icu_util.cc.orig 2022-12-06 08:09:13 UTC
--- base/i18n/icu_util.cc.orig 2023-03-13 07:33:08 UTC
+++ base/i18n/icu_util.cc
@@ -52,7 +52,7 @@
@@ -51,7 +51,7 @@
#include "third_party/icu/source/common/unicode/unistr.h"
#endif
@ -9,7 +9,7 @@
BUILDFLAG(IS_CHROMEOS) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CASTOS))
#include "third_party/icu/source/i18n/unicode/timezone.h"
#endif
@@ -343,7 +343,7 @@ void InitializeIcuTimeZone() {
@@ -340,7 +340,7 @@ void InitializeIcuTimeZone() {
FuchsiaIntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization();
icu::TimeZone::adoptDefault(
icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id)));

View file

@ -1,4 +1,4 @@
--- base/logging_unittest.cc.orig 2022-10-05 07:34:01 UTC
--- base/logging_unittest.cc.orig 2023-03-13 07:33:08 UTC
+++ base/logging_unittest.cc
@@ -32,7 +32,7 @@
#include "base/posix/eintr_wrapper.h"
@ -9,7 +9,7 @@
#include <ucontext.h>
#endif
@@ -574,14 +574,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo
@@ -575,14 +575,18 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo
// need the arch-specific boilerplate below, which is inspired by breakpad.
// At the same time, on OSX, ucontext.h is deprecated but si_addr works fine.
uintptr_t crash_addr = 0;

View file

@ -1,4 +1,4 @@
--- base/memory/platform_shared_memory_region_posix.cc.orig 2022-10-05 07:34:01 UTC
--- base/memory/platform_shared_memory_region_posix.cc.orig 2023-03-13 07:33:08 UTC
+++ base/memory/platform_shared_memory_region_posix.cc
@@ -55,7 +55,7 @@ bool CheckFDAccessMode(int fd, int expected_mode) {
@ -9,7 +9,7 @@
// static
ScopedFD PlatformSharedMemoryRegion::ExecutableRegion::CreateFD(size_t size) {
PlatformSharedMemoryRegion region =
@@ -171,7 +171,7 @@ bool PlatformSharedMemoryRegion::ConvertToUnsafe() {
@@ -168,7 +168,7 @@ bool PlatformSharedMemoryRegion::ConvertToUnsafe() {
// static
PlatformSharedMemoryRegion PlatformSharedMemoryRegion::Create(Mode mode,
size_t size
@ -18,7 +18,7 @@
,
bool executable
#endif
@@ -200,7 +200,7 @@ PlatformSharedMemoryRegion PlatformSharedMemoryRegion:
@@ -197,7 +197,7 @@ PlatformSharedMemoryRegion PlatformSharedMemoryRegion:
// flag.
FilePath directory;
if (!GetShmemTempDir(

View file

@ -1,4 +1,4 @@
--- base/posix/unix_domain_socket_unittest.cc.orig 2022-03-28 18:11:04 UTC
--- base/posix/unix_domain_socket_unittest.cc.orig 2023-03-13 07:33:08 UTC
+++ base/posix/unix_domain_socket_unittest.cc
@@ -10,6 +10,8 @@
#include <sys/types.h>
@ -6,6 +6,6 @@
+#include <signal.h>
+
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/files/file_util.h"
#include "base/files/scoped_file.h"
#include "base/functional/bind.h"

View file

@ -1,11 +0,0 @@
--- base/process/memory.cc.orig 2023-01-17 19:19:00 UTC
+++ base/process/memory.cc
@@ -28,7 +28,7 @@ namespace base {
// Defined in memory_mac.mm for macOS + use_partition_alloc_as_malloc=false.
// In case of use_partition_alloc_as_malloc=true, no need to route the call to
// the system default calloc of macOS.
-#if !BUILDFLAG(IS_APPLE) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
+#if (!BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_BSD)) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
bool UncheckedCalloc(size_t num_items, size_t size, void** result) {
const size_t alloc_size = num_items * size;

View file

@ -0,0 +1,44 @@
--- base/process/memory_linux.cc.orig 2023-03-13 07:33:08 UTC
+++ base/process/memory_linux.cc
@@ -20,6 +20,7 @@
namespace base {
+#if !BUILDFLAG(IS_BSD)
namespace {
void ReleaseReservationOrTerminate() {
@@ -29,12 +30,14 @@ void ReleaseReservationOrTerminate() {
}
} // namespace
+#endif
void EnableTerminationOnHeapCorruption() {
// On Linux, there nothing to do AFAIK.
}
void EnableTerminationOnOutOfMemory() {
+#if !BUILDFLAG(IS_BSD)
// Set the new-out of memory handler.
std::set_new_handler(&ReleaseReservationOrTerminate);
// If we're using glibc's allocator, the above functions will override
@@ -43,8 +46,10 @@ void EnableTerminationOnOutOfMemory() {
#if BUILDFLAG(USE_ALLOCATOR_SHIM)
allocator_shim::SetCallNewHandlerOnMallocFailure(true);
#endif
+#endif
}
+#if !BUILDFLAG(IS_BSD)
// ScopedAllowBlocking() has private constructor and it can only be used in
// friend classes/functions. Declaring a class is easier in this situation to
// avoid adding more dependency to thread_restrictions.h because of the
@@ -104,6 +109,7 @@ bool AdjustOOMScoreHelper::AdjustOOMScore(ProcessId pr
bool AdjustOOMScore(ProcessId process, int score) {
return AdjustOOMScoreHelper::AdjustOOMScore(process, score);
}
+#endif
bool UncheckedMalloc(size_t size, void** result) {
#if BUILDFLAG(USE_ALLOCATOR_SHIM)

View file

@ -1,4 +1,4 @@
--- base/process/process_metrics.cc.orig 2023-01-17 19:19:00 UTC
--- base/process/process_metrics.cc.orig 2023-03-13 07:33:08 UTC
+++ base/process/process_metrics.cc
@@ -17,7 +17,7 @@ namespace base {
namespace {
@ -18,16 +18,16 @@
GetSystemMemoryInfo(&system_metrics.memory_info_);
GetVmStatInfo(&system_metrics.vmstat_info_);
GetSystemDiskInfo(&system_metrics.disk_info_);
@@ -73,7 +73,7 @@ Value SystemMetrics::ToValue() const {
Value res(Value::Type::DICTIONARY);
@@ -73,7 +73,7 @@ Value::Dict SystemMetrics::ToDict() const {
Value::Dict res;
res.SetIntKey("committed_memory", static_cast<int>(committed_memory_));
res.Set("committed_memory", static_cast<int>(committed_memory_));
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
Value meminfo = memory_info_.ToValue();
Value vmstat = vmstat_info_.ToValue();
meminfo.MergeDictionary(&vmstat);
@@ -99,7 +99,6 @@ std::unique_ptr<ProcessMetrics> ProcessMetrics::Create
Value::Dict meminfo = memory_info_.ToDict();
meminfo.Merge(vmstat_info_.ToDict());
res.Set("meminfo", std::move(meminfo));
@@ -98,7 +98,6 @@ std::unique_ptr<ProcessMetrics> ProcessMetrics::Create
#endif // !BUILDFLAG(IS_MAC)
}
@ -35,7 +35,7 @@
double ProcessMetrics::GetPlatformIndependentCPUUsage(
TimeDelta cumulative_cpu) {
TimeTicks time = TimeTicks::Now();
@@ -125,7 +124,6 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage(
@@ -124,7 +123,6 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage(
double ProcessMetrics::GetPlatformIndependentCPUUsage() {
return GetPlatformIndependentCPUUsage(GetCumulativeCPUUsage());
}
@ -43,7 +43,7 @@
#if BUILDFLAG(IS_WIN)
double ProcessMetrics::GetPreciseCPUUsage(TimeDelta cumulative_cpu) {
@@ -156,7 +154,7 @@ double ProcessMetrics::GetPreciseCPUUsage() {
@@ -155,7 +153,7 @@ double ProcessMetrics::GetPreciseCPUUsage() {
#endif // BUILDFLAG(IS_WIN)
#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \

View file

@ -1,6 +1,6 @@
--- base/process/process_metrics.h.orig 2023-01-17 19:19:00 UTC
--- base/process/process_metrics.h.orig 2023-03-13 07:33:08 UTC
+++ base/process/process_metrics.h
@@ -36,7 +36,7 @@
@@ -37,7 +37,7 @@
#endif
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
@ -9,7 +9,7 @@
#include <string>
#include <utility>
#include <vector>
@@ -51,7 +51,7 @@ class Value;
@@ -50,7 +50,7 @@ namespace base {
// Full declaration is in process_metrics_iocounters.h.
struct IoCounters;
@ -18,7 +18,7 @@
// Minor and major page fault counts since the process creation.
// Both counts are process-wide, and exclude child processes.
//
@@ -106,7 +106,7 @@ class BASE_EXPORT ProcessMetrics {
@@ -105,7 +105,7 @@ class BASE_EXPORT ProcessMetrics {
// convenience wrapper for CreateProcessMetrics().
static std::unique_ptr<ProcessMetrics> CreateCurrentProcessMetrics();
@ -27,7 +27,7 @@
// Resident Set Size is a Linux/Android specific memory concept. Do not
// attempt to extend this to other platforms.
BASE_EXPORT size_t GetResidentSetSize() const;
@@ -164,7 +164,7 @@ class BASE_EXPORT ProcessMetrics {
@@ -163,7 +163,7 @@ class BASE_EXPORT ProcessMetrics {
#endif // BUILDFLAG(IS_WIN)
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
@ -36,7 +36,7 @@
// Emits the cumulative CPU usage for all currently active threads since they
// were started into the output parameter (replacing its current contents).
// Threads that have already terminated will not be reported. Thus, the sum of
@@ -224,7 +224,7 @@ class BASE_EXPORT ProcessMetrics {
@@ -223,7 +223,7 @@ class BASE_EXPORT ProcessMetrics {
int GetOpenFdSoftLimit() const;
#endif // BUILDFLAG(IS_POSIX)
@ -45,7 +45,7 @@
// Bytes of swap as reported by /proc/[pid]/status.
uint64_t GetVmSwapBytes() const;
@@ -245,7 +245,7 @@ class BASE_EXPORT ProcessMetrics {
@@ -244,7 +244,7 @@ class BASE_EXPORT ProcessMetrics {
#endif // !BUILDFLAG(IS_MAC)
#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
@ -54,7 +54,7 @@
int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups);
#endif
#if BUILDFLAG(IS_APPLE)
@@ -264,9 +264,7 @@ class BASE_EXPORT ProcessMetrics {
@@ -263,9 +263,7 @@ class BASE_EXPORT ProcessMetrics {
// Used to store the previous times and CPU usage counts so we can
// compute the CPU usage between calls.
TimeTicks last_cpu_time_;
@ -64,7 +64,7 @@
#if BUILDFLAG(IS_WIN)
TimeTicks last_cpu_time_for_precise_cpu_usage_;
@@ -274,7 +272,7 @@ class BASE_EXPORT ProcessMetrics {
@@ -273,7 +271,7 @@ class BASE_EXPORT ProcessMetrics {
#endif
#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
@ -73,7 +73,7 @@
// Same thing for idle wakeups.
TimeTicks last_idle_wakeups_time_;
uint64_t last_absolute_idle_wakeups_;
@@ -317,7 +315,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de
@@ -316,7 +314,7 @@ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_de
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \
BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_AIX) || \
@ -82,7 +82,7 @@
// Data about system-wide memory consumption. Values are in KB. Available on
// Windows, Mac, Linux, Android and Chrome OS.
//
@@ -352,7 +350,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
@@ -351,7 +349,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
#endif
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
@ -91,7 +91,7 @@
// This provides an estimate of available memory as described here:
// https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773
// NOTE: this is ONLY valid in kernels 3.14 and up. Its value will always
@@ -367,7 +365,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
@@ -366,7 +364,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
#endif
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
@ -100,7 +100,7 @@
int buffers = 0;
int cached = 0;
int active_anon = 0;
@@ -404,7 +402,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK
@@ -403,7 +401,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoK
// BUILDFLAG(IS_FUCHSIA)
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \
@ -109,7 +109,7 @@
// Parse the data found in /proc/<pid>/stat and return the sum of the
// CPU-related ticks. Returns -1 on parse error.
// Exposed for testing.
@@ -592,7 +590,7 @@ class BASE_EXPORT SystemMetrics {
@@ -591,7 +589,7 @@ class BASE_EXPORT SystemMetrics {
FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics);
size_t committed_memory_;

View file

@ -1,4 +1,4 @@
--- base/process/process_metrics_freebsd.cc.orig 2022-12-01 10:35:46 UTC
--- base/process/process_metrics_freebsd.cc.orig 2023-03-13 07:33:08 UTC
+++ base/process/process_metrics_freebsd.cc
@@ -3,20 +3,39 @@
// found in the LICENSE file.
@ -72,10 +72,12 @@
bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const {
return false;
}
@@ -67,4 +83,221 @@ size_t GetSystemCommitCharge() {
return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
}
@@ -65,6 +81,230 @@ size_t GetSystemCommitCharge() {
pagesize = getpagesize();
return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
+}
+
+int64_t GetNumberOfThreads(ProcessHandle process) {
+ // Taken from FreeBSD top (usr.bin/top/machine.c)
+
@ -243,54 +245,61 @@
+
+SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default;
+
+Value SystemDiskInfo::ToValue() const {
+ Value res(Value::Type::DICTIONARY);
+
+Value::Dict SystemDiskInfo::ToDict() const {
+ Value::Dict res;
+
+ // Write out uint64_t variables as doubles.
+ // Note: this may discard some precision, but for JS there's no other option.
+ res.SetDoubleKey("reads", static_cast<double>(reads));
+ res.SetDoubleKey("reads_merged", static_cast<double>(reads_merged));
+ res.SetDoubleKey("sectors_read", static_cast<double>(sectors_read));
+ res.SetDoubleKey("read_time", static_cast<double>(read_time));
+ res.SetDoubleKey("writes", static_cast<double>(writes));
+ res.SetDoubleKey("writes_merged", static_cast<double>(writes_merged));
+ res.SetDoubleKey("sectors_written", static_cast<double>(sectors_written));
+ res.SetDoubleKey("write_time", static_cast<double>(write_time));
+ res.SetDoubleKey("io", static_cast<double>(io));
+ res.SetDoubleKey("io_time", static_cast<double>(io_time));
+ res.SetDoubleKey("weighted_io_time", static_cast<double>(weighted_io_time));
+ res.Set("reads", static_cast<double>(reads));
+ res.Set("reads_merged", static_cast<double>(reads_merged));
+ res.Set("sectors_read", static_cast<double>(sectors_read));
+ res.Set("read_time", static_cast<double>(read_time));
+ res.Set("writes", static_cast<double>(writes));
+ res.Set("writes_merged", static_cast<double>(writes_merged));
+ res.Set("sectors_written", static_cast<double>(sectors_written));
+ res.Set("write_time", static_cast<double>(write_time));
+ res.Set("io", static_cast<double>(io));
+ res.Set("io_time", static_cast<double>(io_time));
+ res.Set("weighted_io_time", static_cast<double>(weighted_io_time));
+
+ NOTIMPLEMENTED();
+
+ return res;
+}
+
+Value::Dict SystemMemoryInfoKB::ToDict() const {
+ Value::Dict res;
+ res.Set("total", total);
+ res.Set("free", free);
+ res.Set("available", available);
+ res.Set("buffers", buffers);
+ res.Set("cached", cached);
+ res.Set("active_anon", active_anon);
+ res.Set("inactive_anon", inactive_anon);
+ res.Set("active_file", active_file);
+ res.Set("inactive_file", inactive_file);
+ res.Set("swap_total", swap_total);
+ res.Set("swap_free", swap_free);
+ res.Set("swap_used", swap_total - swap_free);
+ res.Set("dirty", dirty);
+ res.Set("reclaimable", reclaimable);
+
+ NOTIMPLEMENTED();
+
+ return res;
+}
+
+Value SystemMemoryInfoKB::ToValue() const {
+ Value res(Value::Type::DICTIONARY);
+Value::Dict VmStatInfo::ToDict() const {
+ Value::Dict res;
+ // TODO(crbug.com/1334256): Make base::Value able to hold uint64_t and remove
+ // casts below.
+ res.Set("pswpin", static_cast<int>(pswpin));
+ res.Set("pswpout", static_cast<int>(pswpout));
+ res.Set("pgmajfault", static_cast<int>(pgmajfault));
+
+ res.SetIntKey("total", total);
+ res.SetIntKey("free", free);
+ res.SetIntKey("available", available);
+ res.SetIntKey("buffers", buffers);
+ res.SetIntKey("cached", cached);
+ res.SetIntKey("active_anon", active_anon);
+ res.SetIntKey("inactive_anon", inactive_anon);
+ res.SetIntKey("active_file", active_file);
+ res.SetIntKey("inactive_file", inactive_file);
+ res.SetIntKey("swap_total", swap_total);
+ res.SetIntKey("swap_free", swap_free);
+ res.SetIntKey("swap_used", swap_total - swap_free);
+ res.SetIntKey("dirty", dirty);
+ res.SetIntKey("reclaimable", reclaimable);
+ NOTIMPLEMENTED();
+
+ return res;
+}
+
+Value VmStatInfo::ToValue() const {
+ Value res(Value::Type::DICTIONARY);
+
+ res.SetIntKey("pswpin", pswpin);
+ res.SetIntKey("pswpout", pswpout);
+ res.SetIntKey("pgmajfault", pgmajfault);
+
+ return res;
+}
}
} // namespace base

View file

@ -1,4 +1,4 @@
--- base/process/process_metrics_openbsd.cc.orig 2022-10-05 07:34:01 UTC
--- base/process/process_metrics_openbsd.cc.orig 2023-03-13 07:33:08 UTC
+++ base/process/process_metrics_openbsd.cc
@@ -6,14 +6,23 @@
@ -124,22 +124,6 @@
+ return false;
+}
+
+SystemDiskInfo::SystemDiskInfo() {
+ reads = 0;
+ reads_merged = 0;
+ sectors_read = 0;
+ read_time = 0;
+ writes = 0;
+ writes_merged = 0;
+ sectors_written = 0;
+ write_time = 0;
+ io = 0;
+ io_time = 0;
+ weighted_io_time = 0;
+}
+
+SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo& other) = default;
+
+bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) {
+ NOTIMPLEMENTED();
+ return false;
@ -155,57 +139,73 @@
+ return 0;
+}
+
+Value SystemMemoryInfoKB::ToValue() const {
+ Value res(Value::Type::DICTIONARY);
+ res.SetIntKey("total", total);
+ res.SetIntKey("free", free);
+ res.SetIntKey("available", available);
+ res.SetIntKey("buffers", buffers);
+ res.SetIntKey("cached", cached);
+ res.SetIntKey("active_anon", active_anon);
+ res.SetIntKey("inactive_anon", inactive_anon);
+ res.SetIntKey("active_file", active_file);
+ res.SetIntKey("inactive_file", inactive_file);
+ res.SetIntKey("swap_total", swap_total);
+ res.SetIntKey("swap_free", swap_free);
+ res.SetIntKey("swap_used", swap_total - swap_free);
+ res.SetIntKey("dirty", dirty);
+ res.SetIntKey("reclaimable", reclaimable);
+Value::Dict SystemMemoryInfoKB::ToDict() const {
+ Value::Dict res;
+ res.Set("total", total);
+ res.Set("free", free);
+ res.Set("available", available);
+ res.Set("buffers", buffers);
+ res.Set("cached", cached);
+ res.Set("active_anon", active_anon);
+ res.Set("inactive_anon", inactive_anon);
+ res.Set("active_file", active_file);
+ res.Set("inactive_file", inactive_file);
+ res.Set("swap_total", swap_total);
+ res.Set("swap_free", swap_free);
+ res.Set("swap_used", swap_total - swap_free);
+ res.Set("dirty", dirty);
+ res.Set("reclaimable", reclaimable);
+
+ NOTIMPLEMENTED();
+
+ return res;
+}
+
+Value VmStatInfo::ToValue() const {
+ Value res(Value::Type::DICTIONARY);
+ res.SetIntKey("pswpin", pswpin);
+ res.SetIntKey("pswpout", pswpout);
+ res.SetIntKey("pgmajfault", pgmajfault);
+Value::Dict VmStatInfo::ToDict() const {
+ Value::Dict res;
+ res.Set("pswpin", static_cast<int>(pswpin));
+ res.Set("pswpout", static_cast<int>(pswpout));
+ res.Set("pgmajfault", static_cast<int>(pgmajfault));
+
+ NOTIMPLEMENTED();
+
+ return res;
+}
+
+SystemDiskInfo::SystemDiskInfo() {
+ reads = 0;
+ reads_merged = 0;
+ sectors_read = 0;
+ read_time = 0;
+ writes = 0;
+ writes_merged = 0;
+ sectors_written = 0;
+ write_time = 0;
+ io = 0;
+ io_time = 0;
+ weighted_io_time = 0;
+}
+
+SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo&) = default;
+
+SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default;
+
+Value SystemDiskInfo::ToValue() const {
+ Value res(Value::Type::DICTIONARY);
+
+Value::Dict SystemDiskInfo::ToDict() const {
+ Value::Dict res;
+
+ // Write out uint64_t variables as doubles.
+ // Note: this may discard some precision, but for JS there's no other option.
+ res.SetDoubleKey("reads", static_cast<double>(reads));
+ res.SetDoubleKey("reads_merged", static_cast<double>(reads_merged));
+ res.SetDoubleKey("sectors_read", static_cast<double>(sectors_read));
+ res.SetDoubleKey("read_time", static_cast<double>(read_time));
+ res.SetDoubleKey("writes", static_cast<double>(writes));
+ res.SetDoubleKey("writes_merged", static_cast<double>(writes_merged));
+ res.SetDoubleKey("sectors_written", static_cast<double>(sectors_written));
+ res.SetDoubleKey("write_time", static_cast<double>(write_time));
+ res.SetDoubleKey("io", static_cast<double>(io));
+ res.SetDoubleKey("io_time", static_cast<double>(io_time));
+ res.SetDoubleKey("weighted_io_time", static_cast<double>(weighted_io_time));
+ res.Set("reads", static_cast<double>(reads));
+ res.Set("reads_merged", static_cast<double>(reads_merged));
+ res.Set("sectors_read", static_cast<double>(sectors_read));
+ res.Set("read_time", static_cast<double>(read_time));
+ res.Set("writes", static_cast<double>(writes));
+ res.Set("writes_merged", static_cast<double>(writes_merged));
+ res.Set("sectors_written", static_cast<double>(sectors_written));
+ res.Set("write_time", static_cast<double>(write_time));
+ res.Set("io", static_cast<double>(io));
+ res.Set("io_time", static_cast<double>(io_time));
+ res.Set("weighted_io_time", static_cast<double>(weighted_io_time));
+
+ NOTIMPLEMENTED();
+

View file

@ -1,6 +1,6 @@
--- base/process/process_unittest.cc.orig 2022-10-05 07:34:01 UTC
--- base/process/process_unittest.cc.orig 2023-03-13 07:33:08 UTC
+++ base/process/process_unittest.cc
@@ -193,7 +193,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) {
@@ -194,7 +194,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) {
// was spawned and a time recorded after it was spawned. However, since the
// base::Time and process creation clocks don't match, tolerate some error.
constexpr base::TimeDelta kTolerance =

View file

@ -1,4 +1,4 @@
--- base/profiler/sampling_profiler_thread_token.cc.orig 2022-12-01 10:35:46 UTC
--- base/profiler/sampling_profiler_thread_token.cc.orig 2023-03-13 07:33:08 UTC
+++ base/profiler/sampling_profiler_thread_token.cc
@@ -6,7 +6,7 @@
@ -9,7 +9,7 @@
#include <pthread.h>
#include "base/profiler/stack_base_address_posix.h"
@@ -19,7 +19,7 @@ SamplingProfilerThreadToken GetSamplingProfilerCurrent
@@ -18,7 +18,7 @@ SamplingProfilerThreadToken GetSamplingProfilerCurrent
PlatformThreadId id = PlatformThread::CurrentId();
#if BUILDFLAG(IS_ANDROID)
return {id, pthread_self()};
@ -17,4 +17,4 @@
+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
absl::optional<uintptr_t> maybe_stack_base =
GetThreadStackBaseAddress(id, pthread_self());
// GetThreadStackBaseAddress should only return nullopt on Android, so
return {id, maybe_stack_base};

View file

@ -1,6 +1,6 @@
--- base/profiler/sampling_profiler_thread_token.h.orig 2022-12-01 10:35:46 UTC
--- base/profiler/sampling_profiler_thread_token.h.orig 2023-03-13 07:33:08 UTC
+++ base/profiler/sampling_profiler_thread_token.h
@@ -11,7 +11,7 @@
@@ -12,7 +12,7 @@
#if BUILDFLAG(IS_ANDROID)
#include <pthread.h>
@ -9,7 +9,7 @@
#include <stdint.h>
#endif
@@ -25,7 +25,7 @@ struct SamplingProfilerThreadToken {
@@ -26,7 +26,7 @@ struct SamplingProfilerThreadToken {
PlatformThreadId id;
#if BUILDFLAG(IS_ANDROID)
pthread_t pthread_id;

View file

@ -1,6 +1,6 @@
--- base/profiler/stack_base_address_posix.cc.orig 2022-12-01 10:35:46 UTC
--- base/profiler/stack_base_address_posix.cc.orig 2023-03-13 07:33:08 UTC
+++ base/profiler/stack_base_address_posix.cc
@@ -15,6 +15,10 @@
@@ -17,6 +17,10 @@
#include "base/files/scoped_file.h"
#endif
@ -11,9 +11,9 @@
#if BUILDFLAG(IS_CHROMEOS)
extern "C" void* __libc_stack_end;
#endif
@@ -42,15 +46,30 @@ absl::optional<uintptr_t> GetAndroidMainThreadStackBas
#endif
@@ -45,7 +49,21 @@ absl::optional<uintptr_t> GetAndroidMainThreadStackBas
#if !BUILDFLAG(IS_LINUX)
uintptr_t GetThreadStackBaseAddressImpl(pthread_t pthread_id) {
+#if BUILDFLAG(IS_OPENBSD)
+ stack_t ss;
@ -26,17 +26,23 @@
+#else
pthread_attr_t attr;
+#if BUILDFLAG(IS_FREEBSD)
+ int result;
+ pthread_attr_init(&attr);
+ pthread_attr_get_np(pthread_id, &attr);
+#else
// This will crash on ChromeOS & Linux if we are in the sandbox and pthread_id
// refers to a different thread, due to the use of sched_getaffinity().
pthread_getattr_np(pthread_id, &attr);
// See crbug.com/617730 for limitations of this approach on Linux.
// pthread_getattr_np will crash on ChromeOS & Linux if we are in the sandbox
// and pthread_id refers to a different thread, due to the use of
// sched_getaffinity().
@@ -58,12 +76,14 @@ uintptr_t GetThreadStackBaseAddressImpl(pthread_t pthr
<< logging::SystemErrorCodeToString(result);
// See crbug.com/617730 for limitations of this approach on Linux-like
// systems.
+#endif
void* address;
size_t size;
pthread_attr_getstack(&attr, &address, &size);
result = pthread_attr_getstack(&attr, &address, &size);
CHECK_EQ(result, 0) << "pthread_attr_getstack returned "
<< logging::SystemErrorCodeToString(result);
pthread_attr_destroy(&attr);
+#endif
const uintptr_t base_address = reinterpret_cast<uintptr_t>(address) + size;

View file

@ -1,6 +1,6 @@
--- base/profiler/stack_sampling_profiler_test_util.cc.orig 2022-10-05 07:34:01 UTC
--- base/profiler/stack_sampling_profiler_test_util.cc.orig 2023-03-13 07:33:08 UTC
+++ base/profiler/stack_sampling_profiler_test_util.cc
@@ -39,7 +39,7 @@
@@ -33,7 +33,7 @@
// Fortunately, it provides _alloca, which functions identically.
#include <malloc.h>
#define alloca _alloca

View file

@ -1,6 +1,6 @@
--- base/strings/safe_sprintf_unittest.cc.orig 2022-12-06 08:09:13 UTC
--- base/strings/safe_sprintf_unittest.cc.orig 2023-03-13 07:33:08 UTC
+++ base/strings/safe_sprintf_unittest.cc
@@ -740,6 +740,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) {
@@ -733,6 +733,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) {
#endif
}
@ -8,7 +8,7 @@
TEST(SafeSPrintfTest, EmitNULL) {
char buf[40];
#if defined(__GNUC__)
@@ -756,6 +757,7 @@ TEST(SafeSPrintfTest, EmitNULL) {
@@ -749,6 +750,7 @@ TEST(SafeSPrintfTest, EmitNULL) {
#pragma GCC diagnostic pop
#endif
}

View file

@ -1,6 +1,6 @@
--- base/system/sys_info.cc.orig 2022-10-05 07:34:01 UTC
--- base/system/sys_info.cc.orig 2023-03-13 07:33:08 UTC
+++ base/system/sys_info.cc
@@ -101,7 +101,7 @@ std::string SysInfo::HardwareModelName() {
@@ -106,7 +106,7 @@ std::string SysInfo::HardwareModelName() {
#endif
void SysInfo::GetHardwareInfo(base::OnceCallback<void(HardwareInfo)> callback) {

View file

@ -1,6 +1,6 @@
--- base/system/sys_info.h.orig 2022-12-06 08:09:13 UTC
--- base/system/sys_info.h.orig 2023-03-13 07:33:08 UTC
+++ base/system/sys_info.h
@@ -233,6 +233,8 @@ class BASE_EXPORT SysInfo {
@@ -246,6 +246,8 @@ class BASE_EXPORT SysInfo {
static void SetIsCpuSecurityMitigationsEnabled(bool is_enabled);
#endif
@ -9,7 +9,7 @@
private:
FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory);
FRIEND_TEST_ALL_PREFIXES(debug::SystemMetricsTest, ParseMeminfo);
@@ -243,7 +245,7 @@ class BASE_EXPORT SysInfo {
@@ -257,7 +259,7 @@ class BASE_EXPORT SysInfo {
static HardwareInfo GetHardwareInfoSync();
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \

View file

@ -1,6 +1,6 @@
--- base/system/sys_info_posix.cc.orig 2023-01-17 19:19:00 UTC
--- base/system/sys_info_posix.cc.orig 2023-03-13 07:33:08 UTC
+++ base/system/sys_info_posix.cc
@@ -154,12 +154,12 @@ int NumberOfProcessors() {
@@ -165,12 +165,12 @@ int NumberOfProcessors() {
} // namespace internal
@ -15,7 +15,7 @@
// static
uint64_t SysInfo::AmountOfVirtualMemory() {
@@ -249,6 +249,8 @@ std::string SysInfo::OperatingSystemArchitecture() {
@@ -260,6 +260,8 @@ std::string SysInfo::OperatingSystemArchitecture() {
arch = "x86";
} else if (arch == "amd64") {
arch = "x86_64";

View file

@ -1,6 +1,6 @@
--- base/system/sys_info_unittest.cc.orig 2022-12-06 08:09:13 UTC
--- base/system/sys_info_unittest.cc.orig 2023-03-13 07:33:08 UTC
+++ base/system/sys_info_unittest.cc
@@ -255,12 +255,16 @@ TEST_F(SysInfoTest, GetHardwareInfo) {
@@ -259,12 +259,16 @@ TEST_F(SysInfoTest, GetHardwareInfo) {
EXPECT_TRUE(IsStringUTF8(hardware_info->model));
bool empty_result_expected =
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_WIN) || \

View file

@ -1,11 +0,0 @@
--- base/threading/platform_thread.h.orig 2022-10-05 07:34:01 UTC
+++ base/threading/platform_thread.h
@@ -253,7 +253,7 @@ class BASE_EXPORT PlatformThread {
// Returns a realtime period provided by `delegate`.
static TimeDelta GetRealtimePeriod(Delegate* delegate);
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
// Toggles a specific thread's type at runtime. This can be used to
// change the priority of a thread in a different process and will fail
// if the calling process does not have proper permissions. The

View file

@ -1,6 +1,6 @@
--- base/threading/platform_thread_linux.cc.orig 2022-12-06 08:09:13 UTC
--- base/threading/platform_thread_linux.cc.orig 2023-03-13 07:33:08 UTC
+++ base/threading/platform_thread_linux.cc
@@ -29,7 +29,9 @@
@@ -30,7 +30,9 @@
#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX)
#include <pthread.h>
@ -10,7 +10,7 @@
#include <sys/resource.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -134,7 +136,7 @@ long sched_setattr(pid_t pid,
@@ -139,7 +141,7 @@ long sched_setattr(pid_t pid,
#endif // !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX)
#endif // BUILDFLAG(IS_CHROMEOS)
@ -19,7 +19,7 @@
const FilePath::CharType kCgroupDirectory[] =
FILE_PATH_LITERAL("/sys/fs/cgroup");
@@ -306,7 +308,7 @@ void SetThreadCgroupsForThreadType(PlatformThreadId th
@@ -313,7 +315,7 @@ void SetThreadCgroupsForThreadType(PlatformThreadId th
namespace internal {
namespace {
@ -28,7 +28,7 @@
const struct sched_param kRealTimePrio = {8};
#endif
} // namespace
@@ -332,7 +334,7 @@ const ThreadTypeToNiceValuePair kThreadTypeToNiceValue
@@ -340,7 +342,7 @@ const ThreadTypeToNiceValuePair kThreadTypeToNiceValue
};
bool CanSetThreadTypeToRealtimeAudio() {
@ -37,16 +37,16 @@
// A non-zero soft-limit on RLIMIT_RTPRIO is required to be allowed to invoke
// pthread_setschedparam in SetCurrentThreadTypeForPlatform().
struct rlimit rlim;
@@ -344,7 +346,7 @@ bool CanSetThreadTypeToRealtimeAudio() {
@@ -352,7 +354,7 @@ bool CanSetThreadTypeToRealtimeAudio() {
bool SetCurrentThreadTypeForPlatform(ThreadType thread_type,
MessagePumpType pump_type_hint) {
-#if !BUILDFLAG(IS_NACL)
+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD)
// For legacy schedtune interface
SetThreadCgroupsForThreadType(PlatformThread::CurrentId(), thread_type);
const PlatformThreadId tid = PlatformThread::CurrentId();
@@ -363,7 +365,7 @@ bool SetCurrentThreadTypeForPlatform(ThreadType thread
if (g_thread_type_delegate &&
@@ -378,7 +380,7 @@ bool SetCurrentThreadTypeForPlatform(ThreadType thread
absl::optional<ThreadPriorityForTest>
GetCurrentThreadPriorityForPlatformForTest() {
@ -55,7 +55,7 @@
int maybe_sched_rr = 0;
struct sched_param maybe_realtime_prio = {0};
if (pthread_getschedparam(pthread_self(), &maybe_sched_rr,
@@ -382,7 +384,7 @@ GetCurrentThreadPriorityForPlatformForTest() {
@@ -397,7 +399,7 @@ GetCurrentThreadPriorityForPlatformForTest() {
void PlatformThread::SetName(const std::string& name) {
ThreadIdNameManager::GetInstance()->SetName(name);
@ -64,14 +64,21 @@
// On linux we can get the thread names to show up in the debugger by setting
// the process name for the LWP. We don't want to do this for the main
// thread because that would rename the process, causing tools like killall
@@ -412,8 +414,10 @@ void PlatformThread::SetThreadType(ProcessId process_i
// priority.
CHECK_NE(thread_id, process_id);
@@ -417,7 +419,7 @@ void PlatformThread::SetName(const std::string& name)
#endif // !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX)
}
+#if !BUILDFLAG(IS_BSD)
// For legacy schedtune interface
SetThreadCgroupsForThreadType(thread_id, thread_type);
+#endif
-#if !BUILDFLAG(IS_NACL)
+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD)
// static
void PlatformThread::SetThreadTypeDelegate(ThreadTypeDelegate* delegate) {
// A component cannot override a delegate set by another component, thus
@@ -428,7 +430,7 @@ void PlatformThread::SetThreadTypeDelegate(ThreadTypeD
}
#endif
#if BUILDFLAG(IS_CHROMEOS)
// For upstream uclamp interface. We try both legacy (schedtune, as done
-#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX)
+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_AIX) && !BUILDFLAG(IS_BSD)
// static
void PlatformThread::SetThreadType(ProcessId process_id,
PlatformThreadId thread_id,

View file

@ -1,15 +1,15 @@
--- base/threading/platform_thread_posix.cc.orig 2022-12-06 08:09:13 UTC
--- base/threading/platform_thread_posix.cc.orig 2023-03-13 07:33:08 UTC
+++ base/threading/platform_thread_posix.cc
@@ -78,7 +78,7 @@ void* ThreadFunc(void* params) {
@@ -77,7 +77,7 @@ void* ThreadFunc(void* params) {
if (!thread_params->joinable)
base::DisallowSingleton();
-#if !BUILDFLAG(IS_NACL)
+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD)
#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(STARSCAN)
#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(USE_STARSCAN)
partition_alloc::internal::PCScan::NotifyThreadCreated(
partition_alloc::internal::GetStackPointer());
@@ -380,6 +380,9 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type,
@@ -379,6 +379,9 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type,
MessagePumpType pump_type_hint) {
#if BUILDFLAG(IS_NACL)
NOTIMPLEMENTED();

View file

@ -1,4 +1,4 @@
--- base/threading/platform_thread_unittest.cc.orig 2023-01-17 19:19:00 UTC
--- base/threading/platform_thread_unittest.cc.orig 2023-03-13 07:33:08 UTC
+++ base/threading/platform_thread_unittest.cc
@@ -31,7 +31,7 @@
#include "base/time/time.h"
@ -9,7 +9,7 @@
#include <pthread.h>
#include <sys/syscall.h>
#include <sys/types.h>
@@ -417,7 +417,7 @@ TEST(PlatformThreadTest,
@@ -422,7 +422,7 @@ TEST(PlatformThreadTest,
// and hardcodes what we know. Please inform scheduler-dev@chromium.org if this
// proprerty changes for a given platform.
TEST(PlatformThreadTest, CanChangeThreadType) {
@ -18,7 +18,7 @@
// On Ubuntu, RLIMIT_NICE and RLIMIT_RTPRIO are 0 by default, so we won't be
// able to increase priority to any level.
constexpr bool kCanIncreasePriority = false;
@@ -684,12 +684,16 @@ INSTANTIATE_TEST_SUITE_P(
@@ -701,12 +701,16 @@ INSTANTIATE_TEST_SUITE_P(
#endif // BUILDFLAG(IS_APPLE)

View file

@ -1,6 +1,6 @@
--- base/trace_event/malloc_dump_provider.cc.orig 2022-12-01 10:35:46 UTC
--- base/trace_event/malloc_dump_provider.cc.orig 2023-03-13 07:33:08 UTC
+++ base/trace_event/malloc_dump_provider.cc
@@ -24,6 +24,8 @@
@@ -25,6 +25,8 @@
#if BUILDFLAG(IS_APPLE)
#include <malloc/malloc.h>
@ -9,7 +9,7 @@
#else
#include <malloc.h>
#endif
@@ -186,7 +188,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size,
@@ -187,7 +189,7 @@ void ReportAppleAllocStats(size_t* total_virtual_size,
#if (BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_ANDROID)) || \
(!BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && !BUILDFLAG(IS_WIN) && \
@ -18,7 +18,7 @@
void ReportMallinfoStats(ProcessMemoryDump* pmd,
size_t* total_virtual_size,
size_t* resident_size,
@@ -357,6 +359,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump
@@ -358,6 +360,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump
&allocated_objects_count);
#elif BUILDFLAG(IS_FUCHSIA)
// TODO(fuchsia): Port, see https://crbug.com/706592.

View file

@ -1,6 +1,6 @@
--- build/config/BUILD.gn.orig 2022-10-05 07:34:01 UTC
--- build/config/BUILD.gn.orig 2023-03-13 07:33:08 UTC
+++ build/config/BUILD.gn
@@ -215,13 +215,17 @@ config("default_libs") {
@@ -218,13 +218,17 @@ config("default_libs") {
"CoreText.framework",
"Foundation.framework",
]

View file

@ -1,6 +1,6 @@
--- build/config/compiler/BUILD.gn.orig 2023-01-17 19:19:00 UTC
--- build/config/compiler/BUILD.gn.orig 2023-03-13 07:33:08 UTC
+++ build/config/compiler/BUILD.gn
@@ -224,13 +224,16 @@ config("default_include_dirs") {
@@ -232,13 +232,16 @@ config("default_include_dirs") {
# Compiler instrumentation can introduce dependencies in DSOs to symbols in
# the executable they are loaded into, so they are unresolved at link-time.
config("no_unresolved_symbols") {
@ -18,7 +18,7 @@
}
# compiler ---------------------------------------------------------------------
@@ -276,7 +279,9 @@ config("compiler") {
@@ -284,7 +287,9 @@ config("compiler") {
configs += [
# See the definitions below.
@ -28,7 +28,7 @@
":compiler_codegen",
":compiler_deterministic",
]
@@ -452,6 +457,10 @@ config("compiler") {
@@ -460,6 +465,10 @@ config("compiler") {
}
}
@ -39,7 +39,7 @@
# Linux-specific compiler flags setup.
# ------------------------------------
if (use_gold) {
@@ -912,7 +921,7 @@ config("compiler_cpu_abi") {
@@ -955,7 +964,7 @@ config("compiler_cpu_abi") {
]
}
} else if (current_cpu == "arm") {
@ -48,7 +48,7 @@
!(is_chromeos_lacros && is_chromeos_device)) {
cflags += [ "--target=arm-linux-gnueabihf" ]
ldflags += [ "--target=arm-linux-gnueabihf" ]
@@ -927,7 +936,7 @@ config("compiler_cpu_abi") {
@@ -970,7 +979,7 @@ config("compiler_cpu_abi") {
cflags += [ "-mtune=$arm_tune" ]
}
} else if (current_cpu == "arm64") {
@ -57,7 +57,7 @@
!(is_chromeos_lacros && is_chromeos_device)) {
cflags += [ "--target=aarch64-linux-gnu" ]
ldflags += [ "--target=aarch64-linux-gnu" ]
@@ -1272,6 +1281,27 @@ config("compiler_deterministic") {
@@ -1315,6 +1324,27 @@ config("compiler_deterministic") {
}
}
@ -73,19 +73,19 @@
+ clang_revision = exec_script("//tools/clang/scripts/update.py",
+ update_args,
+ "trim string")
+
+
+ # This is here so that all files get recompiled after a clang roll and
+ # when turning clang on or off. (defines are passed via the command line,
+ # and build system rebuild things when their commandline changes). Nothing
+ # should ever read this define.
+ defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ]
+ }
+ }
+}
+
config("rustc_revision") {
if (enable_rust && defined(rustc_version)) {
# Similar to the above config, this is here so that all files get
@@ -1493,7 +1523,7 @@ config("default_warnings") {
@@ -1536,7 +1566,7 @@ config("default_warnings") {
"-Wno-ignored-pragma-optimize",
]
@ -94,7 +94,7 @@
cflags += [
# TODO(crbug.com/1343975) Evaluate and possibly enable.
"-Wno-deprecated-builtins",
@@ -1658,7 +1688,7 @@ config("no_chromium_code") {
@@ -1701,7 +1731,7 @@ config("no_chromium_code") {
# third-party libraries.
"-Wno-c++11-narrowing",
]
@ -103,7 +103,7 @@
cflags += [
# Disabled for similar reasons as -Wunused-variable.
"-Wno-unused-but-set-variable",
@@ -1970,8 +2000,7 @@ config("default_stack_frames") {
@@ -1985,8 +2015,7 @@ config("default_stack_frames") {
}
# Default "optimization on" config.
@ -113,7 +113,7 @@
if (is_win) {
if (chrome_pgo_phase != 2) {
# Favor size over speed, /O1 must be before the common flags.
@@ -2016,8 +2045,7 @@ config("xoptimize") {
@@ -2045,8 +2074,7 @@ config("xoptimize") {
}
# Turn off optimizations.
@ -123,7 +123,7 @@
if (is_win) {
cflags = [
"/Od", # Disable optimization.
@@ -2057,8 +2085,7 @@ config("xno_optimize") {
@@ -2086,8 +2114,7 @@ config("xno_optimize") {
# Turns up the optimization level. On Windows, this implies whole program
# optimization and link-time code generation which is very expensive and should
# be used sparingly.
@ -133,7 +133,7 @@
if (is_nacl && is_nacl_irt) {
# The NaCl IRT is a special case and always wants its own config.
# Various components do:
@@ -2091,8 +2118,7 @@ config("xoptimize_max") {
@@ -2120,8 +2147,7 @@ config("xoptimize_max") {
#
# TODO(crbug.com/621335) - rework how all of these configs are related
# so that we don't need this disclaimer.
@ -143,7 +143,7 @@
if (is_nacl && is_nacl_irt) {
# The NaCl IRT is a special case and always wants its own config.
# Various components do:
@@ -2118,8 +2144,7 @@ config("xoptimize_speed") {
@@ -2147,8 +2173,7 @@ config("xoptimize_speed") {
}
}
@ -153,7 +153,7 @@
cflags = [ "-O1" ] + common_optimize_on_cflags
rustflags = [ "-Copt-level=1" ]
ldflags = common_optimize_on_ldflags
@@ -2185,7 +2210,7 @@ config("afdo_optimize_size") {
@@ -2214,7 +2239,7 @@ config("afdo_optimize_size") {
# There are some targeted places that AFDO regresses, so we provide a separate
# config to allow AFDO to be disabled per-target.
config("afdo") {
@ -162,7 +162,7 @@
cflags = []
if (clang_emit_debug_info_for_profiling) {
# Add the following flags to generate debug info for profiling.
@@ -2201,7 +2226,7 @@ config("afdo") {
@@ -2230,7 +2255,7 @@ config("afdo") {
cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ]
inputs = [ _clang_sample_profile ]
}
@ -171,7 +171,7 @@
cflags = [ "-fauto-profile=${auto_profile_path}" ]
inputs = [ auto_profile_path ]
}
@@ -2239,8 +2264,7 @@ config("win_pdbaltpath") {
@@ -2268,8 +2293,7 @@ config("win_pdbaltpath") {
}
# Full symbols.
@ -180,8 +180,8 @@
+config("symbols") {
if (is_win) {
if (is_clang) {
cflags = [ "/Z7" ] # Debug information in the .obj files.
@@ -2349,7 +2373,8 @@ config("xsymbols") {
cflags = [
@@ -2386,7 +2410,8 @@ config("xsymbols") {
configs += [ "//build/config:compress_debug_sections" ]
}
@ -191,7 +191,7 @@
if (is_apple) {
# TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
# Make sure we don't use constructor homing on mac.
@@ -2372,8 +2397,7 @@ config("xsymbols") {
@@ -2409,8 +2434,7 @@ config("xsymbols") {
# Minimal symbols.
# This config guarantees to hold symbol for stack trace which are shown to user
# when crash happens in unittests running on buildbot.
@ -201,7 +201,7 @@
if (is_win) {
# Functions, files, and line tables only.
cflags = []
@@ -2446,8 +2470,7 @@ config("xminimal_symbols") {
@@ -2484,8 +2508,7 @@ config("xminimal_symbols") {
# This configuration contains function names only. That is, the compiler is
# told to not generate debug information and the linker then just puts function
# names in the final debug information.

View file

@ -1,6 +1,6 @@
--- build/config/linux/pkg-config.py.orig 2022-03-28 18:11:04 UTC
--- build/config/linux/pkg-config.py.orig 2023-03-13 07:33:08 UTC
+++ build/config/linux/pkg-config.py
@@ -109,7 +109,7 @@ def main():
@@ -108,7 +108,7 @@ def main():
# If this is run on non-Linux platforms, just return nothing and indicate
# success. This allows us to "kind of emulate" a Linux build from other
# platforms.

View file

@ -1,6 +1,6 @@
--- build/config/rust.gni.orig 2022-10-05 07:34:01 UTC
--- build/config/rust.gni.orig 2023-03-13 07:33:08 UTC
+++ build/config/rust.gni
@@ -124,7 +124,7 @@ if (enable_rust) {
@@ -134,7 +134,7 @@ if (enable_rust) {
rust_sysroot = "//third_party/rust-toolchain"
use_unverified_rust_toolchain = false
} else {

View file

@ -1,6 +1,6 @@
--- build/detect_host_arch.py.orig 2022-03-28 18:11:04 UTC
--- build/detect_host_arch.py.orig 2023-03-13 07:33:08 UTC
+++ build/detect_host_arch.py
@@ -21,6 +21,8 @@ def HostArch():
@@ -20,6 +20,8 @@ def HostArch():
host_arch = 'ia32'
elif host_arch in ['x86_64', 'amd64']:
host_arch = 'x64'

View file

@ -1,6 +1,6 @@
--- build/gn_run_binary.py.orig 2023-01-17 19:19:00 UTC
--- build/gn_run_binary.py.orig 2023-03-13 07:33:08 UTC
+++ build/gn_run_binary.py
@@ -24,7 +24,7 @@ if not os.path.isabs(path):
@@ -23,7 +23,7 @@ if not os.path.isabs(path):
# The rest of the arguments are passed directly to the executable.
args = [path] + sys.argv[2:]

View file

@ -1,21 +0,0 @@
--- build/linux/unbundle/openh264.gn.orig 2023-01-17 19:19:00 UTC
+++ build/linux/unbundle/openh264.gn
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/buildflag_header.gni")
import("//build/config/linux/pkg_config.gni")
import("//build/shim_headers.gni")
@@ -33,4 +34,10 @@ source_set("processing") {
source_set("encoder") {
deps = [ ":openh264_shim" ]
public_configs = [ ":config" ]
+}
+
+buildflag_header("buildflags") {
+ header = "buildflags.h"
+ header_dir = "third_party/openh264"
+ flags = [ "OPENH264_API_WELS=1" ]
}

View file

@ -1,4 +1,4 @@
--- build/toolchain/gcc_toolchain.gni.orig 2023-01-17 19:19:00 UTC
--- build/toolchain/gcc_toolchain.gni.orig 2023-03-13 07:33:08 UTC
+++ build/toolchain/gcc_toolchain.gni
@@ -53,6 +53,13 @@ if (enable_resource_allowlist_generation) {
"enable_resource_allowlist_generation=true does not work for target_os=$target_os")
@ -14,7 +14,7 @@
# This template defines a toolchain for something that works like gcc
# (including clang).
#
@@ -799,22 +806,12 @@ template("gcc_toolchain") {
@@ -832,22 +839,12 @@ template("gcc_toolchain") {
# use_gold too.
template("clang_toolchain") {
gcc_toolchain(target_name) {

View file

@ -1,7 +1,7 @@
--- chrome/app/chrome_command_ids.h.orig 2022-10-05 07:34:01 UTC
--- chrome/app/chrome_command_ids.h.orig 2023-03-13 07:33:08 UTC
+++ chrome/app/chrome_command_ids.h
@@ -67,7 +67,7 @@
#define IDC_NAME_WINDOW 34049
@@ -70,7 +70,7 @@
#endif
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch of lacros-chrome is complete.
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)

View file

@ -1,6 +1,6 @@
--- chrome/app/chrome_main.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/app/chrome_main.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/app/chrome_main.cc
@@ -25,7 +25,7 @@
@@ -27,7 +27,7 @@
#include "chrome/app/notification_metrics.h"
#endif
@ -9,7 +9,7 @@
#include "base/base_switches.h"
#endif
@@ -151,7 +151,7 @@ int ChromeMain(int argc, const char** argv) {
@@ -157,7 +157,7 @@ int ChromeMain(int argc, const char** argv) {
headless::SetUpCommandLine(command_line);
} else {
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \

View file

@ -1,6 +1,6 @@
--- chrome/app/chrome_main_delegate.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/app/chrome_main_delegate.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/app/chrome_main_delegate.cc
@@ -136,7 +136,7 @@
@@ -137,7 +137,7 @@
#include "components/about_ui/credit_utils.h"
#endif
@ -9,7 +9,7 @@
#include "components/nacl/common/nacl_paths.h"
#include "components/nacl/zygote/nacl_fork_delegate_linux.h"
#endif
@@ -180,16 +180,16 @@
@@ -181,16 +181,16 @@
#include "v8/include/v8.h"
#endif
@ -29,7 +29,7 @@
#include "chrome/browser/policy/policy_path_parser.h"
#include "components/crash/core/app/crashpad.h"
#endif
@@ -348,7 +348,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty
@@ -352,7 +352,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty
// and resources loaded.
bool SubprocessNeedsResourceBundle(const std::string& process_type) {
return
@ -38,7 +38,7 @@
// The zygote process opens the resources for the renderers.
process_type == switches::kZygoteProcess ||
#endif
@@ -433,7 +433,7 @@ bool HandleVersionSwitches(const base::CommandLine& co
@@ -437,7 +437,7 @@ bool HandleVersionSwitches(const base::CommandLine& co
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.
@ -47,7 +47,7 @@
// Show the man page if --help or -h is on the command line.
void HandleHelpSwitches(const base::CommandLine& command_line) {
if (command_line.HasSwitch(switches::kHelp) ||
@@ -540,7 +540,7 @@ void InitializeUserDataDir(base::CommandLine* command_
@@ -551,7 +551,7 @@ void InitializeUserDataDir(base::CommandLine* command_
std::string process_type =
command_line->GetSwitchValueASCII(switches::kProcessType);
@ -56,7 +56,7 @@
// On Linux, Chrome does not support running multiple copies under different
// DISPLAYs, so the profile directory can be specified in the environment to
// support the virtual desktop use-case.
@@ -629,7 +629,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat
@@ -640,7 +640,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat
#endif
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || \
@ -65,7 +65,7 @@
// Record the startup process creation time on supported platforms. On Android
// this is recorded in ChromeMainDelegateAndroid.
startup_metric_utils::RecordStartupProcessCreationTime(
@@ -911,6 +911,8 @@ void ChromeMainDelegate::CommonEarlyInitialization() {
@@ -928,6 +928,8 @@ void ChromeMainDelegate::CommonEarlyInitialization() {
// not always enabled on ChromeOS.
#if BUILDFLAG(IS_CHROMEOS)
bool enable_gwp_asan = crash_reporter::IsCrashpadEnabled();
@ -74,7 +74,7 @@
#else
bool enable_gwp_asan = true;
#endif
@@ -971,7 +973,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() {
@@ -984,7 +986,7 @@ void ChromeMainDelegate::CommonEarlyInitialization() {
base::internal::TimerBase::InitializeFeatures();
base::InitializeCpuReductionExperiment();
base::sequence_manager::internal::SequenceManagerImpl::InitializeFeatures();
@ -83,7 +83,7 @@
base::MessagePumpLibevent::InitializeFeatures();
#elif BUILDFLAG(IS_MAC)
base::PlatformThread::InitFeaturesPostFieldTrial();
@@ -1080,7 +1082,7 @@ absl::optional<int> ChromeMainDelegate::BasicStartupCo
@@ -1116,7 +1118,7 @@ absl::optional<int> ChromeMainDelegate::BasicStartupCo
// TODO(crbug.com/1052397): Revisit the macro expression once build flag
// switch of lacros-chrome is complete.
@ -92,7 +92,7 @@
// This will directly exit if the user asked for help.
HandleHelpSwitches(command_line);
#endif
@@ -1110,7 +1112,7 @@ absl::optional<int> ChromeMainDelegate::BasicStartupCo
@@ -1146,7 +1148,7 @@ absl::optional<int> ChromeMainDelegate::BasicStartupCo
#if BUILDFLAG(IS_CHROMEOS)
chromeos::dbus_paths::RegisterPathProvider();
#endif
@ -101,7 +101,7 @@
nacl::RegisterPathProvider();
#endif
@@ -1492,7 +1494,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1528,7 +1530,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
}
@ -110,7 +110,7 @@
// Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != switches::kZygoteProcess) {
if (command_line.HasSwitch(switches::kPreCrashpadCrashTest)) {
@@ -1572,7 +1574,7 @@ absl::variant<int, content::MainFunctionParams> Chrome
@@ -1608,7 +1610,7 @@ absl::variant<int, content::MainFunctionParams> Chrome
// This entry is not needed on Linux, where the NaCl loader
// process is launched via nacl_helper instead.

View file

@ -1,4 +1,4 @@
--- chrome/app/generated_resources.grd.orig 2023-01-17 19:19:00 UTC
--- chrome/app/generated_resources.grd.orig 2023-03-13 07:33:08 UTC
+++ chrome/app/generated_resources.grd
@@ -2,7 +2,7 @@
@ -9,7 +9,7 @@
for making strings OS specific. Other platform defines such as use_titlecase
are declared in tools/grit/grit_rule.gni.
-->
@@ -3090,7 +3090,7 @@ are declared in tools/grit/grit_rule.gni.
@@ -3181,7 +3181,7 @@ are declared in tools/grit/grit_rule.gni.
</if>
<!-- Bluetooth Device Credentials (i.e. PIN/Passkey) dialog -->
@ -18,7 +18,7 @@
<message name="IDS_BLUETOOTH_DEVICE_CREDENTIALS_TITLE" desc="Title of the Bluetooth device credentials prompt dialog.">
Device Credentials
</message>
@@ -4820,7 +4820,7 @@ are declared in tools/grit/grit_rule.gni.
@@ -4936,7 +4936,7 @@ are declared in tools/grit/grit_rule.gni.
Read information about your browser, OS, device, installed software, registry values and files
</message>
</if>
@ -27,7 +27,7 @@
<message name="IDS_EXTENSION_PROMPT_WARNING_ENTERPRISE_REPORTING_PRIVATE_ENABLED_LINUX_AND_MACOS" desc="Permission string for enterprise private reporting permission on Linux and MacOS.">
Read information about your browser, OS, device, installed software and files
</message>
@@ -5493,7 +5493,7 @@ Keep your key file in a safe place. You will need it t
@@ -5603,7 +5603,7 @@ Keep your key file in a safe place. You will need it t
Old versions of Chrome Apps won't open on Windows devices after December 2022. Contact your administrator to update to a new version or remove this app.
</message>
</if>
@ -36,7 +36,7 @@
<message name="IDS_FORCE_INSTALLED_DEPRECATED_APPS_CONTENT" desc="Content of the force installed deprecated app dialog">
Old versions of Chrome Apps won't open on Linux devices after December 2022. Contact your administrator to update to a new version or remove this app.
</message>
@@ -5521,7 +5521,7 @@ Keep your key file in a safe place. You will need it t
@@ -5649,7 +5649,7 @@ Keep your key file in a safe place. You will need it t
Old versions of Chrome apps won't open on Windows devices after December 2022. You can check if there's a new version available.
</message>
</if>
@ -45,7 +45,7 @@
<message name="IDS_DEPRECATED_APPS_MONITOR_RENDERER" desc="Dialog content that educates users that Chrome Apps will soon no longer launch.">
Old versions of Chrome apps won't open on Linux devices after December 2022. You can check if there's a new version available.
</message>
@@ -9168,7 +9168,7 @@ Check your passwords anytime in <ph name="GOOGLE_PASSW
@@ -9448,7 +9448,7 @@ Check your passwords anytime in <ph name="GOOGLE_PASSW
Google Pay
</message>
@ -54,7 +54,7 @@
<message name="IDS_SHOW_WINDOW_DECORATIONS" desc="The label of a radio button in the options dialog for using the system title bar and borders.">
Use system title bar and borders
</message>
@@ -10501,7 +10501,7 @@ Please help our engineers fix this problem. Tell us wh
@@ -10789,7 +10789,7 @@ Please help our engineers fix this problem. Tell us wh
Set as default
</message>
@ -63,7 +63,7 @@
<message name="IDS_MINIMIZE_WINDOW_MENU" desc="The Linux browser window menu item text for minimizing the window.">
Minimize
</message>
@@ -12597,7 +12597,7 @@ Please help our engineers fix this problem. Tell us wh
@@ -12904,7 +12904,7 @@ Please help our engineers fix this problem. Tell us wh
Open Anyway
</message>

View file

@ -1,6 +1,6 @@
--- chrome/app/settings_strings.grdp.orig 2023-01-17 19:19:00 UTC
--- chrome/app/settings_strings.grdp.orig 2023-03-13 07:33:08 UTC
+++ chrome/app/settings_strings.grdp
@@ -151,7 +151,7 @@
@@ -163,7 +163,7 @@
Theme
</message>
</if>
@ -9,7 +9,7 @@
<message name="IDS_SETTINGS_GTK_THEME" desc="Text of the label describing the system (GTK) browser theme on Linux">
GTK
</message>
@@ -171,7 +171,7 @@
@@ -183,7 +183,7 @@
Use Classic
</message>
</if>

View file

@ -1,29 +1,29 @@
--- chrome/app/theme/chrome_unscaled_resources.grd.orig 2022-12-01 10:35:46 UTC
--- chrome/app/theme/chrome_unscaled_resources.grd.orig 2023-03-13 07:33:08 UTC
+++ chrome/app/theme/chrome_unscaled_resources.grd
@@ -19,7 +19,7 @@
<include name="IDR_ASSISTANT_LOGO_MONOCHROME" file="google_chrome/google_assistant.svg" type="BINDATA" />
<if expr="_google_chrome_for_testing">
@@ -16,7 +16,7 @@
<includes>
<if expr="_google_chrome">
<then>
- <if expr="is_linux">
+ <if expr="is_posix">
<then>
<include name="IDR_PRODUCT_LOGO_64" file="google_chrome/linux/product_logo_64.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_128" file="google_chrome/linux/product_logo_128.png" type="BINDATA" />
@@ -62,7 +62,7 @@
<else> <!-- not _google_chrome -->
<if expr="_is_chrome_for_testing_branded">
<then>
- <if expr="is_linux">
+ <if expr="is_posix">
<then>
<include name="IDR_PRODUCT_LOGO_64" file="google_chrome/google_chrome_for_testing/linux/product_logo_64.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_128" file="google_chrome/google_chrome_for_testing/linux/product_logo_128.png" type="BINDATA" />
@@ -36,7 +36,7 @@
@@ -76,7 +76,7 @@
</if>
</then>
<else> <!-- not _google_chrome_for_testing -->
<else> <!-- not _is_chrome_for_testing_branded -->
- <if expr="is_linux">
+ <if expr="is_posix">
<then>
<include name="IDR_PRODUCT_LOGO_64" file="google_chrome/linux/product_logo_64.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_128" file="google_chrome/linux/product_logo_128.png" type="BINDATA" />
@@ -78,7 +78,7 @@
</if>
</then>
<else> <!-- not _google_chrome -->
- <if expr="is_linux">
+ <if expr="is_posix">
<then>
<include name="IDR_PRODUCT_LOGO_64" file="chromium/linux/product_logo_64.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_128" file="chromium/linux/product_logo_128.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_64" file="chromium/linux/product_logo_64.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_128" file="chromium/linux/product_logo_128.png" type="BINDATA" />

View file

@ -1,47 +1,59 @@
--- chrome/app/theme/theme_resources.grd.orig 2022-12-06 08:09:13 UTC
--- chrome/app/theme/theme_resources.grd.orig 2023-03-13 07:33:08 UTC
+++ chrome/app/theme/theme_resources.grd
@@ -135,7 +135,7 @@
@@ -135,14 +135,14 @@
</if>
<if expr="_google_chrome">
<then>
- <if expr="is_linux">
+ <if expr="is_posix">
<then>
<if expr="_google_chrome_for_testing">
<then>
@@ -152,7 +152,7 @@
</else>
</if> <!-- _google_chrome_for_testing -->
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="google_chrome/linux/product_logo_16.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="google_chrome/linux/product_logo_32.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_BETA" file="google_chrome/linux/product_logo_32_beta.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_DEV" file="google_chrome/linux/product_logo_32_dev.png" />
</then>
- <else> <!-- not is_linux -->
+ <else> <!-- not is_posix -->
<if expr="not is_android">
<if expr="_google_chrome_for_testing">
<then>
@@ -176,7 +176,7 @@
</else>
</if> <!-- _google_chrome_for_testing -->
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="google_chrome/product_logo_16.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="google_chrome/product_logo_32.png" />
@@ -150,7 +150,7 @@
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_BETA" file="google_chrome/product_logo_32_beta.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_DEV" file="google_chrome/product_logo_32_dev.png" />
</else>
- </if> <!-- is_linux -->
+ </if> <!-- is_posix -->
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32_CANARY" file="google_chrome/product_logo_32_canary.png" />
<if expr="not is_android">
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_NAME_22" file="google_chrome/product_logo_name_22.png" />
@@ -186,7 +186,7 @@
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_ENTERPRISE_WHITE" file="google_chrome/product_logo_enterprise_white.png" />
</then>
@@ -162,7 +162,7 @@
<else> <!-- not _google_chrome -->
- <if expr="is_linux">
+ <if expr="is_posix">
<if expr="_is_chrome_for_testing_branded">
<then>
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="chromium/linux/product_logo_16.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="chromium/linux/product_logo_32.png" />
@@ -195,7 +195,7 @@
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="chromium/product_logo_16.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="chromium/product_logo_32.png" />
- <if expr="is_linux">
+ <if expr="is_posix">
<then>
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="google_chrome/google_chrome_for_testing/linux/product_logo_16.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="google_chrome/google_chrome_for_testing/linux/product_logo_32.png" />
@@ -171,10 +171,10 @@
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="google_chrome/google_chrome_for_testing/product_logo_16.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="google_chrome/google_chrome_for_testing/product_logo_32.png" />
</else>
- </if> <!-- is_linux -->
+ </if> <!-- is_posix -->
</then>
<else> <!-- not _is_chrome_for_testing_branded -->
- <if expr="is_linux">
+ <if expr="is_posix">
<then>
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="chromium/linux/product_logo_16.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="chromium/linux/product_logo_32.png" />
@@ -183,7 +183,7 @@
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_16" file="chromium/product_logo_16.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_32" file="chromium/product_logo_32.png" />
</else>
- </if> <!-- is_linux -->
+ </if> <!-- is_posix -->
</else>
- </if> <!-- is_linux -->
+ </if> <!-- is_posix -->
</if> <!-- _is_chrome_for_testing_branded -->
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_NAME_22" file="chromium/product_logo_name_22.png" />
<structure type="chrome_scaled_image" name="IDR_PRODUCT_LOGO_NAME_22_WHITE" file="chromium/product_logo_name_22_white.png" />
</else>

View file

@ -1,24 +1,24 @@
--- chrome/browser/about_flags.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/about_flags.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/about_flags.cc
@@ -217,7 +217,7 @@
#include "ui/native_theme/native_theme_features.h"
@@ -219,7 +219,7 @@
#include "ui/ui_features.h"
#include "url/url_features.h"
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
#include "base/allocator/buildflags.h"
#endif
@@ -293,7 +293,7 @@
#include "chrome/browser/supervised_user/supervised_user_features/supervised_user_features.h" // nogncheck
#endif // ENABLE_SUPERVISED_USERS
@@ -301,7 +301,7 @@
#include "device/vr/public/cpp/features.h"
#endif
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
#include "ui/ozone/buildflags.h"
#include "ui/ozone/public/ozone_switches.h"
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
@@ -401,7 +401,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap
@@ -407,7 +407,7 @@ const FeatureEntry::FeatureVariation kDXGIWaitableSwap
{"Max 3 Frames", &kDXGIWaitableSwapChain3Frames, 1, nullptr}};
#endif
@ -27,16 +27,16 @@
const FeatureEntry::Choice kOzonePlatformHintRuntimeChoices[] = {
{flag_descriptions::kOzonePlatformHintChoiceDefault, "", ""},
{flag_descriptions::kOzonePlatformHintChoiceAuto,
@@ -1394,7 +1394,7 @@ const FeatureEntry::FeatureVariation kTabGroupsSaveVar
};
@@ -1322,7 +1322,7 @@ const FeatureEntry::FeatureVariation kLocalWebApproval
#endif
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
- BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA)
+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
const FeatureEntry::FeatureParam kOmniboxDocumentProviderServerScoring[] = {
{"DocumentUseServerScore", "true"},
{"DocumentUseClientScore", "false"},
@@ -4810,7 +4810,7 @@ const FeatureEntry kFeatureEntries[] = {
const FeatureEntry::FeatureParam
kOmniboxDocumentProviderCapLowQualitySuggestionsTo1[] = {
{"DocumentProviderMaxLowQualitySuggestions", "1"},
@@ -4375,13 +4375,13 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kWebShare)},
#endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
@ -45,8 +45,6 @@
{"ozone-platform-hint", flag_descriptions::kOzonePlatformHintName,
flag_descriptions::kOzonePlatformHintDescription, kOsLinux,
MULTI_VALUE_TYPE(kOzonePlatformHintRuntimeChoices)},
@@ -4823,7 +4823,7 @@ const FeatureEntry kFeatureEntries[] = {
password_manager::features::kForceInitialSyncWhenDecryptionFails)},
#endif // BUILDFLAG(IS_LINUX)
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
@ -54,7 +52,7 @@
{"skip-undecryptable-passwords",
flag_descriptions::kSkipUndecryptablePasswordsName,
flag_descriptions::kSkipUndecryptablePasswordsDescription,
@@ -5090,7 +5090,7 @@ const FeatureEntry kFeatureEntries[] = {
@@ -4633,7 +4633,7 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(feed::kDiscoFeedEndpoint)},
#endif // BUILDFLAG(IS_ANDROID)
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
@ -63,7 +61,7 @@
{"following-feed-sidepanel", flag_descriptions::kFollowingFeedSidepanelName,
flag_descriptions::kFollowingFeedSidepanelDescription, kOsDesktop,
FEATURE_VALUE_TYPE(feed::kWebUiFeed)},
@@ -5699,7 +5699,7 @@ const FeatureEntry kFeatureEntries[] = {
@@ -5191,7 +5191,7 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(omnibox::kZeroSuggestInMemoryCaching)},
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
@ -72,7 +70,7 @@
{"omnibox-experimental-keyword-mode",
flag_descriptions::kOmniboxExperimentalKeywordModeName,
flag_descriptions::kOmniboxExperimentalKeywordModeDescription, kOsDesktop,
@@ -6335,7 +6335,7 @@ const FeatureEntry kFeatureEntries[] = {
@@ -5834,7 +5834,7 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kPointerLockOptionsDescription, kOsDesktop,
FEATURE_VALUE_TYPE(features::kPointerLockOptions)},
@ -81,7 +79,7 @@
{"enable-async-dns", flag_descriptions::kAsyncDnsName,
flag_descriptions::kAsyncDnsDescription, kOsWin | kOsLinux,
FEATURE_VALUE_TYPE(features::kAsyncDns)},
@@ -7337,7 +7337,7 @@ const FeatureEntry kFeatureEntries[] = {
@@ -6789,7 +6789,7 @@ const FeatureEntry kFeatureEntries[] = {
#endif // BUILDFLAG(IS_CHROMEOS)
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
@ -90,7 +88,7 @@
{"global-media-controls-modern-ui",
flag_descriptions::kGlobalMediaControlsModernUIName,
flag_descriptions::kGlobalMediaControlsModernUIDescription,
@@ -8174,7 +8174,7 @@ const FeatureEntry kFeatureEntries[] = {
@@ -7532,7 +7532,7 @@ const FeatureEntry kFeatureEntries[] = {
#endif
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
@ -99,7 +97,16 @@
{"quick-commands", flag_descriptions::kQuickCommandsName,
flag_descriptions::kQuickCommandsDescription, kOsDesktop,
FEATURE_VALUE_TYPE(features::kQuickCommands)},
@@ -8439,7 +8439,7 @@ const FeatureEntry kFeatureEntries[] = {
@@ -7759,7 +7759,7 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(ash::features::kWallpaperPerDesk)},
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
{"enable-get-display-media-set", flag_descriptions::kGetDisplayMediaSetName,
flag_descriptions::kGetDisplayMediaSetDescription,
kOsCrOS | kOsLacros | kOsLinux,
@@ -7809,7 +7809,7 @@ const FeatureEntry kFeatureEntries[] = {
#if BUILDFLAG(IS_WIN) || \
(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \
@ -108,7 +115,7 @@
{
"ui-debug-tools",
flag_descriptions::kUIDebugToolsName,
@@ -9056,7 +9056,7 @@ const FeatureEntry kFeatureEntries[] = {
@@ -8346,7 +8346,7 @@ const FeatureEntry kFeatureEntries[] = {
#endif
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \

View file

@ -1,4 +1,4 @@
--- chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.orig 2022-10-05 07:34:01 UTC
--- chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc
@@ -91,7 +91,7 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForSch
return metrics::OmniboxInputType::QUERY;
@ -6,6 +6,6 @@
case ExternalProtocolHandler::UNKNOWN: {
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
// Linux impl of GetApplicationNameForProtocol doesn't distinguish
// Linux impl of GetApplicationNameForScheme doesn't distinguish
// between URL schemes with handers and those without. This will
// make the default behaviour be search on Linux.

View file

@ -1,6 +1,6 @@
--- chrome/browser/background/background_mode_manager.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/background/background_mode_manager.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/background/background_mode_manager.cc
@@ -892,7 +892,7 @@ gfx::ImageSkia GetStatusTrayIcon() {
@@ -889,7 +889,7 @@ gfx::ImageSkia GetStatusTrayIcon() {
return gfx::ImageSkia();
return family->CreateExact(size).AsImageSkia();

View file

@ -1,6 +1,6 @@
--- chrome/browser/browser_features.cc.orig 2022-12-06 08:09:13 UTC
--- chrome/browser/browser_features.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/browser_features.cc
@@ -30,7 +30,7 @@ BASE_FEATURE(kColorProviderRedirectionForThemeProvider
@@ -24,7 +24,7 @@ BASE_FEATURE(kClosedTabCache,
// the browser exits.
BASE_FEATURE(kDestroyProfileOnBrowserClose,
"DestroyProfileOnBrowserClose",

View file

@ -1,6 +1,6 @@
--- chrome/browser/browser_process_impl.cc.orig 2022-12-06 08:09:13 UTC
--- chrome/browser/browser_process_impl.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/browser_process_impl.cc
@@ -211,7 +211,7 @@
@@ -212,7 +212,7 @@
#include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h"
#endif
@ -9,7 +9,7 @@
#include "chrome/browser/error_reporting/chrome_js_error_report_processor.h" // nogncheck
#endif
@@ -1160,7 +1160,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() {
@@ -1190,7 +1190,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() {
ApplyMetricsReportingPolicy();
@ -18,7 +18,7 @@
ChromeJsErrorReportProcessor::Create();
#endif
@@ -1420,7 +1420,7 @@ void BrowserProcessImpl::Unpin() {
@@ -1450,7 +1450,7 @@ void BrowserProcessImpl::Unpin() {
// Mac is currently not supported.
// TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is
// complete.

View file

@ -1,6 +1,6 @@
--- chrome/browser/browser_process_impl.h.orig 2022-10-05 07:34:01 UTC
--- chrome/browser/browser_process_impl.h.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/browser_process_impl.h
@@ -363,7 +363,7 @@ class BrowserProcessImpl : public BrowserProcess,
@@ -364,7 +364,7 @@ class BrowserProcessImpl : public BrowserProcess,
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.

View file

@ -1,4 +1,4 @@
--- chrome/browser/chrome_browser_interface_binders.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/chrome_browser_interface_binders.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/chrome_browser_interface_binders.cc
@@ -113,13 +113,13 @@
#endif // BUILDFLAG(FULL_SAFE_BROWSING)
@ -16,7 +16,7 @@
#include "chrome/browser/ui/webui/app_settings/web_app_settings_ui.h"
#include "ui/webui/resources/cr_components/app_management/app_management.mojom.h"
#endif
@@ -191,7 +191,7 @@
@@ -192,7 +192,7 @@
#endif // BUILDFLAG(IS_ANDROID)
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
@ -25,7 +25,7 @@
#include "chrome/browser/ui/webui/discards/discards.mojom.h"
#include "chrome/browser/ui/webui/discards/discards_ui.h"
#include "chrome/browser/ui/webui/discards/site_data.mojom.h"
@@ -809,7 +809,7 @@ void PopulateChromeFrameBinders(
@@ -853,7 +853,7 @@ void PopulateChromeFrameBinders(
#endif // BUILDFLAG(ENABLE_SPEECH_SERVICE)
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
@ -34,7 +34,7 @@
if (!render_frame_host->GetParent()) {
map->Add<chrome::mojom::DraggableRegions>(
base::BindRepeating(&DraggableRegionsHostImpl::CreateIfAllowed));
@@ -817,7 +817,7 @@ void PopulateChromeFrameBinders(
@@ -861,7 +861,7 @@ void PopulateChromeFrameBinders(
#endif
#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
@ -43,7 +43,7 @@
if (base::FeatureList::IsEnabled(blink::features::kDesktopPWAsSubApps) &&
!render_frame_host->GetParentOrOuterDocument()) {
// The service binder will reject non-primary main frames, but we still need
@@ -882,14 +882,14 @@ void PopulateChromeWebUIFrameBinders(
@@ -926,14 +926,14 @@ void PopulateChromeWebUIFrameBinders(
SegmentationInternalsUI>(map);
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
@ -60,7 +60,7 @@
RegisterWebUIControllerInterfaceBinder<
app_management::mojom::PageHandlerFactory, WebAppSettingsUI>(map);
#endif
@@ -1289,7 +1289,7 @@ void PopulateChromeWebUIFrameBinders(
@@ -1332,7 +1332,7 @@ void PopulateChromeWebUIFrameBinders(
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \

View file

@ -1,4 +1,4 @@
--- chrome/browser/chrome_browser_main.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/chrome_browser_main.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/chrome_browser_main.cc
@@ -240,11 +240,11 @@
@ -23,7 +23,7 @@
#include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h"
#include "chrome/browser/metrics/desktop_session_duration/touch_mode_stats_tracker.h"
#include "chrome/browser/profiles/profile_activity_metrics_recorder.h"
@@ -987,7 +987,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -986,7 +986,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
browser_creator_->AddFirstRunTabs(master_prefs_->new_tabs);
}
@ -32,7 +32,7 @@
// Create directory for user-level Native Messaging manifest files. This
// makes it less likely that the directory will be created by third-party
// software with incorrect owner or permission. See crbug.com/725513 .
@@ -1035,7 +1035,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -1042,7 +1042,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \

View file

@ -1,15 +1,15 @@
--- chrome/browser/chrome_content_browser_client.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/chrome_content_browser_client.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/chrome_content_browser_client.cc
@@ -395,7 +395,7 @@
#include "components/user_manager/user_manager.h"
@@ -412,7 +412,7 @@
#include "services/service_manager/public/mojom/interface_provider_spec.mojom.h"
#include "storage/browser/file_system/external_mount_points.h"
#include "ui/display/screen.h"
-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
#include "chrome/browser/chrome_browser_main_linux.h"
#elif BUILDFLAG(IS_ANDROID)
#include "base/android/application_status_listener.h"
@@ -480,12 +480,12 @@
@@ -497,12 +497,12 @@
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.
@ -24,7 +24,7 @@
#include "components/crash/core/app/crash_switches.h"
#include "components/crash/core/app/crashpad.h"
#endif
@@ -494,13 +494,13 @@
@@ -511,13 +511,13 @@
#include "components/crash/content/browser/crash_handler_host_linux.h"
#endif
@ -40,7 +40,7 @@
#include "chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h"
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ||
// BUILDFLAG(IS_CHROMEOS_ASH)
@@ -529,11 +529,11 @@
@@ -546,11 +546,11 @@
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.
@ -54,7 +54,16 @@
#include "chrome/browser/chrome_browser_main_extra_parts_linux.h"
#elif BUILDFLAG(IS_OZONE)
#include "chrome/browser/chrome_browser_main_extra_parts_ozone.h"
@@ -1623,7 +1623,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
@@ -1559,7 +1559,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre
policy::policy_prefs::kPPAPISharedImagesSwapChainAllowed, true);
registry->RegisterBooleanPref(
policy::policy_prefs::kForceEnablePepperVideoDecoderDevAPI, false);
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
registry->RegisterBooleanPref(prefs::kOutOfProcessSystemDnsResolutionEnabled,
true);
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
@@ -1666,7 +1666,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
#elif BUILDFLAG(IS_CHROMEOS_LACROS)
main_parts = std::make_unique<ChromeBrowserMainPartsLacros>(
is_integration_test, &startup_data_);
@ -63,7 +72,7 @@
main_parts = std::make_unique<ChromeBrowserMainPartsLinux>(
is_integration_test, &startup_data_);
#elif BUILDFLAG(IS_ANDROID)
@@ -1662,7 +1662,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
@@ -1705,7 +1705,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
std::make_unique<ChromeBrowserMainExtraPartsViewsLacros>());
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.
@ -72,7 +81,7 @@
main_parts->AddParts(
std::make_unique<ChromeBrowserMainExtraPartsViewsLinux>());
#else
@@ -1683,7 +1683,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
@@ -1726,7 +1726,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsLacros>());
#endif
@ -81,7 +90,7 @@
main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsLinux>());
#elif BUILDFLAG(IS_OZONE)
main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsOzone>());
@@ -1702,7 +1702,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
@@ -1745,7 +1745,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
chrome::AddMetricsExtraParts(main_parts.get());
@ -90,7 +99,7 @@
main_parts->AddParts(
std::make_unique<
chrome::enterprise_util::ChromeBrowserMainExtraPartsEnterprise>());
@@ -2507,6 +2507,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin
@@ -2578,6 +2578,8 @@ void ChromeContentBrowserClient::AppendExtraCommandLin
#elif BUILDFLAG(IS_POSIX)
#if BUILDFLAG(IS_ANDROID)
bool enable_crash_reporter = true;
@ -99,7 +108,7 @@
#elif BUILDFLAG(IS_CHROMEOS)
bool enable_crash_reporter = false;
if (crash_reporter::IsCrashpadEnabled()) {
@@ -2902,7 +2904,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin
@@ -2949,7 +2951,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin
ThreadProfilerConfiguration::Get()->AppendCommandLineSwitchForChildProcess(
command_line);
@ -108,7 +117,7 @@
// Opt into a hardened stack canary mitigation if it hasn't already been
// force-disabled.
if (!browser_command_line.HasSwitch(switches::kChangeStackGuardOnFork)) {
@@ -4352,7 +4354,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst
@@ -4442,7 +4444,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst
}
}
@ -117,7 +126,7 @@
void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line,
int child_process_id,
@@ -4872,14 +4874,14 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati
@@ -4964,14 +4966,14 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati
&throttles);
}
@ -134,7 +143,7 @@
MaybeAddThrottle(enterprise_connectors::DeviceTrustNavigationThrottle::
MaybeCreateThrottleFor(handle),
&throttles);
@@ -4914,7 +4916,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati
@@ -5010,7 +5012,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati
handle));
}
@ -143,3 +152,12 @@
MaybeAddThrottle(browser_switcher::BrowserSwitcherNavigationThrottle::
MaybeCreateThrottleFor(handle),
&throttles);
@@ -6616,7 +6618,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS
}
bool ChromeContentBrowserClient::ShouldRunOutOfProcessSystemDnsResolution() {
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_BSD)
// This is possibly called before `g_browser_process` is initialized.
PrefService* local_state;
if (g_browser_process) {

View file

@ -1,6 +1,6 @@
--- chrome/browser/chrome_content_browser_client.h.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/chrome_content_browser_client.h.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/chrome_content_browser_client.h
@@ -442,7 +442,7 @@ class ChromeContentBrowserClient : public content::Con
@@ -444,7 +444,7 @@ class ChromeContentBrowserClient : public content::Con
void OverridePageVisibilityState(
content::RenderFrameHost* render_frame_host,
content::PageVisibilityState* visibility_state) override;

View file

@ -1,11 +0,0 @@
--- chrome/browser/content_settings/chrome_content_settings_utils.cc.orig 2022-12-06 08:09:13 UTC
+++ chrome/browser/content_settings/chrome_content_settings_utils.cc
@@ -44,7 +44,7 @@ void UpdateLocationBarUiForWebContents(content::WebCon
location_bar->UpdateContentSettingsIcons();
// TODO(https://crbug.com/1346734): Enable this on all platforms.
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
// The document PiP window does not have a location bar, but has some content
// setting views that need to be updated too.
if (browser->is_type_picture_in_picture()) {

View file

@ -1,6 +1,6 @@
--- chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc.orig 2022-03-28 18:11:04 UTC
--- chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc
@@ -69,7 +69,7 @@ void ChromeProtocolHandlerRegistryDelegate::CheckDefau
@@ -68,7 +68,7 @@ void ChromeProtocolHandlerRegistryDelegate::CheckDefau
// If true default protocol handlers will be removed if the OS level
// registration for a protocol is no longer Chrome.
bool ChromeProtocolHandlerRegistryDelegate::ShouldRemoveHandlersNotInOS() {

View file

@ -1,6 +1,6 @@
--- chrome/browser/dev_ui_browser_resources.grd.orig 2022-10-05 07:34:01 UTC
--- chrome/browser/dev_ui_browser_resources.grd.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/dev_ui_browser_resources.grd
@@ -36,7 +36,7 @@ This file specifies browser resources for developer-fa
@@ -33,7 +33,7 @@ This file specifies browser resources for developer-fa
<include name="IDR_PREDICTORS_JS" file="${root_gen_dir}\chrome\browser\resources\predictors\predictors.js" use_base_dir="false" type="BINDATA" />
<include name="IDR_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_JS" file="${root_gen_dir}\chrome\browser\resources\predictors\resource_prefetch_predictor.js" use_base_dir="false" type="BINDATA" />

View file

@ -1,6 +1,6 @@
--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/download/chrome_download_manager_delegate.cc
@@ -1567,7 +1567,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe
@@ -1554,7 +1554,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe
bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile(
const base::FilePath& path) {
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
@ -9,7 +9,7 @@
if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) {
return !download_prefs_->ShouldOpenPdfInSystemReader();
}
@@ -1683,7 +1683,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow
@@ -1668,7 +1668,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow
content::CheckDownloadAllowedCallback check_download_allowed_cb) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
@ -18,7 +18,7 @@
// Don't download pdf if it is a file URL, as that might cause an infinite
// download loop if Chrome is not the system pdf viewer.
if (url.SchemeIsFile() && download_prefs_->ShouldOpenPdfInSystemReader()) {
@@ -1729,7 +1729,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl
@@ -1714,7 +1714,7 @@ void ChromeDownloadManagerDelegate::CheckSavePackageAl
DCHECK(download_item->IsSavePackageDownload());
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \

View file

@ -1,6 +1,6 @@
--- chrome/browser/download/download_commands.cc.orig 2022-10-05 07:34:01 UTC
--- chrome/browser/download/download_commands.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/download/download_commands.cc
@@ -26,7 +26,7 @@
@@ -27,7 +27,7 @@
#include "ui/base/clipboard/scoped_clipboard_writer.h"
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
@ -9,7 +9,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
@@ -167,7 +167,7 @@ void DownloadCommands::ExecuteCommand(Command command)
@@ -168,7 +168,7 @@ void DownloadCommands::ExecuteCommand(Command command)
}
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \

View file

@ -1,6 +1,6 @@
--- chrome/browser/download/download_commands.h.orig 2022-10-05 07:34:01 UTC
--- chrome/browser/download/download_commands.h.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/download/download_commands.h
@@ -55,7 +55,7 @@ class DownloadCommands {
@@ -56,7 +56,7 @@ class DownloadCommands {
void ExecuteCommand(Command command);
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \

View file

@ -1,4 +1,4 @@
--- chrome/browser/download/download_file_picker.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/download/download_file_picker.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/download/download_file_picker.cc
@@ -17,7 +17,7 @@
#include "content/public/browser/download_manager.h"
@ -9,7 +9,7 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
#include "ui/aura/window.h"
@@ -86,7 +86,7 @@ DownloadFilePicker::DownloadFilePicker(download::Downl
@@ -82,7 +82,7 @@ DownloadFilePicker::DownloadFilePicker(download::Downl
// dialog in Linux (See SelectFileImpl() in select_file_dialog_linux_gtk.cc).
// and windows.Here we make owning_window host to browser current active
// window if it is null. https://crbug.com/1301898

View file

@ -1,6 +1,6 @@
--- chrome/browser/download/download_item_model.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/download/download_item_model.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/download/download_item_model.cc
@@ -787,7 +787,7 @@ bool DownloadItemModel::IsCommandChecked(
@@ -756,7 +756,7 @@ bool DownloadItemModel::IsCommandChecked(
download_crx_util::IsExtensionDownload(*download_);
case DownloadCommands::ALWAYS_OPEN_TYPE:
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
@ -9,7 +9,7 @@
if (download_commands->CanOpenPdfInSystemViewer()) {
DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile());
return prefs->ShouldOpenPdfInSystemReader();
@@ -830,7 +830,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand
@@ -799,7 +799,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand
base::UmaHistogramBoolean("Download.SetAlwaysOpenTo", !is_checked);
DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile());
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
@ -18,7 +18,7 @@
if (download_commands->CanOpenPdfInSystemViewer()) {
prefs->SetShouldOpenPdfInSystemReader(!is_checked);
SetShouldPreferOpeningInBrowser(is_checked);
@@ -1232,7 +1232,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe
@@ -1210,7 +1210,7 @@ void DownloadItemModel::DetermineAndSetShouldPreferOpe
return;
}

View file

@ -1,13 +1,13 @@
--- chrome/browser/download/download_prefs.cc.orig 2022-12-06 08:09:13 UTC
--- chrome/browser/download/download_prefs.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/download/download_prefs.cc
@@ -13,6 +13,7 @@
#include "base/callback_helpers.h"
@@ -11,6 +11,7 @@
#include "base/check.h"
#include "base/cxx17_backports.h"
+#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/files/file_util.h"
#include "base/no_destructor.h"
#include "base/functional/bind.h"
@@ -61,6 +62,10 @@
#include "chrome/browser/ui/pdf/adobe_reader_info_win.h"
#endif

View file

@ -0,0 +1,11 @@
--- chrome/browser/enterprise/connectors/connectors_service.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/enterprise/connectors/connectors_service.cc
@@ -507,7 +507,7 @@ bool ConnectorsService::ConnectorsEnabled() const {
Profile* profile = Profile::FromBrowserContext(context_);
-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
// On desktop, the guest profile is actually the primary OTR profile of
// the "regular" guest profile. The regular guest profile is never used
// directly by users. Also, user are not able to create child OTR profiles

View file

@ -1,20 +1,15 @@
--- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig 2022-12-06 08:09:13 UTC
--- chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/enterprise/connectors/device_trust/device_trust_connector_service_factory.cc
@@ -11,11 +11,11 @@
@@ -11,7 +11,7 @@
#include "chrome/browser/profiles/profile.h"
#include "components/keyed_service/core/keyed_service.h"
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
#include "chrome/browser/browser_process.h"
#if BUILDFLAG(IS_MAC)
#include "chrome/browser/enterprise/connectors/device_trust/browser/mac_device_trust_connector_service.h"
-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
#include "chrome/browser/enterprise/connectors/device_trust/browser/browser_device_trust_connector_service.h"
#endif // BUILDFLAG(IS_MAC)
#include "chrome/browser/policy/chrome_browser_policy_connector.h"
@@ -45,7 +45,7 @@ DeviceTrustConnectorService* DeviceTrustConnectorServi
@@ -41,7 +41,7 @@ DeviceTrustConnectorService* DeviceTrustConnectorServi
bool DeviceTrustConnectorServiceFactory::ServiceIsCreatedWithBrowserContext()
const {
@ -23,7 +18,7 @@
return IsDeviceTrustConnectorFeatureEnabled();
#else
return false;
@@ -81,7 +81,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil
@@ -77,7 +77,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil
DeviceTrustConnectorService* service = nullptr;
@ -32,12 +27,3 @@
if (IsDeviceTrustConnectorFeatureEnabled()) {
auto* key_manager = g_browser_process->browser_policy_connector()
->chrome_browser_cloud_management_controller()
@@ -89,7 +89,7 @@ KeyedService* DeviceTrustConnectorServiceFactory::Buil
#if BUILDFLAG(IS_MAC)
service = new MacDeviceTrustConnectorService(
key_manager, profile->GetPrefs(), g_browser_process->local_state());
-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
service = new BrowserDeviceTrustConnectorService(key_manager,
profile->GetPrefs());
#endif // BUILDFLAG(IS_MAC)

View file

@ -1,6 +1,6 @@
--- chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc.orig 2022-12-01 10:35:46 UTC
--- chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/key_rotation_command_factory.cc
@@ -14,7 +14,7 @@
@@ -13,7 +13,7 @@
#if BUILDFLAG(IS_WIN)
#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/win_key_rotation_command.h"
@ -9,12 +9,12 @@
#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/linux_key_rotation_command.h"
#elif BUILDFLAG(IS_MAC)
#include "chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/mac_key_rotation_command.h"
@@ -47,7 +47,7 @@ std::unique_ptr<KeyRotationCommand> KeyRotationCommand
PrefService* local_prefs) {
@@ -45,7 +45,7 @@ std::unique_ptr<KeyRotationCommand> KeyRotationCommand
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) {
#if BUILDFLAG(IS_WIN)
return std::make_unique<WinKeyRotationCommand>();
-#elif BUILDFLAG(IS_LINUX)
+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
return std::make_unique<LinuxKeyRotationCommand>(url_loader_factory);
#elif BUILDFLAG(IS_MAC)
return std::make_unique<MacKeyRotationCommand>(url_loader_factory,
return std::make_unique<MacKeyRotationCommand>(url_loader_factory);

View file

@ -1,4 +1,4 @@
--- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.h.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.h.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/enterprise/connectors/reporting/browser_crash_event_router.h
@@ -9,7 +9,7 @@
#include "chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.h"
@ -9,8 +9,8 @@
#include "third_party/crashpad/crashpad/client/crash_report_database.h"
#endif // !BUILDFLAG(IS_FUCHSIA)
namespace enterprise_connectors {
@@ -27,7 +27,7 @@ class BrowserCrashEventRouter
BrowserCrashEventRouter& operator=(const BrowserCrashEventRouter&) = delete;
@@ -31,7 +31,7 @@ class BrowserCrashEventRouter
BrowserCrashEventRouter& operator=(BrowserCrashEventRouter&&) = delete;
~BrowserCrashEventRouter() override;
-#if !BUILDFLAG(IS_FUCHSIA)
@ -18,7 +18,7 @@
void OnCloudReportingLaunched(
enterprise_reporting::ReportScheduler* report_scheduler) override;
void UploadToReportingServer(
@@ -42,7 +42,7 @@ class BrowserCrashEventRouter
@@ -46,7 +46,7 @@ class BrowserCrashEventRouter
raw_ptr<policy::ChromeBrowserCloudManagementController, DanglingUntriaged>
controller_ = nullptr;

View file

@ -1,6 +1,6 @@
--- chrome/browser/extensions/BUILD.gn.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/extensions/BUILD.gn.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/extensions/BUILD.gn
@@ -1332,6 +1332,10 @@ static_library("extensions") {
@@ -1336,6 +1336,10 @@ static_library("extensions") {
deps += [ "//chrome/services/printing/public/mojom" ]
}

View file

@ -1,15 +1,15 @@
--- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig 2022-10-05 07:34:01 UTC
+++ chrome/browser/extensions/browser_context_keyed_service_factories.cc
@@ -53,7 +53,7 @@
--- chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/extensions/api/api_browser_context_keyed_service_factories.cc
@@ -40,7 +40,7 @@
#include "extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h"
#include "extensions/browser/api/networking_private/networking_private_delegate_factory.h"
#include "ppapi/buildflags/buildflags.h"
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
#include "chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h"
#endif
@@ -122,7 +122,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt()
@@ -92,7 +92,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt
extensions::SettingsPrivateEventRouterFactory::GetInstance();
extensions::SettingsOverridesAPI::GetFactoryInstance();
extensions::SidePanelService::GetFactoryInstance();

View file

@ -1,6 +1,6 @@
--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc
@@ -31,7 +31,7 @@
@@ -32,7 +32,7 @@
#include "components/reporting/util/statusor.h"
#endif
@ -9,7 +9,7 @@
#include "base/strings/string_util.h"
#include "chrome/browser/enterprise/signals/signals_aggregator_factory.h"
#include "chrome/browser/extensions/api/enterprise_reporting_private/conversion_utils.h"
@@ -149,7 +149,7 @@ api::enterprise_reporting_private::ContextInfo ToConte
@@ -150,7 +150,7 @@ api::enterprise_reporting_private::ContextInfo ToConte
return info;
}
@ -18,7 +18,7 @@
device_signals::SignalsAggregationRequest CreateAggregationRequest(
const std::string& user_id,
@@ -209,7 +209,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction::
@@ -210,7 +210,7 @@ EnterpriseReportingPrivateGetDeviceIdFunction::
// getPersistentSecret
@ -27,7 +27,7 @@
EnterpriseReportingPrivateGetPersistentSecretFunction::
EnterpriseReportingPrivateGetPersistentSecretFunction() = default;
@@ -636,7 +636,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction::
@@ -637,7 +637,7 @@ void EnterpriseReportingPrivateEnqueueRecordFunction::
}
#endif

View file

@ -1,6 +1,6 @@
--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h.orig 2022-12-06 08:09:13 UTC
--- chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.h
@@ -19,7 +19,7 @@
@@ -20,7 +20,7 @@
#include "components/reporting/proto/synced/record.pb.h"
#include "components/reporting/proto/synced/record_constants.pb.h"
#include "components/reporting/util/statusor.h"
@ -9,7 +9,7 @@
#include "base/time/time.h"
#include "components/device_signals/core/browser/signals_types.h"
#endif // BUILDFLAG(IS_CHROMEOS)
@@ -55,7 +55,7 @@ class EnterpriseReportingPrivateGetDeviceIdFunction :
@@ -56,7 +56,7 @@ class EnterpriseReportingPrivateGetDeviceIdFunction :
~EnterpriseReportingPrivateGetDeviceIdFunction() override;
};
@ -18,7 +18,7 @@
class EnterpriseReportingPrivateGetPersistentSecretFunction
: public ExtensionFunction {
@@ -265,7 +265,7 @@ class EnterpriseReportingPrivateEnqueueRecordFunction
@@ -266,7 +266,7 @@ class EnterpriseReportingPrivateEnqueueRecordFunction
#endif

View file

@ -1,4 +1,4 @@
--- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2022-12-01 10:35:46 UTC
--- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc
@@ -20,6 +20,7 @@ static base::LazyInstance<scoped_refptr<StorageDeviceL
@ -6,7 +6,7 @@
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+#if !defined(OS_BSD)
if (g_test_device_list.Get().get() != nullptr) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
FROM_HERE,
@@ -33,6 +34,9 @@ void RemovableStorageProvider::GetAllDevices(DeviceLis
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN},

View file

@ -1,6 +1,6 @@
--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc
@@ -533,7 +533,7 @@ void PasswordsPrivateDelegateImpl::OsReauthCall(
@@ -520,7 +520,7 @@ void PasswordsPrivateDelegateImpl::OsReauthCall(
}
void PasswordsPrivateDelegateImpl::OsReauthTimeoutCall() {

View file

@ -1,6 +1,6 @@
--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2022-12-06 08:09:13 UTC
--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -190,7 +190,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist
@@ -189,7 +189,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.
@ -9,7 +9,7 @@
(*s_allowlist)[::prefs::kUseCustomChromeFrame] =
settings_api::PrefType::PREF_TYPE_BOOLEAN;
#endif
@@ -202,7 +202,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist
@@ -201,7 +201,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlist
settings_api::PrefType::PREF_TYPE_STRING;
(*s_allowlist)[::prefs::kPolicyThemeColor] =
settings_api::PrefType::PREF_TYPE_NUMBER;

View file

@ -1,6 +1,6 @@
--- chrome/browser/extensions/external_provider_impl.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/extensions/external_provider_impl.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/extensions/external_provider_impl.cc
@@ -826,7 +826,7 @@ void ExternalProviderImpl::CreateExternalProviders(
@@ -819,7 +819,7 @@ void ExternalProviderImpl::CreateExternalProviders(
if (!profile->GetPrefs()->GetBoolean(pref_names::kBlockExternalExtensions)) {
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.
@ -9,7 +9,7 @@
provider_list->push_back(std::make_unique<ExternalProviderImpl>(
service,
base::MakeRefCounted<ExternalPrefLoader>(
@@ -854,7 +854,7 @@ void ExternalProviderImpl::CreateExternalProviders(
@@ -847,7 +847,7 @@ void ExternalProviderImpl::CreateExternalProviders(
bundled_extension_creation_flags));
// Define a per-user source of external extensions.

View file

@ -1,11 +1,11 @@
--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
@@ -252,7 +252,7 @@ const struct {
@@ -309,7 +309,7 @@ const struct {
{base::DIR_HOME, FILE_PATH_LITERAL("Library/Mobile Documents"),
kDontBlockChildren},
#endif
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
// On Linux also block access to devices via /dev, as well as security
// sensitive data in /sys and /proc.
// On Linux also block access to devices via /dev.
{kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren},
// And security sensitive data in /proc and /sys.

View file

@ -1,6 +1,15 @@
--- chrome/browser/flag_descriptions.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/flag_descriptions.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/flag_descriptions.cc
@@ -6417,7 +6417,7 @@ const char kSearchWebInSidePanelDescription[] =
@@ -6087,7 +6087,7 @@ const char kLibAssistantV2MigrationDescription[] =
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
const char kGetDisplayMediaSetName[] = "GetDisplayMediaSet API";
const char kGetDisplayMediaSetDescription[] =
"When enabled, the getDisplayMediaSet API for capturing multiple surfaces "
@@ -6316,7 +6316,7 @@ const char kSearchWebInSidePanelDescription[] =
// Random platform combinations -----------------------------------------------
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
@ -9,7 +18,7 @@
const char kQuickCommandsName[] = "Quick Commands";
const char kQuickCommandsDescription[] =
"Enable a text interface to browser features. Invoke with Ctrl-Space.";
@@ -6426,7 +6426,7 @@ const char kQuickCommandsDescription[] =
@@ -6325,7 +6325,7 @@ const char kQuickCommandsDescription[] =
// BUILDFLAG(IS_FUCHSIA)
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
@ -18,7 +27,7 @@
const char kFollowingFeedSidepanelName[] = "Following feed in the sidepanel";
const char kFollowingFeedSidepanelDescription[] =
"Enables the following feed in the sidepanel.";
@@ -6440,7 +6440,7 @@ const char kWebShareDescription[] =
@@ -6346,7 +6346,7 @@ const char kWebShareDescription[] =
"platforms.";
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
@ -27,26 +36,17 @@
const char kOzonePlatformHintChoiceDefault[] = "Default";
const char kOzonePlatformHintChoiceAuto[] = "Auto";
const char kOzonePlatformHintChoiceX11[] = "X11";
@@ -6460,7 +6460,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti
@@ -6366,7 +6366,7 @@ const char kWebBluetoothConfirmPairingSupportDescripti
"Bluetooth";
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
const char kForcePasswordInitialSyncWhenDecryptionFailsName[] =
"Force initial sync to clean local undecryptable passwords during startup";
const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[] =
@@ -6468,7 +6468,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail
"storage and requests initial sync.";
#endif // BUILDFLAG(IS_LINUX)
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
const char kSkipUndecryptablePasswordsName[] =
"Skip undecryptable passwords to use the available decryptable "
"passwords.";
@@ -6477,7 +6477,7 @@ const char kSkipUndecryptablePasswordsDescription[] =
"there are undecryptable ones.";
@@ -6380,7 +6380,7 @@ const char kForcePasswordInitialSyncWhenDecryptionFail
"storage and requests initial sync.";
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
@ -54,7 +54,7 @@
const char kAsyncDnsName[] = "Async DNS resolver";
const char kAsyncDnsDescription[] = "Enables the built-in DNS resolver.";
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
@@ -6577,7 +6577,7 @@ const char kElasticOverscrollDescription[] =
@@ -6481,7 +6481,7 @@ const char kElasticOverscrollDescription[] =
#if BUILDFLAG(IS_WIN) || \
(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \

View file

@ -1,6 +1,15 @@
--- chrome/browser/flag_descriptions.h.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/flag_descriptions.h.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/flag_descriptions.h
@@ -3693,7 +3693,7 @@ extern const char kSearchWebInSidePanelDescription[];
@@ -3520,7 +3520,7 @@ extern const char kLacrosScreenCoordinatesEnabledName[
extern const char kLacrosScreenCoordinatesEnabledDescription[];
#endif // #if BUILDFLAG(IS_CHROMEOS_LACROS)
-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
extern const char kGetDisplayMediaSetName[];
extern const char kGetDisplayMediaSetDescription[];
@@ -3639,14 +3639,14 @@ extern const char kSearchWebInSidePanelDescription[];
// Random platform combinations -----------------------------------------------
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
@ -9,7 +18,15 @@
extern const char kQuickCommandsName[];
extern const char kQuickCommandsDescription[];
@@ -3710,7 +3710,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
// defined (OS_FUCHSIA)
-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
extern const char kWebShareName[];
extern const char kWebShareDescription[];
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
@@ -3656,7 +3656,7 @@ extern const char kWebBluetoothConfirmPairingSupportNa
extern const char kWebBluetoothConfirmPairingSupportDescription[];
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
@ -18,14 +35,17 @@
extern const char kOzonePlatformHintChoiceDefault[];
extern const char kOzonePlatformHintChoiceAuto[];
extern const char kOzonePlatformHintChoiceX11[];
@@ -3723,18 +3723,18 @@ extern const char kForcePasswordInitialSyncWhenDecrypt
extern const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[];
@@ -3666,7 +3666,7 @@ extern const char kOzonePlatformHintName[];
extern const char kOzonePlatformHintDescription[];
#endif // BUILDFLAG(IS_LINUX)
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
extern const char kSkipUndecryptablePasswordsName[];
extern const char kSkipUndecryptablePasswordsDescription[];
@@ -3674,13 +3674,13 @@ extern const char kForcePasswordInitialSyncWhenDecrypt
extern const char kForcePasswordInitialSyncWhenDecryptionFailsDescription[];
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
@ -40,7 +60,7 @@
extern const char kFollowingFeedSidepanelName[];
extern const char kFollowingFeedSidepanelDescription[];
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
@@ -3809,7 +3809,7 @@ extern const char kElasticOverscrollDescription[];
@@ -3760,7 +3760,7 @@ extern const char kElasticOverscrollDescription[];
#if BUILDFLAG(IS_WIN) || \
(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \

View file

@ -1,4 +1,4 @@
--- chrome/browser/headless/headless_mode_util.cc.orig 2023-01-17 19:19:00 UTC
--- chrome/browser/headless/headless_mode_util.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/headless/headless_mode_util.cc
@@ -10,11 +10,11 @@
// New headless mode is available on Linux, Windows and Mac platforms.
@ -11,8 +11,8 @@
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
#include "ui/gl/gl_switches.h"
#include "ui/ozone/public/ozone_switches.h"
#include "ui/gl/gl_switches.h" // nogncheck
#include "ui/ozone/public/ozone_switches.h" // nogncheck
#endif // BUILDFLAG(IS_LINUX)
@@ -64,7 +64,7 @@ void SetUpCommandLine(const base::CommandLine* command
base::CommandLine::ForCurrentProcess()->AppendSwitch(

View file

@ -0,0 +1,20 @@
--- chrome/browser/media/webrtc/capture_policy_utils.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/media/webrtc/capture_policy_utils.cc
@@ -118,7 +118,7 @@ AllowedScreenCaptureLevel GetAllowedCaptureLevel(const
bool IsGetDisplayMediaSetSelectAllScreensAllowedForAnySite(
content::BrowserContext* context) {
-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
Profile* profile = Profile::FromBrowserContext(context);
if (!profile) {
return false;
@@ -145,7 +145,7 @@ bool IsGetDisplayMediaSetSelectAllScreensAllowedForAny
bool IsGetDisplayMediaSetSelectAllScreensAllowed(
content::BrowserContext* context,
const GURL& url) {
-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
Profile* profile = Profile::FromBrowserContext(context);
if (!profile)
return false;

View file

@ -0,0 +1,47 @@
--- chrome/browser/media/webrtc/chrome_screen_enumerator.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/media/webrtc/chrome_screen_enumerator.cc
@@ -20,7 +20,7 @@
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/shell.h"
#include "ui/aura/window.h"
-#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
+#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
#include "base/functional/callback.h"
#include "content/public/browser/desktop_capture.h"
#endif
@@ -31,7 +31,7 @@ base::LazyInstance<std::vector<aura::Window*>>::Destru
root_windows_for_testing_ = LAZY_INSTANCE_INITIALIZER;
} // namespace
-#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
+#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
namespace {
base::LazyInstance<std::unique_ptr<webrtc::DesktopCapturer>>::DestructorAtExit
g_desktop_capturer_for_testing = LAZY_INSTANCE_INITIALIZER;
@@ -77,7 +77,7 @@ blink::mojom::StreamDevicesSetPtr EnumerateScreens(
return stream_devices_set;
}
-#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
+#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
blink::mojom::StreamDevicesSetPtr EnumerateScreens(
blink::mojom::MediaStreamType stream_type) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -128,7 +128,7 @@ void ChromeScreenEnumerator::SetRootWindowsForTesting(
root_windows_for_testing_.Get() = std::move(root_windows);
}
-#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
+#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
void ChromeScreenEnumerator::SetDesktopCapturerForTesting(
std::unique_ptr<webrtc::DesktopCapturer> capturer) {
g_desktop_capturer_for_testing.Get() = std::move(capturer);
@@ -144,7 +144,7 @@ void ChromeScreenEnumerator::EnumerateScreens(
DCHECK(base::FeatureList::IsEnabled(
features::kGetDisplayMediaSetAutoSelectAllScreens));
-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
content::GetUIThreadTaskRunner({})->PostTaskAndReplyWithResult(
FROM_HERE, base::BindOnce(::EnumerateScreens, stream_type),
base::BindOnce(

View file

@ -0,0 +1,20 @@
--- chrome/browser/media/webrtc/chrome_screen_enumerator.h.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/media/webrtc/chrome_screen_enumerator.h
@@ -21,7 +21,7 @@ namespace aura {
class Window;
}
-#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
+#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
namespace webrtc {
class DesktopCapturer;
}
@@ -42,7 +42,7 @@ class ChromeScreenEnumerator : public media::ScreenEnu
#if BUILDFLAG(IS_CHROMEOS_ASH)
static void SetRootWindowsForTesting(std::vector<aura::Window*> root_windows);
-#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
+#elif BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
static void SetDesktopCapturerForTesting(
std::unique_ptr<webrtc::DesktopCapturer> capturer);
#endif

View file

@ -1,6 +1,6 @@
--- chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2022-03-28 18:11:04 UTC
--- chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/media/webrtc/webrtc_event_log_uploader.cc
@@ -40,7 +40,7 @@ const char kProduct[] = "Chrome";
@@ -41,7 +41,7 @@ const char kProduct[] = "Chrome";
const char kProduct[] = "Chrome_Mac";
#elif BUILDFLAG(IS_CHROMEOS_ASH)
const char kProduct[] = "Chrome_ChromeOS";

View file

@ -1,6 +1,6 @@
--- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2022-10-05 07:34:01 UTC
--- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2023-03-13 07:33:08 UTC
+++ chrome/browser/media/webrtc/webrtc_logging_controller.cc
@@ -24,10 +24,10 @@
@@ -23,10 +23,10 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/render_process_host.h"
@ -13,7 +13,7 @@
using webrtc_event_logging::WebRtcEventLogManager;
@@ -281,7 +281,7 @@ void WebRtcLoggingController::StartEventLogging(
@@ -277,7 +277,7 @@ void WebRtcLoggingController::StartEventLogging(
web_app_id, callback);
}
@ -22,7 +22,7 @@
void WebRtcLoggingController::GetLogsDirectory(
LogsDirectoryCallback callback,
LogsDirectoryErrorCallback error_callback) {
@@ -327,7 +327,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess
@@ -322,7 +322,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess
FROM_HERE,
base::BindOnce(std::move(callback), file_system.id(), registered_name));
}

Some files were not shown because too many files have changed in this diff Show more