Put platform_thread.h include of feature_list.h behind a cros build flag

This include is fairly expensive according to
https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html#view=edges

It's only used within cros code, so we now only include it on cros.

Bug: 40318405
Change-Id: Ib9c14daf39ff39092bd276453a2726cafa49fc99
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5503191
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Kevin McNee <mcnee@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1294941}
diff --git a/base/threading/platform_thread.h b/base/threading/platform_thread.h
index c2ce87f..ee5ea900 100644
--- a/base/threading/platform_thread.h
+++ b/base/threading/platform_thread.h
@@ -16,7 +16,6 @@
 #include <type_traits>
 
 #include "base/base_export.h"
-#include "base/feature_list.h"
 #include "base/message_loop/message_pump_type.h"
 #include "base/process/process_handle.h"
 #include "base/sequence_checker_impl.h"
@@ -37,6 +36,10 @@
 #include <unistd.h>
 #endif
 
+#if BUILDFLAG(IS_CHROMEOS)
+#include "base/feature_list.h"
+#endif
+
 namespace base {
 
 // Used for logging. Always an integer value.
diff --git a/components/gwp_asan/crash_handler/crash_analyzer.h b/components/gwp_asan/crash_handler/crash_analyzer.h
index b038648..1410909a 100644
--- a/components/gwp_asan/crash_handler/crash_analyzer.h
+++ b/components/gwp_asan/crash_handler/crash_analyzer.h
@@ -7,6 +7,7 @@
 
 #include <stddef.h>
 
+#include "base/gtest_prod_util.h"
 #include "components/gwp_asan/common/allocation_info.h"
 #include "components/gwp_asan/common/allocator_state.h"
 #include "components/gwp_asan/common/lightweight_detector_state.h"
diff --git a/components/page_load_metrics/renderer/page_timing_metadata_recorder.h b/components/page_load_metrics/renderer/page_timing_metadata_recorder.h
index f9e3e686..20bebe1 100644
--- a/components/page_load_metrics/renderer/page_timing_metadata_recorder.h
+++ b/components/page_load_metrics/renderer/page_timing_metadata_recorder.h
@@ -9,6 +9,7 @@
 #include <optional>
 
 #include "base/profiler/sample_metadata.h"
+#include "base/strings/string_piece.h"
 #include "base/time/time.h"
 #include "third_party/abseil-cpp/absl/types/optional.h"
 
diff --git a/services/accessibility/features/v8_utils_unittest.cc b/services/accessibility/features/v8_utils_unittest.cc
index a8b3991..eba0447 100644
--- a/services/accessibility/features/v8_utils_unittest.cc
+++ b/services/accessibility/features/v8_utils_unittest.cc
@@ -3,7 +3,10 @@
 // found in the LICENSE file.
 
 #include "services/accessibility/features/v8_utils.h"
+
 #include <memory>
+
+#include "base/logging.h"
 #include "base/test/task_environment.h"
 #include "gin/array_buffer.h"
 #include "gin/public/isolate_holder.h"