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
|
2022-06-17 15:28:55 +02:00
|
|
|
index 4a978a473f39b..d10c133250860 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
|
2020-08-29 00:39:23 +02:00
|
|
|
@@ -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"
|
2022-04-21 20:58:48 +02:00
|
|
|
@@ -18,15 +19,18 @@
|
|
|
|
#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"
|
2022-02-21 23:23:40 +01:00
|
|
|
#include "chrome/browser/google/google_brand.h"
|
2018-04-02 23:17:40 +02:00
|
|
|
#include "chrome/browser/profiles/profile_manager.h"
|
2021-07-23 18:40:13 +02:00
|
|
|
#include "chrome/browser/sync/sync_service_factory.h"
|
2018-04-02 23:17:40 +02:00
|
|
|
#include "chrome/common/channel_info.h"
|
|
|
|
+#include "chrome/common/chrome_switches.h"
|
|
|
|
#include "components/prefs/pref_service.h"
|
2020-12-02 23:31:49 +01:00
|
|
|
#include "components/sync/driver/sync_internals_util.h"
|
2019-04-16 16:38:48 +02:00
|
|
|
#include "components/sync/driver/sync_service.h"
|
2022-06-17 15:28:55 +02:00
|
|
|
@@ -332,7 +336,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)
|
2022-06-17 15:28:55 +02:00
|
|
|
@@ -414,6 +422,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs(
|
2018-03-29 19:58:48 +02:00
|
|
|
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;
|
2022-06-17 15:28:55 +02:00
|
|
|
@@ -508,6 +522,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
|
2022-01-25 21:26:51 +01:00
|
|
|
index 8eb1f1699728e..ebc105d79372f 100644
|
2018-03-29 19:58:48 +02:00
|
|
|
--- chrome/browser/memory_details.cc
|
|
|
|
+++ chrome/browser/memory_details.cc
|
2021-11-10 22:57:31 +01:00
|
|
|
@@ -8,6 +8,7 @@
|
|
|
|
#include <set>
|
|
|
|
|
|
|
|
#include "base/bind.h"
|
|
|
|
+#include "base/command_line.h"
|
2022-01-25 21:26:51 +01:00
|
|
|
#include "base/containers/adapters.h"
|
2021-11-10 22:57:31 +01:00
|
|
|
#include "base/containers/cxx20_erase.h"
|
|
|
|
#include "base/file_version_info.h"
|
2022-01-25 21:26:51 +01:00
|
|
|
@@ -18,6 +19,7 @@
|
2020-03-30 22:13:42 +02:00
|
|
|
#include "base/task/thread_pool.h"
|
2018-04-02 23:17:40 +02:00
|
|
|
#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"
|
2022-01-25 21:26:51 +01:00
|
|
|
@@ -291,7 +293,9 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
|
2018-03-29 19:58:48 +02:00
|
|
|
// Determine if this is an extension process.
|
|
|
|
bool process_is_for_extensions = false;
|
2021-11-10 22:57:31 +01:00
|
|
|
const extensions::ExtensionSet* extension_set = nullptr;
|
2018-03-29 19:58:48 +02:00
|
|
|
- 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 =
|