mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 08:18:41 +09:00
Issue #1721 - Implement GlobalPrivacyControl
(and get rid of failed DoNotTrack)
This commit is contained in:
parent
0315aeee73
commit
50ad087351
14 changed files with 41 additions and 50 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue