2022-10-17 10:22:24 -04:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: deepak1556 <hop2deep@gmail.com>
|
|
|
|
Date: Thu, 13 Oct 2022 20:30:12 +0900
|
|
|
|
Subject: Preconnect manager
|
|
|
|
|
|
|
|
* Patch disables the profile related changes added in
|
|
|
|
https://chromium-review.googlesource.com/c/chromium/src/+/3928470.
|
|
|
|
|
2025-07-23 10:12:00 +02:00
|
|
|
diff --git a/chrome/browser/predictors/preconnect_manager_impl.cc b/chrome/browser/predictors/preconnect_manager_impl.cc
|
2025-07-24 09:33:14 -04:00
|
|
|
index 57d544c0b03c80bdc015ce79d3aa78054d43c6e7..e9547e23d8bb2a5ac120c901405720cbde89737c 100644
|
2025-07-23 10:12:00 +02:00
|
|
|
--- a/chrome/browser/predictors/preconnect_manager_impl.cc
|
|
|
|
+++ b/chrome/browser/predictors/preconnect_manager_impl.cc
|
2025-07-24 09:33:14 -04:00
|
|
|
@@ -13,9 +13,11 @@
|
|
|
|
#include "base/trace_event/trace_event.h"
|
2025-03-07 11:35:59 -06:00
|
|
|
#include "base/types/optional_util.h"
|
2024-07-29 09:37:35 -04:00
|
|
|
#include "chrome/browser/predictors/predictors_features.h"
|
2022-10-17 10:22:24 -04:00
|
|
|
+#if 0
|
|
|
|
#include "chrome/browser/predictors/resource_prefetch_predictor.h"
|
2023-09-18 16:44:09 -04:00
|
|
|
#include "chrome/browser/preloading/preloading_prefs.h"
|
2022-10-17 10:22:24 -04:00
|
|
|
#include "chrome/browser/profiles/profile.h"
|
|
|
|
+#endif
|
|
|
|
#include "content/public/browser/browser_context.h"
|
|
|
|
#include "content/public/browser/browser_task_traits.h"
|
|
|
|
#include "content/public/browser/browser_thread.h"
|
2025-07-24 09:33:14 -04:00
|
|
|
@@ -106,12 +108,15 @@ PreconnectManagerImpl::PreconnectManagerImpl(
|
2025-07-23 10:12:00 +02:00
|
|
|
PreconnectManagerImpl::~PreconnectManagerImpl() = default;
|
2022-10-17 10:22:24 -04:00
|
|
|
|
2025-07-23 10:12:00 +02:00
|
|
|
bool PreconnectManagerImpl::IsEnabled() {
|
2022-10-17 10:22:24 -04:00
|
|
|
+#if 0
|
|
|
|
Profile* profile = Profile::FromBrowserContext(browser_context_);
|
|
|
|
if (!profile) {
|
|
|
|
return false;
|
|
|
|
}
|
2023-01-05 21:35:34 -05:00
|
|
|
return prefetch::IsSomePreloadingEnabled(*profile->GetPrefs()) ==
|
|
|
|
content::PreloadingEligibility::kEligible;
|
2022-10-17 10:22:24 -04:00
|
|
|
+#endif
|
|
|
|
+ return true;
|
|
|
|
}
|
|
|
|
|
2025-07-23 10:12:00 +02:00
|
|
|
base::WeakPtr<PreconnectManager> PreconnectManagerImpl::GetWeakPtr() {
|