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-23 22:06:00 +02:00
|
|
|
index 16c370e6d9759..1460a9c0d1f49 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-23 22:06:00 +02:00
|
|
|
@@ -422,7 +424,11 @@ 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
|
|
|
|
2020-09-25 03:40:47 +02:00
|
|
|
- PopulateSyncLogs(response.get());
|
|
|
|
+ if (!cef::IsAlloyRuntimeEnabled()) {
|
|
|
|
+ // Avoid loading ProfileSyncServiceFactory which depends on a lot of
|
|
|
|
+ // unnecessary Chrome-specific factories.
|
|
|
|
+ PopulateSyncLogs(response.get());
|
|
|
|
+ }
|
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-23 22:06:00 +02:00
|
|
|
@@ -510,8 +516,12 @@ 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);
|
2023-01-05 19:55:00 +01:00
|
|
|
+ if (!extension_registry)
|
|
|
|
+ return;
|
|
|
|
+
|
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-23 22:06:00 +02:00
|
|
|
@@ -612,6 +622,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-03-19 22:11:42 +01:00
|
|
|
index 58fe3bd8f62ae..41b5e35b09a80 100644
|
2018-03-29 19:58:48 +02:00
|
|
|
--- chrome/browser/memory_details.cc
|
|
|
|
+++ chrome/browser/memory_details.cc
|
2023-08-09 23:17:17 +02:00
|
|
|
@@ -298,9 +298,11 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
|
|
|
|
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);
|
2023-08-09 23:17:17 +02:00
|
|
|
- DCHECK(extension_registry);
|
2023-01-05 19:55:00 +01:00
|
|
|
+ if (extension_registry) {
|
|
|
|
extension_set = &extension_registry->enabled_extensions();
|
|
|
|
extensions::ProcessMap* process_map =
|
|
|
|
extensions::ProcessMap::Get(context);
|
2023-08-09 23:17:17 +02:00
|
|
|
@@ -317,6 +319,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
|
2023-01-05 19:55:00 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|