1diff --git chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc 2index a09a1c38dc293..bd28d427873a9 100644 3--- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc 4+++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc 5@@ -10,6 +10,7 @@ 6 #include <vector> 7 8 #include "base/bind.h" 9+#include "base/command_line.h" 10 #include "base/json/json_string_value_serializer.h" 11 #include "base/logging.h" 12 #include "base/path_service.h" 13@@ -22,6 +23,7 @@ 14 #include "build/branding_buildflags.h" 15 #include "build/build_config.h" 16 #include "build/chromeos_buildflags.h" 17+#include "cef/libcef/features/runtime.h" 18 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/data_reduction_proxy/data_reduction_proxy_chrome_settings.h" 20 #include "chrome/browser/data_reduction_proxy/data_reduction_proxy_chrome_settings_factory.h" 21@@ -29,6 +31,7 @@ 22 #include "chrome/browser/profiles/profile_manager.h" 23 #include "chrome/browser/sync/sync_service_factory.h" 24 #include "chrome/common/channel_info.h" 25+#include "chrome/common/chrome_switches.h" 26 #include "components/prefs/pref_service.h" 27 #include "components/sync/driver/sync_internals_util.h" 28 #include "components/sync/driver/sync_service.h" 29@@ -334,7 +337,11 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) { 30 response->emplace(kOsVersionTag, os_version); 31 #endif 32 33- PopulateSyncLogs(response.get()); 34+ if (!cef::IsAlloyRuntimeEnabled()) { 35+ // Avoid loading ProfileSyncServiceFactory which depends on a lot of 36+ // unnecessary Chrome-specific factories. 37+ PopulateSyncLogs(response.get()); 38+ } 39 PopulateExtensionInfoLogs(response.get()); 40 PopulatePowerApiLogs(response.get()); 41 PopulateDataReductionProxyLogs(response.get()); 42@@ -414,6 +421,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( 43 if (!profile) 44 return; 45 46+ // CEF should avoid accessing ExtensionRegistry when extensions are disabled. 47+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( 48+ switches::kDisableExtensions)) { 49+ return; 50+ } 51+ 52 extensions::ExtensionRegistry* extension_registry = 53 extensions::ExtensionRegistry::Get(profile); 54 std::string extensions_list; 55@@ -521,6 +534,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime( 56 #if BUILDFLAG(IS_WIN) 57 void ChromeInternalLogSource::PopulateUsbKeyboardDetected( 58 SystemLogsResponse* response) { 59+ // The below call may result in some DLLs being loaded. 60+ base::ScopedAllowBlockingForTesting allow_blocking; 61 std::string reason; 62 bool result = 63 base::win::IsKeyboardPresentOnSlate(ui::GetHiddenWindow(), &reason); 64diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc 65index 8eb1f1699728e..ebc105d79372f 100644 66--- chrome/browser/memory_details.cc 67+++ chrome/browser/memory_details.cc 68@@ -8,6 +8,7 @@ 69 #include <set> 70 71 #include "base/bind.h" 72+#include "base/command_line.h" 73 #include "base/containers/adapters.h" 74 #include "base/containers/cxx20_erase.h" 75 #include "base/file_version_info.h" 76@@ -18,6 +19,7 @@ 77 #include "base/task/thread_pool.h" 78 #include "build/build_config.h" 79 #include "chrome/browser/profiles/profile.h" 80+#include "chrome/common/chrome_switches.h" 81 #include "components/nacl/common/nacl_process_type.h" 82 #include "components/strings/grit/components_strings.h" 83 #include "content/public/browser/browser_child_process_host_iterator.h" 84@@ -291,7 +293,9 @@ void MemoryDetails::CollectChildInfoOnUIThread() { 85 // Determine if this is an extension process. 86 bool process_is_for_extensions = false; 87 const extensions::ExtensionSet* extension_set = nullptr; 88- if (render_process_host) { 89+ if (render_process_host && 90+ !base::CommandLine::ForCurrentProcess()->HasSwitch( 91+ switches::kDisableExtensions)) { 92 content::BrowserContext* context = 93 render_process_host->GetBrowserContext(); 94 extensions::ExtensionRegistry* extension_registry = 95