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
|
2023-01-05 19:55:00 +01:00
|
|
|
index 0b3085d90332f..4fe995a31d4e8 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
|
2023-01-05 19:55:00 +01:00
|
|
|
@@ -19,10 +19,12 @@
|
2022-04-21 20:58:48 +02:00
|
|
|
#include "base/strings/stringprintf.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"
|
2023-01-05 19:55:00 +01:00
|
|
|
@@ -398,7 +400,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)
|
2023-01-05 19:55:00 +01:00
|
|
|
@@ -472,8 +478,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()) {
|
|
|
|
@@ -577,6 +587,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
|
2023-01-05 19:55:00 +01:00
|
|
|
index d071ef696f441..aba280943251a 100644
|
2018-03-29 19:58:48 +02:00
|
|
|
--- chrome/browser/memory_details.cc
|
|
|
|
+++ chrome/browser/memory_details.cc
|
2023-01-05 19:55:00 +01:00
|
|
|
@@ -294,8 +294,11 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
|
|
|
|
if (render_process_host) {
|
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);
|
|
|
|
+ if (extension_registry) {
|
|
|
|
extension_set = &extension_registry->enabled_extensions();
|
|
|
|
extensions::ProcessMap* process_map =
|
|
|
|
extensions::ProcessMap::Get(context);
|
|
|
|
@@ -311,6 +314,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|