public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/chromium] f45: - Update to 157.0.8103.78, include 83 security fixes
@ 2026-11-13 17:54 Than Ngo
  0 siblings, 0 replies; only message in thread
From: Than Ngo @ 2026-11-13 17:54 UTC (permalink / raw)
  To: git-commits

          A new commit has been pushed.

          Repo   : rpms/chromium
          Branch : f45
          Commit : c0bbb40a17821101a56ff909409115114a26570c
          Author : Than Ngo <than@redhat.com>
          Date   : 2026-11-13T18:51:13+01:00
          Stats  : +2845/-961 in 15 file(s)
          URL    : https://src.fedoraproject.org/rpms/chromium/c/c0bbb40a17821101a56ff909409115114a26570c?branch=f45

          Log:
          - Update to 157.0.8103.78, include 83 security fixes
* CVE-2026-126885: Use after free in ServiceWorker
* CVE-2026-126895: Use after free in CSS
* CVE-2026-126879: Use after free in Layout
* CVE-2026-126846: Use after free in Skia
* CVE-2026-126911: Use after free in Accessibility
* CVE-2026-126864: Use after free in V8
* CVE-2026-126889: Off-by-one error in V8
* CVE-2026-126859: Link following in FileSystem
* CVE-2026-126886: Use after free in Frames
* CVE-2026-126887: Use after free in Animation
* CVE-2026-126870: Uninitialized resource in ANGLE
* CVE-2026-126912: Buffer overflow in Skia
* CVE-2026-126919: Use after free in BrowserTag
* CVE-2026-126878: Information leak in Core
* CVE-2026-126909: Use after free in Passwords
* CVE-2026-126847: Type confusion in V8
* CVE-2026-126853: Uninitialized resource in Skia
* CVE-2026-126865: Use after free in DOM
* CVE-2026-126916: Integer overflow in V8
* CVE-2026-126903: Improper state validation in ANGLE
* CVE-2026-126910: Type confusion in V8
* CVE-2026-126842: Use after free in ANGLE
* CVE-2026-126898: Uninitialized resource in Skia
* CVE-2026-126871: Out of bounds read in Skia
* CVE-2026-126875: Missing authorization in V8
* CVE-2026-126862: Improper input validation in Core
* CVE-2026-126900: Use after free in CSS
* CVE-2026-126904: Use after free in Compositing
* CVE-2026-126907: Uninitialized resource in Media
* CVE-2026-126851: Use after free in Accessibility
* CVE-2026-126845: Uninitialized resource in GPU
* CVE-2026-126881: Improper initialization in Media
* CVE-2026-126867: Use after free in Browser
* CVE-2026-126863: Use after free in HTML
* CVE-2026-126896: Missing authorization in V8
* CVE-2026-126869: Use after free in Frames
* CVE-2026-126858: Uninitialized resource in ANGLE
* CVE-2026-126891: Use after free in V8
* CVE-2026-126874: Type confusion in V8
* CVE-2026-126876: Integer overflow in Skia
* CVE-2026-126918: Use after free in Layout
* CVE-2026-126866: Incorrect authorization in Extensions
* CVE-2026-126844: Uninitialized resource in Skia
* CVE-2026-126884: Out of bounds read in Skia
* CVE-2026-126894: Out of bounds read in Skia
* CVE-2026-126861: Use after free in Media
* CVE-2026-126917: Memory corruption in V8
* CVE-2026-126856: Incomplete cleanup in Cache
* CVE-2026-126905: Incomplete cleanup in V8
* CVE-2026-126873: Use after free in Extensions
* CVE-2026-126922: Out of bounds read in Skia
* CVE-2026-126914: Uninitialized resource in Skia
* CVE-2026-126880: Type confusion in V8
* CVE-2026-126872: Incorrect authorization in FileSystem
* CVE-2026-126877: Use after free in Dawn
* CVE-2026-126888: Buffer overflow in Turbolev
* CVE-2026-126843: Type confusion in Turbolev
* CVE-2026-126854: Incorrect authorization in Layout
* CVE-2026-126892: Use after free in MediaStream
* CVE-2026-126897: Type confusion in V8
* CVE-2026-126857: Out of bounds read in Skia
* CVE-2026-126883: Use after free in Core
* CVE-2026-126840: Out of bounds write in Network
* CVE-2026-126848: Uninitialized resource in Skia
* CVE-2026-126882: Information leak in Skia
* CVE-2026-126906: Race condition in Extensions
* CVE-2026-126915: Use of uninitialized variable in Skia
* CVE-2026-126893: Out of bounds write in V8
* CVE-2026-126855: Missing authorization in ImageCapture
* CVE-2026-126908: Type confusion in V8
* CVE-2026-126849: Type confusion in V8
* CVE-2026-126901: Use after free in PDF
* CVE-2026-126852: Use after free in MediaStream
* CVE-2026-126850: Incorrect authorization in SiteIsolation
* CVE-2026-126841: Out of bounds read in Skia
* CVE-2026-126902: Incorrect reference resolution in Browser
* CVE-2026-126868: Type confusion in V8
* CVE-2026-126921: Use after free in Accessibility
* CVE-2026-126913: Out of bounds read in Compositing
* CVE-2026-126890: Out of bounds read in Media
* CVE-2026-126860: Incorrect authorization in FileSystem
* CVE-2026-126920: Information leak in Skia
* CVE-2026-126899: Use after free in Elements

---
diff --git a/.gitignore b/.gitignore
index d4c5676..576186e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,3 +50,5 @@
 /linux-arm64-0.28.2.tgz
 /linux-ppc64-0.28.2.tgz
 /linux-x64-0.28.2.tgz
+/TypeScript-7.0.2.tar.gz
+/TypeScript-7.0.2-vendor-archive.tar.gz

diff --git a/chromium-141-csss_style_sheet.patch b/chromium-141-csss_style_sheet.patch
deleted file mode 100644
index fac8ede..0000000
--- a/chromium-141-csss_style_sheet.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Fix ftbfs
-
-v8/include/cppgc/visitor.h:440:19: error: invalid application of 'sizeof' to an incomplete type 'blink::CSSStyleSheet'
-  440 |     static_assert(sizeof(T), "Pointee type must be fully defined.");
-
-diff -up chromium-141.0.7390.37/third_party/blink/renderer/bindings/scripts/bind_gen/observable_array.py.ftbfs-csss_style_sheet chromium-141.0.7390.37/third_party/blink/renderer/bindings/scripts/bind_gen/observable_array.py
---- chromium-141.0.7390.37/third_party/blink/renderer/bindings/scripts/bind_gen/observable_array.py.ftbfs-csss_style_sheet	2025-09-23 22:21:14.000000000 +0200
-+++ chromium-141.0.7390.37/third_party/blink/renderer/bindings/scripts/bind_gen/observable_array.py	2025-10-01 17:55:51.303926035 +0200
-@@ -433,6 +433,7 @@ def generate_observable_array(observable
-     header_node.accumulator.add_include_headers([
-         component_export_header(api_component, for_testing),
-         "third_party/blink/renderer/bindings/core/v8/idl_types.h",
-+        "third_party/blink/renderer/core/css/css_style_sheet.h",
-         "third_party/blink/renderer/platform/bindings/observable_array.h",
-     ])
-     source_node.accumulator.add_include_headers([

diff --git a/chromium-144-rust-clanglib.patch b/chromium-144-rust-clanglib.patch
deleted file mode 100644
index 981fe52..0000000
--- a/chromium-144-rust-clanglib.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-diff -up chromium-144.0.7559.31/build/config/clang/BUILD.gn.rust-clang_lib chromium-144.0.7559.31/build/config/clang/BUILD.gn
---- chromium-144.0.7559.31/build/config/clang/BUILD.gn.rust-clang_lib	2025-12-17 01:06:32.000000000 +0100
-+++ chromium-144.0.7559.31/build/config/clang/BUILD.gn	2025-12-23 19:01:33.876897379 +0100
-@@ -177,7 +177,21 @@ template("clang_lib") {
-         }
-       } else if (is_apple) {
-         _dir = "darwin"
--      } else if (is_linux || is_chromeos) {
-+      } else if (is_linux) {
-+        if (current_cpu == "x64") {
-+          _dir = "x86_64-redhat-linux-gnu"
-+        } else if (current_cpu == "x86") {
-+          _dir = "i386-redhat-linux-gnu"
-+        } else if (current_cpu == "arm64") {
-+          _dir = "aarch64-redhat-linux-gnu"
-+        } else if (current_cpu == "arm") {
-+          _dir = "armhf-redhat-linux-gnu"
-+        } else if (current_cpu == "ppc64") {
-+          _dir = "ppc64le-redhat-linux-gnu"
-+        } else {
-+          assert(false)  # Unhandled cpu type
-+        }
-+      } else if (is_chromeos) {
-         if (current_cpu == "x64") {
-           _dir = "x86_64-unknown-linux-gnu"
-         } else if (current_cpu == "x86") {
-diff -up chromium-144.0.7559.31/build/rust/rust_bindgen_generator.gni.rust-clang_lib chromium-144.0.7559.31/build/rust/rust_bindgen_generator.gni
---- chromium-144.0.7559.31/build/rust/rust_bindgen_generator.gni.rust-clang_lib	2025-12-17 01:06:32.000000000 +0100
-+++ chromium-144.0.7559.31/build/rust/rust_bindgen_generator.gni	2025-12-23 19:21:34.335924481 +0100
-@@ -26,14 +26,14 @@ if (!use_chromium_rust_toolchain &&
- 
- # On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in
- # ../lib.
--_libclang_path = rust_bindgen_root
-+_libclang_path = clang_base_path
- if (!use_chromium_rust_toolchain &&
-     (host_cpu == "ppc64" || host_cpu == "s390x")) {
-   _libclang_path = rust_sysroot_absolute + "/lib64"
- } else if (host_os == "win") {
-   _libclang_path += "/bin"
- } else {
--  _libclang_path += "/lib"
-+  _libclang_path += "/lib64"
- }
- 
- # Template to build Rust/C bindings with bindgen.
-diff -up chromium-144.0.7559.31/build/rust/rust_bindgen.gni.rust-clang_lib chromium-144.0.7559.31/build/rust/rust_bindgen.gni
---- chromium-144.0.7559.31/build/rust/rust_bindgen.gni.rust-clang_lib	2025-12-17 01:06:32.000000000 +0100
-+++ chromium-144.0.7559.31/build/rust/rust_bindgen.gni	2025-12-23 19:22:12.089755683 +0100
-@@ -19,14 +19,14 @@ if (host_os == "win") {
- 
- # On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in
- # ../lib.
--_libclang_path = rust_bindgen_root
-+_libclang_path = clang_base_path
- if (!use_chromium_rust_toolchain &&
-     (current_cpu == "ppc64" || current_cpu == "s390x")) {
-   _libclang_path = rust_sysroot_absolute + "/lib64"
- } else if (host_os == "win") {
-   _libclang_path += "/bin"
- } else {
--  _libclang_path += "/lib"
-+  _libclang_path += "/lib64"
- }
- 
- # Template to build Rust/C bindings with bindgen.

diff --git a/chromium-152-build-error-libpng_for_testonly.patch b/chromium-152-build-error-libpng_for_testonly.patch
deleted file mode 100644
index 0f21fa6..0000000
--- a/chromium-152-build-error-libpng_for_testonly.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff -up chromium-152.0.7977.75/chrome/test/BUILD.gn.me chromium-152.0.7977.75/chrome/test/BUILD.gn
---- chromium-152.0.7977.75/chrome/test/BUILD.gn.me	2026-09-02 17:07:32.105877798 +0700
-+++ chromium-152.0.7977.75/chrome/test/BUILD.gn	2026-09-02 17:06:28.862176940 +0700
-@@ -8451,7 +8458,7 @@ if (!is_android) {
-         "//testing/gtest",
-         "//third_party/hunspell",
-         "//third_party/icu",
--        "//third_party/libpng:libpng_for_testonly",
-+        "//third_party/libpng",
-         "//ui/base:test_support",
-         "//ui/events:test_support",
-         "//ui/ozone",
-@@ -8840,7 +8847,7 @@ if (!is_android && !is_chromeos_device)
-       "//testing/gtest",
-       "//third_party/hunspell",
-       "//third_party/icu",
--      "//third_party/libpng:libpng_for_testonly",
-+      "//third_party/libpng",
-       "//ui/base:base_interactive_ui_tests",
-       "//ui/base:ozone_buildflags",
-       "//ui/base:test_support",
-@@ -9776,7 +9783,7 @@ if (!is_android) {
-       "//testing/gtest",
-       "//third_party/hunspell",
-       "//third_party/icu",
--      "//third_party/libpng:libpng_for_testonly",
-+      "//third_party/libpng",
-       "//ui/base:test_support",
-       "//ui/resources:ui_test_pak",
-       "//ui/views",
-diff -up chromium-152.0.7977.75/tools/imagediff/BUILD.gn.me chromium-152.0.7977.75/tools/imagediff/BUILD.gn
---- chromium-152.0.7977.75/tools/imagediff/BUILD.gn.me	2026-09-02 17:07:50.950086627 +0700
-+++ chromium-152.0.7977.75/tools/imagediff/BUILD.gn	2026-09-02 17:10:02.754225724 +0700
-@@ -48,7 +48,7 @@ if (current_toolchain == imagediff_toolc
-     deps = [
-       "//base",
-       "//build/win:default_exe_manifest",
--      "//third_party/libpng:libpng_for_testonly",
-+      "//third_party/libpng",
-       "//third_party/zlib",
-     ]
-   }
-diff -up chromium-152.0.7977.75/ui/gfx/BUILD.gn.me chromium-152.0.7977.75/ui/gfx/BUILD.gn
---- chromium-152.0.7977.75/ui/gfx/BUILD.gn.me	2026-09-02 17:10:35.639911698 +0700
-+++ chromium-152.0.7977.75/ui/gfx/BUILD.gn	2026-09-02 17:10:45.586021920 +0700
-@@ -897,7 +897,7 @@ test("gfx_unittests") {
-     "//skia:skcms",
-     "//testing/gtest",
-     "//third_party/icu:icuuc",
--    "//third_party/libpng:libpng_for_testonly",
-+    "//third_party/libpng",
-     "//third_party/zlib",
-     "//ui/base",
-     "//ui/gfx/animation",

diff --git a/chromium-build-error-libpng_for_testonly.patch b/chromium-build-error-libpng_for_testonly.patch
new file mode 100644
index 0000000..a143a12
--- /dev/null
+++ b/chromium-build-error-libpng_for_testonly.patch
@@ -0,0 +1,45 @@
+diff -up chromium-157.0.8103.38/chrome/test/BUILD.gn.me chromium-157.0.8103.38/chrome/test/BUILD.gn
+--- chromium-157.0.8103.38/chrome/test/BUILD.gn.me	2026-11-04 10:49:01.080817714 +0100
++++ chromium-157.0.8103.38/chrome/test/BUILD.gn	2026-11-04 10:51:24.266052678 +0100
+@@ -4319,7 +4319,7 @@ if (!is_android) {
+         "//testing/gtest",
+         "//third_party/hunspell",
+         "//third_party/icu",
+-        "//third_party/libpng:libpng_for_testonly",
++        "//third_party/libpng",
+         "//ui/base:test_support",
+         "//ui/events:test_support",
+         "//ui/ozone",
+@@ -4951,7 +4951,7 @@ if (!is_android) {
+       "//testing/gtest",
+       "//third_party/hunspell",
+       "//third_party/icu",
+-      "//third_party/libpng:libpng_for_testonly",
++      "//third_party/libpng",
+       "//ui/base:test_support",
+       "//ui/resources:ui_test_pak",
+       "//ui/views",
+diff -up chromium-157.0.8103.38/tools/imagediff/BUILD.gn.me chromium-157.0.8103.38/tools/imagediff/BUILD.gn
+--- chromium-157.0.8103.38/tools/imagediff/BUILD.gn.me	2026-11-04 10:51:38.218181946 +0100
++++ chromium-157.0.8103.38/tools/imagediff/BUILD.gn	2026-11-04 10:51:50.050435652 +0100
+@@ -48,7 +48,7 @@ if (current_toolchain == imagediff_toolc
+     deps = [
+       "//base",
+       "//build/win:default_exe_manifest",
+-      "//third_party/libpng:libpng_for_testonly",
++      "//third_party/libpng",
+       "//third_party/zlib",
+     ]
+   }
+diff -up chromium-157.0.8103.38/ui/gfx/BUILD.gn.me chromium-157.0.8103.38/ui/gfx/BUILD.gn
+--- chromium-157.0.8103.38/ui/gfx/BUILD.gn.me	2026-11-04 10:52:00.047509928 +0100
++++ chromium-157.0.8103.38/ui/gfx/BUILD.gn	2026-11-04 10:52:10.689515260 +0100
+@@ -899,7 +899,7 @@ test("gfx_unittests") {
+     "//skia:skcms",
+     "//testing/gtest",
+     "//third_party/icu:icuuc",
+-    "//third_party/libpng:libpng_for_testonly",
++    "//third_party/libpng",
+     "//third_party/zlib",
+     "//ui/base",
+     "//ui/gfx/animation",

diff --git a/chromium-csss_style_sheet.patch b/chromium-csss_style_sheet.patch
new file mode 100644
index 0000000..3e949d3
--- /dev/null
+++ b/chromium-csss_style_sheet.patch
@@ -0,0 +1,16 @@
+Fix ftbfs
+
+v8/include/cppgc/visitor.h:440:19: error: invalid application of 'sizeof' to an incomplete type 'blink::CSSStyleSheet'
+  440 |     static_assert(sizeof(T), "Pointee type must be fully defined.");
+
+diff -up chromium-157.0.8103.38/third_party/blink/renderer/bindings/scripts/bind_gen/observable_array.py.me chromium-157.0.8103.38/third_party/blink/renderer/bindings/scripts/bind_gen/observable_array.py
+--- chromium-157.0.8103.38/third_party/blink/renderer/bindings/scripts/bind_gen/observable_array.py.me	2026-11-04 11:05:06.998601241 +0100
++++ chromium-157.0.8103.38/third_party/blink/renderer/bindings/scripts/bind_gen/observable_array.py	2026-11-04 11:06:16.775415550 +0100
+@@ -531,6 +531,7 @@ def generate_observable_array(observable
+         [
+             component_export_header(api_component, for_testing),
+             "third_party/blink/renderer/bindings/core/v8/idl_types.h",
++            "third_party/blink/renderer/core/css/css_style_sheet.h",
+             "third_party/blink/renderer/platform/bindings/observable_array.h",
+         ]
+     )

diff --git a/chromium-disable-eula-popup.patch b/chromium-disable-eula-popup.patch
deleted file mode 100644
index 138d44d..0000000
--- a/chromium-disable-eula-popup.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up chromium-156.0.8078.47/chrome/browser/first_run/first_run.h.me chromium-156.0.8078.47/chrome/browser/first_run/first_run.h
---- chromium-156.0.8078.47/chrome/browser/first_run/first_run.h.me	2026-10-27 17:44:12.180031165 +0100
-+++ chromium-156.0.8078.47/chrome/browser/first_run/first_run.h	2026-10-27 17:44:55.586434323 +0100
-@@ -74,7 +74,7 @@ struct MasterPrefs {
-   bool confirm_to_quit;
- #endif
- #if BUILDFLAG(IS_LINUX)
--  bool eula_required = true;
-+  bool eula_required = false;
- #endif
- };
- 

diff --git a/chromium-ftbfs-crubit.patch b/chromium-ftbfs-crubit.patch
index 31e76d6..66b8f31 100644
--- a/chromium-ftbfs-crubit.patch
+++ b/chromium-ftbfs-crubit.patch
@@ -1,19 +1,8 @@
-ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chromium/pull/4003
 
---- a/chrome/browser/devtools/chrome_devtools_session.cc
-+++ b/chrome/browser/devtools/chrome_devtools_session.cc
-@@ -78,11 +78,6 @@ ChromeDevToolsSession::ChromeDevToolsSes
-       cast_handler_ = std::make_unique<CastHandler>(
-           agent_host->GetWebContents(), dispatcher());
-     }
--    if (IsDomainAvailableToUntrustedClient<StorageHandler>() ||
--        channel->GetClient()->IsTrusted()) {
--      storage_handler_ = std::make_unique<StorageHandler>(
--          agent_host->GetWebContents(), dispatcher());
--    }
-   }
-   if (agent_host->GetWebContents() &&
-       (agent_host->GetType() == content::DevToolsAgentHost::kTypePage ||
+pulled from https://github.com/ungoogled-software/ungoogled-chromium/pull/4003
+
+This is not part of the official ungoogled-chromium patch set
+
 --- a/components/cbor/BUILD.gn
 +++ b/components/cbor/BUILD.gn
 @@ -12,7 +12,7 @@ buildflag_header("buildflags") {
@@ -43,9 +32,264 @@ ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chr
      deps += [
        "//components/cbor/rust:cbor_rust_bindings",
        "//components/cbor/rust:cbor_rust_unittests",
+--- a/components/qr_code_generator/BUILD.gn
++++ b/components/qr_code_generator/BUILD.gn
+@@ -2,6 +2,8 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+ 
++import("//build/buildflag_header.gni")
++import("//build/config/rust.gni")
+ import("//testing/libfuzzer/fuzzer_test.gni")
+ 
+ declare_args() {
+@@ -9,6 +11,7 @@ declare_args() {
+   enable_qr_print = false
+ }
+ 
++# Error type shared between C++ and Rust.
+ source_set("error") {
+   public = [ "error.h" ]
+ }
+@@ -30,6 +33,17 @@ source_set("bitmap_generator") {
+   ]
+ }
+ 
++# TODO(https://crbug.com/533546009): After Crubit bakes and sticks on the
++# Stable release channel, then it should be okay to assume that
++# `enable_cpp_api_from_rust` will be forever true (and remove
++# `cxx::bridge`-related bits of QR code generator in this `BUILD.gn` file, bits
++# in `.cc` files, and the whole `qr_code_generator_ffi_glue.rs` file).
++buildflag_header("cpp_api_from_rust_buildflags") {
++  header = "cpp_api_from_rust_buildflags.h"
++  flags = [ "ENABLE_CPP_API_FROM_RUST=$enable_cpp_api_from_rust" ]
++  visibility = [ ":qr_code_generator" ]
++}
++
+ source_set("qr_code_generator") {
+   # Enforces that `qr_code_generator.h` does not #include headers from private
+   # `deps`, which also stops GN from forwarding the Crubit bindings' hard_deps
+@@ -37,16 +51,35 @@ source_set("qr_code_generator") {
+   check_includes_strict = true
+   public = [ "qr_code_generator.h" ]
+   sources = [ "qr_code_generator.cc" ]
+-  deps = [
+-    "//build/rust/crubit",
+-    "//third_party/rust/qr_code/v2:cpp_api_from_rust",
+-  ]
++  deps = [ ":cpp_api_from_rust_buildflags" ]
++  if (enable_cpp_api_from_rust) {
++    deps += [
++      "//build/rust/crubit",
++      "//third_party/rust/qr_code/v2:cpp_api_from_rust",
++    ]
++  } else {
++    deps += [ ":qr_code_generator_ffi_glue" ]
++  }
+   public_deps = [
+     ":error",
+     "//base",
+   ]
+ }
+ 
++if (!enable_cpp_api_from_rust) {
++  rust_static_library("qr_code_generator_ffi_glue") {
++    allow_unsafe = true  # Needed for FFI that underpins the `cxx` crate.
++    crate_root = "qr_code_generator_ffi_glue.rs"
++    sources = [ "qr_code_generator_ffi_glue.rs" ]
++    cxx_bindings = [ "qr_code_generator_ffi_glue.rs" ]
++    visibility = [ ":qr_code_generator" ]
++    deps = [
++      ":error",
++      "//third_party/rust/qr_code/v2:lib",
++    ]
++  }
++}
++
+ source_set("unit_tests") {
+   testonly = true
+   sources = [
+--- a/components/qr_code_generator/qr_code_generator.cc
++++ b/components/qr_code_generator/qr_code_generator.cc
+@@ -10,10 +10,17 @@
+ 
+ #include "base/check.h"
+ #include "base/check_op.h"
++#include "base/containers/span_rust.h"
+ #include "base/numerics/safe_conversions.h"
++#include "components/qr_code_generator/cpp_api_from_rust_buildflags.h"
++
++#if BUILDFLAG(ENABLE_CPP_API_FROM_RUST)
+ #include "third_party/crubit/support/rs_std/iterator_adapter.h"
+ #include "third_party/crubit/support/rs_std/slice_ref.h"
+ #include "third_party/rust/qr_code/v2/qr_code.h"
++#else
++#include "components/qr_code_generator/qr_code_generator_ffi_glue.rs.h"
++#endif
+ 
+ namespace qr_code_generator {
+ 
+@@ -22,6 +29,7 @@ GeneratedCode::~GeneratedCode() = defaul
+ GeneratedCode::GeneratedCode(GeneratedCode&&) = default;
+ GeneratedCode& GeneratedCode::operator=(GeneratedCode&&) = default;
+ 
++#if BUILDFLAG(ENABLE_CPP_API_FROM_RUST)
+ Error RustErrorToCppError(const ::qr_code::types::QrError& rust_error) {
+   if (rust_error == ::qr_code::types::QrError::MakeDataTooLong()) {
+     return Error::kInputTooLong;
+@@ -63,5 +71,32 @@ base::expected<GeneratedCode, Error> Gen
+   CHECK_EQ(code.data.size(), static_cast<size_t>(code.qr_size * code.qr_size));
+   return code;
+ }
++#else
++base::expected<GeneratedCode, Error> GenerateCode(
++    base::span<const uint8_t> in,
++    std::optional<int> min_version) {
++  rust::Slice<const uint8_t> rs_in = base::SpanToRustSlice(in);
++
++  // `min_version` might come from a fuzzer and therefore we use a lenient
++  // `saturated_cast` instead of a `checked_cast`.
++  int16_t rs_min_version =
++      base::saturated_cast<int16_t>(min_version.value_or(0));
++
++  std::vector<uint8_t> result_pixels;
++  size_t result_width = 0;
++  Error result_error = Error::kUnknownError;
++  bool result_is_success = generate_qr_code_using_rust(
++      rs_in, rs_min_version, result_pixels, result_width, result_error);
++
++  if (!result_is_success) {
++    return base::unexpected(result_error);
++  }
++  GeneratedCode code;
++  code.data = std::move(result_pixels);
++  code.qr_size = base::checked_cast<int>(result_width);
++  CHECK_EQ(code.data.size(), static_cast<size_t>(code.qr_size * code.qr_size));
++  return code;
++}
++#endif
+ 
+ }  // namespace qr_code_generator
+--- a/components/qr_code_generator/qr_code_generator_ffi_glue.rs
++++ b/components/qr_code_generator/qr_code_generator_ffi_glue.rs
+@@ -0,0 +1,106 @@
++// 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.
++
++use cxx::CxxVector;
++use qr_code::types::{Color, EcLevel, QrError};
++use qr_code::{QrCode, Version};
++use std::pin::Pin;
++
++#[cxx::bridge(namespace = "qr_code_generator")]
++mod ffi {
++    #[repr(u8)]
++    enum Error {
++        kUnknownError = 0,
++        kInputTooLong = 1,
++    }
++
++    extern "C++" {
++        include!("components/qr_code_generator/error.h");
++        type Error;
++    }
++
++    extern "Rust" {
++        fn generate_qr_code_using_rust(
++            data: &[u8],
++            min_version: i16,
++            out_pixels: Pin<&mut CxxVector<u8>>,
++            out_qr_size: &mut usize,
++            out_error: &mut Error,
++        ) -> bool;
++    }
++}
++
++/// Translates `data` into a QR code.
++///
++/// `min_version` can request a minimum QR code version.
++fn generate(data: &[u8], min_version: Option<i16>) -> Result<QrCode, QrError> {
++    let mut qr_code = QrCode::new(data)?;
++
++    let actual_version = match qr_code.version() {
++        Version::Micro(_) => panic!("QrCode::new should not generate micro QR codes"),
++        Version::Normal(actual_version) => actual_version,
++    };
++
++    match min_version {
++        None => (),
++        Some(min_version) if actual_version >= min_version => (),
++        Some(min_version) => {
++            // If `actual_version` < `min_version`, then re-encode using `min_version`
++            qr_code = QrCode::with_version(data, Version::Normal(min_version), EcLevel::M)?;
++        }
++    }
++
++    Ok(qr_code)
++}
++
++/// Translates `data` into a QR code.
++///
++/// `min_version` can request a minimum QR code version (e.g. if the caller
++/// requires that the QR code has a certain minimal width and height;  for
++/// example, QR code version 5 translates into 37x37 QR pixels).  Setting
++/// `min_version` to 0 means that the caller doesn't have any QR version
++/// requirements.
++///
++/// On success returns `true` and populates `out_pixels` and `out_qr_size`.  On
++/// failure returns `false` and populates `out_error`.
++pub fn generate_qr_code_using_rust(
++    data: &[u8],
++    min_version: i16,
++    mut out_pixels: Pin<&mut CxxVector<u8>>,
++    out_qr_size: &mut usize,
++    out_error: &mut ffi::Error,
++) -> bool {
++    let min_version = match min_version {
++        0 => None,
++        1..=40 => Some(min_version),
++        _ => {
++            *out_error = ffi::Error::kUnknownError;
++            return false;
++        }
++    };
++
++    match generate(data, min_version) {
++        Err(err) => {
++            *out_error = match err {
++                QrError::DataTooLong => ffi::Error::kInputTooLong,
++                _ => ffi::Error::kUnknownError,
++            };
++            false
++        }
++        Ok(qr_code) => {
++            *out_qr_size = qr_code.width();
++
++            assert!(out_pixels.is_empty());
++            for color in qr_code.into_colors() {
++                let u8_value = match color {
++                    Color::Light => 0,
++                    Color::Dark => 1,
++                };
++                out_pixels.as_mut().push(u8_value);
++            }
++
++            true
++        }
++    }
++}
 --- a/components/web_package/BUILD.gn
 +++ b/components/web_package/BUILD.gn
-@@ -51,8 +51,6 @@ source_set("web_package_rust_impl") {
+@@ -7,6 +7,7 @@ import("//testing/libfuzzer/fuzzer_test.
+ source_set("web_package_headers") {
+   visibility = [ ":*" ]
+   sources = [
++    "input_reader.h",
+     "signed_web_bundles/constants.h",
+     "signed_web_bundles/identity_validator.h",
+     "signed_web_bundles/integrity_block_parser.h",
+@@ -51,8 +52,6 @@ source_set("web_package_rust_impl") {
      "//components/base32",
      "//components/cbor",
      "//components/web_package/mojom",
@@ -54,20 +298,15 @@ ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chr
      "//mojo/public/cpp/bindings",
      "//net",
      "//services/network/public/mojom",
-@@ -67,12 +65,10 @@ static_library("web_package") {
-     "signed_web_bundles/signed_web_bundle_signature_stack.cc",
-     "signed_web_bundles/signed_web_bundle_signature_stack_entry.cc",
-     "web_bundle_builder.cc",
--    "web_bundle_parser_factory.cc",
-     "web_bundle_utils.cc",
-   ]
+@@ -61,6 +60,7 @@ source_set("web_package_rust_impl") {
  
-   deps = [
--    ":web_package_rust_impl",
-     "//base",
-     "//components/base32",
-     "//components/cbor",
-@@ -115,7 +111,6 @@ source_set("mojom_mapped_types_rust_impl
+ static_library("web_package") {
+   sources = [
++    "input_reader.cc",
+     "signed_web_bundles/identity_validator.cc",
+     "signed_web_bundles/signed_web_bundle_id.cc",
+     "signed_web_bundles/signed_web_bundle_integrity_block.cc",
+@@ -115,7 +115,6 @@ source_set("mojom_mapped_types_rust_impl
    deps = [
      ":mojom_mapped_types_headers",
      "//base",
@@ -75,15 +314,326 @@ ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chr
      "//crypto",
      "//mojo/public/cpp/bindings",
    ]
-@@ -159,8 +154,6 @@ source_set("unit_tests") {
-     ":web_package",
+@@ -160,7 +159,6 @@ source_set("unit_tests") {
      "//base/test:test_support",
      "//components/cbor",
--    "//components/web_package/rust:web_package_rust_unittests",
+     "//components/web_package/rust:web_package_rust_unittests",
 -    "//components/web_package/signed_web_bundles/rust:signed_web_bundles_rust_unittests",
      "//components/web_package/test_support",
      "//mojo/public/cpp/bindings",
      "//mojo/public/cpp/test_support:test_utils",
+--- a/components/web_package/input_reader.cc
++++ b/components/web_package/input_reader.cc
+@@ -0,0 +1,193 @@
++// Copyright 2022 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "components/web_package/input_reader.h"
++
++#include <algorithm>
++#include <utility>
++
++#include "base/numerics/checked_math.h"
++#include "base/strings/string_util.h"
++#include "base/strings/string_view_util.h"
++#include "components/cbor/constants.h"
++#include "components/cbor/values.h"
++
++namespace web_package {
++
++namespace {
++
++// This array must be kept in sync with the `CBORType` enum.
++constexpr std::array kAcceptedCBORTypes = {
++    // clang-format off
++    CBORType::kUnsignedInt,
++    CBORType::kNegativeInt,
++    CBORType::kByteString,
++    CBORType::kTextString,
++    CBORType::kArray,
++    CBORType::kMap,
++    CBORType::kSimpleValue,
++    // clang-format on
++};
++
++std::optional<int64_t> DecodeValueToNegative(uint64_t value) {
++  auto negative_value = -base::CheckedNumeric<int64_t>(value) - 1;
++  if (!negative_value.IsValid()) {
++    return std::nullopt;
++  }
++  return static_cast<int64_t>(negative_value.ValueOrDie());
++}
++
++std::optional<int64_t> DecodeValueToUnsigned(uint64_t value) {
++  auto unsigned_value = base::CheckedNumeric<int64_t>(value);
++  if (!unsigned_value.IsValid()) {
++    return std::nullopt;
++  }
++  return static_cast<int64_t>(unsigned_value.ValueOrDie());
++}
++
++}  // namespace
++
++InputReader::InputReader(base::span<const uint8_t> buf) : buf_(buf) {}
++
++InputReader::~InputReader() = default;
++
++std::optional<uint8_t> InputReader::ReadByte() {
++  uint8_t b;
++  if (!buf_.ReadU8BigEndian(b)) {
++    return std::nullopt;
++  }
++  return {b};
++}
++
++std::optional<base::span<const uint8_t>> InputReader::ReadBytes(size_t n) {
++  return buf_.Read(n);
++}
++
++std::optional<std::string_view> InputReader::ReadString(size_t n) {
++  auto bytes = buf_.Read(n);
++  if (!bytes) {
++    return std::nullopt;
++  }
++  if (!base::IsStringUTF8(base::as_string_view(*bytes))) {
++    return std::nullopt;
++  }
++  return base::as_string_view(*bytes);
++}
++
++std::optional<uint64_t> InputReader::ReadCBORHeader(CBORType expected_type) {
++  auto pair = ReadTypeAndArgument();
++  if (!pair || pair->first != expected_type) {
++    return std::nullopt;
++  }
++  return pair->second;
++}
++
++std::optional<CBORHeader> InputReader::ReadCBORHeader() {
++  auto pair = ReadTypeAndArgument();
++  if (!pair) {
++    return std::nullopt;
++  }
++
++  const auto& [type, additional_info] = *pair;
++  switch (type) {
++    case CBORType::kSimpleValue: {
++      using SimpleValue = cbor::Value::SimpleValue;
++      if (additional_info == std::to_underlying(SimpleValue::TRUE_VALUE)) {
++        return {{true}};
++      } else if (additional_info ==
++                 std::to_underlying(SimpleValue::FALSE_VALUE)) {
++        return {{false}};
++      } else {
++        return std::nullopt;
++      }
++    }
++    case CBORType::kUnsignedInt:
++    case CBORType::kNegativeInt: {
++      std::optional<int64_t> value =
++          type == CBORType::kUnsignedInt
++              ? DecodeValueToUnsigned(additional_info)
++              : DecodeValueToNegative(additional_info);
++      if (!value) {
++        return std::nullopt;
++      }
++      return {{*value}};
++    }
++    case CBORType::kByteString:
++    case CBORType::kTextString: {
++      using StringInfo = CBORHeader::StringInfo;
++      using StringType = CBORHeader::StringInfo::StringType;
++
++      return {{StringInfo{.type = type == CBORType::kByteString
++                                      ? StringType::kByteString
++                                      : StringType::kTextString,
++                          .byte_length = additional_info}}};
++    }
++    case CBORType::kArray:
++    case CBORType::kMap: {
++      using ContainerInfo = CBORHeader::ContainerInfo;
++      using ContainerType = CBORHeader::ContainerInfo::ContainerType;
++
++      return {{ContainerInfo{.type = type == CBORType::kArray
++                                         ? ContainerType::kArray
++                                         : ContainerType::kMap,
++                             .size = additional_info}}};
++    }
++  }
++}
++
++// https://datatracker.ietf.org/doc/html/rfc8949.html#section-3
++std::optional<std::pair<CBORType, uint64_t>>
++InputReader::ReadTypeAndArgument() {
++  std::optional<uint8_t> first_byte = ReadByte();
++  if (!first_byte) {
++    return std::nullopt;
++  }
++
++  // There are more CBOR types in the standard than we accept. To avoid mishits
++  // during `static_cast<CBORType>`, it's safer to validate the type beforehand.
++  uint8_t type_byte = (*first_byte & cbor::constants::kMajorTypeMask) >>
++                      cbor::constants::kMajorTypeBitShift;
++  if (!std::ranges::contains(kAcceptedCBORTypes, type_byte,
++                             &std::to_underlying<CBORType>)) {
++    return std::nullopt;
++  }
++
++  CBORType type = static_cast<CBORType>(type_byte);
++  uint8_t b = *first_byte & cbor::constants::kAdditionalInformationMask;
++
++  if (b <= 23) {
++    return std::make_pair(type, b);
++  }
++  if (b == 24) {
++    auto content = ReadByte();
++    if (!content || *content < 24) {
++      return std::nullopt;
++    }
++    return std::make_pair(type, *content);
++  }
++  if (b == 25) {
++    uint16_t content;
++    if (!ReadBigEndian(&content) || content >> 8 == 0) {
++      return std::nullopt;
++    }
++    return std::make_pair(type, content);
++  }
++  if (b == 26) {
++    uint32_t content;
++    if (!ReadBigEndian(&content) || content >> 16 == 0) {
++      return std::nullopt;
++    }
++    return std::make_pair(type, content);
++  }
++  if (b == 27) {
++    uint64_t content;
++    if (!ReadBigEndian(&content) || content >> 32 == 0) {
++      return std::nullopt;
++    }
++    return std::make_pair(type, content);
++  }
++  return std::nullopt;
++}
++
++}  // namespace web_package
+--- a/components/web_package/input_reader.h
++++ b/components/web_package/input_reader.h
+@@ -0,0 +1,113 @@
++// Copyright 2022 The Chromium Authors
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef COMPONENTS_WEB_PACKAGE_INPUT_READER_H_
++#define COMPONENTS_WEB_PACKAGE_INPUT_READER_H_
++
++#include <optional>
++#include <string_view>
++#include <variant>
++
++#include "base/containers/span.h"
++#include "base/containers/span_reader.h"
++#include "base/memory/stack_allocated.h"
++#include "base/types/id_type.h"
++
++namespace web_package {
++
++// https://datatracker.ietf.org/doc/html/rfc8949.html#section-3.1
++enum class CBORType {
++  kUnsignedInt = 0,
++  kNegativeInt = 1,
++  kByteString = 2,
++  kTextString = 3,
++  kArray = 4,
++  kMap = 5,
++  // kTag = 6,
++  kSimpleValue = 7,
++  // kFloatValue = 7,
++};
++
++struct CBORHeader {
++  struct StringInfo {
++    enum class StringType {
++      kByteString,
++      kTextString,
++    } type;
++    uint64_t byte_length;
++  };
++  struct ContainerInfo {
++    enum class ContainerType {
++      kArray,
++      kMap,
++    } type;
++    uint64_t size;
++  };
++
++  const std::variant<bool, int64_t, StringInfo, ContainerInfo> data;
++};
++
++// The maximum length of the CBOR item header (type and argument).
++// https://datatracker.ietf.org/doc/html/rfc8949.html#section-3
++// When the additional information (the low-order 5 bits of the first
++// byte) is 27, the argument's value is held in the following 8 bytes.
++constexpr uint64_t kMaxCBORItemHeaderSize = 9;
++
++// A utility class for reading various values from input buffer.
++class InputReader {
++  STACK_ALLOCATED();
++
++ public:
++  explicit InputReader(base::span<const uint8_t> buf);
++
++  InputReader(const InputReader&) = delete;
++  InputReader& operator=(const InputReader&) = delete;
++
++  ~InputReader();
++
++  size_t CurrentOffset() const { return buf_.num_read(); }
++  size_t Size() const { return buf_.remaining(); }
++
++  std::optional<uint8_t> ReadByte();
++
++  template <typename T>
++    requires(std::is_integral_v<T> && std::is_unsigned_v<T>)
++  bool ReadBigEndian(T* out) {
++    if constexpr (sizeof(T) == 1) {
++      return buf_.ReadU8BigEndian(*out);
++    } else if constexpr (sizeof(T) == 2) {
++      return buf_.ReadU16BigEndian(*out);
++    } else if constexpr (sizeof(T) == 4) {
++      return buf_.ReadU32BigEndian(*out);
++    } else {
++      static_assert(sizeof(T) == 8);
++      return buf_.ReadU64BigEndian(*out);
++    }
++  }
++
++  std::optional<base::span<const uint8_t>> ReadBytes(size_t n);
++
++  std::optional<std::string_view> ReadString(size_t n);
++
++  // Parses the type and argument of a CBOR item from the input head. If parsed
++  // successfully and the type matches `expected_type`, returns the argument.
++  // Otherwise returns nullopt.
++  std::optional<uint64_t> ReadCBORHeader(CBORType expected_type);
++
++  // Parses the type and argument of a CBOR item from the input head. If parsed
++  // successfully, returns type and:
++  //  * value for kUnsignedInt/kNegativeInt;
++  //  * value_size for kTextString/kByteString/kMap/kArray.
++  // Otherwise returns nullopt.
++  std::optional<CBORHeader> ReadCBORHeader();
++
++ private:
++  std::optional<std::pair<CBORType, uint64_t>> ReadTypeAndArgument();
++
++  base::SpanReader<const uint8_t> buf_;
++};
++
++}  // namespace web_package
++
++#endif  // COMPONENTS_WEB_PACKAGE_INPUT_READER_H_
 --- a/components/web_package/signed_web_bundles/ecdsa_p256_sha256_signature.cc
 +++ b/components/web_package/signed_web_bundles/ecdsa_p256_sha256_signature.cc
 @@ -9,7 +9,8 @@
@@ -134,7 +684,7 @@ ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chr
  }  // namespace web_package
 --- a/components/web_package/signed_web_bundles/integrity_block_parser.cc
 +++ b/components/web_package/signed_web_bundles/integrity_block_parser.cc
-@@ -4,17 +4,19 @@
+@@ -4,16 +4,19 @@
  
  #include "components/web_package/signed_web_bundles/integrity_block_parser.h"
  
@@ -151,13 +701,13 @@ ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chr
 +#include "base/strings/to_string.h"
  #include "base/types/expected.h"
  #include "base/types/expected_macros.h"
- #include "components/cbor/reader.h"
++#include "components/cbor/reader.h"
 +#include "components/cbor/writer.h"
 +#include "components/web_package/mojom/web_bundle_parser.mojom-forward.h"
  #include "components/web_package/mojom/web_bundle_parser.mojom.h"
  #include "components/web_package/signed_web_bundles/constants.h"
  #include "components/web_package/signed_web_bundles/ecdsa_p256_public_key.h"
-@@ -22,56 +24,11 @@
+@@ -21,56 +24,11 @@
  #include "components/web_package/signed_web_bundles/ed25519_public_key.h"
  #include "components/web_package/signed_web_bundles/ed25519_signature.h"
  #include "components/web_package/signed_web_bundles/integrity_block_attributes.h"
@@ -214,7 +764,7 @@ ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chr
  IntegrityBlockParser::IntegrityBlockParser(
      mojom::BundleDataSource& data_source,
      WebBundleParser::ParseIntegrityBlockCallback callback)
-@@ -103,37 +60,103 @@ void IntegrityBlockParser::OnIntegrityBl
+@@ -102,37 +60,103 @@ void IntegrityBlockParser::OnIntegrityBl
      RunErrorCallback("Error reading the integrity block.");
      return;
    }
@@ -343,7 +893,7 @@ ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chr
    }
  
    std::move(complete_callback_)
-@@ -141,13 +164,74 @@ void IntegrityBlockParser::OnIntegrityBl
+@@ -140,13 +164,74 @@ void IntegrityBlockParser::OnIntegrityBl
                            std::move(integrity_block), nullptr));
  }
  
@@ -462,7 +1012,7 @@ ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chr
  
 --- a/components/web_package/signed_web_bundles/rust/BUILD.gn
 +++ b/components/web_package/signed_web_bundles/rust/BUILD.gn
-@@ -10,7 +10,6 @@ rust_static_library("signed_web_bundles_
+@@ -11,7 +11,6 @@ rust_static_library("signed_web_bundles_
    sources = [
      "constants.rs",
      "integrity_block.rs",
@@ -555,8 +1105,8 @@ ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chr
    return digest;
  }
  
---- a/components/web_package/signed_web_bundles/signed_web_bundle_utils.cc
-+++ b/components/web_package/signed_web_bundles/signed_web_bundle_utils.cc
+--- a/components/web_package/signed_web_bundles/signed_web_bundle_utils.cc	
++++ b/components/web_package/signed_web_bundles/signed_web_bundle_utils.cc	
 @@ -5,18 +5,37 @@
  #include "components/web_package/signed_web_bundles/signed_web_bundle_utils.h"
  
@@ -601,120 +1151,993 @@ ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chr
  }
  
  }  // namespace web_package
---- a/components/webapps/isolated_web_apps/bundle_operations/bundle_operations.cc
-+++ b/components/webapps/isolated_web_apps/bundle_operations/bundle_operations.cc
-@@ -79,16 +79,7 @@ void ReadSignedWebBundleIdInsecurely(
-     const base::FilePath& path,
-     base::OnceCallback<void(base::expected<web_package::SignedWebBundleId,
-                                            std::string>)> callback) {
--  UnsecureSignedWebBundleIdReader::GetWebBundleId(
--      path,
--      base::BindOnce([](base::expected<web_package::SignedWebBundleId,
--                                       UnusableSwbnFileError> result) {
--        return result.transform_error([](const UnusableSwbnFileError& error) {
--          return "Failed to read the integrity block of the "
--                 "signed web bundle: " +
--                 error.message();
+--- a/components/web_package/web_bundle_parser.cc
++++ b/components/web_package/web_bundle_parser.cc
+@@ -7,33 +7,175 @@
+ #include <algorithm>
+ #include <memory>
+ #include <optional>
+-#include <string>
+ #include <string_view>
+-#include <utility>
+-#include <vector>
+ 
+ #include "base/check.h"
+ #include "base/compiler_specific.h"
+-#include "base/containers/flat_map.h"
++#include "base/containers/span.h"
+ #include "base/functional/bind.h"
+ #include "base/functional/callback.h"
+ #include "base/logging.h"
+-#include "base/memory/raw_ref.h"
+ #include "base/memory/weak_ptr.h"
+ #include "base/notreached.h"
+-#include "base/numerics/safe_conversions.h"
+-#include "base/strings/strcat.h"
++#include "base/numerics/checked_math.h"
++#include "base/strings/string_number_conversions.h"
+ #include "base/strings/string_util.h"
+-#include "base/strings/string_view_util.h"
++#include "base/strings/stringprintf.h"
++#include "components/cbor/reader.h"
++#include "components/web_package/input_reader.h"
+ #include "components/web_package/mojom/web_bundle_parser.mojom.h"
+-#include "components/web_package/rust/web_package_rust.h"
+ #include "components/web_package/signed_web_bundles/integrity_block_parser.h"
++#include "components/web_package/web_bundle_utils.h"
+ #include "mojo/public/cpp/bindings/remote.h"
++#include "net/http/http_util.h"
+ 
+ namespace web_package {
+ 
+ namespace {
+ 
++// The number of bytes used to specify the length of the web bundle.
++// https://www.ietf.org/archive/id/draft-ietf-wpack-bundled-responses-01.html#name-trailing-length
++constexpr uint64_t kTrailingLengthNumBytes = 8;
++
++// The maximum size of the section-lengths CBOR item.
++constexpr uint64_t kMaxSectionLengthsCBORSize = 8192;
++
++// The maximum size of a metadata section allowed in this implementation.
++constexpr uint64_t kMaxMetadataSectionSize = 1 * 1024 * 1024;
++
++// The maximum size of the response header CBOR.
++constexpr uint64_t kMaxResponseHeaderLength = 512 * 1024;
++
++// The initial buffer size for reading an item from the response section.
++constexpr uint64_t kInitialBufferSizeForResponse = 4096;
++
++// The first byte of WebBundle format >=b2 (Array of length 5).
++constexpr uint8_t kBundleHeadByte = 0x85;
++// The first byte of WebBundle format b1 (Array of length 6).
++constexpr uint8_t kBundleB1HeadByte = 0x86;
++
++// CBOR of the magic string "🌐📦".
++// MetadataParser::ParseMagicBytes() checks the first byte (0x85) and this.
++//
++// The first 10 bytes of the web bundle format are:
++//   85                             -- Array of length 5
++//      48                          -- Byte string of length 8
++//         F0 9F 8C 90 F0 9F 93 A6  -- "🌐📦" in UTF-8
++const uint8_t kBundleMagicBytes[] = {
++    0x48, 0xF0, 0x9F, 0x8C, 0x90, 0xF0, 0x9F, 0x93, 0xA6,
++};
++
++// CBOR of the version string "b2\0\0".
++//   44               -- Byte string of length 4
++//       62 32 00 00  -- "b2\0\0"
++const uint8_t kVersionB2MagicBytes[] = {
++    0x44, 0x62, 0x32, 0x00, 0x00,
++};
++// CBOR of the version string "b1\0\0".
++//   44               -- Byte string of length 4
++//       62 31 00 00  -- "b1\0\0"
++const uint8_t kVersionB1MagicBytes[] = {
++    0x44, 0x62, 0x31, 0x00, 0x00,
++};
++
++// Section names.
++constexpr char kCriticalSection[] = "critical";
++constexpr char kIndexSection[] = "index";
++constexpr char kPrimarySection[] = "primary";
++constexpr char kResponsesSection[] = "responses";
++
++// A list of (section-name, length) pairs.
++using SectionLengths = std::vector<std::pair<std::string, uint64_t>>;
++
++// A map from section name to (offset, length) pair.
++using SectionOffsets = std::map<std::string, std::pair<uint64_t, uint64_t>>;
++
++bool IsMetadataSection(const std::string& name) {
++  return (name == kCriticalSection || name == kIndexSection ||
++          name == kPrimarySection);
++}
++
++// Parses a `section-lengths` CBOR item.
++// https://www.ietf.org/archive/id/draft-ietf-wpack-bundled-responses-01.html#name-bundle-sections
++//   section-lengths = [* (section-name: tstr, length: uint) ]
++std::optional<SectionLengths> ParseSectionLengths(
++    base::span<const uint8_t> data) {
++  cbor::Reader::DecoderError error;
++  std::optional<cbor::Value> value = cbor::Reader::Read(data, &error);
++  if (!value.has_value() || !value->is_array()) {
++    return std::nullopt;
++  }
++
++  const cbor::Value::ArrayValue& array = value->GetArray();
++  if (array.size() % 2 != 0) {
++    return std::nullopt;
++  }
++
++  SectionLengths result;
++  for (size_t i = 0; i < array.size(); i += 2) {
++    if (!array[i].is_string() || !array[i + 1].is_unsigned()) {
++      return std::nullopt;
++    }
++    result.emplace_back(array[i].GetString(), array[i + 1].GetUnsigned());
++  }
++  return result;
++}
++
++struct ParsedHeaders {
++  base::flat_map<std::string, std::string> headers;
++  base::flat_map<std::string, std::string> pseudos;
++};
++
++// https://www.ietf.org/archive/id/draft-ietf-wpack-bundled-responses-01.html#name-responses
++//   headers = {* bstr => bstr}
++std::optional<ParsedHeaders> ConvertCBORValueToHeaders(
++    const cbor::Value& headers_value) {
++  // |headers_value| of headers must be a map.
++  if (!headers_value.is_map()) {
++    return std::nullopt;
++  }
++
++  ParsedHeaders result;
++
++  for (const auto& item : headers_value.GetMap()) {
++    if (!item.first.is_bytestring() || !item.second.is_bytestring()) {
++      return std::nullopt;
++    }
++    std::string_view name = item.first.GetBytestringAsString();
++    std::string_view value = item.second.GetBytestringAsString();
++
++    // If name contains any upper-case or non-ASCII characters, return an error.
++    // This matches the requirement in Section 8.1.2 of [RFC7540].
++    if (!base::IsStringASCII(name) ||
++        std::ranges::any_of(name, base::IsAsciiUpper<char>)) {
++      return std::nullopt;
++    }
++
++    if (!name.empty() && name[0] == ':') {
++      // pseudos[name] must not exist, because CBOR maps cannot contain
++      // duplicate keys. This is ensured by cbor::Reader.
++      DCHECK(!result.pseudos.contains(name));
++      result.pseudos.insert(
++          std::make_pair(std::string(name), std::string(value)));
++      continue;
++    }
++
++    // Both name and value must be valid.
++    if (!net::HttpUtil::IsValidHeaderName(name) ||
++        !net::HttpUtil::IsValidHeaderValue(value)) {
++      return std::nullopt;
++    }
++
++    // headers[name] must not exist, because CBOR maps cannot contain duplicate
++    // keys. This is ensured by cbor::Reader.
++    DCHECK(!result.headers.contains(name));
++
++    result.headers.insert(
++        std::make_pair(std::string(name), std::string(value)));
++  }
++
++  return result;
++}
+ 
+ GURL ParseExchangeURL(std::string_view str, const GURL& base_url) {
+   DCHECK(base_url.is_empty() || base_url.is_valid());
+@@ -128,9 +270,7 @@ class WebBundleParser::MetadataParser
+       RunErrorCallback("Error reading bundle length.");
+       return;
+     }
+-    const uint64_t unsigned_file_length =
+-        base::checked_cast<uint64_t>(file_length);
+-    if (unsigned_file_length < rust::TRAILING_LENGTH_NUM_BYTES) {
++    if (static_cast<uint64_t>(file_length) < kTrailingLengthNumBytes) {
+       RunErrorCallback("Error reading bundle length.");
+       return;
+     }
+@@ -138,10 +278,9 @@ class WebBundleParser::MetadataParser
+     // Read the last 8 bytes of the file that correspond to the trailing length
+     // field of the web bundle.
+     data_source_->get()->Read(
+-        unsigned_file_length - rust::TRAILING_LENGTH_NUM_BYTES,
+-        rust::TRAILING_LENGTH_NUM_BYTES,
++        file_length - kTrailingLengthNumBytes, kTrailingLengthNumBytes,
+         base::BindOnce(&MetadataParser::ParseWebBundleLength,
+-                       weak_factory_.GetWeakPtr(), unsigned_file_length));
++                       weak_factory_.GetWeakPtr(), file_length));
+   }
+ 
+   void ParseWebBundleLength(const uint64_t file_length,
+@@ -156,20 +295,30 @@ class WebBundleParser::MetadataParser
+     // the start of the bundle, instead of assuming that the start of the file
+     // is also the start of the bundle. This allows the bundle to be appended to
+     // another format such as a generic self-extracting executable."
+-    // https://www.ietf.org/archive/id/draft-ietf-wpack-bundled-responses-01.html#name-trailing-length
+-    auto bundle_offset = rust::parse_trailing_length(*data, file_length);
+-    if (!bundle_offset.has_value()) {
+-      RunErrorCallback(bundle_offset.error().message);
++    // https://www.ietf.org/archive/id/draft-ietf-wpack-bundled-responses-01.html#section-4.1.1-3
++    InputReader input(*data);
++    uint64_t web_bundle_length;
++    if (!input.ReadBigEndian(&web_bundle_length)) {
++      RunErrorCallback("Error reading bundle length.");
++      return;
++    }
++
++    if (web_bundle_length > file_length) {
++      RunErrorCallback("Invalid bundle length.");
+       return;
+     }
+-    ReadMagicBytes(*bundle_offset);
++    const uint64_t web_bundle_offset = file_length - web_bundle_length;
++    ReadMagicBytes(web_bundle_offset);
+   }
+ 
+   void ReadMagicBytes(const uint64_t offset_in_stream) {
+     // First, we will parse the CBOR header of the top level array (1-byte),
+     // `magic`, `version`, and the CBOR header of `section-lengths`.
++    const uint64_t length = 1 + sizeof(kBundleMagicBytes) +
++                            sizeof(kVersionB2MagicBytes) +
++                            kMaxCBORItemHeaderSize;
+     data_source_->get()->Read(
+-        offset_in_stream, rust::INITIAL_BUNDLE_HEADER_BUFFER_SIZE,
++        offset_in_stream, length,
+         base::BindOnce(&MetadataParser::ParseMagicBytes,
+                        weak_factory_.GetWeakPtr(), offset_in_stream));
+   }
+@@ -182,23 +331,83 @@ class WebBundleParser::MetadataParser
+       return;
+     }
+ 
+-    auto res = rust::parse_magic_and_version(*data, offset_in_stream);
+-    if (!res.has_value()) {
+-      const auto& error = res.error();
+-      RunErrorCallback(error.message,
+-                       error.is_version_error
+-                           ? mojom::BundleParseErrorType::kVersionError
+-                           : mojom::BundleParseErrorType::kFormatError);
++    InputReader input(*data);
++
++    // Read the first byte denoting a CBOR array size. It must be equal to 0x85
++    // (5).
++    const auto array_size = input.ReadByte();
++    if (!array_size) {
++      RunErrorCallback("Missing CBOR array size byte.");
+       return;
+     }
+ 
+-    uint64_t next_offset = res->next_read_offset;
+-    uint64_t next_length = res->next_read_length;
++    // Let kBundleB1HeadByte pass this check, to report custom error message for
++    // b1 bundles.
++    if (*array_size != kBundleHeadByte && *array_size != kBundleB1HeadByte) {
++      RunErrorCallback("Wrong magic bytes.");
++      return;
++    }
++
++    // Check the magic bytes "48 F0 9F 8C 90 F0 9F 93 A6".
++    const auto magic = input.ReadBytes(sizeof(kBundleMagicBytes));
++    if (!magic || !std::ranges::equal(*magic, kBundleMagicBytes)) {
++      RunErrorCallback("Wrong magic bytes.");
++      return;
++    }
++
++    // Let version be the result of reading 5 bytes from stream.
++    const auto version = input.ReadBytes(sizeof(kVersionB2MagicBytes));
++    if (!version) {
++      RunErrorCallback("Cannot read version bytes.");
++      return;
++    }
++    if (!std::ranges::equal(*version, kVersionB2MagicBytes)) {
++      const char* message;
++      if (std::ranges::equal(*version, kVersionB1MagicBytes)) {
++        message =
++            "Bundle format version is 'b1' which is no longer supported."
++            " Currently supported version is: 'b2'";
++      } else {
++        message =
++            "Version error: bundle format does not correspond to the specifed "
++            "version. Currently supported version is: 'b2'";
++      }
++      RunErrorCallback(message, mojom::BundleParseErrorType::kVersionError);
++      return;
++    }
++    if (*array_size != kBundleHeadByte) {
++      RunErrorCallback("Wrong CBOR array size of the top-level structure");
++      return;
++    }
++
++    const auto section_lengths_length =
++        input.ReadCBORHeader(CBORType::kByteString);
++    if (!section_lengths_length) {
++      RunErrorCallback("Cannot parse the size of section-lengths.");
++      return;
++    }
++
++    // https://www.ietf.org/archive/id/draft-ietf-wpack-bundled-responses-01.html#name-top-level-structure
++    // "The section-lengths array is embedded in a byte string to facilitate
++    // reading it from a network. This byte string MUST be less than 8192
++    // (8*1024) bytes long, and parsers MUST NOT load any data from a
++    // section-lengths item longer than this."
++    if (*section_lengths_length >= kMaxSectionLengthsCBORSize) {
++      RunErrorCallback(
++          "The section-lengths CBOR must be smaller than 8192 bytes.");
++      return;
++    }
++
++    // In the next step, we will parse the content of `section-lengths`,
++    // and the CBOR header of `sections`.
++    const uint64_t length = *section_lengths_length + kMaxCBORItemHeaderSize;
++
++    offset_in_stream += input.CurrentOffset();
+     data_source_->get()->Read(
+-        next_offset, next_length,
++        offset_in_stream, length,
+         base::BindOnce(&MetadataParser::ParseBundleHeader,
+-                       weak_factory_.GetWeakPtr(), next_offset,
+-                       res->section_lengths_len));
++                       weak_factory_.GetWeakPtr(), offset_in_stream,
++                       *section_lengths_length));
+   }
+ 
+   void ParseBundleHeader(uint64_t offset_in_stream,
+@@ -208,39 +417,109 @@ class WebBundleParser::MetadataParser
+       RunErrorCallback("Error reading bundle header.");
+       return;
+     }
++    InputReader input(*data);
++
++    // webbundle = [
++    //    magic: h'F0 9F 8C 90 F0 9F 93 A6',
++    //    version: bytes .size 4,
++    //    section-lengths: bytes .cbor section-lengths,  <==== here
++    //    sections: [* any ],
++    //    length: bytes .size 8,  ; Big-endian number of bytes in the bundle.
++    // ]
++    const auto section_lengths_bytes = input.ReadBytes(section_lengths_length);
++    if (!section_lengths_bytes) {
++      RunErrorCallback("Cannot read section-lengths.");
++      return;
++    }
++    // https://www.ietf.org/archive/id/draft-ietf-wpack-bundled-responses-01.html#name-bundle-sections
++    //   section-lengths = [* (section-name: tstr, length: uint) ]
++    const auto section_lengths = ParseSectionLengths(*section_lengths_bytes);
++    if (!section_lengths) {
++      RunErrorCallback("Cannot parse section-lengths.");
++      return;
++    }
++
++    // webbundle = [
++    //    magic: h'F0 9F 8C 90 F0 9F 93 A6',
++    //    version: bytes .size 4,
++    //    section-lengths: bytes .cbor section-lengths,
++    //    sections: [* any ],  <==== here
++    //    length: bytes .size 8,  ; Big-endian number of bytes in the bundle.
++    // ]
++    const auto num_sections = input.ReadCBORHeader(CBORType::kArray);
++    if (!num_sections) {
++      RunErrorCallback("Cannot parse the number of sections.");
++      return;
++    }
+ 
+-    auto res = rust::parse_bundle_header(*data, section_lengths_length,
+-                                         offset_in_stream);
+-    if (!res.has_value()) {
+-      RunErrorCallback(res.error().message);
++    // "The sections array contains the sections' content. The length of this
++    // array MUST be exactly half the length of the section-lengths array, and
++    // parsers MUST NOT load any data if that is not the case."
++    if (*num_sections != section_lengths->size()) {
++      RunErrorCallback("Unexpected number of sections.");
+       return;
+     }
+ 
+-    responses_section_offset_ = res->responses_offset;
+-    responses_section_length_ = res->responses_length;
+-    metadata_sections_to_read_ = std::move(res->metadata_sections);
++    const uint64_t sections_start = offset_in_stream + input.CurrentOffset();
++    uint64_t current_offset = sections_start;
++
++    // Convert |section_lengths| to |section_offsets_|.
++    for (const auto& pair : *section_lengths) {
++      const std::string& name = pair.first;
++      const uint64_t length = pair.second;
++      bool added = section_offsets_
++                       .insert(std::make_pair(
++                           name, std::make_pair(current_offset, length)))
++                       .second;
++      if (!added) {
++        RunErrorCallback("Duplicated section.");
++        return;
++      }
++
++      if (!base::CheckAdd(current_offset, length)
++               .AssignIfValid(&current_offset)) {
++        RunErrorCallback("Integer overflow calculating section offsets.");
++        return;
++      }
++    }
++
++    // "The "responses" section MUST appear after the other three sections
++    // defined here, and parsers MUST NOT load any data if that is not the
++    // case."
++    if (section_lengths->empty() ||
++        section_lengths->back().first != kResponsesSection) {
++      RunErrorCallback("Responses section is not the last in section-lengths.");
++      return;
++    }
+ 
++    // Initialize |metadata_|.
+     metadata_ = mojom::BundleMetadata::New();
+     metadata_->version = mojom::BundleFormatVersion::kB2;
+ 
+-    ReadMetadataSections(/*section_index=*/0);
++    ReadMetadataSections(section_offsets_.begin());
+   }
+ 
+   // https://www.ietf.org/archive/id/draft-ietf-wpack-bundled-responses-01.html#name-bundle-sections
+-  void ReadMetadataSections(size_t section_index) {
+-    if (section_index < metadata_sections_to_read_.size()) {
+-      const auto& section = metadata_sections_to_read_[section_index];
+-      if (section.length > rust::MAX_METADATA_SECTION_SIZE) {
++  void ReadMetadataSections(SectionOffsets::const_iterator section_iter) {
++    for (; section_iter != section_offsets_.end(); ++section_iter) {
++      const auto& name = section_iter->first;
++      if (!IsMetadataSection(name)) {
++        continue;
++      }
++      const uint64_t section_offset = section_iter->second.first;
++      const uint64_t section_length = section_iter->second.second;
++      if (section_length > kMaxMetadataSectionSize) {
+         RunErrorCallback(
+             "Metadata sections larger than 1MB are not supported.");
+         return;
+       }
+ 
+       data_source_->get()->Read(
+-          section.offset, section.length,
++          section_offset, section_length,
+           base::BindOnce(&MetadataParser::ParseMetadataSection,
+-                         weak_factory_.GetWeakPtr(), section_index,
+-                         section.length));
++                         weak_factory_.GetWeakPtr(), section_iter,
++                         section_length));
++      // This loop will be resumed by ParseMetadataSection().
+       return;
+     }
+ 
+@@ -253,7 +532,7 @@ class WebBundleParser::MetadataParser
+     RunSuccessCallback();
+   }
+ 
+-  void ParseMetadataSection(size_t section_index,
++  void ParseMetadataSection(SectionOffsets::const_iterator section_iter,
+                             uint64_t expected_data_length,
+                             const std::optional<std::vector<uint8_t>>& data) {
+     if (!data || data->size() != expected_data_length) {
+@@ -261,56 +540,152 @@ class WebBundleParser::MetadataParser
+       return;
+     }
+ 
+-    const auto& name = metadata_sections_to_read_[section_index].name;
+-    if (name == rust::INDEX_SECTION) {
+-      auto res = rust::parse_index_section(*data, responses_section_offset_,
+-                                           responses_section_length_);
+-      if (!res.has_value()) {
+-        RunErrorCallback(res.error().message);
++    // Parse the section contents as a CBOR item.
++    cbor::Reader::DecoderError error;
++    std::optional<cbor::Value> section_value =
++        cbor::Reader::Read(*data, &error);
++    if (!section_value) {
++      RunErrorCallback(std::string("Error parsing section contents as CBOR: ") +
++                       cbor::Reader::ErrorCodeToString(error));
++      return;
++    }
++
++    const auto& name = section_iter->first;
++    // Note: Parse*Section() delete |this| on failure.
++    if (name == kIndexSection) {
++      if (!ParseIndexSection(*section_value)) {
+         return;
+       }
+-      std::vector<std::pair<GURL, mojom::BundleResponseLocationPtr>> requests;
+-      requests.reserve(res->size());
+-      for (const auto& entry : *res) {
+-        GURL parsed_url = ParseExchangeURL(entry.url, base_url_);
+-        if (!parsed_url.is_valid()) {
+-          std::string message = base::StrCat({"Index section: exchange URL \"",
+-                                              entry.url, "\" is not valid."});
+-          if (base_url_.is_empty()) {
+-            message += " (Relative URLs are not allowed in this context.)";
+-          }
+-          RunErrorCallback(message);
+-          return;
+-        }
+-        requests.emplace_back(
+-            std::move(parsed_url),
+-            mojom::BundleResponseLocation::New(entry.offset, entry.length));
+-      }
+-      metadata_->requests =
+-          base::flat_map<GURL, mojom::BundleResponseLocationPtr>(
+-              std::move(requests));
+-    } else if (name == rust::CRITICAL_SECTION) {
+-      if (auto res = rust::parse_critical_section(*data); !res.has_value()) {
+-        RunErrorCallback(res.error().message);
++    } else if (name == kCriticalSection) {
++      if (!ParseCriticalSection(*section_value)) {
+         return;
+       }
+-    } else if (name == rust::PRIMARY_SECTION) {
+-      auto res = rust::parse_primary_section(*data);
+-      if (!res.has_value()) {
+-        RunErrorCallback(res.error().message);
++    } else if (name == kPrimarySection) {
++      if (!ParsePrimarySection(*section_value)) {
+         return;
+       }
+-      GURL parsed_url = ParseExchangeURL(*res, base_url_);
+-      if (!parsed_url.is_valid()) {
+-        RunErrorCallback("Primary URL is not a valid exchange URL.");
+-        return;
+-      }
+-      metadata_->primary_url = std::move(parsed_url);
+     } else {
+       NOTREACHED();
+     }
+     // Read the next metadata section.
+-    ReadMetadataSections(section_index + 1);
++    ReadMetadataSections(++section_iter);
++  }
++
++  // https://www.ietf.org/archive/id/draft-ietf-wpack-bundled-responses-01.html#name-the-index-section
++  // The index section has the following structure:
++  //   index = {* whatwg-url => [ location-in-responses ] }
++  //   location-in-responses = (offset: uint, length: uint)
++  bool ParseIndexSection(const cbor::Value& section_value) {
++    // |section_value| of index section must be a map.
++    if (!section_value.is_map()) {
++      RunErrorCallback("Index section must be a map.");
++      return false;
++    }
++
++    base::flat_map<GURL, mojom::BundleResponseLocationPtr> requests;
++
++    auto responses_section = section_offsets_.find(kResponsesSection);
++    CHECK(responses_section != section_offsets_.end());
++    const uint64_t responses_section_offset = responses_section->second.first;
++    const uint64_t responses_section_length = responses_section->second.second;
++
++    // For each (url, responses) entry in the index map.
++    for (const auto& item : section_value.GetMap()) {
++      if (!item.first.is_string()) {
++        RunErrorCallback("Index section: key must be a string.");
++        return false;
++      }
++      if (!item.second.is_array()) {
++        RunErrorCallback("Index section: value must be an array.");
++        return false;
++      }
++      const std::string& url = item.first.GetString();
++      const cbor::Value::ArrayValue& responses_array = item.second.GetArray();
++
++      GURL parsed_url = ParseExchangeURL(url, base_url_);
++
++      if (!parsed_url.is_valid()) {
++        std::string message = base::StringPrintf(
++            "Index section: exchange URL \"%s\" is not valid.", url.c_str());
++        if (base_url_.is_empty()) {
++          message += " (Relative URLs are not allowed in this context.)";
++        }
++        RunErrorCallback(message);
++        return false;
++      }
++
++      if (responses_array.size() != 2) {
++        RunErrorCallback(
++            "Index section: the size of a response array per URL should be "
++            "exactly 2.");
++        return false;
++      }
++      if (!responses_array[0].is_unsigned() ||
++          !responses_array[1].is_unsigned()) {
++        RunErrorCallback(
++            "Index section: offset and length values must be unsigned.");
++        return false;
++      }
++      uint64_t offset = responses_array[0].GetUnsigned();
++      uint64_t length = responses_array[1].GetUnsigned();
++
++      uint64_t response_end;
++      if (!base::CheckAdd(offset, length).AssignIfValid(&response_end) ||
++          response_end > responses_section_length) {
++        RunErrorCallback("Index section: response out of range.");
++        return false;
++      }
++      uint64_t offset_within_stream = responses_section_offset + offset;
++
++      requests.insert(std::make_pair(
++          parsed_url,
++          mojom::BundleResponseLocation::New(offset_within_stream, length)));
++    }
++
++    metadata_->requests = std::move(requests);
++    return true;
++  }
++
++  // https://www.ietf.org/archive/id/draft-ietf-wpack-bundled-responses-01.html#critical-section
++  //   critical = [*tstr]
++  bool ParseCriticalSection(const cbor::Value& section_value) {
++    if (!section_value.is_array()) {
++      RunErrorCallback("Critical section must be an array.");
++      return false;
++    }
++    // "If the client has not implemented a section named by one of the items in
++    // this list, the client MUST fail to parse the bundle as a whole."
++    for (const cbor::Value& elem : section_value.GetArray()) {
++      if (!elem.is_string()) {
++        RunErrorCallback("Non-string element in the critical section.");
++        return false;
++      }
++      const auto& section_name = elem.GetString();
++      if (!IsMetadataSection(section_name) &&
++          section_name != kResponsesSection) {
++        RunErrorCallback("Unknown critical section.");
++        return false;
++      }
++    }
++    return true;
++  }
++
++  // https://github.com/WICG/webpackage/blob/main/extensions/primary-section.md
++  //  primary = whatwg-url
++  bool ParsePrimarySection(const cbor::Value& section_value) {
++    if (!section_value.is_string()) {
++      RunErrorCallback("Primary section must be a string.");
++      return false;
++    }
++
++    GURL parsed_url = ParseExchangeURL(section_value.GetString(), base_url_);
++
++    if (!parsed_url.is_valid()) {
++      RunErrorCallback("Primary URL is not a valid exchange URL.");
++      return false;
++    }
++    metadata_->primary_url = std::move(parsed_url);
++    return true;
+   }
+ 
+   void RunSuccessCallback() {
+@@ -319,14 +694,12 @@ class WebBundleParser::MetadataParser
+                             nullptr));
+   }
+ 
+-  void RunErrorCallback(std::string_view message,
++  void RunErrorCallback(const std::string& message,
+                         mojom::BundleParseErrorType error_type =
+                             mojom::BundleParseErrorType::kFormatError) {
+     DLOG(ERROR) << "Parsing web bundle error: " << message;
+-    // Avoids an extra temporary std::string allocation in Mojo's New().
+-    auto err = mojom::BundleMetadataParseError::New();
+-    err->type = error_type;
+-    err->message = message;
++    mojom::BundleMetadataParseErrorPtr err =
++        mojom::BundleMetadataParseError::New(error_type, message);
+     std::move(complete_callback_)
+         .Run(base::BindOnce(std::move(result_callback_), nullptr,
+                             std::move(err)));
+@@ -337,9 +710,7 @@ class WebBundleParser::MetadataParser
+   std::optional<uint64_t> start_reading_offset_;
+   ParseMetadataCallback result_callback_;
+   ParsingCompleteCallback complete_callback_;
+-  rs_std::Vec<rust::SectionOffsetEntry> metadata_sections_to_read_;
+-  uint64_t responses_section_offset_ = 0;
+-  uint64_t responses_section_length_ = 0;
++  SectionOffsets section_offsets_;
+   mojom::BundleMetadataPtr metadata_;
+   base::WeakPtrFactory<MetadataParser> weak_factory_{this};
+ };
+@@ -373,7 +744,7 @@ class WebBundleParser::ResponseParser
+       override {
+     CHECK(!result_callback_.is_null());
+     complete_callback_ = std::move(callback);
+-    StartWithBufferSize(rust::INITIAL_BUFFER_SIZE_FOR_RESPONSE);
++    StartWithBufferSize(kInitialBufferSizeForResponse);
+   }
+ 
+  private:
+@@ -384,36 +755,115 @@ class WebBundleParser::ResponseParser
+         base::BindOnce(&ResponseParser::ParseResponseHeader,
+                        weak_factory_.GetWeakPtr(), length));
+   }
++  // https://www.ietf.org/archive/id/draft-ietf-wpack-bundled-responses-01.html#name-responses
++  //   responses = [*response]
++  //   response = [headers: bstr .cbor headers, payload: bstr]
++  //   headers = {* bstr => bstr}
+   void ParseResponseHeader(uint64_t expected_data_length,
+                            const std::optional<std::vector<uint8_t>>& data) {
+     if (!data || data->size() != expected_data_length) {
+       RunErrorCallback("Error reading response header.");
+       return;
+     }
++    InputReader input(*data);
++
++    // |response| must be an array of length 2 (headers and payload).
++    auto num_elements = input.ReadCBORHeader(CBORType::kArray);
++    if (!num_elements || *num_elements != 2) {
++      RunErrorCallback("Array size of response must be 2.");
++      return;
++    }
+ 
+-    auto parse_res =
+-        rust::parse_response(*data, response_offset_, response_length_);
+-    if (!parse_res.has_value()) {
+-      RunErrorCallback(parse_res.error().message);
++    auto header_length = input.ReadCBORHeader(CBORType::kByteString);
++    if (!header_length) {
++      RunErrorCallback("Cannot parse response header length.");
+       return;
+     }
+-    if (parse_res->needs_more_data) {
++
++    // "The length of the headers byte string in a response MUST be less than
++    // 524288 (512*1024) bytes, and recipients MUST fail to load a response with
++    // longer headers"
++    if (*header_length >= kMaxResponseHeaderLength) {
++      RunErrorCallback("Response header is too big.");
++      return;
++    }
++
++    // If we don't have enough data for the headers and the CBOR header of the
++    // payload, re-read with a larger buffer size.
++    const uint64_t required_buffer_size = std::min(
++        input.CurrentOffset() + *header_length + kMaxCBORItemHeaderSize,
++        response_length_);
++    if (data->size() < required_buffer_size) {
+       DVLOG(1) << "Re-reading response header with a buffer of size "
+-               << parse_res->required_buffer_size;
+-      StartWithBufferSize(parse_res->required_buffer_size);
++               << required_buffer_size;
++      StartWithBufferSize(required_buffer_size);
++      return;
++    }
++
++    // Parse headers.
++    auto headers_bytes = input.ReadBytes(*header_length);
++    if (!headers_bytes) {
++      RunErrorCallback("Cannot read response headers.");
++      return;
++    }
++    cbor::Reader::DecoderError error;
++    std::optional<cbor::Value> headers_value =
++        cbor::Reader::Read(*headers_bytes, &error);
++    if (!headers_value) {
++      RunErrorCallback("Cannot parse response headers.");
++      return;
++    }
++
++    auto parsed_headers = ConvertCBORValueToHeaders(*headers_value);
++    if (!parsed_headers) {
++      RunErrorCallback("Cannot parse response headers.");
++      return;
++    }
++
++    // "Each response's headers MUST include a :status pseudo-header with
++    // exactly 3 ASCII decimal digits and MUST NOT include any other
++    // pseudo-headers."
++    const auto pseudo_status = parsed_headers->pseudos.find(":status");
++    if (parsed_headers->pseudos.size() != 1 ||
++        pseudo_status == parsed_headers->pseudos.end()) {
++      RunErrorCallback(
++          "Response headers map must have exactly one pseudo-header, :status.");
++      return;
++    }
++    int status;
++    const auto& status_str = pseudo_status->second;
++    if (status_str.size() != 3 ||
++        !std::ranges::all_of(status_str, base::IsAsciiDigit<char>) ||
++        !base::StringToInt(status_str, &status)) {
++      RunErrorCallback(":status must be 3 ASCII decimal digits.");
++      return;
++    }
++
++    // Parse payload.
++    auto payload_length = input.ReadCBORHeader(CBORType::kByteString);
++    if (!payload_length) {
++      RunErrorCallback("Cannot parse response payload length.");
++      return;
++    }
++
++    // "If a response's payload is not empty, its headers MUST include a
++    // Content-Type header (Section 8.3 of [I-D.ietf-httpbis-semantics])."
++    if (*payload_length > 0 &&
++        !parsed_headers->headers.contains("content-type")) {
++      RunErrorCallback("Non-empty response must have a content-type header.");
++      return;
++    }
++
++    if (input.CurrentOffset() + *payload_length != response_length_) {
++      RunErrorCallback("Unexpected payload length.");
+       return;
+     }
+ 
+     mojom::BundleResponsePtr response = mojom::BundleResponse::New();
+-    response->response_code = parse_res->response_code;
+-    response->response_headers = base::MakeFlatMap<std::string, std::string>(
+-        parse_res->headers, {}, [](const rust::HeaderEntry& header) {
+-          return std::make_pair(
+-              std::string(base::as_string_view(header.name.to_span())),
+-              std::string(base::as_string_view(header.value.to_span())));
 -        });
--      }).Then(std::move(callback)));
-+    std::move(callback);
- }
+-    response->payload_offset = parse_res->payload_offset;
+-    response->payload_length = parse_res->payload_length;
++    response->response_code = status;
++    response->response_headers = std::move(parsed_headers->headers);
++    response->payload_offset = response_offset_ + input.CurrentOffset();
++    response->payload_length = *payload_length;
+     RunSuccessCallback(std::move(response));
+   }
  
- void ValidateSignedWebBundleSignatures(
-@@ -96,20 +87,6 @@ void ValidateSignedWebBundleSignatures(
-     const base::FilePath& path,
-     const web_package::SignedWebBundleId& expected_web_bundle_id,
-     base::OnceCallback<void(IntegrityBlockResult)> callback) {
--  auto create_reader = base::BindOnce(
--      &SignedWebBundleReader::Create, path,
--      IwaOrigin(expected_web_bundle_id).origin().GetURL(),
--      /*verify_signatures=*/true,
--      base::BindOnce(&OnTrustAndSignaturesOfBundleChecked,
--                     browser_context->GetWeakPtr(), expected_web_bundle_id,
--                     std::move(callback)));
--
--  if (auto* provider = IwaClient::GetInstance()->GetRuntimeDataProvider()) {
--    provider->OnBestEffortRuntimeDataReady().Post(FROM_HERE,
--                                                  std::move(create_reader));
--  } else {
--    std::move(create_reader).Run();
--  }
- }
+@@ -423,15 +873,13 @@ class WebBundleParser::ResponseParser
+                             nullptr));
+   }
  
- void CloseBundle(content::BrowserContext* browser_context,
---- a/components/webapps/isolated_web_apps/reading/BUILD.gn
-+++ b/components/webapps/isolated_web_apps/reading/BUILD.gn
-@@ -14,8 +14,6 @@ source_set("reading") {
-     "response_reader_registry.h",
-     "response_reader_registry_factory.cc",
-     "response_reader_registry_factory.h",
--    "signed_web_bundle_reader.cc",
--    "signed_web_bundle_reader.h",
-     "validator.cc",
-     "validator.h",
+-  void RunErrorCallback(const std::string_view message,
++  void RunErrorCallback(const std::string& message,
+                         mojom::BundleParseErrorType error_type =
+                             mojom::BundleParseErrorType::kFormatError) {
+-    auto err = mojom::BundleResponseParseError::New();
+-    err->type = error_type;
+-    err->message = message;
+     std::move(complete_callback_)
+-        .Run(base::BindOnce(std::move(result_callback_), nullptr,
+-                            std::move(err)));
++        .Run(base::BindOnce(
++            std::move(result_callback_), nullptr,
++            mojom::BundleResponseParseError::New(error_type, message)));
+   }
+ 
+   const raw_ref<mojo::Remote<mojom::BundleDataSource>> data_source_;
+--- a/third_party/blink/renderer/core/BUILD.gn
++++ b/third_party/blink/renderer/core/BUILD.gn
+@@ -407,7 +407,6 @@ component("core") {
+   deps = [
+     ":font_resource",
+     ":generate_eventhandler_names",
+-    ":ift_custom_font_data",
+     ":make_deprecation_info",
+     ":xml_ffi",
+     "//base",
+@@ -463,7 +462,6 @@ component("core") {
+   allow_circular_includes_from = [
+     ":core_generated",
+     ":core_hot",
+-    ":ift_custom_font_data",
+     "//third_party/blink/renderer/core/animation",
+     "//third_party/blink/renderer/core/exported",
+     "//third_party/blink/renderer/core/probe",
+@@ -504,23 +502,6 @@ blink_core_sources("font_resource") {
+     "//third_party/blink/public/common",
+     "//third_party/blink/renderer/platform:font_rust_headers",
    ]
---- a/components/webapps/isolated_web_apps/reading/response_reader_factory.cc
-+++ b/components/webapps/isolated_web_apps/reading/response_reader_factory.cc
-@@ -45,19 +45,6 @@ void IsolatedWebAppResponseReaderFactory
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-   DCHECK(!web_bundle_id.is_for_proxy_mode());
- 
--  auto create_reader = base::BindOnce(
--      &SignedWebBundleReader::Create, web_bundle_path,
--      IwaOrigin(web_bundle_id).origin().GetURL(), verify_signatures,
--      base::BindOnce(&IsolatedWebAppResponseReaderFactory::OnReaderCreated,
--                     weak_ptr_factory_.GetWeakPtr(), web_bundle_path,
--                     web_bundle_id, std::move(callback)));
+-}
 -
--  if (auto* provider = IwaClient::GetInstance()->GetRuntimeDataProvider()) {
--    provider->OnBestEffortRuntimeDataReady().Post(FROM_HERE,
--                                                  std::move(create_reader));
--  } else {
--    std::move(create_reader).Run();
--  }
+-# Like ":font_resource", css/ift_custom_font_data.cc includes
+-# //third_party/blink/renderer/platform:font_rust_headers, so it is kept on a
+-# headerless target. Its header (in core's sources) only forward declares the
+-# Crubit-backed types. It includes core headers, so ":core" lists it in
+-# allow_circular_includes_from.
+-blink_core_sources("ift_custom_font_data") {
+-  public = []
+-  sources = [ "css/ift_custom_font_data.cc" ]
+-
+-  deps = [
+-    ":font_resource_header",
+-    "//services/network/public/cpp",
+-    "//third_party/blink/public/common",
+-    "//third_party/blink/renderer/platform:font_rust_headers",
+-  ]
  }
  
- void IsolatedWebAppResponseReaderFactory::OnReaderCreated(
---- a/services/data_decoder/data_decoder_service.cc
-+++ b/services/data_decoder/data_decoder_service.cc
-@@ -63,9 +63,6 @@ void DataDecoderService::BindXmlParser(
- void DataDecoderService::BindWebBundleParserFactory(
-     mojo::PendingReceiver<web_package::mojom::WebBundleParserFactory>
-         receiver) {
--  mojo::MakeSelfOwnedReceiver(
--      std::make_unique<web_package::WebBundleParserFactory>(),
--      std::move(receiver));
+ # Certain sources should be compiled with heavy optimization enabled.
+--- a/third_party/blink/renderer/core/css/build.gni
++++ b/third_party/blink/renderer/core/css/build.gni
+@@ -531,7 +531,6 @@ blink_core_sources_css = [
+   "hash_tools.h",
+   "if_condition.cc",
+   "if_condition.h",
+-  "ift_custom_font_data.h",
+   "inline_css_style_declaration.cc",
+   "inline_css_style_declaration.h",
+   "invalidation/invalidation_flags.cc",
+@@ -936,7 +935,6 @@ blink_core_tests_css = [
+   "font_size_functions_test.cc",
+   "font_update_invalidation_test.cc",
+   "force_dark_test.cc",
+-  "ift_custom_font_data_test.cc",
+   "invalidation/invalidation_set_test.cc",
+   "invalidation/pending_invalidations_test.cc",
+   "invalidation/style_invalidator_test.cc",
+--- a/third_party/blink/renderer/core/css/remote_font_face_source.cc
++++ b/third_party/blink/renderer/core/css/remote_font_face_source.cc
+@@ -14,7 +14,6 @@
+ #include "third_party/blink/renderer/core/css/css_custom_font_data.h"
+ #include "third_party/blink/renderer/core/css/css_font_face.h"
+ #include "third_party/blink/renderer/core/css/font_face_set_document.h"
+-#include "third_party/blink/renderer/core/css/ift_custom_font_data.h"
+ #include "third_party/blink/renderer/core/dom/document.h"
+ #include "third_party/blink/renderer/core/frame/local_dom_window.h"
+ #include "third_party/blink/renderer/core/frame/local_frame.h"
+@@ -219,9 +218,6 @@ void RemoteFontFaceSource::NotifyFinishe
+   DCHECK(!custom_font_data_);
+   if (resource->PassedIntegrityChecks() || !check_integrity) {
+     custom_font_data_ = font->GetCustomFontData();
+-    if (RuntimeEnabledFeatures::IncrementalFontTransferEnabled()) {
+-      ift_custom_font_data_ = IftCustomFontData::MaybeCreate(this, *font);
+-    }
+   }
+   url_ = resource->Url().GetString();
+ 
+@@ -349,9 +345,6 @@ const SimpleFontData* RemoteFontFaceSour
+ 
+   histograms_.RecordFallbackTime();
+ 
+-  CustomFontData* custom_font_data =
+-      ift_custom_font_data_ ? ift_custom_font_data_.Get()
+-                            : MakeGarbageCollected<CustomFontData>();
+   return MakeGarbageCollected<SimpleFontData>(
+       custom_font_data_->GetFontPlatformData(
+           font_description.EffectiveFontSize(),
+@@ -368,7 +361,7 @@ const SimpleFontData* RemoteFontFaceSour
+           font_description.ResolveFontFeatures(),
+           font_description.Orientation(), font_description.VariationSettings(),
+           font_description.GetFontPalette()),
+-      custom_font_data);
++      MakeGarbageCollected<CustomFontData>());
  }
  
- void DataDecoderService::BindGzipper(
---- a/services/network/web_bundle/web_bundle_url_loader_factory.cc
-+++ b/services/network/web_bundle/web_bundle_url_loader_factory.cc
-@@ -586,25 +586,6 @@ bool WebBundleURLLoaderFactory::HasError
- 
- void WebBundleURLLoaderFactory::SetBundleStream(
-     mojo::ScopedDataPipeConsumerHandle body) {
--  if (HasError())
--    return;
--  mojo::PendingRemote<web_package::mojom::BundleDataSource> data_source;
--  source_ = std::make_unique<BundleDataSource>(
--      data_source.InitWithNewPipeAndPassReceiver(), std::move(body),
--      std::move(web_bundle_memory_quota_consumer_),
--      base::BindOnce(&WebBundleURLLoaderFactory::OnMemoryQuotaExceeded,
--                     weak_ptr_factory_.GetWeakPtr()),
--      base::BindOnce(&WebBundleURLLoaderFactory::OnDataCompleted,
--                     weak_ptr_factory_.GetWeakPtr()));
--
--  mojo::MakeSelfOwnedReceiver(std::make_unique<web_package::WebBundleParser>(
--                                  std::move(data_source), bundle_url_),
--                              parser_.BindNewPipeAndPassReceiver());
--
--  parser_->ParseMetadata(
--      /*offset=*/std::nullopt,
--      base::BindOnce(&WebBundleURLLoaderFactory::OnMetadataParsed,
--                     weak_ptr_factory_.GetWeakPtr()));
+ const SimpleFontData* RemoteFontFaceSource::CreateLoadingFallbackFontData(
+@@ -451,7 +444,6 @@ void RemoteFontFaceSource::Trace(Visitor
+   visitor->Trace(face_);
+   visitor->Trace(font_selector_);
+   visitor->Trace(custom_font_data_);
+-  visitor->Trace(ift_custom_font_data_);
+   CSSFontFaceSource::Trace(visitor);
+   FontResourceClient::Trace(visitor);
  }
+--- a/third_party/blink/renderer/core/css/remote_font_face_source.h
++++ b/third_party/blink/renderer/core/css/remote_font_face_source.h
+@@ -18,7 +18,6 @@ class CSSFontFace;
+ class Document;
+ class FontCustomPlatformData;
+ class FontSelector;
+-class IftCustomFontData;
+ 
+ class RemoteFontFaceSource final : public CSSFontFaceSource,
+                                    public FontResourceClient {
+@@ -158,8 +157,6 @@ class RemoteFontFaceSource final : publi
+ 
+   // |nullptr| if font is not loaded or failed to decode.
+   Member<const FontCustomPlatformData> custom_font_data_;
+-  // |nullptr| if font is not an IFT font.
+-  Member<IftCustomFontData> ift_custom_font_data_;
+   // |nullptr| if font is not loaded or failed to decode.
+   String url_;
  
- mojo::PendingRemote<mojom::URLLoaderClient>
 --- a/third_party/blink/renderer/core/loader/resource/font_resource.cc
 +++ b/third_party/blink/renderer/core/loader/resource/font_resource.cc
 @@ -44,7 +44,6 @@
@@ -807,7 +2230,36 @@ ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chr
    bool cors_failed_;
 --- a/third_party/blink/renderer/platform/BUILD.gn
 +++ b/third_party/blink/renderer/platform/BUILD.gn
-@@ -186,6 +186,18 @@ group("make_platform_generated") {
+@@ -209,7 +209,6 @@ source_set("character_property_data") {
+ source_set("font_rust_headers") {
+   visibility += [ "//third_party/blink/renderer/core:*" ]
+   public = [
+-    "fonts/ift/ift_patcher.h",
+     "fonts/opentype/font_format_check.h",
+   ]
+   configs += [
+@@ -219,11 +218,9 @@ source_set("font_rust_headers") {
+     "//third_party/blink/renderer:non_test_config",
+   ]
+   public_deps = [
++    ":font_format_check",
+     ":platform_export",
+-    "fonts:font_format_bindings",
+-    "fonts:ift_patcher_bindings",
+     "//base",
+-    "//build/rust/crubit",
+     "//skia",
+     "//third_party/blink/renderer/platform/wtf",
+   ]
+@@ -233,7 +230,6 @@ source_set("font_rust_support") {
+   public = []
+   sources = [
+     "fonts/font_custom_platform_data.cc",
+-    "fonts/ift/ift_patcher.cc",
+     "fonts/opentype/font_format_check.cc",
+     "fonts/web_font_decoder.cc",
+     "fonts/web_font_typeface_factory.cc",
+@@ -258,6 +254,18 @@ source_set("font_rust_support") {
    ]
  }
  
@@ -818,53 +2270,65 @@ ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chr
 +  cxx_bindings = [ crate_root ]
 +  deps = [
 +    "//third_party/rust/font_types/v0_12:lib",
-+    "//third_party/rust/read_fonts/v0_43:lib",
-+    "//third_party/rust/skrifa/v0_46:lib",
++    "//third_party/rust/read_fonts/v0_45:lib",
++    "//third_party/rust/skrifa/v0_48:lib",
 +  ]
 +}
 +
  rust_static_library("rustfft_ffi") {
    allow_unsafe = true  # Needed for FFI that underpins the `cxx` crate.
    crate_root = "audio/rustfft_ffi.rs"
-@@ -253,7 +265,6 @@ group("blink_platform_public_deps") {
-     "//third_party/boringssl",
-     "//third_party/libwebp",
-     "//third_party/ots",
--    "//third_party/woff2:woff2_dec",
-     "//ui/gfx/animation/keyframe",
-     "//url",
-     "//v8",
-@@ -713,8 +724,6 @@ component("platform") {
-     "fonts/generic_font_family_settings.cc",
-     "fonts/generic_font_family_settings.h",
-     "fonts/glyph_metrics_map.h",
--    "fonts/ift/ift_patcher.cc",
--    "fonts/ift/ift_patcher.h",
-     "fonts/opentype/color_table_lookup.cc",
-     "fonts/opentype/color_table_lookup.h",
-     "fonts/opentype/font_format_check.cc",
-@@ -1795,7 +1804,6 @@ component("platform") {
-     ":allow_discouraged_type",
-     ":blink_platform_public_deps",
-     ":platform_export",
--    "//build/rust/crubit",
-     "//components/language_detection/core",
-     "//gpu/command_buffer/client:raster_interface",
-     "//media/capture:capture_lib",
-@@ -1822,9 +1830,8 @@ component("platform") {
-     "//ui/native_theme/features",
+@@ -2305,7 +2313,6 @@ source_set("blink_platform_unittests_sou
+     "fonts/font_test.cc",
+     "fonts/font_test_utilities.cc",
+     "fonts/generic_font_family_settings_test.cc",
+-    "fonts/ift/ift_patcher_test.cc",
+     "fonts/opentype/color_table_lookup_test.cc",
+     "fonts/opentype/font_format_check_test.cc",
+     "fonts/opentype/font_settings_test.cc",
+@@ -2604,12 +2611,10 @@ source_set("blink_platform_unittests_sou
    ]
-   deps = [
+ 
+   deps += [
 +    ":font_format_check",
-     ":rustfft_ffi",
+     ":bridge_ice_controller_tests",
+     ":font_rust_headers",
+     ":rustfft_ffi_unittests",
 -    "fonts:font_format_bindings",
 -    "fonts:ift_patcher_bindings",
-     "//base:base_static",
-     "//base/allocator:buildflags",
-     "//build:chromecast_buildflags",
+-    "//build/rust/crubit",
+   ]
+ 
+   data_deps = [ ":blink_platform_unittests_data" ]
+--- a/third_party/blink/renderer/platform/fonts/BUILD.gn
++++ b/third_party/blink/renderer/platform/fonts/BUILD.gn
+@@ -1,23 +1,3 @@
+-# Copyright 2026 The Chromium Authors
+-# Use of this source code is governed by a BSD-style license that can be
+-# found in the LICENSE file.
+-
+-import("//build/rust/rust_static_library.gni")
+-
+-rust_static_library("font_format") {
+-  crate_root = "opentype/format_check.rs"
+-  sources = [ crate_root ]
+-  cpp_api_from_rust = {
+-    target_name = "font_format_bindings"
+-    cpp_namespace = "font_format"
+-  }
+-  deps = [
+-    "//third_party/rust/font_types/v0_12:lib",
+-    "//third_party/rust/read_fonts/v0_45:lib",
+-    "//third_party/rust/skrifa/v0_48:lib",
+-  ]
+-}
+-
+ rust_static_library("ift_patcher_rs") {
+   crate_root = "ift/ift_patcher.rs"
+   sources = [ crate_root ]
 --- a/third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
 +++ b/third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
-@@ -328,7 +328,8 @@ FontCustomPlatformData* FontCustomPlatfo
+@@ -356,7 +356,8 @@ FontCustomPlatformData* FontCustomPlatfo
      SharedBuffer* buffer,
      String& ots_parse_message) {
    DCHECK(buffer);
@@ -874,7 +2338,7 @@ ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chr
    if (!decode_result.has_value()) {
      ots_parse_message = std::move(decode_result).error();
      return nullptr;
---- a/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc
+--- a/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc	
 +++ b/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc
 @@ -7,6 +7,7 @@
  #include "base/containers/span.h"
@@ -1291,3 +2755,121 @@ ungoogle chromium patch from https://github.com/ungoogled-software/ungoogled-chr
  }  // namespace blink
  
  #endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_WEB_FONT_DECODER_H_
+--- a/third_party/blink/renderer/platform/fonts/web_font_decoder_test.cc
++++ b/third_party/blink/renderer/platform/fonts/web_font_decoder_test.cc
+@@ -8,8 +8,6 @@
+ #include <utility>
+ 
+ #include "testing/gtest/include/gtest/gtest.h"
+-#include "third_party/blink/renderer/platform/fonts/ift/ift_patcher.h"
+-#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
+ #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
+ #include "third_party/blink/renderer/platform/wtf/shared_buffer.h"
+ #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
+@@ -18,26 +16,18 @@
+ 
+ namespace blink {
+ 
+-namespace {
+-
+-scoped_refptr<SharedBuffer> LoadFont(const String& path) {
+-  std::optional<Vector<char>> font_data =
+-      test::ReadFromFile(test::PlatformTestDataPath(path));
+-  CHECK(font_data.has_value());
+-  return SharedBuffer::Create(std::move(*font_data));
+-}
+-
+-}  // namespace
+-
+ // Regression test for a font that triggers a large number of OTS warnings
+ // during decoding. Without a bound on the accumulated error string, processing
+ // these warnings dominated decode time and made the OpenType math fuzzer time
+ // out. Verify that the reported error string stays within the budget.
+ TEST(WebFontDecoderTest, ErrorStringIsBoundedOnPathologicalFont) {
+-  scoped_refptr<SharedBuffer> font_buffer =
+-      LoadFont("open_type_math_support_fuzzer_timeout.ttf");
++  std::optional<Vector<char>> font_data = test::ReadFromFile(
++      test::PlatformTestDataPath("open_type_math_support_fuzzer_timeout.ttf"));
++  ASSERT_TRUE(font_data);
++
++  auto font_buffer = SharedBuffer::Create(std::move(*font_data));
+   base::expected<DecodedWebFont, String> decoded_result =
+-      DecodeWebFont(font_buffer.get());
++      DecodedWebFont::Create(font_buffer.get());
+ 
+   // Messages are accepted until the accumulated string reaches the ~4096 byte
+   // budget, so the result may overshoot by at most one final message. The
+@@ -49,71 +39,10 @@ TEST(WebFontDecoderTest, ErrorStringIsBo
+ }
+ 
+ TEST(WebFontDecoderTest, EmptyBufferIsError) {
+-  scoped_refptr<SharedBuffer> font_buffer = SharedBuffer::Create();
++  auto font_buffer = SharedBuffer::Create();
+   base::expected<DecodedWebFont, String> decoded_result =
+-      DecodeWebFont(font_buffer.get());
++      DecodedWebFont::Create(font_buffer.get());
+   ASSERT_FALSE(decoded_result.has_value());
+ }
+ 
+-TEST(WebFontDecoderTest, IftWoff2WithFeatureEnabledThenCreatesIftPatcher) {
+-  ScopedIncrementalFontTransferForTest scoped_ift(true);
+-  scoped_refptr<SharedBuffer> font_buffer = LoadFont("roboto-ift.woff2");
+-  base::expected<DecodedWebFont, String> decoded_result =
+-      DecodeWebFont(font_buffer.get());
+-
+-  ASSERT_TRUE(decoded_result.has_value());
+-  EXPECT_NE(decoded_result->sk_typeface, nullptr);
+-  EXPECT_NE(decoded_result->ift_patcher, nullptr);
+-  EXPECT_GT(decoded_result->decoded_size, 0u);
+-}
+-
+-TEST(WebFontDecoderTest, IftTtfWithFeatureEnabledThenCreatesIftPatcher) {
+-  ScopedIncrementalFontTransferForTest scoped_ift(true);
+-  scoped_refptr<SharedBuffer> font_buffer = LoadFont("roboto-ift.ttf");
+-  base::expected<DecodedWebFont, String> decoded_result =
+-      DecodeWebFont(font_buffer.get());
+-
+-  ASSERT_TRUE(decoded_result.has_value());
+-  EXPECT_NE(decoded_result->sk_typeface, nullptr);
+-  EXPECT_NE(decoded_result->ift_patcher, nullptr);
+-  EXPECT_GT(decoded_result->decoded_size, 0u);
+-}
+-
+-TEST(WebFontDecoderTest, IftFontWithFeatureDisabledThenIftPatcherIsNull) {
+-  ScopedIncrementalFontTransferForTest scoped_ift(false);
+-  scoped_refptr<SharedBuffer> font_buffer = LoadFont("roboto-ift.woff2");
+-  base::expected<DecodedWebFont, String> decoded_result =
+-      DecodeWebFont(font_buffer.get());
+-
+-  ASSERT_TRUE(decoded_result.has_value());
+-  EXPECT_NE(decoded_result->sk_typeface, nullptr);
+-  EXPECT_EQ(decoded_result->ift_patcher, nullptr);
+-  EXPECT_GT(decoded_result->decoded_size, 0u);
+-}
+-
+-TEST(WebFontDecoderTest, NonIftFontWithFeatureEnabledThenIftPatcherIsNull) {
+-  ScopedIncrementalFontTransferForTest scoped_ift(true);
+-  scoped_refptr<SharedBuffer> font_buffer =
+-      LoadFont("third_party/Roboto/roboto-regular.woff2");
+-  base::expected<DecodedWebFont, String> decoded_result =
+-      DecodeWebFont(font_buffer.get());
+-
+-  ASSERT_TRUE(decoded_result.has_value());
+-  EXPECT_NE(decoded_result->sk_typeface, nullptr);
+-  EXPECT_EQ(decoded_result->ift_patcher, nullptr);
+-  EXPECT_GT(decoded_result->decoded_size, 0u);
+-}
+-
+-TEST(WebFontDecoderTest, WoffFontWithFeatureEnabledThenIftPatcherIsNull) {
+-  ScopedIncrementalFontTransferForTest scoped_ift(true);
+-  scoped_refptr<SharedBuffer> font_buffer = LoadFont("Ahem.woff");
+-  base::expected<DecodedWebFont, String> decoded_result =
+-      DecodeWebFont(font_buffer.get());
+-
+-  ASSERT_TRUE(decoded_result.has_value());
+-  EXPECT_NE(decoded_result->sk_typeface, nullptr);
+-  EXPECT_EQ(decoded_result->ift_patcher, nullptr);
+-  EXPECT_GT(decoded_result->decoded_size, 0u);
+-}
+-
+ }  // namespace blink

diff --git a/chromium-ftbfs-private-verification-tokens.patch b/chromium-ftbfs-private-verification-tokens.patch
index 9bcefcb..7e11016 100644
--- a/chromium-ftbfs-private-verification-tokens.patch
+++ b/chromium-ftbfs-private-verification-tokens.patch
@@ -1,26 +1,11 @@
-ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-chromium/pull/4003
 
---- a/chrome/browser/BUILD.gn
-+++ b/chrome/browser/BUILD.gn
-@@ -1016,7 +1016,6 @@ source_set("core") {
-     "//chrome/browser/preloading/search_preload:feature",
-     "//chrome/browser/privacy_sandbox:headers",
-     "//chrome/browser/private_ai",
--    "//chrome/browser/private_verification_tokens",
-     "//chrome/browser/profiles:misc",
-     "//chrome/browser/profiles:profile_io_data",
-     "//chrome/browser/profiles:profiles_extra_parts",
-@@ -2248,7 +2247,6 @@ source_set("browser") {
-     "//chrome/browser/preloading/search_preload",
-     "//chrome/browser/privacy",
-     "//chrome/browser/privacy_sandbox:impl",
--    "//chrome/browser/private_verification_tokens",
-     "//chrome/browser/profiles:misc",
-     "//chrome/browser/profiles:profile_util_impl",
-     "//chrome/browser/profiles:profiles_extra_parts_impl",
+pulled from https://github.com/ungoogled-software/ungoogled-chromium/pull/4003
+
+This is not part of the official ungoogled-chromium patch set
+
 --- a/chrome/browser/browsing_data/BUILD.gn
 +++ b/chrome/browser/browsing_data/BUILD.gn
-@@ -125,7 +125,6 @@ source_set("impl") {
+@@ -128,7 +128,6 @@ source_set("impl") {
      "//chrome/browser/preloading/prefetch/no_state_prefetch",
      "//chrome/browser/preloading/prefetch/search_prefetch",
      "//chrome/browser/privacy_sandbox:headers",
@@ -28,7 +13,7 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
      "//chrome/browser/profiles/keep_alive",
      "//chrome/browser/reading_list",
      "//chrome/browser/safe_browsing",
-@@ -269,7 +268,6 @@ source_set("unit_tests") {
+@@ -276,7 +275,6 @@ source_set("unit_tests") {
      "//chrome/browser/payments/browser_binding:browser_bound_key_deleter",
      "//chrome/browser/payments/browser_binding:test_support",
      "//chrome/browser/permissions",
@@ -36,7 +21,7 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
      "//chrome/browser/reading_list",
      "//chrome/browser/safe_browsing:verdict_cache_manager_factory",
      "//chrome/browser/segmentation_platform",
-@@ -298,7 +296,6 @@ source_set("unit_tests") {
+@@ -307,7 +305,6 @@ source_set("unit_tests") {
      "//components/privacy_sandbox:privacy_sandbox_settings_headers",
      "//components/privacy_sandbox/privacy_sandbox_attestations",
      "//components/privacy_sandbox/privacy_sandbox_attestations:test_support",
@@ -85,7 +70,7 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
  }
 --- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
 +++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
-@@ -726,29 +726,6 @@ void ChromeBrowsingDataRemoverDelegate::
+@@ -732,29 +732,6 @@ void ChromeBrowsingDataRemoverDelegate::
  #endif  // BUILDFLAG(IS_CHROMEOS)
    }
  
@@ -115,9 +100,45 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
  
    //////////////////////////////////////////////////////////////////////////////
    // DATA_TYPE_CONTENT_SETTINGS
+--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.cc
++++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.cc
+@@ -30,7 +30,6 @@
+ #include "chrome/browser/permissions/permission_decision_auto_blocker_factory.h"
+ #include "chrome/browser/preloading/prefetch/no_state_prefetch/no_state_prefetch_manager_factory.h"
+ #include "chrome/browser/preloading/prefetch/search_prefetch/search_prefetch_service_factory.h"
+-#include "chrome/browser/private_verification_tokens/private_verification_tokens_service_factory.h"
+ #include "chrome/browser/profiles/profile.h"
+ #include "chrome/browser/reading_list/reading_list_model_factory.h"
+ #include "chrome/browser/safe_browsing/verdict_cache_manager_factory.h"
+@@ -107,7 +106,6 @@ ChromeBrowsingDataRemoverDelegateFactory
+   DependsOn(PermissionActionsHistoryFactory::GetInstance());
+   DependsOn(PermissionDecisionAutoBlockerFactory::GetInstance());
+   DependsOn(prerender::NoStatePrefetchManagerFactory::GetInstance());
+-  DependsOn(PrivateVerificationTokensServiceFactory::GetInstance());
+   DependsOn(ProtocolHandlerRegistryFactory::GetInstance());
+   DependsOn(ReadingListModelFactory::GetInstance());
+   DependsOn(safe_browsing::VerdictCacheManagerFactory::GetInstance());
+--- a/chrome/browser/BUILD.gn
++++ b/chrome/browser/BUILD.gn
+@@ -1182,7 +1182,6 @@ source_set("core") {
+     "//chrome/browser/preloading/search_preload:feature",
+     "//chrome/browser/privacy_sandbox:headers",
+     "//chrome/browser/private_ai",
+-    "//chrome/browser/private_verification_tokens",
+     "//chrome/browser/profiles:misc",
+     "//chrome/browser/profiles:profile_io_data",
+     "//chrome/browser/profiles:profiles_extra_parts",
+@@ -2431,7 +2430,6 @@ source_set("browser") {
+     "//chrome/browser/preloading/search_preload",
+     "//chrome/browser/privacy",
+     "//chrome/browser/privacy_sandbox:impl",
+-    "//chrome/browser/private_verification_tokens",
+     "//chrome/browser/profiles:misc",
+     "//chrome/browser/profiles:profile_util_impl",
+     "//chrome/browser/profiles:profiles_extra_parts_impl",
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -6193,21 +6193,6 @@ ChromeContentBrowserClient::CreateURLLoa
+@@ -6260,22 +6260,6 @@ ChromeContentBrowserClient::CreateURLLoa
      result.push_back(std::move(signin_throttle));
    }
  
@@ -136,20 +157,21 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
 -      }
 -    }
 -  }
- 
+-
    if (auto contextual_tasks_throttle =
            contextual_tasks::ContextualTasksURLLoaderThrottle::MaybeCreate(
+               profile, wc_getter)) {
 --- a/chrome/browser/component_updater/BUILD.gn
 +++ b/chrome/browser/component_updater/BUILD.gn
-@@ -151,7 +151,6 @@ source_set("impl") {
-     "//chrome/browser/net",
+@@ -157,7 +157,6 @@ source_set("impl") {
+     "//chrome/browser/net:key_pinning_proto",
      "//chrome/browser/page_load_metrics",
      "//chrome/browser/permissions",
 -    "//chrome/browser/private_verification_tokens",
      "//chrome/browser/profiles:profile",
      "//chrome/browser/update_client",
      "//chrome/common",
-@@ -167,7 +166,6 @@ source_set("impl") {
+@@ -174,7 +173,6 @@ source_set("impl") {
      "//components/permissions",
      "//components/privacy_sandbox:features",
      "//components/privacy_sandbox/privacy_sandbox_attestations",
@@ -194,15 +216,15 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
  }  // namespace component_updater
 --- a/chrome/browser/devtools/BUILD.gn
 +++ b/chrome/browser/devtools/BUILD.gn
-@@ -433,7 +433,6 @@ static_library("devtools") {
-       "//chrome/app:command_ids",
+@@ -445,7 +445,6 @@ static_library("devtools") {
        "//chrome/browser/badging",
        "//chrome/browser/custom_handlers",
+       "//chrome/browser/origin_gating",
 -      "//chrome/browser/private_verification_tokens",
        "//chrome/browser/ui:browser_window_header",
        "//chrome/browser/ui/media_router",
        "//chrome/browser/ui/startup",
-@@ -446,7 +445,6 @@ static_library("devtools") {
+@@ -458,7 +457,6 @@ static_library("devtools") {
        "//components/origin_gating/core",
        "//components/payments/content",
        "//components/privacy_sandbox/privacy_sandbox_attestations",
@@ -210,7 +232,7 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
        "//components/security_state/content",
        "//components/subresource_filter/content/browser",
        "//components/web_package",
-@@ -672,7 +670,6 @@ if (enable_devtools_frontend) {
+@@ -692,7 +690,6 @@ if (enable_devtools_frontend) {
        "//chrome/browser/prefs:util",
        "//chrome/browser/preloading:prefs",
        "//chrome/browser/preloading:test_support",
@@ -218,7 +240,7 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
        "//chrome/browser/search_engines",
        "//chrome/browser/sync/test/integration:sync_integration_test_support",
        "//chrome/browser/ui/autofill",
-@@ -683,7 +680,6 @@ if (enable_devtools_frontend) {
+@@ -704,7 +701,6 @@ if (enable_devtools_frontend) {
        "//components/infobars/content",
        "//components/javascript_dialogs",
        "//components/language/core/browser",
@@ -226,11 +248,103 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
        "//components/ukm:test_support",
        "//content/test:test_support",
        "//testing/gtest",
+--- a/chrome/browser/devtools/inspector_protocol_config.json
++++ b/chrome/browser/devtools/inspector_protocol_config.json
+@@ -49,9 +49,8 @@
+             },
+             {
+                 "domain": "Storage",
+-                "include": ["runBounceTrackingMitigations", "getPrivateVerificationTokens", "getPrivateVerificationTokensIssuerConfigs", "clearPrivateVerificationTokens", "deletePrivateVerificationToken", "setPrivateVerificationTokensTracking"],
+-                "include_events": ["privateVerificationTokensUpdated"],
+-                "async": ["runBounceTrackingMitigations", "getPrivateVerificationTokens", "clearPrivateVerificationTokens", "deletePrivateVerificationToken"]
++                "include": ["runBounceTrackingMitigations"],
++                "async": ["runBounceTrackingMitigations"]
+             },
+             {
+                 "domain": "SystemInfo",
+--- a/chrome/browser/devtools/protocol/DEPS
++++ b/chrome/browser/devtools/protocol/DEPS
+@@ -15,10 +15,4 @@ specific_include_rules = {
+   "devtools_iwa_browsertest\\.cc": [
+     "+components/web_package/signed_web_bundles"
+   ],
+-  "storage_handler\\.cc": [
+-    "+components/private_verification_tokens/common",
+-  ],
+-  "devtools_protocol_browsertest\\.cc": [
+-    "+components/private_verification_tokens/common",
+-  ],
+ }
+--- a/chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc
++++ b/chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc
+@@ -2480,51 +2480,6 @@ IN_PROC_BROWSER_TEST_F(DevToolsProtocolT
+     EXPECT_TRUE(first_token->FindDouble("creationTime").has_value());
+   }
+ 
+-  // 3. Verify getPrivateVerificationTokensIssuerConfigs.
+-  {
+-    SendCommandSync("Storage.getPrivateVerificationTokensIssuerConfigs");
+-    ASSERT_TRUE(result());
+-    EXPECT_THAT(result()->FindList("configs"),
+-                testing::Pointee(testing::IsEmpty()));
+-
+-    base::DictValue custom_issuer;
+-    custom_issuer.Set("issuerRequestUrl", "https://issuer.example.com/issue");
+-    custom_issuer.Set("version", 1);
+-    custom_issuer.Set("publicKey",
+-                      base::Base64Encode(std::vector<uint8_t>{1, 2, 3, 4}));
+-    custom_issuer.Set("publicKeyProof",
+-                      base::Base64Encode(std::vector<uint8_t>{5, 6, 7}));
+-    custom_issuer.Set("batchSize", 7);
+-    custom_issuer.Set("expiration", "2147483647");
+-    base::ListValue redeemers;
+-    redeemers.Append("https://redeemer1.example.com");
+-    redeemers.Append("https://redeemer2.example.com");
+-    custom_issuer.Set("redeemers", std::move(redeemers));
+-    custom_issuer.Set("deploymentId", "test-deployment-id");
+-
+-    pvt_service_->SetIssuerConfig(
+-        private_verification_tokens::PrivateVerificationTokensIssuerConfig::
+-            CreateWithCustomIssuer(/*base_config=*/nullptr,
+-                                   std::move(custom_issuer)));
+-
+-    SendCommandSync("Storage.getPrivateVerificationTokensIssuerConfigs");
+-    ASSERT_TRUE(result());
+-    const base::ListValue* configs_list = result()->FindList("configs");
+-    ASSERT_THAT(configs_list, testing::Pointee(testing::SizeIs(1)));
+-
+-    const base::DictValue* first_config = configs_list->front().GetIfDict();
+-    ASSERT_TRUE(first_config);
+-    EXPECT_THAT(first_config->FindString("issuerOrigin"),
+-                testing::Pointee(testing::Eq(issuer_origin.Serialize())));
+-    const base::ListValue* redeemer_origins =
+-        first_config->FindList("redeemerOrigins");
+-    ASSERT_TRUE(redeemer_origins);
+-    EXPECT_EQ(*redeemer_origins, base::ListValue()
+-                                     .Append("https://redeemer1.example.com")
+-                                     .Append("https://redeemer2.example.com"));
+-  }
+-
+-  // 4. Delete one token by ID.
+   {
+     base::DictValue params;
+     params.Set("tokenId", first_token_id);
+@@ -2539,7 +2494,7 @@ IN_PROC_BROWSER_TEST_F(DevToolsProtocolT
+                 testing::Pointee(testing::SizeIs(2)));
+   }
+ 
+-  // 5. Clear all tokens for the issuer.
++  // 4. Clear all tokens for the issuer.
+   {
+     base::DictValue params;
+     params.Set("issuerOrigin", issuer_origin.Serialize());
 --- a/chrome/browser/devtools/protocol/storage_handler.cc
 +++ b/chrome/browser/devtools/protocol/storage_handler.cc
-@@ -9,54 +9,22 @@
+@@ -7,56 +7,26 @@
+ #include <memory>
+ #include <string>
  #include <utility>
- #include <vector>
+-#include <vector>
  
 -#include "base/base64.h"
  #include "base/check.h"
@@ -241,6 +355,8 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
 -#include "chrome/browser/private_verification_tokens/private_verification_tokens_service.h"
 -#include "chrome/browser/private_verification_tokens/private_verification_tokens_service_factory.h"
 -#include "chrome/browser/profiles/profile.h"
++#include "chrome/browser/first_party_sets/first_party_sets_policy_service.h"
++#include "chrome/browser/first_party_sets/first_party_sets_policy_service_factory.h"
  #include "chrome/browser/profiles/profile_manager.h"
 -#include "components/private_verification_tokens/common/private_verification_tokens_database.h"
  #include "content/public/browser/btm_service.h"
@@ -264,6 +380,7 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
 -}
 -
 -}  // namespace
++#include "net/first_party_sets/first_party_set_entry.h"
  
  StorageHandler::StorageHandler(content::WebContents* web_contents,
                                 protocol::UberDispatcher* dispatcher)
@@ -283,7 +400,7 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
  // TODO: crbug.com/380896828 - move CDP support for BTM to //content.
  void StorageHandler::RunBounceTrackingMitigations(
      std::unique_ptr<RunBounceTrackingMitigationsCallback> callback) {
-@@ -82,152 +50,3 @@ void StorageHandler::GotDeletedSites(
+@@ -82,152 +52,3 @@ void StorageHandler::GotDeletedSites(
        std::make_unique<protocol::Array<protocol::String>>(sites);
    callback->sendSuccess(std::move(deleted_sites));
  }
@@ -462,7 +579,7 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
   public:
    StorageHandler(content::WebContents* web_contents,
                   protocol::UberDispatcher* dispatcher);
-@@ -31,41 +24,14 @@ class StorageHandler : public protocol::
+@@ -31,41 +24,19 @@ class StorageHandler : public protocol::
    ~StorageHandler() override;
  
   private:
@@ -491,7 +608,11 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
 -  void OnTokensStored() override;
 -  void OnTokensDeleted() override;
 -  void OnShutdown() override;
--
++
++
++
++
+ 
    static void GotDeletedSites(
        std::unique_ptr<RunBounceTrackingMitigationsCallback> callback,
        const std::vector<std::string>& sites);
@@ -506,17 +627,7 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
  #endif  // CHROME_BROWSER_DEVTOOLS_PROTOCOL_STORAGE_HANDLER_H_
 --- a/chrome/browser/private_verification_tokens/BUILD.gn
 +++ b/chrome/browser/private_verification_tokens/BUILD.gn
-@@ -8,9 +8,7 @@ static_library("private_verification_tok
-     "//chrome/browser:*",
-     "//chrome/browser/browsing_data:*",
-     "//chrome/browser/component_updater:*",
--    "//chrome/browser/devtools:*",
-     "//chrome/browser/profiles:profiles_extra_parts_impl",
--    "//chrome/test:*",
-   ]
- 
-   sources = [
-@@ -28,12 +26,6 @@ static_library("private_verification_tok
+@@ -52,12 +52,6 @@ source_set("impl") {
      "//chrome/browser/profiles:profile",
      "//components/content_settings/core/browser",
      "//components/keyed_service/core",
@@ -529,7 +640,7 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
      "//content/public/browser",
      "//net",
      "//services/network/public/cpp",
-@@ -53,10 +45,6 @@ source_set("browser_tests") {
+@@ -77,10 +71,6 @@ source_set("browser_tests") {
      "//chrome/test:test_support",
      "//chrome/test/base:chrome_test_utils",
      "//components/content_settings/core/common",
@@ -540,7 +651,7 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
      "//net:test_support",
      "//services/network:test_support",
      "//url",
-@@ -77,13 +65,6 @@ source_set("unit_tests") {
+@@ -101,13 +91,7 @@ source_set("unit_tests") {
      "//chrome/test:test_support",
      "//components/content_settings/core/browser",
      "//components/content_settings/core/common",
@@ -549,14 +660,14 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
 -    "//components/private_verification_tokens/common:private_verification_tokens_issuer_config",
 -    "//components/private_verification_tokens/common:private_verification_tokens_metrics",
 -    "//components/private_verification_tokens/common:private_verification_tokens_parameters",
--    "//components/private_verification_tokens/common:test_support",
+     "//components/private_verification_tokens/common:test_support",
 -    "//components/private_verification_tokens/common/athm_ffi:athm_ffi_bindings",
      "//content/test:test_support",
      "//net",
      "//services/network:test_support",
 --- a/chrome/browser/profiles/BUILD.gn
 +++ b/chrome/browser/profiles/BUILD.gn
-@@ -811,7 +811,6 @@ source_set("profiles_extra_parts_impl")
+@@ -829,7 +829,6 @@ source_set("profiles_extra_parts_impl")
      "//chrome/browser/privacy_sandbox:headers",
      "//chrome/browser/private_ai",
      "//chrome/browser/private_insights",
@@ -566,7 +677,7 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
      "//chrome/browser/reduce_accept_language",
 --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
 +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
-@@ -1360,7 +1360,6 @@ void ChromeBrowserMainExtraPartsProfiles
+@@ -1335,7 +1335,6 @@ void ChromeBrowserMainExtraPartsProfiles
    PrivacyMetricsServiceFactory::GetInstance();
    PrivacySandboxServiceFactory::GetInstance();
    PrivacySandboxSettingsFactory::GetInstance();
@@ -576,26 +687,25 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
    ProfilePasswordStoreFactory::GetInstance();
 --- a/chrome/test/BUILD.gn
 +++ b/chrome/test/BUILD.gn
-@@ -1869,8 +1869,6 @@ if (!is_android) {
-       "//chrome/browser/privacy_sandbox:headers",
-       "//chrome/browser/privacy_sandbox:test_support",
-       "//chrome/browser/private_ai",
--      "//chrome/browser/private_verification_tokens",
+@@ -1453,7 +1453,6 @@ if (!is_android) {
+       "//chrome/browser/preloading/prerender:browser_tests",
+       "//chrome/browser/preloading/search_preload:browser_tests",
+       "//chrome/browser/privacy_sandbox:browser_tests",
 -      "//chrome/browser/private_verification_tokens:browser_tests",
-       "//chrome/browser/profile_resetter",
        "//chrome/browser/profile_resetter:browser_tests",
-       "//chrome/browser/profiles",
-@@ -5043,7 +5041,6 @@ test("unit_tests") {
+       "//chrome/browser/profiles:browser_tests",
+       "//chrome/browser/push_messaging:browser_tests",
+@@ -2857,7 +2856,6 @@ test("unit_tests") {
      "//chrome/browser/preloading/prerender:unit_tests",
      "//chrome/browser/privacy_sandbox:unit_tests",
      "//chrome/browser/private_ai:unit_tests",
 -    "//chrome/browser/private_verification_tokens:unit_tests",
-     "//chrome/browser/profiles",
-     "//chrome/browser/profiles:misc",
-     "//chrome/browser/profiles:profile_downloader",
+     "//chrome/browser/profiles:unit_tests",
+     "//chrome/browser/push_messaging:unit_tests",
+     "//chrome/browser/pwc:unit_tests",
 --- a/components/BUILD.gn
 +++ b/components/BUILD.gn
-@@ -313,7 +313,6 @@ test("components_unittests") {
+@@ -315,7 +315,6 @@ test("components_unittests") {
      "//components/power_metrics:unit_tests",
      "//components/prefs:unit_tests",
      "//components/privacy_sandbox:unit_tests",
@@ -622,3 +732,80 @@ ungoogled chromium patch from https://github.com/ungoogled-software/ungoogled-ch
      "//mojo/public/cpp/base:protobuf_support",
      "//services/network/public/cpp",
      "//testing/gmock",
+--- a/components/private_verification_tokens/BUILD.gn
++++ b/components/private_verification_tokens/BUILD.gn
+@@ -22,7 +22,6 @@ source_set("unit_tests") {
+   if (enable_rust) {
+     deps += [
+       "//components/private_verification_tokens/common:privacy_pass_athm_batch_request_unittest",
+-      "//components/private_verification_tokens/common/athm_ffi:privacy_pass_unittests",
+     ]
+   }
+ }
+--- a/components/private_verification_tokens/common/BUILD.gn
++++ b/components/private_verification_tokens/common/BUILD.gn
+@@ -194,7 +194,6 @@ source_set("test_support") {
+   sources = [ "private_verification_tokens_test_util.h" ]
+   public_deps = [
+     "//base",
+-    "//components/private_verification_tokens/common/athm_ffi:athm_ffi_bindings",
+   ]
+ }
+ 
+@@ -209,7 +208,6 @@ if (enable_rust) {
+     public_deps = [
+       ":private_verification_tokens_issuer_config",
+       "//base",
+-      "//components/private_verification_tokens/common/athm_ffi:athm_ffi_bindings",
+     ]
+   }
+ 
+@@ -222,7 +220,6 @@ if (enable_rust) {
+       ":private_verification_tokens_parameters",
+       ":private_verification_tokens_public_key",
+       "//base",
+-      "//components/private_verification_tokens/common/athm_ffi:athm_ffi_bindings",
+       "//testing/gmock",
+       "//testing/gtest",
+       "//url",
+--- a/content/browser/devtools/protocol_config.json
++++ b/content/browser/devtools/protocol_config.json
+@@ -192,7 +192,7 @@
+             },
+             {
+                 "domain": "Storage",
+-                "exclude": ["runBounceTrackingMitigations", "getPrivateVerificationTokens", "getPrivateVerificationTokensIssuerConfigs", "clearPrivateVerificationTokens", "deletePrivateVerificationToken", "setPrivateVerificationTokensTracking"],
++                "exclude": ["runBounceTrackingMitigations", "getPrivateVerificationTokens", "clearPrivateVerificationTokens", "deletePrivateVerificationToken", "setPrivateVerificationTokensTracking"],
+                 "async": ["getUsageAndQuota", "clearDataForOrigin", "clearDataForStorageKey", "getCookies", "setCookies", "clearCookies", "overrideQuotaForOrigin", "getTrustTokens", "clearTrustTokens", "getStorageBucketList"]
+             },
+             {
+--- a/third_party/blink/public/devtools_protocol/domains/Storage.pdl
++++ b/third_party/blink/public/devtools_protocol/domains/Storage.pdl
+@@ -58,14 +58,6 @@ experimental domain Storage
+       # Base64-encoded serialized token.
+       string token
+ 
+-  # Configuration for a Private Verification Tokens issuer.
+-  experimental type PrivateVerificationTokensIssuerConfig extends object
+-    properties
+-      # Origin of the token issuer.
+-      string issuerOrigin
+-      # Origins authorized to redeem tokens from this issuer.
+-      array of string redeemerOrigins
+-
+ 
+ 
+   type StorageBucketsDurability extends string
+@@ -242,12 +234,6 @@ experimental domain Storage
+     returns
+       array of PrivateVerificationToken tokens
+ 
+-  # Returns the configured Private Verification Tokens issuers and their redeemer
+-  # origins.
+-  experimental command getPrivateVerificationTokensIssuerConfigs
+-    returns
+-      array of PrivateVerificationTokensIssuerConfig configs
+-
+   # Removes all Private Verification Tokens issued by the provided issuerOrigin.
+   experimental command clearPrivateVerificationTokens
+     parameters

diff --git a/chromium-rust-clanglib.patch b/chromium-rust-clanglib.patch
new file mode 100644
index 0000000..71f8a0f
--- /dev/null
+++ b/chromium-rust-clanglib.patch
@@ -0,0 +1,48 @@
+diff -up chromium-157.0.8103.38/build/config/clang/BUILD.gn.than chromium-157.0.8103.38/build/config/clang/BUILD.gn
+--- chromium-157.0.8103.38/build/config/clang/BUILD.gn.than	2026-11-04 13:28:50.781598048 +0100
++++ chromium-157.0.8103.38/build/config/clang/BUILD.gn	2026-11-04 15:07:50.959537055 +0100
+@@ -205,19 +205,19 @@ template("clang_lib") {
+         _dir = "darwin"
+       } else if (is_linux || is_chromeos) {
+         if (current_cpu == "x64") {
+-          _dir = "x86_64-unknown-linux-gnu"
++          _dir = "x86_64-redhat-linux-gnu"
+         } else if (current_cpu == "x86") {
+-          _dir = "i386-unknown-linux-gnu"
++          _dir = "i386-redhat-linux-gnu"
+         } else if (current_cpu == "arm") {
+-          _dir = "armv7-unknown-linux-gnueabihf"
++          _dir = "armhf-redhat-linux-gnu"
+         } else if (current_cpu == "arm64") {
+-          _dir = "aarch64-unknown-linux-gnu"
++          _dir = "aarch64-redhat-linux-gnu"
+         } else if (current_cpu == "loong64") {
+           _dir = "loongarch64-unknown-linux-gnu"
+         } else if (current_cpu == "riscv64") {
+           _dir = "riscv64-unknown-linux-gnu"
+         } else if (current_cpu == "ppc64") {
+-          _dir = "ppc64le-unknown-linux-gnu"
++          _dir = "ppc64le-redhat-linux-gnu"
+         } else if (current_cpu == "s390x") {
+           _dir = "s390x-unknown-linux-gnu"
+         } else {
+diff -up chromium-157.0.8103.38/build/rust/rust_bindgen_generator.gni.than chromium-157.0.8103.38/build/rust/rust_bindgen_generator.gni
+--- chromium-157.0.8103.38/build/rust/rust_bindgen_generator.gni.than	2026-11-04 15:08:24.137069212 +0100
++++ chromium-157.0.8103.38/build/rust/rust_bindgen_generator.gni	2026-11-04 15:09:55.586524478 +0100
+@@ -22,14 +22,14 @@ if (!use_chromium_rust_toolchain &&
+ 
+ # On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in
+ # ../lib.
+-_libclang_path = rust_bindgen_root
++_libclang_path = clang_base_path
+ if (!use_chromium_rust_toolchain &&
+     (host_cpu == "ppc64" || host_cpu == "s390x")) {
+   _libclang_path = rust_sysroot_absolute + "/lib64"
+ } else if (host_os == "win") {
+   _libclang_path += "/bin"
+ } else {
+-  _libclang_path += "/lib"
++  _libclang_path += "/lib64"
+ }
+ 
+ # Template to build Rust/C bindings with bindgen.

diff --git a/chromium-typescript-vendor.patch b/chromium-typescript-vendor.patch
new file mode 100644
index 0000000..c2beced
--- /dev/null
+++ b/chromium-typescript-vendor.patch
@@ -0,0 +1,26 @@
+Ignore TypeScript Go compiler's bundled standard library files.
+
+Traceback (most recent call last):
+  File "/builddir/build/BUILD/chromium-157.0.8103.38/out/Release/../../tools/typescript/ts_library.py", line 366, in <module>
+    main(sys.argv[1:])
+  File "/builddir/build/BUILD/chromium-157.0.8103.38/out/Release/../../tools/typescript/ts_library.py", line 345, in main
+    raise AssertionError(error_msg)
+AssertionError: Undeclared dependencies to definition files encountered while building chrome/browser/resources/accessibility/reading_mode_gdocs_helper
+//out/Release/bundled:/libs/lib.es5.d.ts
+//out/Release/bundled:/libs/lib.es2015.d.ts
+//out/Release/bundled:/libs/lib.es2016.d.ts
+...
+
+diff -up chromium-157.0.8103.38/tools/typescript/validate_tsconfig.py.me chromium-157.0.8103.38/tools/typescript/validate_tsconfig.py
+--- chromium-157.0.8103.38/tools/typescript/validate_tsconfig.py.me	2026-11-12 02:11:20.077682578 -0500
++++ chromium-157.0.8103.38/tools/typescript/validate_tsconfig.py	2026-11-12 02:30:26.671026330 -0500
+@@ -311,6 +311,9 @@ def validateDefinitionDeps(
+ 
+   missing_inputs = []
+   for f in definitions_files:
++    if f.startswith('bundled:///libs/'):
++      continue
++
+     # File path relative to the current working directory.
+     f_from_cwd = os.path.relpath(f, _CWD).replace('\\', '/')
+     is_gen_file = f_from_cwd.startswith(gen_dir_from_build)

diff --git a/chromium.spec b/chromium.spec
index 48b5db7..ba155a1 100644
--- a/chromium.spec
+++ b/chromium.spec
@@ -13,10 +13,6 @@
 %global system_build_flags 0
 
 %global numjobs %{_smp_build_ncpus}
-%ifarch x86_64
-# FTBFS workaround for OOM on x86_64
-%global numjobs 16
-%endif
 
 # official builds have less debugging and go faster... but we have to shut some things off.
 %global official_build 1
@@ -53,13 +49,8 @@
 %global build_headless 0
 %endif
 
-# Temporarily disable system_esbuild by default for the epel build
-# re-enable it once esbuild has been updated
-%global system_esbuild 1
-%global esbuild_version 0.28.2
-%if 0%{?rhel}
+# enable|disable system esbuild
 %global system_esbuild 1
-%endif
 
 # set nodejs_version
 %global nodejs_version v22.22.0
@@ -71,10 +62,6 @@
 %endif
 
 %global system_gn 1
-# epel9 needs newer gn
-%if 0%{?rhel} == 9
-%global system_gn 0
-%endif
 
 # enable gtk4 for fedora and el>9
 %global gtk_version 4
@@ -243,7 +230,6 @@
 %if 0%{?fedora} || 0%{?rhel} > 9
 %global bundlelibopenjpeg2 0
 %global bundleharfbuzz 0
-%global bundlebrotli 0
 %global bundlelibwebp 0
 %endif
 %endif
@@ -282,7 +268,7 @@
 %endif
 
 Name:	chromium
-Version: 156.0.8078.79
+Version: 157.0.8103.78
 Release: 1%{?dist}
 Summary: A WebKit (Blink) powered web browser that Google doesn't want you to use
 Url: http://www.chromium.org/Home
@@ -312,7 +298,7 @@ Patch22: chromium-131-fix-qt-ui.pach
 # Workaround for build error: ERROR Unresolved dependencies.
 #//chrome/test:captured_sites_interactive_tests(//build/toolchain/linux/unbundle:default)
 #  needs //third_party/libpng:libpng_for_testonly(//build/toolchain/linux/unbundle:default)
-Patch23: chromium-152-build-error-libpng_for_testonly.patch
+Patch23: chromium-build-error-libpng_for_testonly.patch
 
 # patch from Melvin - melvin@pixilab.se
 Patch24: glibc-2.42-baud-rate-fix.patch
@@ -320,8 +306,8 @@ Patch24: glibc-2.42-baud-rate-fix.patch
 # fix FTBFS with old pipewire on fedora < 44 and epel
 Patch25: chromium-153-ftbfs-pipewire-api.patch
 
-# Disable Eula popup
-Patch26: chromium-disable-eula-popup.patch
+# fix FTBFS with TypeScript Go
+Patch26: chromium-typescript-vendor.patch
 
 # disable enterprise_companion_integration_tests due to Unresolved dependencies
 Patch31: chromium-145-disable-enterprise_companion_integration_tests.patch
@@ -339,7 +325,7 @@ Patch91: chromium-108-system-opus.patch
 Patch92: chromium-138-checkversion-nodejs.patch
 
 # fix build error
-Patch93: chromium-141-csss_style_sheet.patch
+Patch93: chromium-csss_style_sheet.patch
 
 # revert the patch to fix the build error: "ld.lld: error: undefined symbol: __sanitizer_set_death_callback"
 Patch94: chromium-148-v8-sanitize-build-error.patch
@@ -476,7 +462,7 @@ Patch356: chromium-141-use_libcxx_modules.patch
 Patch357: chromium-134-type-mismatch-error.patch
 
 # set clang_lib path
-Patch358: chromium-144-rust-clanglib.patch
+Patch358: chromium-rust-clanglib.patch
 
 # fix FTBFS with rustc 1.95
 Patch359: chromium-148-rust-1.95-bytemuck-ftbfs.patch
@@ -591,13 +577,10 @@ BuildRequires: openssl-devel
 %endif
 
 # License - Apache-2.0, https://github.com/microsoft/TypeScript?tab=Apache-2.0-1-ov-file
-# TypeScript for ppc64le
-Source14: https://github.com/microsoft/TypeScript/releases/download/v7.0.2/typescript-linux-ppc64.tgz
-
-# License - MIT License, https://github.com/evanw/esbuild/blob/main/LICENSE.md 
-Source15: https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-%{esbuild_version}.tgz
-Source16: https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-%{esbuild_version}.tgz
-Source17: https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-%{esbuild_version}.tgz
+# curl -fL https://github.com/microsoft/TypeScript/archive/refs/tags/v7.0.2.tar.gz -o TypeScript-7.0.2.tar.gz
+Source14: TypeScript-7.0.2.tar.gz
+# vendor archive created by create-typesctipt-archive.sh
+Source15: TypeScript-7.0.2-vendor-archive.tar.gz
 
 BuildRequires: golang
 BuildRequires: clang
@@ -1040,7 +1023,7 @@ Provides: bundled(skia)
 Provides: bundled(SMHasher) = 0
 Provides: bundled(snappy) = 1.1.4-head
 Provides: bundled(speech-dispatcher) = 0.7.1
-Provides: bundled(sqlite) = 3.17patched
+Provides: bundled(sqlite) = 3.53.4
 Provides: bundled(superfasthash) = 0
 Provides: bundled(talloc) = 2.0.1
 Provides: bundled(usrsctp) = 0
@@ -1120,7 +1103,7 @@ Qt6 UI for chromium.
 %patch -P24 -p1 -b .glibc-2.42-baud-rate-fix
 %endif
 %patch -P25 -p1 -b .ftbfs-pipewire-api
-%patch -P26 -p1 -b .disable-eula-popup
+%patch -P26 -p1 -b .typescript-vendor
 %patch -P31 -p1 -b .disable-enterprise_companion_integration_tests
 
 %if ! %{bundlebrotli}
@@ -1302,29 +1285,14 @@ sed -i "s/Linux x86_64/Linux %{_arch}/" components/embedder_support/user_agent_u
 # Add correct path for nodejs binary
 mkdir -p third_party/node/linux/node-linux-x64/bin
 %if %{system_nodejs}
-  ln -s $(which node) third_party/node/linux/node-linux-x64/bin/node
+  ln -fs $(which node) third_party/node/linux/node-linux-x64/bin/node
 %else
-  ln -s ../../../../../node-%{nodejs_version}/node third_party/node/linux/node-linux-x64/bin/node
+  ln -sf ../../../../../node-%{nodejs_version}/node third_party/node/linux/node-linux-x64/bin/node
 %endif
 
 # Add correct path for esbuild binary
 mkdir -p third_party/devtools-frontend/src/third_party/esbuild
-%if %{system_esbuild}
-ln -s $(which esbuild) third_party/devtools-frontend/src/third_party/esbuild/esbuild
-%else
-%ifarch x86_64
-tar xf %{SOURCE15} -C third_party/devtools-frontend/src/third_party/
-%endif
-%ifarch ppc64le
-tar xf %{SOURCE16} -C third_party/devtools-frontend/src/third_party/
-%endif
-%ifarch aarch64
-tar xf %{SOURCE17} -C third_party/devtools-frontend/src/third_party/
-%endif
-pushd third_party/devtools-frontend/src/third_party/esbuild
-ln -s ../package/bin/esbuild .
-popd
-%endif
+ln -sf $(which esbuild) third_party/devtools-frontend/src/third_party/esbuild/esbuild
 
 # Remove bundle gn and replace it with a system gn or bootstrap gn as it is x86_64 and causes
 # FTBFS on other arch like aarch64/ppc64le
@@ -1343,14 +1311,6 @@ ln -fs $(which gperf) third_party/gperf/cipd/bin/gperf
 mkdir -p third_party/rust-toolchain/bin/
 ln -fs $(which rustc) third_party/rust-toolchain/bin/rustc
 
-# need bundle typescript on ppc64le as workaround for FTBFS
-%ifarch ppc64le
-tar xf %{SOURCE14} -C third_party/typescript/linux-amd64/src/
-pushd third_party/typescript/linux-amd64/src/
-cp package/lib/tsc* lib/
-popd
-%endif
-
 # remove bundle python3 and replace it with system one
 # fix FTBFS on aarch64, ppc64le
 # ERROR at //build/toolchain/concurrent_links.gni:156:19: Script returned non-zero exit code.
@@ -1386,6 +1346,17 @@ make install
 popd
 %endif
 
+# Build tsgo and replace bundle binary
+ver=7.0.2
+tar xf %{SOURCE14} && tar xf %{SOURCE15} -C TypeScript-$ver/tsc
+pushd TypeScript-$ver/tsc/internal/bundled/libs
+patch -p2 < ../../../../../third_party/typescript/linux-amd64/3pp/patches/typescript_native_preview.patch
+popd
+pushd TypeScript-$ver/tsc
+go build  -o tsgo ./cmd/tsgo
+popd
+cp -a TypeScript-$ver/tsc/tsgo  third_party/typescript/linux-amd64/src/lib/tsc
+
 # reduce warnings
 FLAGS=' -Wno-deprecated-declarations -Wno-unknown-warning-option -Wno-unused-command-line-argument'
 FLAGS+=' -Wno-unused-but-set-variable -Wno-unused-result -Wno-unused-function -Wno-unused-variable'
@@ -1507,7 +1478,7 @@ CHROMIUM_CORE_GN_DEFINES+=' angle_has_histograms=false'
 # drop unrar
 CHROMIUM_CORE_GN_DEFINES+=' safe_browsing_use_unrar=false'
 CHROMIUM_CORE_GN_DEFINES+=' v8_enable_backtrace=true'
-CHROMIUM_CORE_GN_DEFINES+=' v8_use_metagen_instance_types=false'
+CHROMIUM_CORE_GN_DEFINES+=' v8_use_metagen=false'
 # disable devtools buildle
 CHROMIUM_CORE_GN_DEFINES+=' devtools_bundle=false'
 export CHROMIUM_CORE_GN_DEFINES
@@ -1987,6 +1958,319 @@ fi
 %endif
 
 %changelog
+* Thu Nov 12 2026 Than Ngo <than@redhat.com> - 157.0.8103.78-1
+- Update to 157.0.8103.78, include 83 security fixes
+  * CVE-2026-126885: Use after free in ServiceWorker
+  * CVE-2026-126895: Use after free in CSS
+  * CVE-2026-126879: Use after free in Layout
+  * CVE-2026-126846: Use after free in Skia
+  * CVE-2026-126911: Use after free in Accessibility
+  * CVE-2026-126864: Use after free in V8
+  * CVE-2026-126889: Off-by-one error in V8
+  * CVE-2026-126859: Link following in FileSystem
+  * CVE-2026-126886: Use after free in Frames
+  * CVE-2026-126887: Use after free in Animation
+  * CVE-2026-126870: Uninitialized resource in ANGLE
+  * CVE-2026-126912: Buffer overflow in Skia
+  * CVE-2026-126919: Use after free in BrowserTag
+  * CVE-2026-126878: Information leak in Core
+  * CVE-2026-126909: Use after free in Passwords
+  * CVE-2026-126847: Type confusion in V8
+  * CVE-2026-126853: Uninitialized resource in Skia
+  * CVE-2026-126865: Use after free in DOM
+  * CVE-2026-126916: Integer overflow in V8
+  * CVE-2026-126903: Improper state validation in ANGLE
+  * CVE-2026-126910: Type confusion in V8
+  * CVE-2026-126842: Use after free in ANGLE
+  * CVE-2026-126898: Uninitialized resource in Skia
+  * CVE-2026-126871: Out of bounds read in Skia
+  * CVE-2026-126875: Missing authorization in V8
+  * CVE-2026-126862: Improper input validation in Core
+  * CVE-2026-126900: Use after free in CSS
+  * CVE-2026-126904: Use after free in Compositing
+  * CVE-2026-126907: Uninitialized resource in Media
+  * CVE-2026-126851: Use after free in Accessibility
+  * CVE-2026-126845: Uninitialized resource in GPU
+  * CVE-2026-126881: Improper initialization in Media
+  * CVE-2026-126867: Use after free in Browser
+  * CVE-2026-126863: Use after free in HTML
+  * CVE-2026-126896: Missing authorization in V8
+  * CVE-2026-126869: Use after free in Frames
+  * CVE-2026-126858: Uninitialized resource in ANGLE
+  * CVE-2026-126891: Use after free in V8
+  * CVE-2026-126874: Type confusion in V8
+  * CVE-2026-126876: Integer overflow in Skia
+  * CVE-2026-126918: Use after free in Layout
+  * CVE-2026-126866: Incorrect authorization in Extensions
+  * CVE-2026-126844: Uninitialized resource in Skia
+  * CVE-2026-126884: Out of bounds read in Skia
+  * CVE-2026-126894: Out of bounds read in Skia
+  * CVE-2026-126861: Use after free in Media
+  * CVE-2026-126917: Memory corruption in V8
+  * CVE-2026-126856: Incomplete cleanup in Cache
+  * CVE-2026-126905: Incomplete cleanup in V8
+  * CVE-2026-126873: Use after free in Extensions
+  * CVE-2026-126922: Out of bounds read in Skia
+  * CVE-2026-126914: Uninitialized resource in Skia
+  * CVE-2026-126880: Type confusion in V8
+  * CVE-2026-126872: Incorrect authorization in FileSystem
+  * CVE-2026-126877: Use after free in Dawn
+  * CVE-2026-126888: Buffer overflow in Turbolev
+  * CVE-2026-126843: Type confusion in Turbolev
+  * CVE-2026-126854: Incorrect authorization in Layout
+  * CVE-2026-126892: Use after free in MediaStream
+  * CVE-2026-126897: Type confusion in V8
+  * CVE-2026-126857: Out of bounds read in Skia
+  * CVE-2026-126883: Use after free in Core
+  * CVE-2026-126840: Out of bounds write in Network
+  * CVE-2026-126848: Uninitialized resource in Skia
+  * CVE-2026-126882: Information leak in Skia
+  * CVE-2026-126906: Race condition in Extensions
+  * CVE-2026-126915: Use of uninitialized variable in Skia
+  * CVE-2026-126893: Out of bounds write in V8
+  * CVE-2026-126855: Missing authorization in ImageCapture
+  * CVE-2026-126908: Type confusion in V8
+  * CVE-2026-126849: Type confusion in V8
+  * CVE-2026-126901: Use after free in PDF
+  * CVE-2026-126852: Use after free in MediaStream
+  * CVE-2026-126850: Incorrect authorization in SiteIsolation
+  * CVE-2026-126841: Out of bounds read in Skia
+  * CVE-2026-126902: Incorrect reference resolution in Browser
+  * CVE-2026-126868: Type confusion in V8
+  * CVE-2026-126921: Use after free in Accessibility
+  * CVE-2026-126913: Out of bounds read in Compositing
+  * CVE-2026-126890: Out of bounds read in Media
+  * CVE-2026-126860: Incorrect authorization in FileSystem
+  * CVE-2026-126920: Information leak in Skia
+  * CVE-2026-126899: Use after free in Elements
+
+* Mon Nov 09 2026 Than Ngo <than@redhat.com> - 157.0.8103.50-1
+- Update to 157.0.8103.50, include 9 security fixes
+  * CVE-2026-125345: Uninitialized resource in WebGL
+  * CVE-2026-125347: Incorrect authorization in FileSystem
+  * CVE-2026-125343: Buffer overflow in Compositing
+  * CVE-2026-125348: Out of bounds write in GPU
+  * CVE-2026-125344: Type confusion in V8
+  * CVE-2026-125350: Use after free in XML
+  * CVE-2026-125349: Uninitialized resource in GPU
+  * CVE-2026-125342: Uninitialized resource in GPU
+
+* Wed Nov 04 2026 Than Ngo <than@redhat.com> - 157.0.8103.38-1
+- Update to 157.0.8103.38, include 213 security fixes
+  * CVE-2026-121029: Incorrect authorization in ORB
+  * CVE-2026-121030: Incorrect authorization in DevTools
+  * CVE-2026-121031: Missing authorization in PDF
+  * CVE-2026-121032: Out of bounds read in Skia
+  * CVE-2026-121033: Uninitialized resource in GPU
+  * CVE-2026-121034: Use after free in Views
+  * CVE-2026-121035: Use after free in Prerender
+  * CVE-2026-121036: Use after free in CSS
+  * CVE-2026-121037: Out of bounds write in ANGLE
+  * CVE-2026-121038: Information leak in Compositing
+  * CVE-2026-121039: Incorrect authorization in Proxy Auth
+  * CVE-2026-121040: Incorrect authorization in Core
+  * CVE-2026-121041: Missing authorization in Input
+  * CVE-2026-121042: Incorrect authorization in Permissions
+  * CVE-2026-121043: UI misrepresentation in Payments
+  * CVE-2026-121044: Use after free in Layout
+  * CVE-2026-121045: UI misrepresentation in Browser
+  * CVE-2026-121046: Incorrect authorization in WebAppInstalls
+  * CVE-2026-121047: Buffer overflow in Media
+  * CVE-2026-121048: Race condition in V8
+  * CVE-2026-121049: Out of bounds read in V8
+  * CVE-2026-121050: Race condition in Mobile
+  * CVE-2026-121051: UI misrepresentation in iOSWeb
+  * CVE-2026-121052: Use after free in GPU
+  * CVE-2026-121053: UI misrepresentation in Transactions Platform
+  * CVE-2026-121054: Improper state validation in XML
+  * CVE-2026-121055: Incomplete cleanup in DevTools
+  * CVE-2026-121057: Type confusion in V8
+  * CVE-2026-121059: Information leak in Core
+  * CVE-2026-121060: Incorrect authorization in FileSystem
+  * CVE-2026-121061: Use after free in Modularization
+  * CVE-2026-121062: Incorrect authorization in API
+  * CVE-2026-121063: Incorrect authorization in CacheStorage
+  * CVE-2026-121064: Improper input validation in Performance
+  * CVE-2026-121065: Incorrect authorization in DevTools
+  * CVE-2026-121066: Incorrect authorization in Extensions
+  * CVE-2026-121067: UI misrepresentation in PermissionElement
+  * CVE-2026-121068: Type confusion in V8
+  * CVE-2026-121069: Use after free in Track
+  * CVE-2026-121070: Use after free in WTF
+  * CVE-2026-121071: Incorrect authorization in FileSystem
+  * CVE-2026-121072: Uninitialized resource in Skia
+  * CVE-2026-121073: Use after free in Network
+  * CVE-2026-121074: Memory corruption in GPU
+  * CVE-2026-121075: Missing authorization in DevTools
+  * CVE-2026-121076: Use after free in WebXR
+  * CVE-2026-121077: Use after free in Mobile
+  * CVE-2026-121078: Type confusion in V8
+  * CVE-2026-121079: Race condition in V8
+  * CVE-2026-121080: Use after free in Codecs
+  * CVE-2026-121081: UI misrepresentation in Passwords
+  * CVE-2026-121082: Type confusion in V8
+  * CVE-2026-121083: Use after free in Compositing
+  * CVE-2026-121084: Out of bounds read in Skia
+  * CVE-2026-121085: Incorrect authorization in WebUI
+  * CVE-2026-121086: Buffer overflow in Skia
+  * CVE-2026-121087: Improper input validation in Mobile
+  * CVE-2026-121088: Missing authorization in PerformanceAPIs
+  * CVE-2026-121089: Use after free in WebGPU
+  * CVE-2026-121090: Improper privilege management in Navigation
+  * CVE-2026-121091: Incorrect authorization in Permissions
+  * CVE-2026-121092: Uncontrolled recursion in SVG
+  * CVE-2026-121093: Out of bounds read in Animation
+  * CVE-2026-121094: Type confusion in V8
+  * CVE-2026-121095: Uninitialized resource in WebGL
+  * CVE-2026-121096: Incomplete cleanup in V8
+  * CVE-2026-121097: Use after free in Printing
+  * CVE-2026-121098: Improper state validation in GPU
+  * CVE-2026-121099: Information leak in PrivateTokens
+  * CVE-2026-121100: Use after free in DOM
+  * CVE-2026-121101: Missing authorization in DevTools
+  * CVE-2026-121102: Missing authorization in BackgroundFetch
+  * CVE-2026-121103: Incorrect authorization in Extensions
+  * CVE-2026-121104: Incorrect authorization in FileSystem
+  * CVE-2026-121105: Information leak in Network
+  * CVE-2026-121106: Information leak in Omnibox
+  * CVE-2026-121107: Incorrect authorization in BackgroundFetch
+  * CVE-2026-121108: Confused deputy in BackgroundFetch
+  * CVE-2026-121109: Inadequate encryption strength in SSL
+  * CVE-2026-121110: UI misrepresentation in Shopping
+  * CVE-2026-121111: Incorrect authorization in HID
+  * CVE-2026-121112: Out of bounds read in Permissions
+  * CVE-2026-121113: Buffer overflow in PDFium
+  * CVE-2026-121114: Use after free in TabStrip
+  * CVE-2026-121115: Improper input validation in Shopping
+  * CVE-2026-121116: Missing authorization in WebView
+  * CVE-2026-121117: Use after free in Paint
+  * CVE-2026-121118: Use after free in SVG
+  * CVE-2026-121119: Use after free in Controls
+  * CVE-2026-121120: Improper input validation in Prerender
+  * CVE-2026-121121: UI misrepresentation in PageInfo
+  * CVE-2026-121122: UI misrepresentation in Prompts
+  * CVE-2026-121123: Use after free in Canvas
+  * CVE-2026-121124: Improper adherence to coding standards in XML
+  * CVE-2026-121125: Information leak in ServiceWorker
+  * CVE-2026-121126: Use after free in Core
+  * CVE-2026-121127: Use after free in WebAudio
+  * CVE-2026-121128: Use after free in Scheduling
+  * CVE-2026-121129: Use after free in WebRTC
+  * CVE-2026-121130: Observable discrepancy in Forms
+  * CVE-2026-121131: Use after free in Mobile
+  * CVE-2026-121132: Information leak in V8
+  * CVE-2026-121133: Incorrect reference resolution in Images
+  * CVE-2026-121134: Information loss in BackgroundFetch
+  * CVE-2026-121135: Security issue in Platform
+  * CVE-2026-121136: Missing authorization in DevTools
+  * CVE-2026-121137: Type confusion in DevTools
+  * CVE-2026-121138: Observable discrepancy in CORS
+  * CVE-2026-121140: Out of bounds read in Internals
+  * CVE-2026-121141: Improper input validation in Editing
+  * CVE-2026-121142: Incorrect authorization in Network
+  * CVE-2026-121143: Uninitialized resource in GPU
+  * CVE-2026-121148: Use after free in ANGLE
+  * CVE-2026-121156: Buffer overflow in Dawn
+  * CVE-2026-121157: Incorrect authorization in Chromoting
+  * CVE-2026-121158: Information leak in Paint
+  * CVE-2026-121159: Incorrect authorization in History
+  * CVE-2026-121160: Out of bounds read in Skia
+  * CVE-2026-121161: Information leak in BackgroundFetch
+  * CVE-2026-121162: UI misrepresentation in Notifications
+  * CVE-2026-121163: Improper input validation in Browser
+  * CVE-2026-121164: Incorrect authorization in Views
+  * CVE-2026-121165: UI misrepresentation in Mobile
+  * CVE-2026-121166: Type confusion in PDFium
+  * CVE-2026-121167: Incorrect authorization in Permissions
+  * CVE-2026-121168: Improper resource exposure in DevTools
+  * CVE-2026-121169: Missing authorization in DevTools
+  * CVE-2026-121170: Improper resource control in WebCodecs
+  * CVE-2026-121171: Confused deputy in DevTools
+  * CVE-2026-121172: Incorrect authorization in Isolated
+  * CVE-2026-121173: Uninitialized resource in WebGL
+  * CVE-2026-121174: Missing authorization in BackgroundFetch
+  * CVE-2026-121175: Improper resource exposure in ORB
+  * CVE-2026-121176: Uninitialized resource in Media
+  * CVE-2026-121177: UI misrepresentation in PageInfo
+  * CVE-2026-121178: Use after free in Aura
+  * CVE-2026-121179: Use after free in PDFium
+  * CVE-2026-121180: Buffer overflow in Media
+  * CVE-2026-121181: Use after free in Editing
+  * CVE-2026-121182: Use after free in DOM
+  * CVE-2026-121183: Incorrect authorization in Extensions
+  * CVE-2026-121184: Out of bounds read in Media
+  * CVE-2026-121185: Use after free in PictureInPicture
+  * CVE-2026-121186: UI misrepresentation in Passwords
+  * CVE-2026-121187: Observable discrepancy in Paint
+  * CVE-2026-121188: Use after free in PerformanceAPIs
+  * CVE-2026-121189: Use after free in Browser
+  * CVE-2026-121190: UI misrepresentation in Extensions
+  * CVE-2026-121193: Incorrect authorization in Extensions
+  * CVE-2026-121194: Missing authorization in SiteIsolation
+  * CVE-2026-121195: Incorrect authorization in TrustedTypes
+  * CVE-2026-121196: Privilege elevation in Mobile
+  * CVE-2026-121197: Out of bounds read in ANGLE
+  * CVE-2026-121198: Confused deputy in WebUI
+  * CVE-2026-121199: Missing authorization in Chromoting
+  * CVE-2026-121200: Incorrect reference resolution in DevTools
+  * CVE-2026-121201: Use after free in Animation
+  * CVE-2026-121202: Use after free in Autofill
+  * CVE-2026-121203: Use after free in Geometry
+  * CVE-2026-121204: Incomplete cleanup in DevTools
+  * CVE-2026-121205: Incorrect authorization in CORS
+  * CVE-2026-121206: UI misrepresentation in Isolated
+  * CVE-2026-121207: Uninitialized resource in Dawn
+  * CVE-2026-121208: Out of bounds read in Media
+  * CVE-2026-121209: UI misrepresentation in Input
+  * CVE-2026-121210: Type confusion in V8
+  * CVE-2026-121211: Use after free in PowerBookmarks
+  * CVE-2026-121212: Incorrect authorization in Core
+  * CVE-2026-121213: Uninitialized resource in Images
+  * CVE-2026-121214: Use after free in Passwords
+  * CVE-2026-121215: UI misrepresentation in Bluetooth
+  * CVE-2026-121216: UI misrepresentation in UI
+  * CVE-2026-121217: Use after free in Streaming
+  * CVE-2026-121218: Type confusion in V8
+  * CVE-2026-121219: Integer overflow in GPU
+  * CVE-2026-121220: Incorrect authorization in Core
+  * CVE-2026-121221: Type confusion in V8
+  * CVE-2026-121222: Incorrect authorization in Forms
+  * CVE-2026-121223: Observable discrepancy in Media
+  * CVE-2026-121224: Security issue in Desktop
+  * CVE-2026-121225: Incorrect authorization in Permissions
+  * CVE-2026-121226: Type confusion in V8
+  * CVE-2026-121227: Uninitialized resource in Skia
+  * CVE-2026-121228: Type confusion in V8
+  * CVE-2026-121229: Memory corruption in ANGLE
+  * CVE-2026-121230: Race condition in ANGLE
+  * CVE-2026-121231: Incorrect authorization in DevTools
+  * CVE-2026-121232: Incorrect authorization in Core
+  * CVE-2026-121233: Type confusion in CacheStorage
+  * CVE-2026-121234: Privilege elevation in Contacts
+  * CVE-2026-121235: Information leak in Paint
+  * CVE-2026-121236: Improper input validation in Network
+  * CVE-2026-121237: Improper state validation in FileSystem
+  * CVE-2026-121238: Use after free in Source
+  * CVE-2026-121239: Information leak in Core
+  * CVE-2026-121240: Improper input validation in Variations
+  * CVE-2026-121241: Use after free in Navigation
+  * CVE-2026-121242: Improper input validation in WebPackaging
+  * CVE-2026-121243: Information leak in Frames
+  * CVE-2026-121244: UI misrepresentation in FileAPI
+  * CVE-2026-121245: Race condition in Autofill
+  * CVE-2026-121246: Use after free in WebGL
+  * CVE-2026-121247: Buffer overflow in Dawn
+  * CVE-2026-121248: Incorrect authorization in API
+  * CVE-2026-121249: Buffer overflow in ANGLE
+  * CVE-2026-121250: Use after free in Extensions
+  * CVE-2026-121251: Missing authorization in V8
+  * CVE-2026-121252: Incorrect authorization in Core
+  * CVE-2026-121253: Missing authorization in DevTools
+  * CVE-2026-121254: Information leak in Select
+  * CVE-2026-121255: Incorrect authorization in Autofill AI
+  * CVE-2026-121256: Use of released resource in GPU
+  * CVE-2026-121257: Use after free in TabStrip
+
 * Fri Oct 30 2026 Than Ngo <than@redhat.com> - 156.0.8078.79-1
 - Update to 156.0.8078.79, include 21 security fixes
   * CVE-2026-119260: Use after free in Frames

diff --git a/create-typesctipt-archive.sh b/create-typesctipt-archive.sh
new file mode 100755
index 0000000..fa497a9
--- /dev/null
+++ b/create-typesctipt-archive.sh
@@ -0,0 +1,19 @@
+#! /usr/bin/bash
+#
+# Need to install following rpms first:
+# rpm-build rpmdevtools rpmlint golang go-rpm-macros tar gzip patch git
+#
+
+path=$PWD
+echo "Downloading upstream typescript..."
+curl -fL https://github.com/microsoft/TypeScript/archive/refs/tags/v7.0.2.tar.gz \
+  -o TypeScript-7.0.2.tar.gz
+tar xf TypeScript-7.0.2.tar.gz
+pushd TypeScript-7.0.2/tsc
+export GOTOOLCHAIN=local
+export GOPROXY=https://proxy.golang.org
+echo "Creating vendor archive file..."
+go mod vendor
+tar -czf $path/TypeScript-7.0.2-vendor.tar.gz vendor
+popd
+echo "$path/TypeScript-7.0.2-vendor.tar.gz is created."

diff --git a/disable-ai.patch b/disable-ai.patch
index 4acb93a..82b8e97 100644
--- a/disable-ai.patch
+++ b/disable-ai.patch
@@ -1,10 +1,35 @@
 # Disable Glic ("Gemini Live in Chrome"), ScreenAI, and associated AI-based
 # features.
 
-diff -up chromium-156.0.8078.35/chrome/browser/accessibility/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/accessibility/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/accessibility/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/accessibility/BUILD.gn	2026-10-20 17:09:47.117654483 +0200
-@@ -59,7 +59,6 @@ source_set("accessibility") {
+--- a/chrome/browser/BUILD.gn
++++ b/chrome/browser/BUILD.gn
+@@ -2916,7 +2916,6 @@ source_set("browser") {
+       "//chrome/browser/profile_resetter:impl",
+       "//chrome/browser/record_replay",
+       "//chrome/browser/record_replay:impl",
+-      "//chrome/browser/screen_ai:screen_ai_service_router_factory",
+       "//chrome/browser/sharing_hub",
+       "//chrome/browser/sharing_hub:impl",
+       "//chrome/browser/smart_card",
+@@ -2965,7 +2964,6 @@ source_set("browser") {
+       "//chrome/browser/ui/waap:window_metrics_manager",
+       "//chrome/browser/ui/web_applications:impl",
+       "//chrome/browser/ui/webui/app_service_internals",
+-      "//chrome/browser/ui/webui/autofill_ml_internals",
+       "//chrome/browser/ui/webui/color_pipeline_internals",
+       "//chrome/browser/ui/webui/commerce",
+       "//chrome/browser/ui/webui/commerce:impl",
+@@ -3976,7 +3974,6 @@ source_set("browser") {
+       "//chrome/browser/lens/region_search",
+       "//chrome/browser/reading_list",
+       "//chrome/browser/safe_browsing",
+-      "//chrome/browser/screen_ai:screen_ai_service_router_factory",
+       "//chrome/browser/smart_card",
+       "//chrome/browser/support_tool",
+       "//chrome/browser/tab_group_sync:utils",
+--- a/chrome/browser/accessibility/BUILD.gn
++++ b/chrome/browser/accessibility/BUILD.gn
+@@ -60,7 +60,6 @@ source_set("accessibility") {
      public_deps += [
        "//chrome/browser/accessibility/live_caption",
        "//chrome/browser/profiles:profile_manager",
@@ -12,7 +37,7 @@ diff -up chromium-156.0.8078.35/chrome/browser/accessibility/BUILD.gn.disable-ai
        "//components/live_caption",
        "//components/pref_registry",
        "//ui/accessibility/platform",
-@@ -88,8 +87,6 @@ source_set("impl") {
+@@ -89,8 +88,6 @@ source_set("impl") {
  
    if (!is_android) {
      sources += [
@@ -20,16 +45,16 @@ diff -up chromium-156.0.8078.35/chrome/browser/accessibility/BUILD.gn.disable-ai
 -      "ax_main_node_annotator_controller_factory.cc",
        "embedded_a11y_extension_loader.cc",
        "invert_bubble_prefs.cc",
-       "page_colors_controller.cc",
+       "page_colors_controller_factory.cc",
 @@ -99,7 +96,6 @@ source_set("impl") {
        "//chrome/browser/accessibility/live_caption:impl",
        "//chrome/browser/extensions",
        "//chrome/browser/on_device_translation",
 -      "//chrome/browser/screen_ai:screen_ai_service_router_factory",
-       "//chrome/browser/ui",
        "//chrome/browser/ui/browser_window",
        "//chrome/browser/ui/views/frame:browser_view_header",
-@@ -246,9 +242,7 @@ if (!is_android) {
+       "//components/live_caption:live_translate",
+@@ -247,9 +243,7 @@ if (!is_android) {
      }
  
      deps += [
@@ -39,20 +64,18 @@ diff -up chromium-156.0.8078.35/chrome/browser/accessibility/BUILD.gn.disable-ai
      ]
  
      if (enable_screen_ai_browsertests) {
-diff -up chromium-156.0.8078.35/chrome/browser/accessibility/live_caption/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/accessibility/live_caption/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/accessibility/live_caption/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/accessibility/live_caption/BUILD.gn	2026-10-20 17:09:47.118038780 +0200
+--- a/chrome/browser/accessibility/live_caption/BUILD.gn
++++ b/chrome/browser/accessibility/live_caption/BUILD.gn
 @@ -44,7 +44,6 @@ source_set("impl") {
      "//chrome/browser/accessibility",
      "//chrome/browser/extensions",
      "//chrome/browser/on_device_translation",
 -    "//chrome/browser/screen_ai:screen_ai_service_router_factory",
-     "//chrome/browser/ui",
      "//chrome/browser/ui/browser_window",
      "//components/live_caption",
-diff -up chromium-156.0.8078.35/chrome/browser/accessibility/tree_fixing/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/accessibility/tree_fixing/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/accessibility/tree_fixing/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/accessibility/tree_fixing/BUILD.gn	2026-10-20 17:09:47.118319555 +0200
+     "//components/live_caption:constants",
+--- a/chrome/browser/accessibility/tree_fixing/BUILD.gn
++++ b/chrome/browser/accessibility/tree_fixing/BUILD.gn
 @@ -63,11 +63,9 @@ source_set("internal") {
    deps = [
      "//base",
@@ -65,26 +88,21 @@ diff -up chromium-156.0.8078.35/chrome/browser/accessibility/tree_fixing/BUILD.g
 -    "//services/screen_ai/public/mojom",
    ]
  }
-diff -up chromium-156.0.8078.35/chrome/browser/actor/actor_keyed_service.cc.disable-ai chromium-156.0.8078.35/chrome/browser/actor/actor_keyed_service.cc
---- chromium-156.0.8078.35/chrome/browser/actor/actor_keyed_service.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/actor/actor_keyed_service.cc	2026-10-20 17:09:47.118847319 +0200
-@@ -870,13 +870,6 @@ bool ActorKeyedService::IsActiveOnTab(co
- 
- ActorTask* ActorKeyedService::GetTaskFromTab(
-     const tabs::TabInterface& tab) const {
--  tabs::TabHandle handle = tab.GetHandle();
--  for (const auto& [task_id, task] : active_tasks_) {
--    if (task->HasTab(handle)) {
--      return task.get();
--    }
+--- a/chrome/browser/actor/actor_keyed_service.cc
++++ b/chrome/browser/actor/actor_keyed_service.cc
+@@ -869,10 +869,6 @@ void ActorKeyedService::StopTask(TaskId
+ }
+ 
+ ActorTask* ActorKeyedService::GetTask(TaskId task_id) {
+-  auto task = active_tasks_.find(task_id);
+-  if (task != active_tasks_.end()) {
+-    return task->second.get();
 -  }
--
    return nullptr;
  }
  
-diff -up chromium-156.0.8078.35/chrome/browser/browser_process.h.disable-ai chromium-156.0.8078.35/chrome/browser/browser_process.h
---- chromium-156.0.8078.35/chrome/browser/browser_process.h.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/browser_process.h	2026-10-20 17:09:47.119445405 +0200
+--- a/chrome/browser/browser_process.h
++++ b/chrome/browser/browser_process.h
 @@ -331,8 +331,6 @@ class BrowserProcess {
    virtual void set_usb_system_tray_icon_for_test(
        std::unique_ptr<UsbSystemTrayIcon> icon) = 0;
@@ -94,9 +112,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/browser_process.h.disable-ai chro
  #endif
  
    // Obtain the browser instance of OSCryptAsync, which should be used for data
-diff -up chromium-156.0.8078.35/chrome/browser/browser_process_impl.cc.disable-ai chromium-156.0.8078.35/chrome/browser/browser_process_impl.cc
---- chromium-156.0.8078.35/chrome/browser/browser_process_impl.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/browser_process_impl.cc	2026-10-20 17:09:47.120093661 +0200
+--- a/chrome/browser/browser_process_impl.cc
++++ b/chrome/browser/browser_process_impl.cc
 @@ -85,7 +85,6 @@
  #include "chrome/browser/serial/serial_policy_allowed_ports.h"
  #include "chrome/browser/shell_integration.h"
@@ -105,7 +122,7 @@ diff -up chromium-156.0.8078.35/chrome/browser/browser_process_impl.cc.disable-a
  #include "chrome/browser/ssl/secure_origin_prefs_observer.h"
  #include "chrome/browser/startup_data.h"
  #include "chrome/browser/status_icons/status_tray.h"
-@@ -261,12 +260,10 @@ void OnLocalStatePrefsLoaded();
+@@ -264,12 +263,10 @@ void OnLocalStatePrefsLoaded();
  #if BUILDFLAG(IS_CHROMEOS)
  #include "chrome/browser/chromeos/extensions/telemetry/chromeos_telemetry_extensions_browser_api_provider.h"
  #include "chrome/browser/hid/hid_pinned_notification.h"
@@ -118,7 +135,7 @@ diff -up chromium-156.0.8078.35/chrome/browser/browser_process_impl.cc.disable-a
  #include "chrome/browser/usb/usb_status_icon.h"
  #include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h"
  #endif
-@@ -1368,12 +1365,6 @@ GlobalFeatures* BrowserProcessImpl::GetF
+@@ -1373,12 +1370,6 @@ GlobalFeatures* BrowserProcessImpl::GetF
    return features_.get();
  }
  
@@ -131,7 +148,7 @@ diff -up chromium-156.0.8078.35/chrome/browser/browser_process_impl.cc.disable-a
  
  DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-@@ -1715,11 +1706,6 @@ void BrowserProcessImpl::PreMainMessageL
+@@ -1723,11 +1714,6 @@ void BrowserProcessImpl::PreMainMessageL
    soda_installer_impl_ = std::make_unique<speech::SodaInstallerImplChromeOS>();
  #endif  // BUILDFLAG(IS_CHROMEOS)
  
@@ -143,9 +160,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/browser_process_impl.cc.disable-a
  
    base::FilePath user_data_dir;
    bool result = base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
-diff -up chromium-156.0.8078.35/chrome/browser/browser_process_impl.h.disable-ai chromium-156.0.8078.35/chrome/browser/browser_process_impl.h
---- chromium-156.0.8078.35/chrome/browser/browser_process_impl.h.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/browser_process_impl.h	2026-10-20 17:09:47.120584088 +0200
+--- a/chrome/browser/browser_process_impl.h
++++ b/chrome/browser/browser_process_impl.h
 @@ -58,9 +58,6 @@ class SiteIsolationPrefsObserver;
  class SystemNotificationHelper;
  class StartupData;
@@ -188,28 +204,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/browser_process_impl.h.disable-ai
  #endif
  
    std::unique_ptr<BrowserProcessPlatformPart> platform_part_;
-diff -up chromium-156.0.8078.35/chrome/browser/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/BUILD.gn.disable-ai	2026-10-20 17:09:46.910549833 +0200
-+++ chromium-156.0.8078.35/chrome/browser/BUILD.gn	2026-10-20 17:09:47.115553053 +0200
-@@ -2605,7 +2605,6 @@ source_set("browser") {
-       "//chrome/browser/profile_resetter:impl",
-       "//chrome/browser/record_replay",
-       "//chrome/browser/record_replay:impl",
--      "//chrome/browser/screen_ai:screen_ai_service_router_factory",
-       "//chrome/browser/sharing_hub",
-       "//chrome/browser/sharing_hub:impl",
-       "//chrome/browser/smart_card",
-@@ -2654,7 +2653,6 @@ source_set("browser") {
-       "//chrome/browser/ui/waap:window_metrics_manager",
-       "//chrome/browser/ui/web_applications:impl",
-       "//chrome/browser/ui/webui/app_service_internals",
--      "//chrome/browser/ui/webui/autofill_ml_internals",
-       "//chrome/browser/ui/webui/color_pipeline_internals",
-       "//chrome/browser/ui/webui/commerce",
-       "//chrome/browser/ui/webui/commerce:impl",
-diff -up chromium-156.0.8078.35/chrome/browser/chrome_browser_interface_binders.cc.disable-ai chromium-156.0.8078.35/chrome/browser/chrome_browser_interface_binders.cc
---- chromium-156.0.8078.35/chrome/browser/chrome_browser_interface_binders.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/chrome_browser_interface_binders.cc	2026-10-20 17:09:47.120968490 +0200
+--- a/chrome/browser/chrome_browser_interface_binders.cc
++++ b/chrome/browser/chrome_browser_interface_binders.cc
 @@ -91,8 +91,6 @@
  
  #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
@@ -258,10 +254,9 @@ diff -up chromium-156.0.8078.35/chrome/browser/chrome_browser_interface_binders.
  #endif
  
  #if BUILDFLAG(IS_WIN)
-diff -up chromium-156.0.8078.35/chrome/browser/chrome_browser_interface_binders_webui_parts_desktop.cc.disable-ai chromium-156.0.8078.35/chrome/browser/chrome_browser_interface_binders_webui_parts_desktop.cc
---- chromium-156.0.8078.35/chrome/browser/chrome_browser_interface_binders_webui_parts_desktop.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/chrome_browser_interface_binders_webui_parts_desktop.cc	2026-10-20 17:09:47.121399478 +0200
-@@ -456,9 +456,6 @@ void PopulateChromeWebUIFrameBindersPart
+--- a/chrome/browser/chrome_browser_interface_binders_webui_parts_desktop.cc
++++ b/chrome/browser/chrome_browser_interface_binders_webui_parts_desktop.cc
+@@ -446,9 +446,6 @@ void PopulateChromeWebUIFrameBindersPart
        ::mojom::app_service_internals::AppServiceInternalsPageHandler,
        AppServiceInternalsUI>(map);
  
@@ -271,10 +266,17 @@ diff -up chromium-156.0.8078.35/chrome/browser/chrome_browser_interface_binders_
  
    RegisterWebUIControllerInterfaceBinder<
        access_code_cast::mojom::PageHandlerFactory,
-diff -up chromium-156.0.8078.35/chrome/browser/chrome_content_browser_client.cc.disable-ai chromium-156.0.8078.35/chrome/browser/chrome_content_browser_client.cc
---- chromium-156.0.8078.35/chrome/browser/chrome_content_browser_client.cc.disable-ai	2026-10-20 17:09:46.915549911 +0200
-+++ chromium-156.0.8078.35/chrome/browser/chrome_content_browser_client.cc	2026-10-20 17:09:47.122250321 +0200
-@@ -5686,9 +5686,6 @@ ChromeContentBrowserClient::CreateCommit
+--- a/chrome/browser/chrome_content_browser_client.cc
++++ b/chrome/browser/chrome_content_browser_client.cc
+@@ -1418,6 +1418,7 @@ base::FilePath GetModulePath(
+ #endif  // BUILDFLAG(IS_WIN) && !defined(COMPONENT_BUILD) &&
+         // !defined(ADDRESS_SANITIZER)
+ 
++[[maybe_unused]]
+ void MaybeAddCondition(
+     std::unique_ptr<content::CommitDeferringCondition> maybe_condition,
+     std::vector<std::unique_ptr<content::CommitDeferringCondition>>*
+@@ -5749,9 +5750,6 @@ ChromeContentBrowserClient::CreateCommit
        &conditions);
  #endif
  
@@ -284,10 +286,9 @@ diff -up chromium-156.0.8078.35/chrome/browser/chrome_content_browser_client.cc.
  
    return conditions;
  }
-diff -up chromium-156.0.8078.35/chrome/browser/component_updater/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/component_updater/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/component_updater/BUILD.gn.disable-ai	2026-10-20 17:09:46.918035707 +0200
-+++ chromium-156.0.8078.35/chrome/browser/component_updater/BUILD.gn	2026-10-20 17:09:47.123077844 +0200
-@@ -225,13 +225,6 @@ source_set("impl") {
+--- a/chrome/browser/component_updater/BUILD.gn
++++ b/chrome/browser/component_updater/BUILD.gn
+@@ -234,13 +234,6 @@ source_set("impl") {
      ]
    }
  
@@ -301,9 +302,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/component_updater/BUILD.gn.disabl
  
    if (use_minikin_hyphenation) {
      sources += [ "hyphenation_component_installer.cc" ]
-diff -up chromium-156.0.8078.35/chrome/browser/component_updater/registration.cc.disable-ai chromium-156.0.8078.35/chrome/browser/component_updater/registration.cc
---- chromium-156.0.8078.35/chrome/browser/component_updater/registration.cc.disable-ai	2026-10-20 17:09:46.794353663 +0200
-+++ chromium-156.0.8078.35/chrome/browser/component_updater/registration.cc	2026-10-20 17:09:47.123234894 +0200
+--- a/chrome/browser/component_updater/registration.cc
++++ b/chrome/browser/component_updater/registration.cc
 @@ -64,8 +64,6 @@
  
  #if BUILDFLAG(IS_ANDROID)
@@ -313,7 +313,7 @@ diff -up chromium-156.0.8078.35/chrome/browser/component_updater/registration.cc
  #endif  // BUILDFLAG(IS_ANDROID)
  
  #if !BUILDFLAG(IS_ANDROID)
-@@ -202,9 +200,6 @@ void RegisterComponentsForUpdate() {
+@@ -206,9 +204,6 @@ void RegisterComponentsForUpdate() {
    RegisterRealTimeUrlChecksAllowlistComponent(cus);
  #endif  // BUIDLFLAG(IS_ANDROID)
  
@@ -323,62 +323,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/component_updater/registration.cc
  
    RegisterCommerceHeuristicsComponent(cus);
  
-diff -up chromium-156.0.8078.35/chrome/browser/glic/glic_selection_observer.cc.disable-ai chromium-156.0.8078.35/chrome/browser/glic/glic_selection_observer.cc
---- chromium-156.0.8078.35/chrome/browser/glic/glic_selection_observer.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/glic/glic_selection_observer.cc	2026-10-20 17:09:47.123658022 +0200
-@@ -1269,20 +1269,6 @@ void GlicSelectionObserver::OnAskGeminiW
-   }
- 
-   std::string skill_prompt;
--  auto* tab_interface =
--      tabs::TabInterface::MaybeGetFromContents(web_contents());
--  if (tab_interface) {
--    if (auto* observer = skills::SkillsUpdateObserver::From(tab_interface)) {
--      if (const auto* list = observer->contextual_skills()) {
--        for (const auto& s : list->skills()) {
--          if (s.id() == skill.id) {
--            skill_prompt = s.prompt();
--            break;
--          }
--        }
--      }
--    }
--  }
- 
-   if (skill_prompt.empty()) {
-     Profile* profile =
-@@ -1303,28 +1289,6 @@ void GlicSelectionObserver::OnAskGeminiW
- std::vector<GlicSelectionWidgetDelegate::SkillOption>
- GlicSelectionObserver::GetContextualSkills() {
-   std::vector<GlicSelectionWidgetDelegate::SkillOption> result;
--  if (!features::kGlicSelectionPromptSkills.Get()) {
--    return result;
--  }
--  auto* tab_interface =
--      tabs::TabInterface::MaybeGetFromContents(web_contents());
--  if (!tab_interface) {
--    return result;
--  }
--  auto* observer = skills::SkillsUpdateObserver::From(tab_interface);
--  if (!observer) {
--    return result;
--  }
--  const auto* list = observer->contextual_skills();
--  if (!list) {
--    return result;
--  }
--  for (const auto& skill : list->skills()) {
--    if (!skill.id().empty() && !skill.name().empty()) {
--      result.emplace_back(
--          skills::Skill(skill.id(), skill.name(), skill.icon(), ""));
--    }
--  }
-   return result;
- }
- 
-diff -up chromium-156.0.8078.35/chrome/browser/glic/host/glic_skills_manager_impl.cc.disable-ai chromium-156.0.8078.35/chrome/browser/glic/host/glic_skills_manager_impl.cc
---- chromium-156.0.8078.35/chrome/browser/glic/host/glic_skills_manager_impl.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/glic/host/glic_skills_manager_impl.cc	2026-10-20 17:09:47.124113166 +0200
+--- a/chrome/browser/glic/host/glic_skills_manager_impl.cc
++++ b/chrome/browser/glic/host/glic_skills_manager_impl.cc
 @@ -504,39 +504,6 @@ bool GlicSkillsClientSession::Require1PS
  
  void GlicSkillsClientSession::UpdateSkillPreviews(
@@ -419,114 +365,50 @@ diff -up chromium-156.0.8078.35/chrome/browser/glic/host/glic_skills_manager_imp
  }
  
  void GlicSkillsClientSession::NotifyContextualSkillsChanged(
-diff -up chromium-156.0.8078.35/chrome/browser/navigation_predictor/navigation_predictor.cc.disable-ai chromium-156.0.8078.35/chrome/browser/navigation_predictor/navigation_predictor.cc
---- chromium-156.0.8078.35/chrome/browser/navigation_predictor/navigation_predictor.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/navigation_predictor/navigation_predictor.cc	2026-10-20 17:09:47.124547431 +0200
-@@ -18,8 +18,6 @@
- #include "base/time/default_tick_clock.h"
- #include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service.h"
- #include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service_factory.h"
--#include "chrome/browser/navigation_predictor/preloading_model_keyed_service.h"
--#include "chrome/browser/navigation_predictor/preloading_model_keyed_service_factory.h"
- #include "chrome/browser/preloading/preloading_prefs.h"
+--- a/chrome/browser/navigation_predictor/navigation_predictor.cc
++++ b/chrome/browser/navigation_predictor/navigation_predictor.cc
+@@ -15,8 +15,6 @@
+ #include "base/metrics/field_trial_params.h"
+ #include "base/rand_util.h"
+ #include "base/system/sys_info.h"
+-#include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service.h"
+-#include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service_factory.h"
  #include "chrome/browser/profiles/profile.h"
  #include "components/no_state_prefetch/browser/no_state_prefetch_manager.h"
-@@ -105,10 +103,6 @@ base::TimeDelta MLModelExecutionTimerSta
-       blink::features::kPreloadingModelTimerStartDelay.Get());
- }
- 
--base::TimeDelta MLModelExecutionTimerInterval() {
--  return base::Milliseconds(
--      blink::features::kPreloadingModelTimerInterval.Get());
--}
- 
- base::TimeDelta MLModelMaxHoverTime() {
-   return blink::features::kPreloadingModelMaxHoverTime.Get();
-@@ -415,80 +409,6 @@ void NavigationPredictor::ProcessPointer
- }
+ #include "content/public/browser/navigation_handle.h"
+@@ -276,21 +274,6 @@ void NavigationPredictor::ReportNewAncho
+     anchors_.erase(anchor_id);
+   }
  
- void NavigationPredictor::OnMLModelExecutionTimerFired() {
--  // Check whether preloading is enabled or not.
--  Profile* profile =
--      Profile::FromBrowserContext(render_frame_host().GetBrowserContext());
--  if (prefetch::IsSomePreloadingEnabled(*profile->GetPrefs()) !=
--      content::PreloadingEligibility::kEligible) {
--    return;
--  }
--
--  // Execute the model.
--  PreloadingModelKeyedService* model_service =
--      PreloadingModelKeyedServiceFactory::GetForProfile(profile);
--  if (!model_service) {
--    return;
--  }
--
--  if (!ml_model_candidate_.has_value()) {
--    return;
--  }
--  auto it = anchors_.find(ml_model_candidate_.value());
--  if (it == anchors_.end()) {
--    return;
--  }
--
--  AnchorElementData& anchor = it->second;
+-  if (!new_predictions.empty() && MaySendTraffic()) {
+-    NavigationPredictorKeyedService* service =
+-        NavigationPredictorKeyedServiceFactory::GetForProfile(
+-            Profile::FromBrowserContext(
+-                render_frame_host().GetBrowserContext()));
+-    CHECK(service, base::NotFatalUntil::M161);
+-    content::WebContents* web_contents =
+-        content::WebContents::FromRenderFrameHost(&render_frame_host());
 -
--  PreloadingModelKeyedService::Inputs inputs;
--  inputs.contains_image = anchor.contains_image;
--  inputs.font_size = anchor.font_size;
--  inputs.has_text_sibling = anchor.has_text_sibling;
--  inputs.is_bold = anchor.is_bold_font;
--  inputs.is_in_iframe = anchor.is_in_iframe;
--  inputs.is_url_incremented_by_one = anchor.is_url_incremented_by_one;
--  inputs.navigation_start_to_link_logged =
--      anchor.first_report_timestamp - navigation_start_;
--  auto path_info = GetUrlPathLengthDepthAndHash(anchor.target_url);
--  inputs.path_length = path_info.path_length;
--  inputs.path_depth = path_info.path_depth;
--  inputs.percent_clickable_area = anchor.ratio_area;
--  inputs.percent_vertical_distance =
--      static_cast<int>(anchor.ratio_distance_root_top * 100);
--
--  inputs.is_same_host = anchor.is_same_host;
--  auto to_timedelta = [this](std::optional<base::TimeTicks> ts) {
--    return ts.has_value() ? NowTicks() - ts.value() : base::TimeDelta();
--  };
--  // TODO(329691634): Using the real viewport entry time for
--  // `entered_viewport_to_left_viewport` produces low quality results.
--  // We could remove it from the model, if we can't get this to be useful.
--  inputs.entered_viewport_to_left_viewport = base::TimeDelta();
--  inputs.hover_dwell_time = to_timedelta(anchor.pointer_over_timestamp);
--  inputs.pointer_hovering_over_count = anchor.pointer_hovering_over_count;
--  if (model_score_callback_) {
--    std::move(model_score_callback_).Run(inputs);
--  }
--
--  content::PreloadingData* preloading_data =
--      content::PreloadingData::GetOrCreateForWebContents(
--          content::WebContents::FromRenderFrameHost(&render_frame_host()));
--  preloading_data->OnPreloadingHeuristicsModelInput(
--      anchor.target_url,
--      base::BindOnce(&RecordMetricsForModelTraining, inputs,
--                     render_frame_host().GetPageUkmSourceId()));
--  model_service->Score(
--      &scoring_model_task_tracker_, inputs,
--      base::BindOnce(&NavigationPredictor::OnPreloadingHeuristicsModelDone,
--                     weak_ptr_factory_.GetWeakPtr(), anchor.target_url));
--
--  if (inputs.hover_dwell_time < MLModelMaxHoverTime() &&
--      !ml_model_execution_timer_.IsRunning()) {
--    ml_model_execution_timer_.Start(
--        FROM_HERE, MLModelExecutionTimerInterval(),
--        base::BindOnce(&NavigationPredictor::OnMLModelExecutionTimerFired,
--                       base::Unretained(this)));
+-    service->OnPredictionUpdated(
+-        web_contents, document_url,
+-        NavigationPredictorKeyedService::PredictionSource::
+-            kAnchorElementsParsedFromWebPage,
+-        new_predictions);
 -  }
  }
  
- void NavigationPredictor::SetModelScoreCallbackForTesting(
-diff -up chromium-156.0.8078.35/chrome/browser/page_content_annotations/page_content_annotations_service_factory.cc.disable-ai chromium-156.0.8078.35/chrome/browser/page_content_annotations/page_content_annotations_service_factory.cc
---- chromium-156.0.8078.35/chrome/browser/page_content_annotations/page_content_annotations_service_factory.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/page_content_annotations/page_content_annotations_service_factory.cc	2026-10-20 17:09:47.124907010 +0200
-@@ -120,62 +120,6 @@ PageContentAnnotationsServiceFactory::~P
+ // static
+--- a/chrome/browser/page_content_annotations/page_content_annotations_service_factory.cc
++++ b/chrome/browser/page_content_annotations/page_content_annotations_service_factory.cc
+@@ -62,6 +62,7 @@ bool IsEphemeralProfile(Profile* profile
+   return entry && entry->IsEphemeral();
+ }
+ 
++[[maybe_unused]]
+ bool ShouldEnablePageContentAnnotations(Profile* profile) {
+   if (IsRunningInAppMode()) {
+     // The annotations we provide cannot provide any benefit to users in kiosk
+@@ -120,62 +121,6 @@ PageContentAnnotationsServiceFactory::~P
  std::unique_ptr<KeyedService>
  PageContentAnnotationsServiceFactory::BuildServiceInstanceForBrowserContext(
      content::BrowserContext* context) const {
@@ -589,9 +471,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/page_content_annotations/page_con
    return nullptr;
  }
  
-diff -up chromium-156.0.8078.35/chrome/browser/password_manager/password_change_delegate_impl.cc.disable-ai chromium-156.0.8078.35/chrome/browser/password_manager/password_change_delegate_impl.cc
---- chromium-156.0.8078.35/chrome/browser/password_manager/password_change_delegate_impl.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/password_manager/password_change_delegate_impl.cc	2026-10-20 17:09:47.125266785 +0200
+--- a/chrome/browser/password_manager/password_change_delegate_impl.cc
++++ b/chrome/browser/password_manager/password_change_delegate_impl.cc
 @@ -342,12 +342,6 @@ void PasswordChangeDelegateImpl::StartPa
            &PasswordChangeDelegateImpl::OnLoginStateCheckedWithoutPIResult,
            weak_ptr_factory_.GetWeakPtr()));
@@ -605,23 +486,23 @@ diff -up chromium-156.0.8078.35/chrome/browser/password_manager/password_change_
  }
  
  void PasswordChangeDelegateImpl::OnLoginStateCheckedWithoutPIResult(
-diff -up chromium-156.0.8078.35/chrome/browser/pdf/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/pdf/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/pdf/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/pdf/BUILD.gn	2026-10-20 17:09:47.125608663 +0200
-@@ -251,10 +251,7 @@ if (!is_android) {
+--- a/chrome/browser/pdf/BUILD.gn
++++ b/chrome/browser/pdf/BUILD.gn
+@@ -250,12 +250,9 @@ if (!is_android) {
        deps += [
          "//chrome/browser/download:test_support",
          "//chrome/browser/permissions",
 -        "//chrome/browser/screen_ai:screen_ai_install_state",
 -        "//chrome/browser/screen_ai:screen_ai_service_router_factory",
          "//chrome/browser/ui:browser_manager_service",
+         "//chrome/common/extensions/api",
+         "//extensions/browser:test_support",
 -        "//services/screen_ai/public/cpp:utilities",
          "//ui/accessibility:test_support",
        ]
  
-diff -up chromium-156.0.8078.35/chrome/browser/pdf/pdf_extension_util.cc.disable-ai chromium-156.0.8078.35/chrome/browser/pdf/pdf_extension_util.cc
---- chromium-156.0.8078.35/chrome/browser/pdf/pdf_extension_util.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/pdf/pdf_extension_util.cc	2026-10-20 17:09:47.125931368 +0200
+--- a/chrome/browser/pdf/pdf_extension_util.cc
++++ b/chrome/browser/pdf/pdf_extension_util.cc
 @@ -142,7 +142,6 @@ base::DictValue GetPdfViewerStrings() {
        {"rotationStateLabel90", IDS_PDF_ROTATION_STATE_LABEL_90},
        {"rotationStateLabel180", IDS_PDF_ROTATION_STATE_LABEL_180},
@@ -630,9 +511,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/pdf/pdf_extension_util.cc.disable
        {"sidebarLabel", IDS_PDF_SIDEBAR_LABEL},
        {"thumbnailPageAriaLabel", IDS_PDF_THUMBNAIL_PAGE_ARIA_LABEL},
        {"tooltipAttachments", IDS_PDF_TOOLTIP_ATTACHMENTS},
-diff -up chromium-156.0.8078.35/chrome/browser/permissions/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/permissions/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/permissions/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/permissions/BUILD.gn	2026-10-20 17:09:47.126341654 +0200
+--- a/chrome/browser/permissions/BUILD.gn
++++ b/chrome/browser/permissions/BUILD.gn
 @@ -45,12 +45,6 @@ source_set("permissions") {
      "prediction_service/language_detection_observer.h",
      "prediction_service/passage_embedder_delegate.cc",
@@ -646,9 +526,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/permissions/BUILD.gn.disable-ai c
      "prediction_service/prediction_service_factory.cc",
      "prediction_service/prediction_service_factory.h",
      "prediction_service/prediction_service_request.cc",
-diff -up chromium-156.0.8078.35/chrome/browser/permissions/chrome_permissions_client.cc.disable-ai chromium-156.0.8078.35/chrome/browser/permissions/chrome_permissions_client.cc
---- chromium-156.0.8078.35/chrome/browser/permissions/chrome_permissions_client.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/permissions/chrome_permissions_client.cc	2026-10-20 17:09:47.126790464 +0200
+--- a/chrome/browser/permissions/chrome_permissions_client.cc
++++ b/chrome/browser/permissions/chrome_permissions_client.cc
 @@ -32,7 +32,6 @@
  #include "chrome/browser/permissions/permission_actions_history_factory.h"
  #include "chrome/browser/permissions/permission_decision_auto_blocker_factory.h"
@@ -657,7 +536,7 @@ diff -up chromium-156.0.8078.35/chrome/browser/permissions/chrome_permissions_cl
  #include "chrome/browser/permissions/pref_based_quiet_permission_ui_selector.h"
  #include "chrome/browser/permissions/quiet_notification_permission_ui_config.h"
  #include "chrome/browser/permissions/system/system_permission_settings.h"
-@@ -554,8 +553,6 @@ ChromePermissionsClient::CreatePermissio
+@@ -556,8 +555,6 @@ ChromePermissionsClient::CreatePermissio
  #endif
    selectors.emplace_back(std::make_unique<PrefBasedQuietPermissionUiSelector>(
        Profile::FromBrowserContext(browser_context)));
@@ -666,7 +545,7 @@ diff -up chromium-156.0.8078.35/chrome/browser/permissions/chrome_permissions_cl
    return selectors;
  }
  
-@@ -577,8 +574,6 @@ void ChromePermissionsClient::OnPromptRe
+@@ -579,8 +576,6 @@ void ChromePermissionsClient::OnPromptRe
  
    Profile* profile =
        Profile::FromBrowserContext(web_contents->GetBrowserContext());
@@ -675,9 +554,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/permissions/chrome_permissions_cl
  
    if (request_type == permissions::RequestType::kNotifications) {
      if (action == permissions::PermissionAction::GRANTED &&
-diff -up chromium-156.0.8078.35/chrome/browser/permissions/prediction_service/passage_embedder_delegate.cc.disable-ai chromium-156.0.8078.35/chrome/browser/permissions/prediction_service/passage_embedder_delegate.cc
---- chromium-156.0.8078.35/chrome/browser/permissions/prediction_service/passage_embedder_delegate.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/permissions/prediction_service/passage_embedder_delegate.cc	2026-10-20 17:09:47.127337631 +0200
+--- a/chrome/browser/permissions/prediction_service/passage_embedder_delegate.cc
++++ b/chrome/browser/permissions/prediction_service/passage_embedder_delegate.cc
 @@ -26,18 +26,6 @@ PassageEmbedderDelegate::PassageEmbedder
      : profile_(profile) {}
  
@@ -697,9 +575,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/permissions/prediction_service/pa
    PermissionUmaUtil::RecordPassageEmbedderMetadataValid(false);
    return nullptr;
  }
-diff -up chromium-156.0.8078.35/chrome/browser/permissions/prediction_service/permissions_ai_ui_selector.cc.disable-ai chromium-156.0.8078.35/chrome/browser/permissions/prediction_service/permissions_ai_ui_selector.cc
---- chromium-156.0.8078.35/chrome/browser/permissions/prediction_service/permissions_ai_ui_selector.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/permissions/prediction_service/permissions_ai_ui_selector.cc	2026-10-20 17:09:47.127753162 +0200
+--- a/chrome/browser/permissions/prediction_service/permissions_ai_ui_selector.cc
++++ b/chrome/browser/permissions/prediction_service/permissions_ai_ui_selector.cc
 @@ -810,7 +810,7 @@ void PermissionsAiUiSelector::ExecuteOnD
      ModelExecutionData model_data) {
    VLOG(1) << "[PermissionsAI] ExecuteOnDeviceAivXModel";
@@ -709,10 +586,19 @@ diff -up chromium-156.0.8078.35/chrome/browser/permissions/prediction_service/pe
    if (prediction_model_handler_provider) {
      permissions::RequestType request_type =
          model_data.request_metadata.request_type;
-diff -up chromium-156.0.8078.35/chrome/browser/prefs/browser_prefs.cc.disable-ai chromium-156.0.8078.35/chrome/browser/prefs/browser_prefs.cc
---- chromium-156.0.8078.35/chrome/browser/prefs/browser_prefs.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/prefs/browser_prefs.cc	2026-10-20 17:09:47.129034282 +0200
-@@ -1788,9 +1788,6 @@ void RegisterLocalState(PrefRegistrySimp
+--- a/chrome/browser/prefs/BUILD.gn
++++ b/chrome/browser/prefs/BUILD.gn
+@@ -396,7 +396,6 @@ source_set("impl") {
+       "//chrome/browser/desktop_to_mobile_promos:utils",
+       "//chrome/browser/device_identity",
+       "//chrome/browser/new_tab_page",
+-      "//chrome/browser/screen_ai:prefs",
+       "//chrome/browser/search_engine_choice",
+       "//chrome/browser/search_engines",
+       "//chrome/browser/sharing_hub",
+--- a/chrome/browser/prefs/browser_prefs.cc
++++ b/chrome/browser/prefs/browser_prefs.cc
+@@ -1927,9 +1927,6 @@ void RegisterLocalState(PrefRegistrySimp
    DeviceOAuth2TokenStoreDesktop::RegisterPrefs(registry);
  #endif
  
@@ -722,21 +608,9 @@ diff -up chromium-156.0.8078.35/chrome/browser/prefs/browser_prefs.cc.disable-ai
  
  #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID)
    PlatformAuthPolicyObserver::RegisterPrefs(registry);
-diff -up chromium-156.0.8078.35/chrome/browser/prefs/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/prefs/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/prefs/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/prefs/BUILD.gn	2026-10-20 17:09:47.128291911 +0200
-@@ -389,7 +389,6 @@ source_set("impl") {
-       "//chrome/browser/desktop_to_mobile_promos:utils",
-       "//chrome/browser/device_identity",
-       "//chrome/browser/new_tab_page",
--      "//chrome/browser/screen_ai:prefs",
-       "//chrome/browser/search_engine_choice",
-       "//chrome/browser/search_engines",
-       "//chrome/browser/sharing_hub",
-diff -up chromium-156.0.8078.35/chrome/browser/profiles/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/profiles/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/profiles/BUILD.gn.disable-ai	2026-10-20 17:09:46.920803931 +0200
-+++ chromium-156.0.8078.35/chrome/browser/profiles/BUILD.gn	2026-10-20 17:09:47.129488889 +0200
-@@ -915,7 +915,6 @@ source_set("profiles_extra_parts_impl")
+--- a/chrome/browser/profiles/BUILD.gn
++++ b/chrome/browser/profiles/BUILD.gn
+@@ -933,7 +933,6 @@ source_set("profiles_extra_parts_impl")
    } else {
      deps += [
        "//chrome/browser/accessibility/phrase_segmentation",
@@ -744,7 +618,7 @@ diff -up chromium-156.0.8078.35/chrome/browser/profiles/BUILD.gn.disable-ai chro
        "//chrome/browser/apps/app_service",
        "//chrome/browser/autofill",
        "//chrome/browser/badging",
-@@ -930,7 +929,6 @@ source_set("profiles_extra_parts_impl")
+@@ -947,7 +946,6 @@ source_set("profiles_extra_parts_impl")
        "//chrome/browser/profile_resetter",
        "//chrome/browser/record_replay",
        "//chrome/browser/record_replay:impl",
@@ -752,34 +626,17 @@ diff -up chromium-156.0.8078.35/chrome/browser/profiles/BUILD.gn.disable-ai chro
        "//chrome/browser/search",
        "//chrome/browser/search_engine_choice",
        "//chrome/browser/sharing_hub",
-diff -up chromium-156.0.8078.35/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.disable-ai chromium-156.0.8078.35/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
---- chromium-156.0.8078.35/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.disable-ai	2026-10-20 17:09:46.921544684 +0200
-+++ chromium-156.0.8078.35/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc	2026-10-20 17:09:47.132022027 +0200
-@@ -134,7 +134,6 @@
- #include "chrome/browser/metrics/profile_metrics_service_factory.h"
- #include "chrome/browser/metrics/variations/google_groups_manager_factory.h"
- #include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service_factory.h"
--#include "chrome/browser/navigation_predictor/preloading_model_keyed_service_factory.h"
- #include "chrome/browser/navigation_predictor/search_engine_preconnector.h"
- #include "chrome/browser/navigation_predictor/search_engine_preconnector_keyed_service_factory.h"
- #include "chrome/browser/net/dns_probe_service_factory.h"
-@@ -395,7 +394,6 @@
+--- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
++++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
+@@ -396,7 +396,6 @@
  #include "chrome/browser/record_replay/task_parameters_extractor_factory.h"
  #include "chrome/browser/record_replay/task_service_factory.h"
  #include "chrome/browser/record_replay/task_store_factory.h"
 -#include "chrome/browser/screen_ai/screen_ai_service_router_factory.h"
- #include "chrome/browser/search/instant_service_factory.h"
  #include "chrome/browser/search_engine_choice/search_engine_choice_dialog_service_factory.h"
  #include "chrome/browser/speech/speech_recognition_client_browser_interface_factory.h"
-@@ -1185,7 +1183,6 @@ void ChromeBrowserMainExtraPartsProfiles
- #if BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI)
-   net::ServerCertificateDatabaseServiceFactory::GetInstance();
- #endif
--  PreloadingModelKeyedServiceFactory::GetInstance();
- #if BUILDFLAG(ENABLE_DICE_SUPPORT)
-   HistorySyncOptinServiceFactory::GetInstance();
-   ProfileManagementDisclaimerServiceFactory::GetInstance();
-@@ -1248,9 +1245,6 @@ void ChromeBrowserMainExtraPartsProfiles
+ #include "chrome/browser/speech/speech_recognition_service_factory.h"
+@@ -1230,9 +1229,6 @@ void ChromeBrowserMainExtraPartsProfiles
    // TODO(b/502297163): Implement for Android.
    OneTimePermissionsTrackerFactory::GetInstance();
  #endif
@@ -789,7 +646,7 @@ diff -up chromium-156.0.8078.35/chrome/browser/profiles/chrome_browser_main_extr
    OptimizationGuideGlobalStateHolderKeyedServiceFactory::GetInstance();
    OptimizationGuideKeyedServiceFactory::GetInstance();
    origin_gating::OriginGatingServiceFactory::GetInstance();
-@@ -1348,7 +1342,6 @@ void ChromeBrowserMainExtraPartsProfiles
+@@ -1328,7 +1324,6 @@ void ChromeBrowserMainExtraPartsProfiles
  #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
    policy::UserPolicyOidcSigninServiceFactory::GetInstance();
  #endif
@@ -797,7 +654,7 @@ diff -up chromium-156.0.8078.35/chrome/browser/profiles/chrome_browser_main_extr
    PredictionServiceFactory::GetInstance();
    predictors::AutocompleteActionPredictorFactory::GetInstance();
    predictors::LoadingPredictorFactory::GetInstance();
-@@ -1431,10 +1424,6 @@ void ChromeBrowserMainExtraPartsProfiles
+@@ -1412,10 +1407,6 @@ void ChromeBrowserMainExtraPartsProfiles
    SafetyHubMenuNotificationServiceFactory::GetInstance();
  #if !BUILDFLAG(IS_ANDROID)
    SafetyHubHatsServiceFactory::GetInstance();
@@ -808,7 +665,7 @@ diff -up chromium-156.0.8078.35/chrome/browser/profiles/chrome_browser_main_extr
  #endif
  #if BUILDFLAG(IS_CHROMEOS)
    if (ash::features::IsScannerEnabled()) {
-@@ -1558,7 +1547,6 @@ void ChromeBrowserMainExtraPartsProfiles
+@@ -1539,7 +1530,6 @@ void ChromeBrowserMainExtraPartsProfiles
    TopSitesFactory::GetInstance();
    translate::TranslateRankerFactory::GetInstance();
  #if !BUILDFLAG(IS_ANDROID)
@@ -816,10 +673,9 @@ diff -up chromium-156.0.8078.35/chrome/browser/profiles/chrome_browser_main_extr
    TriggeredProfileResetterFactory::GetInstance();
  #endif
    ttc::TtcKeyedServiceFactory::GetInstance();
-diff -up chromium-156.0.8078.35/chrome/browser/profiles/off_the_record_profile_impl.cc.disable-ai chromium-156.0.8078.35/chrome/browser/profiles/off_the_record_profile_impl.cc
---- chromium-156.0.8078.35/chrome/browser/profiles/off_the_record_profile_impl.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/profiles/off_the_record_profile_impl.cc	2026-10-20 17:09:47.132825618 +0200
-@@ -229,11 +229,6 @@ void OffTheRecordProfileImpl::Init() {
+--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
++++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
+@@ -240,11 +240,6 @@ void OffTheRecordProfileImpl::Init() {
    // AccessibilityLabelsService has a default prefs behavior in incognito.
    AccessibilityLabelsService::InitOffTheRecordPrefs(this);
  
@@ -831,10 +687,9 @@ diff -up chromium-156.0.8078.35/chrome/browser/profiles/off_the_record_profile_i
  
    // The ad service might not be available for some irregular profiles, like the
    // System Profile.
-diff -up chromium-156.0.8078.35/chrome/browser/profiles/profile_impl.cc.disable-ai chromium-156.0.8078.35/chrome/browser/profiles/profile_impl.cc
---- chromium-156.0.8078.35/chrome/browser/profiles/profile_impl.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/profiles/profile_impl.cc	2026-10-20 17:09:47.133708564 +0200
-@@ -923,11 +923,6 @@ void ProfileImpl::DoFinalInit(CreateMode
+--- a/chrome/browser/profiles/profile_impl.cc
++++ b/chrome/browser/profiles/profile_impl.cc
+@@ -928,33 +928,8 @@ void ProfileImpl::DoFinalInit(CreateMode
    // The password settings service needs to start listening to settings
    // changes from Google Mobile Services, as early as possible.
    PasswordManagerSettingsServiceFactory::GetForProfile(this);
@@ -845,32 +700,32 @@ diff -up chromium-156.0.8078.35/chrome/browser/profiles/profile_impl.cc.disable-
 -  }
  #endif  // BUILDFLAG(IS_ANDROID)
  
+-  if (features::IsLazyOptimizationGuideModelsEnabled() && IsRegularProfile()) {
+-    // Warm up Optimization Guide model services after startup so that model
+-    // observers register and downloads start soon after startup, without
+-    // blocking profile creation. Guest and OTR profiles skip this warmup on
+-    // purpose so these services are created on first use there.
+-    AfterStartupTaskUtils::PostTask(
+-        FROM_HERE, content::GetUIThreadTaskRunner({}),
+-        base::BindOnce(
+-            [](base::WeakPtr<Profile> profile) {
+-              if (!profile || profile->ShutdownStarted()) {
+-                return;
+-              }
+-              AutocompleteScoringModelServiceFactory::GetForProfile(
+-                  profile.get());
+-              OnDeviceTailModelServiceFactory::GetForProfile(profile.get());
+-              PredictionModelHandlerProviderFactory::GetForBrowserContext(
+-                  profile.get());
+-            },
+-            GetWeakPtr()));
+-  }
+ 
    // The announcement notification  service might not be available for some
-diff -up chromium-156.0.8078.35/chrome/browser/profiles/profile_manager.cc.disable-ai chromium-156.0.8078.35/chrome/browser/profiles/profile_manager.cc
---- chromium-156.0.8078.35/chrome/browser/profiles/profile_manager.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/profiles/profile_manager.cc	2026-10-20 17:09:47.134733395 +0200
-@@ -51,7 +51,6 @@
- #include "chrome/browser/buildflags.h"
- #include "chrome/browser/lifetime/application_lifetime.h"
- #include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service_factory.h"
--#include "chrome/browser/navigation_predictor/preloading_model_keyed_service_factory.h"
- #include "chrome/browser/prefs/incognito_mode_prefs.h"
- #include "chrome/browser/profiles/delete_profile_helper.h"
- #include "chrome/browser/profiles/keep_alive/profile_keep_alive_types.h"
-@@ -1603,9 +1602,6 @@ void ProfileManager::DoFinalInitForServi
-   // Ensure NavigationPredictorKeyedService is started.
-   NavigationPredictorKeyedServiceFactory::GetForProfile(profile);
- 
--  // Ensure PreloadingModelKeyedService is started.
--  PreloadingModelKeyedServiceFactory::GetForProfile(profile);
--
-   IdentityManagerFactory::GetForProfile(profile)->OnNetworkInitialized();
-   AccountReconcilorFactory::GetForProfile(profile);
- #if BUILDFLAG(IS_ANDROID)
-diff -up chromium-156.0.8078.35/chrome/browser/resources/pdf/pdf_viewer.html.disable-ai chromium-156.0.8078.35/chrome/browser/resources/pdf/pdf_viewer.html
---- chromium-156.0.8078.35/chrome/browser/resources/pdf/pdf_viewer.html.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/resources/pdf/pdf_viewer.html	2026-10-20 17:09:47.136247873 +0200
-@@ -102,10 +102,6 @@ import {AnnotationMode} from './constant
+   // irregular profiles, like the System Profile.
+--- a/chrome/browser/resources/pdf/pdf_viewer.html
++++ b/chrome/browser/resources/pdf/pdf_viewer.html
+@@ -103,10 +103,6 @@ import {AnnotationMode} from './constant
        </cr-page-selector>
      ` : ''}
    </if>
@@ -881,9 +736,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/resources/pdf/pdf_viewer.html.dis
  </div>
  
  ${this.showErrorDialog ? html`<viewer-error-dialog id="error-dialog">
-diff -up chromium-156.0.8078.35/chrome/browser/skills/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/skills/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/skills/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/skills/BUILD.gn	2026-10-20 17:09:47.136620563 +0200
+--- a/chrome/browser/skills/BUILD.gn
++++ b/chrome/browser/skills/BUILD.gn
 @@ -62,13 +62,9 @@ source_set("public") {
  source_set("ui") {
    sources = [
@@ -898,9 +752,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/skills/BUILD.gn.disable-ai chromi
        "skills_ui_window_controller.cc",
      ]
    }
-diff -up chromium-156.0.8078.35/chrome/browser/speech/chrome_speech_recognition_service.cc.disable-ai chromium-156.0.8078.35/chrome/browser/speech/chrome_speech_recognition_service.cc
---- chromium-156.0.8078.35/chrome/browser/speech/chrome_speech_recognition_service.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/speech/chrome_speech_recognition_service.cc	2026-10-20 17:09:47.137036664 +0200
+--- a/chrome/browser/speech/chrome_speech_recognition_service.cc
++++ b/chrome/browser/speech/chrome_speech_recognition_service.cc
 @@ -59,18 +59,6 @@ ChromeSpeechRecognitionService::ChromeSp
      soda_installer_observer_.Observe(soda_installer);
    }
@@ -963,9 +816,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/speech/chrome_speech_recognition_
  
    BindSodaRecognizer(std::move(receiver), std::move(client), std::move(options),
                       std::move(callback));
-diff -up chromium-156.0.8078.35/chrome/browser/speech/speech_recognition_client_browser_interface.cc.disable-ai chromium-156.0.8078.35/chrome/browser/speech/speech_recognition_client_browser_interface.cc
---- chromium-156.0.8078.35/chrome/browser/speech/speech_recognition_client_browser_interface.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/speech/speech_recognition_client_browser_interface.cc	2026-10-20 17:09:47.137351352 +0200
+--- a/chrome/browser/speech/speech_recognition_client_browser_interface.cc
++++ b/chrome/browser/speech/speech_recognition_client_browser_interface.cc
 @@ -67,15 +67,6 @@ SpeechRecognitionClientBrowserInterface:
    if (speech::SodaInstaller::GetInstance()) {
      soda_installer_observation_.Observe(speech::SodaInstaller::GetInstance());
@@ -1034,28 +886,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/speech/speech_recognition_client_
    } else {
      if (speech::SodaInstaller::GetInstance()) {
        is_installed = speech::SodaInstaller::GetInstance()->IsSodaInstalled(
-diff -up chromium-156.0.8078.35/chrome/browser/ui/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/ui/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/ui/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/ui/BUILD.gn	2026-10-20 17:09:47.138284584 +0200
-@@ -2438,7 +2438,6 @@ static_library("ui") {
-       "//chrome/browser/lens/region_search",
-       "//chrome/browser/reading_list",
-       "//chrome/browser/safe_browsing",
--      "//chrome/browser/screen_ai:screen_ai_service_router_factory",
-       "//chrome/browser/smart_card",
-       "//chrome/browser/support_tool",
-       "//chrome/browser/tab_group_sync:utils",
-@@ -3934,7 +3933,6 @@ static_library("ui") {
-       "//chrome/browser/ui/views/zoom",
-       "//chrome/browser/ui/webauthn:impl",
-       "//chrome/browser/ui/webui/app_service_internals",
--      "//chrome/browser/ui/webui/autofill_ml_internals",
-       "//chrome/browser/ui/webui/side_panel/customize_chrome",
-       "//chrome/browser/ui/window_metadata",
-       "//chrome/browser/ui/window_name_prompt",
-diff -up chromium-156.0.8078.35/chrome/browser/ui/pdf/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/ui/pdf/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/ui/pdf/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/ui/pdf/BUILD.gn	2026-10-20 17:09:47.138822519 +0200
+--- a/chrome/browser/ui/pdf/BUILD.gn
++++ b/chrome/browser/ui/pdf/BUILD.gn
 @@ -6,7 +6,6 @@ import("//pdf/features.gni")
  import("//services/screen_ai/buildflags/features.gni")
  
@@ -1072,10 +904,17 @@ diff -up chromium-156.0.8078.35/chrome/browser/ui/pdf/BUILD.gn.disable-ai chromi
      "//chrome/browser/ui/tab_contents",
      "//chrome/browser/ui/user_education",
      "//chrome/common",
-diff -up chromium-156.0.8078.35/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.cc.disable-ai chromium-156.0.8078.35/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.cc
---- chromium-156.0.8078.35/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.cc	2026-10-20 17:09:47.139120273 +0200
-@@ -229,22 +229,3 @@ void ChromePDFDocumentHelperClient::SetP
+--- a/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.cc
++++ b/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.cc
+@@ -88,6 +88,7 @@ bool MaybeShowFeaturePromo(const base::F
+   return true;
+ }
+ 
++[[maybe_unused]]
+ void MaybeHideSearchifyFeaturePromo(tabs::TabInterface* tab_interface) {
+   auto* user_education_interface = BrowserUserEducationInterface::From(
+       tab_interface->GetBrowserWindowInterface());
+@@ -229,22 +230,3 @@ void ChromePDFDocumentHelperClient::SetP
    }
  }
  
@@ -1098,9 +937,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/ui/pdf/chrome_pdf_document_helper
 -  tab_subscriptions_.push_back(tab->RegisterWillDeactivate(
 -      base::BindRepeating(&MaybeHideSearchifyFeaturePromo)));
 -}
-diff -up chromium-156.0.8078.35/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.h.disable-ai chromium-156.0.8078.35/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.h
---- chromium-156.0.8078.35/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.h.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.h	2026-10-20 17:09:47.139286624 +0200
+--- a/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.h
++++ b/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.h
 @@ -32,7 +32,6 @@ class ChromePDFDocumentHelperClient : pu
    void OnSaveURL() override;
    void SetPluginCanSave(content::RenderFrameHost& render_frame_host,
@@ -1109,10 +947,9 @@ diff -up chromium-156.0.8078.35/chrome/browser/ui/pdf/chrome_pdf_document_helper
  
    void OnPdfTextExtracted(content::GlobalRenderFrameHostId render_frame_host_id,
                            const std::u16string& text);
-diff -up chromium-156.0.8078.35/chrome/browser/ui/tabs/public/tab_features.h.disable-ai chromium-156.0.8078.35/chrome/browser/ui/tabs/public/tab_features.h
---- chromium-156.0.8078.35/chrome/browser/ui/tabs/public/tab_features.h.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/ui/tabs/public/tab_features.h	2026-10-20 17:09:47.139705738 +0200
-@@ -220,12 +220,6 @@ namespace web_app {
+--- a/chrome/browser/ui/tabs/public/tab_features.h
++++ b/chrome/browser/ui/tabs/public/tab_features.h
+@@ -274,12 +274,6 @@ namespace web_app {
  class WindowManagementContentSettingObserver;
  }  // namespace web_app
  
@@ -1125,9 +962,9 @@ diff -up chromium-156.0.8078.35/chrome/browser/ui/tabs/public/tab_features.h.dis
  namespace sync_sessions {
  class SyncSessionsRouterTabHelper;
  }  // namespace sync_sessions
-@@ -779,10 +773,6 @@ class TabFeatures {
-   std::unique_ptr<contextual_tasks::ContextualTasksTabVisitTracker>
-       contextual_tasks_tab_visit_tracker_;
+@@ -870,10 +864,6 @@ class TabFeatures {
+   std::unique_ptr<contextual_tasks::SearchJourneyTabFeature>
+       search_journey_tab_feature_;
  
 -#if !BUILDFLAG(IS_ANDROID)
 -  std::unique_ptr<skills::SkillsUpdateObserver> skills_update_observer_;
@@ -1136,10 +973,9 @@ diff -up chromium-156.0.8078.35/chrome/browser/ui/tabs/public/tab_features.h.dis
  #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
    std::unique_ptr<metrics::DesktopSessionDurationObserver>
        desktop_session_duration_observer_;
-diff -up chromium-156.0.8078.35/chrome/browser/ui/tabs/tab_features.cc.disable-ai chromium-156.0.8078.35/chrome/browser/ui/tabs/tab_features.cc
---- chromium-156.0.8078.35/chrome/browser/ui/tabs/tab_features.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/ui/tabs/tab_features.cc	2026-10-20 17:09:47.140387632 +0200
-@@ -506,11 +506,6 @@ void TabFeatures::Init(TabInterface& tab
+--- a/chrome/browser/ui/tabs/tab_features.cc
++++ b/chrome/browser/ui/tabs/tab_features.cc
+@@ -715,11 +715,6 @@ void TabFeatures::Init(TabInterface& tab
            GetUserDataFactory().CreateInstance<actor::ui::ActorUiTabController>(
                tab, tab, actor::ActorKeyedService::Get(profile));
      }
@@ -1151,7 +987,7 @@ diff -up chromium-156.0.8078.35/chrome/browser/ui/tabs/tab_features.cc.disable-a
    }  // IsInNormalWindow() end.
  
    if (base::FeatureList::IsEnabled(features::kGlicActor)) {
-@@ -814,10 +809,6 @@ void TabFeatures::Init(TabInterface& tab
+@@ -1056,10 +1051,6 @@ void TabFeatures::Init(TabInterface& tab
    }
  #endif
  
@@ -1162,10 +998,9 @@ diff -up chromium-156.0.8078.35/chrome/browser/ui/tabs/tab_features.cc.disable-a
    if (base::FeatureList::IsEnabled(features::kIndigo)) {
      indigo_page_action_controller_ =
          std::make_unique<indigo::IndigoPageActionController>(
-diff -up chromium-156.0.8078.35/chrome/browser/ui/views/user_education/browser_user_education_service.cc.disable-ai chromium-156.0.8078.35/chrome/browser/ui/views/user_education/browser_user_education_service.cc
---- chromium-156.0.8078.35/chrome/browser/ui/views/user_education/browser_user_education_service.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/ui/views/user_education/browser_user_education_service.cc	2026-10-20 17:09:47.141124695 +0200
-@@ -1082,40 +1082,6 @@ void MaybeRegisterChromeFeaturePromos(
+--- a/chrome/browser/ui/views/user_education/browser_user_education_service.cc
++++ b/chrome/browser/ui/views/user_education/browser_user_education_service.cc
+@@ -1149,40 +1149,6 @@ void MaybeRegisterChromeFeaturePromos(
                         "Triggered when the PDF Viewer opens.")));
  #endif  // BUILDFLAG(ENABLE_PDF_INK2)
  
@@ -1206,21 +1041,19 @@ diff -up chromium-156.0.8078.35/chrome/browser/ui/views/user_education/browser_u
  
    // kIPHLensOverlayFeature:
    registry.RegisterFeature(std::move(
-diff -up chromium-156.0.8078.35/chrome/browser/ui/webui/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/ui/webui/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/ui/webui/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/ui/webui/BUILD.gn	2026-10-20 17:09:47.141678392 +0200
-@@ -114,7 +114,6 @@ source_set("configs") {
-       "//chrome/browser/actor/ui:actor_overlay_web_view",
+--- a/chrome/browser/ui/webui/BUILD.gn
++++ b/chrome/browser/ui/webui/BUILD.gn
+@@ -116,7 +116,6 @@ source_set("configs") {
+       "//chrome/browser/ui/tabs/tab_group_home",
        "//chrome/browser/ui/webui/access_code_cast",
        "//chrome/browser/ui/webui/app_service_internals",
 -      "//chrome/browser/ui/webui/autofill_ml_internals",
        "//chrome/browser/ui/webui/color_pipeline_internals",
+       "//chrome/browser/ui/webui/commerce",
        "//chrome/browser/ui/webui/critical_actions",
-       "//chrome/browser/ui/webui/infobar_internals",
-diff -up chromium-156.0.8078.35/chrome/browser/ui/webui/chrome_web_ui_configs.cc.disable-ai chromium-156.0.8078.35/chrome/browser/ui/webui/chrome_web_ui_configs.cc
---- chromium-156.0.8078.35/chrome/browser/ui/webui/chrome_web_ui_configs.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/ui/webui/chrome_web_ui_configs.cc	2026-10-20 17:09:47.142058709 +0200
-@@ -354,7 +354,6 @@ void RegisterChromeWebUIConfigs() {
+--- a/chrome/browser/ui/webui/chrome_web_ui_configs.cc
++++ b/chrome/browser/ui/webui/chrome_web_ui_configs.cc
+@@ -365,7 +365,6 @@ void RegisterChromeWebUIConfigs() {
    map.AddWebUIConfig(std::make_unique<media_router::AccessCodeCastUIConfig>());
    map.AddWebUIConfig(std::make_unique<actor::ui::ActorOverlayUIConfig>());
    map.AddWebUIConfig(std::make_unique<AppServiceInternalsUIConfig>());
@@ -1228,9 +1061,26 @@ diff -up chromium-156.0.8078.35/chrome/browser/ui/webui/chrome_web_ui_configs.cc
    map.AddWebUIConfig(std::make_unique<BookmarksSidePanelUIConfig>());
    map.AddWebUIConfig(std::make_unique<BookmarksUIConfig>());
    map.AddWebUIConfig(std::make_unique<ColorPipelineInternalsUIConfig>());
-diff -up chromium-156.0.8078.35/chrome/browser/ui/webui/settings/accessibility_main_handler.cc.disable-ai chromium-156.0.8078.35/chrome/browser/ui/webui/settings/accessibility_main_handler.cc
---- chromium-156.0.8078.35/chrome/browser/ui/webui/settings/accessibility_main_handler.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/ui/webui/settings/accessibility_main_handler.cc	2026-10-20 17:09:47.142771034 +0200
+--- a/chrome/browser/ui/webui/settings/BUILD.gn
++++ b/chrome/browser/ui/webui/settings/BUILD.gn
+@@ -66,7 +66,6 @@ source_set("settings") {
+     "//chrome/browser/profile_resetter",
+     "//chrome/browser/profile_resetter:profile_reset_report_proto",
+     "//chrome/browser/profiles:profile",
+-    "//chrome/browser/screen_ai:screen_ai_install_state",
+     "//chrome/browser/themes",
+     "//chrome/browser/ui/safety_hub",
+     "//chrome/browser/ui/search_engines",
+@@ -704,7 +703,6 @@ if (!is_android) {
+       ]
+       deps += [
+         "//chrome/browser/profiles",
+-        "//chrome/browser/screen_ai:screen_ai_install_state",
+         "//ui/accessibility",
+       ]
+     }
+--- a/chrome/browser/ui/webui/settings/accessibility_main_handler.cc
++++ b/chrome/browser/ui/webui/settings/accessibility_main_handler.cc
 @@ -35,11 +35,6 @@ void AccessibilityMainHandler::RegisterM
        base::BindRepeating(
            &AccessibilityMainHandler::HandleCheckAccessibilityImageLabels,
@@ -1295,9 +1145,8 @@ diff -up chromium-156.0.8078.35/chrome/browser/ui/webui/settings/accessibility_m
  }
  
  void AccessibilityMainHandler::HandleGetScreenReaderState(
-diff -up chromium-156.0.8078.35/chrome/browser/ui/webui/settings/accessibility_main_handler.h.disable-ai chromium-156.0.8078.35/chrome/browser/ui/webui/settings/accessibility_main_handler.h
---- chromium-156.0.8078.35/chrome/browser/ui/webui/settings/accessibility_main_handler.h.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/ui/webui/settings/accessibility_main_handler.h	2026-10-20 17:09:47.142925997 +0200
+--- a/chrome/browser/ui/webui/settings/accessibility_main_handler.h
++++ b/chrome/browser/ui/webui/settings/accessibility_main_handler.h
 @@ -19,8 +19,7 @@ namespace settings {
  // Settings handler for the main accessibility settings page,
  // chrome://settings/accessibility.
@@ -1329,29 +1178,9 @@ diff -up chromium-156.0.8078.35/chrome/browser/ui/webui/settings/accessibility_m
  };
  
  }  // namespace settings
-diff -up chromium-156.0.8078.35/chrome/browser/ui/webui/settings/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/ui/webui/settings/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/ui/webui/settings/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/ui/webui/settings/BUILD.gn	2026-10-20 17:09:47.142455715 +0200
-@@ -62,7 +62,6 @@ source_set("settings") {
-     "//chrome/browser/permissions/system",
-     "//chrome/browser/profile_resetter",
-     "//chrome/browser/profiles:profile",
--    "//chrome/browser/screen_ai:screen_ai_install_state",
-     "//chrome/browser/themes",
-     "//chrome/browser/ui/safety_hub",
-     "//chrome/browser/ui/search_engines",
-@@ -680,7 +679,6 @@ if (!is_android) {
-       ]
-       deps += [
-         "//chrome/browser/profiles",
--        "//chrome/browser/screen_ai:screen_ai_install_state",
-         "//ui/accessibility",
-       ]
-     }
-diff -up chromium-156.0.8078.35/chrome/browser/ui/webui/side_panel/read_anything/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/browser/ui/webui/side_panel/read_anything/BUILD.gn
---- chromium-156.0.8078.35/chrome/browser/ui/webui/side_panel/read_anything/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/ui/webui/side_panel/read_anything/BUILD.gn	2026-10-20 17:09:47.143104559 +0200
-@@ -36,7 +36,6 @@ source_set("read_anything") {
+--- a/chrome/browser/ui/webui/side_panel/read_anything/BUILD.gn
++++ b/chrome/browser/ui/webui/side_panel/read_anything/BUILD.gn
+@@ -39,7 +39,6 @@ source_set("read_anything") {
      "//chrome/browser/profiles:profile",
      "//chrome/browser/resources/side_panel/read_anything:resources",
      "//chrome/browser/resources/side_panel/shared:resources_grit",
@@ -1359,10 +1188,9 @@ diff -up chromium-156.0.8078.35/chrome/browser/ui/webui/side_panel/read_anything
      "//chrome/browser/speech",
      "//chrome/browser/translate",
      "//chrome/browser/ui:accelerator_table",
-diff -up chromium-156.0.8078.35/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler.cc.disable-ai chromium-156.0.8078.35/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler.cc
---- chromium-156.0.8078.35/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler.cc	2026-10-20 17:09:47.143582610 +0200
-@@ -19,8 +19,6 @@
+--- a/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler.cc
++++ b/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler.cc
+@@ -21,8 +21,6 @@
  #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
  #include "chrome/browser/language/language_model_manager_factory.h"
  #include "chrome/browser/profiles/profile.h"
@@ -1371,7 +1199,15 @@ diff -up chromium-156.0.8078.35/chrome/browser/ui/webui/side_panel/read_anything
  #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h"
  #include "chrome/browser/translate/chrome_translate_client.h"
  #include "chrome/browser/ui/read_anything/read_anything_controller.h"
-@@ -478,14 +476,6 @@ ReadAnythingUntrustedPageHandler::ReadAn
+@@ -436,7 +434,6 @@ ReadAnythingUntrustedPageHandler::ReadAn
+       web_ui_(web_ui),
+       receiver_(this, std::move(receiver)),
+       page_(std::move(page)),
+-      use_screen_ai_service_(use_screen_ai_service),
+ #if BUILDFLAG(IS_CHROMEOS)
+       extension_wrapper_(std::move(extension_wrapper)),
+ #endif
+@@ -485,14 +482,6 @@ ReadAnythingUntrustedPageHandler::ReadAn
    prefs_lang = language::ExtractBaseLanguage(prefs_lang);
    SetDefaultLanguageCode(prefs_lang);
  
@@ -1386,10 +1222,19 @@ diff -up chromium-156.0.8078.35/chrome/browser/ui/webui/side_panel/read_anything
  
    if (features::IsReadAnythingWithReadabilityEnabled() &&
        !features::IsReadAnythingReadAloudPhraseHighlightingEnabled()) {
-diff -up chromium-156.0.8078.35/chrome/renderer/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/renderer/BUILD.gn
---- chromium-156.0.8078.35/chrome/renderer/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/renderer/BUILD.gn	2026-10-20 17:09:47.144053919 +0200
-@@ -346,8 +346,6 @@ static_library("renderer") {
+--- a/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler.h
++++ b/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler.h
+@@ -490,7 +490,6 @@ class ReadAnythingUntrustedPageHandler :
+   // The translation state last sent to the page, or nullopt if none has been
+   // sent yet.
+   std::optional<bool> last_sent_is_translated_;
+-  const bool use_screen_ai_service_;
+ 
+ #if BUILDFLAG(IS_CHROMEOS)
+   // The ChromeOS language pack manager can't handle more than one language
+--- a/chrome/renderer/BUILD.gn
++++ b/chrome/renderer/BUILD.gn
+@@ -347,8 +347,6 @@ static_library("renderer") {
      deps += [ "//chrome/common/wallet:mojo_bindings" ]
    } else {
      sources += [
@@ -1398,7 +1243,7 @@ diff -up chromium-156.0.8078.35/chrome/renderer/BUILD.gn.disable-ai chromium-156
        "accessibility/phrase_segmentation/base_phrase_segmenter.cc",
        "accessibility/phrase_segmentation/base_phrase_segmenter.h",
        "accessibility/phrase_segmentation/dependency_parser_model.cc",
-@@ -364,23 +362,6 @@ static_library("renderer") {
+@@ -365,23 +363,6 @@ static_library("renderer") {
        "accessibility/phrase_segmentation/tokenized_sentence.h",
        "accessibility/phrase_segmentation/tokenizer.cc",
        "accessibility/phrase_segmentation/tokenizer.h",
@@ -1422,7 +1267,7 @@ diff -up chromium-156.0.8078.35/chrome/renderer/BUILD.gn.disable-ai chromium-156
        "media/chrome_speech_recognition_client.cc",
        "media/chrome_speech_recognition_client.h",
        "password_manager/remote_actor_credential_sharing_extension.cc",
-@@ -398,7 +379,6 @@ static_library("renderer") {
+@@ -394,7 +375,6 @@ static_library("renderer") {
        "//components/record_replay/content/renderer",
        "//components/trusted_vault",
        "//services/screen_ai/buildflags",
@@ -1430,21 +1275,20 @@ diff -up chromium-156.0.8078.35/chrome/renderer/BUILD.gn.disable-ai chromium-156
        "//services/strings",
        "//third_party/re2",
        "//third_party/tensorflow-text",
-diff -up chromium-156.0.8078.35/chrome/renderer/chrome_render_frame_observer.cc.disable-ai chromium-156.0.8078.35/chrome/renderer/chrome_render_frame_observer.cc
---- chromium-156.0.8078.35/chrome/renderer/chrome_render_frame_observer.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/renderer/chrome_render_frame_observer.cc	2026-10-20 17:09:47.144502641 +0200
-@@ -88,7 +88,6 @@
+--- a/chrome/renderer/chrome_render_frame_observer.cc
++++ b/chrome/renderer/chrome_render_frame_observer.cc
+@@ -89,7 +89,6 @@
  #include "url/url_constants.h"
  
  #if !BUILDFLAG(IS_ANDROID)
 -#include "chrome/renderer/accessibility/read_anything/read_anything_app_controller.h"
- #include "chrome/renderer/searchbox/searchbox_extension.h"
  #endif  // !BUILDFLAG(IS_ANDROID)
  
-@@ -385,14 +384,6 @@ void ChromeRenderFrameObserver::DidClear
-     SearchBoxExtension::Install(render_frame()->GetWebFrame());
-   }
+ #if BUILDFLAG(SAFE_BROWSING_AVAILABLE)
+@@ -396,14 +395,6 @@ void ChromeRenderFrameObserver::DidClear
+ #endif
  
+ #if !BUILDFLAG(IS_ANDROID)
 -  // Install ReadAnythingAppController on render frames with the Read Anything
 -  // url, which is chrome-untrusted. ReadAnythingAppController installs v8
 -  // bindings in the chrome.readingMode namespace which are consumed by
@@ -1456,48 +1300,35 @@ diff -up chromium-156.0.8078.35/chrome/renderer/chrome_render_frame_observer.cc.
  #endif  // !BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(ENABLE_GUEST_VIEW) && !BUILDFLAG(ENABLE_EXTENSIONS_CORE)
    guest_view::SlimWebViewBindings::MaybeInstall(*render_frame());
-diff -up chromium-156.0.8078.35/chrome/test/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/test/BUILD.gn
---- chromium-156.0.8078.35/chrome/test/BUILD.gn.disable-ai	2026-10-20 17:09:46.922795453 +0200
-+++ chromium-156.0.8078.35/chrome/test/BUILD.gn	2026-10-20 17:09:47.145277166 +0200
-@@ -1891,9 +1891,6 @@ if (!is_android) {
-       "//chrome/browser/safe_browsing:blocking_page_platform_test_support",
+--- a/chrome/test/BUILD.gn
++++ b/chrome/test/BUILD.gn
+@@ -1463,7 +1463,6 @@ if (!is_android) {
+       "//chrome/browser/renderer_context_menu:browser_tests",
+       "//chrome/browser/renderer_host:browser_tests",
        "//chrome/browser/safe_browsing:browser_tests",
-       "//chrome/browser/safe_browsing:verdict_cache_manager_factory",
 -      "//chrome/browser/screen_ai:browser_tests",
--      "//chrome/browser/screen_ai:screen_ai_install_state",
--      "//chrome/browser/screen_ai:screen_ai_service_router_factory",
-       "//chrome/browser/search",
        "//chrome/browser/search:browser_tests",
-       "//chrome/browser/search:test_support",
-@@ -2537,8 +2534,6 @@ if (!is_android) {
-       "//services/preferences/public/cpp",
-       "//services/preferences/public/cpp/tracked",
-       "//services/preferences/tracked:features",
--      "//services/screen_ai/public/cpp:utilities",
--      "//services/screen_ai/public/mojom",
-       "//services/service_manager/public/cpp",
-       "//services/strings",
-       "//services/test/echo/public/mojom",
-@@ -6309,7 +6304,6 @@ test("unit_tests") {
+       "//chrome/browser/search_engines:browser_tests",
+       "//chrome/browser/send_tab_to_self:browser_tests",
+@@ -3390,7 +3389,6 @@ test("unit_tests") {
      # TODO(crbug.com/417513088): Maybe merge with the non-android `deps`
      # declaration above?
      deps += [
 -      "../browser/screen_ai:screen_ai_install_state",
        "//chrome:packed_resources",
-       "//chrome/browser/apps/app_service",
-       "//chrome/browser/apps/app_service:app_registry_cache_waiter",
-@@ -6348,7 +6342,6 @@ test("unit_tests") {
-       "//chrome/browser/profile_resetter:fake_profile_resetter",
+       "//chrome/browser/apps/app_service:unit_tests",
+       "//chrome/browser/apps/app_service/app_icon:unit_tests",
+@@ -3405,7 +3403,6 @@ test("unit_tests") {
+       "//chrome/browser/omnibox:unit_tests",
        "//chrome/browser/profile_resetter:unit_tests",
        "//chrome/browser/resources/new_tab_page_instant:resources_grit",
 -      "//chrome/browser/screen_ai:unit_tests",
-       "//chrome/browser/search/background",
        "//chrome/browser/search_engine_choice:unit_tests",
        "//chrome/browser/sensor:unit_tests",
-diff -up chromium-156.0.8078.35/chrome/utility/BUILD.gn.disable-ai chromium-156.0.8078.35/chrome/utility/BUILD.gn
---- chromium-156.0.8078.35/chrome/utility/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/utility/BUILD.gn	2026-10-20 17:09:47.146600184 +0200
-@@ -153,7 +153,6 @@ static_library("utility") {
+       "//chrome/browser/support_tool:unit_tests",
+--- a/chrome/utility/BUILD.gn
++++ b/chrome/utility/BUILD.gn
+@@ -150,7 +150,6 @@ static_library("utility") {
        "//components/user_data_importer/content",
        "//components/user_data_importer/utility:bookmarks",
        "//services/proxy_resolver:lib",
@@ -1505,9 +1336,8 @@ diff -up chromium-156.0.8078.35/chrome/utility/BUILD.gn.disable-ai chromium-156.
      ]
    }
  
-diff -up chromium-156.0.8078.35/chrome/utility/services.cc.disable-ai chromium-156.0.8078.35/chrome/utility/services.cc
---- chromium-156.0.8078.35/chrome/utility/services.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/chrome/utility/services.cc	2026-10-20 17:09:47.146947839 +0200
+--- a/chrome/utility/services.cc
++++ b/chrome/utility/services.cc
 @@ -70,8 +70,6 @@
  #include "components/mirroring/service/mirroring_service.h"
  #include "services/proxy_resolver/proxy_resolver_factory_impl.h"  // nogncheck
@@ -1536,9 +1366,18 @@ diff -up chromium-156.0.8078.35/chrome/utility/services.cc.disable-ai chromium-1
  #endif  // !BUILDFLAG(IS_ANDROID)
  
  #if BUILDFLAG(ENABLE_MEDIA_REMOTING_REDIRECTION)
-diff -up chromium-156.0.8078.35/components/autofill/core/browser/foundations/autofill_manager.cc.disable-ai chromium-156.0.8078.35/components/autofill/core/browser/foundations/autofill_manager.cc
---- chromium-156.0.8078.35/components/autofill/core/browser/foundations/autofill_manager.cc.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/components/autofill/core/browser/foundations/autofill_manager.cc	2026-10-20 17:09:47.147598715 +0200
+--- a/components/BUILD.gn
++++ b/components/BUILD.gn
+@@ -645,7 +645,6 @@ test("components_unittests") {
+       "//components/one_time_tokens/core/browser:unit_tests",
+       "//components/page_info:unit_tests",
+       "//components/password_manager/core/browser/actor_login:unit_tests",
+-      "//components/permissions/prediction_service:unit_tests",
+       "//components/privacy_sandbox/privacy_sandbox_attestations:unit_tests",
+       "//components/safety_check:unit_tests",
+       "//components/security_interstitials/content:unit_tests",
+--- a/components/autofill/core/browser/foundations/autofill_manager.cc
++++ b/components/autofill/core/browser/foundations/autofill_manager.cc
 @@ -164,8 +164,6 @@ struct AutofillManager::AsyncContext {
  
    std::vector<FormData> forms;
@@ -1599,21 +1438,9 @@ diff -up chromium-156.0.8078.35/components/autofill/core/browser/foundations/aut
  }
  
  }  // namespace autofill
-diff -up chromium-156.0.8078.35/components/BUILD.gn.disable-ai chromium-156.0.8078.35/components/BUILD.gn
---- chromium-156.0.8078.35/components/BUILD.gn.disable-ai	2026-10-20 17:09:46.924231964 +0200
-+++ chromium-156.0.8078.35/components/BUILD.gn	2026-10-20 17:09:47.147217409 +0200
-@@ -639,7 +639,6 @@ test("components_unittests") {
-       "//components/one_time_tokens/core/browser:unit_tests",
-       "//components/page_info:unit_tests",
-       "//components/password_manager/core/browser/actor_login:unit_tests",
--      "//components/permissions/prediction_service:unit_tests",
-       "//components/privacy_sandbox/privacy_sandbox_attestations:unit_tests",
-       "//components/safety_check:unit_tests",
-       "//components/security_interstitials/content:unit_tests",
-diff -up chromium-156.0.8078.35/components/page_content_annotations/content/BUILD.gn.disable-ai chromium-156.0.8078.35/components/page_content_annotations/content/BUILD.gn
---- chromium-156.0.8078.35/components/page_content_annotations/content/BUILD.gn.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/components/page_content_annotations/content/BUILD.gn	2026-10-20 17:09:47.148056768 +0200
-@@ -75,8 +75,6 @@ source_set("page_embeddings") {
+--- a/components/page_content_annotations/content/BUILD.gn
++++ b/components/page_content_annotations/content/BUILD.gn
+@@ -81,8 +81,6 @@ source_set("page_embeddings") {
    sources = [
      "embeddings_candidate_generator.cc",
      "embeddings_candidate_generator.h",
@@ -1622,9 +1449,8 @@ diff -up chromium-156.0.8078.35/components/page_content_annotations/content/BUIL
      "page_embeddings_service.cc",
      "page_embeddings_service.h",
    ]
-diff -up chromium-156.0.8078.35/components/pdf/renderer/pdf_view_web_plugin_client.h.disable-ai chromium-156.0.8078.35/components/pdf/renderer/pdf_view_web_plugin_client.h
---- chromium-156.0.8078.35/components/pdf/renderer/pdf_view_web_plugin_client.h.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/components/pdf/renderer/pdf_view_web_plugin_client.h	2026-10-20 17:09:47.148412437 +0200
+--- a/components/pdf/renderer/pdf_view_web_plugin_client.h
++++ b/components/pdf/renderer/pdf_view_web_plugin_client.h
 @@ -12,7 +12,6 @@
  #include "base/memory/weak_ptr.h"
  #include "mojo/public/cpp/bindings/remote.h"
@@ -1642,9 +1468,8 @@ diff -up chromium-156.0.8078.35/components/pdf/renderer/pdf_view_web_plugin_clie
  
    base::WeakPtrFactory<PdfViewWebPluginClient> weak_factory_{this};
  };
-diff -up chromium-156.0.8078.35/services/screen_ai/buildflags/features.gni.disable-ai chromium-156.0.8078.35/services/screen_ai/buildflags/features.gni
---- chromium-156.0.8078.35/services/screen_ai/buildflags/features.gni.disable-ai	2026-10-14 00:13:09.000000000 +0200
-+++ chromium-156.0.8078.35/services/screen_ai/buildflags/features.gni	2026-10-20 17:09:47.148697659 +0200
+--- a/services/screen_ai/buildflags/features.gni
++++ b/services/screen_ai/buildflags/features.gni
 @@ -6,15 +6,13 @@ import("//build/config/sanitizers/saniti
  
  declare_args() {

diff --git a/sources b/sources
index 563f97c..346f176 100644
--- a/sources
+++ b/sources
@@ -1,6 +1,4 @@
 SHA512 (node-v22.22.0-stripped.tar.gz) = f32a8a73063b3c78cbacf941e11dd529ebcf2618b3ba661966312e49ee9870c43a3acf256e8d331a4b0b621b16a501810c02a3ad763c75884cc250addca8e106
-SHA512 (typescript-linux-ppc64.tgz) = 0ce471e5bdec77fe12ede6b2c66e0542ff80ec2ae45081916878b023ca221d3008d5f00f5a1178274bc09640bc6e20251d2555c31310ded8d9dbf0d56e742288
-SHA512 (linux-arm64-0.28.2.tgz) = a56e000b43f78adf1cedda3d315338a79d45cc7cdd33f4d9adeaeeae045c1c9d964dad55435088ab5f319dc7e9049c38a23922659aca5b6c8805604ff768fa52
-SHA512 (linux-ppc64-0.28.2.tgz) = 0805e5f83b5df5452e25df2928a77087a30b9b7314322a8c3e6859ded4d25cfa9fc90def0e5e91e6165d67f918a232b8a1f5ed75f4afd6d16af17cd6c7785e35
-SHA512 (linux-x64-0.28.2.tgz) = e314d9af5154992a105b85c85a68addedcd0ad44d933e3773f45d5f3144e298179d177c8ef178ef74fb56d9bcdc3122e7d0f610d0551247e588603d517c03f1d
-SHA512 (chromium-156.0.8078.79-clean.tar.xz) = 3f5ea77300f89c4077f33e9ec652c5081dd85d87eb81ea187d84b04fbf060b8ce5f0fa550b69b9fd704f7f449c1ae3a8a58fbfce6a59f9627da32bed486d50c5
+SHA512 (chromium-157.0.8103.78-clean.tar.xz) = 0805f64d51751d9e61aeca7708d95d98ae3b810e63254d58e7fbdcb979388f04d9f86b2a4daf1e24f75dd6c8a6414dce54473683fb3152e250bc556ea92b2cb1
+SHA512 (TypeScript-7.0.2.tar.gz) = ab381b5d7bf16463f75a19b9b517d8ed94699f14fd49746e72df3f23381df6a1debb057b1d9c939a3d393952ad684dc9200cb964195ba6d62efb6a1536bc835a
+SHA512 (TypeScript-7.0.2-vendor-archive.tar.gz) = 015fcc73bda7a0f9c6b6b1bfbc2dae0f4cbf0bace8e95261c81adce93742632982f72acd71be6ed3b71ffc2a91b2674e65b9efbf031e4949bd2775d4dc18e930

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-13 17:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-13 17:54 [rpms/chromium] f45: - Update to 157.0.8103.78, include 83 security fixes Than Ngo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox