diff options
author | Moonchild <moonchild@palemoon.org> | 2021-10-07 21:38:26 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-01 14:41:51 +0200 |
commit | c030a50228349fa1b2c0b4fbc2e83752324dd4d7 (patch) | |
tree | 7102015febc58021d3e6af6ac40b3299e437f1d2 /dom/base/Navigator.cpp | |
parent | e4c6db86b806a9b7b11b94323189954736d45a67 (diff) | |
download | uxp-c030a50228349fa1b2c0b4fbc2e83752324dd4d7.tar.gz |
Issue #1721 - Implement GlobalPrivacyControl
(and get rid of failed DoNotTrack)
Diffstat (limited to 'dom/base/Navigator.cpp')
-rw-r--r-- | dom/base/Navigator.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index e15e32d328..0e4a406fee 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -630,22 +630,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 |