a4de915b74
* chore: bump chromium in DEPS to db7d7b3e7cb2bc925f2abfde526280cfdfc21a41 * Update patches * chore: bump chromium in DEPS to 5613e1b99a44fcbe22f3910f803ca76903a77ec1 * Update patches * Network service: Remove primary_network_context bool. https://chromium-review.googlesource.com/c/chromium/src/+/2204678 * WebContentsObserver now implements OnRendererResponsive https://chromium-review.googlesource.com/c/chromium/src/+/2211066 * update patches * Fixup printing patch * chore: bump chromium in DEPS to e387b972cdd7160c416fa6c64a724e2258aa0218 * update patches * [printing] Move PrintHostMsg_DidPrintContent_Params to print.mojom https://chromium-review.googlesource.com/c/chromium/src/+/2212110 * [XProto] Move items from ::x11::XProto to ::x11 https://chromium-review.googlesource.com/c/chromium/src/+/2218476 * revert Add IChromeAccessible This was added in https://chromium-review.googlesource.com/c/chromium/src/+/2206224 but it breaks WOA builds because third_party/win_build_output/midl/ui/accessibility/platform/arm64 does not exist. The link above says that the new interface is behind a feature flag which is disabled by default so it is safe to remove for now. * rebaseline ichromeaccessible for Windows arm64 This patch will not be needed once we get the next roll. * Update to 1b9e01844e8bf1aaafc4a52c0c62af7f56d9637b to get arm64 fix * update patches * chore: bump chromium in DEPS to 096aefa04092ea00f7b68d8d19345883f20db3c3 * chore: bump chromium in DEPS to a524a45ffd1d6fd46a7a86138fe2b22df5b6651a * chore: update patches * Window Placement: Gate cross-screen fullscreen behavior on permission https://chromium-review.googlesource.com/c/chromium/src/+/2203268 * chore: add spec for https://crbug.com/1085836 * chore: bump chromium in DEPS to ff6c4f4b826d66c2e32380bf5d1eb5e1fe37faef * update patches Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: Electron Bot <anonymous@electronjs.org> Co-authored-by: deepak1556 <hop2deep@gmail.com>
69 lines
2.7 KiB
Diff
69 lines
2.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Alexey Kuts <kruntuid@gmail.com>
|
|
Date: Fri, 26 Jul 2019 22:32:54 +0300
|
|
Subject: remove references to Profile from PreconnectManager
|
|
|
|
The PreconnectManager in Chrome only depends on Profile for testing purposes;
|
|
this patch removes that dependency so we can reuse it.
|
|
Ideally we would change this class in upstream to not depend on Profile.
|
|
|
|
diff --git a/chrome/browser/predictors/preconnect_manager.cc b/chrome/browser/predictors/preconnect_manager.cc
|
|
index e6524169e022c98d07ca29fa7988c22b06f0a2e1..199837a907a8b9df0ef7d2cb9b369503ab655bf6 100644
|
|
--- a/chrome/browser/predictors/preconnect_manager.cc
|
|
+++ b/chrome/browser/predictors/preconnect_manager.cc
|
|
@@ -68,7 +68,7 @@ PreresolveJob::PreresolveJob(PreresolveJob&& other) = default;
|
|
PreresolveJob::~PreresolveJob() = default;
|
|
|
|
PreconnectManager::PreconnectManager(base::WeakPtr<Delegate> delegate,
|
|
- Profile* profile)
|
|
+ content::BrowserContext* profile)
|
|
: delegate_(std::move(delegate)),
|
|
profile_(profile),
|
|
inflight_preresolves_count_(0) {
|
|
@@ -325,11 +325,13 @@ network::mojom::NetworkContext* PreconnectManager::GetNetworkContext() const {
|
|
if (network_context_)
|
|
return network_context_;
|
|
|
|
+#if 0
|
|
if (profile_->AsTestingProfile()) {
|
|
// We're testing and |network_context_| wasn't set. Return nullptr to avoid
|
|
// hitting the network.
|
|
return nullptr;
|
|
}
|
|
+#endif
|
|
|
|
return content::BrowserContext::GetDefaultStoragePartition(profile_)
|
|
->GetNetworkContext();
|
|
diff --git a/chrome/browser/predictors/preconnect_manager.h b/chrome/browser/predictors/preconnect_manager.h
|
|
index 7c99f4543095f600a5a7705846bc01f5656a9c8d..bbd62bccef6a3c5013c5f3ee4f24443835728d44 100644
|
|
--- a/chrome/browser/predictors/preconnect_manager.h
|
|
+++ b/chrome/browser/predictors/preconnect_manager.h
|
|
@@ -22,6 +22,10 @@
|
|
|
|
class Profile;
|
|
|
|
+namespace content {
|
|
+class BrowserContext;
|
|
+}
|
|
+
|
|
namespace network {
|
|
namespace mojom {
|
|
class NetworkContext;
|
|
@@ -143,7 +147,7 @@ class PreconnectManager {
|
|
|
|
static const size_t kMaxInflightPreresolves = 3;
|
|
|
|
- PreconnectManager(base::WeakPtr<Delegate> delegate, Profile* profile);
|
|
+ PreconnectManager(base::WeakPtr<Delegate> delegate, content::BrowserContext* profile);
|
|
virtual ~PreconnectManager();
|
|
|
|
// Starts preconnect and preresolve jobs keyed by |url|.
|
|
@@ -208,7 +212,7 @@ class PreconnectManager {
|
|
network::mojom::NetworkContext* GetNetworkContext() const;
|
|
|
|
base::WeakPtr<Delegate> delegate_;
|
|
- Profile* const profile_;
|
|
+ content::BrowserContext* const profile_;
|
|
std::list<PreresolveJobId> queued_jobs_;
|
|
PreresolveJobMap preresolve_jobs_;
|
|
std::map<GURL, std::unique_ptr<PreresolveInfo>> preresolve_info_;
|