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
|
2020-03-04 01:29:39 +01:00
|
|
|
index f68789fe4c05..089800c7a26a 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
|
2019-11-12 17:11:44 +01:00
|
|
|
@@ -27,6 +27,7 @@
|
2018-04-02 23:17:40 +02:00
|
|
|
#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"
|
2019-02-21 01:42:36 +01:00
|
|
|
#include "components/sync/driver/about_sync_util.h"
|
2019-04-16 16:38:48 +02:00
|
|
|
#include "components/sync/driver/sync_service.h"
|
2020-03-04 01:29:39 +01:00
|
|
|
@@ -323,6 +324,10 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) {
|
2017-08-25 21:35:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void ChromeInternalLogSource::PopulateSyncLogs(SystemLogsResponse* response) {
|
|
|
|
+ // CEF should avoid loading ProfileSyncServiceFactory which depends on a lot
|
|
|
|
+ // of unnecessary Chrome-specific factories.
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
// We are only interested in sync logs for the primary user profile.
|
|
|
|
Profile* profile = ProfileManager::GetPrimaryUserProfile();
|
2019-03-13 22:27:37 +01:00
|
|
|
if (!profile || !ProfileSyncServiceFactory::HasSyncService(profile))
|
2020-03-04 01:29:39 +01:00
|
|
|
@@ -365,6 +370,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;
|
2020-03-04 01:29:39 +01:00
|
|
|
@@ -454,6 +465,8 @@ void ChromeInternalLogSource::PopulateArcPolicyStatus(
|
2019-07-16 19:59:21 +02:00
|
|
|
#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 =
|
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
|
2020-03-04 01:29:39 +01:00
|
|
|
index a75f82d26388..19ddd09cc379 100644
|
2018-03-29 19:58:48 +02:00
|
|
|
--- chrome/browser/memory_details.cc
|
|
|
|
+++ chrome/browser/memory_details.cc
|
2018-10-02 14:14:11 +02:00
|
|
|
@@ -17,6 +17,7 @@
|
2018-08-09 22:18:24 +02:00
|
|
|
#include "base/task/post_task.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"
|
2018-10-24 22:37:39 +02:00
|
|
|
@@ -249,8 +250,11 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
|
2018-03-29 19:58:48 +02:00
|
|
|
|
|
|
|
#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 =
|