Skip to content

Commit

Permalink
Bug 1904004 - Add OriginAttributes::IsPrivateBrowsing. r=timhuang
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Schuster committed Jun 24, 2024
1 parent a3c3d07 commit 64a746c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions caps/OriginAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ class OriginAttributes : public dom::OriginAttributesDictionary {
mFirstPartyDomain == aOther.mFirstPartyDomain;
}

[[nodiscard]] inline bool IsPrivateBrowsing() const {
return mPrivateBrowsingId !=
nsIScriptSecurityManager::DEFAULT_PRIVATE_BROWSING_ID;
}

// Serializes/Deserializes non-default values into the suffix format, i.e.
// |^key1=value1&key2=value2|. If there are no non-default attributes, this
// returns an empty string.
Expand Down

0 comments on commit 64a746c

Please sign in to comment.