зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1731988
- Part 2: Support eForeignPartitionedPrincipal for StoragePrincipalHelper::GetOriginAttributes(). r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D127436
This commit is contained in:
Родитель
0d2eb797fd
Коммит
c3ea5f426d
|
@ -238,6 +238,8 @@ bool StoragePrincipalHelper::GetOriginAttributes(
|
|||
}
|
||||
aAttributes.SyncAttributesWithPrivateBrowsing(isPrivate);
|
||||
|
||||
nsCOMPtr<nsICookieJarSettings> cjs;
|
||||
|
||||
switch (aPrincipalType) {
|
||||
case eRegularPrincipal:
|
||||
break;
|
||||
|
@ -249,6 +251,18 @@ bool StoragePrincipalHelper::GetOriginAttributes(
|
|||
case ePartitionedPrincipal:
|
||||
ChooseOriginAttributes(aChannel, aAttributes, true);
|
||||
break;
|
||||
|
||||
case eForeignPartitionedPrincipal:
|
||||
Unused << loadInfo->GetCookieJarSettings(getter_AddRefs(cjs));
|
||||
|
||||
// We only support foreign partitioned principal when dFPI is enabled.
|
||||
// Otherwise, we will use the regular principal.
|
||||
if (cjs->GetCookieBehavior() ==
|
||||
nsICookieService::BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN &&
|
||||
loadInfo->GetIsThirdPartyContextToTopWindow()) {
|
||||
ChooseOriginAttributes(aChannel, aAttributes, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче