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-22 16:09:47 -07:00
|
|
|
diff --git a/chrome/browser/predictors/preconnect_manager.h b/chrome/browser/predictors/preconnect_manager.h
|
|
|
|
index 9fe1c93b5cf2a5e7551f070d1d1d01683350675d..6ec8305948c3e2552775a458621c7794f839d09c 100644
|
|
|
|
--- a/chrome/browser/predictors/preconnect_manager.h
|
|
|
|
+++ b/chrome/browser/predictors/preconnect_manager.h
|
|
|
|
@@ -8,7 +8,6 @@
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "base/memory/weak_ptr.h"
|
|
|
|
-#include "chrome/browser/predictors/resource_prefetch_predictor.h"
|
|
|
|
#include "content/public/browser/preconnect_request.h"
|
|
|
|
#include "content/public/browser/storage_partition_config.h"
|
|
|
|
#include "mojo/public/cpp/bindings/receiver.h"
|
|
|
|
diff --git a/chrome/browser/predictors/preconnect_manager_impl.cc b/chrome/browser/predictors/preconnect_manager_impl.cc
|
|
|
|
index 639247fec01823ee942a1fb56f2511020ab0f228..6a625fcdd0ddcd55591a90126551f174c81889b1 100644
|
|
|
|
--- a/chrome/browser/predictors/preconnect_manager_impl.cc
|
|
|
|
+++ b/chrome/browser/predictors/preconnect_manager_impl.cc
|
2025-06-16 12:46:06 -05:00
|
|
|
@@ -14,9 +14,11 @@
|
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"
|
2024-11-05 16:46:57 -08:00
|
|
|
#include "chrome/browser/predictors/predictors_traffic_annotations.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-22 16:09:47 -07:00
|
|
|
@@ -105,12 +107,15 @@ PreconnectManagerImpl::PreconnectManagerImpl(
|
|
|
|
PreconnectManagerImpl::~PreconnectManagerImpl() = default;
|
2022-10-17 10:22:24 -04:00
|
|
|
|
2025-07-22 16:09:47 -07: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-22 16:09:47 -07:00
|
|
|
base::WeakPtr<PreconnectManager> PreconnectManagerImpl::GetWeakPtr() {
|
|
|
|
diff --git a/chrome/browser/predictors/preconnect_manager_impl.h b/chrome/browser/predictors/preconnect_manager_impl.h
|
|
|
|
index cf28c1c2572cf7c8c555ffdcb0e945b1b3c5d3ce..e057183ba0ec3ddf803302cf6e8418cb44b6b42a 100644
|
|
|
|
--- a/chrome/browser/predictors/preconnect_manager_impl.h
|
|
|
|
+++ b/chrome/browser/predictors/preconnect_manager_impl.h
|
|
|
|
@@ -18,7 +18,9 @@
|
|
|
|
#include "chrome/browser/predictors/preconnect_manager.h"
|
2022-10-17 10:22:24 -04:00
|
|
|
#include "chrome/browser/predictors/proxy_lookup_client_impl.h"
|
|
|
|
#include "chrome/browser/predictors/resolve_host_client_impl.h"
|
|
|
|
+#if 0
|
|
|
|
#include "chrome/browser/predictors/resource_prefetch_predictor.h"
|
|
|
|
+#endif
|
2025-07-22 16:09:47 -07:00
|
|
|
#include "content/public/browser/preconnect_request.h"
|
2025-03-07 11:35:59 -06:00
|
|
|
#include "content/public/browser/storage_partition_config.h"
|
2022-10-17 10:22:24 -04:00
|
|
|
#include "net/base/network_anonymization_key.h"
|