mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-31 10:46:16 +00:00
www/chromium: update to 94.0.4606.81
MFH: 2021Q4 Security: https://vuxml.freebsd.org/freebsd/a7732806-0b2a-11ec-836b-3065ec8fd3ec.html Security: https://vuxml.freebsd.org/freebsd/47b571f2-157b-11ec-ae98-704d7b472482.html Security: https://vuxml.freebsd.org/freebsd/3551e106-1b17-11ec-a8a7-704d7b472482.html Security: https://vuxml.freebsd.org/freebsd/b6c875f1-1d76-11ec-ae80-704d7b472482.html Security: https://vuxml.freebsd.org/freebsd/777edbbe-2230-11ec-8869-704d7b472482.html Security: https://vuxml.freebsd.org/freebsd/7d3d94d3-2810-11ec-9c51-3065ec8fd3ec.html
This commit is contained in:
parent
6996a61924
commit
336f302a55
@ -1,8 +1,7 @@
|
||||
# Created by: Florent Thoumie <flz@FreeBSD.org>
|
||||
|
||||
PORTNAME= chromium
|
||||
PORTVERSION= 92.0.4515.159
|
||||
PORTREVISION= 2
|
||||
PORTVERSION= 94.0.4606.81
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \
|
||||
LOCAL/rene/chromium/:fonts
|
||||
@ -14,7 +13,6 @@ COMMENT= Google web browser based on WebKit
|
||||
LICENSE= BSD3CLAUSE LGPL21 MPL11
|
||||
LICENSE_COMB= multi
|
||||
|
||||
BROKEN_i386= ../../base/files/file_util_posix.cc:1258:29: error: no matching function for call to 'sendfile' (ssize_t vs off_t)
|
||||
ONLY_FOR_ARCHS= aarch64 amd64 i386
|
||||
|
||||
BUILD_DEPENDS= bash:shells/bash \
|
||||
@ -72,10 +70,10 @@ USES= bison compiler:c++17-lang cpe desktop-file-utils dos2unix gl gnome jpeg l
|
||||
|
||||
CPE_VENDOR= google
|
||||
CPE_PRODUCT= chrome
|
||||
DOS2UNIX_FILES= third_party/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h \
|
||||
third_party/vulkan_memory_allocator/src/vk_mem_alloc.h
|
||||
DOS2UNIX_FILES= third_party/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h
|
||||
USE_GL= gbm gl
|
||||
USE_GNOME= atk dconf glib20 gtk30 libxml2 libxslt
|
||||
USE_GNOME= atk dconf gdkpixbuf2 glib20 gtk30 libxml2 libxslt
|
||||
INSTALLS_ICONS= yes
|
||||
USE_LDCONFIG= ${DATADIR}
|
||||
USE_PERL5= build
|
||||
USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \
|
||||
@ -101,7 +99,6 @@ GN_ARGS+= clang_use_chrome_plugins=false \
|
||||
enable_nacl=false \
|
||||
enable_one_click_signin=true \
|
||||
enable_remoting=false \
|
||||
fieldtrial_testing_like_official_build=true \
|
||||
is_clang=true \
|
||||
optimize_webui=false \
|
||||
toolkit_views=true \
|
||||
@ -113,7 +110,7 @@ GN_ARGS+= clang_use_chrome_plugins=false \
|
||||
use_gnome_keyring=false \
|
||||
use_lld=true \
|
||||
use_sysroot=false \
|
||||
use_system_freetype=true \
|
||||
use_system_freetype=false \
|
||||
use_system_harfbuzz=true \
|
||||
use_system_libjpeg=true \
|
||||
extra_cxxflags="${CXXFLAGS}" \
|
||||
@ -269,7 +266,11 @@ pre-configure:
|
||||
#./build/linux/unbundle/remove_bundled_libraries.py [list of preserved]
|
||||
cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \
|
||||
./build/linux/unbundle/replace_gn_files.py --system-libraries \
|
||||
ffmpeg flac fontconfig freetype harfbuzz-ng libdrm libpng libwebp libxml libxslt openh264 opus snappy || ${FALSE}
|
||||
flac fontconfig freetype harfbuzz-ng libdrm libpng libwebp libxml libxslt openh264 opus snappy || ${FALSE}
|
||||
# Chromium uses an unreleased version of FFmpeg, so configure it
|
||||
${CP} -R \
|
||||
${WRKSRC}/third_party/ffmpeg/chromium/config/Chrome/linux/ \
|
||||
${WRKSRC}/third_party/ffmpeg/chromium/config/Chrome/freebsd
|
||||
|
||||
do-configure:
|
||||
# GN generator bootstrapping and generating ninja files
|
||||
|
@ -1,7 +1,7 @@
|
||||
TIMESTAMP = 1629197071
|
||||
SHA256 (chromium-92.0.4515.159.tar.xz) = d97d337d0d70e959a75f1f510f5d78d2b57b5bf24573b7ade9fff9f26a7cfd11
|
||||
SIZE (chromium-92.0.4515.159.tar.xz) = 958060524
|
||||
SHA256 (chromium-92.0.4515.159-testdata.tar.xz) = 5787a7e7a6567dcf04bc3d2c3b5ed01a8d215b6d47ef37bd1844444938f41ffa
|
||||
SIZE (chromium-92.0.4515.159-testdata.tar.xz) = 256835676
|
||||
TIMESTAMP = 1633682206
|
||||
SHA256 (chromium-94.0.4606.81.tar.xz) = 7071aa2b2caf48094c2ae816395948b4daec940606f4982ad5bbf68e5d2de598
|
||||
SIZE (chromium-94.0.4606.81.tar.xz) = 1039841108
|
||||
SHA256 (chromium-94.0.4606.81-testdata.tar.xz) = 6cddfe2fe7a36c79770c165d08f3ef9d778f78ed5e0c0e98b3eaa2e54884df03
|
||||
SIZE (chromium-94.0.4606.81-testdata.tar.xz) = 257006276
|
||||
SHA256 (test_fonts-85.tar.xz) = f22b61b3639acb147c98ec2e2305d8b96f0b55c8c74c40e2ea696402fae8cef9
|
||||
SIZE (test_fonts-85.tar.xz) = 9511984
|
||||
|
@ -26,8 +26,6 @@
|
||||
#include "base/system/sys_info.h"
|
||||
#include "net/base/network_interfaces.h"
|
||||
|
||||
using SettingValue = enterprise_signals::DeviceInfo::SettingValue;
|
||||
|
||||
namespace enterprise_signals {
|
||||
|
||||
namespace {
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- build/config/compiler/pgo/pgo.gni.orig 2021-08-17 00:15:54 UTC
|
||||
--- build/config/compiler/pgo/pgo.gni.orig 2021-10-08 06:25:34 UTC
|
||||
+++ build/config/compiler/pgo/pgo.gni
|
||||
@@ -16,7 +16,7 @@ declare_args() {
|
||||
# TODO(crbug.com/1052397): Remove chromeos_is_browser_only once
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2021-08-17 00:18:54 UTC
|
||||
--- third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2021-10-08 06:29:18 UTC
|
||||
+++ third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h
|
||||
@@ -16,7 +16,7 @@
|
||||
#if defined(OS_ANDROID)
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- BUILD.gn.orig 2021-07-19 18:45:04 UTC
|
||||
--- BUILD.gn.orig 2021-09-24 04:25:55 UTC
|
||||
+++ BUILD.gn
|
||||
@@ -443,7 +443,7 @@ group("gn_all") {
|
||||
@@ -449,7 +449,7 @@ group("gn_all") {
|
||||
]
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
deps += [
|
||||
"//third_party/breakpad:breakpad_unittests",
|
||||
"//third_party/breakpad:core-2-minidump",
|
||||
@@ -488,8 +488,6 @@ group("gn_all") {
|
||||
@@ -494,8 +494,6 @@ group("gn_all") {
|
||||
"//net:disk_cache_memory_test",
|
||||
"//net:quic_client",
|
||||
"//net:quic_server",
|
||||
@ -18,7 +18,16 @@
|
||||
"//testing:empty_main",
|
||||
]
|
||||
|
||||
@@ -544,10 +542,6 @@ group("gn_all") {
|
||||
@@ -506,7 +504,7 @@ group("gn_all") {
|
||||
]
|
||||
}
|
||||
|
||||
- if (is_chrome_branded && is_official_build) {
|
||||
+ if (is_chrome_branded && is_official_build && !is_bsd) {
|
||||
# TODO(dpranke): add the linux_dump_symbols flag?
|
||||
deps += [ "//chrome:linux_symbols" ]
|
||||
}
|
||||
@@ -550,10 +548,6 @@ group("gn_all") {
|
||||
"//chrome/test:load_library_perf_tests",
|
||||
"//chrome/test:sync_performance_tests",
|
||||
"//chrome/test/chromedriver:chromedriver",
|
||||
@ -29,7 +38,7 @@
|
||||
"//media/cast:generate_barcode_video",
|
||||
"//media/cast:generate_timecode_audio",
|
||||
"//net:crash_cache",
|
||||
@@ -606,10 +600,6 @@ group("gn_all") {
|
||||
@@ -612,10 +606,6 @@ group("gn_all") {
|
||||
"//mojo:mojo_perftests",
|
||||
"//services/service_manager/public/cpp",
|
||||
"//testing/gmock:gmock_main",
|
||||
@ -40,7 +49,7 @@
|
||||
]
|
||||
|
||||
if (!is_android) {
|
||||
@@ -687,7 +677,7 @@ group("gn_all") {
|
||||
@@ -693,7 +683,7 @@ group("gn_all") {
|
||||
host_os == "win") {
|
||||
deps += [ "//chrome/test/mini_installer:mini_installer_tests" ]
|
||||
}
|
||||
@ -49,7 +58,7 @@
|
||||
deps += [ "//third_party/breakpad:symupload($host_toolchain)" ]
|
||||
}
|
||||
|
||||
@@ -702,7 +692,7 @@ group("gn_all") {
|
||||
@@ -708,7 +698,7 @@ group("gn_all") {
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +67,7 @@
|
||||
deps += [
|
||||
"//third_party/crashpad/crashpad:crashpad_tests",
|
||||
"//third_party/crashpad/crashpad/handler:crashpad_handler",
|
||||
@@ -819,7 +809,6 @@ group("gn_all") {
|
||||
@@ -825,7 +815,6 @@ group("gn_all") {
|
||||
"//chrome/browser/vr:vr_common_perftests",
|
||||
"//chrome/browser/vr:vr_common_unittests",
|
||||
"//chrome/browser/vr:vr_pixeltests",
|
||||
@ -66,7 +75,7 @@
|
||||
]
|
||||
if (is_android) {
|
||||
deps += [ "//chrome/browser/android/vr:vr_android_unittests" ]
|
||||
@@ -1118,7 +1107,7 @@ if (!is_ios) {
|
||||
@@ -1131,7 +1120,7 @@ if (!is_ios) {
|
||||
data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ]
|
||||
}
|
||||
|
||||
@ -75,7 +84,7 @@
|
||||
data_deps +=
|
||||
[ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
|
||||
}
|
||||
@@ -1127,7 +1116,7 @@ if (!is_ios) {
|
||||
@@ -1140,7 +1129,7 @@ if (!is_ios) {
|
||||
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
|
||||
}
|
||||
|
||||
@ -84,7 +93,16 @@
|
||||
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
|
||||
}
|
||||
|
||||
@@ -1371,9 +1360,6 @@ group("chromium_builder_perf") {
|
||||
@@ -1374,7 +1363,7 @@ group("chromium_builder_perf") {
|
||||
data_deps += [ "//chrome/test:performance_browser_tests" ]
|
||||
}
|
||||
if (is_linux || is_chromeos_lacros) {
|
||||
- if (is_official_build) {
|
||||
+ if (is_official_build && !is_bsd) {
|
||||
# In GN builds, this is controlled by the 'linux_dump_symbols'
|
||||
# flag, which defaults to 1 for official builds. For now,
|
||||
# we skip the separate flag and just key off of is_official_build.
|
||||
@@ -1386,9 +1375,6 @@ group("chromium_builder_perf") {
|
||||
|
||||
if (is_win) {
|
||||
data_deps += [ "//chrome/installer/mini_installer:mini_installer" ]
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/BUILD.gn.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/BUILD.gn.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/BUILD.gn
|
||||
@@ -972,7 +972,7 @@ component("base") {
|
||||
@@ -935,7 +935,7 @@ component("base") {
|
||||
"timer/hi_res_timer_manager_posix.cc",
|
||||
]
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
sources += [
|
||||
"cpu_affinity_posix.cc",
|
||||
"cpu_affinity_posix.h",
|
||||
@@ -983,6 +983,11 @@ component("base") {
|
||||
@@ -946,6 +946,11 @@ component("base") {
|
||||
"profiler/thread_delegate_posix.h",
|
||||
]
|
||||
}
|
||||
@ -21,7 +21,7 @@
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
@@ -1394,7 +1399,7 @@ component("base") {
|
||||
@@ -1367,7 +1372,7 @@ component("base") {
|
||||
# building inside the cros_sdk environment - use host_toolchain as a
|
||||
# more robust check for this.
|
||||
if (!use_sysroot &&
|
||||
@ -30,7 +30,7 @@
|
||||
host_toolchain != "//build/toolchain/cros:host") {
|
||||
libs += [ "atomic" ]
|
||||
}
|
||||
@@ -1447,7 +1452,7 @@ component("base") {
|
||||
@@ -1420,7 +1425,7 @@ component("base") {
|
||||
"allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc",
|
||||
]
|
||||
}
|
||||
@ -39,7 +39,7 @@
|
||||
sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ]
|
||||
}
|
||||
if (is_win) {
|
||||
@@ -2119,6 +2124,34 @@ component("base") {
|
||||
@@ -2099,6 +2104,34 @@ component("base") {
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
# iOS
|
||||
if (is_ios) {
|
||||
sources -= [
|
||||
@@ -3339,7 +3372,7 @@ test("base_unittests") {
|
||||
@@ -3292,7 +3325,7 @@ test("base_unittests") {
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@
|
||||
sources += [
|
||||
"debug/proc_maps_linux_unittest.cc",
|
||||
"files/scoped_file_linux_unittest.cc",
|
||||
@@ -3382,7 +3415,7 @@ test("base_unittests") {
|
||||
@@ -3339,7 +3372,7 @@ test("base_unittests") {
|
||||
"posix/unix_domain_socket_unittest.cc",
|
||||
"task/thread_pool/task_tracker_posix_unittest.cc",
|
||||
]
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- base/allocator/allocator.gni.orig 2021-07-19 18:45:05 UTC
|
||||
+++ base/allocator/allocator.gni
|
||||
@@ -60,7 +60,7 @@ declare_args() {
|
||||
# not, and redesign or remove the flag accordingly. We may want to assert a
|
||||
# possible conflict between |use_allocator = "partition"| and
|
||||
# |use_partition_alloc = true| rather than prioritizing use_partition_alloc.
|
||||
- use_partition_alloc = !is_ios # Never use PartitionAlloc on iOS.
|
||||
+ use_partition_alloc = !is_ios # Never use PartitionAlloc on iOS.
|
||||
}
|
||||
|
||||
if (!use_partition_alloc && use_allocator == "partition") {
|
@ -1,4 +1,4 @@
|
||||
--- base/allocator/allocator_shim_unittest.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/allocator/allocator_shim_unittest.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/allocator/allocator_shim_unittest.cc
|
||||
@@ -369,7 +369,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) {
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
#if !defined(OS_WIN)
|
||||
free(posix_memalign_ptr);
|
||||
@@ -614,7 +614,7 @@ static size_t GetUsableSize(void* ptr) {
|
||||
@@ -615,7 +615,7 @@ static size_t GetUsableSize(void* ptr) {
|
||||
static size_t GetUsableSize(void* ptr) {
|
||||
return malloc_size(ptr);
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- base/allocator/partition_allocator/address_space_randomization.h.orig 2021-10-07 16:50:24 UTC
|
||||
+++ base/allocator/partition_allocator/address_space_randomization.h
|
||||
@@ -36,7 +36,7 @@ AslrMask(uintptr_t bits) {
|
||||
|
||||
#if defined(ARCH_CPU_64_BITS)
|
||||
|
||||
- #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
|
||||
+ #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && !defined(OS_BSD)
|
||||
|
||||
// We shouldn't allocate system pages at all for sanitizer builds. However,
|
||||
// we do, and if random hint addresses interfere with address ranges
|
@ -1,6 +1,6 @@
|
||||
--- base/allocator/partition_allocator/partition_alloc.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/allocator/partition_allocator/partition_alloc.cc.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/allocator/partition_allocator/partition_alloc.cc
|
||||
@@ -56,7 +56,12 @@ void PartitionAllocGlobalInit(OomFunction on_out_of_me
|
||||
@@ -57,7 +57,12 @@ void PartitionAllocGlobalInit(OomFunction on_out_of_me
|
||||
"maximum direct mapped allocation");
|
||||
|
||||
// Check that some of our zanier calculations worked out as expected.
|
||||
@ -10,6 +10,6 @@
|
||||
+#else
|
||||
static_assert(kSmallestBucket == kAlignment, "generic smallest bucket");
|
||||
+#endif
|
||||
static_assert(kMaxBucketed == 983040, "generic max bucketed");
|
||||
static_assert(kMaxBucketed == 917504, "generic max bucketed");
|
||||
STATIC_ASSERT_OR_PA_CHECK(
|
||||
MaxSystemPagesPerSlotSpan() < (1 << 8),
|
||||
MaxSystemPagesPerRegularSlotSpan() <= 16,
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/allocator/partition_allocator/partition_alloc_config.h.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/allocator/partition_allocator/partition_alloc_config.h.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/allocator/partition_allocator/partition_alloc_config.h
|
||||
@@ -46,9 +46,13 @@ static_assert(sizeof(void*) != 8, "");
|
||||
@@ -61,9 +61,13 @@ static_assert(sizeof(void*) != 8, "");
|
||||
#define PA_HAS_LINUX_KERNEL
|
||||
#endif
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/allocator/partition_allocator/partition_alloc_unittest.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/allocator/partition_allocator/partition_alloc_unittest.cc.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/allocator/partition_allocator/partition_alloc_unittest.cc
|
||||
@@ -1651,7 +1651,7 @@ TEST_F(PartitionAllocTest, LostFreeSlotSpansBug) {
|
||||
@@ -1755,7 +1755,7 @@ TEST_F(PartitionAllocTest, LostFreeSlotSpansBug) {
|
||||
// cause flake.
|
||||
#if !defined(OS_WIN) && \
|
||||
(!defined(ARCH_CPU_64_BITS) || \
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
// The following four tests wrap a called function in an expect death statement
|
||||
// to perform their test, because they are non-hermetic. Specifically they are
|
||||
@@ -1702,7 +1702,7 @@ TEST_F(PartitionAllocDeathTest, DISABLED_RepeatedTryRe
|
||||
@@ -1806,7 +1806,7 @@ TEST_F(PartitionAllocDeathTest, DISABLED_RepeatedTryRe
|
||||
}
|
||||
|
||||
#endif // !defined(ARCH_CPU_64_BITS) || (defined(OS_POSIX) &&
|
||||
|
@ -1,47 +1,47 @@
|
||||
--- base/allocator/partition_allocator/partition_root.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/allocator/partition_allocator/partition_root.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/allocator/partition_allocator/partition_root.cc
|
||||
@@ -25,7 +25,7 @@
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "wow64apiset.h"
|
||||
#endif
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace {
|
||||
@@ -41,7 +41,7 @@ namespace base {
|
||||
|
||||
#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||
namespace {
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
-#if defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
+#if defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
|
||||
|
||||
// NO_THREAD_SAFETY_ANALYSIS: acquires the lock and doesn't release it, by
|
||||
// design.
|
||||
@@ -92,7 +92,7 @@ void AfterForkInChild() {
|
||||
@@ -94,7 +94,7 @@ void AfterForkInChild() {
|
||||
internal::ThreadCacheRegistry::Instance()
|
||||
.ForcePurgeAllThreadAfterForkUnsafe();
|
||||
}
|
||||
-#endif // defined(OS_LINUX)
|
||||
+#endif // defined(OS_LINUX) || defined(OS_BSD)
|
||||
-#endif // defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
+#endif // defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
|
||||
|
||||
std::atomic<bool> g_global_init_called;
|
||||
void PartitionAllocMallocInitOnce() {
|
||||
@@ -102,7 +102,7 @@ void PartitionAllocMallocInitOnce() {
|
||||
@@ -104,7 +104,7 @@ void PartitionAllocMallocInitOnce() {
|
||||
if (!g_global_init_called.compare_exchange_strong(expected, true))
|
||||
return;
|
||||
|
||||
-#if defined(OS_LINUX)
|
||||
+#if defined(OS_LINUX) || defined(OS_BSD)
|
||||
-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_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.
|
||||
@@ -127,7 +127,7 @@ void PartitionAllocMallocInitOnce() {
|
||||
@@ -129,7 +129,7 @@ void PartitionAllocMallocInitOnce() {
|
||||
int err =
|
||||
pthread_atfork(BeforeForkInParent, AfterForkInParent, AfterForkInChild);
|
||||
PA_CHECK(err == 0);
|
||||
-#endif // defined(OS_LINUX)
|
||||
+#endif // defined(OS_LINUX) || defined(OS_BSD)
|
||||
-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
+#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
|
||||
}
|
||||
#endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||
|
||||
} // namespace
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/allocator/partition_allocator/spinning_mutex.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/allocator/partition_allocator/spinning_mutex.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/allocator/partition_allocator/spinning_mutex.cc
|
||||
@@ -16,9 +16,16 @@
|
||||
@@ -20,9 +20,16 @@
|
||||
#include <unistd.h>
|
||||
#endif // defined(PA_HAS_LINUX_KERNEL)
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
void SpinningMutex::FutexWait() {
|
||||
// Save and restore errno.
|
||||
@@ -42,8 +49,13 @@ void SpinningMutex::FutexWait() {
|
||||
@@ -46,8 +53,13 @@ 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.
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
if (err) {
|
||||
// These are programming error, check them.
|
||||
@@ -55,8 +67,14 @@ void SpinningMutex::FutexWait() {
|
||||
@@ -59,8 +71,14 @@ void SpinningMutex::FutexWait() {
|
||||
|
||||
void SpinningMutex::FutexWake() {
|
||||
int saved_errno = errno;
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/allocator/partition_allocator/starscan/pcscan_internal.cc.orig 2021-07-28 07:02:32 UTC
|
||||
--- base/allocator/partition_allocator/starscan/pcscan_internal.cc.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/allocator/partition_allocator/starscan/pcscan_internal.cc
|
||||
@@ -72,7 +72,7 @@ namespace internal {
|
||||
@@ -59,7 +59,7 @@ namespace internal {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/allocator/partition_allocator/starscan/stack/stack.cc.orig 2021-07-28 10:41:10 UTC
|
||||
--- base/allocator/partition_allocator/starscan/stack/stack.cc.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/allocator/partition_allocator/starscan/stack/stack.cc
|
||||
@@ -17,6 +17,10 @@
|
||||
#include <pthread.h>
|
||||
@ -30,10 +30,10 @@
|
||||
@@ -71,6 +83,9 @@ void* GetStackTop() {
|
||||
// See https://code.google.com/p/nativeclient/issues/detail?id=3431.
|
||||
return __libc_stack_end;
|
||||
#endif // defined(LIBC_GLIBC)
|
||||
#else
|
||||
+#if defined(OS_FREEBSD)
|
||||
+ pthread_attr_destroy(&attr);
|
||||
+#endif
|
||||
return nullptr;
|
||||
#endif // defined(LIBC_GLIBC)
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- base/containers/checked_iterators_unittest.cc.orig 2021-10-05 14:50:27 UTC
|
||||
+++ base/containers/checked_iterators_unittest.cc
|
||||
@@ -88,7 +88,7 @@ TEST(CheckedContiguousIterator, ConvertingComparisonOp
|
||||
// lags a bit behind.
|
||||
// TODO(crbug.com/1166360): Enable this test on ChromeOS once the shared libc++
|
||||
// is sufficiently modern.
|
||||
-#if defined(_LIBCPP_VERSION) && !defined(OS_NACL) && !defined(OS_CHROMEOS)
|
||||
+#if defined(_LIBCPP_VERSION) && !defined(OS_NACL) && !defined(OS_CHROMEOS) && !defined(OS_BSD)
|
||||
namespace {
|
||||
|
||||
// Helper template that wraps an iterator and disables its dereference and
|
@ -1,8 +1,8 @@
|
||||
--- base/cpu.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/cpu.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/cpu.cc
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "base/stl_util.h"
|
||||
#include "base/cxx17_backports.h"
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || \
|
||||
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD) || \
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/debug/debugger_posix.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/debug/debugger_posix.cc.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/debug/debugger_posix.cc
|
||||
@@ -93,7 +93,7 @@ bool BeingDebugged() {
|
||||
@@ -92,7 +92,7 @@ bool BeingDebugged() {
|
||||
KERN_PROC,
|
||||
KERN_PROC_PID,
|
||||
getpid()
|
||||
@ -9,7 +9,7 @@
|
||||
, sizeof(struct kinfo_proc),
|
||||
0
|
||||
#endif
|
||||
@@ -101,33 +101,35 @@ bool BeingDebugged() {
|
||||
@@ -100,33 +100,35 @@ bool BeingDebugged() {
|
||||
|
||||
// Caution: struct kinfo_proc is marked __APPLE_API_UNSTABLE. The source and
|
||||
// binary interfaces may change.
|
||||
|
@ -1,11 +1,11 @@
|
||||
--- base/debug/stack_trace.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/debug/stack_trace.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/debug/stack_trace.cc
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#if BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS)
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD)
|
||||
#include <pthread.h>
|
||||
|
||||
#include "base/process/process_handle.h"
|
||||
#include "base/threading/platform_thread.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/debug/stack_trace.h.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/debug/stack_trace.h.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/debug/stack_trace.h
|
||||
@@ -19,6 +19,7 @@
|
||||
#if !defined(OS_NACL)
|
||||
@ -8,3 +8,12 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
@@ -156,7 +157,7 @@ BASE_EXPORT size_t CollectStackTrace(void** trace, siz
|
||||
// scanning area at the origin of the stack, wasting time and not finding any
|
||||
// frames (since Android libraries don't have frame pointers). Scanning is not
|
||||
// enabled on other posix platforms due to legacy reasons.
|
||||
-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
|
||||
constexpr bool kEnableScanningByDefault = true;
|
||||
#else
|
||||
constexpr bool kEnableScanningByDefault = false;
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/debug/stack_trace_posix.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/debug/stack_trace_posix.cc.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/debug/stack_trace_posix.cc
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <AvailabilityMacros.h>
|
||||
@ -9,6 +9,24 @@
|
||||
#include "base/debug/proc_maps_linux.h"
|
||||
#endif
|
||||
|
||||
@@ -424,7 +424,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf
|
||||
if (::signal(signal, SIG_DFL) == SIG_ERR) {
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
-#elif !defined(OS_LINUX)
|
||||
+#elif !defined(OS_LINUX) && !defined(OS_BSD)
|
||||
// For all operating systems but Linux we do not reraise the signal that
|
||||
// brought us here but terminate the process immediately.
|
||||
// Otherwise various tests break on different operating systems, see
|
||||
@@ -432,7 +432,7 @@ void StackDumpSignalHandler(int signal, siginfo_t* inf
|
||||
PrintToStderr(
|
||||
"Calling _exit(EXIT_FAILURE). Core file will not be generated.\n");
|
||||
_exit(EXIT_FAILURE);
|
||||
-#endif // !defined(OS_LINUX)
|
||||
+#endif // !defined(OS_LINUX) && !defined(OS_BSD)
|
||||
|
||||
// After leaving this handler control flow returns to the point where the
|
||||
// signal was raised, raising the current signal once again but executing the
|
||||
@@ -667,13 +667,21 @@ class SandboxSymbolizeHelper {
|
||||
// Reads /proc/self/maps.
|
||||
std::string contents;
|
||||
@ -43,3 +61,15 @@
|
||||
// Skip pseudo-paths, like [stack], [vdso], [heap], etc ...
|
||||
continue;
|
||||
}
|
||||
@@ -801,9 +813,9 @@ bool EnableInProcessStackDumping() {
|
||||
success &= (sigaction(SIGBUS, &action, nullptr) == 0);
|
||||
success &= (sigaction(SIGSEGV, &action, nullptr) == 0);
|
||||
// On Linux, SIGSYS is reserved by the kernel for seccomp-bpf sandboxing.
|
||||
-#if !defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if !defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_BSD)
|
||||
success &= (sigaction(SIGSYS, &action, nullptr) == 0);
|
||||
-#endif // !defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#endif // !defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_BSD)
|
||||
|
||||
return success;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/files/file_path_unittest.cc.orig 2021-05-12 22:05:40 UTC
|
||||
--- base/files/file_path_unittest.cc.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/files/file_path_unittest.cc
|
||||
@@ -1179,7 +1179,7 @@ TEST_F(FilePathTest, FromUTF8Unsafe_And_AsUTF8Unsafe)
|
||||
@@ -1188,7 +1188,7 @@ TEST_F(FilePathTest, FromUTF8Unsafe_And_AsUTF8Unsafe)
|
||||
"\xEF\xBC\xA1\xEF\xBC\xA2\xEF\xBC\xA3.txt" },
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/files/file_path_watcher_unittest.cc.orig 2021-05-12 22:05:40 UTC
|
||||
--- base/files/file_path_watcher_unittest.cc.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/files/file_path_watcher_unittest.cc
|
||||
@@ -452,12 +452,12 @@ TEST_F(FilePathWatcherTest, WatchDirectory) {
|
||||
@@ -451,12 +451,12 @@ TEST_F(FilePathWatcherTest, WatchDirectory) {
|
||||
VLOG(1) << "Waiting for file1 creation";
|
||||
ASSERT_TRUE(WaitForEvents());
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
ASSERT_TRUE(base::DeleteFile(file1));
|
||||
VLOG(1) << "Waiting for file1 deletion";
|
||||
@@ -1034,7 +1034,7 @@ TEST_F(FilePathWatcherTest, InotifyLimitInUpdateRecurs
|
||||
@@ -1031,7 +1031,7 @@ TEST_F(FilePathWatcherTest, InotifyLimitInUpdateRecurs
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
enum Permission {
|
||||
Read,
|
||||
@@ -1042,7 +1042,7 @@ enum Permission {
|
||||
@@ -1039,7 +1039,7 @@ enum Permission {
|
||||
Execute
|
||||
};
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
bool ChangeFilePermissions(const FilePath& path, Permission perm, bool allow) {
|
||||
struct stat stat_buf;
|
||||
|
||||
@@ -1071,9 +1071,9 @@ bool ChangeFilePermissions(const FilePath& path, Permi
|
||||
@@ -1068,9 +1068,9 @@ bool ChangeFilePermissions(const FilePath& path, Permi
|
||||
}
|
||||
return chmod(path.value().c_str(), stat_buf.st_mode) == 0;
|
||||
}
|
||||
@ -45,7 +45,7 @@
|
||||
// Linux implementation of FilePathWatcher doesn't catch attribute changes.
|
||||
// http://crbug.com/78043
|
||||
// Windows implementation of FilePathWatcher catches attribute changes that
|
||||
@@ -1109,7 +1109,7 @@ TEST_F(FilePathWatcherTest, DirAttributesChanged) {
|
||||
@@ -1106,7 +1106,7 @@ TEST_F(FilePathWatcherTest, DirAttributesChanged) {
|
||||
ASSERT_TRUE(ChangeFilePermissions(test_dir1, Execute, true));
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/files/file_util.cc.orig 2021-07-28 07:18:23 UTC
|
||||
--- base/files/file_util.cc.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/files/file_util.cc
|
||||
@@ -52,7 +52,7 @@ bool Move(const FilePath& from_path, const FilePath& t
|
||||
@@ -57,7 +57,7 @@ bool Move(const FilePath& from_path, const FilePath& t
|
||||
}
|
||||
|
||||
bool CopyFileContents(File& infile, File& outfile) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/files/file_util.h.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/files/file_util.h.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/files/file_util.h
|
||||
@@ -284,14 +284,14 @@ BASE_EXPORT bool SetPosixFilePermissions(const FilePat
|
||||
@@ -280,14 +280,14 @@ BASE_EXPORT bool SetPosixFilePermissions(const FilePat
|
||||
BASE_EXPORT bool ExecutableExistsInPath(Environment* env,
|
||||
const FilePath::StringType& executable);
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
#endif // OS_POSIX
|
||||
|
||||
@@ -614,7 +614,7 @@ BASE_EXPORT bool VerifyPathControlledByAdmin(const bas
|
||||
@@ -610,7 +610,7 @@ BASE_EXPORT bool VerifyPathControlledByAdmin(const bas
|
||||
// the directory |path|, in the number of FilePath::CharType, or -1 on failure.
|
||||
BASE_EXPORT int GetMaximumPathComponentLength(const base::FilePath& path);
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
// Broad categories of file systems as returned by statfs() on Linux.
|
||||
enum FileSystemType {
|
||||
FILE_SYSTEM_UNKNOWN, // statfs failed.
|
||||
@@ -661,7 +661,7 @@ BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath
|
||||
@@ -657,7 +657,7 @@ BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath
|
||||
const FilePath& to_path);
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
// CopyFileContentsWithSendfile will use the sendfile(2) syscall to perform a
|
||||
// file copy without moving the data between kernel and userspace. This is much
|
||||
// more efficient than sequences of read(2)/write(2) calls. The |retry_slow|
|
||||
@@ -673,7 +673,7 @@ BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath
|
||||
@@ -669,7 +669,7 @@ BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath
|
||||
BASE_EXPORT bool CopyFileContentsWithSendfile(File& infile,
|
||||
File& outfile,
|
||||
bool& retry_slow);
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/files/file_util_posix.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/files/file_util_posix.cc.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/files/file_util_posix.cc
|
||||
@@ -23,6 +23,10 @@
|
||||
#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
#include "base/base_switches.h"
|
||||
#include "base/bits.h"
|
||||
@@ -383,7 +387,7 @@ bool CreatePipe(ScopedFD* read_fd, ScopedFD* write_fd,
|
||||
@@ -384,7 +388,7 @@ bool CreatePipe(ScopedFD* read_fd, ScopedFD* write_fd,
|
||||
}
|
||||
|
||||
bool CreateLocalNonBlockingPipe(int fds[2]) {
|
||||
@ -20,7 +20,7 @@
|
||||
return pipe2(fds, O_CLOEXEC | O_NONBLOCK) == 0;
|
||||
#else
|
||||
int raw_fds[2];
|
||||
@@ -936,8 +940,12 @@ bool AllocateFileRegion(File* file, int64_t offset, si
|
||||
@@ -937,8 +941,12 @@ bool AllocateFileRegion(File* file, int64_t offset, si
|
||||
// space. It can fail because the filesystem doesn't support it. In that case,
|
||||
// use the manual method below.
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
return true;
|
||||
DPLOG(ERROR) << "fallocate";
|
||||
#elif defined(OS_APPLE)
|
||||
@@ -1111,7 +1119,7 @@ int GetMaximumPathComponentLength(const FilePath& path
|
||||
@@ -1113,7 +1121,7 @@ int GetMaximumPathComponentLength(const FilePath& path
|
||||
#if !defined(OS_ANDROID)
|
||||
// This is implemented in file_util_android.cc for that platform.
|
||||
bool GetShmemTempDir(bool executable, FilePath* path) {
|
||||
@ -43,7 +43,7 @@
|
||||
bool disable_dev_shm = false;
|
||||
#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
disable_dev_shm = CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
@@ -1127,7 +1135,7 @@ bool GetShmemTempDir(bool executable, FilePath* path)
|
||||
@@ -1129,7 +1137,7 @@ bool GetShmemTempDir(bool executable, FilePath* path)
|
||||
*path = FilePath("/dev/shm");
|
||||
return true;
|
||||
}
|
||||
@ -52,7 +52,7 @@
|
||||
return GetTempDir(path);
|
||||
}
|
||||
#endif // !defined(OS_ANDROID)
|
||||
@@ -1165,7 +1173,7 @@ PrefetchResult PreReadFile(const FilePath& file_path,
|
||||
@@ -1167,7 +1175,7 @@ PrefetchResult PreReadFile(const FilePath& file_path,
|
||||
// posix_fadvise() is only available in the Android NDK in API 21+. Older
|
||||
// versions may have the required kernel support, but don't have enough usage
|
||||
// to justify backporting.
|
||||
@ -61,7 +61,7 @@
|
||||
(defined(OS_ANDROID) && __ANDROID_API__ >= 21)
|
||||
File file(file_path, File::FLAG_OPEN | File::FLAG_READ);
|
||||
if (!file.IsValid())
|
||||
@@ -1201,7 +1209,7 @@ PrefetchResult PreReadFile(const FilePath& file_path,
|
||||
@@ -1203,7 +1211,7 @@ PrefetchResult PreReadFile(const FilePath& file_path,
|
||||
return internal::PreReadFileSlow(file_path, max_bytes)
|
||||
? PrefetchResult{PrefetchResultCode::kSlowSuccess}
|
||||
: PrefetchResult{PrefetchResultCode::kSlowFailed};
|
||||
@ -70,7 +70,7 @@
|
||||
// __ANDROID_API__ >= 21)
|
||||
}
|
||||
|
||||
@@ -1232,7 +1240,7 @@ bool MoveUnsafe(const FilePath& from_path, const FileP
|
||||
@@ -1234,7 +1242,7 @@ bool MoveUnsafe(const FilePath& from_path, const FileP
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -79,7 +79,17 @@
|
||||
bool CopyFileContentsWithSendfile(File& infile,
|
||||
File& outfile,
|
||||
bool& retry_slow) {
|
||||
@@ -1246,12 +1254,26 @@ bool CopyFileContentsWithSendfile(File& infile,
|
||||
@@ -1243,17 +1251,36 @@ bool CopyFileContentsWithSendfile(File& infile,
|
||||
return false;
|
||||
}
|
||||
|
||||
+#if defined(OS_BSD)
|
||||
+ off_t copied = 0;
|
||||
+ off_t res = 0;
|
||||
+#else
|
||||
size_t copied = 0;
|
||||
ssize_t res = 0;
|
||||
+#endif
|
||||
while (file_size - copied > 0) {
|
||||
// Don't specify an offset and the kernel will begin reading/writing to the
|
||||
// current file offsets.
|
||||
@ -106,7 +116,7 @@
|
||||
|
||||
copied += res;
|
||||
}
|
||||
@@ -1265,13 +1287,13 @@ bool CopyFileContentsWithSendfile(File& infile,
|
||||
@@ -1267,13 +1294,13 @@ bool CopyFileContentsWithSendfile(File& infile,
|
||||
|
||||
return res >= 0;
|
||||
}
|
||||
@ -122,7 +132,7 @@
|
||||
BASE_EXPORT bool IsPathExecutable(const FilePath& path) {
|
||||
bool result = false;
|
||||
FilePath tmp_file_path;
|
||||
@@ -1292,6 +1314,6 @@ BASE_EXPORT bool IsPathExecutable(const FilePath& path
|
||||
@@ -1294,6 +1321,6 @@ BASE_EXPORT bool IsPathExecutable(const FilePath& path
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/files/file_util_unittest.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/files/file_util_unittest.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/files/file_util_unittest.cc
|
||||
@@ -1638,7 +1638,7 @@ TEST_F(FileUtilTest, DeleteDirRecursiveWithOpenFile) {
|
||||
@@ -1640,7 +1640,7 @@ TEST_F(FileUtilTest, DeleteDirRecursiveWithOpenFile) {
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
// This test will validate that files which would block when read result in a
|
||||
// failure on a call to ReadFileToStringNonBlocking. To accomplish this we will
|
||||
// use a named pipe because it appears as a file on disk and we can control how
|
||||
@@ -1671,7 +1671,7 @@ TEST_F(FileUtilTest, TestNonBlockingFileReadLinux) {
|
||||
@@ -1673,7 +1673,7 @@ TEST_F(FileUtilTest, TestNonBlockingFileReadLinux) {
|
||||
ASSERT_EQ(result.size(), 1u);
|
||||
EXPECT_EQ(result[0], 'a');
|
||||
}
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
TEST_F(FileUtilTest, MoveFileNew) {
|
||||
// Create a file
|
||||
@@ -3506,7 +3506,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) {
|
||||
@@ -3508,7 +3508,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithNamedPipe) {
|
||||
}
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
TEST_F(FileUtilTest, ReadFileToStringWithProcFileSystem) {
|
||||
FilePath file_path("/proc/cpuinfo");
|
||||
std::string data = "temp";
|
||||
@@ -3524,7 +3524,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithProcFileSyste
|
||||
@@ -3526,7 +3526,7 @@ TEST_F(FileUtilTest, ReadFileToStringWithProcFileSyste
|
||||
|
||||
EXPECT_FALSE(ReadFileToStringWithMaxSize(file_path, nullptr, 4));
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/linux_util.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/linux_util.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/linux_util.cc
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
#include "base/files/dir_reader_posix.h"
|
||||
#include "base/files/file_util.h"
|
||||
@@ -79,6 +80,9 @@ class DistroNameGetter {
|
||||
@@ -78,6 +79,9 @@ class DistroNameGetter {
|
||||
public:
|
||||
DistroNameGetter() {
|
||||
static const char* const kFilesToCheck[] = {"/etc/os-release",
|
||||
@ -18,7 +18,7 @@
|
||||
"/usr/lib/os-release"};
|
||||
for (const char* file : kFilesToCheck) {
|
||||
if (ReadDistroFromOSReleaseFile(file))
|
||||
@@ -135,6 +139,9 @@ void SetLinuxDistro(const std::string& distro) {
|
||||
@@ -134,6 +138,9 @@ void SetLinuxDistro(const std::string& distro) {
|
||||
}
|
||||
|
||||
bool GetThreadsForProcess(pid_t pid, std::vector<pid_t>* tids) {
|
||||
@ -28,7 +28,7 @@
|
||||
// 25 > strlen("/proc//task") + strlen(std::to_string(INT_MAX)) + 1 = 22
|
||||
char buf[25];
|
||||
strings::SafeSPrintf(buf, "/proc/%d/task", pid);
|
||||
@@ -154,6 +161,7 @@ bool GetThreadsForProcess(pid_t pid, std::vector<pid_t
|
||||
@@ -153,6 +160,7 @@ bool GetThreadsForProcess(pid_t pid, std::vector<pid_t
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/message_loop/message_pump_glib.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/message_loop/message_pump_glib.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/message_loop/message_pump_glib.cc
|
||||
@@ -8,6 +8,11 @@
|
||||
#include <glib.h>
|
||||
@ -10,9 +10,9 @@
|
||||
+#endif
|
||||
+
|
||||
#include "base/logging.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/numerics/safe_conversions.h"
|
||||
#include "base/posix/eintr_wrapper.h"
|
||||
@@ -48,9 +53,13 @@ int GetTimeIntervalMilliseconds(TimeTicks next_task_ti
|
||||
@@ -49,9 +54,13 @@ int GetTimeIntervalMilliseconds(TimeTicks next_task_ti
|
||||
}
|
||||
|
||||
bool RunningOnMainThread() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/posix/unix_domain_socket.cc.orig 2021-06-09 22:13:52 UTC
|
||||
--- base/posix/unix_domain_socket.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/posix/unix_domain_socket.cc
|
||||
@@ -5,7 +5,10 @@
|
||||
#include "base/posix/unix_domain_socket.h"
|
||||
@ -11,7 +11,7 @@
|
||||
#if !defined(OS_NACL_NONSFI)
|
||||
#include <sys/un.h>
|
||||
#endif
|
||||
@@ -29,6 +32,14 @@ namespace base {
|
||||
@@ -28,6 +31,14 @@ namespace base {
|
||||
|
||||
const size_t UnixDomainSocket::kMaxFileDescriptors = 16;
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
#if !defined(OS_NACL_NONSFI)
|
||||
bool CreateSocketPair(ScopedFD* one, ScopedFD* two) {
|
||||
int raw_socks[2];
|
||||
@@ -151,7 +162,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd,
|
||||
@@ -150,7 +161,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd,
|
||||
#if !defined(OS_NACL_NONSFI) && !defined(OS_APPLE)
|
||||
// The PNaCl toolchain for Non-SFI binary build and macOS do not support
|
||||
// ucred. macOS supports xucred, but this structure is insufficient.
|
||||
@ -35,7 +35,7 @@
|
||||
#endif // !defined(OS_NACL_NONSFI) && !defined(OS_APPLE)
|
||||
;
|
||||
char control_buffer[kControlBufferSize];
|
||||
@@ -181,9 +192,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd,
|
||||
@@ -180,9 +191,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd,
|
||||
// SCM_CREDENTIALS.
|
||||
if (cmsg->cmsg_level == SOL_SOCKET &&
|
||||
cmsg->cmsg_type == SCM_CREDENTIALS) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/process/launch_posix.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/process/launch_posix.cc.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/process/launch_posix.cc
|
||||
@@ -58,12 +58,14 @@
|
||||
#if defined(OS_FREEBSD)
|
||||
@ -15,6 +15,15 @@
|
||||
extern char** environ;
|
||||
|
||||
namespace base {
|
||||
@@ -183,7 +185,7 @@ void ResetChildSignalHandlersToDefaults(void) {
|
||||
#endif // !defined(NDEBUG)
|
||||
}
|
||||
}
|
||||
-#endif // !defined(OS_LINUX) ||
|
||||
+#endif // (!defined(OS_LINUX) && !defined(OS_BSD)) ||
|
||||
// (!defined(__i386__) && !defined(__x86_64__) && !defined(__arm__))
|
||||
} // anonymous namespace
|
||||
|
||||
@@ -220,6 +222,28 @@ void CloseSuperfluousFds(const base::InjectiveMultimap
|
||||
DirReaderPosix fd_dir(kFDDir);
|
||||
if (!fd_dir.IsValid()) {
|
||||
@ -87,3 +96,20 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -558,7 +592,7 @@ static bool GetAppOutputInternal(
|
||||
// DANGER: no calls to malloc or locks are allowed from now on:
|
||||
// http://crbug.com/36678
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
|
||||
// See comments on the ResetFDOwnership() declaration in
|
||||
// base/files/scoped_file.h regarding why this is called early here.
|
||||
subtle::ResetFDOwnership();
|
||||
@@ -750,6 +784,6 @@ pid_t ForkWithFlags(unsigned long flags, pid_t* ptid,
|
||||
|
||||
return 0;
|
||||
}
|
||||
-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_NACL_NONSFI)
|
||||
+#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_NACL_NONSFI) || defined(OS_BSD)
|
||||
|
||||
} // namespace base
|
||||
|
@ -1,11 +1,11 @@
|
||||
--- base/process/memory.cc.orig 2021-05-12 22:05:40 UTC
|
||||
--- base/process/memory.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/process/memory.cc
|
||||
@@ -69,7 +69,7 @@ void TerminateBecauseOutOfMemory(size_t size) {
|
||||
}
|
||||
|
||||
// Defined in memory_mac.mm for Mac.
|
||||
-#if !defined(OS_APPLE)
|
||||
+#if !defined(OS_APPLE) && !defined(OS_BSD)
|
||||
@@ -70,7 +70,7 @@ void TerminateBecauseOutOfMemory(size_t size) {
|
||||
// Defined in memory_mac.mm for macOS + use_allocator="none". In case of
|
||||
// USE_PARTITION_ALLOC_AS_MALLOC, no need to route the call to the system
|
||||
// default calloc of macOS.
|
||||
-#if !defined(OS_APPLE) || BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||
+#if (!defined(OS_APPLE) && !defined(OS_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;
|
||||
|
@ -1,20 +1,11 @@
|
||||
--- base/process/process_handle_freebsd.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/process/process_handle_freebsd.cc.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/process/process_handle_freebsd.cc
|
||||
@@ -3,7 +3,6 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "base/process/process_handle.h"
|
||||
-#include "base/stl_util.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
@@ -12,14 +11,20 @@
|
||||
#include <sys/user.h>
|
||||
@@ -12,15 +12,19 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "base/cxx17_backports.h"
|
||||
+#include "base/files/file_path.h"
|
||||
+#include "base/stl_util.h"
|
||||
+
|
||||
|
||||
namespace base {
|
||||
|
||||
ProcessId GetParentProcessId(ProcessHandle process) {
|
||||
|
@ -1,17 +1,15 @@
|
||||
--- base/process/process_iterator_freebsd.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/process/process_iterator_freebsd.cc.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/process/process_iterator_freebsd.cc
|
||||
@@ -10,6 +10,10 @@
|
||||
#include <sys/sysctl.h>
|
||||
#include <unistd.h>
|
||||
@@ -21,7 +21,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter*
|
||||
: index_of_kinfo_proc_(),
|
||||
filter_(filter) {
|
||||
|
||||
+/* getuid() */
|
||||
+#include <unistd.h>
|
||||
+#include <sys/types.h>
|
||||
+
|
||||
#include "base/logging.h"
|
||||
#include "base/stl_util.h"
|
||||
#include "base/strings/string_split.h"
|
||||
@@ -40,7 +44,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter*
|
||||
- int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, getuid() };
|
||||
+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, (int) getuid() };
|
||||
|
||||
bool done = false;
|
||||
int try_num = 1;
|
||||
@@ -40,7 +40,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter*
|
||||
num_of_kinfo_proc += 16;
|
||||
kinfo_procs_.resize(num_of_kinfo_proc);
|
||||
len = num_of_kinfo_proc * sizeof(struct kinfo_proc);
|
||||
@ -20,7 +18,7 @@
|
||||
// If we get a mem error, it just means we need a bigger buffer, so
|
||||
// loop around again. Anything else is a real error and give up.
|
||||
if (errno != ENOMEM) {
|
||||
@@ -50,7 +54,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter*
|
||||
@@ -50,7 +50,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter*
|
||||
}
|
||||
} else {
|
||||
// Got the list, just make sure we're sized exactly right
|
||||
@ -29,7 +27,7 @@
|
||||
kinfo_procs_.resize(num_of_kinfo_proc);
|
||||
done = true;
|
||||
}
|
||||
@@ -72,18 +76,13 @@ bool ProcessIterator::CheckForNextProcess() {
|
||||
@@ -72,18 +72,13 @@ bool ProcessIterator::CheckForNextProcess() {
|
||||
for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) {
|
||||
size_t length;
|
||||
struct kinfo_proc kinfo = kinfo_procs_[index_of_kinfo_proc_];
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/process/process_metrics.cc.orig 2021-06-09 22:13:52 UTC
|
||||
--- base/process/process_metrics.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/process/process_metrics.cc
|
||||
@@ -17,7 +17,7 @@ namespace base {
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
defined(OS_AIX)
|
||||
int CalculateEventsPerSecond(uint64_t event_count,
|
||||
uint64_t* last_event_count,
|
||||
@@ -53,7 +53,7 @@ SystemMetrics SystemMetrics::Sample() {
|
||||
@@ -55,7 +55,7 @@ SystemMetrics SystemMetrics::Sample() {
|
||||
SystemMetrics system_metrics;
|
||||
|
||||
system_metrics.committed_memory_ = GetSystemCommitCharge();
|
||||
@ -18,16 +18,16 @@
|
||||
GetSystemMemoryInfo(&system_metrics.memory_info_);
|
||||
GetVmStatInfo(&system_metrics.vmstat_info_);
|
||||
GetSystemDiskInfo(&system_metrics.disk_info_);
|
||||
@@ -72,7 +72,7 @@ std::unique_ptr<Value> SystemMetrics::ToValue() const
|
||||
std::unique_ptr<DictionaryValue> res(new DictionaryValue());
|
||||
@@ -74,7 +74,7 @@ Value SystemMetrics::ToValue() const {
|
||||
Value res(Value::Type::DICTIONARY);
|
||||
|
||||
res->SetIntKey("committed_memory", static_cast<int>(committed_memory_));
|
||||
res.SetIntKey("committed_memory", static_cast<int>(committed_memory_));
|
||||
-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD)
|
||||
std::unique_ptr<DictionaryValue> meminfo = memory_info_.ToValue();
|
||||
std::unique_ptr<DictionaryValue> vmstat = vmstat_info_.ToValue();
|
||||
meminfo->MergeDictionary(vmstat.get());
|
||||
@@ -123,7 +123,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage(
|
||||
Value meminfo = memory_info_.ToValue();
|
||||
Value vmstat = vmstat_info_.ToValue();
|
||||
meminfo.MergeDictionary(&vmstat);
|
||||
@@ -125,7 +125,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage(
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
defined(OS_AIX)
|
||||
int ProcessMetrics::CalculateIdleWakeupsPerSecond(
|
||||
uint64_t absolute_idle_wakeups) {
|
||||
@@ -136,7 +136,7 @@ int ProcessMetrics::GetIdleWakeupsPerSecond() {
|
||||
@@ -138,7 +138,7 @@ int ProcessMetrics::GetIdleWakeupsPerSecond() {
|
||||
NOTIMPLEMENTED(); // http://crbug.com/120488
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/process/process_metrics.h.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/process/process_metrics.h.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/process/process_metrics.h
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "base/win/windows_types.h"
|
||||
@ -9,7 +9,7 @@
|
||||
defined(OS_AIX)
|
||||
#include <string>
|
||||
#include <utility>
|
||||
@@ -55,7 +55,7 @@ class Value;
|
||||
@@ -54,7 +54,7 @@ class Value;
|
||||
// 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.
|
||||
//
|
||||
@@ -65,7 +65,7 @@ struct PageFaultCounts {
|
||||
@@ -64,7 +64,7 @@ struct PageFaultCounts {
|
||||
int64_t minor;
|
||||
int64_t major;
|
||||
};
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
// Convert a POSIX timeval to microseconds.
|
||||
BASE_EXPORT int64_t TimeValToMicroseconds(const struct timeval& tv);
|
||||
@@ -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();
|
||||
|
||||
@ -36,7 +36,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;
|
||||
@@ -132,7 +132,7 @@ class BASE_EXPORT ProcessMetrics {
|
||||
@@ -131,7 +131,7 @@ class BASE_EXPORT ProcessMetrics {
|
||||
// will result in a time delta of 2 seconds/per 1 wall-clock second.
|
||||
TimeDelta GetCumulativeCPUUsage() WARN_UNUSED_RESULT;
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
defined(OS_AIX)
|
||||
// Emits the cumulative CPU usage for all currently active threads since they
|
||||
// were started into the output parameter (replacing its current contents).
|
||||
@@ -167,7 +167,7 @@ class BASE_EXPORT ProcessMetrics {
|
||||
@@ -166,7 +166,7 @@ class BASE_EXPORT ProcessMetrics {
|
||||
bool ParseProcTimeInState(const std::string& content,
|
||||
PlatformThreadId tid,
|
||||
TimeInStatePerThread& time_in_state_per_thread);
|
||||
@ -54,7 +54,7 @@
|
||||
// defined(OS_AIX)
|
||||
|
||||
// Returns the number of average idle cpu wakeups per second since the last
|
||||
@@ -216,14 +216,14 @@ class BASE_EXPORT ProcessMetrics {
|
||||
@@ -215,14 +215,14 @@ class BASE_EXPORT ProcessMetrics {
|
||||
int GetOpenFdSoftLimit() const;
|
||||
#endif // defined(OS_POSIX)
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
|
||||
// Returns total memory usage of malloc.
|
||||
size_t GetMallocUsage();
|
||||
@@ -235,7 +235,7 @@ class BASE_EXPORT ProcessMetrics {
|
||||
@@ -234,7 +234,7 @@ class BASE_EXPORT ProcessMetrics {
|
||||
ProcessMetrics(ProcessHandle process, PortProvider* port_provider);
|
||||
#endif // !defined(OS_MAC)
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
defined(OS_AIX)
|
||||
int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups);
|
||||
#endif
|
||||
@@ -246,10 +246,10 @@ class BASE_EXPORT ProcessMetrics {
|
||||
@@ -245,10 +245,10 @@ class BASE_EXPORT ProcessMetrics {
|
||||
uint64_t absolute_package_idle_wakeups);
|
||||
#endif
|
||||
|
||||
@ -93,7 +93,7 @@
|
||||
// defined(OS_AIX)
|
||||
|
||||
#if defined(OS_WIN)
|
||||
@@ -271,7 +271,7 @@ class BASE_EXPORT ProcessMetrics {
|
||||
@@ -270,7 +270,7 @@ class BASE_EXPORT ProcessMetrics {
|
||||
// Number of bytes transferred to/from disk in bytes.
|
||||
uint64_t last_cumulative_disk_usage_ = 0;
|
||||
|
||||
@ -102,7 +102,7 @@
|
||||
defined(OS_AIX)
|
||||
// Same thing for idle wakeups.
|
||||
TimeTicks last_idle_wakeups_time_;
|
||||
@@ -315,7 +315,7 @@ BASE_EXPORT size_t GetHandleLimit();
|
||||
@@ -314,7 +314,7 @@ BASE_EXPORT size_t GetHandleLimit();
|
||||
BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_descriptors);
|
||||
#endif // defined(OS_POSIX)
|
||||
|
||||
@ -152,7 +152,7 @@
|
||||
defined(OS_AIX)
|
||||
// Parse the data found in /proc/<pid>/stat and return the sum of the
|
||||
// CPU-related ticks. Returns -1 on parse error.
|
||||
@@ -477,7 +477,7 @@ BASE_EXPORT bool GetSystemDiskInfo(SystemDiskInfo* dis
|
||||
@@ -478,7 +478,7 @@ BASE_EXPORT bool GetSystemDiskInfo(SystemDiskInfo* dis
|
||||
// Returns the amount of time spent in user space since boot across all CPUs.
|
||||
BASE_EXPORT TimeDelta GetUserCpuTimeSinceBoot();
|
||||
|
||||
@ -161,7 +161,7 @@
|
||||
// defined(OS_AIX)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
@@ -589,7 +589,7 @@ class BASE_EXPORT SystemMetrics {
|
||||
@@ -590,7 +590,7 @@ class BASE_EXPORT SystemMetrics {
|
||||
FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics);
|
||||
|
||||
size_t committed_memory_;
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/process/process_metrics_freebsd.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/process/process_metrics_freebsd.cc.orig 2021-10-01 01:36:37 UTC
|
||||
+++ base/process/process_metrics_freebsd.cc
|
||||
@@ -3,8 +3,10 @@
|
||||
@@ -3,21 +3,41 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "base/process/process_metrics.h"
|
||||
@ -11,17 +11,16 @@
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/user.h>
|
||||
#include <unistd.h>
|
||||
@@ -13,12 +15,31 @@
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/process/process_metrics_iocounters.h"
|
||||
#include "base/stl_util.h"
|
||||
+#include "base/values.h"
|
||||
|
||||
+#include <unistd.h> /* getpagesize() */
|
||||
+#include <fcntl.h> /* O_RDONLY */
|
||||
+#include <fcntl.h> /* O_RDONLY */
|
||||
+#include <kvm.h>
|
||||
+#include <libutil.h>
|
||||
+
|
||||
#include "base/cxx17_backports.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/process/process_metrics_iocounters.h"
|
||||
+#include "base/values.h"
|
||||
|
||||
namespace base {
|
||||
+namespace {
|
||||
|
||||
@ -45,7 +44,16 @@
|
||||
|
||||
// static
|
||||
std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics(
|
||||
@@ -69,4 +90,216 @@ size_t GetSystemCommitCharge() {
|
||||
@@ -37,7 +57,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage(
|
||||
}
|
||||
|
||||
TimeDelta ProcessMetrics::GetCumulativeCPUUsage() {
|
||||
- NOTREACHED();
|
||||
+ NOTIMPLEMENTED();
|
||||
return TimeDelta();
|
||||
}
|
||||
|
||||
@@ -68,4 +88,221 @@ size_t GetSystemCommitCharge() {
|
||||
return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
|
||||
}
|
||||
|
||||
@ -214,51 +222,56 @@
|
||||
+
|
||||
+SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo& other) = default;
|
||||
+
|
||||
+std::unique_ptr<Value> SystemDiskInfo::ToValue() const {
|
||||
+ auto res = std::make_unique<DictionaryValue>();
|
||||
+SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default;
|
||||
+
|
||||
+Value SystemDiskInfo::ToValue() const {
|
||||
+ Value res(Value::Type::DICTIONARY);
|
||||
+
|
||||
+ // Write out uint64_t variables as doubles.
|
||||
+ // Note: this may discard some precision, but for JS there's no other option.
|
||||
+ res->SetDouble("reads", static_cast<double>(reads));
|
||||
+ res->SetDouble("reads_merged", static_cast<double>(reads_merged));
|
||||
+ res->SetDouble("sectors_read", static_cast<double>(sectors_read));
|
||||
+ res->SetDouble("read_time", static_cast<double>(read_time));
|
||||
+ res->SetDouble("writes", static_cast<double>(writes));
|
||||
+ res->SetDouble("writes_merged", static_cast<double>(writes_merged));
|
||||
+ res->SetDouble("sectors_written", static_cast<double>(sectors_written));
|
||||
+ res->SetDouble("write_time", static_cast<double>(write_time));
|
||||
+ res->SetDouble("io", static_cast<double>(io));
|
||||
+ res->SetDouble("io_time", static_cast<double>(io_time));
|
||||
+ res->SetDouble("weighted_io_time", static_cast<double>(weighted_io_time));
|
||||
+
|
||||
+ return std::move(res);
|
||||
+}
|
||||
+
|
||||
+std::unique_ptr<DictionaryValue> SystemMemoryInfoKB::ToValue() const {
|
||||
+ auto res = std::make_unique<DictionaryValue>();
|
||||
+ 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);
|
||||
+ 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));
|
||||
+
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
+std::unique_ptr<DictionaryValue> VmStatInfo::ToValue() const {
|
||||
+ auto res = std::make_unique<DictionaryValue>();
|
||||
+ res->SetIntKey("pswpin", pswpin);
|
||||
+ res->SetIntKey("pswpout", pswpout);
|
||||
+ res->SetIntKey("pgmajfault", pgmajfault);
|
||||
+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);
|
||||
+
|
||||
+ 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/process/process_unittest.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/process/process_unittest.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/process/process_unittest.cc
|
||||
@@ -138,7 +138,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) {
|
||||
@@ -140,7 +140,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 =
|
||||
@ -9,7 +9,7 @@
|
||||
// On Linux, process creation time is relative to boot time which has a
|
||||
// 1-second resolution. Tolerate 1 second for the imprecise boot time and
|
||||
// 100 ms for the imprecise clock.
|
||||
@@ -285,6 +285,7 @@ TEST_F(ProcessTest, WaitForExitOrEventWithEventSet) {
|
||||
@@ -287,6 +287,7 @@ TEST_F(ProcessTest, WaitForExitOrEventWithEventSet) {
|
||||
}
|
||||
#endif // OS_WIN
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
// Ensure that the priority of a process is restored correctly after
|
||||
// backgrounding and restoring.
|
||||
// Note: a platform may not be willing or able to lower the priority of
|
||||
@@ -342,6 +343,7 @@ TEST_F(ProcessTest, SetProcessBackgroundedSelf) {
|
||||
@@ -344,6 +345,7 @@ TEST_F(ProcessTest, SetProcessBackgroundedSelf) {
|
||||
int new_priority = process.GetPriority();
|
||||
EXPECT_EQ(old_priority, new_priority);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/process/process_util_unittest.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/process/process_util_unittest.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/process/process_util_unittest.cc
|
||||
@@ -1337,11 +1337,11 @@ std::string TestLaunchProcess(const CommandLine& cmdli
|
||||
@@ -1336,11 +1336,11 @@ std::string TestLaunchProcess(const CommandLine& cmdli
|
||||
options.fds_to_remap.emplace_back(fds[1], STDOUT_FILENO);
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/profiler/register_context.h.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/profiler/register_context.h.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/profiler/register_context.h
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <windows.h>
|
||||
@ -9,7 +9,7 @@
|
||||
#include <sys/ucontext.h>
|
||||
#endif
|
||||
|
||||
@@ -190,6 +190,48 @@ inline uintptr_t& RegisterContextInstructionPointer(mc
|
||||
@@ -209,6 +209,48 @@ inline uintptr_t& RegisterContextInstructionPointer(mc
|
||||
}
|
||||
|
||||
#endif // #if defined(ARCH_CPU_ARM_FAMILY) && defined(ARCH_CPU_32_BITS)
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/profiler/stack_sampling_profiler_unittest.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/profiler/stack_sampling_profiler_unittest.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/profiler/stack_sampling_profiler_unittest.cc
|
||||
@@ -42,7 +42,7 @@
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <intrin.h>
|
||||
#include <malloc.h>
|
||||
#include <windows.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/profiler/thread_delegate_posix.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/profiler/thread_delegate_posix.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/profiler/thread_delegate_posix.cc
|
||||
@@ -13,6 +13,10 @@
|
||||
@@ -12,6 +12,10 @@
|
||||
#include "build/build_config.h"
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#if defined(OS_ANDROID)
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/files/scoped_file.h"
|
||||
@@ -43,7 +47,12 @@ absl::optional<uintptr_t> GetAndroidMainThreadStackBas
|
||||
@@ -42,7 +46,12 @@ absl::optional<uintptr_t> GetAndroidMainThreadStackBas
|
||||
uintptr_t GetThreadStackBaseAddressImpl(
|
||||
SamplingProfilerThreadToken thread_token) {
|
||||
pthread_attr_t attr;
|
||||
@ -24,7 +24,7 @@
|
||||
// See crbug.com/617730 for limitations of this approach on Linux.
|
||||
void* address;
|
||||
size_t size;
|
||||
@@ -130,16 +139,33 @@ std::vector<uintptr_t*> ThreadDelegatePosix::GetRegist
|
||||
@@ -129,16 +138,33 @@ std::vector<uintptr_t*> ThreadDelegatePosix::GetRegist
|
||||
return {
|
||||
// Return the set of callee-save registers per the i386 System V ABI
|
||||
// section 2.2.3, plus the stack pointer.
|
||||
@ -58,7 +58,7 @@
|
||||
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_RBP]),
|
||||
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_RBX]),
|
||||
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_R12]),
|
||||
@@ -147,6 +173,7 @@ std::vector<uintptr_t*> ThreadDelegatePosix::GetRegist
|
||||
@@ -146,6 +172,7 @@ std::vector<uintptr_t*> ThreadDelegatePosix::GetRegist
|
||||
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_R14]),
|
||||
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_R15]),
|
||||
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_RSP]),
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/sampling_heap_profiler/sampling_heap_profiler.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/sampling_heap_profiler/sampling_heap_profiler.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/sampling_heap_profiler/sampling_heap_profiler.cc
|
||||
@@ -30,6 +30,10 @@
|
||||
@@ -27,6 +27,10 @@
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#if defined(OS_ANDROID) && BUILDFLAG(CAN_UNWIND_WITH_CFI_TABLE) && \
|
||||
defined(OFFICIAL_BUILD)
|
||||
#include "base/trace_event/cfi_backtrace_android.h" // no-presubmit-check
|
||||
@@ -65,6 +69,10 @@ const char* GetAndLeakThreadName() {
|
||||
@@ -62,6 +66,10 @@ const char* GetAndLeakThreadName() {
|
||||
#elif defined(OS_APPLE)
|
||||
int err = pthread_getname_np(pthread_self(), name, kBufferLen);
|
||||
if (err == 0 && *name != '\0')
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/strings/sys_string_conversions_unittest.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/strings/sys_string_conversions_unittest.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/strings/sys_string_conversions_unittest.cc
|
||||
@@ -76,7 +76,7 @@ TEST(SysStrings, SysUTF8ToWide) {
|
||||
@@ -75,7 +75,7 @@ TEST(SysStrings, SysUTF8ToWide) {
|
||||
}
|
||||
|
||||
// Tests depend on setting a specific Linux locale.
|
||||
@ -9,7 +9,7 @@
|
||||
TEST(SysStrings, SysWideToNativeMB) {
|
||||
#if !defined(SYSTEM_NATIVE_UTF8)
|
||||
ScopedLocale locale("en_US.UTF-8");
|
||||
@@ -191,6 +191,6 @@ TEST(SysStrings, SysNativeMBAndWide) {
|
||||
@@ -190,6 +190,6 @@ TEST(SysStrings, SysNativeMBAndWide) {
|
||||
EXPECT_EQ(wide, trip);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/system/sys_info.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/system/sys_info.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/system/sys_info.cc
|
||||
@@ -94,7 +94,7 @@ void SysInfo::GetHardwareInfo(base::OnceCallback<void(
|
||||
@@ -91,7 +91,7 @@ void SysInfo::GetHardwareInfo(base::OnceCallback<void(
|
||||
#if defined(OS_WIN) || defined(OS_ANDROID) || defined(OS_APPLE)
|
||||
base::ThreadPool::PostTaskAndReplyWithResult(
|
||||
FROM_HERE, {}, base::BindOnce(&GetHardwareInfoSync), std::move(callback));
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/system/sys_info.h.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/system/sys_info.h.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/system/sys_info.h
|
||||
@@ -209,6 +209,8 @@ class BASE_EXPORT SysInfo {
|
||||
@@ -210,6 +210,8 @@ class BASE_EXPORT SysInfo {
|
||||
// On Desktop this returns true when memory <= 512MB.
|
||||
static bool IsLowEndDevice();
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
private:
|
||||
FRIEND_TEST_ALL_PREFIXES(SysInfoTest, AmountOfAvailablePhysicalMemory);
|
||||
FRIEND_TEST_ALL_PREFIXES(debug::SystemMetricsTest, ParseMeminfo);
|
||||
@@ -218,7 +220,7 @@ class BASE_EXPORT SysInfo {
|
||||
@@ -219,7 +221,7 @@ class BASE_EXPORT SysInfo {
|
||||
static bool IsLowEndDeviceImpl();
|
||||
static HardwareInfo GetHardwareInfoSync();
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
--- base/test/BUILD.gn.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/test/BUILD.gn.orig 2021-09-24 04:25:55 UTC
|
||||
+++ base/test/BUILD.gn
|
||||
@@ -425,7 +425,11 @@ if (is_linux || is_chromeos) {
|
||||
@@ -426,7 +426,11 @@ if (is_linux || is_chromeos) {
|
||||
|
||||
copy("fonts_conf") {
|
||||
sources = [ "fonts.conf" ]
|
||||
- outputs = [ "${root_build_dir}/etc/fonts/{{source_file_part}}" ]
|
||||
- outputs = [ "$root_out_dir/etc/fonts/{{source_file_part}}" ]
|
||||
+ if (is_bsd) {
|
||||
+ outputs = [ "${root_build_dir}/usr/local/etc/fonts/{{source_file_part}}" ]
|
||||
+ outputs = [ "$root_out_dir/usr/local/etc/fonts/{{source_file_part}}" ]
|
||||
+ } else {
|
||||
+ outputs = [ "${root_build_dir}/etc/fonts/{{source_file_part}}" ]
|
||||
+ outputs = [ "$root_out_dir/etc/fonts/{{source_file_part}}" ]
|
||||
+ }
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/test/launcher/test_launcher.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/test/launcher/test_launcher.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/test/launcher/test_launcher.cc
|
||||
@@ -60,6 +60,7 @@
|
||||
@@ -61,6 +61,7 @@
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
#if defined(OS_POSIX)
|
||||
@ -8,7 +8,7 @@
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "base/files/file_descriptor_watcher_posix.h"
|
||||
@@ -601,7 +602,7 @@ ChildProcessResults DoLaunchChildTestProcess(
|
||||
@@ -607,7 +608,7 @@ ChildProcessResults DoLaunchChildTestProcess(
|
||||
#if !defined(OS_FUCHSIA)
|
||||
options.new_process_group = true;
|
||||
#endif
|
||||
@ -17,7 +17,7 @@
|
||||
options.kill_on_parent_death = true;
|
||||
#endif
|
||||
|
||||
@@ -1523,7 +1524,7 @@ bool TestLauncher::Init(CommandLine* command_line) {
|
||||
@@ -1529,7 +1530,7 @@ bool TestLauncher::Init(CommandLine* command_line) {
|
||||
results_tracker_.AddGlobalTag("OS_IOS");
|
||||
#endif
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/test/test_suite.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/test/test_suite.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/test/test_suite.cc
|
||||
@@ -68,7 +68,7 @@
|
||||
#include "base/test/test_support_android.h"
|
||||
@ -9,7 +9,7 @@
|
||||
#include "base/test/fontconfig_util_linux.h"
|
||||
#endif
|
||||
|
||||
@@ -214,7 +214,7 @@ class CheckForLeakedGlobals : public testing::EmptyTes
|
||||
@@ -217,7 +217,7 @@ class CheckForLeakedGlobals : public testing::EmptyTes
|
||||
};
|
||||
|
||||
// base::Process is not available on iOS
|
||||
@ -18,7 +18,7 @@
|
||||
class CheckProcessPriority : public testing::EmptyTestEventListener {
|
||||
public:
|
||||
CheckProcessPriority() { CHECK(!IsProcessBackgrounded()); }
|
||||
@@ -351,14 +351,14 @@ void TestSuite::PreInitialize() {
|
||||
@@ -354,14 +354,14 @@ void TestSuite::PreInitialize() {
|
||||
testing::GTEST_FLAG(catch_exceptions) = false;
|
||||
#endif
|
||||
EnableTerminationOnHeapCorruption();
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
// On Android, AtExitManager is created in
|
||||
// testing/android/native_test_wrapper.cc before main() is called.
|
||||
@@ -632,7 +632,7 @@ void TestSuite::Initialize() {
|
||||
@@ -635,7 +635,7 @@ void TestSuite::Initialize() {
|
||||
// TODO(jshin): Should we set the locale via an OS X locale API here?
|
||||
i18n::SetICUDefaultLocale("en_US");
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
SetUpFontconfig();
|
||||
#endif
|
||||
|
||||
@@ -645,7 +645,7 @@ void TestSuite::Initialize() {
|
||||
@@ -648,7 +648,7 @@ void TestSuite::Initialize() {
|
||||
if (check_for_leaked_globals_)
|
||||
listeners.Append(new CheckForLeakedGlobals);
|
||||
if (check_for_thread_and_process_priority_) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/threading/platform_thread.h.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/threading/platform_thread.h.orig 2021-09-24 04:25:56 UTC
|
||||
+++ base/threading/platform_thread.h
|
||||
@@ -231,7 +231,7 @@ class BASE_EXPORT PlatformThread {
|
||||
@@ -240,7 +240,7 @@ class BASE_EXPORT PlatformThread {
|
||||
// Returns a realtime period provided by |delegate|.
|
||||
static TimeDelta GetRealtimePeriod(Delegate* delegate);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/threading/platform_thread_linux.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/threading/platform_thread_linux.cc.orig 2021-10-01 01:36:37 UTC
|
||||
+++ base/threading/platform_thread_linux.cc
|
||||
@@ -29,7 +29,9 @@
|
||||
|
||||
@ -10,6 +10,15 @@
|
||||
#include <sys/resource.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
@@ -132,7 +134,7 @@ int sched_setattr(pid_t pid,
|
||||
#endif // !defined(OS_NACL) && !defined(OS_AIX)
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
|
||||
-#if !defined(OS_NACL)
|
||||
+#if !defined(OS_NACL) && !defined(OS_BSD)
|
||||
const FilePath::CharType kCgroupDirectory[] =
|
||||
FILE_PATH_LITERAL("/sys/fs/cgroup");
|
||||
|
||||
@@ -300,7 +302,7 @@ const ThreadPriorityToNiceValuePair kThreadPriorityToN
|
||||
|
||||
absl::optional<bool> CanIncreaseCurrentThreadPriorityForPlatform(
|
||||
@ -19,6 +28,15 @@
|
||||
// A non-zero soft-limit on RLIMIT_RTPRIO is required to be allowed to invoke
|
||||
// pthread_setschedparam in SetCurrentThreadPriorityForPlatform().
|
||||
struct rlimit rlim;
|
||||
@@ -313,7 +315,7 @@ absl::optional<bool> CanIncreaseCurrentThreadPriorityF
|
||||
}
|
||||
|
||||
bool SetCurrentThreadPriorityForPlatform(ThreadPriority priority) {
|
||||
-#if !defined(OS_NACL)
|
||||
+#if !defined(OS_NACL) && !defined(OS_BSD)
|
||||
// For legacy schedtune interface
|
||||
SetThreadCgroupsForThreadPriority(PlatformThread::CurrentId(), priority);
|
||||
|
||||
@@ -350,7 +352,7 @@ absl::optional<ThreadPriority> GetCurrentThreadPriorit
|
||||
void PlatformThread::SetName(const std::string& name) {
|
||||
ThreadIdNameManager::GetInstance()->SetName(name);
|
||||
@ -28,3 +46,25 @@
|
||||
// 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
|
||||
@@ -380,8 +382,10 @@ void PlatformThread::SetThreadPriority(ProcessId proce
|
||||
// priority.
|
||||
CHECK_NE(thread_id, process_id);
|
||||
|
||||
+#if !defined(OS_BSD)
|
||||
// For legacy schedtune interface
|
||||
SetThreadCgroupsForThreadPriority(thread_id, priority);
|
||||
+#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
// For upstream uclamp interface. We try both legacy (schedtune, as done
|
||||
@@ -438,7 +442,9 @@ void InitThreading() {}
|
||||
void TerminateOnThread() {}
|
||||
|
||||
size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
|
||||
-#if !defined(THREAD_SANITIZER)
|
||||
+#if defined(OS_BSD)
|
||||
+ return (1 << 23);
|
||||
+#elif !defined(THREAD_SANITIZER)
|
||||
return 0;
|
||||
#else
|
||||
// ThreadSanitizer bloats the stack heavily. Evidence has been that the
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/threading/platform_thread_posix.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/threading/platform_thread_posix.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/threading/platform_thread_posix.cc
|
||||
@@ -33,6 +33,10 @@
|
||||
@@ -32,6 +32,10 @@
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
|
||||
@ -11,12 +11,12 @@
|
||||
#if defined(OS_FUCHSIA)
|
||||
#include <zircon/process.h>
|
||||
#else
|
||||
@@ -194,6 +198,8 @@ PlatformThreadId PlatformThread::CurrentId() {
|
||||
@@ -193,6 +197,8 @@ PlatformThreadId PlatformThread::CurrentId() {
|
||||
// into the kernel.
|
||||
#if defined(OS_APPLE)
|
||||
return pthread_mach_thread_np(pthread_self());
|
||||
+#elif defined(OS_BSD)
|
||||
+ return pthread_getthreadid_np();
|
||||
#elif defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
static NoDestructor<InitAtFork> init_at_fork;
|
||||
static InitAtFork init_at_fork;
|
||||
if (g_thread_id == -1) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/threading/platform_thread_unittest.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- base/threading/platform_thread_unittest.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/threading/platform_thread_unittest.cc
|
||||
@@ -313,7 +313,7 @@ TEST(PlatformThreadTest,
|
||||
// and hardcodes what we know. Please inform scheduler-dev@chromium.org if this
|
||||
@ -9,7 +9,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;
|
||||
@@ -407,9 +407,9 @@ TEST(PlatformThreadTest, SetHugeThreadName) {
|
||||
@@ -404,9 +404,9 @@ TEST(PlatformThreadTest, SetHugeThreadName) {
|
||||
|
||||
TEST(PlatformThreadTest, GetDefaultThreadStackSize) {
|
||||
size_t stack_size = PlatformThread::GetDefaultThreadStackSize();
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/threading/scoped_blocking_call_unittest.cc.orig 2021-05-12 22:05:40 UTC
|
||||
--- base/threading/scoped_blocking_call_unittest.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/threading/scoped_blocking_call_unittest.cc
|
||||
@@ -274,7 +274,7 @@ TEST_F(ScopedBlockingCallIOJankMonitoringTest, ManyInA
|
||||
@@ -302,7 +302,7 @@ TEST_F(ScopedBlockingCallIOJankMonitoringTest, ManyInA
|
||||
}
|
||||
|
||||
TEST_F(ScopedBlockingCallIOJankMonitoringTest, OverlappingMultipleWindows) {
|
||||
@ -9,7 +9,7 @@
|
||||
internal::IOJankMonitoringWindow::kMonitoringWindow * 3 +
|
||||
internal::IOJankMonitoringWindow::kIOJankInterval * 5;
|
||||
|
||||
@@ -531,7 +531,7 @@ TEST_F(ScopedBlockingCallIOJankMonitoringTest, MultiTh
|
||||
@@ -559,7 +559,7 @@ TEST_F(ScopedBlockingCallIOJankMonitoringTest, MultiTh
|
||||
// First one starting at 10 seconds (can't start later than that or we'll trip
|
||||
// the kTimeDiscrepancyTimeout per TaskEnvironment's inability to RunUntilIdle()
|
||||
// with pending blocked tasks).
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- base/time/time.cc.orig 2021-07-28 07:27:11 UTC
|
||||
--- base/time/time.cc.orig 2021-09-24 04:25:56 UTC
|
||||
+++ base/time/time.cc
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
@ -13,5 +13,5 @@
|
||||
-#endif // defined(OS_LINUX)
|
||||
+#endif // defined(OS_LINUX) || defined(OS_BSD)
|
||||
|
||||
#include <atomic>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
@ -1,18 +0,0 @@
|
||||
--- base/time/time_unittest.cc.orig 2021-07-19 18:45:05 UTC
|
||||
+++ base/time/time_unittest.cc
|
||||
@@ -2007,6 +2007,7 @@ TEST(TimeDelta, Overflows) {
|
||||
static_assert((kLargeDelta / 0.5).is_max(), "");
|
||||
static_assert((kLargeDelta / -0.5).is_min(), "");
|
||||
|
||||
+#if !defined(OS_BSD)
|
||||
static_assert(
|
||||
TimeDelta::Max() / kOneSecond == std::numeric_limits<double>::infinity(),
|
||||
"");
|
||||
@@ -2035,6 +2036,7 @@ TEST(TimeDelta, Overflows) {
|
||||
static_assert(TimeDelta::Max() % -kOneSecond == TimeDelta::Max(), "");
|
||||
static_assert(TimeDelta::Min() % kOneSecond == TimeDelta::Min(), "");
|
||||
static_assert(TimeDelta::Min() % -kOneSecond == TimeDelta::Min(), "");
|
||||
+#endif
|
||||
|
||||
// Division by zero.
|
||||
static_assert((kOneSecond / 0).is_max(), "");
|
@ -1,6 +1,6 @@
|
||||
--- base/trace_event/malloc_dump_provider.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/trace_event/malloc_dump_provider.cc.orig 2021-09-24 04:25:56 UTC
|
||||
+++ base/trace_event/malloc_dump_provider.cc
|
||||
@@ -21,6 +21,8 @@
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#if defined(OS_APPLE)
|
||||
#include <malloc/malloc.h>
|
||||
@ -9,7 +9,7 @@
|
||||
#else
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
@@ -203,6 +205,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump
|
||||
@@ -213,6 +215,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump
|
||||
&allocated_objects_count);
|
||||
#elif defined(OS_FUCHSIA)
|
||||
// TODO(fuchsia): Port, see https://crbug.com/706592.
|
||||
@ -17,5 +17,5 @@
|
||||
+ total_virtual_size = 0;
|
||||
+ allocated_objects_size = 0;
|
||||
#else
|
||||
struct mallinfo info = mallinfo();
|
||||
// In case of Android's jemalloc |arena| is 0 and the outer pages size is
|
||||
#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
||||
#if __GLIBC_PREREQ(2, 33)
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- base/trace_event/process_memory_dump.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- base/trace_event/process_memory_dump.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ base/trace_event/process_memory_dump.cc
|
||||
@@ -104,7 +104,7 @@ absl::optional<size_t> ProcessMemoryDump::CountResiden
|
||||
@@ -105,7 +105,7 @@ absl::optional<size_t> ProcessMemoryDump::CountResiden
|
||||
#if defined(OS_WIN)
|
||||
std::unique_ptr<PSAPI_WORKING_SET_EX_INFORMATION[]> vec(
|
||||
new PSAPI_WORKING_SET_EX_INFORMATION[max_vec_size]);
|
||||
|
11
www/chromium/files/patch-build_config_c++_c++.gni
Normal file
11
www/chromium/files/patch-build_config_c++_c++.gni
Normal file
@ -0,0 +1,11 @@
|
||||
--- build/config/c++/c++.gni.orig 2021-10-06 09:43:59 UTC
|
||||
+++ build/config/c++/c++.gni
|
||||
@@ -43,7 +43,7 @@ declare_args() {
|
||||
|
||||
use_custom_libcxx =
|
||||
use_custom_libcxx || (use_custom_libcxx_for_host && !is_a_target_toolchain)
|
||||
-use_custom_libcxx = use_custom_libcxx && !is_nacl
|
||||
+use_custom_libcxx = use_custom_libcxx && !is_nacl && !is_bsd
|
||||
|
||||
declare_args() {
|
||||
# WARNING: Setting this to a non-default value is highly discouraged.
|
@ -1,15 +1,24 @@
|
||||
--- build/config/compiler/BUILD.gn.orig 2021-07-19 18:45:05 UTC
|
||||
--- build/config/compiler/BUILD.gn.orig 2021-09-24 04:25:56 UTC
|
||||
+++ build/config/compiler/BUILD.gn
|
||||
@@ -144,7 +144,7 @@ declare_args() {
|
||||
@@ -139,7 +139,7 @@ declare_args() {
|
||||
#
|
||||
# TODO(crbug.com/977230): Enabling this when 'use_xcode_clang' is true may
|
||||
# call an old clang that doesn't support auto-init.
|
||||
- init_stack_vars = !is_android && !use_xcode_clang
|
||||
+ init_stack_vars = !is_android && !use_xcode_clang && !is_bsd
|
||||
# TODO(crbug.com/1131993): Enabling this when 'is_android' is true breaks
|
||||
# content_shell_test_apk on both ARM and x86.
|
||||
- init_stack_vars = !is_android
|
||||
+ init_stack_vars = !is_android && !is_bsd
|
||||
|
||||
# This argument is to control whether enabling text section splitting in the
|
||||
# final binary. When enabled, the separated text sections with prefix
|
||||
@@ -347,7 +347,7 @@ config("compiler") {
|
||||
@@ -238,7 +238,7 @@ 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") {
|
||||
- if (!using_sanitizer &&
|
||||
+ if (!using_sanitizer && !is_bsd &&
|
||||
(is_linux || is_chromeos || is_android || is_fuchsia)) {
|
||||
ldflags = [
|
||||
"-Wl,-z,defs",
|
||||
@@ -354,7 +354,7 @@ config("compiler") {
|
||||
}
|
||||
|
||||
# Linker warnings.
|
||||
@ -18,16 +27,7 @@
|
||||
ldflags += [ "-Wl,--fatal-warnings" ]
|
||||
}
|
||||
if (fatal_linker_warnings && is_apple) {
|
||||
@@ -442,7 +442,7 @@ config("compiler") {
|
||||
|
||||
# Compiler instrumentation can introduce dependencies in DSOs to symbols in
|
||||
# the executable they are loaded into, so they are unresolved at link-time.
|
||||
- if (!using_sanitizer) {
|
||||
+ if (!using_sanitizer && !is_bsd) {
|
||||
ldflags += [
|
||||
"-Wl,-z,defs",
|
||||
"-Wl,--as-needed",
|
||||
@@ -532,7 +532,7 @@ config("compiler") {
|
||||
@@ -530,7 +530,7 @@ config("compiler") {
|
||||
ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
|
||||
|
||||
# TODO(hans): Remove this once Clang generates better optimized debug info
|
||||
@@ -675,7 +675,12 @@ config("compiler") {
|
||||
@@ -680,7 +680,12 @@ config("compiler") {
|
||||
# and let it use all cores.
|
||||
# TODO(thakis): Check if '=0' (that is, number of cores, instead
|
||||
# of "all" which means number of hardware threads) is faster.
|
||||
@ -47,10 +47,10 @@
|
||||
+ } else {
|
||||
+ ldflags += [ "-Wl,--thinlto-jobs=all" ]
|
||||
+ }
|
||||
|
||||
ldflags += [
|
||||
"-Wl,--thinlto-cache-dir=" +
|
||||
@@ -861,7 +866,7 @@ config("compiler_cpu_abi") {
|
||||
if (is_mac) {
|
||||
ldflags +=
|
||||
[ "-Wl,-cache_path_lto," +
|
||||
@@ -879,7 +884,7 @@ config("compiler_cpu_abi") {
|
||||
cflags += [ "-mtune=$arm_tune" ]
|
||||
}
|
||||
} else if (current_cpu == "arm64") {
|
||||
@ -59,17 +59,18 @@
|
||||
cflags += [ "--target=aarch64-linux-gnu" ]
|
||||
ldflags += [ "--target=aarch64-linux-gnu" ]
|
||||
}
|
||||
@@ -1211,7 +1216,7 @@ config("compiler_deterministic") {
|
||||
"-Xclang",
|
||||
".",
|
||||
]
|
||||
- if (!is_win) {
|
||||
+ if (!is_win && !is_bsd) {
|
||||
# We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
|
||||
asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
|
||||
}
|
||||
@@ -1594,7 +1599,7 @@ config("default_warnings") {
|
||||
cflags += [ "-Wno-nonportable-include-path" ]
|
||||
@@ -1231,6 +1236,9 @@ config("compiler_deterministic") {
|
||||
"-Xclang",
|
||||
".",
|
||||
]
|
||||
+ } else if (is_bsd) {
|
||||
+ # -ffile-compilation-dir is not supported in the LLVM version FreeBSD ships
|
||||
+ cflags += [ "-fdebug-compilation-dir=." ]
|
||||
} else {
|
||||
# -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
|
||||
# and -fcoverage-compilation-dir=.
|
||||
@@ -1610,7 +1618,7 @@ config("default_warnings") {
|
||||
cflags += [ "-Wno-null-pointer-subtraction" ]
|
||||
}
|
||||
|
||||
- if (current_toolchain == host_toolchain || !use_xcode_clang) {
|
||||
@ -77,8 +78,8 @@
|
||||
# Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not
|
||||
# recognize.
|
||||
cflags += [
|
||||
@@ -1635,6 +1640,18 @@ config("default_warnings") {
|
||||
cflags += [ "-Wno-max-tokens" ]
|
||||
@@ -1643,6 +1651,18 @@ config("default_warnings") {
|
||||
cflags += [ "-Wmax-tokens" ]
|
||||
}
|
||||
}
|
||||
+
|
||||
@ -96,25 +97,25 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1769,7 +1786,7 @@ config("no_chromium_code") {
|
||||
# suppressing them individually, we just blanket suppress them here.
|
||||
"-Wno-unused-variable",
|
||||
@@ -1781,7 +1801,7 @@ config("no_chromium_code") {
|
||||
# third-party libraries.
|
||||
"-Wno-c++11-narrowing",
|
||||
]
|
||||
- if (!is_nacl && (current_toolchain == host_toolchain || !use_xcode_clang)) {
|
||||
+ if (!is_nacl && (current_toolchain == host_toolchain || !use_xcode_clang) && !is_bsd) {
|
||||
cflags += [
|
||||
# TODO(https://crbug.com/1202159): Clean up and enable.
|
||||
"-Wno-misleading-indentation",
|
||||
@@ -1847,7 +1864,7 @@ config("export_dynamic") {
|
||||
config("thin_archive") {
|
||||
# The macOS and iOS default linker ld64 does not support reading thin
|
||||
@@ -1861,7 +1881,7 @@ config("thin_archive") {
|
||||
# archives.
|
||||
- if ((is_posix && !is_nacl && (!is_apple || use_lld)) || is_fuchsia) {
|
||||
+ if ((is_posix && !is_nacl && (!is_apple || use_lld) && !is_bsd) || is_fuchsia) {
|
||||
# TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
|
||||
# confuses lldb.
|
||||
- if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
|
||||
+ if ((is_posix && !is_nacl && !is_apple && !is_bsd) || is_fuchsia) {
|
||||
arflags = [ "-T" ]
|
||||
} else if (is_win && use_lld) {
|
||||
arflags = [ "/llvmlibthin" ]
|
||||
@@ -2381,7 +2398,7 @@ config("symbols") {
|
||||
@@ -2353,7 +2373,7 @@ config("symbols") {
|
||||
# flag, so we can use use -g1 for pnacl and nacl-clang compiles.
|
||||
# gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang.
|
||||
if (!is_nacl || is_clang) {
|
||||
@ -122,8 +123,8 @@
|
||||
+ cflags += [ "-g0" ]
|
||||
}
|
||||
|
||||
# TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
|
||||
@@ -2414,7 +2431,7 @@ config("symbols") {
|
||||
if (is_apple) {
|
||||
@@ -2378,7 +2398,7 @@ config("symbols") {
|
||||
# DWARF info may be corrupt; offsets in a range list entry are in different
|
||||
# sections" there. Maybe just a bug in nacl_switch_32.S.
|
||||
if (!is_apple && !is_nacl && current_cpu != "x86" &&
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- build/config/compiler/compiler.gni.orig 2021-05-12 22:05:40 UTC
|
||||
--- build/config/compiler/compiler.gni.orig 2021-09-14 01:51:47 UTC
|
||||
+++ build/config/compiler/compiler.gni
|
||||
@@ -202,7 +202,7 @@ declare_args() {
|
||||
@@ -205,7 +205,7 @@ declare_args() {
|
||||
|
||||
declare_args() {
|
||||
# Whether to use the gold linker from binutils instead of lld or bfd.
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- build/config/linux/BUILD.gn.orig 2021-04-14 18:40:48 UTC
|
||||
--- build/config/linux/BUILD.gn.orig 2021-09-24 04:25:56 UTC
|
||||
+++ build/config/linux/BUILD.gn
|
||||
@@ -30,7 +30,7 @@ config("runtime_library") {
|
||||
@@ -39,7 +39,7 @@ config("runtime_library") {
|
||||
|
||||
if ((!(is_chromeos_ash || is_chromeos_lacros) ||
|
||||
default_toolchain != "//build/toolchain/cros:target") &&
|
||||
|
@ -1,12 +1,12 @@
|
||||
--- build/config/ozone.gni.orig 2021-04-14 18:40:48 UTC
|
||||
--- build/config/ozone.gni.orig 2021-09-24 04:25:56 UTC
|
||||
+++ build/config/ozone.gni
|
||||
@@ -79,6 +79,9 @@ declare_args() {
|
||||
ozone_platform = "x11"
|
||||
ozone_platform_drm = true
|
||||
ozone_platform_x11 = true
|
||||
@@ -85,6 +85,9 @@ declare_args() {
|
||||
} else if (is_chromeos_lacros) {
|
||||
ozone_platform = "wayland"
|
||||
ozone_platform_wayland = true
|
||||
+ } else if (is_bsd) {
|
||||
+ ozone_platform = "x11"
|
||||
+ ozone_platform_x11 = true
|
||||
} else if (is_linux || is_chromeos_lacros) {
|
||||
} else if (is_linux) {
|
||||
ozone_platform = "x11"
|
||||
ozone_platform_wayland = true
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- build/toolchain/gcc_toolchain.gni.orig 2021-06-09 22:13:52 UTC
|
||||
--- build/toolchain/gcc_toolchain.gni.orig 2021-09-14 01:51:47 UTC
|
||||
+++ build/toolchain/gcc_toolchain.gni
|
||||
@@ -51,6 +51,11 @@ if (enable_resource_allowlist_generation) {
|
||||
@@ -48,6 +48,11 @@ if (enable_resource_allowlist_generation) {
|
||||
"enable_resource_allowlist_generation=true does not work for target_os=$target_os")
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
# This template defines a toolchain for something that works like gcc
|
||||
# (including clang).
|
||||
#
|
||||
@@ -647,20 +652,32 @@ template("gcc_toolchain") {
|
||||
@@ -666,20 +671,32 @@ template("gcc_toolchain") {
|
||||
# actually just be doing a native compile. The invoker can optionally override
|
||||
# use_gold too.
|
||||
template("clang_toolchain") {
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- cc/BUILD.gn.orig 2021-07-19 18:45:05 UTC
|
||||
--- cc/BUILD.gn.orig 2021-09-24 04:25:56 UTC
|
||||
+++ cc/BUILD.gn
|
||||
@@ -642,7 +642,7 @@ cc_test_static_library("test_support") {
|
||||
@@ -646,7 +646,7 @@ cc_test_static_library("test_support") {
|
||||
if (enable_vulkan) {
|
||||
deps += [ "//gpu/vulkan/init" ]
|
||||
}
|
||||
@ -9,7 +9,7 @@
|
||||
data_deps = [ "//third_party/mesa_headers" ]
|
||||
}
|
||||
}
|
||||
@@ -860,7 +860,6 @@ cc_test("cc_unittests") {
|
||||
@@ -864,7 +864,6 @@ cc_test("cc_unittests") {
|
||||
]
|
||||
data_deps = [
|
||||
"//testing/buildbot/filters:cc_unittests_filters",
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- cc/layers/scrollbar_layer_impl_base.cc.orig 2021-04-14 18:40:48 UTC
|
||||
--- cc/layers/scrollbar_layer_impl_base.cc.orig 2021-09-24 04:25:56 UTC
|
||||
+++ cc/layers/scrollbar_layer_impl_base.cc
|
||||
@@ -219,8 +219,8 @@ gfx::Rect ScrollbarLayerImplBase::ComputeThumbQuadRect
|
||||
@@ -221,8 +221,8 @@ gfx::Rect ScrollbarLayerImplBase::ComputeThumbQuadRect
|
||||
int thumb_offset = TrackStart();
|
||||
if (maximum > 0) {
|
||||
float ratio = clamped_current_pos / maximum;
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- cc/test/layer_tree_test.cc.orig 2021-07-19 18:45:05 UTC
|
||||
--- cc/test/layer_tree_test.cc.orig 2021-09-14 01:51:47 UTC
|
||||
+++ cc/test/layer_tree_test.cc
|
||||
@@ -673,7 +673,7 @@ LayerTreeTest::LayerTreeTest(viz::RendererType rendere
|
||||
@@ -674,7 +674,7 @@ LayerTreeTest::LayerTreeTest(viz::RendererType rendere
|
||||
init_vulkan = true;
|
||||
} else if (renderer_type_ == viz::RendererType::kSkiaDawn) {
|
||||
scoped_feature_list_.InitAndEnableFeature(features::kSkiaDawn);
|
||||
|
@ -1,13 +1,31 @@
|
||||
--- chrome/BUILD.gn.orig 2021-07-19 18:45:05 UTC
|
||||
--- chrome/BUILD.gn.orig 2021-09-24 04:25:56 UTC
|
||||
+++ chrome/BUILD.gn
|
||||
@@ -1368,6 +1368,10 @@ group("browser_dependencies") {
|
||||
public_deps += [ "//chromeos/lacros" ]
|
||||
@@ -276,7 +276,9 @@ if (!is_android && !is_mac) {
|
||||
":xdg_mime", # Needs to be public for installer to consume files.
|
||||
]
|
||||
|
||||
- data_deps += [ "//components/crash/core/app:chrome_crashpad_handler" ]
|
||||
+ if (!is_bsd) {
|
||||
+ data_deps += [ "//components/crash/core/app:chrome_crashpad_handler" ]
|
||||
+ }
|
||||
}
|
||||
|
||||
ldflags = []
|
||||
@@ -1366,7 +1368,7 @@ group("browser_dependencies") {
|
||||
]
|
||||
}
|
||||
|
||||
+ if (is_bsd) {
|
||||
+ public_deps -= [ "//components/crash/core/app" ]
|
||||
+ }
|
||||
+
|
||||
if (is_chromeos_ash) {
|
||||
public_deps += [
|
||||
"//ash/constants",
|
||||
- if (!is_fuchsia) {
|
||||
+ if (!is_fuchsia && !is_bsd) {
|
||||
public_deps += [ "//components/crash/core/app" ]
|
||||
}
|
||||
|
||||
@@ -1686,7 +1688,7 @@ if (enable_resource_allowlist_generation) {
|
||||
}
|
||||
|
||||
if (is_linux || is_chromeos) {
|
||||
- if (is_official_build) {
|
||||
+ if (is_official_build && !is_bsd) {
|
||||
group("linux_symbols") {
|
||||
deps = [
|
||||
":angle_egl_symbols",
|
||||
|
@ -1,11 +1,11 @@
|
||||
--- chrome/app/BUILD.gn.orig 2021-07-19 18:45:06 UTC
|
||||
--- chrome/app/BUILD.gn.orig 2021-09-24 04:25:56 UTC
|
||||
+++ chrome/app/BUILD.gn
|
||||
@@ -144,7 +144,7 @@ static_library("test_support") {
|
||||
@@ -154,7 +154,7 @@ static_library("test_support") {
|
||||
"//v8:v8_headers",
|
||||
]
|
||||
|
||||
- if (!is_fuchsia) {
|
||||
+ if (!is_fuchsia && !is_bsd) {
|
||||
# TODO(crbug.com/753619): Enable crash reporting on Fuchsia.
|
||||
# TODO(crbug.com/1226159): Complete crash reporting integration on Fuchsia.
|
||||
deps += [
|
||||
"//components/crash/core/app",
|
||||
|
@ -1,7 +1,7 @@
|
||||
--- chrome/app/chrome_main.cc.orig 2021-07-19 18:45:06 UTC
|
||||
--- chrome/app/chrome_main.cc.orig 2021-09-24 04:25:56 UTC
|
||||
+++ chrome/app/chrome_main.cc
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "chrome/app/chrome_main_mac.h"
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "chrome/app/notification_metrics.h"
|
||||
#endif
|
||||
|
||||
-#if defined(OS_WIN) || defined(OS_LINUX)
|
||||
@ -9,18 +9,17 @@
|
||||
#include "base/base_switches.h"
|
||||
#endif
|
||||
|
||||
@@ -133,12 +133,12 @@ int ChromeMain(int argc, const char** argv) {
|
||||
MainThreadStackSamplingProfiler scoped_sampling_profiler;
|
||||
|
||||
// Chrome-specific process modes.
|
||||
@@ -145,11 +145,11 @@ int ChromeMain(int argc, const char** argv) {
|
||||
if (headless::IsChromeNativeHeadless()) {
|
||||
headless::SetUpCommandLine(command_line);
|
||||
} else {
|
||||
-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || \
|
||||
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) || \
|
||||
defined(OS_WIN)
|
||||
if (command_line->HasSwitch(switches::kHeadless)) {
|
||||
return headless::HeadlessShellMain(params);
|
||||
}
|
||||
if (command_line->HasSwitch(switches::kHeadless))
|
||||
return headless::HeadlessShellMain(params);
|
||||
-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) ||
|
||||
+#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) ||
|
||||
// defined(OS_WIN)
|
||||
}
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- chrome/app/chrome_main_delegate.cc.orig 2021-07-19 18:45:06 UTC
|
||||
--- chrome/app/chrome_main_delegate.cc.orig 2021-10-01 01:36:38 UTC
|
||||
+++ chrome/app/chrome_main_delegate.cc
|
||||
@@ -150,12 +150,12 @@
|
||||
@@ -153,15 +153,17 @@
|
||||
#include "v8/include/v8.h"
|
||||
#endif
|
||||
|
||||
@ -13,9 +13,14 @@
|
||||
- defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
+ defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
|
||||
#include "chrome/browser/policy/policy_path_parser.h"
|
||||
+#if !defined(OS_BSD)
|
||||
#include "components/crash/core/app/crashpad.h"
|
||||
#endif
|
||||
@@ -259,7 +259,7 @@ void SetUpExtendedCrashReporting(bool is_browser_proce
|
||||
+#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_NACL)
|
||||
#include "components/nacl/common/nacl_switches.h"
|
||||
@@ -265,7 +267,7 @@ void SetUpExtendedCrashReporting(bool is_browser_proce
|
||||
|
||||
#endif // defined(OS_WIN)
|
||||
|
||||
@ -24,7 +29,7 @@
|
||||
void AdjustLinuxOOMScore(const std::string& process_type) {
|
||||
int score = -1;
|
||||
|
||||
@@ -294,7 +294,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty
|
||||
@@ -300,7 +302,7 @@ void AdjustLinuxOOMScore(const std::string& process_ty
|
||||
if (score > -1)
|
||||
base::AdjustOOMScore(base::GetCurrentProcId(), score);
|
||||
}
|
||||
@ -33,7 +38,7 @@
|
||||
|
||||
// Returns true if this subprocess type needs the ResourceBundle initialized
|
||||
// and resources loaded.
|
||||
@@ -340,7 +340,7 @@ bool HandleVersionSwitches(const base::CommandLine& co
|
||||
@@ -346,7 +348,7 @@ bool HandleVersionSwitches(const base::CommandLine& co
|
||||
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
@ -42,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) ||
|
||||
@@ -350,7 +350,7 @@ void HandleHelpSwitches(const base::CommandLine& comma
|
||||
@@ -356,7 +358,7 @@ void HandleHelpSwitches(const base::CommandLine& comma
|
||||
PLOG(FATAL) << "execlp failed";
|
||||
}
|
||||
}
|
||||
@ -51,7 +56,7 @@
|
||||
|
||||
#if !defined(OS_MAC) && !defined(OS_ANDROID)
|
||||
void SIGTERMProfilingShutdown(int signal) {
|
||||
@@ -404,7 +404,7 @@ void InitializeUserDataDir(base::CommandLine* command_
|
||||
@@ -410,7 +412,7 @@ void InitializeUserDataDir(base::CommandLine* command_
|
||||
std::string process_type =
|
||||
command_line->GetSwitchValueASCII(switches::kProcessType);
|
||||
|
||||
@ -60,7 +65,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.
|
||||
@@ -416,7 +416,7 @@ void InitializeUserDataDir(base::CommandLine* command_
|
||||
@@ -422,7 +424,7 @@ void InitializeUserDataDir(base::CommandLine* command_
|
||||
user_data_dir = base::FilePath::FromUTF8Unsafe(user_data_dir_string);
|
||||
}
|
||||
}
|
||||
@ -69,7 +74,7 @@
|
||||
#if defined(OS_MAC)
|
||||
policy::path_parser::CheckUserDataDirPolicy(&user_data_dir);
|
||||
#endif // OS_MAC
|
||||
@@ -487,7 +487,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat
|
||||
@@ -493,7 +495,7 @@ void RecordMainStartupMetrics(base::TimeTicks applicat
|
||||
startup_metric_utils::RecordApplicationStartTime(now);
|
||||
#endif
|
||||
|
||||
@ -78,7 +83,16 @@
|
||||
defined(OS_CHROMEOS)
|
||||
// Record the startup process creation time on supported platforms. On Android
|
||||
// this is recorded in ChromeMainDelegateAndroid.
|
||||
@@ -739,7 +739,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi
|
||||
@@ -673,6 +675,8 @@ void ChromeMainDelegate::PostFieldTrialInitialization(
|
||||
// not always enabled on Linux/ChromeOS.
|
||||
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
bool enable_gwp_asan = crash_reporter::IsCrashpadEnabled();
|
||||
+#elif defined(OS_BSD)
|
||||
+ bool enable_gwp_asan = false;
|
||||
#else
|
||||
bool enable_gwp_asan = true;
|
||||
#endif
|
||||
@@ -781,7 +785,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi
|
||||
v8_crashpad_support::SetUp();
|
||||
#endif
|
||||
|
||||
@ -87,7 +101,7 @@
|
||||
if (!crash_reporter::IsCrashpadEnabled()) {
|
||||
breakpad::SetFirstChanceExceptionHandler(v8::TryHandleWebAssemblyTrapPosix);
|
||||
}
|
||||
@@ -752,7 +752,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi
|
||||
@@ -794,7 +798,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi
|
||||
}
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
@ -96,7 +110,7 @@
|
||||
// This will directly exit if the user asked for help.
|
||||
HandleHelpSwitches(command_line);
|
||||
#endif
|
||||
@@ -961,7 +961,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1005,7 +1009,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
|
||||
crash_reporter::InitializeCrashKeys();
|
||||
|
||||
@ -105,7 +119,7 @@
|
||||
ChromeCrashReporterClient::Create();
|
||||
#endif
|
||||
|
||||
@@ -974,7 +974,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1018,7 +1022,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
child_process_logging::Init();
|
||||
#endif
|
||||
#if defined(ARCH_CPU_ARM_FAMILY) && \
|
||||
@ -114,7 +128,7 @@
|
||||
// Create an instance of the CPU class to parse /proc/cpuinfo and cache
|
||||
// cpu_brand info.
|
||||
base::CPU cpu_info;
|
||||
@@ -1092,7 +1092,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1136,7 +1140,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
locale;
|
||||
}
|
||||
|
||||
@ -123,7 +137,7 @@
|
||||
// Zygote needs to call InitCrashReporter() in RunZygote().
|
||||
if (process_type != switches::kZygoteProcess) {
|
||||
#if defined(OS_ANDROID)
|
||||
@@ -1113,7 +1113,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1157,7 +1161,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
}
|
||||
#endif // defined(OS_ANDROID)
|
||||
}
|
||||
@ -132,7 +146,7 @@
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
CHECK_EQ(base::android::GetLibraryProcessType(),
|
||||
@@ -1133,7 +1133,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
@@ -1177,7 +1181,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
|
||||
void ChromeMainDelegate::SandboxInitialized(const std::string& process_type) {
|
||||
// Note: If you are adding a new process type below, be sure to adjust the
|
||||
// AdjustLinuxOOMScore function too.
|
||||
@ -141,7 +155,7 @@
|
||||
AdjustLinuxOOMScore(process_type);
|
||||
#endif
|
||||
#if defined(OS_WIN)
|
||||
@@ -1175,7 +1175,7 @@ int ChromeMainDelegate::RunProcess(
|
||||
@@ -1219,7 +1223,7 @@ int ChromeMainDelegate::RunProcess(
|
||||
|
||||
// This entry is not needed on Linux, where the NaCl loader
|
||||
// process is launched via nacl_helper instead.
|
||||
@ -150,7 +164,7 @@
|
||||
{switches::kNaClLoaderProcess, NaClMain},
|
||||
#else
|
||||
{"<invalid>", nullptr}, // To avoid constant array of size 0
|
||||
@@ -1203,7 +1203,7 @@ void ChromeMainDelegate::ProcessExiting(const std::str
|
||||
@@ -1247,7 +1251,7 @@ void ChromeMainDelegate::ProcessExiting(const std::str
|
||||
#endif // !defined(OS_ANDROID)
|
||||
}
|
||||
|
||||
@ -159,7 +173,7 @@
|
||||
void ChromeMainDelegate::ZygoteStarting(
|
||||
std::vector<std::unique_ptr<content::ZygoteForkDelegate>>* delegates) {
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -1240,7 +1240,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
@@ -1284,7 +1288,7 @@ void ChromeMainDelegate::ZygoteForked() {
|
||||
crash_keys::SetCrashKeysFromCommandLine(*command_line);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- chrome/app/chromium_strings.grd.orig 2021-07-19 18:45:06 UTC
|
||||
--- chrome/app/chromium_strings.grd.orig 2021-09-14 01:51:48 UTC
|
||||
+++ chrome/app/chromium_strings.grd
|
||||
@@ -722,7 +722,7 @@ Chromium is unable to recover your settings.
|
||||
</if>
|
||||
@ -9,7 +9,7 @@
|
||||
<message name="IDS_ABOUT_BROWSER_SWITCH_DESCRIPTION_UNKNOWN_BROWSER" desc="Description shown while waiting for an alternative browser to open, when the browser name is not auto-detected">
|
||||
Your system administrator has configured Chromium to open an alternative browser to access <ph name="TARGET_URL_HOSTNAME">$1<ex>example.com</ex></ph>.
|
||||
</message>
|
||||
@@ -852,7 +852,7 @@ Chromium is unable to recover your settings.
|
||||
@@ -846,7 +846,7 @@ Chromium is unable to recover your settings.
|
||||
</message>
|
||||
|
||||
<!-- ProcessSingleton -->
|
||||
|
@ -1,15 +1,15 @@
|
||||
--- chrome/app/generated_resources.grd.orig 2021-07-19 18:45:06 UTC
|
||||
--- chrome/app/generated_resources.grd.orig 2021-09-24 04:25:56 UTC
|
||||
+++ chrome/app/generated_resources.grd
|
||||
@@ -293,7 +293,7 @@ are declared in tools/grit/grit_rule.gni.
|
||||
<part file="profiles_strings.grdp" />
|
||||
|
||||
<!-- Web app intent picker strings -->
|
||||
- <if expr="is_win or is_macosx or is_linux">
|
||||
+ <if expr="is_win or is_macosx or is_linux or is_posix">
|
||||
@@ -296,7 +296,7 @@ are declared in tools/grit/grit_rule.gni.
|
||||
<if expr="not is_android">
|
||||
<part file="protocol_handler_intent_picker_strings.grdp" />
|
||||
</if>
|
||||
- <if expr="is_win or is_macosx or is_linux">
|
||||
+ <if expr="is_win or is_macosx or is_linux or is_posix">
|
||||
<part file="url_handler_intent_picker_strings.grdp" />
|
||||
</if>
|
||||
|
||||
@@ -5298,7 +5298,7 @@ Keep your key file in a safe place. You will need it t
|
||||
@@ -5453,7 +5453,7 @@ Keep your key file in a safe place. You will need it t
|
||||
</if>
|
||||
|
||||
<!-- chrome://browser-switch strings -->
|
||||
@ -18,7 +18,7 @@
|
||||
<message name="IDS_ABOUT_BROWSER_SWITCH_TITLE" desc="about:browser-switch page title">
|
||||
Legacy Browser Support
|
||||
</message>
|
||||
@@ -7480,7 +7480,7 @@ Keep your key file in a safe place. You will need it t
|
||||
@@ -7731,7 +7731,7 @@ Keep your key file in a safe place. You will need it t
|
||||
Google Pay
|
||||
</message>
|
||||
|
||||
@ -27,7 +27,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>
|
||||
@@ -8502,7 +8502,7 @@ Please help our engineers fix this problem. Tell us wh
|
||||
@@ -8795,7 +8795,7 @@ Please help our engineers fix this problem. Tell us wh
|
||||
Set as default
|
||||
</message>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- chrome/app/google_chrome_strings.grd.orig 2021-07-19 18:45:06 UTC
|
||||
--- chrome/app/google_chrome_strings.grd.orig 2021-09-14 01:51:48 UTC
|
||||
+++ chrome/app/google_chrome_strings.grd
|
||||
@@ -730,7 +730,7 @@ Google Chrome is unable to recover your settings.
|
||||
</if>
|
||||
@ -9,7 +9,7 @@
|
||||
<message name="IDS_ABOUT_BROWSER_SWITCH_DESCRIPTION_UNKNOWN_BROWSER" desc="Description shown while waiting for an alternative browser to open, when the browser name is not auto-detected">
|
||||
Your system administrator has configured Google Chrome to open an alternative browser to access <ph name="TARGET_URL_HOSTNAME">$1<ex>example.com</ex></ph>.
|
||||
</message>
|
||||
@@ -860,7 +860,7 @@ Google Chrome is unable to recover your settings.
|
||||
@@ -854,7 +854,7 @@ Google Chrome is unable to recover your settings.
|
||||
</message>
|
||||
|
||||
<!-- ProcessSingleton -->
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- chrome/app/profiles_strings.grdp.orig 2021-07-19 18:45:06 UTC
|
||||
--- chrome/app/profiles_strings.grdp.orig 2021-09-14 01:51:48 UTC
|
||||
+++ chrome/app/profiles_strings.grdp
|
||||
@@ -78,7 +78,7 @@
|
||||
@@ -69,7 +69,7 @@
|
||||
Add Profile...
|
||||
</message>
|
||||
</if>
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- chrome/app/settings_strings.grdp.orig 2021-05-12 22:05:42 UTC
|
||||
--- chrome/app/settings_strings.grdp.orig 2021-10-08 06:25:37 UTC
|
||||
+++ chrome/app/settings_strings.grdp
|
||||
@@ -123,7 +123,7 @@
|
||||
Theme
|
||||
@ -13,8 +13,8 @@
|
||||
Use Classic
|
||||
</message>
|
||||
</if>
|
||||
- <if expr="not is_linux or chromeos or lacros">
|
||||
+ <if expr="not is_posix or chromeos or lacros">
|
||||
- <if expr="not is_linux or chromeos or lacros or is_fuchsia">
|
||||
+ <if expr="not is_posix or chromeos or lacros or is_fuchsia">
|
||||
<message name="IDS_SETTINGS_RESET_TO_DEFAULT_THEME" desc="Name of the control which resets the browser theme back to the default theme.">
|
||||
Reset to default
|
||||
</message>
|
||||
|
@ -1,21 +0,0 @@
|
||||
--- chrome/app/shutdown_signal_handlers_posix.cc.orig 2021-04-14 18:40:52 UTC
|
||||
+++ chrome/app/shutdown_signal_handlers_posix.cc
|
||||
@@ -186,12 +186,18 @@ void InstallShutdownSignalHandlers(
|
||||
g_pipe_pid = getpid();
|
||||
g_shutdown_pipe_read_fd = pipefd[0];
|
||||
g_shutdown_pipe_write_fd = pipefd[1];
|
||||
+#if defined(OS_BSD)
|
||||
+ // PTHREAD_STACK_MIN causes chromium to crash under FreeBSD,
|
||||
+ // we request the default pthread stack size by specifying 0 here.
|
||||
+ const size_t kShutdownDetectorThreadStackSize = 0;
|
||||
+#else
|
||||
#if !defined(ADDRESS_SANITIZER)
|
||||
const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2;
|
||||
#else
|
||||
// ASan instrumentation bloats the stack frames, so we need to increase the
|
||||
// stack size to avoid hitting the guard page.
|
||||
const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4;
|
||||
+#endif
|
||||
#endif
|
||||
ShutdownDetector* detector = new ShutdownDetector(
|
||||
g_shutdown_pipe_read_fd, std::move(shutdown_callback), task_runner);
|
@ -1,6 +1,6 @@
|
||||
--- chrome/browser/BUILD.gn.orig 2021-07-19 18:45:07 UTC
|
||||
--- chrome/browser/BUILD.gn.orig 2021-09-24 04:25:57 UTC
|
||||
+++ chrome/browser/BUILD.gn
|
||||
@@ -2456,9 +2456,18 @@ static_library("browser") {
|
||||
@@ -2458,9 +2458,18 @@ static_library("browser") {
|
||||
deps += [ "//chromeos/services/libassistant/public/mojom" ]
|
||||
}
|
||||
}
|
||||
@ -20,8 +20,8 @@
|
||||
if (use_ozone) {
|
||||
deps += [
|
||||
"//ui/events/ozone",
|
||||
@@ -5310,6 +5319,18 @@ static_library("browser") {
|
||||
}
|
||||
@@ -5515,6 +5524,17 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
+ if (is_bsd) {
|
||||
@ -35,16 +35,15 @@
|
||||
+ ]
|
||||
+ }
|
||||
+
|
||||
+
|
||||
if (is_posix || is_fuchsia) {
|
||||
deps += [ "//chrome/app:shutdown_signal_handlers" ]
|
||||
}
|
||||
@@ -5468,7 +5489,7 @@ static_library("browser") {
|
||||
if (is_posix) {
|
||||
sources += [
|
||||
"shutdown_signal_handlers_posix.cc",
|
||||
@@ -5675,7 +5695,7 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
- if (is_posix && !is_mac) {
|
||||
+ if (is_posix && !is_mac && !is_bsd) {
|
||||
# TODO(crbug.com / 753619): Enable crash reporting on Fuchsia.
|
||||
# TODO(crbug.com/1226159): Complete crash reporting integration on Fuchsia.
|
||||
sources += [
|
||||
"//chrome/app/chrome_crash_reporter_client.cc",
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- chrome/browser/about_flags.cc.orig 2021-07-21 14:11:02 UTC
|
||||
--- chrome/browser/about_flags.cc.orig 2021-09-24 04:25:57 UTC
|
||||
+++ chrome/browser/about_flags.cc
|
||||
@@ -192,7 +192,7 @@
|
||||
@@ -195,7 +195,7 @@
|
||||
#include "ui/gl/gl_switches.h"
|
||||
#include "ui/native_theme/native_theme_features.h"
|
||||
|
||||
@ -9,25 +9,25 @@
|
||||
#include "base/allocator/buildflags.h"
|
||||
#endif
|
||||
|
||||
@@ -992,7 +992,7 @@ const FeatureEntry::FeatureVariation kMemoriesVariatio
|
||||
nullptr,
|
||||
}};
|
||||
@@ -966,7 +966,7 @@ const FeatureEntry::FeatureVariation kMemoriesVariatio
|
||||
base::size(kMemoryVariationRemote), nullptr},
|
||||
};
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || \
|
||||
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) || \
|
||||
defined(OS_WIN)
|
||||
const FeatureEntry::FeatureParam kOmniboxDocumentProviderServerScoring[] = {
|
||||
{"DocumentUseServerScore", "true"},
|
||||
@@ -1263,7 +1263,7 @@ const FeatureEntry::FeatureVariation kOmniboxBookmarkP
|
||||
nullptr,
|
||||
},
|
||||
};
|
||||
@@ -1164,7 +1164,7 @@ const FeatureEntry::FeatureVariation kOmniboxBookmarkP
|
||||
{"Dynamic Replace URL (Title - Path|URL)",
|
||||
kOmniboxBookmarkPathsDynamicReplaceUrl,
|
||||
base::size(kOmniboxBookmarkPathsDynamicReplaceUrl), nullptr}};
|
||||
-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) ||
|
||||
+#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) ||
|
||||
// defined(OS_WIN)
|
||||
|
||||
const FeatureEntry::FeatureVariation
|
||||
@@ -3151,7 +3151,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -3131,7 +3131,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(media::kDeprecateLowUsageCodecs)},
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
{
|
||||
"enable-accelerated-video-decode",
|
||||
flag_descriptions::kAcceleratedVideoDecodeName,
|
||||
@@ -3169,7 +3169,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -3149,7 +3149,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
kOsMac | kOsWin | kOsCrOS | kOsAndroid | kOsLinux,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
|
||||
},
|
||||
@ -45,7 +45,7 @@
|
||||
{
|
||||
"disable-accelerated-video-encode",
|
||||
flag_descriptions::kAcceleratedVideoEncodeName,
|
||||
@@ -3510,7 +3510,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -3511,7 +3511,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
{"enable-login-detection", flag_descriptions::kEnableLoginDetectionName,
|
||||
flag_descriptions::kEnableLoginDetectionDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(login_detection::kLoginDetection)},
|
||||
@ -54,7 +54,7 @@
|
||||
{"enable-save-data", flag_descriptions::kEnableSaveDataName,
|
||||
flag_descriptions::kEnableSaveDataDescription, kOsCrOS | kOsLinux,
|
||||
SINGLE_VALUE_TYPE(
|
||||
@@ -3520,7 +3520,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -3521,7 +3521,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kEnableNavigationPredictorDescription,
|
||||
kOsCrOS | kOsLinux,
|
||||
FEATURE_VALUE_TYPE(blink::features::kNavigationPredictor)},
|
||||
@ -63,7 +63,7 @@
|
||||
{"enable-preconnect-to-search",
|
||||
flag_descriptions::kEnablePreconnectToSearchName,
|
||||
flag_descriptions::kEnablePreconnectToSearchDescription, kOsAll,
|
||||
@@ -4346,7 +4346,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -4326,7 +4326,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
kOsAll,
|
||||
FEATURE_VALUE_TYPE(omnibox::kOmniboxTrendingZeroPrefixSuggestionsOnNTP)},
|
||||
|
||||
@ -72,25 +72,22 @@
|
||||
defined(OS_WIN)
|
||||
{"omnibox-experimental-keyword-mode",
|
||||
flag_descriptions::kOmniboxExperimentalKeywordModeName,
|
||||
@@ -4443,7 +4443,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kOmniboxKeywordSpaceTriggeringSettingName,
|
||||
flag_descriptions::kOmniboxKeywordSpaceTriggeringSettingDescription,
|
||||
kOsDesktop, FEATURE_VALUE_TYPE(omnibox::kKeywordSpaceTriggeringSetting)},
|
||||
@@ -4438,7 +4438,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kOmniboxPreserveLongerShortcutsTextName,
|
||||
flag_descriptions::kOmniboxPreserveLongerShortcutsTextDescription,
|
||||
kOsDesktop, FEATURE_VALUE_TYPE(omnibox::kPreserveLongerShortcutsText)},
|
||||
-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) ||
|
||||
+#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_MAC) || defined(OS_BSD) ||
|
||||
// defined(OS_WIN)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -4721,7 +4721,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -4707,12 +4707,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(chrome::android::kReaderModeInCCT)},
|
||||
#endif // !defined(OS_ANDROID)
|
||||
|
||||
-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || \
|
||||
+#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || \
|
||||
defined(OS_CHROMEOS)
|
||||
{"direct-manipulation-stylus",
|
||||
flag_descriptions::kDirectManipulationStylusName,
|
||||
@@ -4732,7 +4732,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
{"webui-feedback", flag_descriptions::kWebuiFeedbackName,
|
||||
flag_descriptions::kWebuiFeedbackDescription, kOsDesktop,
|
||||
FEATURE_VALUE_TYPE(features::kWebUIFeedback)},
|
||||
@ -99,16 +96,16 @@
|
||||
// defined(OS_CHROMEOS)
|
||||
|
||||
#if !defined(OS_ANDROID)
|
||||
@@ -5373,7 +5373,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
kSharingDeviceExpirationVariations,
|
||||
"SharingDeviceExpiration")},
|
||||
@@ -5322,7 +5322,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kSharingSendViaSyncDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(kSharingSendViaSync)},
|
||||
|
||||
-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX)
|
||||
+#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD)
|
||||
{"sharing-hub-desktop-app-menu",
|
||||
flag_descriptions::kSharingHubDesktopAppMenuName,
|
||||
flag_descriptions::kSharingHubDesktopAppMenuDescription, kOsDesktop,
|
||||
@@ -5382,7 +5382,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -5331,7 +5331,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kSharingHubDesktopOmniboxName,
|
||||
flag_descriptions::kSharingHubDesktopOmniboxDescription, kOsDesktop,
|
||||
FEATURE_VALUE_TYPE(sharing_hub::kSharingHubDesktopOmnibox)},
|
||||
@ -117,7 +114,7 @@
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
{"ash-enable-pip-rounded-corners",
|
||||
@@ -5856,7 +5856,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -5805,7 +5805,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kMouseSubframeNoImplicitCaptureDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(features::kMouseSubframeNoImplicitCapture)},
|
||||
|
||||
@ -126,7 +123,7 @@
|
||||
defined(OS_CHROMEOS)
|
||||
{"global-media-controls", flag_descriptions::kGlobalMediaControlsName,
|
||||
flag_descriptions::kGlobalMediaControlsDescription,
|
||||
@@ -5897,7 +5897,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -5846,7 +5846,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kGlobalMediaControlsOverlayControlsDescription,
|
||||
kOsWin | kOsMac | kOsLinux,
|
||||
FEATURE_VALUE_TYPE(media::kGlobalMediaControlsOverlayControls)},
|
||||
@ -134,36 +131,27 @@
|
||||
+#endif // defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) ||
|
||||
// defined(OS_CHROMEOS)
|
||||
|
||||
#if BUILDFLAG(ENABLE_SPELLCHECK) && defined(OS_WIN)
|
||||
@@ -6089,7 +6089,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
kPasswordsAccountStorageVariations,
|
||||
"ButterForPasswords")},
|
||||
|
||||
-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || \
|
||||
+#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || \
|
||||
defined(OS_CHROMEOS)
|
||||
{"passwords-account-storage-iph",
|
||||
flag_descriptions::kEnablePasswordsAccountStorageIPHName,
|
||||
@@ -6097,7 +6097,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
kOsWin | kOsMac | kOsLinux,
|
||||
FEATURE_VALUE_TYPE(
|
||||
feature_engagement::kIPHPasswordsAccountStorageFeature)},
|
||||
-#endif // defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) ||
|
||||
+#endif // defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) ||
|
||||
// defined(OS_CHROMEOS)
|
||||
|
||||
{"autofill-always-return-cloud-tokenized-card",
|
||||
@@ -6701,7 +6701,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(features::kIncognitoBrandConsistencyForAndroid)},
|
||||
{"safety-tips", flag_descriptions::kSafetyTipName,
|
||||
@@ -6648,7 +6648,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(features::kIncognitoReauthenticationForAndroid)},
|
||||
#endif
|
||||
|
||||
-#if defined(OS_MAC) || defined(OS_WIN) || defined(OS_LINUX) || \
|
||||
+#if defined(OS_MAC) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) || \
|
||||
defined(OS_CHROMEOS)
|
||||
defined(OS_CHROMEOS) || defined(OS_FUCHSIA)
|
||||
{"incognito-brand-consistency-for-desktop",
|
||||
flag_descriptions::kIncognitoBrandConsistencyForDesktopName,
|
||||
@@ -6806,7 +6806,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(language::kDetailedLanguageSettings)},
|
||||
@@ -6667,7 +6667,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kInheritNativeThemeFromParentWidgetDescription,
|
||||
kOsDesktop,
|
||||
FEATURE_VALUE_TYPE(views::features::kInheritNativeThemeFromParentWidget)},
|
||||
-#endif // defined(OS_MAC) || defined(OS_WIN) || defined(OS_LINUX) ||
|
||||
+#endif // defined(OS_MAC) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) ||
|
||||
// defined(OS_CHROMEOS) || defined(OS_FUCHSIA)
|
||||
|
||||
{"content-settings-redesign",
|
||||
@@ -6778,7 +6778,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(language::kForceAppLanguagePrompt)},
|
||||
#endif
|
||||
|
||||
-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX)
|
||||
@ -171,7 +159,7 @@
|
||||
{"commander", flag_descriptions::kCommanderName,
|
||||
flag_descriptions::kCommanderDescription, kOsDesktop,
|
||||
FEATURE_VALUE_TYPE(features::kCommander)},
|
||||
@@ -6835,8 +6835,8 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -6805,8 +6805,8 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kSyncAutofillWalletOfferDataDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(switches::kSyncAutofillWalletOfferData)},
|
||||
|
||||
@ -182,33 +170,16 @@
|
||||
BUILDFLAG(ENABLE_PRINTING)
|
||||
{"enable-oop-print-drivers", flag_descriptions::kEnableOopPrintDriversName,
|
||||
flag_descriptions::kEnableOopPrintDriversDescription, kOsDesktop,
|
||||
@@ -6855,14 +6855,14 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
-#if defined(OS_WIN) || (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \
|
||||
+#if defined(OS_WIN) || (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || defined(OS_BSD) || \
|
||||
defined(OS_MAC)
|
||||
{"enable-ephemeral-guest-profiles-on-desktop",
|
||||
flag_descriptions::kEnableEphemeralGuestProfilesOnDesktopName,
|
||||
flag_descriptions::kEnableEphemeralGuestProfilesOnDesktopDescription,
|
||||
kOsWin | kOsLinux | kOsMac,
|
||||
FEATURE_VALUE_TYPE(features::kEnableEphemeralGuestProfilesOnDesktop)},
|
||||
-#endif // defined(OS_WIN) || (defined(OS_LINUX) ||
|
||||
+#endif // defined(OS_WIN) || (defined(OS_LINUX) || defined(OS_BSD) ||
|
||||
// BUILDFLAG(IS_CHROMEOS_LACROS)) || defined(OS_MAC)
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
@@ -7148,7 +7148,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(media::kVaapiAV1Decoder)},
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
@@ -7091,7 +7091,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(media::kVaapiVp9kSVCHWEncoding)},
|
||||
#endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
-#if defined(OS_WIN) || (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \
|
||||
+#if defined(OS_WIN) || (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || defined(OS_BSD) || \
|
||||
defined(OS_MAC)
|
||||
{
|
||||
"ui-debug-tools",
|
||||
@@ -7225,7 +7225,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -7181,7 +7181,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(metrics::structured::kBluetoothSessionizedMetrics)},
|
||||
#endif
|
||||
|
||||
@ -217,3 +188,21 @@
|
||||
{"use-ozone-platform", flag_descriptions::kUseOzonePlatformName,
|
||||
flag_descriptions::kUseOzonePlatformDescription, kOsLinux,
|
||||
FEATURE_VALUE_TYPE(features::kUseOzonePlatform)},
|
||||
@@ -7224,7 +7224,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(chromeos::features::kLauncherAppSort)},
|
||||
#endif
|
||||
|
||||
-#if BUILDFLAG(IS_CHROMEOS_ASH) || defined(OS_MAC) || defined(OS_LINUX)
|
||||
+#if BUILDFLAG(IS_CHROMEOS_ASH) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD)
|
||||
{"enable-desktop-pwas-app-icon-shortcuts-menu-ui",
|
||||
flag_descriptions::kDesktopPWAsAppIconShortcutsMenuUIName,
|
||||
flag_descriptions::kDesktopPWAsAppIconShortcutsMenuUIDescription,
|
||||
@@ -7487,7 +7487,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
ash::features::kHoldingSpaceInProgressDownloadsIntegration)},
|
||||
#endif
|
||||
|
||||
-#if defined(OS_WIN) || (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || \
|
||||
+#if defined(OS_WIN) || (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || defined(OS_BSD) || \
|
||||
defined(OS_MAC) || (defined(OS_ANDROID))
|
||||
{"omnibox-updated-connection-security-indicators",
|
||||
flag_descriptions::kOmniboxUpdatedConnectionSecurityIndicatorsName,
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- chrome/browser/apps/platform_apps/api/media_galleries/media_galleries_watch_apitest.cc.orig 2021-05-12 22:05:43 UTC
|
||||
--- chrome/browser/apps/platform_apps/api/media_galleries/media_galleries_watch_apitest.cc.orig 2021-09-14 01:51:49 UTC
|
||||
+++ chrome/browser/apps/platform_apps/api/media_galleries/media_galleries_watch_apitest.cc
|
||||
@@ -234,7 +234,7 @@ IN_PROC_BROWSER_TEST_F(MediaGalleriesGalleryWatchApiTe
|
||||
@@ -242,7 +242,7 @@ IN_PROC_BROWSER_TEST_F(MediaGalleriesGalleryWatchApiTe
|
||||
// Test is flaky on windows and linux: crbug.com/1150017.
|
||||
// TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is
|
||||
// complete.
|
||||
|
@ -0,0 +1,36 @@
|
||||
--- chrome/browser/apps/platform_apps/platform_app_launch.cc.orig 2021-09-24 18:17:35 UTC
|
||||
+++ chrome/browser/apps/platform_apps/platform_app_launch.cc
|
||||
@@ -17,13 +17,13 @@
|
||||
#include "extensions/common/constants.h"
|
||||
#include "extensions/common/extension.h"
|
||||
|
||||
-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX)
|
||||
+#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD)
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
#include "chrome/browser/ui/browser_navigator.h"
|
||||
#include "chrome/browser/ui/browser_window.h"
|
||||
#include "chrome/browser/web_applications/extension_status_utils.h"
|
||||
#include "chrome/common/webui_url_constants.h"
|
||||
-#endif // defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX)
|
||||
+#endif // defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD)
|
||||
|
||||
namespace apps {
|
||||
|
||||
@@ -122,7 +122,7 @@ bool OpenExtensionApplicationTab(Profile* profile, con
|
||||
return app_tab != nullptr;
|
||||
}
|
||||
|
||||
-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX)
|
||||
+#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD)
|
||||
bool OpenDeprecatedApplicationPrompt(Profile* profile,
|
||||
const std::string& app_id) {
|
||||
if (!extensions::IsExtensionUnsupportedDeprecatedApp(profile, app_id))
|
||||
@@ -142,7 +142,7 @@ bool OpenDeprecatedApplicationPrompt(Profile* profile,
|
||||
// TODO(crbug.com/1225779): Show the deprecated apps dialog.
|
||||
return true;
|
||||
}
|
||||
-#endif // defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX)
|
||||
+#endif // defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD)
|
||||
|
||||
bool OpenExtensionApplicationWithReenablePrompt(
|
||||
Profile* profile,
|
@ -0,0 +1,11 @@
|
||||
--- chrome/browser/apps/platform_apps/platform_app_launch.h.orig 2021-09-24 18:17:59 UTC
|
||||
+++ chrome/browser/apps/platform_apps/platform_app_launch.h
|
||||
@@ -36,7 +36,7 @@ bool OpenExtensionApplicationWindow(Profile* profile,
|
||||
// and false otherwise.
|
||||
bool OpenExtensionApplicationTab(Profile* profile, const std::string& app_id);
|
||||
|
||||
-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX)
|
||||
+#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD)
|
||||
// Opens the deprecated Chrome Apps flow if |app_id| refers to a Chrome App and
|
||||
// Chrome Apps are deprecated on the |profile|. Returns true if that was the
|
||||
// case, or false otherwise.
|
@ -1,6 +1,6 @@
|
||||
--- chrome/browser/background/background_mode_manager.cc.orig 2021-05-12 22:05:43 UTC
|
||||
--- chrome/browser/background/background_mode_manager.cc.orig 2021-09-24 04:25:58 UTC
|
||||
+++ chrome/browser/background/background_mode_manager.cc
|
||||
@@ -882,7 +882,7 @@ gfx::ImageSkia GetStatusTrayIcon() {
|
||||
@@ -892,7 +892,7 @@ gfx::ImageSkia GetStatusTrayIcon() {
|
||||
return gfx::ImageSkia();
|
||||
|
||||
return family->CreateExact(size).AsImageSkia();
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- chrome/browser/browser_resources.grd.orig 2021-05-12 22:05:43 UTC
|
||||
+++ chrome/browser/browser_resources.grd
|
||||
@@ -41,7 +41,7 @@
|
||||
<include name="IDR_DISCARDS_SITE_DATA_MOJOM_WEBUI_JS" file="${root_gen_dir}\mojom-webui\chrome\browser\ui\webui\discards\site_data.mojom-webui.js" use_base_dir="false" type="BINDATA" />
|
||||
<include name="IDR_DISCARDS_SORTED_TABLE_BEHAVIOR_JS" file="resources\discards\sorted_table_behavior.js" type="BINDATA" />
|
||||
</if>
|
||||
- <if expr="is_win or is_macosx or (is_linux and not chromeos)">
|
||||
+ <if expr="is_win or is_macosx or (is_posix and not chromeos)">
|
||||
<include name="IDR_BROWSER_SWITCH_APP_JS" file="${root_gen_dir}\chrome\browser\resources\browser_switch\app.js" use_base_dir="false" type="BINDATA" />
|
||||
<include name="IDR_BROWSER_SWITCH_PROXY_JS" file="resources\browser_switch\browser_switch_proxy.js" type="BINDATA" />
|
||||
<include name="IDR_BROWSER_SWITCH_HTML" file="resources\browser_switch\browser_switch.html" allowexternalscript="true" type="BINDATA" />
|
@ -1,6 +1,6 @@
|
||||
--- chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc.orig 2021-07-19 18:45:08 UTC
|
||||
--- chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc.orig 2021-09-24 04:25:58 UTC
|
||||
+++ chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
|
||||
@@ -637,7 +637,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedder
|
||||
@@ -639,7 +639,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedder
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
--- chrome/browser/chrome_browser_interface_binders.cc.orig 2021-07-19 18:45:08 UTC
|
||||
--- chrome/browser/chrome_browser_interface_binders.cc.orig 2021-09-24 04:25:58 UTC
|
||||
+++ chrome/browser/chrome_browser_interface_binders.cc
|
||||
@@ -146,7 +146,7 @@
|
||||
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
|
||||
@@ -155,7 +155,7 @@
|
||||
#include "ui/webui/resources/cr_components/most_visited/most_visited.mojom.h"
|
||||
#endif // defined(OS_ANDROID)
|
||||
|
||||
-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || \
|
||||
@ -9,16 +9,24 @@
|
||||
defined(OS_CHROMEOS)
|
||||
#include "chrome/browser/ui/webui/discards/discards.mojom.h"
|
||||
#include "chrome/browser/ui/webui/discards/discards_ui.h"
|
||||
@@ -612,7 +612,7 @@ void PopulateChromeFrameBinders(
|
||||
@@ -637,14 +637,14 @@ void PopulateChromeFrameBinders(
|
||||
base::BindRepeating(&BindSpeechRecognitionRecognizerClientHandler));
|
||||
#endif
|
||||
|
||||
-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX)
|
||||
+#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD)
|
||||
if (base::FeatureList::IsEnabled(features::kWebAppWindowControlsOverlay) &&
|
||||
!render_frame_host->GetParent()) {
|
||||
if (!render_frame_host->GetParent()) {
|
||||
map->Add<chrome::mojom::DraggableRegions>(
|
||||
@@ -854,7 +854,7 @@ void PopulateChromeWebUIFrameBinders(
|
||||
base::BindRepeating(&DraggableRegionsHostImpl::CreateIfAllowed));
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_MAC) || \
|
||||
+#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_MAC) || defined(OS_BSD) || \
|
||||
defined(OS_WIN)
|
||||
if (base::FeatureList::IsEnabled(blink::features::kDesktopPWAsSubApps) &&
|
||||
!render_frame_host->GetParent()) {
|
||||
@@ -952,7 +952,7 @@ void PopulateChromeWebUIFrameBinders(
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- chrome/browser/chrome_browser_main.cc.orig 2021-07-19 18:45:08 UTC
|
||||
--- chrome/browser/chrome_browser_main.cc.orig 2021-09-24 04:25:58 UTC
|
||||
+++ chrome/browser/chrome_browser_main.cc
|
||||
@@ -257,7 +257,7 @@
|
||||
@@ -260,7 +260,7 @@
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
#if defined(OS_WIN) || defined(OS_MAC) || \
|
||||
@ -9,7 +9,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"
|
||||
@@ -956,7 +956,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
@@ -942,7 +942,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
AddFirstRunNewTabs(browser_creator_.get(), master_prefs_->new_tabs);
|
||||
}
|
||||
|
||||
@ -18,7 +18,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 .
|
||||
@@ -965,7 +965,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
@@ -951,7 +951,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
&user_native_messaging_dir));
|
||||
if (!base::PathExists(user_native_messaging_dir))
|
||||
base::CreateDirectory(user_native_messaging_dir);
|
||||
@ -27,7 +27,7 @@
|
||||
}
|
||||
#endif // !defined(OS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
@@ -990,7 +990,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
@@ -976,7 +976,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
#if defined(OS_WIN) || defined(OS_MAC) || \
|
||||
@ -36,7 +36,7 @@
|
||||
metrics::DesktopSessionDurationTracker::Initialize();
|
||||
ProfileActivityMetricsRecorder::Initialize();
|
||||
TouchModeStatsTracker::Initialize(
|
||||
@@ -1156,6 +1156,7 @@ void ChromeBrowserMainParts::PostBrowserStart() {
|
||||
@@ -1146,6 +1146,7 @@ void ChromeBrowserMainParts::PostBrowserStart() {
|
||||
base::TimeDelta::FromMinutes(1));
|
||||
|
||||
#if !defined(OS_ANDROID)
|
||||
@ -44,7 +44,7 @@
|
||||
if (base::FeatureList::IsEnabled(features::kWebUsb)) {
|
||||
web_usb_detector_ = std::make_unique<WebUsbDetector>();
|
||||
content::GetUIThreadTaskRunner({base::TaskPriority::BEST_EFFORT})
|
||||
@@ -1163,6 +1164,7 @@ void ChromeBrowserMainParts::PostBrowserStart() {
|
||||
@@ -1153,6 +1154,7 @@ void ChromeBrowserMainParts::PostBrowserStart() {
|
||||
base::BindOnce(&WebUsbDetector::Initialize,
|
||||
base::Unretained(web_usb_detector_.get())));
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
--- chrome/browser/chrome_content_browser_client.cc.orig 2021-07-19 18:45:08 UTC
|
||||
--- chrome/browser/chrome_content_browser_client.cc.orig 2021-09-24 04:25:58 UTC
|
||||
+++ chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -450,7 +450,7 @@
|
||||
#include "components/user_manager/user.h"
|
||||
@@ -361,7 +361,7 @@
|
||||
#include "components/user_manager/user_manager.h"
|
||||
#include "services/service_manager/public/mojom/interface_provider_spec.mojom.h"
|
||||
#include "storage/browser/file_system/external_mount_points.h"
|
||||
-#elif defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
+#elif defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD)
|
||||
#include "chrome/browser/chrome_browser_main_linux.h"
|
||||
#elif defined(OS_ANDROID)
|
||||
#include "base/android/application_status_listener.h"
|
||||
@@ -511,7 +511,7 @@
|
||||
@@ -425,7 +425,7 @@
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
#if defined(OS_WIN) || defined(OS_MAC) || \
|
||||
@ -18,19 +18,20 @@
|
||||
#include "chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h"
|
||||
#endif
|
||||
|
||||
@@ -530,9 +530,9 @@
|
||||
@@ -442,10 +442,10 @@
|
||||
#include "components/crash/content/browser/crash_handler_host_linux.h"
|
||||
#endif
|
||||
|
||||
// TODO(crbug/1169547) Remove `BUILDFLAG(IS_CHROMEOS_LACROS)` once the
|
||||
// migration is complete.
|
||||
-#if defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN)
|
||||
+#if defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN) || defined(OS_BSD)
|
||||
-#if defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN) || \
|
||||
+#if defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN) || defined(OS_BSD) || \
|
||||
BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#include "chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h"
|
||||
-#endif // defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN)
|
||||
+#endif // defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN) || defined(OS_BSD)
|
||||
-#endif // defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN) ||
|
||||
+#endif // defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN) || defined(OS_BSD) ||
|
||||
// BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
// TODO(crbug.com/939205): Once the upcoming App Service is available, use a
|
||||
// single navigation throttle to display the intent picker on all platforms.
|
||||
@@ -550,7 +550,7 @@
|
||||
@@ -464,7 +464,7 @@
|
||||
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
@ -39,7 +40,7 @@
|
||||
#include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h"
|
||||
#endif
|
||||
|
||||
@@ -951,11 +951,13 @@ breakpad::CrashHandlerHostLinux* CreateCrashHandlerHos
|
||||
@@ -860,11 +860,13 @@ breakpad::CrashHandlerHostLinux* CreateCrashHandlerHos
|
||||
}
|
||||
|
||||
int GetCrashSignalFD(const base::CommandLine& command_line) {
|
||||
@ -53,7 +54,7 @@
|
||||
|
||||
// Extensions have the same process type as renderers.
|
||||
if (command_line.HasSwitch(extensions::switches::kExtensionProcess)) {
|
||||
@@ -1377,7 +1379,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(
|
||||
@@ -1255,7 +1257,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(
|
||||
#elif BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
main_parts = std::make_unique<ChromeBrowserMainPartsLacros>(parameters,
|
||||
&startup_data_);
|
||||
@ -62,7 +63,7 @@
|
||||
main_parts =
|
||||
std::make_unique<ChromeBrowserMainPartsLinux>(parameters, &startup_data_);
|
||||
#elif defined(OS_ANDROID)
|
||||
@@ -1408,7 +1410,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(
|
||||
@@ -1289,7 +1291,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(
|
||||
std::make_unique<ChromeBrowserMainExtraPartsViewsLacros>());
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
@ -71,7 +72,7 @@
|
||||
main_parts->AddParts(
|
||||
std::make_unique<ChromeBrowserMainExtraPartsViewsLinux>());
|
||||
#else
|
||||
@@ -2192,7 +2194,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin
|
||||
@@ -2058,7 +2060,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin
|
||||
command_line->AppendSwitchASCII(switches::kMetricsClientID,
|
||||
client_info->client_id);
|
||||
}
|
||||
@ -80,7 +81,7 @@
|
||||
#if defined(OS_ANDROID)
|
||||
bool enable_crash_reporter = true;
|
||||
#else
|
||||
@@ -3753,7 +3755,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst
|
||||
@@ -3649,7 +3651,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,7 +90,7 @@
|
||||
void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
|
||||
const base::CommandLine& command_line,
|
||||
int child_process_id,
|
||||
@@ -3788,7 +3790,7 @@ void ChromeContentBrowserClient::GetAdditionalMappedFi
|
||||
@@ -3684,7 +3686,7 @@ void ChromeContentBrowserClient::GetAdditionalMappedFi
|
||||
mappings->Share(kCrashDumpSignal, crash_signal_fd);
|
||||
}
|
||||
}
|
||||
@ -98,21 +99,22 @@
|
||||
|
||||
#if defined(OS_WIN)
|
||||
std::wstring ChromeContentBrowserClient::GetAppContainerSidForSandboxType(
|
||||
@@ -4146,11 +4148,11 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati
|
||||
@@ -4067,12 +4069,12 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati
|
||||
&throttles);
|
||||
}
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN)
|
||||
+#if defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN) || defined(OS_BSD)
|
||||
-#if defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN) || \
|
||||
+#if defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN) || defined(OS_BSD) || \
|
||||
BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
MaybeAddThrottle(enterprise_connectors::DeviceTrustNavigationThrottle::
|
||||
MaybeCreateThrottleFor(handle),
|
||||
&throttles);
|
||||
-#endif // defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN)
|
||||
+#endif // defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN) || defined(OS_BSD)
|
||||
-#endif // defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN) ||
|
||||
+#endif // defined(OS_LINUX) || defined(OS_MAC) || defined(OS_WIN) || defined(OS_BSD) ||
|
||||
// BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
#if !defined(OS_ANDROID)
|
||||
MaybeAddThrottle(DevToolsWindow::MaybeCreateNavigationThrottle(handle),
|
||||
@@ -4172,7 +4174,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati
|
||||
@@ -4101,7 +4103,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
#if defined(OS_WIN) || defined(OS_MAC) || \
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- chrome/browser/chrome_content_browser_client.h.orig 2021-07-19 18:45:08 UTC
|
||||
--- chrome/browser/chrome_content_browser_client.h.orig 2021-09-24 04:25:58 UTC
|
||||
+++ chrome/browser/chrome_content_browser_client.h
|
||||
@@ -405,12 +405,12 @@ class ChromeContentBrowserClient : public content::Con
|
||||
@@ -402,12 +402,12 @@ class ChromeContentBrowserClient : public content::Con
|
||||
void OverridePageVisibilityState(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
content::PageVisibilityState* visibility_state) override;
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- chrome/browser/crash_upload_list/crash_upload_list.cc.orig 2021-05-12 22:05:43 UTC
|
||||
--- chrome/browser/crash_upload_list/crash_upload_list.cc.orig 2021-09-24 04:25:58 UTC
|
||||
+++ chrome/browser/crash_upload_list/crash_upload_list.cc
|
||||
@@ -48,7 +48,7 @@ scoped_refptr<UploadList> CreateCrashUploadList() {
|
||||
@@ -52,7 +52,7 @@ scoped_refptr<UploadList> CreateCrashUploadList() {
|
||||
// to log uploads in CrashUploadList::kReporterLogFilename.
|
||||
// Linux is handled below.
|
||||
#if !(BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) || \
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- chrome/browser/device_identity/device_oauth2_token_service_factory.cc.orig 2021-05-12 22:05:43 UTC
|
||||
--- chrome/browser/device_identity/device_oauth2_token_service_factory.cc.orig 2021-09-14 01:51:50 UTC
|
||||
+++ chrome/browser/device_identity/device_oauth2_token_service_factory.cc
|
||||
@@ -28,7 +28,7 @@ std::unique_ptr<DeviceOAuth2TokenStore> CreatePlatform
|
||||
@@ -29,7 +29,7 @@ std::unique_ptr<DeviceOAuth2TokenStore> CreatePlatform
|
||||
return std::make_unique<chromeos::DeviceOAuth2TokenStoreChromeOS>(
|
||||
local_state);
|
||||
#elif defined(OS_WIN) || defined(OS_MAC) || \
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- chrome/browser/devtools/devtools_eye_dropper.cc.orig 2021-04-14 18:40:53 UTC
|
||||
--- chrome/browser/devtools/devtools_eye_dropper.cc.orig 2021-09-14 01:51:50 UTC
|
||||
+++ chrome/browser/devtools/devtools_eye_dropper.cc
|
||||
@@ -187,7 +187,7 @@ void DevToolsEyeDropper::UpdateCursor() {
|
||||
@@ -188,7 +188,7 @@ void DevToolsEyeDropper::UpdateCursor() {
|
||||
// magnified projection only with centered hotspot.
|
||||
// Mac Retina requires cursor to be > 120px in order to render smoothly.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2021-07-19 18:45:08 UTC
|
||||
--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2021-09-24 04:25:58 UTC
|
||||
+++ chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
@@ -1439,7 +1439,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe
|
||||
@@ -1395,7 +1395,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe
|
||||
target_info->is_filetype_handled_safely)
|
||||
DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
if (item->GetOriginalMimeType() == "application/x-x509-user-cert")
|
||||
DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
|
||||
#endif
|
||||
@@ -1494,7 +1494,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe
|
||||
@@ -1450,7 +1450,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe
|
||||
|
||||
bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile(
|
||||
const base::FilePath& path) {
|
||||
@ -18,7 +18,7 @@
|
||||
defined(OS_MAC)
|
||||
if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) {
|
||||
return !download_prefs_->ShouldOpenPdfInSystemReader();
|
||||
@@ -1598,7 +1598,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow
|
||||
@@ -1554,7 +1554,7 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllow
|
||||
bool content_initiated,
|
||||
content::CheckDownloadAllowedCallback check_download_allowed_cb) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
@ -27,7 +27,7 @@
|
||||
defined(OS_MAC)
|
||||
// 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.
|
||||
@@ -1640,7 +1640,7 @@ ChromeDownloadManagerDelegate::GetQuarantineConnection
|
||||
@@ -1596,7 +1596,7 @@ ChromeDownloadManagerDelegate::GetQuarantineConnection
|
||||
std::unique_ptr<download::DownloadItemRenameHandler>
|
||||
ChromeDownloadManagerDelegate::GetRenameHandlerForDownload(
|
||||
download::DownloadItem* download_item) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- chrome/browser/download/download_commands.cc.orig 2021-04-14 18:40:53 UTC
|
||||
--- chrome/browser/download/download_commands.cc.orig 2021-09-24 04:25:58 UTC
|
||||
+++ chrome/browser/download/download_commands.cc
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "net/base/url_util.h"
|
||||
@ -6,30 +6,24 @@
|
||||
|
||||
-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \
|
||||
+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \
|
||||
defined(OS_MAC)
|
||||
defined(OS_MAC) || defined(OS_FUCHSIA)
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
#include "chrome/browser/ui/browser_finder.h"
|
||||
@@ -155,7 +155,7 @@ void DownloadCommands::ExecuteCommand(Command command)
|
||||
@@ -165,7 +165,7 @@ void DownloadCommands::ExecuteCommand(Command command)
|
||||
model_->ExecuteCommand(this, command);
|
||||
}
|
||||
|
||||
-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || \
|
||||
+#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || \
|
||||
defined(OS_CHROMEOS)
|
||||
defined(OS_CHROMEOS) || defined(OS_FUCHSIA)
|
||||
|
||||
Browser* DownloadCommands::GetBrowser() const {
|
||||
@@ -179,12 +179,12 @@ bool DownloadCommands::CanOpenPdfInSystemViewer() cons
|
||||
return IsDownloadPdf() &&
|
||||
(IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date
|
||||
: true);
|
||||
-#elif defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
+#elif defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
|
||||
return IsDownloadPdf();
|
||||
@@ -200,7 +200,7 @@ bool DownloadCommands::CanOpenPdfInSystemViewer() cons
|
||||
#endif
|
||||
}
|
||||
|
||||
-#endif // defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) ||
|
||||
+#endif // defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) ||
|
||||
// defined(OS_CHROMEOS)
|
||||
// defined(OS_CHROMEOS) || defined(OS_FUCHSIA)
|
||||
|
||||
void DownloadCommands::CopyFileAsImageToClipboard() {
|
||||
|
@ -1,11 +1,11 @@
|
||||
--- chrome/browser/download/download_commands.h.orig 2021-07-19 18:45:08 UTC
|
||||
--- chrome/browser/download/download_commands.h.orig 2021-09-24 04:25:58 UTC
|
||||
+++ chrome/browser/download/download_commands.h
|
||||
@@ -47,7 +47,7 @@ class DownloadCommands {
|
||||
@@ -48,7 +48,7 @@ class DownloadCommands {
|
||||
bool IsCommandVisible(Command command) const;
|
||||
void ExecuteCommand(Command command);
|
||||
|
||||
-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \
|
||||
+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \
|
||||
defined(OS_MAC)
|
||||
defined(OS_MAC) || defined(OS_FUCHSIA)
|
||||
bool IsDownloadPdf() const;
|
||||
bool CanOpenPdfInSystemViewer() const;
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- chrome/browser/download/download_item_model.cc.orig 2021-07-19 18:45:08 UTC
|
||||
--- chrome/browser/download/download_item_model.cc.orig 2021-09-24 04:25:58 UTC
|
||||
+++ chrome/browser/download/download_item_model.cc
|
||||
@@ -579,7 +579,7 @@ bool DownloadItemModel::IsCommandChecked(
|
||||
@@ -625,7 +625,7 @@ bool DownloadItemModel::IsCommandChecked(
|
||||
return download_->GetOpenWhenComplete() ||
|
||||
download_crx_util::IsExtensionDownload(*download_);
|
||||
case DownloadCommands::ALWAYS_OPEN_TYPE:
|
||||
@ -9,7 +9,7 @@
|
||||
defined(OS_MAC)
|
||||
if (download_commands->CanOpenPdfInSystemViewer()) {
|
||||
DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile());
|
||||
@@ -620,7 +620,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand
|
||||
@@ -666,7 +666,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand
|
||||
bool is_checked = IsCommandChecked(download_commands,
|
||||
DownloadCommands::ALWAYS_OPEN_TYPE);
|
||||
DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile());
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- chrome/browser/download/download_prefs.cc.orig 2021-07-19 18:45:08 UTC
|
||||
--- chrome/browser/download/download_prefs.cc.orig 2021-09-14 01:51:50 UTC
|
||||
+++ chrome/browser/download/download_prefs.cc
|
||||
@@ -68,7 +68,7 @@ namespace {
|
||||
@@ -70,7 +70,7 @@ namespace {
|
||||
// Consider downloads 'dangerous' if they go to the home directory on Linux and
|
||||
// to the desktop on any platform.
|
||||
bool DownloadPathIsDangerous(const base::FilePath& download_path) {
|
||||
@ -9,7 +9,7 @@
|
||||
base::FilePath home_dir = base::GetHomeDir();
|
||||
if (download_path == home_dir) {
|
||||
return true;
|
||||
@@ -173,7 +173,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi
|
||||
@@ -175,7 +175,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi
|
||||
GetDefaultDownloadDirectoryForProfile()));
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
defined(OS_MAC)
|
||||
should_open_pdf_in_system_reader_ =
|
||||
prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader);
|
||||
@@ -301,7 +301,7 @@ void DownloadPrefs::RegisterProfilePrefs(
|
||||
@@ -294,7 +294,7 @@ void DownloadPrefs::RegisterProfilePrefs(
|
||||
default_download_path);
|
||||
registry->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory,
|
||||
default_download_path);
|
||||
@ -27,7 +27,7 @@
|
||||
defined(OS_MAC)
|
||||
registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false);
|
||||
#endif
|
||||
@@ -438,7 +438,7 @@ bool DownloadPrefs::IsDownloadPathManaged() const {
|
||||
@@ -428,7 +428,7 @@ bool DownloadPrefs::IsDownloadPathManaged() const {
|
||||
}
|
||||
|
||||
bool DownloadPrefs::IsAutoOpenByUserUsed() const {
|
||||
@ -36,7 +36,7 @@
|
||||
defined(OS_MAC)
|
||||
if (ShouldOpenPdfInSystemReader())
|
||||
return true;
|
||||
@@ -453,7 +453,7 @@ bool DownloadPrefs::IsAutoOpenEnabled(const GURL& url,
|
||||
@@ -443,7 +443,7 @@ bool DownloadPrefs::IsAutoOpenEnabled(const GURL& url,
|
||||
return false;
|
||||
DCHECK(extension[0] == base::FilePath::kExtensionSeparator);
|
||||
extension.erase(0, 1);
|
||||
@ -45,7 +45,7 @@
|
||||
defined(OS_MAC)
|
||||
if (base::FilePath::CompareEqualIgnoreCase(extension,
|
||||
FILE_PATH_LITERAL("pdf")) &&
|
||||
@@ -504,7 +504,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens
|
||||
@@ -498,7 +498,7 @@ void DownloadPrefs::DisableAutoOpenByUserBasedOnExtens
|
||||
SaveAutoOpenState();
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
defined(OS_MAC)
|
||||
void DownloadPrefs::SetShouldOpenPdfInSystemReader(bool should_open) {
|
||||
if (should_open_pdf_in_system_reader_ == should_open)
|
||||
@@ -526,7 +526,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons
|
||||
@@ -520,7 +520,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons
|
||||
#endif
|
||||
|
||||
void DownloadPrefs::ResetAutoOpenByUser() {
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- chrome/browser/download/download_shelf_context_menu.cc.orig 2021-05-12 22:05:43 UTC
|
||||
+++ chrome/browser/download/download_shelf_context_menu.cc
|
||||
@@ -148,7 +148,7 @@ std::u16string DownloadShelfContextMenu::GetLabelForCo
|
||||
: IDS_DOWNLOAD_MENU_PLATFORM_OPEN_ALWAYS;
|
||||
break;
|
||||
}
|
||||
-#elif defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
+#elif defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
|
||||
if (can_open_pdf_in_system_viewer) {
|
||||
id = IDS_DOWNLOAD_MENU_PLATFORM_OPEN_ALWAYS;
|
||||
break;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user