summaryrefslogtreecommitdiffstats
path: root/netwerk/cookie/CookieJarSettings.h
diff options
context:
space:
mode:
Diffstat (limited to 'netwerk/cookie/CookieJarSettings.h')
-rw-r--r--netwerk/cookie/CookieJarSettings.h13
1 files changed, 12 insertions, 1 deletions
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<uint8_t>& 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<nsTArray<uint8_t>> mFingerprintingRandomKey;
+
+ // This field caches the top level window context id when loading the top
+ // level document.
+ uint64_t mTopLevelWindowContextId;
};
} // namespace net