Issue #1721 - Implement GlobalPrivacyControl

(and get rid of failed DoNotTrack)
This commit is contained in:
Moonchild 2021-10-07 21:38:26 +00:00 committed by roytam1
commit 50ad087351
14 changed files with 41 additions and 50 deletions

View file

@ -632,22 +632,10 @@ Navigator::GetBuildID(nsAString& aBuildID)
return NS_OK;
}
NS_IMETHODIMP
Navigator::GetDoNotTrack(nsAString &aResult)
bool
Navigator::GlobalPrivacyControl()
{
bool doNotTrack = nsContentUtils::DoNotTrackEnabled();
if (!doNotTrack) {
nsCOMPtr<nsILoadContext> loadContext = do_GetInterface(mWindow);
doNotTrack = loadContext && loadContext->UseTrackingProtection();
}
if (doNotTrack) {
aResult.AssignLiteral("1");
} else {
aResult.AssignLiteral("unspecified");
}
return NS_OK;
return nsContentUtils::GPCEnabled();
}
bool