- Update to 115.0.5790.110

- Sync patches with upstream
i9-gost changed/i9/chromium-115.0.5790.110-1.el9.inferit
Arkady L. Shane 1 year ago
parent 8c766b32a6
commit 3db21555f8
Signed by: tigro
GPG Key ID: 9C7900103E1C4F8B

@ -1 +1 @@
aabebf64a0ef3c0be84dbcdf83f10591cb34378f SOURCES/chromium-115.0.5790.102.tar.xz
415de87fd1d749ae34d190c736a6db5473dca07c SOURCES/chromium-115.0.5790.110.tar.xz

2
.gitignore vendored

@ -1 +1 @@
SOURCES/chromium-115.0.5790.102.tar.xz
SOURCES/chromium-115.0.5790.110.tar.xz

@ -1,34 +0,0 @@
../../third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc:94:22: error: no matching constructor for initialization of 'SkColor4f' (aka 'SkRGBA4f<kUnpremul_SkAlphaType>')
flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/skia/include/core/SkColor.h:262:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 4 were provided
struct SkRGBA4f {
^
../../third_party/skia/include/core/SkColor.h:262:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 4 were provided
--- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
+++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
@@ -84,6 +84,7 @@ CanvasStyle::CanvasStyle(const CanvasSty
void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags,
float global_alpha) const {
+ SkColor4f clr = { 0.0f, 0.0f, 0.0f, global_alpha };
switch (type_) {
case kColor:
ApplyColorToFlags(flags, global_alpha);
@@ -91,12 +92,12 @@ void CanvasStyle::ApplyToFlags(cc::Paint
case kGradient:
GetCanvasGradient()->GetGradient()->ApplyToFlags(flags, SkMatrix::I(),
ImageDrawOptions());
- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
+ flags.setColor(clr);
break;
case kImagePattern:
GetCanvasPattern()->GetPattern()->ApplyToFlags(
flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform()));
- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
+ flags.setColor(clr);
break;
default:
NOTREACHED();

@ -1,35 +0,0 @@
Add a missing constructor for BrandVersion; otherwise, we get build
errors:
In file included from ../../chrome/test/chromedriver/capabilities.cc:5:
In file included from ../../chrome/test/chromedriver/capabilities.h:10:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/map:60:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tree.h:67:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/ext/alloc_traits.h:34:
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/alloc_traits.h:518:4: error: no matching function for call to 'construct_at'
std::construct_at(__p, std::forward<_Args>(__args)...);
^~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/vector.tcc:117:21: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<BrandVersion>>::construct<BrandVersion, const std::basic_string<char> &, const std::basic_string<char> &>' requested here
_Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
^
../../chrome/test/chromedriver/capabilities.cc:358:16: note: in instantiation of function template specialization 'std::vector<BrandVersion>::emplace_back<const std::basic_string<char> &, const std::basic_string<char> &>' requested here
brands.emplace_back(*brand, *version);
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_construct.h:94:5: note: candidate template ignored: substitution failure [with _Tp = BrandVersion, _Args = <const std::basic_string<char> &, const std::basic_string<char> &>]: no matching constructor for initialization of 'BrandVersion'
construct_at(_Tp* __location, _Args&&... __args)
^
1 error generated.
--- a/chrome/test/chromedriver/chrome/client_hints.h
+++ b/chrome/test/chromedriver/chrome/client_hints.h
@@ -18,6 +18,8 @@ struct BrandVersion {
// * "major version" for "brands",
// * "full version" for "fullVersionList".
std::string version;
+
+ BrandVersion(const std::string& b, const std::string& v) : brand(b), version(v) { }
};
// User-Agent Client Hints

@ -1,36 +0,0 @@
diff -up chromium-108.0.5359.124/net/filter/brotli_source_stream.cc.me chromium-108.0.5359.124/net/filter/brotli_source_stream.cc
--- chromium-108.0.5359.124/net/filter/brotli_source_stream.cc.me 2022-12-30 16:00:58.320318310 +0100
+++ chromium-108.0.5359.124/net/filter/brotli_source_stream.cc 2022-12-30 16:01:24.928581631 +0100
@@ -10,7 +10,7 @@
#include "base/memory/raw_ptr.h"
#include "base/metrics/histogram_macros.h"
#include "net/base/io_buffer.h"
-#include "third_party/brotli/include/brotli/decode.h"
+#include <brotli/decode.h>
namespace net {
diff -up chromium-108.0.5359.124/net/ssl/cert_compression.cc.me chromium-108.0.5359.124/net/ssl/cert_compression.cc
--- chromium-108.0.5359.124/net/ssl/cert_compression.cc.me 2022-12-30 15:57:59.859543993 +0100
+++ chromium-108.0.5359.124/net/ssl/cert_compression.cc 2022-12-30 16:00:48.560221723 +0100
@@ -9,7 +9,7 @@
#include "third_party/boringssl/src/include/openssl/ssl.h"
#if !defined(NET_DISABLE_BROTLI)
-#include "third_party/brotli/include/brotli/decode.h"
+#include <brotli/decode.h>
#endif
namespace net {
diff -up chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc.me chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc
--- chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc.me 2022-12-30 21:12:27.058346797 +0100
+++ chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc 2022-12-30 21:13:58.363183795 +0100
@@ -31,7 +31,7 @@
#include "build/build_config.h"
#include "net/filter/gzip_header.h"
#include "skia/ext/image_operations.h"
-#include "third_party/brotli/include/brotli/decode.h"
+#include <brotli/decode.h>
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/zlib/google/compression_utils.h"

@ -1,545 +0,0 @@
commit 75f4b48eb71d4872ba3ac6c9fc3662a60eb4175d
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Thu Apr 27 02:21:34 2023 +0000
Add QT6 LinuxUi backend
- Enable QT6 by default on KDE6
- If QT6 load fails, fallback to QT5 (and vice versa)
- Add use_qt6 build flag for packager control
- Add --qt-version runtime flag for user control
R=thestig
Change-Id: Ib1d9f6183663ecf7b9ddfe9d7f3e3442e534ccda
Fixed: 1434754
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4475369
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1136295}
diff --git a/chrome/installer/linux/BUILD.gn b/chrome/installer/linux/BUILD.gn
index 5639b9ffc996e..3bacd3398d4a2 100644
--- a/chrome/installer/linux/BUILD.gn
+++ b/chrome/installer/linux/BUILD.gn
@@ -109,6 +109,9 @@ if (use_qt) {
# to prevent a hard dependency on QT for the package.
packaging_files += [ "$root_out_dir/libqt5_shim.so" ]
}
+if (use_qt6) {
+ packaging_files += [ "$root_out_dir/libqt6_shim.so" ]
+}
action_foreach("calculate_deb_dependencies") {
deps = [ ":installer_deps" ]
@@ -249,6 +252,12 @@ if (use_qt) {
deps = [ "//ui/qt:qt5_shim" ]
}
}
+if (use_qt6) {
+ strip_binary("strip_qt6_shim") {
+ binary_input = "$root_out_dir/libqt6_shim.so"
+ deps = [ "//ui/qt:qt6_shim" ]
+ }
+}
# This target builds all "normal" Linux installers. You must set
# is_component_build=false before building this target.
@@ -447,6 +456,12 @@ group("installer_deps") {
"//ui/qt:qt5_shim",
]
}
+ if (use_qt6) {
+ public_deps += [
+ ":strip_qt6_shim",
+ "//ui/qt:qt6_shim",
+ ]
+ }
}
# Creates .deb and .rpm (RPM for non-ChromeOS only) installer packages.
diff --git a/chrome/installer/linux/common/installer.include b/chrome/installer/linux/common/installer.include
index 8d76f1f280b01..439ef5ccb0f52 100644
--- a/chrome/installer/linux/common/installer.include
+++ b/chrome/installer/linux/common/installer.include
@@ -254,6 +254,11 @@ stage_install_common() {
strippedfile="${OUTPUTDIR}/${file}.stripped"
install -m ${SHLIB_PERMS} "${strippedfile}" "${STAGEDIR}/${INSTALLDIR}/${file}"
fi
+ if [ -f "${OUTPUTDIR}/libqt6_shim.so" ]; then
+ file="libqt6_shim.so"
+ strippedfile="${OUTPUTDIR}/${file}.stripped"
+ install -m ${SHLIB_PERMS} "${strippedfile}" "${STAGEDIR}/${INSTALLDIR}/${file}"
+ fi
# libc++
if [ -f "${OUTPUTDIR}/lib/libc++.so" ]; then
diff --git a/ui/qt/BUILD.gn b/ui/qt/BUILD.gn
index bbede00daa4d0..6a67961edc2f7 100644
--- a/ui/qt/BUILD.gn
+++ b/ui/qt/BUILD.gn
@@ -11,13 +11,6 @@ assert(use_qt)
assert(is_linux)
assert(!is_castos)
-pkg_config("qt5_config") {
- packages = [
- "Qt5Core",
- "Qt5Widgets",
- ]
-}
-
config("qt_internal_config") {
if (is_clang) {
# libstdc++ headers are incompatible with -fcomplete-member-pointers.
@@ -56,40 +49,57 @@ if (!use_sysroot) {
}
}
-shared_library("qt5_shim") {
- visibility = [
- ":qt",
- "//chrome/installer/linux:*",
- ]
-
- # Since qt_shim is a shared library even in non-component builds, it shouldn't
- # depend on any other targets since that would duplicate code between binaries
- # leading to increased size and potential issues from duplicated global state.
- no_default_deps = true
- assert_no_deps = [
- "//base",
- "//buildtools/third_party/libc++",
- ]
- deps = [ ":qt_interface" ]
-
- configs -= [ "//build/config/compiler:runtime_library" ]
- configs += [
- ":qt_internal_config",
- ":qt5_config",
- ]
+template("qt_shim") {
+ pkg_config("qt" + invoker.qt_version + "_config") {
+ packages = [
+ "Qt" + invoker.qt_version + "Core",
+ "Qt" + invoker.qt_version + "Widgets",
+ ]
+ }
- public = []
- sources = [
- "qt_shim.cc",
- "qt_shim.h",
- ]
- if (use_sysroot) {
- # This file is generated with gen_qt_shim_moc.sh on an amd64 system to
- # avoid a build-time dependency on `moc` when using the sysroot.
- sources += [ "qt_shim_moc.cc" ]
- } else {
- sources += get_target_outputs(":generate_moc")
- deps += [ ":generate_moc" ]
+ shared_library(target_name) {
+ visibility = [
+ ":qt",
+ "//chrome/installer/linux:*",
+ ]
+
+ # Since qt_shim is a shared library even in non-component builds, it shouldn't
+ # depend on any other targets since that would duplicate code between binaries
+ # leading to increased size and potential issues from duplicated global state.
+ no_default_deps = true
+ assert_no_deps = [
+ "//base",
+ "//buildtools/third_party/libc++",
+ ]
+ deps = [ ":qt_interface" ]
+
+ configs -= [ "//build/config/compiler:runtime_library" ]
+ configs += [
+ ":qt_internal_config",
+ ":qt" + invoker.qt_version + "_config",
+ ]
+
+ public = []
+ sources = [
+ "qt_shim.cc",
+ "qt_shim.h",
+ ]
+ if (use_sysroot) {
+ # This file is generated with gen_qt_shim_moc.sh on an amd64 system to
+ # avoid a build-time dependency on `moc` when using the sysroot.
+ sources += [ "qt" + invoker.qt_version + "_shim_moc.cc" ]
+ } else {
+ sources += get_target_outputs(":generate_moc")
+ deps += [ ":generate_moc" ]
+ }
+ }
+}
+qt_shim("qt5_shim") {
+ qt_version = "5"
+}
+if (use_qt6) {
+ qt_shim("qt6_shim") {
+ qt_version = "6"
}
}
@@ -100,6 +110,9 @@ component("qt") {
# qt_shim is in data_deps since we want to load it manually.
data_deps = [ ":qt5_shim" ]
+ if (use_qt6) {
+ data_deps += [ ":qt6_shim" ]
+ }
deps = [
":qt_interface",
"//base",
diff --git a/ui/qt/gen_qt_shim_moc.sh b/ui/qt/gen_qt_shim_moc.sh
index 74272d5611dab..9d02c2dfcb12f 100755
--- a/ui/qt/gen_qt_shim_moc.sh
+++ b/ui/qt/gen_qt_shim_moc.sh
@@ -6,11 +6,15 @@
set -o nounset
set -o errexit
-URL="http://archive.debian.org/debian/pool/main/q/qtbase-opensource-src"
-PACKAGE="qtbase5-dev-tools_5.3.2+dfsg-4+deb8u2_amd64.deb"
-SHA256="7703754f2c230ce6b8b6030b6c1e7e030899aa9f45a415498df04bd5ec061a76"
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+URL5="http://archive.debian.org/debian/pool/main/q/qtbase-opensource-src"
+PACKAGE5="qtbase5-dev-tools_5.3.2+dfsg-4+deb8u2_amd64.deb"
+SHA256_5="7703754f2c230ce6b8b6030b6c1e7e030899aa9f45a415498df04bd5ec061a76"
+
+URL6="http://archive.ubuntu.com/ubuntu/pool/universe/q/qt6-base"
+PACKAGE6="qt6-base-dev-tools_6.2.4+dfsg-2ubuntu1_amd64.deb"
+SHA256_6="8dddfc79e7743185b07c478ca0f96a4ccc13d48ecccc42f44d2578c33c7d9b8b"
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TMP_DIR=$(mktemp -d -p "$SCRIPT_DIR")
function cleanup {
rm -rf "$TMP_DIR"
@@ -18,16 +22,22 @@ function cleanup {
trap cleanup EXIT
cd "$TMP_DIR"
-wget "$URL/$PACKAGE"
-echo "$SHA256 $PACKAGE" | shasum -a 256 -c
-dpkg -x "$PACKAGE" .
-cat > ../qt_shim_moc.cc <<EOF
-// Copyright 2022 The Chromium Authors
+wget "$URL5/$PACKAGE5"
+echo "$SHA256_5 $PACKAGE5" | shasum -a 256 -c
+dpkg -x "$PACKAGE5" .
+wget "$URL6/$PACKAGE6"
+echo "$SHA256_6 $PACKAGE6" | shasum -a 256 -c
+dpkg -x "$PACKAGE6" .
+cat > ../qt5_shim_moc.cc <<EOF
+// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
EOF
cd "$SCRIPT_DIR/../.."
+cp ui/qt/qt5_shim_moc.cc ui/qt/qt6_shim_moc.cc
"$TMP_DIR/usr/lib/x86_64-linux-gnu/qt5/bin/moc" ui/qt/qt_shim.h \
- >> ui/qt/qt_shim_moc.cc
-git cl format ui/qt/qt_shim_moc.cc
+ >> ui/qt/qt5_shim_moc.cc
+"$TMP_DIR//usr/lib/qt6/libexec/moc" ui/qt/qt_shim.h \
+ >> ui/qt/qt6_shim_moc.cc
+git cl format ui/qt/qt5_shim_moc.cc ui/qt/qt6_shim_moc.cc
diff --git a/ui/qt/qt.gni b/ui/qt/qt.gni
index 27bb6375880b7..f45823270cb91 100644
--- a/ui/qt/qt.gni
+++ b/ui/qt/qt.gni
@@ -4,9 +4,17 @@
import("//build/config/chromecast_build.gni")
import("//build/config/sanitizers/sanitizers.gni")
+import("//build/config/sysroot.gni")
declare_args() {
# TODO(https://crbug.com/1424435): Allow QT in MSAN builds once QT is
# added to the instrumented libraries.
use_qt = is_linux && !is_castos && !is_msan
}
+
+declare_args() {
+ use_qt6 = use_qt && use_sysroot
+}
+
+# use_qt6 => use_qt
+assert(!use_qt6 || use_qt)
diff --git a/ui/qt/qt_shim_moc.cc b/ui/qt/qt5_shim_moc.cc
similarity index 95%
rename from ui/qt/qt_shim_moc.cc
rename to ui/qt/qt5_shim_moc.cc
index dafbfadce56ba..8f8b6b57784a8 100644
--- a/ui/qt/qt_shim_moc.cc
+++ b/ui/qt/qt5_shim_moc.cc
@@ -1,4 +1,4 @@
-// Copyright 2022 The Chromium Authors
+// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -89,26 +89,32 @@ const QMetaObject* qt::QtShim::metaObject() const {
}
void* qt::QtShim::qt_metacast(const char* _clname) {
- if (!_clname)
+ if (!_clname) {
return 0;
- if (!strcmp(_clname, qt_meta_stringdata_qt__QtShim.stringdata))
+ }
+ if (!strcmp(_clname, qt_meta_stringdata_qt__QtShim.stringdata)) {
return static_cast<void*>(const_cast<QtShim*>(this));
- if (!strcmp(_clname, "QtInterface"))
+ }
+ if (!strcmp(_clname, "QtInterface")) {
return static_cast<QtInterface*>(const_cast<QtShim*>(this));
+ }
return QObject::qt_metacast(_clname);
}
int qt::QtShim::qt_metacall(QMetaObject::Call _c, int _id, void** _a) {
_id = QObject::qt_metacall(_c, _id, _a);
- if (_id < 0)
+ if (_id < 0) {
return _id;
+ }
if (_c == QMetaObject::InvokeMetaMethod) {
- if (_id < 2)
+ if (_id < 2) {
qt_static_metacall(this, _c, _id, _a);
+ }
_id -= 2;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
- if (_id < 2)
+ if (_id < 2) {
*reinterpret_cast<int*>(_a[0]) = -1;
+ }
_id -= 2;
}
return _id;
diff --git a/ui/qt/qt6_shim_moc.cc b/ui/qt/qt6_shim_moc.cc
new file mode 100644
index 0000000000000..6d02ca317b65d
--- /dev/null
+++ b/ui/qt/qt6_shim_moc.cc
@@ -0,0 +1,143 @@
+// Copyright 2023 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/****************************************************************************
+** Meta object code from reading C++ file 'qt_shim.h'
+**
+** Created by: The Qt Meta Object Compiler version 68 (Qt 6.2.4)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#include <QtCore/qbytearray.h>
+#include <QtCore/qmetatype.h>
+#include <memory>
+#include "ui/qt/qt_shim.h"
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#error "The header file 'qt_shim.h' doesn't include <QObject>."
+#elif Q_MOC_OUTPUT_REVISION != 68
+#error "This file was generated using the moc from 6.2.4. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+QT_BEGIN_MOC_NAMESPACE
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+struct qt_meta_stringdata_qt__QtShim_t {
+ const uint offsetsAndSize[12];
+ char stringdata0[52];
+};
+#define QT_MOC_LITERAL(ofs, len) \
+ uint(offsetof(qt_meta_stringdata_qt__QtShim_t, stringdata0) + ofs), len
+static const qt_meta_stringdata_qt__QtShim_t qt_meta_stringdata_qt__QtShim = {
+ {
+ QT_MOC_LITERAL(0, 10), // "qt::QtShim"
+ QT_MOC_LITERAL(11, 11), // "FontChanged"
+ QT_MOC_LITERAL(23, 0), // ""
+ QT_MOC_LITERAL(24, 4), // "font"
+ QT_MOC_LITERAL(29, 14), // "PaletteChanged"
+ QT_MOC_LITERAL(44, 7) // "palette"
+
+ },
+ "qt::QtShim\0FontChanged\0\0font\0"
+ "PaletteChanged\0palette"};
+#undef QT_MOC_LITERAL
+
+static const uint qt_meta_data_qt__QtShim[] = {
+
+ // content:
+ 10, // revision
+ 0, // classname
+ 0, 0, // classinfo
+ 2, 14, // methods
+ 0, 0, // properties
+ 0, 0, // enums/sets
+ 0, 0, // constructors
+ 0, // flags
+ 0, // signalCount
+
+ // slots: name, argc, parameters, tag, flags, initial metatype offsets
+ 1, 1, 26, 2, 0x08, 1 /* Private */, 4, 1, 29, 2, 0x08, 3 /* Private */,
+
+ // slots: parameters
+ QMetaType::Void, QMetaType::QFont, 3, QMetaType::Void, QMetaType::QPalette,
+ 5,
+
+ 0 // eod
+};
+
+void qt::QtShim::qt_static_metacall(QObject* _o,
+ QMetaObject::Call _c,
+ int _id,
+ void** _a) {
+ if (_c == QMetaObject::InvokeMetaMethod) {
+ auto* _t = static_cast<QtShim*>(_o);
+ (void)_t;
+ switch (_id) {
+ case 0:
+ _t->FontChanged((*reinterpret_cast<std::add_pointer_t<QFont>>(_a[1])));
+ break;
+ case 1:
+ _t->PaletteChanged(
+ (*reinterpret_cast<std::add_pointer_t<QPalette>>(_a[1])));
+ break;
+ default:;
+ }
+ }
+}
+
+const QMetaObject qt::QtShim::staticMetaObject = {
+ {QMetaObject::SuperData::link<QObject::staticMetaObject>(),
+ qt_meta_stringdata_qt__QtShim.offsetsAndSize, qt_meta_data_qt__QtShim,
+ qt_static_metacall, nullptr,
+ qt_incomplete_metaTypeArray<
+ qt_meta_stringdata_qt__QtShim_t,
+ QtPrivate::TypeAndForceComplete<QtShim, std::true_type>,
+ QtPrivate::TypeAndForceComplete<void, std::false_type>,
+ QtPrivate::TypeAndForceComplete<const QFont&, std::false_type>,
+ QtPrivate::TypeAndForceComplete<void, std::false_type>,
+ QtPrivate::TypeAndForceComplete<const QPalette&, std::false_type>
+
+ >,
+ nullptr}};
+
+const QMetaObject* qt::QtShim::metaObject() const {
+ return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject()
+ : &staticMetaObject;
+}
+
+void* qt::QtShim::qt_metacast(const char* _clname) {
+ if (!_clname) {
+ return nullptr;
+ }
+ if (!strcmp(_clname, qt_meta_stringdata_qt__QtShim.stringdata0)) {
+ return static_cast<void*>(this);
+ }
+ if (!strcmp(_clname, "QtInterface")) {
+ return static_cast<QtInterface*>(this);
+ }
+ return QObject::qt_metacast(_clname);
+}
+
+int qt::QtShim::qt_metacall(QMetaObject::Call _c, int _id, void** _a) {
+ _id = QObject::qt_metacall(_c, _id, _a);
+ if (_id < 0) {
+ return _id;
+ }
+ if (_c == QMetaObject::InvokeMetaMethod) {
+ if (_id < 2) {
+ qt_static_metacall(this, _c, _id, _a);
+ }
+ _id -= 2;
+ } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
+ if (_id < 2) {
+ *reinterpret_cast<QMetaType*>(_a[0]) = QMetaType();
+ }
+ _id -= 2;
+ }
+ return _id;
+}
+QT_WARNING_POP
+QT_END_MOC_NAMESPACE
diff --git a/ui/qt/qt_ui.cc b/ui/qt/qt_ui.cc
index d4052b7e8bc3d..6a3b58e9f930b 100644
--- a/ui/qt/qt_ui.cc
+++ b/ui/qt/qt_ui.cc
@@ -14,7 +14,9 @@
#include "base/check.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
+#include "base/environment.h"
#include "base/memory/raw_ptr.h"
+#include "base/nix/xdg_util.h"
#include "base/notreached.h"
#include "base/path_service.h"
#include "base/time/time.h"
@@ -47,6 +49,45 @@ namespace qt {
namespace {
+const char kQtVersionFlag[] = "qt-version";
+
+void* LoadLibrary(const base::FilePath& path) {
+ return dlopen(path.value().c_str(), RTLD_NOW | RTLD_GLOBAL);
+}
+
+void* LoadLibraryOrFallback(const base::FilePath& path,
+ const char* preferred,
+ const char* fallback) {
+ if (void* library = LoadLibrary(path.Append(preferred))) {
+ return library;
+ }
+ return LoadLibrary(path.Append(fallback));
+}
+
+bool PreferQt6() {
+ auto* cmd = base::CommandLine::ForCurrentProcess();
+ if (cmd->HasSwitch(kQtVersionFlag)) {
+ std::string qt_version_string = cmd->GetSwitchValueASCII(kQtVersionFlag);
+ unsigned int qt_version = 0;
+ if (base::StringToUint(qt_version_string, &qt_version)) {
+ switch (qt_version) {
+ case 5:
+ return false;
+ case 6:
+ return true;
+ default:
+ LOG(ERROR) << "Unsupported QT version " << qt_version;
+ }
+ } else {
+ LOG(ERROR) << "Unable to parse QT version " << qt_version_string;
+ }
+ }
+
+ auto env = base::Environment::Create();
+ auto desktop = base::nix::GetDesktopEnvironment(env.get());
+ return desktop == base::nix::DESKTOP_ENVIRONMENT_KDE6;
+}
+
int QtWeightToCssWeight(int weight) {
struct {
int qt_weight;
@@ -179,8 +220,10 @@ bool QtUi::Initialize() {
base::FilePath path;
if (!base::PathService::Get(base::DIR_MODULE, &path))
return false;
- path = path.Append("libqt5_shim.so");
- void* libqt_shim = dlopen(path.value().c_str(), RTLD_NOW | RTLD_GLOBAL);
+ void* libqt_shim =
+ PreferQt6()
+ ? LoadLibraryOrFallback(path, "libqt6_shim.so", "libqt5_shim.so")
+ : LoadLibraryOrFallback(path, "libqt5_shim.so", "libqt6_shim.so");
if (!libqt_shim)
return false;
void* create_qt_interface = dlsym(libqt_shim, "CreateQtInterface");

@ -1,21 +0,0 @@
diff -up chromium-114.0.5735.26/components/omnibox/browser/omnibox_edit_model.cc.me chromium-114.0.5735.26/components/omnibox/browser/omnibox_edit_model.cc
--- chromium-114.0.5735.26/components/omnibox/browser/omnibox_edit_model.cc.me 2023-05-14 09:14:10.886314480 +0200
+++ chromium-114.0.5735.26/components/omnibox/browser/omnibox_edit_model.cc 2023-05-14 09:16:59.380054720 +0200
@@ -79,7 +79,7 @@
#include "ui/gfx/vector_icon_types.h"
#endif
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+#ifdef GOOGLE_CHROME_BRANDING
#include "components/vector_icons/vector_icons.h" // nogncheck
#endif
@@ -628,7 +628,7 @@ bool OmniboxEditModel::ShouldShowCurrent
}
ui::ImageModel OmniboxEditModel::GetSuperGIcon(int image_size, bool dark_mode) {
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+#ifdef GOOGLE_CHROME_BRANDING
if (dark_mode) {
return ui::ImageModel::FromVectorIcon(
vector_icons::kGoogleGLogoMonochromeIcon, ui::kColorRefPrimary100,

@ -1,62 +0,0 @@
diff -up chromium-114.0.5735.26/components/version_info/version_info.cc.constexpr-el7 chromium-114.0.5735.26/components/version_info/version_info.cc
diff -up chromium-114.0.5735.26/components/version_info/version_info.h.constexpr-el7 chromium-114.0.5735.26/components/version_info/version_info.h
--- chromium-114.0.5735.26/components/version_info/version_info.h.constexpr-el7 2023-05-11 03:36:19.000000000 +0200
+++ chromium-114.0.5735.26/components/version_info/version_info.h 2023-05-14 10:59:19.921578645 +0200
@@ -27,18 +27,18 @@ const std::string GetProductNameAndVersi
const std::string& build_version);
// Returns the product name, e.g. "Chromium" or "Google Chrome".
-constexpr std::string GetProductName() {
+static const std::string GetProductName() {
return PRODUCT_NAME;
}
// Returns the version number, e.g. "6.0.490.1".
-constexpr std::string GetVersionNumber() {
+static const std::string GetVersionNumber() {
return PRODUCT_VERSION;
}
// Returns the product name and version information for the User-Agent header,
// in the format: Chrome/<major_version>.<minor_version>.<build>.<patch>.
-constexpr std::string GetProductNameAndVersionForUserAgent() {
+static const std::string GetProductNameAndVersionForUserAgent() {
return "Chrome/" + GetVersionNumber();
}
@@ -53,7 +53,7 @@ std::string GetMajorVersionNumber();
const base::Version& GetVersion();
// Returns a version control specific identifier of this release.
-constexpr std::string GetLastChange() {
+static const std::string GetLastChange() {
return LAST_CHANGE;
}
@@ -65,7 +65,7 @@ constexpr bool IsOfficialBuild() {
}
// Returns the OS type, e.g. "Windows", "Linux", "FreeBSD", ...
-constexpr std::string GetOSType() {
+static const std::string GetOSType() {
#if BUILDFLAG(IS_WIN)
return "Windows";
#elif BUILDFLAG(IS_IOS)
@@ -97,7 +97,7 @@ constexpr std::string GetOSType() {
// Returns a string equivalent of |channel|, independent of whether the build
// is branded or not and without any additional modifiers.
-constexpr std::string GetChannelString(Channel channel) {
+static const std::string GetChannelString(Channel channel) {
switch (channel) {
case Channel::STABLE:
return "stable";
@@ -114,7 +114,7 @@ constexpr std::string GetChannelString(C
}
// Returns a list of sanitizers enabled in this build.
-constexpr std::string GetSanitizerList() {
+static const std::string GetSanitizerList() {
return ""
#if defined(ADDRESS_SANITIZER)
"address "

@ -1,105 +0,0 @@
diff -up chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
--- chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar 2023-05-18 00:37:47.000000000 +0200
+++ chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc 2023-05-21 18:12:30.368425080 +0200
@@ -77,8 +77,6 @@ void FileAnalyzer::Start(const base::Fil
if (inspection_type == DownloadFileType::ZIP) {
StartExtractZipFeatures();
- } else if (inspection_type == DownloadFileType::RAR) {
- StartExtractRarFeatures();
#if BUILDFLAG(IS_MAC)
} else if (inspection_type == DownloadFileType::DMG) {
StartExtractDmgFeatures();
diff -up chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc
--- chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc.nounrar 2023-05-18 00:37:48.000000000 +0200
+++ chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc 2023-05-21 18:11:14.870058635 +0200
@@ -8,7 +8,6 @@
#include "build/build_config.h"
#include "build/buildflag.h"
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
-#include "chrome/common/safe_browsing/rar_analyzer.h"
#include "chrome/common/safe_browsing/seven_zip_analyzer.h"
#include "chrome/common/safe_browsing/zip_analyzer.h"
#include "components/safe_browsing/content/common/proto/download_file_types.pb.h"
@@ -23,9 +22,7 @@ namespace safe_browsing {
// static
std::unique_ptr<ArchiveAnalyzer> ArchiveAnalyzer::CreateForArchiveType(
DownloadFileType_InspectionType file_type) {
- if (file_type == DownloadFileType::RAR) {
- return std::make_unique<RarAnalyzer>();
- } else if (file_type == DownloadFileType::ZIP) {
+ if (file_type == DownloadFileType::ZIP) {
return std::make_unique<ZipAnalyzer>();
} else if (file_type == DownloadFileType::SEVEN_ZIP) {
return std::make_unique<SevenZipAnalyzer>();
diff -up chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn
--- chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn.nounrar 2023-05-18 00:37:48.000000000 +0200
+++ chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn 2023-05-21 18:11:14.869058617 +0200
@@ -145,8 +145,6 @@ source_set("safe_browsing") {
"protobuf_message_log_macros.h",
"protobuf_message_read_macros.h",
"protobuf_message_write_macros.h",
- "rar_analyzer.cc",
- "rar_analyzer.h",
"seven_zip_analyzer.cc",
"seven_zip_analyzer.h",
"zip_analyzer.cc",
@@ -162,7 +160,6 @@ source_set("safe_browsing") {
"//components/safe_browsing/content/common:file_type_policies",
"//components/safe_browsing/core/common",
"//third_party/lzma_sdk/google:seven_zip_reader",
- "//third_party/unrar:unrar",
]
if (is_linux) {
diff -up chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc
--- chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc.nounrar 2023-05-18 00:37:48.000000000 +0200
+++ chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc 2023-05-21 18:11:14.869058617 +0200
@@ -18,7 +18,6 @@
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
-#include "chrome/common/safe_browsing/rar_analyzer.h"
#include "components/safe_browsing/content/common/file_type_policies.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/safe_browsing/core/common/proto/csd.pb.h"
diff -up chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc
--- chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2023-05-18 00:37:48.000000000 +0200
+++ chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc 2023-05-21 18:11:14.870058635 +0200
@@ -71,6 +71,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
base::File rar_file,
mojo::PendingRemote<chrome::mojom::TemporaryFileGetter> temp_file_getter,
AnalyzeRarFileCallback callback) {
+#if 0
DCHECK(rar_file.IsValid());
temp_file_getter_.Bind(std::move(temp_file_getter));
callback_ = std::move(callback);
@@ -86,6 +87,9 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
rar_analyzer_.Analyze(std::move(rar_file), base::FilePath(),
std::move(analysis_finished_callback),
std::move(temp_file_getter_callback), &results_);
+#else
+ NOTREACHED();
+#endif
}
void SafeArchiveAnalyzer::AnalyzeSevenZipFile(
diff -up chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h.nounrar chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h
--- chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h.nounrar 2023-05-18 00:37:48.000000000 +0200
+++ chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h 2023-05-21 18:11:14.870058635 +0200
@@ -6,7 +6,6 @@
#define CHROME_SERVICES_FILE_UTIL_SAFE_ARCHIVE_ANALYZER_H_
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
-#include "chrome/common/safe_browsing/rar_analyzer.h"
#include "chrome/common/safe_browsing/seven_zip_analyzer.h"
#include "chrome/common/safe_browsing/zip_analyzer.h"
#include "chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom.h"
@@ -63,7 +62,6 @@ class SafeArchiveAnalyzer : public chrom
void Timeout();
safe_browsing::ZipAnalyzer zip_analyzer_;
- safe_browsing::RarAnalyzer rar_analyzer_;
safe_browsing::SevenZipAnalyzer seven_zip_analyzer_;
#if BUILDFLAG(IS_MAC)
safe_browsing::dmg::DMGAnalyzer dmg_analyzer_;

@ -0,0 +1,226 @@
commit 73e9d865abd6b636280c4bb45720af2ff2c1e374
Author: Monica Basta <msalama@chromium.org>
Date: Fri Jun 2 13:25:42 2023 +0000
[BSC]: Add BoundSessionRefreshCookieFetcher::Result
Bug: b/273920907
Change-Id: I6508dcb79592420bfa3ebe3aac872c097a303a02
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4574672
Commit-Queue: Monica Basta <msalama@chromium.org>
Reviewed-by: Alex Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152484}
diff --git a/chrome/browser/signin/bound_session_credentials/bound_session_cookie_controller_impl.cc b/chrome/browser/signin/bound_session_credentials/bound_session_cookie_controller_impl.cc
index 4e7e0b092a568..1c8c0110e3516 100644
--- a/chrome/browser/signin/bound_session_credentials/bound_session_cookie_controller_impl.cc
+++ b/chrome/browser/signin/bound_session_credentials/bound_session_cookie_controller_impl.cc
@@ -93,7 +93,7 @@ void BoundSessionCookieControllerImpl::MaybeRefreshCookie() {
void BoundSessionCookieControllerImpl::OnCookieRefreshFetched(
BoundSessionRefreshCookieFetcher::Result result) {
refresh_cookie_fetcher_.reset();
- if (result.net_error == net::OK && result.response_code == net::HTTP_OK) {
+ if (result == BoundSessionRefreshCookieFetcher::Result::kSuccess) {
// Requests are resumed once the cookie is set in the cookie jar. The
// cookie is expected to be fresh and `this` is notified with its
// expiration date before `OnCookieRefreshFetched` is called.
diff --git a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher.h b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher.h
index db62988635a26..f7a8b3693346f 100644
--- a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher.h
+++ b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher.h
@@ -14,10 +14,13 @@
// created per request.
class BoundSessionRefreshCookieFetcher {
public:
- struct Result {
- net::Error net_error;
- absl::optional<int> response_code;
+ enum class Result {
+ kSuccess = 0,
+ kConnectionError = 1,
+ kServerTransientError = 2,
+ kServerPersistentError = 3,
};
+
// Reports the result of the fetch request.
using RefreshCookieCompleteCallback = base::OnceCallback<void(Result)>;
diff --git a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.cc b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.cc
index 46be6f06b147a..a6f038b158311 100644
--- a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.cc
+++ b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.cc
@@ -8,6 +8,7 @@
#include "components/signin/public/base/signin_client.h"
#include "google_apis/gaia/gaia_urls.h"
+#include "net/http/http_status_code.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
@@ -102,7 +103,36 @@ void BoundSessionRefreshCookieFetcherImpl::OnURLLoaderComplete(
scoped_refptr<net::HttpResponseHeaders> headers) {
net::Error net_error = static_cast<net::Error>(url_loader_->NetError());
- std::move(callback_).Run(
- Result(net_error, headers ? absl::optional<int>(headers->response_code())
- : absl::nullopt));
+ Result result = GetResultFromNetErrorAndHttpStatusCode(
+ net_error,
+ headers ? absl::optional<int>(headers->response_code()) : absl::nullopt);
+ std::move(callback_).Run(result);
+}
+
+BoundSessionRefreshCookieFetcher::Result
+BoundSessionRefreshCookieFetcherImpl::GetResultFromNetErrorAndHttpStatusCode(
+ net::Error net_error,
+ absl::optional<int> response_code) {
+ if ((net_error != net::OK &&
+ net_error != net::ERR_HTTP_RESPONSE_CODE_FAILURE) ||
+ !response_code) {
+ return BoundSessionRefreshCookieFetcher::Result::kConnectionError;
+ }
+
+ if (response_code == net::HTTP_OK) {
+ return BoundSessionRefreshCookieFetcher::Result::kSuccess;
+ }
+
+ if (response_code >= net::HTTP_INTERNAL_SERVER_ERROR) {
+ // Server error 5xx.
+ return BoundSessionRefreshCookieFetcher::Result::kServerTransientError;
+ }
+
+ if (response_code >= net::HTTP_BAD_REQUEST) {
+ // Server error 4xx.
+ return BoundSessionRefreshCookieFetcher::Result::kServerPersistentError;
+ }
+
+ // Unexpected response code.
+ return BoundSessionRefreshCookieFetcher::Result::kServerPersistentError;
}
diff --git a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.h b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.h
index 733ffbaae088c..52943f0194c32 100644
--- a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.h
+++ b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.h
@@ -31,8 +31,14 @@ class BoundSessionRefreshCookieFetcherImpl
void Start(RefreshCookieCompleteCallback callback) override;
private:
+ FRIEND_TEST_ALL_PREFIXES(BoundSessionRefreshCookieFetcherImplTest,
+ GetResultFromNetErrorAndHttpStatusCode);
+
void StartRefreshRequest();
void OnURLLoaderComplete(scoped_refptr<net::HttpResponseHeaders> headers);
+ Result GetResultFromNetErrorAndHttpStatusCode(
+ net::Error net_error,
+ absl::optional<int> response_code);
const raw_ptr<SigninClient> client_;
const scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_;
diff --git a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl_unittest.cc b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl_unittest.cc
index d018592022d55..36ae64f83e4ee 100644
--- a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl_unittest.cc
+++ b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl_unittest.cc
@@ -19,8 +19,6 @@
#include "services/network/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace {
-
class BoundSessionRefreshCookieFetcherImplTest : public ::testing::Test {
public:
BoundSessionRefreshCookieFetcherImplTest() {
@@ -55,8 +53,7 @@ TEST_F(BoundSessionRefreshCookieFetcherImplTest, Success) {
pending_request->request.url.spec(), "");
EXPECT_TRUE(future.Wait());
BoundSessionRefreshCookieFetcher::Result result = future.Get();
- EXPECT_EQ(result.net_error, net::OK);
- EXPECT_EQ(result.response_code, net::HTTP_OK);
+ EXPECT_EQ(result, BoundSessionRefreshCookieFetcher::Result::kSuccess);
}
TEST_F(BoundSessionRefreshCookieFetcherImplTest, FailureNetError) {
@@ -75,8 +72,7 @@ TEST_F(BoundSessionRefreshCookieFetcherImplTest, FailureNetError) {
EXPECT_TRUE(future.Wait());
BoundSessionRefreshCookieFetcher::Result result = future.Get();
- EXPECT_EQ(result.net_error, status.error_code);
- EXPECT_FALSE(result.response_code.has_value());
+ EXPECT_EQ(result, BoundSessionRefreshCookieFetcher::Result::kConnectionError);
}
TEST_F(BoundSessionRefreshCookieFetcherImplTest, FailureHttpError) {
@@ -93,8 +89,38 @@ TEST_F(BoundSessionRefreshCookieFetcherImplTest, FailureHttpError) {
EXPECT_TRUE(future.Wait());
BoundSessionRefreshCookieFetcher::Result result = future.Get();
- EXPECT_EQ(result.net_error, net::ERR_HTTP_RESPONSE_CODE_FAILURE);
- EXPECT_EQ(result.response_code, net::HTTP_UNAUTHORIZED);
+ EXPECT_EQ(result,
+ BoundSessionRefreshCookieFetcher::Result::kServerPersistentError);
+}
+
+TEST_F(BoundSessionRefreshCookieFetcherImplTest,
+ GetResultFromNetErrorAndHttpStatusCode) {
+ // Connection error.
+ EXPECT_EQ(fetcher_->GetResultFromNetErrorAndHttpStatusCode(
+ net::ERR_CONNECTION_TIMED_OUT, absl::nullopt),
+ BoundSessionRefreshCookieFetcher::Result::kConnectionError);
+ // net::OK.
+ EXPECT_EQ(
+ fetcher_->GetResultFromNetErrorAndHttpStatusCode(net::OK, net::HTTP_OK),
+ BoundSessionRefreshCookieFetcher::Result::kSuccess);
+ // net::ERR_HTTP_RESPONSE_CODE_FAILURE
+ EXPECT_EQ(fetcher_->GetResultFromNetErrorAndHttpStatusCode(
+ net::ERR_HTTP_RESPONSE_CODE_FAILURE, net::HTTP_BAD_REQUEST),
+ BoundSessionRefreshCookieFetcher::Result::kServerPersistentError);
+ // Persistent error.
+ EXPECT_EQ(fetcher_->GetResultFromNetErrorAndHttpStatusCode(
+ net::OK, net::HTTP_BAD_REQUEST),
+ BoundSessionRefreshCookieFetcher::Result::kServerPersistentError);
+ EXPECT_EQ(fetcher_->GetResultFromNetErrorAndHttpStatusCode(
+ net::OK, net::HTTP_NOT_FOUND),
+ BoundSessionRefreshCookieFetcher::Result::kServerPersistentError);
+ // Transient error.
+ EXPECT_EQ(fetcher_->GetResultFromNetErrorAndHttpStatusCode(
+ net::OK, net::HTTP_INTERNAL_SERVER_ERROR),
+ BoundSessionRefreshCookieFetcher::Result::kServerTransientError);
+ EXPECT_EQ(fetcher_->GetResultFromNetErrorAndHttpStatusCode(
+ net::OK, net::HTTP_GATEWAY_TIMEOUT),
+ BoundSessionRefreshCookieFetcher::Result::kServerTransientError);
}
TEST_F(BoundSessionRefreshCookieFetcherImplTest, NetworkDelayed) {
@@ -114,5 +140,3 @@ TEST_F(BoundSessionRefreshCookieFetcherImplTest, NetworkDelayed) {
EXPECT_TRUE(future.Wait());
}
-
-} // namespace
diff --git a/chrome/browser/signin/bound_session_credentials/fake_bound_session_refresh_cookie_fetcher.cc b/chrome/browser/signin/bound_session_credentials/fake_bound_session_refresh_cookie_fetcher.cc
index b4b1a07e687cb..fcfa9305d04e9 100644
--- a/chrome/browser/signin/bound_session_credentials/fake_bound_session_refresh_cookie_fetcher.cc
+++ b/chrome/browser/signin/bound_session_credentials/fake_bound_session_refresh_cookie_fetcher.cc
@@ -51,7 +51,8 @@ void FakeBoundSessionRefreshCookieFetcher::SimulateCompleteRefreshRequest(
// Synchronous since tests use `BoundSessionTestCookieManager`.
OnRefreshCookieCompleted(CreateFakeCookie(cookie_expiration.value()));
} else {
- std::move(callback_).Run(Result(net::Error::OK, net::HTTP_FORBIDDEN));
+ std::move(callback_).Run(
+ BoundSessionRefreshCookieFetcher::Result::kServerPersistentError);
}
}
@@ -83,9 +84,11 @@ void FakeBoundSessionRefreshCookieFetcher::OnCookieSet(
net::CookieAccessResult access_result) {
bool success = access_result.status.IsInclude();
if (!success) {
- std::move(callback_).Run(Result(net::Error::OK, net::HTTP_FORBIDDEN));
+ std::move(callback_).Run(
+ BoundSessionRefreshCookieFetcher::Result::kServerPersistentError);
} else {
- std::move(callback_).Run(Result(net::Error::OK, net::HTTP_OK));
+ std::move(callback_).Run(
+ BoundSessionRefreshCookieFetcher::Result::kSuccess);
}
// |This| may be destroyed
}

@ -0,0 +1,21 @@
diff -up chromium-115.0.5790.24/components/omnibox/browser/omnibox_edit_model.cc.buildflag-el7 chromium-115.0.5790.24/components/omnibox/browser/omnibox_edit_model.cc
--- chromium-115.0.5790.24/components/omnibox/browser/omnibox_edit_model.cc.buildflag-el7 2023-06-07 21:48:29.000000000 +0200
+++ chromium-115.0.5790.24/components/omnibox/browser/omnibox_edit_model.cc 2023-06-17 16:50:46.373867625 +0200
@@ -79,7 +79,7 @@
#include "ui/gfx/vector_icon_types.h"
#endif
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+#ifdef GOOGLE_CHROME_BRANDING
#include "components/vector_icons/vector_icons.h" // nogncheck
#endif
@@ -631,7 +631,7 @@ bool OmniboxEditModel::ShouldShowCurrent
ui::ImageModel OmniboxEditModel::GetSuperGIcon(int image_size,
bool dark_mode) const {
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+#ifdef GOOGLE_CHROME_BRANDING
if (dark_mode) {
return ui::ImageModel::FromVectorIcon(
vector_icons::kGoogleGLogoMonochromeIcon, ui::kColorRefPrimary100,

@ -0,0 +1,57 @@
diff -up chromium-115.0.5790.98/sql/recover_module/cursor.h.me chromium-115.0.5790.98/sql/recover_module/cursor.h
--- chromium-115.0.5790.98/sql/recover_module/cursor.h.me 2023-07-21 20:13:43.587451992 +0200
+++ chromium-115.0.5790.98/sql/recover_module/cursor.h 2023-07-21 20:16:24.989457148 +0200
@@ -61,6 +61,10 @@ class VirtualCursor {
// The VirtualCursor instance that embeds a given SQLite virtual table cursor.
//
// |sqlite_cursor| must have been returned by VirtualTable::SqliteCursor().
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Winvalid-offsetof"
+#endif
static inline VirtualCursor* FromSqliteCursor(
sqlite3_vtab_cursor* sqlite_cursor) {
VirtualCursor* result = reinterpret_cast<VirtualCursor*>(
@@ -69,6 +73,9 @@ class VirtualCursor {
CHECK_EQ(sqlite_cursor, &result->sqlite_cursor_);
return result;
}
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
// Seeks the cursor to the first readable row. Returns a SQLite status code.
int First();
diff -up chromium-115.0.5790.98/third_party/angle/src/libANGLE/BlobCache.cpp.me chromium-115.0.5790.98/third_party/angle/src/libANGLE/BlobCache.cpp
--- chromium-115.0.5790.98/third_party/angle/src/libANGLE/BlobCache.cpp.me 2023-07-21 20:10:05.119385885 +0200
+++ chromium-115.0.5790.98/third_party/angle/src/libANGLE/BlobCache.cpp 2023-07-21 20:10:14.386558331 +0200
@@ -14,7 +14,6 @@
#include "libANGLE/histogram_macros.h"
#include "platform/PlatformMethods.h"
-#define USE_SYSTEM_ZLIB
#include "compression_utils_portable.h"
namespace egl
diff -up chromium-115.0.5790.98/third_party/angle/src/libANGLE/MemoryProgramCache.cpp.me chromium-115.0.5790.98/third_party/angle/src/libANGLE/MemoryProgramCache.cpp
--- chromium-115.0.5790.98/third_party/angle/src/libANGLE/MemoryProgramCache.cpp.me 2023-07-21 20:10:36.864976619 +0200
+++ chromium-115.0.5790.98/third_party/angle/src/libANGLE/MemoryProgramCache.cpp 2023-07-21 20:11:07.629549228 +0200
@@ -8,7 +8,6 @@
// layer to warm up the cache from disk.
// Include zlib first, otherwise FAR gets defined elsewhere.
-#define USE_SYSTEM_ZLIB
#include "compression_utils_portable.h"
#include "libANGLE/MemoryProgramCache.h"
diff -up chromium-115.0.5790.98/third_party/angle/src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.cpp.me chromium-115.0.5790.98/third_party/angle/src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.cpp
--- chromium-115.0.5790.98/third_party/angle/src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.cpp.me 2023-07-21 20:09:44.206996746 +0200
+++ chromium-115.0.5790.98/third_party/angle/src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.cpp 2023-07-21 20:09:51.834138674 +0200
@@ -10,7 +10,6 @@
#include "libANGLE/renderer/vulkan/vk_internal_shaders_autogen.h"
-#define USE_SYSTEM_ZLIB
#include "compression_utils_portable.h"
namespace rx

@ -0,0 +1,26 @@
diff -up chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
--- chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me 2023-06-24 10:38:11.011511463 +0200
+++ chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc 2023-06-24 13:07:35.865375884 +0200
@@ -84,6 +84,7 @@ CanvasStyle::CanvasStyle(const CanvasSty
void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags,
float global_alpha) const {
+ SkColor4f custom_color = SkColor4f{0.0f, 0.0f, 0.0f, global_alpha};
switch (type_) {
case kColor:
ApplyColorToFlags(flags, global_alpha);
@@ -91,12 +92,12 @@ void CanvasStyle::ApplyToFlags(cc::Paint
case kGradient:
GetCanvasGradient()->GetGradient()->ApplyToFlags(flags, SkMatrix::I(),
ImageDrawOptions());
- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
+ flags.setColor(custom_color);
break;
case kImagePattern:
GetCanvasPattern()->GetPattern()->ApplyToFlags(
flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform()));
- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
+ flags.setColor(custom_color);
break;
default:
NOTREACHED();

@ -0,0 +1,30 @@
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
index bb0122ffd72d4..9262cc744582f 100644
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -807,7 +807,7 @@ BASE_FEATURE(kVaapiVp9kSVCHWEncoding,
"VaapiVp9kSVCHWEncoding",
base::FEATURE_ENABLED_BY_DEFAULT);
#endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
-#if defined(ARCH_CPU_ARM_FAMILY) && BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
// Enables the new V4L2StatefulVideoDecoder instead of V4L2VideoDecoder.
BASE_FEATURE(kV4L2FlatStatelessVideoDecoder,
"V4L2FlatStatelessVideoDecoder",
diff --git a/media/base/media_switches.h b/media/base/media_switches.h
index 97d9602eee49e..aacfac69fae20 100644
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -318,10 +318,10 @@ MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiH264TemporalLayerHWEncoding);
MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp8TemporalLayerHWEncoding);
MEDIA_EXPORT BASE_DECLARE_FEATURE(kVaapiVp9kSVCHWEncoding);
#endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
-#if defined(ARCH_CPU_ARM_FAMILY) && BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatelessVideoDecoder);
MEDIA_EXPORT BASE_DECLARE_FEATURE(kV4L2FlatStatefulVideoDecoder);
-#endif // defined(ARCH_CPU_ARM_FAMILY) && BUILDFLAG(IS_CHROMEOS)
+#endif // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
MEDIA_EXPORT BASE_DECLARE_FEATURE(kVideoBlitColorAccuracy);
#if BUILDFLAG(IS_APPLE)
MEDIA_EXPORT BASE_DECLARE_FEATURE(kVideoToolboxVideoDecoder);

@ -0,0 +1,21 @@
diff -up chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc.me chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc
--- chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc.me 2023-06-25 10:06:58.445990069 +0200
+++ chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc 2023-06-25 10:51:17.640818231 +0200
@@ -355,7 +355,7 @@ Status ParseMobileEmulation(const base::
"'version' field of type string");
}
- brands.emplace_back(*brand, *version);
+ brands.emplace_back() = {*brand, *version};
}
client_hints.brands = std::move(brands);
@@ -392,7 +392,7 @@ Status ParseMobileEmulation(const base::
"a 'version' field of type string");
}
- full_version_list.emplace_back(*brand, *version);
+ full_version_list.emplace_back() = {*brand, *version};
}
client_hints.full_version_list = std::move(full_version_list);

@ -242,17 +242,6 @@ diff -up chromium-109.0.5414.74/components/feature_engagement/internal/never_eve
#include <string>
#include "components/feature_engagement/internal/event_storage_validator.h"
diff -up chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h.me chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h
--- chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h.me 2023-01-19 16:06:17.548272878 +0100
+++ chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h 2023-01-19 16:06:25.685410592 +0100
@@ -14,6 +14,7 @@
#ifndef LLVM_SUPPORT_SIGNALS_H
#define LLVM_SUPPORT_SIGNALS_H
+#include <cstdint>
#include <string>
namespace llvm {
diff -up chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.me chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
--- chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.me 2023-01-19 16:09:29.216477182 +0100
+++ chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc 2023-01-19 16:10:05.657089208 +0100

@ -0,0 +1,12 @@
diff --git a/media/gpu/v4l2/v4l2_stateful_video_decoder.cc b/media/gpu/v4l2/v4l2_stateful_video_decoder.cc
index c84dedb7d1c1f..ca8cd566d2018 100644
--- a/media/gpu/v4l2/v4l2_stateful_video_decoder.cc
+++ b/media/gpu/v4l2/v4l2_stateful_video_decoder.cc
@@ -9,6 +9,7 @@
#include <sys/eventfd.h>
#include <sys/ioctl.h>
+#include "base/containers/contains.h"
#include "base/files/file_util.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ptr_util.h"

@ -0,0 +1,16 @@
diff -up chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc.me chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc
--- chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc.me 2023-06-17 19:43:08.481952671 +0200
+++ chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc 2023-06-17 19:44:26.165349772 +0200
@@ -20,10 +20,8 @@ bool IsOrganicFirstRun() {
base::FilePath InitialPrefsPath() {
// The standard location of the initial prefs is next to the chrome binary.
- base::FilePath dir_exe;
- if (!base::PathService::Get(base::DIR_EXE, &dir_exe)) {
- return base::FilePath();
- }
+ // ...but we patch it to use /etc/chromium
+ base::FilePath dir_exe = base::FilePath("/etc/chromium");
return installer::InitialPreferences::Path(dir_exe);
}

@ -0,0 +1,22 @@
diff -up chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc.me chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc
--- chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc.me 2023-06-18 12:33:52.387412788 +0200
+++ chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc 2023-06-18 12:35:28.229148935 +0200
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "skia/ext/skcolorspace_trfn.h"
+#include <cmath>
namespace skia {
diff -up chromium-115.0.5790.32/net/cert/pki/verify_name_match.h.me chromium-115.0.5790.32/net/cert/pki/verify_name_match.h
--- chromium-115.0.5790.32/net/cert/pki/verify_name_match.h.me 2023-06-18 14:23:13.847725775 +0200
+++ chromium-115.0.5790.32/net/cert/pki/verify_name_match.h 2023-06-18 14:23:41.637221117 +0200
@@ -6,6 +6,7 @@
#define NET_CERT_PKI_VERIFY_NAME_MATCH_H_
#include <string>
+#include <vector>
#include "net/base/net_export.h"

@ -0,0 +1,63 @@
diff -up chromium-115.0.5790.24/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar chromium-115.0.5790.24/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
--- chromium-115.0.5790.24/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar 2023-06-07 21:48:24.000000000 +0200
+++ chromium-115.0.5790.24/chrome/browser/safe_browsing/download_protection/file_analyzer.cc 2023-06-17 14:33:36.906639952 +0200
@@ -77,8 +77,6 @@ void FileAnalyzer::Start(const base::Fil
if (inspection_type == DownloadFileType::ZIP) {
StartExtractZipFeatures();
- } else if (inspection_type == DownloadFileType::RAR) {
- StartExtractRarFeatures();
#if BUILDFLAG(IS_MAC)
} else if (inspection_type == DownloadFileType::DMG) {
StartExtractDmgFeatures();
diff -up chromium-115.0.5790.24/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-115.0.5790.24/chrome/common/safe_browsing/BUILD.gn
--- chromium-115.0.5790.24/chrome/common/safe_browsing/BUILD.gn.nounrar 2023-06-07 21:48:26.000000000 +0200
+++ chromium-115.0.5790.24/chrome/common/safe_browsing/BUILD.gn 2023-06-17 14:33:36.906639952 +0200
@@ -134,7 +134,6 @@ source_set("safe_browsing") {
"//components/safe_browsing/content/common:file_type_policies",
"//components/safe_browsing/core/common",
"//third_party/lzma_sdk/google:seven_zip_reader",
- "//third_party/unrar:unrar",
]
public_deps = [
diff -up chromium-115.0.5790.24/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-115.0.5790.24/chrome/services/file_util/safe_archive_analyzer.cc
--- chromium-115.0.5790.24/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2023-06-07 21:48:26.000000000 +0200
+++ chromium-115.0.5790.24/chrome/services/file_util/safe_archive_analyzer.cc 2023-06-17 14:33:36.906639952 +0200
@@ -69,6 +69,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
base::File rar_file,
mojo::PendingRemote<chrome::mojom::TemporaryFileGetter> temp_file_getter,
AnalyzeRarFileCallback callback) {
+#if 0
DCHECK(rar_file.IsValid());
temp_file_getter_.Bind(std::move(temp_file_getter));
callback_ = std::move(callback);
@@ -84,6 +85,9 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
rar_analyzer_.Analyze(std::move(rar_file), base::FilePath(),
std::move(analysis_finished_callback),
std::move(temp_file_getter_callback), &results_);
+#else
+ NOTREACHED();
+#endif
}
void SafeArchiveAnalyzer::AnalyzeSevenZipFile(
diff -up chromium-115.0.5790.24/chrome/services/file_util/safe_archive_analyzer.h.nounrar chromium-115.0.5790.24/chrome/services/file_util/safe_archive_analyzer.h
--- chromium-115.0.5790.24/chrome/services/file_util/safe_archive_analyzer.h.nounrar 2023-06-07 21:48:26.000000000 +0200
+++ chromium-115.0.5790.24/chrome/services/file_util/safe_archive_analyzer.h 2023-06-17 14:40:20.953942489 +0200
@@ -7,7 +7,6 @@
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
#include "chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom.h"
-#include "chrome/utility/safe_browsing/rar_analyzer.h"
#include "chrome/utility/safe_browsing/seven_zip_analyzer.h"
#include "chrome/utility/safe_browsing/zip_analyzer.h"
#include "mojo/public/cpp/bindings/remote.h"
@@ -63,7 +62,6 @@ class SafeArchiveAnalyzer : public chrom
void Timeout();
safe_browsing::ZipAnalyzer zip_analyzer_;
- safe_browsing::RarAnalyzer rar_analyzer_;
safe_browsing::SevenZipAnalyzer seven_zip_analyzer_;
#if BUILDFLAG(IS_MAC)
safe_browsing::dmg::DMGAnalyzer dmg_analyzer_;

@ -0,0 +1,289 @@
commit b2c4ff8d5d8cdbf2487363a5b8d68b6485706069
Author: Richard Townsend <Richard.Townsend@arm.com>
Date: Thu May 18 22:51:36 2023 +0000
Reland "Reland "mte: refactor the tagging functions to use ifuncs""
This is a reland of commit 2321ea383c006149c3b496a515f54fb3aebdc34c
and a revert of commit adfb1c2c6ceb3daf210cef1e5688541ebc561e20. It
was reverted because of a problem with android-arm64 orderfile
generation, which is now resolved.
Original change's description:
> Reland "mte: refactor the tagging functions to use ifuncs"
>
> This was reverted due to a toolchain problem affecting ThinLTO,
> resolved in [1]
>
> [1] https://reviews.llvm.org/D144982
>
> This reverts commit 6c22e41fc3ffd305359f17b2423c37c2c976acf3.
>
> Bug: 1137393
> Change-Id: I991e12618f98cdf8b89ec83cad06e30ad60d332e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4473870
> Reviewed-by: Keishi Hattori <keishi@chromium.org>
> Commit-Queue: Richard Townsend <richard.townsend@arm.com>
> Cr-Commit-Position: refs/heads/main@{#1135862}
Bug: 1137393, 1440531
Change-Id: I4cd1911a36cf55ee1c06e6ffda971866c93fa741
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4517702
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Reviewed-by: Keishi Hattori <keishi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1146244}
diff --git a/base/allocator/partition_allocator/partition_root.cc b/base/allocator/partition_allocator/partition_root.cc
index 486594e81f823..8ab37f6dec750 100644
--- a/base/allocator/partition_allocator/partition_root.cc
+++ b/base/allocator/partition_allocator/partition_root.cc
@@ -869,10 +869,6 @@ void PartitionRoot<thread_safe>::Init(PartitionOptions opts) {
return;
}
- // Swaps out the active no-op tagging intrinsics with MTE-capable ones, if
- // running on the right hardware.
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
-
#if BUILDFLAG(HAS_64_BIT_POINTERS)
// Reserve address space for partition alloc.
internal::PartitionAddressSpace::Init();
diff --git a/base/allocator/partition_allocator/tagging.cc b/base/allocator/partition_allocator/tagging.cc
index a8a74155de4e1..ea7ac2af82c88 100644
--- a/base/allocator/partition_allocator/tagging.cc
+++ b/base/allocator/partition_allocator/tagging.cc
@@ -12,7 +12,9 @@
#if PA_CONFIG(HAS_MEMORY_TAGGING)
#include <arm_acle.h>
+#include <asm/hwcap.h>
#include <sys/auxv.h>
+#include <sys/ifunc.h>
#include <sys/prctl.h>
#define PR_SET_TAGGED_ADDR_CTRL 55
#define PR_GET_TAGGED_ADDR_CTRL 56
@@ -119,12 +121,6 @@ namespace {
return ret;
}
-#if PA_CONFIG(HAS_MEMORY_TAGGING)
-static bool HasCPUMemoryTaggingExtension() {
- return base::CPU::GetInstanceNoAllocation().has_mte();
-}
-#endif // PA_CONFIG(HAS_MEMORY_TAGGING)
-
#if PA_CONFIG(HAS_MEMORY_TAGGING)
void* TagRegionRandomlyForMTE(void* ptr, size_t sz, uint64_t mask) {
// Randomly tag a region (MTE-enabled systems only). The first 16-byte
@@ -166,7 +162,6 @@ void* RemaskVoidPtrForMTE(void* ptr) {
}
return nullptr;
}
-#endif
void* TagRegionIncrementNoOp(void* ptr, size_t sz) {
// Region parameters are checked even on non-MTE systems to check the
@@ -183,24 +178,49 @@ void* TagRegionRandomlyNoOp(void* ptr, size_t sz, uint64_t mask) {
void* RemaskVoidPtrNoOp(void* ptr) {
return ptr;
}
+#endif
} // namespace
-void InitializeMTESupportIfNeeded() {
#if PA_CONFIG(HAS_MEMORY_TAGGING)
- if (HasCPUMemoryTaggingExtension()) {
- global_remask_void_ptr_fn = RemaskVoidPtrForMTE;
- global_tag_memory_range_increment_fn = TagRegionIncrementForMTE;
- global_tag_memory_range_randomly_fn = TagRegionRandomlyForMTE;
+using RemaskPtrInternalFn = void*(void* ptr);
+using TagMemoryRangeIncrementInternalFn = void*(void* ptr, size_t size);
+
+using TagMemoryRangeRandomlyInternalFn = void*(void* ptr,
+ size_t size,
+ uint64_t mask);
+
+extern "C" TagMemoryRangeIncrementInternalFn(
+ *ResolveTagMemoryRangeIncrement(uint64_t hwcap, struct __ifunc_arg_t* hw)) {
+ if ((hwcap & _IFUNC_ARG_HWCAP) && (hw->_hwcap2 & HWCAP2_MTE)) {
+ return TagRegionIncrementForMTE;
}
-#endif
+ return TagRegionIncrementNoOp;
+}
+
+extern "C" TagMemoryRangeRandomlyInternalFn(
+ *ResolveTagMemoryRandomly(uint64_t hwcap, struct __ifunc_arg_t* hw)) {
+ if ((hwcap & _IFUNC_ARG_HWCAP) && (hw->_hwcap2 & HWCAP2_MTE)) {
+ return TagRegionRandomlyForMTE;
+ }
+ return TagRegionRandomlyNoOp;
+}
+
+extern "C" RemaskPtrInternalFn(
+ *ResolveRemaskPointer(uint64_t hwcap, struct __ifunc_arg_t* hw)) {
+ if ((hwcap & _IFUNC_ARG_HWCAP) && (hw->_hwcap2 & HWCAP2_MTE)) {
+ return RemaskVoidPtrForMTE;
+ }
+ return RemaskVoidPtrNoOp;
}
-RemaskPtrInternalFn* global_remask_void_ptr_fn = RemaskVoidPtrNoOp;
-TagMemoryRangeIncrementInternalFn* global_tag_memory_range_increment_fn =
- TagRegionIncrementNoOp;
-TagMemoryRangeRandomlyInternalFn* global_tag_memory_range_randomly_fn =
- TagRegionRandomlyNoOp;
+void* TagMemoryRangeIncrementInternal(void* ptr, size_t size)
+ __attribute__((ifunc("ResolveTagMemoryRangeIncrement")));
+void* TagMemoryRangeRandomlyInternal(void* ptr, size_t size, uint64_t mask)
+ __attribute__((ifunc("ResolveTagMemoryRandomly")));
+void* RemaskPointerInternal(void* ptr)
+ __attribute__((ifunc("ResolveRemaskPointer")));
+#endif // PA_CONFIG(HAS_MEMORY_TAGGING)
TagViolationReportingMode GetMemoryTaggingModeForCurrentThread() {
#if PA_CONFIG(HAS_MEMORY_TAGGING)
diff --git a/base/allocator/partition_allocator/tagging.h b/base/allocator/partition_allocator/tagging.h
index af914452b1162..d49e062ce6319 100644
--- a/base/allocator/partition_allocator/tagging.h
+++ b/base/allocator/partition_allocator/tagging.h
@@ -55,32 +55,16 @@ void ChangeMemoryTaggingModeForAllThreadsPerProcess(TagViolationReportingMode);
PA_COMPONENT_EXPORT(PARTITION_ALLOC)
TagViolationReportingMode GetMemoryTaggingModeForCurrentThread();
-// Called by the partition allocator after initial startup, this detects MTE
-// support in the current CPU and replaces the active tagging intrinsics with
-// MTE versions if needed.
-PA_COMPONENT_EXPORT(PARTITION_ALLOC) void InitializeMTESupportIfNeeded();
-
-// These global function pointers hold the implementations of the tagging
-// intrinsics (TagMemoryRangeRandomly, TagMemoryRangeIncrement, RemaskPtr).
-// They are designed to be callable without taking a branch. They are initially
-// set to no-op functions in tagging.cc, but can be replaced with MTE-capable
-// ones through InitializeMTEIfNeeded(). This is conceptually similar to an
-// IFUNC, even though less secure. These function pointers were introduced to
-// support older Android releases. With the removal of support for Android M,
-// it became possible to use IFUNC instead.
-// TODO(bartekn): void* -> uintptr_t
-using RemaskPtrInternalFn = void*(void* ptr);
-using TagMemoryRangeIncrementInternalFn = void*(void* ptr, size_t size);
-
-using TagMemoryRangeRandomlyInternalFn = void*(void* ptr,
- size_t size,
- uint64_t mask);
-extern PA_COMPONENT_EXPORT(PARTITION_ALLOC)
- TagMemoryRangeRandomlyInternalFn* global_tag_memory_range_randomly_fn;
-extern PA_COMPONENT_EXPORT(PARTITION_ALLOC)
- TagMemoryRangeIncrementInternalFn* global_tag_memory_range_increment_fn;
-extern PA_COMPONENT_EXPORT(PARTITION_ALLOC)
- RemaskPtrInternalFn* global_remask_void_ptr_fn;
+// These forward-defined functions do not really exist in tagging.cc, they're resolved
+// by the dynamic linker to MTE-capable versions on the right hardware.
+#if PA_CONFIG(HAS_MEMORY_TAGGING)
+PA_COMPONENT_EXPORT(PARTITION_ALLOC)
+void* TagMemoryRangeIncrementInternal(void* ptr, size_t size);
+PA_COMPONENT_EXPORT(PARTITION_ALLOC)
+void* TagMemoryRangeRandomlyInternal(void* ptr, size_t size, uint64_t mask);
+PA_COMPONENT_EXPORT(PARTITION_ALLOC)
+void* RemaskPointerInternal(void* ptr);
+#endif
// Increments the tag of the memory range ptr. Useful for provable revocations
// (e.g. free). Returns the pointer with the new tag. Ensures that the entire
@@ -90,7 +74,7 @@ extern PA_COMPONENT_EXPORT(PARTITION_ALLOC)
template <typename T>
PA_ALWAYS_INLINE T* TagMemoryRangeIncrement(T* ptr, size_t size) {
#if PA_CONFIG(HAS_MEMORY_TAGGING)
- return reinterpret_cast<T*>(global_tag_memory_range_increment_fn(ptr, size));
+ return reinterpret_cast<T*>(TagMemoryRangeIncrementInternal(ptr, size));
#else
return ptr;
#endif
@@ -108,8 +92,7 @@ PA_ALWAYS_INLINE T* TagMemoryRangeRandomly(T* ptr,
size_t size,
uint64_t mask = 0u) {
#if PA_CONFIG(HAS_MEMORY_TAGGING)
- return reinterpret_cast<T*>(
- global_tag_memory_range_randomly_fn(ptr, size, mask));
+ return reinterpret_cast<T*>(TagMemoryRangeRandomlyInternal(ptr, size, mask));
#else
return ptr;
#endif
@@ -124,7 +107,7 @@ PA_ALWAYS_INLINE void* TagMemoryRangeRandomly(uintptr_t ptr,
template <typename T>
PA_ALWAYS_INLINE T* TagPtr(T* ptr) {
#if PA_CONFIG(HAS_MEMORY_TAGGING)
- return reinterpret_cast<T*>(global_remask_void_ptr_fn(ptr));
+ return reinterpret_cast<T*>(RemaskPointerInternal(ptr));
#else
return ptr;
#endif
diff --git a/base/allocator/partition_allocator/tagging_unittest.cc b/base/allocator/partition_allocator/tagging_unittest.cc
index f3b8532a8f1f4..47f62ac000b43 100644
--- a/base/allocator/partition_allocator/tagging_unittest.cc
+++ b/base/allocator/partition_allocator/tagging_unittest.cc
@@ -16,7 +16,6 @@ namespace partition_alloc::internal {
// Check whether we can call the tagging intrinsics safely on all architectures.
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeRandomlySafe) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),
PageAccessibilityConfiguration(
@@ -32,7 +31,6 @@ TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeRandomlySafe) {
}
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeIncrementSafe) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
base::CPU cpu;
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),
@@ -54,7 +52,6 @@ TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeIncrementSafe) {
#if defined(ARCH_CPU_64_BITS)
// Size / alignment constraints are only enforced on 64-bit architectures.
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeBadSz) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
base::CPU cpu;
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),
@@ -71,7 +68,6 @@ TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeBadSz) {
}
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeRandomlyNoSz) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
base::CPU cpu;
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),
@@ -87,7 +83,6 @@ TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeRandomlyNoSz) {
}
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeRandomlyBadAlign) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
base::CPU cpu;
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),
@@ -104,7 +99,6 @@ TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeRandomlyBadAlign) {
}
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeIncrementBadSz) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
base::CPU cpu;
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),
@@ -120,7 +114,6 @@ TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeIncrementBadSz) {
}
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeIncrementNoSz) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
base::CPU cpu;
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),
@@ -136,7 +129,6 @@ TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeIncrementNoSz) {
}
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeIncrementBadAlign) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
base::CPU cpu;
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),

@ -1,19 +0,0 @@
commit 62f1d7caca64a8df55fb69c913309da2121a537f
Author: tigro <arkadiy.sheyn@softline.com>
Date: Fri Jul 21 16:51:31 2023 +0300
chromium-115-skia-include.patch
diff --git a/skia/ext/skcolorspace_trfn.cc b/skia/ext/skcolorspace_trfn.cc
index c0d6bd2a8..97c4dfad9 100644
--- a/skia/ext/skcolorspace_trfn.cc
+++ b/skia/ext/skcolorspace_trfn.cc
@@ -4,6 +4,8 @@
#include "skia/ext/skcolorspace_trfn.h"
+#include <cmath>
+
namespace skia {
namespace {

@ -0,0 +1,36 @@
diff -up chromium-115.0.5790.24/net/filter/brotli_source_stream.cc.system-brotli chromium-115.0.5790.24/net/filter/brotli_source_stream.cc
--- chromium-115.0.5790.24/net/filter/brotli_source_stream.cc.system-brotli 2023-06-07 21:48:38.000000000 +0200
+++ chromium-115.0.5790.24/net/filter/brotli_source_stream.cc 2023-06-17 14:42:19.734299929 +0200
@@ -10,7 +10,7 @@
#include "base/memory/raw_ptr.h"
#include "base/metrics/histogram_macros.h"
#include "net/base/io_buffer.h"
-#include "third_party/brotli/include/brotli/decode.h"
+#include <brotli/decode.h>
namespace net {
diff -up chromium-115.0.5790.24/net/ssl/cert_compression.cc.system-brotli chromium-115.0.5790.24/net/ssl/cert_compression.cc
--- chromium-115.0.5790.24/net/ssl/cert_compression.cc.system-brotli 2023-06-07 21:48:38.000000000 +0200
+++ chromium-115.0.5790.24/net/ssl/cert_compression.cc 2023-06-17 14:42:19.734299929 +0200
@@ -9,7 +9,7 @@
#include "third_party/boringssl/src/include/openssl/ssl.h"
#if !defined(NET_DISABLE_BROTLI)
-#include "third_party/brotli/include/brotli/decode.h"
+#include <brotli/decode.h>
#endif
namespace net {
diff -up chromium-115.0.5790.24/ui/base/resource/resource_bundle.cc.system-brotli chromium-115.0.5790.24/ui/base/resource/resource_bundle.cc
--- chromium-115.0.5790.24/ui/base/resource/resource_bundle.cc.system-brotli 2023-06-17 14:42:19.734299929 +0200
+++ chromium-115.0.5790.24/ui/base/resource/resource_bundle.cc 2023-06-17 14:44:18.591002119 +0200
@@ -32,7 +32,7 @@
#include "net/filter/gzip_header.h"
#include "skia/ext/image_operations.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
-#include "third_party/brotli/include/brotli/decode.h"
+#include <brotli/decode.h>
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/zlib/google/compression_utils.h"

@ -1,25 +0,0 @@
From 74c464ae56275f4de46b7d1f7e103fa758a637d2 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Wed, 31 May 2023 17:03:02 +0000
Subject: [PATCH] IWYU: std::vector used in verify_name_match.h without include
Bug: 957519
Change-Id: Ie753fadae35adb293f854a0f8d4f675e67a2fc31
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4533815
Reviewed-by: David Benjamin <davidben@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1151307}
---
diff --git a/net/cert/pki/verify_name_match.h b/net/cert/pki/verify_name_match.h
index d22cf7f..e30b221 100644
--- a/net/cert/pki/verify_name_match.h
+++ b/net/cert/pki/verify_name_match.h
@@ -6,6 +6,7 @@
#define NET_CERT_PKI_VERIFY_NAME_MATCH_H_
#include <string>
+#include <vector>
#include "net/base/net_export.h"

@ -0,0 +1,31 @@
commit 8f46ad499d8f8afd56bf5c82cbbcad67285ed8aa
Author: Phan Quang Minh <phanquangminh217@gmail.com>
Date: Wed May 24 10:13:45 2023 +0000
ozone/wayland: Load default cursor theme if theme name is empty
We might need to load the cursor theme even if `OnCursorThemeName` never
gets called (e.g. Qt theme backend). In this case we will need to load
the default theme by passing `NULL` to wl_cursor_theme_load.
Change-Id: I0e1814178319734a4d0fe7574cdc8c7a1d1cf7a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4553659
Reviewed-by: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: Maksim Sisov <msisov@igalia.com>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1148441}
diff --git a/ui/ozone/platform/wayland/host/wayland_cursor_factory.cc b/ui/ozone/platform/wayland/host/wayland_cursor_factory.cc
index 9ab12b1994c68..11b162554abc8 100644
--- a/ui/ozone/platform/wayland/host/wayland_cursor_factory.cc
+++ b/ui/ozone/platform/wayland/host/wayland_cursor_factory.cc
@@ -230,7 +230,8 @@ void WaylandCursorFactory::MaybeLoadThemeCursors() {
base::ThreadPool::PostTaskAndReplyWithResult(
FROM_HERE,
{base::MayBlock(), base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN},
- base::BindOnce(wl_cursor_theme_load, name_.c_str(), GetCacheKey(),
+ base::BindOnce(wl_cursor_theme_load,
+ name_.empty() ? nullptr : name_.c_str(), GetCacheKey(),
connection_->buffer_factory()->shm()),
base::BindOnce(&WaylandCursorFactory::OnThemeLoaded,
weak_factory_.GetWeakPtr(), name_, size_));

@ -1,60 +1,81 @@
author: Andres Salomon <dilinger@debian.org>
description: work around https://github.com/llvm/llvm-project/issues/48582
../../media/base/cdm_promise_adapter.cc:99:66: error: reference to local binding 'promise_id' declared in enclosing function 'media::CdmPromiseAdapter::Clear'
"media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id),
^
../../media/base/cdm_promise_adapter.cc:97:15: note: 'promise_id' declared here
for (auto& [promise_id, promise] : promises_) {
^
This is some kind of clang14 scope bug, whereby variable are defined
in a structured binding, and then used inside of a (valid, but) different
scope. Eg,
auto& [foo, bar, baz] = sizing_tree->CreateSizingData();
do { auto& x = bar; } while (0);
auto x = [&](GridTrackSizingDirection lambdavar) {
for (auto& i : foo) { ... }
}
The compiler gets confused about scope and spits out an error. The
workaround is to define the variable not in a structured binding.
--- a/media/base/cdm_promise_adapter.cc
+++ b/media/base/cdm_promise_adapter.cc
diff -up chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc.workaround_clang_bug-structured_binding chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc
--- chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc.workaround_clang_bug-structured_binding 2023-06-07 21:48:37.000000000 +0200
+++ chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc 2023-06-17 16:53:20.216628557 +0200
@@ -94,7 +94,9 @@ void CdmPromiseAdapter::RejectPromise(ui
void CdmPromiseAdapter::Clear(ClearReason reason) {
// Reject all outstanding promises.
DCHECK(thread_checker_.CalledOnValidThread());
- for (auto& [promise_id, promise] : promises_) {
+ for (auto& [p_id, p] : promises_) {
+ auto& promise_id = p_id;
+ auto& promise = p;
+ for (auto& [p_i, p_e] : promises_) {
+ auto& promise_id = p_i;
+ auto& promise = p_e;
TRACE_EVENT_NESTABLE_ASYNC_END1(
"media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id),
"status", "cleared");
--- a/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc
+++ b/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc
@@ -1798,8 +1798,10 @@ void NGGridLayoutAlgorithm::CompleteTrac
diff -up chromium-115.0.5790.24/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.workaround_clang_bug-structured_binding chromium-115.0.5790.24/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc
--- chromium-115.0.5790.24/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.workaround_clang_bug-structured_binding 2023-06-07 21:48:41.000000000 +0200
+++ chromium-115.0.5790.24/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc 2023-06-17 18:47:06.001403966 +0200
@@ -238,7 +238,10 @@ const NGLayoutResult* NGGridLayoutAlgori
: BuildGridSizingTree(&oof_children);
LayoutUnit intrinsic_block_size;
- auto& [grid_items, layout_data, tree_size] = grid_sizing_tree.TreeRootData();
+ auto& [g_i, l_d, t_s] = grid_sizing_tree.TreeRootData();
+ auto& grid_items = g_i;
+ auto& layout_data = l_d;
+ auto& tree_size = t_s;
if (IsBreakInside(BreakToken())) {
// TODO(layout-dev): When we support variable inline-size fragments we'll
@@ -655,8 +658,10 @@ NGGridSizingTree NGGridLayoutAlgorithm::
NGGridSizingTree sizing_tree;
if (const auto* layout_subtree = ConstraintSpace().GridLayoutSubtree()) {
- auto& [grid_items, layout_data, subtree_size] =
- sizing_tree.CreateSizingData();
+ auto& [g_i, l_d, s_s] = sizing_tree.CreateSizingData();
+ auto& grid_items = g_i;
+ auto& layout_data = l_d;
+ auto& subtree_size = s_s;
const auto& node = Node();
grid_items =
@@ -1798,8 +1803,10 @@ void NGGridLayoutAlgorithm::CompleteTrac
bool* opt_needs_additional_pass) const {
DCHECK(sizing_subtree);
- auto& [grid_items, layout_data, subtree_size] =
+ auto& [g_i, l_d, subtree_size] =
sizing_subtree.SubtreeRootData();
- sizing_subtree.SubtreeRootData();
+ auto& [g_i, l_d, s_s] = sizing_subtree.SubtreeRootData();
+ auto& grid_items = g_i;
+ auto& layout_data = l_d;
+ auto& subtree_size = s_s;
const bool is_for_columns = track_direction == kForColumns;
const bool has_non_definite_track =
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -1924,8 +1931,10 @@ template <typename CallbackFunc>
void NGGridLayoutAlgorithm::ForEachSubgrid(
const NGGridSizingSubtree& sizing_subtree,
const CallbackFunc& callback_func) const {
- auto& [grid_items, layout_data, subtree_size] =
- sizing_subtree.SubtreeRootData();
+ auto& [g_i, l_d, s_s] = sizing_subtree.SubtreeRootData();
+ auto& grid_items = g_i;
+ auto& layout_data = l_d;
+ auto& subtree_size = s_s;
// If we know this subtree doesn't have nested subgrids we can exit early
// instead of iterating over every grid item looking for them.
diff -up chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc.me chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc
--- chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc.me 2023-06-19 08:04:02.287072722 +0200
+++ chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc 2023-06-19 08:18:24.576814950 +0200
@@ -1393,7 +1393,8 @@ void ServiceWorkerContextWrapper::MaybeP
return;
}
- auto [document_url, key, callback] = std::move(*request);
+ auto [d_u, key, callback] = std::move(*request);
+ auto document_url = std::move(d_u);
+ auto document_url = d_u;
DCHECK(document_url.is_valid());
TRACE_EVENT1("ServiceWorker",

@ -1,19 +0,0 @@
diff --git a/chrome/browser/first_run/first_run_internal_linux.cc b/chrome/browser/first_run/first_run_internal_linux.cc
index 33fd57901..989069437 100644
--- a/chrome/browser/first_run/first_run_internal_linux.cc
+++ b/chrome/browser/first_run/first_run_internal_linux.cc
@@ -20,12 +20,9 @@ bool IsOrganicFirstRun() {
base::FilePath InitialPrefsPath() {
// The standard location of the initial prefs is next to the chrome binary.
+ // ...but we patch it to use /etc/chromium
base::FilePath dir_exe;
- if (!base::PathService::Get(base::DIR_EXE, &dir_exe)) {
- return base::FilePath();
- }
-
- return installer::InitialPreferences::Path(dir_exe);
+ dir_exe = base::FilePath("/etc/chromium");
}
} // namespace internal

@ -1,23 +0,0 @@
../../chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.cc:106:7: error: no matching constructor for initialization of 'BoundSessionRefreshCookieFetcher::Result'
Result(net_error, headers ? absl::optional<int>(headers->response_code())
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher.h:17:10: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
struct Result {
^
--- a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.cc
+++ b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.cc
@@ -101,8 +101,8 @@ void BoundSessionRefreshCookieFetcherImp
void BoundSessionRefreshCookieFetcherImpl::OnURLLoaderComplete(
scoped_refptr<net::HttpResponseHeaders> headers) {
net::Error net_error = static_cast<net::Error>(url_loader_->NetError());
+ Result r = { net_error, headers ? absl::optional<int>(headers->response_code())
+ : absl::nullopt };
- std::move(callback_).Run(
- Result(net_error, headers ? absl::optional<int>(headers->response_code())
- : absl::nullopt));
+ std::move(callback_).Run(r);
}

@ -6,12 +6,6 @@
# enable|disable system build flags
%global system_build_flags 0
# disable the package notes info on f36
# workaround for linking issue
%if 0%{?fedora} == 36
%undefine _package_note_file
%endif
# set default numjobs for the koji build
%ifarch aarch64
%global numjobs 8
@ -124,8 +118,8 @@
# for RHEL7, append libfontconfig to the end
# make sure there is not a trailing | at the end of the list
# We always filter provides. We only filter Requires when building shared.
%global __provides_exclude_from ^(%{chromium_path}/.*\\.so|%{chromium_path}/.*\\.so.*|%{chromium_lib}/.*\\.so)$
%global __requires_exclude ^(%{chromium_path}/.*\\.so|%{chromium_path}/.*\\.so.*|%{chromium_lib}/.*\\.so)$
%global __provides_exclude_from ^(%{chromium_path}/.*\\.so|%{chromium_path}/.*\\.so.*)$
%global __requires_exclude ^(%{chromium_path}/.*\\.so|%{chromium_path}/.*\\.so.*)$
# enable clang by default
%global clang 1
@ -138,7 +132,7 @@
%endif
# enable system brotli
%global bundlebrotli 1
%global bundlebrotli 0
# Chromium's fork of ICU is now something we can't unbundle.
# This is left here to ease the change if that ever switches.
@ -242,7 +236,7 @@
%endif
Name: chromium%{chromium_channel}
Version: 115.0.5790.102
Version: 115.0.5790.110
Release: 1%{?dist}.inferit
Summary: A WebKit (Blink) powered web browser that Google doesn't want you to use
Url: http://www.chromium.org/Home
@ -252,7 +246,7 @@ License: BSD-3-Clause AND LGPL-2.1-or-later AND Apache-2.0 AND IJG AND MIT AND G
Patch0: chromium-70.0.3538.67-sandbox-pie.patch
# Use /etc/chromium for initial_prefs
Patch1: chromium-115.0.5790.98-initial_prefs-etc-path.patch
Patch1: chromium-115-initial_prefs-etc-path.patch
# Use gn system files
Patch2: chromium-107.0.5304.110-gn-system.patch
@ -261,7 +255,7 @@ Patch2: chromium-107.0.5304.110-gn-system.patch
Patch5: chromium-77.0.3865.75-no-zlib-mangle.patch
# Do not use unrar code, it is non-free
#Patch6: chromium-114-norar.patch
Patch6: chromium-115-norar.patch
# Try to load widevine from other places
Patch8: chromium-108-widevine-other-locations.patch
@ -304,7 +298,7 @@ Patch70: chromium-105.0.5195.52-python-six-1.16.0.patch
Patch82: chromium-98.0.4758.102-remoting-no-tests.patch
# patch for using system brotli
Patch89: chromium-108-system-brotli.patch
Patch89: chromium-115-system-brotli.patch
# disable GlobalMediaControlsCastStartStop to avoid crash
# when using the address bar media player button
@ -338,9 +332,8 @@ Patch106: chromium-98.0.4758.80-epel7-erase-fix.patch
# Add additional operator== to make el7 happy.
Patch107: chromium-99.0.4844.51-el7-extra-operator==.patch
# workaround for clang bug on el7
Patch108: chromium-114-constexpr-el7.patch
Patch109: chromium-114-wireless-el7.patch
Patch110: chromium-114-buildflag-el7.patch
Patch110: chromium-115-buildflag-el7.patch
# system ffmpeg
Patch114: chromium-107-ffmpeg-duration.patch
@ -351,29 +344,53 @@ Patch116: chromium-112-ffmpeg-first_dts.patch
Patch117: chromium-108-ffmpeg-revert-new-channel-layout-api.patch
# gcc13
Patch122: chromium-114-gcc13.patch
Patch122: chromium-115-gcc13.patch
# revert AV1 VA-API video encode due to old libva on el9
Patch130: chromium-114-revert-av1enc-el9.patch
# Apply these patches to work around EPEL8 issues
Patch300: chromium-113-rhel8-force-disable-use_gnome_keyring.patch
# compiler build errors
Patch301: chromium-115-compiler-SkColor4f.patch
# workaround for clang bug, https://github.com/llvm/llvm-project/issues/57826
Patch302: chromium-115-workaround_clang_bug-structured_binding.patch
# missing typename
Patch303: chromium-115-typename.patch
# Skia issue
Patch304: chromium-115-skia-include.patch
# IWYU: std::vector used in verify_name_match.h without include
Patch305: chromium-115-verify_name_match-include.patch
# flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
Patch306: SkColor4f-init.patch
# Result(net_error, headers ? absl::optional<int>(headers->response_code())
Patch307: cookieresult.patch
# std::construct_at(__p, std::forward<_Args>(__args)...)
Patch308: brandversion-construct.patch
# missing cmath
Patch304: chromium-115-missing-cmath.patch
# add BoundSessionRefreshCookieFetcher::Result
Patch305: chromium-115-add_BoundSessionRefreshCookieFetcher::Result.patch
# compiler error with c++20
Patch306: chromium-115-emplace_back_on_vector-c++20.patch
# revert for epel8 on aarch64 due to new feature IFUNC-Resolver not supported
# in old glibc < 2.30
# error: fatal error: 'sys/ifunc.h' file not found
Patch307: chromium-115-revert-ifunc.patch
# upstream, do not restrict new V4L2 decoders to ARM or ChromeOS
# error: use of undeclared identifier 'kV4L2FlatStatefulVideoDecoder'
# error: use of undeclared identifier 'kV4L2FlatStatelessVideoDecoder'
Patch308: chromium-115-do_not_restrict_new_V4L2_decoders.v4l2.pach
# upstream, include contains.h header for V4L2StatefulVideoDecoder
# error: no member named 'Contains' in namespace 'base'
Patch309: chromium-115-include_contains_h_header_for_V4L2StatefulVideoDecoder.patch
# Load default cursor theme if theme name is empty
Patch310: chromium-115-wayland-load_default_cursor_theme.patch
# clang warnings
Patch311: chromium-115-clang-warnings.patch
# Qt issue
Patch320: chromium-114-add_qt6_linuxui_backend.patch
Patch321: chromium-114-qt-handle_scale_factor_changes.patch
Patch322: chromium-114-qt-fix_font_double_scaling.patch
Patch323: chromium-114-qt_deps.patch
@ -438,14 +455,13 @@ BuildRequires: binutils
%endif
%endif
## Build with internal FFmpeg
## build with system ffmpeg-free
#if ! %{bundleffmpegfree}
# build with system ffmpeg-free
#%%if ! %%{bundleffmpegfree}
#BuildRequires: pkgconfig(libavcodec)
#BuildRequires: pkgconfig(libavfilter)
#BuildRequires: pkgconfig(libavformat)
#BuildRequires: pkgconfig(libavutil)
#endif
#%%endif
# build with system libaom
%if ! %{bundlelibaom}
@ -910,7 +926,7 @@ udev.
%patch -P1 -p1 -b .etc
%patch -P2 -p1 -b .gnsystem
%patch -P5 -p1 -b .nozlibmangle
#patch -P6 -p1 -b .nounrar
%patch -P6 -p1 -b .nounrar
%patch -P8 -p1 -b .widevine-other-locations
%patch -P11 -p1 -b .py3
@ -948,14 +964,14 @@ udev.
%patch -P12 -p1 -b .fedora-user-agent
%endif
#%if ! %{bundleffmpegfree}
#%patch -P114 -p1 -b .system-ffmppeg
#%patch -P115 -p1 -b .prop-codecs
#%patch -P116 -p1 -b .first_dts
#%if 0%{?fedora} == 36
#%patch -P117 -p1 -b .revert-new-channel-layout-api
#%endif
#%endif
#%%if ! %{bundleffmpegfree}
#%%patch -P114 -p1 -b .system-ffmppeg
#%%patch -P115 -p1 -b .prop-codecs
#%%patch -P116 -p1 -b .first_dts
#%%if 0%{?fedora} == 36
#%%patch -P117 -p1 -b .revert-new-channel-layout-api
#%%endif
#%%endif
# EPEL specific patches
%if 0%{?rhel} == 7
@ -966,14 +982,11 @@ udev.
%patch -P105 -p1 -b .el7-old-libdrm
%patch -P106 -p1 -b .el7-erase-fix
%patch -P107 -p1 -b .el7-extra-operator-equalequal
%patch -P108 -p1 -b .constexpr
%patch -P109 -p1 -b .wireless
%patch -P110 -p1 -b .buildflag-el7
%endif
%if ! %{clang}
%patch -P122 -p1 -b .gcc13
%endif
%if 0%{?rhel} == 9
%patch -P130 -p1 -b .revert-av1enc
@ -985,19 +998,25 @@ udev.
%if %{clang}
%if 0%{?rhel} || 0%{?fedora} < 38
%patch -P301 -p1 -b .workaround_clang-SkColor4f
%patch -P302 -p1 -b .workaround_clang_bug-structured_binding
%endif
%endif
%patch -P303 -p1 -b .typename
%patch -P304 -p1 -b .skia-include
%patch -P305 -p1 -b .verify_name_match-include
%patch -P306 -p1 -b .SkColor4f-init
%patch -P307 -p1 -b .cookieresult
%patch -P308 -p1 -b .brandversion-construct
%patch -P304 -p1 -b .cmath
%patch -P305 -p1 -b .add_BoundSessionRefreshCookieFetcher::Result
%patch -P306 -p1 -b .emplace_back_on_vector-c++20
%ifarch aarch64
%if 0%{?rhel} == 8
%patch -P307 -p1 -R -b .ifunc
%endif
%endif
%patch -P308 -p1 -b .do_not_restrict_new_V4L2_decoders.v4l2
%patch -P309 -p1 -b .include_contains_h_header_for_V4L2StatefulVideoDecoder
%patch -P310 -p1 -b .wayland_load_default_cursor_theme
%patch -P311 -p1 -b .clang-warnings
#patch -P320 -p1 -b .add_qt6_linuxui_backend
%patch -P321 -p1 -b .handle_scale_factor_changes
%patch -P322 -p1 -b .fix_font_double_scaling
%patch -P323 -p1 -b .qt_deps
@ -1070,7 +1089,9 @@ sed -i 's|moc|moc-qt5|g' ui/qt/moc_wrapper.py
%build
# utf8 issue on epel7, Internal parsing error 'ascii' codec can't
# decode byte 0xe2 in position 474: ordinal not in range(128)
%if 0%{?rhel} == 7
export LANG=en_US.UTF-8
%endif
# reduce warnings
%if %{clang}
@ -1157,6 +1178,9 @@ CHROMIUM_CORE_GN_DEFINES+=' is_clang=false'
CHROMIUM_CORE_GN_DEFINES+=' use_lld=false'
%endif
# disable rust, it's only using for testing
CHROMIUM_CORE_GN_DEFINES+=' enable_rust=false'
CHROMIUM_CORE_GN_DEFINES+=' use_sysroot=false disable_fieldtrial_testing_config=true rtc_enable_symbol_export=true'
%if %{use_gold}
@ -1193,8 +1217,6 @@ CHROMIUM_BROWSER_GN_DEFINES+=' ffmpeg_branding="Chrome" proprietary_codecs=true
%else
CHROMIUM_BROWSER_GN_DEFINES+=' ffmpeg_branding="Chromium" proprietary_codecs=false is_component_ffmpeg=false enable_ffmpeg_video_decoders=false media_use_ffmpeg=true'
%endif
#CHROMIUM_BROWSER_GN_DEFINES+=' media_use_openh264=true'
#CHROMIUM_BROWSER_GN_DEFINES+=' rtc_use_h264=true'
CHROMIUM_BROWSER_GN_DEFINES+=' use_kerberos=true'
%if 0%{?rhel} == 8
@ -1227,7 +1249,6 @@ CHROMIUM_BROWSER_GN_DEFINES+=' rtc_use_pipewire=true rtc_link_pipewire=true'
%endif
CHROMIUM_BROWSER_GN_DEFINES+=' use_system_libffi=true'
CHROMIUM_BROWSER_GN_DEFINES+=' enable_rust=false'
export CHROMIUM_BROWSER_GN_DEFINES
# headless gn defines
@ -1241,7 +1262,6 @@ CHROMIUM_HEADLESS_GN_DEFINES+=' use_libpci=false use_pulseaudio=false use_udev=f
CHROMIUM_HEADLESS_GN_DEFINES+=' v8_enable_lazy_source_positions=false use_glib=false use_gtk=false use_pangocairo=false'
CHROMIUM_HEADLESS_GN_DEFINES+=' use_qt=false is_component_build=false enable_ffmpeg_video_decoders=false media_use_ffmpeg=false'
CHROMIUM_HEADLESS_GN_DEFINES+=' media_use_libvpx=false proprietary_codecs=false'
CHROMIUM_HEADLESS_GN_DEFINES+=' enable_rust=false'
export CHROMIUM_HEADLESS_GN_DEFINES
build/linux/unbundle/replace_gn_files.py --system-libraries \
@ -1699,6 +1719,10 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
%{chromium_path}/chromedriver
%changelog
* Thu Jul 27 2023 Arkady L. Shane <ashejn@msvsphere.ru> - 115.0.5790.110-1.inferit
- Update to 115.0.5790.110
- Sync patches with upstream
* Fri Jul 21 2023 Arkady L. Shane <ashejn@msvsphere.ru> - 115.0.5790.102-1.inferit
- Update to 115.0.5790.102
- Disable rust

Loading…
Cancel
Save