diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /dom/html/HTMLDNSPrefetch.h | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/html/HTMLDNSPrefetch.h')
-rw-r--r-- | dom/html/HTMLDNSPrefetch.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/dom/html/HTMLDNSPrefetch.h b/dom/html/HTMLDNSPrefetch.h index 5820a6ecb2..5fd263d3f5 100644 --- a/dom/html/HTMLDNSPrefetch.h +++ b/dom/html/HTMLDNSPrefetch.h @@ -55,7 +55,13 @@ class HTMLDNSPrefetch { Medium, High, }; - static nsresult Prefetch(SupportsDNSPrefetch&, Element&, Priority); + enum class PrefetchSource { + LinkDnsPrefetch, + AnchorSpeculativePrefetch, + }; + static nsresult DeferPrefetch(SupportsDNSPrefetch& aSupports, + Element& aElement, Priority aPriority); + static void SendRequest(Element& aElement, nsIDNSService::DNSFlags aFlags); static nsresult Prefetch( const nsAString& host, bool isHttps, const OriginAttributes& aPartitionedPrincipalOriginAttributes, @@ -68,9 +74,9 @@ class HTMLDNSPrefetch { nsresult aReason); static void ElementDestroyed(Element&, SupportsDNSPrefetch&); - private: static nsIDNSService::DNSFlags PriorityToDNSServiceFlags(Priority); + private: static nsresult Prefetch( const nsAString& host, bool isHttps, const OriginAttributes& aPartitionedPrincipalOriginAttributes, @@ -114,8 +120,8 @@ class SupportsDNSPrefetch { mDNSPrefetchDeferred(false), mDestroyedCalled(false) {} - void CancelDNSPrefetch(Element&); - void TryDNSPrefetch(Element&); + void CancelDNSPrefetch(Element& aOwner); + void TryDNSPrefetch(Element& aOwner, HTMLDNSPrefetch::PrefetchSource aSource); // This MUST be called on the destructor of the Element subclass. // Our own destructor ensures that. |