2017-08-25 21:35:28 +02:00
|
|
|
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
|
2024-04-30 03:09:17 +02:00
|
|
|
index 16c370e6d9759..7fc6d74075dd4 100644
|
2017-08-25 21:35:28 +02:00
|
|
|
--- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
|
|
|
|
+++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
|
2024-04-23 22:06:00 +02:00
|
|
|
@@ -20,10 +20,12 @@
|
2023-10-19 20:08:48 +02:00
|
|
|
#include "base/strings/string_util.h"
|
2022-02-21 23:23:40 +01:00
|
|
|
#include "base/system/sys_info.h"
|
|
|
|
#include "base/task/thread_pool.h"
|
|
|
|
+#include "base/threading/thread_restrictions.h"
|
2022-04-21 20:58:48 +02:00
|
|
|
#include "base/time/time.h"
|
2020-04-14 21:31:00 +02:00
|
|
|
#include "build/branding_buildflags.h"
|
|
|
|
#include "build/build_config.h"
|
2021-01-28 00:13:12 +01:00
|
|
|
#include "build/chromeos_buildflags.h"
|
2020-09-25 03:40:47 +02:00
|
|
|
+#include "cef/libcef/features/runtime.h"
|
2020-04-14 21:31:00 +02:00
|
|
|
#include "chrome/browser/browser_process.h"
|
2023-01-03 00:34:43 +01:00
|
|
|
#include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h"
|
2022-02-21 23:23:40 +01:00
|
|
|
#include "chrome/browser/google/google_brand.h"
|
2024-04-30 03:09:17 +02:00
|
|
|
@@ -422,7 +424,15 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) {
|
2020-04-14 21:31:00 +02:00
|
|
|
response->emplace(kOsVersionTag, os_version);
|
|
|
|
#endif
|
2017-08-25 21:35:28 +02:00
|
|
|
|
2024-04-30 03:09:17 +02:00
|
|
|
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2020-09-25 03:40:47 +02:00
|
|
|
+ if (!cef::IsAlloyRuntimeEnabled()) {
|
2024-04-30 03:09:17 +02:00
|
|
|
+#endif
|
|
|
|
+ // Avoid loading ProfileSyncServiceFactory which depends on a lot of
|
|
|
|
+ // unnecessary Chrome-specific factories.
|
|
|
|
PopulateSyncLogs(response.get());
|
|
|
|
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2020-09-25 03:40:47 +02:00
|
|
|
+ }
|
2024-04-30 03:09:17 +02:00
|
|
|
+#endif
|
2020-04-14 21:31:00 +02:00
|
|
|
PopulateExtensionInfoLogs(response.get());
|
|
|
|
PopulatePowerApiLogs(response.get());
|
2022-02-21 23:23:40 +01:00
|
|
|
#if BUILDFLAG(IS_WIN)
|
2024-04-30 03:09:17 +02:00
|
|
|
@@ -510,8 +520,14 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs(
|
2018-03-29 19:58:48 +02:00
|
|
|
if (!profile)
|
|
|
|
return;
|
|
|
|
|
2023-01-05 19:55:00 +01:00
|
|
|
+ // May be nullptr if using CEF Alloy with extensions disabled.
|
2018-03-29 19:58:48 +02:00
|
|
|
extensions::ExtensionRegistry* extension_registry =
|
|
|
|
extensions::ExtensionRegistry::Get(profile);
|
2024-04-30 03:09:17 +02:00
|
|
|
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2023-01-05 19:55:00 +01:00
|
|
|
+ if (!extension_registry)
|
|
|
|
+ return;
|
2024-04-30 03:09:17 +02:00
|
|
|
+#endif
|
2023-01-05 19:55:00 +01:00
|
|
|
+
|
2018-03-29 19:58:48 +02:00
|
|
|
std::string extensions_list;
|
2023-01-05 19:55:00 +01:00
|
|
|
for (const scoped_refptr<const extensions::Extension>& extension :
|
|
|
|
extension_registry->enabled_extensions()) {
|
2024-04-30 03:09:17 +02:00
|
|
|
@@ -612,6 +628,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime(
|
2022-01-25 21:26:51 +01:00
|
|
|
#if BUILDFLAG(IS_WIN)
|
2019-07-16 19:59:21 +02:00
|
|
|
void ChromeInternalLogSource::PopulateUsbKeyboardDetected(
|
|
|
|
SystemLogsResponse* response) {
|
|
|
|
+ // The below call may result in some DLLs being loaded.
|
|
|
|
+ base::ScopedAllowBlockingForTesting allow_blocking;
|
|
|
|
std::string reason;
|
|
|
|
bool result =
|
2019-11-12 17:11:44 +01:00
|
|
|
base::win::IsKeyboardPresentOnSlate(ui::GetHiddenWindow(), &reason);
|
2018-03-29 19:58:48 +02:00
|
|
|
diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc
|
2024-05-23 03:52:35 +02:00
|
|
|
index 362542c0af479..1841cbe14d5b6 100644
|
2018-03-29 19:58:48 +02:00
|
|
|
--- chrome/browser/memory_details.cc
|
|
|
|
+++ chrome/browser/memory_details.cc
|
2024-04-30 03:09:17 +02:00
|
|
|
@@ -17,6 +17,7 @@
|
|
|
|
#include "base/strings/utf_string_conversions.h"
|
|
|
|
#include "base/task/thread_pool.h"
|
|
|
|
#include "build/build_config.h"
|
|
|
|
+#include "cef/libcef/features/features.h"
|
|
|
|
#include "chrome/browser/profiles/profile.h"
|
|
|
|
#include "components/nacl/common/nacl_process_type.h"
|
|
|
|
#include "components/strings/grit/components_strings.h"
|
|
|
|
@@ -298,9 +299,15 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
|
2023-08-09 23:17:17 +02:00
|
|
|
render_process_host->GetBrowserContext())) {
|
2018-03-29 19:58:48 +02:00
|
|
|
content::BrowserContext* context =
|
|
|
|
render_process_host->GetBrowserContext();
|
2023-01-05 19:55:00 +01:00
|
|
|
+
|
|
|
|
+ // May be nullptr if using CEF Alloy with extensions disabled.
|
2018-03-29 19:58:48 +02:00
|
|
|
extensions::ExtensionRegistry* extension_registry =
|
2023-01-05 19:55:00 +01:00
|
|
|
extensions::ExtensionRegistry::Get(context);
|
2024-04-30 03:09:17 +02:00
|
|
|
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2023-01-05 19:55:00 +01:00
|
|
|
+ if (extension_registry) {
|
2024-04-30 03:09:17 +02:00
|
|
|
+#else
|
|
|
|
DCHECK(extension_registry);
|
|
|
|
+#endif
|
2023-01-05 19:55:00 +01:00
|
|
|
extension_set = &extension_registry->enabled_extensions();
|
|
|
|
extensions::ProcessMap* process_map =
|
|
|
|
extensions::ProcessMap::Get(context);
|
2024-05-23 03:52:35 +02:00
|
|
|
@@ -316,6 +323,9 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
|
|
|
|
process.renderer_type = ProcessMemoryInformation::RENDERER_EXTENSION;
|
2023-01-05 19:55:00 +01:00
|
|
|
}
|
|
|
|
}
|
2024-04-30 03:09:17 +02:00
|
|
|
+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
2023-01-05 19:55:00 +01:00
|
|
|
+ }
|
2024-04-30 03:09:17 +02:00
|
|
|
+#endif
|
2023-01-05 19:55:00 +01:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|