--- a/chrome/browser/extensions/BUILD.gn
+++ b/chrome/browser/extensions/BUILD.gn
@@ -942,6 +942,7 @@ source_set("extensions") {
     "//components/resources",
     "//components/safe_browsing:buildflags",
     "//components/safe_browsing/content/browser/web_ui:web_ui",
+    "//components/safe_browsing/content/common/proto:download_file_types_proto",
     "//components/safe_browsing/core/browser/db:database_manager",
     "//components/safe_browsing/core/common",
     "//components/safe_browsing/core/common:safe_browsing_prefs",
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/browser_commands.h"
 
 #include <memory>
+#include <numeric>
 #include <optional>
 #include <utility>
 #include <vector>
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -603,6 +603,7 @@ static_library("url_constants") {
     "//components/optimization_guide/optimization_guide_internals/webui:url_constants",
     "//components/password_manager/content/common",
     "//components/safe_browsing/core/common",
+    "//components/supervised_user/core/common:buildflags",
     "//device/vr/buildflags",
   ]
 }
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -88,6 +88,7 @@ source_set("browser") {
     "//cc/animation",
     "//cc/mojo_embedder",
     "//cc/paint",
+    "//chrome/common:buildflags",
     "//components/attribution_reporting:data_host_mojom",
     "//components/attribution_reporting:mojom",
     "//components/back_forward_cache:enum",
@@ -100,6 +101,7 @@ source_set("browser") {
     "//components/file_access",
     "//components/filename_generation",
     "//components/input",
+    "//components/lens:buildflags",
     "//components/link_header_util",
     "//components/metrics",
     "//components/metrics:single_sample_metrics",
--- a/pdf/pdfium/pdfium_engine_exports.h
+++ b/pdf/pdfium/pdfium_engine_exports.h
@@ -15,6 +15,7 @@
 #include "build/build_config.h"
 #include "pdf/document_metadata.h"
 #include "services/screen_ai/buildflags/buildflags.h"
+#include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/geometry/size_f.h"
 
 #if BUILDFLAG(IS_WIN)
--- a/services/passage_embeddings/BUILD.gn
+++ b/services/passage_embeddings/BUILD.gn
@@ -31,6 +31,7 @@ source_set("passage_embeddings") {
   }
 
   deps = [
+    "//components/optimization_guide:machine_learning_tflite_buildflags",
     "//components/history_embeddings",
     "//services/passage_embeddings/public/mojom",
     "//third_party/sentencepiece:sentencepiece",
@@ -39,7 +40,6 @@ source_set("passage_embeddings") {
 
   if (build_with_tflite_lib) {
     deps += [
-      "//components/optimization_guide:machine_learning_tflite_buildflags",
       "//components/optimization_guide/core:machine_learning",
     ]
   }
