mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	- Mac: Xcode 12.2 and the MacOS 11.0 SDK are now required for building. - MacOS 10.10 (Yosemite) is no longer supported (see https://crbug.com/1126056). - Flash is no longer supported (see https://www.chromium.org/flash-roadmap).
		
			
				
	
	
		
			89 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			89 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
diff --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
 | 
						|
index 3267d8a52c8b..b01878a54539 100644
 | 
						|
--- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
 | 
						|
+++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
 | 
						|
@@ -10,6 +10,7 @@
 | 
						|
 #include <vector>
 | 
						|
 
 | 
						|
 #include "base/bind.h"
 | 
						|
+#include "base/command_line.h"
 | 
						|
 #include "base/json/json_string_value_serializer.h"
 | 
						|
 #include "base/logging.h"
 | 
						|
 #include "base/path_service.h"
 | 
						|
@@ -21,6 +22,7 @@
 | 
						|
 #include "base/task/thread_pool.h"
 | 
						|
 #include "build/branding_buildflags.h"
 | 
						|
 #include "build/build_config.h"
 | 
						|
+#include "cef/libcef/features/runtime.h"
 | 
						|
 #include "chrome/browser/browser_process.h"
 | 
						|
 #include "chrome/browser/data_reduction_proxy/data_reduction_proxy_chrome_settings.h"
 | 
						|
 #include "chrome/browser/data_reduction_proxy/data_reduction_proxy_chrome_settings_factory.h"
 | 
						|
@@ -28,6 +30,7 @@
 | 
						|
 #include "chrome/browser/profiles/profile_manager.h"
 | 
						|
 #include "chrome/browser/sync/profile_sync_service_factory.h"
 | 
						|
 #include "chrome/common/channel_info.h"
 | 
						|
+#include "chrome/common/chrome_switches.h"
 | 
						|
 #include "components/prefs/pref_service.h"
 | 
						|
 #include "components/sync/driver/sync_internals_util.h"
 | 
						|
 #include "components/sync/driver/sync_service.h"
 | 
						|
@@ -343,7 +346,11 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) {
 | 
						|
   response->emplace(kOsVersionTag, os_version);
 | 
						|
 #endif
 | 
						|
 
 | 
						|
-  PopulateSyncLogs(response.get());
 | 
						|
+  if (!cef::IsAlloyRuntimeEnabled()) {
 | 
						|
+    // Avoid loading ProfileSyncServiceFactory which depends on a lot of
 | 
						|
+    // unnecessary Chrome-specific factories.
 | 
						|
+    PopulateSyncLogs(response.get());
 | 
						|
+  }
 | 
						|
   PopulateExtensionInfoLogs(response.get());
 | 
						|
   PopulatePowerApiLogs(response.get());
 | 
						|
   PopulateDataReductionProxyLogs(response.get());
 | 
						|
@@ -418,6 +425,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs(
 | 
						|
   if (!profile)
 | 
						|
     return;
 | 
						|
 
 | 
						|
+  // CEF should avoid accessing ExtensionRegistry when extensions are disabled.
 | 
						|
+  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
 | 
						|
+      switches::kDisableExtensions)) {
 | 
						|
+    return;
 | 
						|
+  }
 | 
						|
+
 | 
						|
   extensions::ExtensionRegistry* extension_registry =
 | 
						|
       extensions::ExtensionRegistry::Get(profile);
 | 
						|
   std::string extensions_list;
 | 
						|
@@ -525,6 +538,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime(
 | 
						|
 #if defined(OS_WIN)
 | 
						|
 void ChromeInternalLogSource::PopulateUsbKeyboardDetected(
 | 
						|
     SystemLogsResponse* response) {
 | 
						|
+  // The below call may result in some DLLs being loaded.
 | 
						|
+  base::ScopedAllowBlockingForTesting allow_blocking;
 | 
						|
   std::string reason;
 | 
						|
   bool result =
 | 
						|
       base::win::IsKeyboardPresentOnSlate(ui::GetHiddenWindow(), &reason);
 | 
						|
diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc
 | 
						|
index 819ef924757c..986670ac9870 100644
 | 
						|
--- chrome/browser/memory_details.cc
 | 
						|
+++ chrome/browser/memory_details.cc
 | 
						|
@@ -17,6 +17,7 @@
 | 
						|
 #include "base/task/thread_pool.h"
 | 
						|
 #include "build/build_config.h"
 | 
						|
 #include "chrome/browser/profiles/profile.h"
 | 
						|
+#include "chrome/common/chrome_switches.h"
 | 
						|
 #include "components/nacl/common/nacl_process_type.h"
 | 
						|
 #include "components/strings/grit/components_strings.h"
 | 
						|
 #include "content/public/browser/browser_child_process_host_iterator.h"
 | 
						|
@@ -252,8 +253,11 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
 | 
						|
 
 | 
						|
 #if BUILDFLAG(ENABLE_EXTENSIONS)
 | 
						|
     // Determine if this is an extension process.
 | 
						|
+    // CEF should avoid accessing ExtensionRegistry when extensions are disabled.
 | 
						|
     bool process_is_for_extensions = false;
 | 
						|
-    if (render_process_host) {
 | 
						|
+    if (render_process_host &&
 | 
						|
+        !base::CommandLine::ForCurrentProcess()->HasSwitch(
 | 
						|
+            switches::kDisableExtensions)) {
 | 
						|
       content::BrowserContext* context =
 | 
						|
           render_process_host->GetBrowserContext();
 | 
						|
       extensions::ExtensionRegistry* extension_registry =
 |