From def92d1b8e9d373e2f6f27c366d578d97d8960c6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:50 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- netwerk/cookie/CookieJarSettings.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'netwerk/cookie/CookieJarSettings.h') diff --git a/netwerk/cookie/CookieJarSettings.h b/netwerk/cookie/CookieJarSettings.h index 97f8528a55..cf3c9ff418 100644 --- a/netwerk/cookie/CookieJarSettings.h +++ b/netwerk/cookie/CookieJarSettings.h @@ -161,12 +161,14 @@ class CookieJarSettings final : public nsICookieJarSettings { void UpdateIsOnContentBlockingAllowList(nsIChannel* aChannel); - void SetPartitionKey(nsIURI* aURI); + void SetPartitionKey(nsIURI* aURI, bool aForeignByAncestorContext); void SetPartitionKey(const nsAString& aPartitionKey) { mPartitionKey = aPartitionKey; } const nsAString& GetPartitionKey() { return mPartitionKey; }; + void UpdatePartitionKeyForDocumentLoadedByChannel(nsIChannel* aChannel); + void SetFingerprintingRandomizationKey(const nsTArray& aKey) { mFingerprintingRandomKey.reset(); @@ -179,6 +181,11 @@ class CookieJarSettings final : public nsICookieJarSettings { // network.cookie.rejectForeignWithExceptions.enabled pref is set to true. static bool IsRejectThirdPartyContexts(uint32_t aCookieBehavior); + void SetTopLevelWindowContextId(uint64_t aId) { + mTopLevelWindowContextId = aId; + } + uint64_t GetTopLevelWindowContextId() { return mTopLevelWindowContextId; } + private: enum State { // No cookie permissions are allowed to be stored in this object. @@ -259,6 +266,10 @@ class CookieJarSettings final : public nsICookieJarSettings { // browsing session changes. This can prevent trackers to identify individuals // by using browser fingerprints. Maybe> mFingerprintingRandomKey; + + // This field caches the top level window context id when loading the top + // level document. + uint64_t mTopLevelWindowContextId; }; } // namespace net -- cgit v1.2.3