Backed out 5 changesets (bug 1533074) for eslint failure
authorDorel Luca <dluca@mozilla.com>
Thu, 14 Mar 2019 09:14:15 +0200
changeset 521851 4d0c32fbf17c2146a1c1a51afc458de79c10b705
parent 521850 33d53c6ee1362f77a600c3486646ae6e3816d8fb
child 521852 c5190e74039c77d7ad229bae61ab01134b33d885
push id10870
push usernbeleuzu@mozilla.com
push dateFri, 15 Mar 2019 20:00:07 +0000
treeherdermozilla-beta@c594aee5b7a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1533074
milestone67.0a1
backs out36c6a7178a5c8e1ee75821396f904583c3ecba7a
7e6a8fadff5ba02444e977b5dcaa8d479dfa3341
2a0494fed543ebeb2a6798c8cedb3d9f32c02894
38470d2dd98c7c7528c2756b006205f9c454ac0f
af4e03d1f5c896d10b6bdacd3e51dfe5448a3060
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 5 changesets (bug 1533074) for eslint failure Backed out changeset 36c6a7178a5c (bug 1533074) Backed out changeset 7e6a8fadff5b (bug 1533074) Backed out changeset 2a0494fed543 (bug 1533074) Backed out changeset 38470d2dd98c (bug 1533074) Backed out changeset af4e03d1f5c8 (bug 1533074)
browser/app/profile/firefox.js
browser/base/content/test/trackingUI/browser_trackingUI_cryptominers.js
browser/base/content/test/trackingUI/browser_trackingUI_fingerprinters.js
dom/script/ScriptLoader.cpp
modules/libpref/init/StaticPrefList.h
netwerk/base/SimpleChannelParent.cpp
netwerk/base/nsIParentChannel.idl
netwerk/cookie/CookieServiceParent.h
netwerk/protocol/data/DataChannelParent.cpp
netwerk/protocol/file/FileChannelParent.cpp
netwerk/protocol/ftp/FTPChannelParent.cpp
netwerk/protocol/http/HttpBackgroundChannelChild.cpp
netwerk/protocol/http/HttpBackgroundChannelChild.h
netwerk/protocol/http/HttpBackgroundChannelParent.cpp
netwerk/protocol/http/HttpBackgroundChannelParent.h
netwerk/protocol/http/HttpBaseChannel.cpp
netwerk/protocol/http/HttpBaseChannel.h
netwerk/protocol/http/HttpChannelChild.cpp
netwerk/protocol/http/HttpChannelChild.h
netwerk/protocol/http/HttpChannelParent.cpp
netwerk/protocol/http/NullHttpChannel.cpp
netwerk/protocol/http/PHttpBackgroundChannel.ipdl
netwerk/protocol/http/PTrackingDummyChannel.ipdl
netwerk/protocol/http/TrackingDummyChannel.cpp
netwerk/protocol/http/TrackingDummyChannel.h
netwerk/protocol/http/TrackingDummyChannelChild.cpp
netwerk/protocol/http/TrackingDummyChannelChild.h
netwerk/protocol/http/TrackingDummyChannelParent.cpp
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/protocol/http/nsIHttpChannel.idl
netwerk/protocol/viewsource/nsViewSourceChannel.cpp
netwerk/url-classifier/AsyncUrlChannelClassifier.cpp
netwerk/url-classifier/UrlClassifierCommon.cpp
netwerk/url-classifier/UrlClassifierCommon.h
netwerk/url-classifier/UrlClassifierFeatureBase.cpp
netwerk/url-classifier/UrlClassifierFeatureBase.h
netwerk/url-classifier/UrlClassifierFeatureCryptominingAnnotation.cpp
netwerk/url-classifier/UrlClassifierFeatureCryptominingAnnotation.h
netwerk/url-classifier/UrlClassifierFeatureCryptominingProtection.cpp
netwerk/url-classifier/UrlClassifierFeatureFactory.cpp
netwerk/url-classifier/UrlClassifierFeatureFingerprintingAnnotation.cpp
netwerk/url-classifier/UrlClassifierFeatureFingerprintingAnnotation.h
netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.cpp
netwerk/url-classifier/UrlClassifierFeatureTrackingAnnotation.cpp
netwerk/url-classifier/UrlClassifierFeatureTrackingProtection.cpp
netwerk/url-classifier/moz.build
toolkit/components/url-classifier/SafeBrowsing.jsm
toolkit/components/url-classifier/tests/mochitest/features.js
toolkit/components/url-classifier/tests/mochitest/mochitest.ini
toolkit/components/url-classifier/tests/mochitest/test_annotation_vs_TP.html
toolkit/components/url-classifier/tests/mochitest/test_cryptomining_annotate.html
toolkit/components/url-classifier/tests/mochitest/test_fingerprinting_annotate.html
uriloader/exthandler/nsExternalProtocolHandler.cpp
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1242,19 +1242,17 @@ pref("services.sync.prefs.sync.privacy.c
 pref("services.sync.prefs.sync.privacy.clearOnShutdown.sessions", true);
 pref("services.sync.prefs.sync.privacy.clearOnShutdown.siteSettings", true);
 pref("services.sync.prefs.sync.privacy.donottrackheader.enabled", true);
 pref("services.sync.prefs.sync.privacy.fuzzyfox.enabled", false);
 pref("services.sync.prefs.sync.privacy.fuzzyfox.clockgrainus", false);
 pref("services.sync.prefs.sync.privacy.sanitize.sanitizeOnShutdown", true);
 pref("services.sync.prefs.sync.privacy.trackingprotection.enabled", true);
 pref("services.sync.prefs.sync.privacy.trackingprotection.cryptomining.enabled", true);
-pref("services.sync.prefs.sync.privacy.trackingprotection.cryptomining.annotate.enabled", true);
 pref("services.sync.prefs.sync.privacy.trackingprotection.fingerprinting.enabled", true);
-pref("services.sync.prefs.sync.privacy.trackingprotection.fingerprinting.annotate.enabled", true);
 pref("services.sync.prefs.sync.privacy.trackingprotection.pbmode.enabled", true);
 pref("services.sync.prefs.sync.privacy.resistFingerprinting", true);
 pref("services.sync.prefs.sync.privacy.reduceTimerPrecision", true);
 pref("services.sync.prefs.sync.privacy.resistFingerprinting.reduceTimerPrecision.microseconds", true);
 pref("services.sync.prefs.sync.privacy.resistFingerprinting.reduceTimerPrecision.jitter", true);
 pref("services.sync.prefs.sync.security.OCSP.enabled", true);
 pref("services.sync.prefs.sync.security.OCSP.require", true);
 pref("services.sync.prefs.sync.security.default_personal_cert", true);
--- a/browser/base/content/test/trackingUI/browser_trackingUI_cryptominers.js
+++ b/browser/base/content/test/trackingUI/browser_trackingUI_cryptominers.js
@@ -1,27 +1,24 @@
 /* eslint-disable mozilla/no-arbitrary-setTimeout */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 const TRACKING_PAGE = "http://example.org/browser/browser/base/content/test/trackingUI/trackingPage.html";
-const CM_PROTECTION_PREF = "privacy.trackingprotection.cryptomining.enabled";
-const CM_ANNOTATION_PREF = "privacy.trackingprotection.cryptomining.annotate.enabled";
+const CM_PREF = "privacy.trackingprotection.cryptomining.enabled";
 
 add_task(async function setup() {
   await SpecialPowers.pushPrefEnv({set: [
     [ ContentBlocking.prefIntroCount, ContentBlocking.MAX_INTROS ],
     [ "urlclassifier.features.cryptomining.blacklistHosts", "cryptomining.example.com" ],
-    [ "urlclassifier.features.cryptomining.annotate.blacklistHosts", "cryptomining.example.com" ],
     [ "privacy.trackingprotection.enabled", false ],
     [ "privacy.trackingprotection.annotate_channels", false ],
     [ "privacy.trackingprotection.fingerprinting.enabled", false ],
-    [ "privacy.trackingprotection.fingerprinting.annotate.enabled", false ],
   ]});
 });
 
 async function testIdentityState(hasException) {
   let promise = BrowserTestUtils.openNewForegroundTab({url: TRACKING_PAGE, gBrowser});
   let [tab] = await Promise.all([promise, waitForContentBlockingEvent()]);
 
   if (hasException) {
@@ -102,21 +99,19 @@ async function testSubview(hasException)
     ContentBlocking.enableForCurrentPage();
     await loaded;
   }
 
   BrowserTestUtils.removeTab(tab);
 }
 
 add_task(async function test() {
-  Services.prefs.setBoolPref(CM_PROTECTION_PREF, true);
-  Services.prefs.setBoolPref(CM_ANNOTATION_PREF, true);
+  Services.prefs.setBoolPref(CM_PREF, true);
 
   await testIdentityState(false);
   await testIdentityState(true);
 
   await testSubview(false);
   await testSubview(true);
 
-  Services.prefs.clearUserPref(CM_PROTECTION_PREF);
-  Services.prefs.clearUserPref(CM_ANNOTATION_PREF);
+  Services.prefs.clearUserPref(CM_PREF);
 });
 
--- a/browser/base/content/test/trackingUI/browser_trackingUI_fingerprinters.js
+++ b/browser/base/content/test/trackingUI/browser_trackingUI_fingerprinters.js
@@ -1,27 +1,24 @@
 /* eslint-disable mozilla/no-arbitrary-setTimeout */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 const TRACKING_PAGE = "http://example.org/browser/browser/base/content/test/trackingUI/trackingPage.html";
-const FP_PROTECTION_PREF = "privacy.trackingprotection.fingerprinting.enabled";
-const FP_ANNOTATION_PREF = "privacy.trackingprotection.fingerprinting.annotate.enabled";
+const FP_PREF = "privacy.trackingprotection.fingerprinting.enabled";
 
 add_task(async function setup() {
   await SpecialPowers.pushPrefEnv({set: [
     [ ContentBlocking.prefIntroCount, ContentBlocking.MAX_INTROS ],
     [ "urlclassifier.features.fingerprinting.blacklistHosts", "fingerprinting.example.com" ],
-    [ "urlclassifier.features.fingerprinting.annotate.blacklistHosts", "fingerprinting.example.com" ],
     [ "privacy.trackingprotection.enabled", false ],
     [ "privacy.trackingprotection.annotate_channels", false ],
     [ "privacy.trackingprotection.cryptomining.enabled", false ],
-    [ "privacy.trackingprotection.cryptomining.annotate.enabled", false ],
   ]});
 });
 
 async function testIdentityState(hasException) {
   let promise = BrowserTestUtils.openNewForegroundTab({url: TRACKING_PAGE, gBrowser});
   let [tab] = await Promise.all([promise, waitForContentBlockingEvent()]);
 
   if (hasException) {
@@ -102,20 +99,19 @@ async function testSubview(hasException)
     ContentBlocking.enableForCurrentPage();
     await loaded;
   }
 
   BrowserTestUtils.removeTab(tab);
 }
 
 add_task(async function test() {
-  Services.prefs.setBoolPref(FP_PROTECTION_PREF, true);
-  Services.prefs.setBoolPref(FP_ANNOTATION_PREF, true);
+  Services.prefs.setBoolPref(FP_PREF, true);
 
   await testIdentityState(false);
   await testIdentityState(true);
 
   await testSubview(false);
   await testSubview(true);
 
-  Services.prefs.clearUserPref(FP_PROTECTION_PREF);
-  Services.prefs.clearUserPref(FP_ANNOTATION_PREF);
+  Services.prefs.clearUserPref(FP_PREF);
 });
+
--- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp
@@ -3335,17 +3335,17 @@ void ScriptLoader::ReportPreloadErrorsTo
     }
   }
 }
 
 void ScriptLoader::HandleLoadError(ScriptLoadRequest* aRequest,
                                    nsresult aResult) {
   /*
    * Handle script not loading error because source was an tracking URL (or
-   * fingerprinting, cryptomining, etc).
+   * fingerprinting, cryptoming, etc).
    * We make a note of this script node by including it in a dedicated
    * array of blocked tracking nodes under its parent document.
    */
   if (net::UrlClassifierFeatureFactory::IsClassifierBlockingErrorCode(
           aResult)) {
     nsCOMPtr<nsIContent> cont = do_QueryInterface(aRequest->Element());
     mDocument->AddBlockedNodeByClassifier(cont);
   }
--- a/modules/libpref/init/StaticPrefList.h
+++ b/modules/libpref/init/StaticPrefList.h
@@ -2002,42 +2002,32 @@ VARCACHE_PREF(
 // Annotate channels based on the tracking protection list in all modes
 VARCACHE_PREF(
   "privacy.trackingprotection.annotate_channels",
    privacy_trackingprotection_annotate_channels,
   bool, true
 )
 
 // Block 3rd party fingerprinting resources.
+# define PREF_VALUE false
 VARCACHE_PREF(
   "privacy.trackingprotection.fingerprinting.enabled",
    privacy_trackingprotection_fingerprinting_enabled,
-  bool, false
+  bool, PREF_VALUE
 )
-
-// Annotate fingerprinting resources.
-VARCACHE_PREF(
-  "privacy.trackingprotection.fingerprinting.annotate.enabled",
-   privacy_trackingprotection_fingerprinting_annotate_enabled,
-  bool, false
-)
+#undef PREF_VALUE
 
 // Block 3rd party cryptomining resources.
+# define PREF_VALUE false
 VARCACHE_PREF(
   "privacy.trackingprotection.cryptomining.enabled",
    privacy_trackingprotection_cryptomining_enabled,
-  bool, false
+  bool, PREF_VALUE
 )
-
-// Annotate cryptomining resources.
-VARCACHE_PREF(
-  "privacy.trackingprotection.cryptomining.annotate.enabled",
-   privacy_trackingprotection_cryptomining_annotate_enabled,
-  bool, false
-)
+#undef PREF_VALUE
 
 // Lower the priority of network loads for resources on the tracking protection
 // list.  Note that this requires the
 // privacy.trackingprotection.annotate_channels pref to be on in order to have
 // any effect.
 #ifdef NIGHTLY_BUILD
 # define PREF_VALUE true
 #else
--- a/netwerk/base/SimpleChannelParent.cpp
+++ b/netwerk/base/SimpleChannelParent.cpp
@@ -43,18 +43,17 @@ SimpleChannelParent::NotifyCookieAllowed
 
 NS_IMETHODIMP
 SimpleChannelParent::NotifyCookieBlocked(uint32_t aRejectedReason) {
   // Nothing to do.
   return NS_OK;
 }
 
 NS_IMETHODIMP
-SimpleChannelParent::NotifyClassificationFlags(uint32_t aClassificationFlags,
-                                               bool aIsThirdParty) {
+SimpleChannelParent::NotifyTrackingResource(bool aIsThirdParty) {
   // Nothing to do.
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SimpleChannelParent::NotifyFlashPluginStateChanged(
     nsIHttpChannel::FlashPluginState aState) {
   // Nothing to do.
--- a/netwerk/base/nsIParentChannel.idl
+++ b/netwerk/base/nsIParentChannel.idl
@@ -62,23 +62,20 @@ interface nsIParentChannel : nsIStreamLi
    *        String represents full hash that matched
    */
   [noscript] void setClassifierMatchedInfo(in ACString aList,
                                            in ACString aProvider,
                                            in ACString aFullHash);
 
   /**
    * Called to notify the HttpChannelChild that the resource being loaded
-   * has been classified.
-   * @param aClassificationFlags
-   *        What classifier identifies this channel.
+   * is on the tracking protection list.
    * @param aIsThirdParty
    *        Whether or not the resourced is considered first-party
    *        with the URI of the window.
    */
-  [noscript] void notifyClassificationFlags(in uint32_t aClassificationFlags,
-                                            in bool aIsThirdParty);
+  [noscript] void notifyTrackingResource(in bool aIsThirdParty);
 
   /**
    * Called to invoke deletion of the IPC protocol.
    */
   void delete();
 };
--- a/netwerk/cookie/CookieServiceParent.h
+++ b/netwerk/cookie/CookieServiceParent.h
@@ -49,17 +49,17 @@ class CookieServiceParent : public PCook
       const Maybe<LoadInfoArgs> &aLoadInfoArgs, const bool &aIsForeign,
       const bool &aIsTrackingResource,
       const bool &aFirstPartyStorageAccessGranted,
       const nsCString &aCookieString, const nsCString &aServerTime,
       const bool &aFromHttp);
 
   mozilla::ipc::IPCResult RecvPrepareCookieList(
       const URIParams &aHost, const bool &aIsForeign,
-      const bool &aIsTrackingResource,
+      const bool &aIsTackingResource,
       const bool &aFirstPartyStorageAccessGranted,
       const bool &aIsSafeTopLevelNav, const bool &aIsSameSiteForeign,
       const OriginAttributes &aAttrs);
 
   void SerialializeCookieList(const nsTArray<nsCookie *> &aFoundCookieList,
                               nsTArray<CookieStruct> &aCookiesList,
                               nsIURI *aHostURI);
 
--- a/netwerk/protocol/data/DataChannelParent.cpp
+++ b/netwerk/protocol/data/DataChannelParent.cpp
@@ -43,18 +43,17 @@ DataChannelParent::NotifyCookieAllowed()
 
 NS_IMETHODIMP
 DataChannelParent::NotifyCookieBlocked(uint32_t aRejectedReason) {
   // Nothing to do.
   return NS_OK;
 }
 
 NS_IMETHODIMP
-DataChannelParent::NotifyClassificationFlags(uint32_t aClassificationFlags,
-                                             bool aIsThirdParty) {
+DataChannelParent::NotifyTrackingResource(bool aIsThirdParty) {
   // Nothing to do.
   return NS_OK;
 }
 
 NS_IMETHODIMP
 DataChannelParent::NotifyFlashPluginStateChanged(
     nsIHttpChannel::FlashPluginState aState) {
   // Nothing to do.
--- a/netwerk/protocol/file/FileChannelParent.cpp
+++ b/netwerk/protocol/file/FileChannelParent.cpp
@@ -43,18 +43,17 @@ FileChannelParent::NotifyCookieAllowed()
 
 NS_IMETHODIMP
 FileChannelParent::NotifyCookieBlocked(uint32_t aRejectedReason) {
   // Nothing to do.
   return NS_OK;
 }
 
 NS_IMETHODIMP
-FileChannelParent::NotifyClassificationFlags(uint32_t aClassificationFlags,
-                                             bool aIsThirdParty) {
+FileChannelParent::NotifyTrackingResource(bool aIsThirdParty) {
   // Nothing to do.
   return NS_OK;
 }
 
 NS_IMETHODIMP
 FileChannelParent::NotifyFlashPluginStateChanged(
     nsIHttpChannel::FlashPluginState aState) {
   // Nothing to do.
--- a/netwerk/protocol/ftp/FTPChannelParent.cpp
+++ b/netwerk/protocol/ftp/FTPChannelParent.cpp
@@ -511,18 +511,17 @@ FTPChannelParent::NotifyCookieAllowed() 
 
 NS_IMETHODIMP
 FTPChannelParent::NotifyCookieBlocked(uint32_t aRejectedReason) {
   // One day, this should probably be filled in.
   return NS_OK;
 }
 
 NS_IMETHODIMP
-FTPChannelParent::NotifyClassificationFlags(uint32_t aClassificationFlags,
-                                            bool aIsThirdParty) {
+FTPChannelParent::NotifyTrackingResource(bool aIsThirdParty) {
   // One day, this should probably be filled in.
   return NS_OK;
 }
 
 NS_IMETHODIMP
 FTPChannelParent::NotifyFlashPluginStateChanged(
     nsIHttpChannel::FlashPluginState aState) {
   // One day, this should probably be filled in.
--- a/netwerk/protocol/http/HttpBackgroundChannelChild.cpp
+++ b/netwerk/protocol/http/HttpBackgroundChannelChild.cpp
@@ -339,32 +339,31 @@ IPCResult HttpBackgroundChannelChild::Re
     return IPC_OK();
   }
 
   mChannelChild->ProcessNotifyCookieBlocked(aRejectedReason);
 
   return IPC_OK();
 }
 
-IPCResult HttpBackgroundChannelChild::RecvNotifyClassificationFlags(
-    const uint32_t& aClassificationFlags, const bool& aIsThirdParty) {
+IPCResult HttpBackgroundChannelChild::RecvNotifyTrackingResource(
+    const bool& aIsThirdParty) {
   LOG(
-      ("HttpBackgroundChannelChild::RecvNotifyClassificationFlags "
-       "classificationFlags=%" PRIu32 ", thirdparty=%d [this=%p]\n",
-       aClassificationFlags, static_cast<int>(aIsThirdParty), this));
+      ("HttpBackgroundChannelChild::RecvNotifyTrackingResource thirdparty=%d "
+       "[this=%p]\n",
+       static_cast<int>(aIsThirdParty), this));
   MOZ_ASSERT(OnSocketThread());
 
   if (NS_WARN_IF(!mChannelChild)) {
     return IPC_OK();
   }
 
-  // NotifyClassificationFlags has no order dependency to OnStartRequest.
+  // NotifyTrackingResource has no order dependency to OnStartRequest.
   // It this be handled as soon as possible
-  mChannelChild->ProcessNotifyClassificationFlags(aClassificationFlags,
-                                                  aIsThirdParty);
+  mChannelChild->ProcessNotifyTrackingResource(aIsThirdParty);
 
   return IPC_OK();
 }
 
 IPCResult HttpBackgroundChannelChild::RecvNotifyFlashPluginStateChanged(
     const nsIHttpChannel::FlashPluginState& aState) {
   LOG(
       ("HttpBackgroundChannelChild::RecvNotifyFlashPluginStateChanged "
--- a/netwerk/protocol/http/HttpBackgroundChannelChild.h
+++ b/netwerk/protocol/http/HttpBackgroundChannelChild.h
@@ -66,18 +66,17 @@ class HttpBackgroundChannelChild final :
 
   IPCResult RecvNotifyChannelClassifierProtectionDisabled(
       const uint32_t& aAcceptedReason);
 
   IPCResult RecvNotifyCookieAllowed();
 
   IPCResult RecvNotifyCookieBlocked(const uint32_t& aRejectedReason);
 
-  IPCResult RecvNotifyClassificationFlags(const uint32_t& aClassificationFlags,
-                                          const bool& aIsThirdParty);
+  IPCResult RecvNotifyTrackingResource(const bool& aIsThirdParty);
 
   IPCResult RecvNotifyFlashPluginStateChanged(
       const nsIHttpChannel::FlashPluginState& aState);
 
   IPCResult RecvSetClassifierMatchedInfo(const ClassifierInfo& info);
 
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
--- a/netwerk/protocol/http/HttpBackgroundChannelParent.cpp
+++ b/netwerk/protocol/http/HttpBackgroundChannelParent.cpp
@@ -400,43 +400,42 @@ bool HttpBackgroundChannelParent::OnNoti
     MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv));
 
     return NS_SUCCEEDED(rv);
   }
 
   return SendNotifyCookieBlocked(aRejectedReason);
 }
 
-bool HttpBackgroundChannelParent::OnNotifyClassificationFlags(
-    uint32_t aClassificationFlags, bool aIsThirdParty) {
+bool HttpBackgroundChannelParent::OnNotifyTrackingResource(bool aIsThirdParty) {
   LOG(
-      ("HttpBackgroundChannelParent::OnNotifyClassificationFlags "
-       "classificationFlags=%" PRIu32 ", thirdparty=%d [this=%p]\n",
-       aClassificationFlags, static_cast<int>(aIsThirdParty), this));
+      ("HttpBackgroundChannelParent::OnNotifyTrackingResource thirdparty=%d "
+       "[this=%p]\n",
+       static_cast<int>(aIsThirdParty), this));
   AssertIsInMainProcess();
 
   if (NS_WARN_IF(!mIPCOpened)) {
     return false;
   }
 
   if (!IsOnBackgroundThread()) {
     MutexAutoLock lock(mBgThreadMutex);
     nsresult rv = mBackgroundThread->Dispatch(
-        NewRunnableMethod<uint32_t, bool>(
-            "net::HttpBackgroundChannelParent::OnNotifyClassificationFlags",
-            this, &HttpBackgroundChannelParent::OnNotifyClassificationFlags,
-            aClassificationFlags, aIsThirdParty),
+        NewRunnableMethod<bool>(
+            "net::HttpBackgroundChannelParent::OnNotifyTrackingResource", this,
+            &HttpBackgroundChannelParent::OnNotifyTrackingResource,
+            aIsThirdParty),
         NS_DISPATCH_NORMAL);
 
     MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv));
 
     return NS_SUCCEEDED(rv);
   }
 
-  return SendNotifyClassificationFlags(aClassificationFlags, aIsThirdParty);
+  return SendNotifyTrackingResource(aIsThirdParty);
 }
 
 bool HttpBackgroundChannelParent::OnNotifyFlashPluginStateChanged(
     nsIHttpChannel::FlashPluginState aState) {
   LOG(
       ("HttpBackgroundChannelParent::OnNotifyFlashPluginStateChanged "
        "[this=%p]\n",
        this));
--- a/netwerk/protocol/http/HttpBackgroundChannelParent.h
+++ b/netwerk/protocol/http/HttpBackgroundChannelParent.h
@@ -68,19 +68,18 @@ class HttpBackgroundChannelParent final 
   bool OnNotifyChannelClassifierProtectionDisabled(uint32_t aAcceptedReason);
 
   // To send NotifyCookieAllowed message over background channel.
   bool OnNotifyCookieAllowed();
 
   // To send NotifyCookieBlocked message over background channel.
   bool OnNotifyCookieBlocked(uint32_t aRejectedReason);
 
-  // To send NotifyClassificationFlags message over background channel.
-  bool OnNotifyClassificationFlags(uint32_t aClassificationFlags,
-                                   bool aIsThirdParty);
+  // To send NotifyTrackingResource message over background channel.
+  bool OnNotifyTrackingResource(bool aIsThirdParty);
 
   // To send NotifyFlashPluginStateChanged message over background channel.
   bool OnNotifyFlashPluginStateChanged(nsIHttpChannel::FlashPluginState aState);
 
   // To send SetClassifierMatchedInfo message over background channel.
   bool OnSetClassifierMatchedInfo(const nsACString& aList,
                                   const nsACString& aProvider,
                                   const nsACString& aFullHash);
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -59,17 +59,16 @@
 #include "nsISSLSocketControl.h"
 #include "mozilla/Telemetry.h"
 #include "nsIURL.h"
 #include "nsIConsoleService.h"
 #include "mozilla/BinarySearch.h"
 #include "mozilla/DebugOnly.h"
 #include "mozilla/Move.h"
 #include "mozilla/net/PartiallySeekableInputStream.h"
-#include "mozilla/net/UrlClassifierCommon.h"
 #include "mozilla/InputStreamLengthHelper.h"
 #include "nsIHttpHeaderVisitor.h"
 #include "nsIMIMEInputStream.h"
 #include "nsIXULRuntime.h"
 #include "nsICacheInfoChannel.h"
 #include "nsIDOMWindowUtils.h"
 #include "nsIURIFixup.h"
 #include "nsHttpChannel.h"
@@ -164,18 +163,18 @@ HttpBaseChannel::HttpBaseChannel()
       mRequestContextID(0),
       mContentWindowId(0),
       mTopLevelOuterContentWindowId(0),
       mAltDataLength(0),
       mChannelId(0),
       mReqContentLength(0U),
       mStatus(NS_OK),
       mCanceled(false),
-      mFirstPartyClassificationFlags(0),
-      mThirdPartyClassificationFlags(0),
+      mIsFirstPartyTrackingResource(false),
+      mIsThirdPartyTrackingResource(false),
       mFlashPluginState(nsIHttpChannel::FlashPluginUnknown),
       mLoadFlags(LOAD_NORMAL),
       mCaps(0),
       mClassOfService(0),
       mUpgradeToSecure(false),
       mApplyConversion(true),
       mIsPending(false),
       mWasOpened(false),
@@ -304,27 +303,26 @@ void HttpBaseChannel::ReleaseMainThreadO
 
     nsCOMPtr<nsISupports> nonTailRemover(new NonTailRemover(mRequestContext));
     arrayToRelease.AppendElement(nonTailRemover.forget());
   }
 
   NS_DispatchToMainThread(new ProxyReleaseRunnable(std::move(arrayToRelease)));
 }
 
-void HttpBaseChannel::AddClassificationFlags(uint32_t aClassificationFlags,
-                                             bool aIsThirdParty) {
-  LOG(
-      ("HttpBaseChannel::AddClassificationFlags classificationFlags=%d "
-       "thirdparty=%d %p",
-       aClassificationFlags, static_cast<int>(aIsThirdParty), this));
+void HttpBaseChannel::SetIsTrackingResource(bool aIsThirdParty) {
+  LOG(("HttpBaseChannel::SetIsTrackingResource thirdparty=%d %p",
+       static_cast<int>(aIsThirdParty), this));
 
   if (aIsThirdParty) {
-    mThirdPartyClassificationFlags |= aClassificationFlags;
+    MOZ_ASSERT(!mIsFirstPartyTrackingResource);
+    mIsThirdPartyTrackingResource = true;
   } else {
-    mFirstPartyClassificationFlags |= aClassificationFlags;
+    MOZ_ASSERT(!mIsThirdPartyTrackingResource);
+    mIsFirstPartyTrackingResource = true;
   }
 }
 
 void HttpBaseChannel::SetFlashPluginState(
     nsIHttpChannel::FlashPluginState aState) {
   LOG(("HttpBaseChannel::SetFlashPluginState %p", this));
   mFlashPluginState = aState;
 }
@@ -1467,99 +1465,58 @@ NS_IMETHODIMP HttpBaseChannel::GetTopLev
   return NS_OK;
 }
 
 NS_IMETHODIMP HttpBaseChannel::SetTopLevelContentWindowId(uint64_t aWindowId) {
   mContentWindowId = aWindowId;
   return NS_OK;
 }
 
-bool
-HttpBaseChannel::IsTrackingResource() const {
-  MOZ_ASSERT(!mFirstPartyClassificationFlags ||
-             !mThirdPartyClassificationFlags);
-  return UrlClassifierCommon::IsTrackingClassificationFlag(
-             mThirdPartyClassificationFlags) ||
-         UrlClassifierCommon::IsTrackingClassificationFlag(
-             mFirstPartyClassificationFlags);
-}
-
 NS_IMETHODIMP
 HttpBaseChannel::GetIsTrackingResource(bool* aIsTrackingResource) {
-  *aIsTrackingResource = IsTrackingResource();
+  MOZ_ASSERT(!(mIsFirstPartyTrackingResource && mIsThirdPartyTrackingResource));
+  *aIsTrackingResource =
+      mIsThirdPartyTrackingResource || mIsFirstPartyTrackingResource;
   return NS_OK;
 }
 
-bool
-HttpBaseChannel::IsThirdPartyTrackingResource() const {
-  MOZ_ASSERT(
-      !(mFirstPartyClassificationFlags && mThirdPartyClassificationFlags));
-  return UrlClassifierCommon::IsTrackingClassificationFlag(
-      mThirdPartyClassificationFlags);
-}
-
 NS_IMETHODIMP
 HttpBaseChannel::GetIsThirdPartyTrackingResource(bool* aIsTrackingResource) {
-  *aIsTrackingResource = IsThirdPartyTrackingResource();
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-HttpBaseChannel::GetClassificationFlags(uint32_t* aFlags) {
-  MOZ_ASSERT(!mFirstPartyClassificationFlags ||
-             !mThirdPartyClassificationFlags);
-  if (mThirdPartyClassificationFlags) {
-    *aFlags = mThirdPartyClassificationFlags;
-  } else {
-    *aFlags = mFirstPartyClassificationFlags;
-  }
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-HttpBaseChannel::GetFirstPartyClassificationFlags(uint32_t* aFlags) {
-  MOZ_ASSERT(
-      !(mFirstPartyClassificationFlags && mFirstPartyClassificationFlags));
-  *aFlags = mFirstPartyClassificationFlags;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-HttpBaseChannel::GetThirdPartyClassificationFlags(uint32_t* aFlags) {
-  MOZ_ASSERT(
-      !(mFirstPartyClassificationFlags && mThirdPartyClassificationFlags));
-  *aFlags = mThirdPartyClassificationFlags;
+  MOZ_ASSERT(!(mIsFirstPartyTrackingResource && mIsThirdPartyTrackingResource));
+  *aIsTrackingResource = mIsThirdPartyTrackingResource;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HttpBaseChannel::GetFlashPluginState(nsIHttpChannel::FlashPluginState* aState) {
   uint32_t flashPluginState = mFlashPluginState;
   *aState = (nsIHttpChannel::FlashPluginState)flashPluginState;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HttpBaseChannel::OverrideTrackingFlagsForDocumentCookieAccessor(
     nsIHttpChannel* aDocumentChannel) {
-  LOG(("HttpBaseChannel::OverrideTrackingFlagsForDocumentCookieAccessor() %p",
-       this));
+  LOG(
+      ("HttpBaseChannel::OverrideTrackingFlagsForDocumentCookieAccessor() %p "
+       "mIsFirstPartyTrackingResource=%d  mIsThirdPartyTrackingResource=%d",
+       this, static_cast<int>(mIsFirstPartyTrackingResource),
+       static_cast<int>(mIsThirdPartyTrackingResource)));
 
   // The semantics we'd like to achieve here are that document.cookie
   // should follow the same rules that the document is subject to with
   // regards to content blocking. Therefore we need to propagate the
   // same flags from the document channel to the fake channel here.
-
-  mThirdPartyClassificationFlags =
-      aDocumentChannel->GetThirdPartyClassificationFlags();
-  mFirstPartyClassificationFlags =
-      aDocumentChannel->GetFirstPartyClassificationFlags();
-
-  MOZ_ASSERT(
-      !(mFirstPartyClassificationFlags && mThirdPartyClassificationFlags));
+  if (aDocumentChannel->GetIsThirdPartyTrackingResource()) {
+    mIsThirdPartyTrackingResource = true;
+  } else {
+    mIsFirstPartyTrackingResource = true;
+  }
+
+  MOZ_ASSERT(!(mIsFirstPartyTrackingResource && mIsThirdPartyTrackingResource));
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HttpBaseChannel::GetTransferSize(uint64_t* aTransferSize) {
   *aTransferSize = mTransferSize;
   return NS_OK;
 }
--- a/netwerk/protocol/http/HttpBaseChannel.h
+++ b/netwerk/protocol/http/HttpBaseChannel.h
@@ -234,21 +234,16 @@ class HttpBaseChannel : public nsHashPro
   NS_IMETHOD SetChannelId(uint64_t aChannelId) override;
   NS_IMETHOD GetTopLevelContentWindowId(uint64_t *aContentWindowId) override;
   NS_IMETHOD SetTopLevelContentWindowId(uint64_t aContentWindowId) override;
   NS_IMETHOD GetTopLevelOuterContentWindowId(uint64_t *aWindowId) override;
   NS_IMETHOD SetTopLevelOuterContentWindowId(uint64_t aWindowId) override;
   NS_IMETHOD GetIsTrackingResource(bool *aIsTrackingResource) override;
   NS_IMETHOD GetIsThirdPartyTrackingResource(
       bool *aIsTrackingResource) override;
-  NS_IMETHOD GetClassificationFlags(uint32_t *aIsClassificationFlags) override;
-  NS_IMETHOD GetFirstPartyClassificationFlags(
-      uint32_t *aIsClassificationFlags) override;
-  NS_IMETHOD GetThirdPartyClassificationFlags(
-      uint32_t *aIsClassificationFlags) override;
   NS_IMETHOD OverrideTrackingFlagsForDocumentCookieAccessor(
       nsIHttpChannel *aDocumentChannel) override;
   NS_IMETHOD GetFlashPluginState(
       nsIHttpChannel::FlashPluginState *aState) override;
 
   // nsIHttpChannelInternal
   NS_IMETHOD GetDocumentURI(nsIURI **aDocumentURI) override;
   NS_IMETHOD SetDocumentURI(nsIURI *aDocumentURI) override;
@@ -417,17 +412,17 @@ class HttpBaseChannel : public nsHashPro
   MOZ_MUST_USE nsresult DoApplyContentConversions(
       nsIStreamListener *aNextListener, nsIStreamListener **aNewNextListener);
 
   // Callback on STS thread called by CopyComplete when NS_AsyncCopy()
   // is finished. This function works as a proxy function to dispatch
   // |EnsureUploadStreamIsCloneableComplete| to main thread.
   virtual void OnCopyComplete(nsresult aStatus);
 
-  void AddClassificationFlags(uint32_t aFlags, bool aIsThirdParty);
+  void SetIsTrackingResource(bool aIsThirdParty);
 
   void SetFlashPluginState(nsIHttpChannel::FlashPluginState aState);
 
   const uint64_t &ChannelId() const { return mChannelId; }
 
   void InternalSetUploadStream(nsIInputStream *uploadStream) {
     mUploadStream = uploadStream;
   }
@@ -533,19 +528,16 @@ class HttpBaseChannel : public nsHashPro
   static void CallTypeSniffers(void *aClosure, const uint8_t *aData,
                                uint32_t aCount);
 
   nsresult CheckRedirectLimit(uint32_t aRedirectFlags) const;
 
   bool MaybeWaitForUploadStreamLength(nsIStreamListener *aListener,
                                       nsISupports *aContext);
 
-  bool IsThirdPartyTrackingResource() const;
-  bool IsTrackingResource() const;
-
   friend class PrivateBrowsingChannel<HttpBaseChannel>;
   friend class InterceptFailedOnStop;
 
  protected:
   // this section is for main-thread-only object
   // all the references need to be proxy released on main thread.
   nsCOMPtr<nsIURI> mURI;
   nsCOMPtr<nsIURI> mOriginalURI;
@@ -665,18 +657,18 @@ class HttpBaseChannel : public nsHashPro
   uint64_t mChannelId;
   uint64_t mReqContentLength;
 
   Atomic<nsresult, ReleaseAcquire> mStatus;
 
   // Use Release-Acquire ordering to ensure the OMT ODA is ignored while channel
   // is canceled on main thread.
   Atomic<bool, ReleaseAcquire> mCanceled;
-  Atomic<uint32_t, ReleaseAcquire> mFirstPartyClassificationFlags;
-  Atomic<uint32_t, ReleaseAcquire> mThirdPartyClassificationFlags;
+  Atomic<bool, ReleaseAcquire> mIsFirstPartyTrackingResource;
+  Atomic<bool, ReleaseAcquire> mIsThirdPartyTrackingResource;
   Atomic<uint32_t, ReleaseAcquire> mFlashPluginState;
 
   uint32_t mLoadFlags;
   uint32_t mCaps;
   uint32_t mClassOfService;
 
   uint32_t mUpgradeToSecure : 1;
   uint32_t mApplyConversion : 1;
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -1869,25 +1869,24 @@ void HttpChannelChild::ProcessNotifyCook
                                AntiTrackingCommon::NotifyBlockingDecision(
                                    self,
                                    AntiTrackingCommon::BlockingDecision::eBlock,
                                    aRejectedReason);
                              }),
       NS_DISPATCH_NORMAL);
 }
 
-void HttpChannelChild::ProcessNotifyClassificationFlags(
-    uint32_t aClassificationFlags, bool aIsThirdParty) {
+void HttpChannelChild::ProcessNotifyTrackingResource(bool aIsThirdParty) {
   LOG(
-      ("HttpChannelChild::ProcessNotifyClassificationFlags thirdparty=%d "
-       "flags=%" PRIu32 " [this=%p]\n",
-       static_cast<int>(aIsThirdParty), aClassificationFlags, this));
+      ("HttpChannelChild::ProcessNotifyTrackingResource thirdparty=%d "
+       "[this=%p]\n",
+       static_cast<int>(aIsThirdParty), this));
   MOZ_ASSERT(OnSocketThread());
 
-  AddClassificationFlags(aClassificationFlags, aIsThirdParty);
+  SetIsTrackingResource(aIsThirdParty);
 }
 
 void HttpChannelChild::ProcessNotifyFlashPluginStateChanged(
     nsIHttpChannel::FlashPluginState aState) {
   LOG(("HttpChannelChild::ProcessNotifyFlashPluginStateChanged [this=%p]\n",
        this));
   MOZ_ASSERT(OnSocketThread());
 
--- a/netwerk/protocol/http/HttpChannelChild.h
+++ b/netwerk/protocol/http/HttpChannelChild.h
@@ -261,18 +261,17 @@ class HttpChannelChild final : public PH
   void ProcessOnProgress(const int64_t& aProgress, const int64_t& aProgressMax);
   void ProcessOnStatus(const nsresult& aStatus);
   void ProcessFlushedForDiversion();
   void ProcessDivertMessages();
   void ProcessNotifyChannelClassifierProtectionDisabled(
       uint32_t aAcceptedReason);
   void ProcessNotifyCookieAllowed();
   void ProcessNotifyCookieBlocked(uint32_t aRejectedReason);
-  void ProcessNotifyClassificationFlags(uint32_t aClassificationFlags,
-                                        bool aIsThirdParty);
+  void ProcessNotifyTrackingResource(bool aIsThirdParty);
   void ProcessNotifyFlashPluginStateChanged(
       nsIHttpChannel::FlashPluginState aState);
   void ProcessSetClassifierMatchedInfo(const nsCString& aList,
                                        const nsCString& aProvider,
                                        const nsCString& aFullHash);
 
   // Return true if we need to tell the parent the size of unreported received
   // data
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -1845,26 +1845,22 @@ HttpChannelParent::SetClassifierMatchedI
     MOZ_ASSERT(mBgParent);
     Unused << mBgParent->OnSetClassifierMatchedInfo(aList, aProvider,
                                                     aFullHash);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-HttpChannelParent::NotifyClassificationFlags(uint32_t aClassificationFlags,
-                                             bool aIsThirdParty) {
-  LOG(
-      ("HttpChannelParent::NotifyClassificationFlags "
-       "classificationFlags=%" PRIu32 ", thirdparty=%d [this=%p]\n",
-       aClassificationFlags, static_cast<int>(aIsThirdParty), this));
+HttpChannelParent::NotifyTrackingResource(bool aIsThirdParty) {
+  LOG(("HttpChannelParent::NotifyTrackingResource thirdparty=%d [this=%p]\n",
+       static_cast<int>(aIsThirdParty), this));
   if (!mIPCClosed) {
     MOZ_ASSERT(mBgParent);
-    Unused << mBgParent->OnNotifyClassificationFlags(aClassificationFlags,
-                                                     aIsThirdParty);
+    Unused << mBgParent->OnNotifyTrackingResource(aIsThirdParty);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HttpChannelParent::NotifyFlashPluginStateChanged(
     nsIHttpChannel::FlashPluginState aState) {
   LOG(("HttpChannelParent::NotifyFlashPluginStateChanged [this=%p]\n", this));
--- a/netwerk/protocol/http/NullHttpChannel.cpp
+++ b/netwerk/protocol/http/NullHttpChannel.cpp
@@ -84,40 +84,23 @@ NullHttpChannel::SetTopLevelOuterContent
 }
 
 NS_IMETHODIMP
 NullHttpChannel::GetIsTrackingResource(bool *aIsTrackingResource) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
-NullHttpChannel::GetIsThirdPartyTrackingResource(bool *aIsTrackingResource) {
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-NullHttpChannel::GetClassificationFlags(uint32_t *aClassificationFlags) {
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
 NullHttpChannel::GetFlashPluginState(
     nsIHttpChannel::FlashPluginState *aResult) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
-NullHttpChannel::GetFirstPartyClassificationFlags(
-    uint32_t *aClassificationFlags) {
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-NullHttpChannel::GetThirdPartyClassificationFlags(
-    uint32_t *aClassificationFlags) {
+NullHttpChannel::GetIsThirdPartyTrackingResource(bool *aIsTrackingResource) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 NullHttpChannel::OverrideTrackingFlagsForDocumentCookieAccessor(
     nsIHttpChannel *aDocumentChannel) {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
--- a/netwerk/protocol/http/PHttpBackgroundChannel.ipdl
+++ b/netwerk/protocol/http/PHttpBackgroundChannel.ipdl
@@ -59,18 +59,19 @@ child:
   async NotifyChannelClassifierProtectionDisabled(uint32_t aAcceptedReason);
 
   // Tell the child that cookies are allowed for this load.
   async NotifyCookieAllowed();
 
   // Tell the child that tracking cookies are blocked for this load.
   async NotifyCookieBlocked(uint32_t aRejectedReason);
 
-  // Tell the child that the resource being loaded has been classified.
-  async NotifyClassificationFlags(uint32_t aClassificationFlags, bool aIsThirdParty);
+  // Tell the child that the resource being loaded is on the tracking
+  // protection list.
+  async NotifyTrackingResource(bool aIsThirdParty);
 
   // Tell the child that the current channel's document is not allowed to load
   // flash content.
   async NotifyFlashPluginStateChanged(FlashPluginState aState);
 
   // Tell the child information of matched URL againts SafeBrowsing list
   async SetClassifierMatchedInfo(ClassifierInfo info);
 
--- a/netwerk/protocol/http/PTrackingDummyChannel.ipdl
+++ b/netwerk/protocol/http/PTrackingDummyChannel.ipdl
@@ -6,19 +6,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PNecko;
 
 namespace mozilla {
 namespace net {
 
 // This protocol provides a mechanism for the "child intercept" mode of
-// ServiceWorker operation to work correctly with Classified channels.
-// ServiceWorkers should not be allowed for third-party iframes which are
-// annotated as tracking origins.
+// ServiceWorker operation to work correctly with Tracking Protection
+// annotations.  ServiceWorkers should not be allowed for third-party iframes
+// which are annotated as tracking origins.
 //
 // In child intercept mode, the decision to intercept a channel is made in the
 // child process without consulting the parent process.  The decision is based
 // on whether there is a ServiceWorker with a scope covering the URL in question
 // and whether storage is allowed for the origin/URL.  When the
 // "network.cookie.cookieBehavior" preference is set to BEHAVIOR_REJECT_TRACKER,
 // annotated channels are denied storage which means that the ServiceWorker
 // should not intercept the channel.  However, the decision for tracking
@@ -34,14 +34,14 @@ namespace net {
 // to be confident we will never need/want to turn it off.  Then as part of bug
 // 1496997 we can remove this implementation.  Bug 1498259 covers removing this
 // hack in particular.
 protocol PTrackingDummyChannel
 {
   manager PNecko;
 
 child:
-  async __delete__(uint32_t aClassificationFlags);
+  async __delete__(bool aTrackingResource);
 };
 
 } // namespace net
 } // namespace mozilla
 
--- a/netwerk/protocol/http/TrackingDummyChannel.cpp
+++ b/netwerk/protocol/http/TrackingDummyChannel.cpp
@@ -73,39 +73,38 @@ NS_INTERFACE_MAP_BEGIN(TrackingDummyChan
   NS_INTERFACE_MAP_ENTRY_CONCRETE(TrackingDummyChannel)
 NS_INTERFACE_MAP_END
 
 TrackingDummyChannel::TrackingDummyChannel(nsIURI* aURI, nsIURI* aTopWindowURI,
                                            nsresult aTopWindowURIResult,
                                            nsILoadInfo* aLoadInfo)
     : mTopWindowURI(aTopWindowURI),
       mTopWindowURIResult(aTopWindowURIResult),
-      mClassificationFlags(0) {
+      mIsTrackingResource(false) {
   MOZ_ASSERT(XRE_IsParentProcess());
 
   SetOriginalURI(aURI);
   SetLoadInfo(aLoadInfo);
 }
 
 TrackingDummyChannel::~TrackingDummyChannel() {
   NS_ReleaseOnMainThreadSystemGroup("TrackingDummyChannel::mLoadInfo",
                                     mLoadInfo.forget());
   NS_ReleaseOnMainThreadSystemGroup("TrackingDummyChannel::mURI",
                                     mURI.forget());
   NS_ReleaseOnMainThreadSystemGroup("TrackingDummyChannel::mTopWindowURI",
                                     mTopWindowURI.forget());
 }
 
-uint32_t TrackingDummyChannel::ClassificationFlags() const {
-  return mClassificationFlags;
+bool TrackingDummyChannel::IsTrackingResource() const {
+  return mIsTrackingResource;
 }
 
-void TrackingDummyChannel::AddClassificationFlags(
-    uint32_t aClassificationFlags) {
-  mClassificationFlags |= aClassificationFlags;
+void TrackingDummyChannel::SetIsTrackingResource() {
+  mIsTrackingResource = true;
 }
 
 //-----------------------------------------------------------------------------
 // TrackingDummyChannel::nsIChannel
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
 TrackingDummyChannel::GetOriginalURI(nsIURI** aOriginalURI) {
--- a/netwerk/protocol/http/TrackingDummyChannel.h
+++ b/netwerk/protocol/http/TrackingDummyChannel.h
@@ -61,29 +61,29 @@ class TrackingDummyChannel final : publi
   };
 
   static StorageAllowedState StorageAllowed(
       nsIChannel* aChannel, const std::function<void(bool)>& aCallback);
 
   TrackingDummyChannel(nsIURI* aURI, nsIURI* aTopWindowURI,
                        nsresult aTopWindowURIResult, nsILoadInfo* aLoadInfo);
 
-  uint32_t ClassificationFlags() const;
+  bool IsTrackingResource() const;
 
-  void AddClassificationFlags(uint32_t);
+  void SetIsTrackingResource();
 
  private:
   ~TrackingDummyChannel();
 
   nsCOMPtr<nsILoadInfo> mLoadInfo;
   nsCOMPtr<nsIURI> mURI;
   nsCOMPtr<nsIURI> mTopWindowURI;
   nsresult mTopWindowURIResult;
 
-  uint32_t mClassificationFlags;
+  bool mIsTrackingResource;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(TrackingDummyChannel, TRACKING_DUMMY_CHANNEL_IID)
 
 }  // namespace net
 }  // namespace mozilla
 
 #endif  // mozilla_net_TrackingDummyChannel_h
--- a/netwerk/protocol/http/TrackingDummyChannelChild.cpp
+++ b/netwerk/protocol/http/TrackingDummyChannelChild.cpp
@@ -63,27 +63,29 @@ void TrackingDummyChannelChild::Initiali
 
   mChannel = aChannel;
   mURI = aURI;
   mIsThirdParty = aIsThirdParty;
   mCallback = aCallback;
 }
 
 mozilla::ipc::IPCResult TrackingDummyChannelChild::Recv__delete__(
-    const uint32_t& aClassificationFlags) {
+    const bool& aTrackingResource) {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (!mChannel) {
     return IPC_OK();
   }
 
   nsCOMPtr<nsIHttpChannel> channel = std::move(mChannel);
 
   RefPtr<HttpBaseChannel> httpChannel = do_QueryObject(channel);
-  httpChannel->AddClassificationFlags(aClassificationFlags, mIsThirdParty);
+  if (aTrackingResource) {
+    httpChannel->SetIsTrackingResource(mIsThirdParty);
+  }
 
   bool storageGranted = AntiTrackingCommon::IsFirstPartyStorageAccessGrantedFor(
       httpChannel, mURI, nullptr);
   mCallback(storageGranted);
   return IPC_OK();
 }
 
 }  // namespace net
--- a/netwerk/protocol/http/TrackingDummyChannelChild.h
+++ b/netwerk/protocol/http/TrackingDummyChannelChild.h
@@ -29,17 +29,17 @@ class TrackingDummyChannelChild final : 
   TrackingDummyChannelChild();
   ~TrackingDummyChannelChild();
 
  private:
   void Initialize(nsIHttpChannel* aChannel, nsIURI* aURI, bool aIsThirdParty,
                   const std::function<void(bool)>& aCallback);
 
   mozilla::ipc::IPCResult Recv__delete__(
-      const uint32_t& aClassificationFlags) override;
+      const bool& aTrackingResource) override;
 
   nsCOMPtr<nsIHttpChannel> mChannel;
   nsCOMPtr<nsIURI> mURI;
   std::function<void(bool)> mCallback;
   bool mIsThirdParty;
 };
 
 }  // namespace net
--- a/netwerk/protocol/http/TrackingDummyChannelParent.cpp
+++ b/netwerk/protocol/http/TrackingDummyChannelParent.cpp
@@ -32,17 +32,17 @@ void TrackingDummyChannelParent::Init(ns
   }
 
   RefPtr<TrackingDummyChannel> channel = new TrackingDummyChannel(
       aURI, aTopWindowURI, aTopWindowURIResult, aLoadInfo);
 
   bool willCallback = NS_SUCCEEDED(AsyncUrlChannelClassifier::CheckChannel(
       channel, [self = std::move(self), channel]() {
         if (self->mIPCActive) {
-          Unused << Send__delete__(self, channel->ClassificationFlags());
+          Unused << Send__delete__(self, channel->IsTrackingResource());
         }
       }));
 
   if (willCallback) {
     onExit.release();
   }
 }
 
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -645,17 +645,17 @@ nsresult nsHttpChannel::Connect() {
     LOG(("Resuming from cache is not supported yet"));
     return NS_ERROR_DOCUMENT_NOT_CACHED;
   }
 
   if (ShouldIntercept()) {
     return RedirectToInterceptedChannel();
   }
 
-  bool isTrackingResource = IsThirdPartyTrackingResource();
+  bool isTrackingResource = mIsThirdPartyTrackingResource;  // is atomic
   LOG(("nsHttpChannel %p tracking resource=%d, cos=%u", this,
        isTrackingResource, mClassOfService));
 
   if (isTrackingResource) {
     AddClassFlags(nsIClassOfService::Tail);
   }
 
   if (WaitingForTailUnblock()) {
@@ -2345,17 +2345,17 @@ nsresult nsHttpChannel::ProcessResponse(
   if (!referrer) {
     referrer = mReferrer;
   }
 
   if (referrer) {
     nsCOMPtr<nsILoadContextInfo> lci = GetLoadContextInfo(this);
     mozilla::net::Predictor::UpdateCacheability(
         referrer, mURI, httpStatus, mRequestHead, mResponseHead, lci,
-        IsThirdPartyTrackingResource());
+        mIsThirdPartyTrackingResource);
   }
 
   // Only allow 407 (authentication required) to continue
   if (mTransaction && mTransaction->ProxyConnectFailed() && httpStatus != 407) {
     return ProcessFailedProxyConnect(httpStatus);
   }
 
   MOZ_ASSERT(!mCachedContentIsValid || mRaceCacheWithNetwork,
@@ -3903,17 +3903,17 @@ nsresult nsHttpChannel::OpenCacheEntryIn
 
   if (mPostID) {
     extension.Append(nsPrintfCString("%d", mPostID));
   }
   if (mTRR) {
     extension.Append("TRR");
   }
 
-  if (IsThirdPartyTrackingResource() &&
+  if (mIsThirdPartyTrackingResource &&
       !AntiTrackingCommon::IsFirstPartyStorageAccessGrantedFor(this, mURI,
                                                                nullptr)) {
     nsCOMPtr<nsIURI> topWindowURI;
     rv = GetTopWindowURI(getter_AddRefs(topWindowURI));
     bool isDocument = false;
     if (NS_FAILED(rv) && NS_SUCCEEDED(GetIsMainDocumentChannel(&isDocument)) &&
         isDocument) {
       // For top-level documents, use the document channel's origin to compute
--- a/netwerk/protocol/http/nsIHttpChannel.idl
+++ b/netwerk/protocol/http/nsIHttpChannel.idl
@@ -490,80 +490,33 @@ interface nsIHttpChannel : nsIChannel
 
     /**
      * ID of the top-level document's inner window.  Identifies the content
      * this channels is being load in.
      */
     [must_use] attribute uint64_t topLevelContentWindowId;
 
     /**
-     * Returns the classification flags if the channel has been processed by
-     * URL-Classifier features and is considered first-party.
-     */
-    [infallible] readonly attribute unsigned long firstPartyClassificationFlags;
-
-    /**
-     * Returns the classification flags if the channel has been processed by
-     * URL-Classifier features and is considered third-party with the top
-     * window URI.
-     */
-    [infallible] readonly attribute unsigned long thirdPartyClassificationFlags;
-
-    /*
-     * Returns the classification flags if the channel has been processed by
-     * URL-Classifier features. This value is equal to
-     * "firstPartyClassificationFlags || thirdPartyClassificationFlags".
-     *
-     * Note that top-level channels could be classified as well.
-     * In order to identify third-party resources specifically, use
-     * classificationThirdPartyFlags;
-     */
-    [infallible] readonly attribute unsigned long classificationFlags;
-
-    cenum ClassificationFlags : 32 {
-      /**
-       * The resource is on the fingerprinting list. This is only available if
-       * the privacy.trackingprotection.fingerprinting_annotate_enabled pref.
-       */
-      CLASSIFIED_FINGERPRINTING = 0x01,
-
-      /**
-       * The resource is on the cryptomining list. This is only available if
-       * the privacy.trackingprotection.cryptomining_annotate_enabled pref is set.
-       */
-      CLASSIFIED_CRYPTOMINING = 0x02,
-
-      /**
-       * The resource is on the tracking protection list. This is only available
-       * if the privacy.trackingprotection.annotate_channels pref.
-       */
-      CLASSIFIED_TRACKING = 0x04,
-    };
-
-    /**
-     * Returns true if the channel has loaded a resource that is classified as
-     * tracker.
-     * This is a helper attribute which returns the same value of
-     * (classificationFlags & CLASSIFIED_TRACKING) ||
-     *   (classificationFlags & CLASSIFIED_FINGERPRINTING)
+     * Returns true if the channel has loaded a resource that is on the tracking
+     * protection list.  This is only available if the
+     * privacy.trackingprotection.annotate_channels pref is set and its value
+     * should only be relied on after the channel has established a connection.
      *
      * Note that top-level channels could be marked as tracking
      * resource. In order to identify third-party tracking resources
      * specifically, use isThirdPartyTrackingResource.
      */
     [infallible] readonly attribute boolean isTrackingResource;
 
     /**
-     * Returns the classification flags if the channel has been processed by
-     * URL-Classifier features and is considered third-party with the top
-     * window URI.
-     *
-     * This is a helper attribute which returns the same value of
-     * (thirdPartyClassificationFlags & CLASSIFIED_TRACKING) ||
-     *   (thirdPartyClassificationFlags & CLASSIFIED_FINGERPRINTING)
+     * Returns true if the channel has loaded a resource that is on the tracking
+     * protection list and is considered third-party with the top window URI.
+     * This is only available if the privacy.trackingprotection.annotate_channels
+     * pref is set and its value should only be relied on after the channel has
+     * established a connection.
      */
     [infallible] readonly attribute boolean isThirdPartyTrackingResource;
 
     /**
      * Returns the allowing status for flash plugin for this channel.
      */
     cenum FlashPluginState : 8 {
       FlashPluginUnknown = 0,
--- a/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
+++ b/netwerk/protocol/viewsource/nsViewSourceChannel.cpp
@@ -708,54 +708,31 @@ nsViewSourceChannel::SetTopLevelOuterCon
 NS_IMETHODIMP
 nsViewSourceChannel::GetIsTrackingResource(bool *aIsTrackingResource) {
   return !mHttpChannel
              ? NS_ERROR_NULL_POINTER
              : mHttpChannel->GetIsTrackingResource(aIsTrackingResource);
 }
 
 NS_IMETHODIMP
+nsViewSourceChannel::GetFlashPluginState(
+    nsIHttpChannel::FlashPluginState *aResult) {
+  return !mHttpChannel ? NS_ERROR_NULL_POINTER
+                       : mHttpChannel->GetFlashPluginState(aResult);
+}
+
+NS_IMETHODIMP
 nsViewSourceChannel::GetIsThirdPartyTrackingResource(
     bool *aIsTrackingResource) {
   return !mHttpChannel ? NS_ERROR_NULL_POINTER
                        : mHttpChannel->GetIsThirdPartyTrackingResource(
                              aIsTrackingResource);
 }
 
 NS_IMETHODIMP
-nsViewSourceChannel::GetClassificationFlags(uint32_t *aClassificationFlags) {
-  return !mHttpChannel
-             ? NS_ERROR_NULL_POINTER
-             : mHttpChannel->GetClassificationFlags(aClassificationFlags);
-}
-
-NS_IMETHODIMP
-nsViewSourceChannel::GetFirstPartyClassificationFlags(
-    uint32_t *aClassificationFlags) {
-  return !mHttpChannel ? NS_ERROR_NULL_POINTER
-                       : mHttpChannel->GetFirstPartyClassificationFlags(
-                             aClassificationFlags);
-}
-
-NS_IMETHODIMP
-nsViewSourceChannel::GetThirdPartyClassificationFlags(
-    uint32_t *aClassificationFlags) {
-  return !mHttpChannel ? NS_ERROR_NULL_POINTER
-                       : mHttpChannel->GetThirdPartyClassificationFlags(
-                             aClassificationFlags);
-}
-
-NS_IMETHODIMP
-nsViewSourceChannel::GetFlashPluginState(
-    nsIHttpChannel::FlashPluginState *aResult) {
-  return !mHttpChannel ? NS_ERROR_NULL_POINTER
-                       : mHttpChannel->GetFlashPluginState(aResult);
-}
-
-NS_IMETHODIMP
 nsViewSourceChannel::OverrideTrackingFlagsForDocumentCookieAccessor(
     nsIHttpChannel *aDocumentChannel) {
   return !mHttpChannel
              ? NS_ERROR_NULL_POINTER
              : mHttpChannel->OverrideTrackingFlagsForDocumentCookieAccessor(
                    aDocumentChannel);
 }
 
--- a/netwerk/url-classifier/AsyncUrlChannelClassifier.cpp
+++ b/netwerk/url-classifier/AsyncUrlChannelClassifier.cpp
@@ -411,18 +411,17 @@ bool FeatureData::MaybeCompleteClassific
   nsresult rv = mFeature->GetSkipHostList(skipList);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     UC_LOG(
         ("FeatureData::MaybeCompleteClassification[%p] - error. Let's move on",
          this));
     return true;
   }
 
-  if (!mBlacklistTables.IsEmpty() &&
-      nsContentUtils::IsURIInList(mBlacklistTables[0]->URI(), skipList)) {
+  if (nsContentUtils::IsURIInList(mBlacklistTables[0]->URI(), skipList)) {
     UC_LOG(
         ("FeatureData::MaybeCompleteClassification[%p] - uri found in skiplist",
          this));
     return true;
   }
 
   nsAutoCString list;
   list.Assign(mHostInPrefTables[nsIUrlClassifierFeature::blacklist]);
--- a/netwerk/url-classifier/UrlClassifierCommon.cpp
+++ b/netwerk/url-classifier/UrlClassifierCommon.cpp
@@ -3,33 +3,30 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/net/UrlClassifierCommon.h"
 
 #include "mozilla/AntiTrackingCommon.h"
 #include "mozilla/BasePrincipal.h"
-#include "mozilla/net/HttpBaseChannel.h"
 #include "mozilla/net/UrlClassifierFeatureFactory.h"
 #include "mozilla/StaticPrefs.h"
 #include "mozIThirdPartyUtil.h"
 #include "nsContentUtils.h"
 #include "nsIChannel.h"
 #include "nsIClassifiedChannel.h"
 #include "mozilla/dom/Document.h"
 #include "nsIDocShell.h"
 #include "nsIHttpChannel.h"
 #include "nsIHttpChannelInternal.h"
 #include "nsIParentChannel.h"
 #include "nsIScriptError.h"
 #include "nsIWebProgressListener.h"
 #include "nsNetUtil.h"
-#include "nsQueryObject.h"
-#include "TrackingDummyChannel.h"
 
 namespace mozilla {
 namespace net {
 
 const nsCString::size_type UrlClassifierCommon::sMaxSpecLength = 128;
 
 // MOZ_LOG=nsChannelClassifier:5
 LazyLogModule UrlClassifierCommon::sLog("nsChannelClassifier");
@@ -273,193 +270,10 @@ nsresult UrlClassifierCommon::CreatePair
   nsCOMPtr<nsIURI> whitelistURI;
   rv = NS_NewURI(getter_AddRefs(whitelistURI), whitelistEntry);
   NS_ENSURE_SUCCESS(rv, rv);
 
   whitelistURI.forget(aURI);
   return NS_OK;
 }
 
-namespace {
-
-void SetClassificationFlagsHelper(nsIChannel* aChannel,
-                                  uint32_t aClassificationFlags,
-                                  bool aIsThirdParty) {
-  MOZ_ASSERT(aChannel);
-
-  nsCOMPtr<nsIParentChannel> parentChannel;
-  NS_QueryNotificationCallbacks(aChannel, parentChannel);
-  if (parentChannel) {
-    // This channel is a parent-process proxy for a child process
-    // request. We should notify the child process as well.
-    parentChannel->NotifyClassificationFlags(aClassificationFlags,
-                                             aIsThirdParty);
-  }
-
-  RefPtr<HttpBaseChannel> httpChannel = do_QueryObject(aChannel);
-  if (httpChannel) {
-    httpChannel->AddClassificationFlags(aClassificationFlags, aIsThirdParty);
-  }
-
-  RefPtr<TrackingDummyChannel> dummyChannel = do_QueryObject(aChannel);
-  if (dummyChannel) {
-    dummyChannel->AddClassificationFlags(aClassificationFlags);
-  }
-}
-
-void LowerPriorityHelper(nsIChannel* aChannel) {
-  MOZ_ASSERT(aChannel);
-
-  bool isBlockingResource = false;
-
-  nsCOMPtr<nsIClassOfService> cos(do_QueryInterface(aChannel));
-  if (cos) {
-    if (nsContentUtils::IsTailingEnabled()) {
-      uint32_t cosFlags = 0;
-      cos->GetClassFlags(&cosFlags);
-      isBlockingResource =
-          cosFlags & (nsIClassOfService::UrgentStart |
-                      nsIClassOfService::Leader | nsIClassOfService::Unblocked);
-
-      // Requests not allowed to be tailed are usually those with higher
-      // prioritization.  That overweights being a tracker: don't throttle
-      // them when not in background.
-      if (!(cosFlags & nsIClassOfService::TailForbidden)) {
-        cos->AddClassFlags(nsIClassOfService::Throttleable);
-      }
-    } else {
-      // Yes, we even don't want to evaluate the isBlockingResource when tailing
-      // is off see bug 1395525.
-
-      cos->AddClassFlags(nsIClassOfService::Throttleable);
-    }
-  }
-
-  if (!isBlockingResource) {
-    nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(aChannel);
-    if (p) {
-      if (UC_LOG_ENABLED()) {
-        nsCOMPtr<nsIURI> uri;
-        aChannel->GetURI(getter_AddRefs(uri));
-        nsAutoCString spec;
-        uri->GetAsciiSpec(spec);
-        spec.Truncate(
-            std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
-        UC_LOG(("Setting PRIORITY_LOWEST for channel[%p] (%s)", aChannel,
-                spec.get()));
-      }
-      p->SetPriority(nsISupportsPriority::PRIORITY_LOWEST);
-    }
-  }
-}
-
-}  // namespace
-
-// static
-void UrlClassifierCommon::AnnotateChannel(
-    nsIChannel* aChannel,
-    AntiTrackingCommon::ContentBlockingAllowListPurpose aPurpose,
-    uint32_t aClassificationFlags, uint32_t aLoadingState) {
-  MOZ_ASSERT(aChannel);
-  MOZ_ASSERT(aPurpose == AntiTrackingCommon::eTrackingProtection ||
-             aPurpose == AntiTrackingCommon::eTrackingAnnotations ||
-             aPurpose == AntiTrackingCommon::eFingerprinting ||
-             aPurpose == AntiTrackingCommon::eCryptomining);
-
-  nsCOMPtr<nsIURI> chanURI;
-  nsresult rv = aChannel->GetURI(getter_AddRefs(chanURI));
-  if (NS_WARN_IF(NS_FAILED(rv))) {
-    UC_LOG(
-        ("UrlClassifierCommon::AnnotateChannel nsIChannel::GetURI(%p) failed",
-         (void*)aChannel));
-    return;
-  }
-
-  bool isThirdPartyWithTopLevelWinURI =
-      nsContentUtils::IsThirdPartyWindowOrChannel(nullptr, aChannel, chanURI);
-
-  UC_LOG(("UrlClassifierCommon::AnnotateChannel, annotating channel[%p]",
-          aChannel));
-
-  SetClassificationFlagsHelper(aChannel, aClassificationFlags,
-                               isThirdPartyWithTopLevelWinURI);
-
-  if (isThirdPartyWithTopLevelWinURI || IsAllowListed(aChannel, aPurpose)) {
-    UrlClassifierCommon::NotifyChannelClassifierProtectionDisabled(
-        aChannel, aLoadingState);
-  }
-
-  if (isThirdPartyWithTopLevelWinURI &&
-      StaticPrefs::privacy_trackingprotection_lower_network_priority()) {
-    LowerPriorityHelper(aChannel);
-  }
-}
-
-// static
-bool UrlClassifierCommon::IsAllowListed(
-    nsIChannel* aChannel,
-    AntiTrackingCommon::ContentBlockingAllowListPurpose aPurpose) {
-  MOZ_ASSERT(aPurpose == AntiTrackingCommon::eTrackingProtection ||
-             aPurpose == AntiTrackingCommon::eTrackingAnnotations ||
-             aPurpose == AntiTrackingCommon::eFingerprinting ||
-             aPurpose == AntiTrackingCommon::eCryptomining);
-
-  nsCOMPtr<nsIHttpChannelInternal> channel = do_QueryInterface(aChannel);
-  if (!channel) {
-    UC_LOG(("nsChannelClassifier: Not an HTTP channel"));
-    return false;
-  }
-
-  nsCOMPtr<nsIURI> topWinURI;
-  nsresult rv = channel->GetTopWindowURI(getter_AddRefs(topWinURI));
-  if (NS_WARN_IF(NS_FAILED(rv))) {
-    return false;
-  }
-
-  if (!topWinURI && StaticPrefs::channelclassifier_allowlist_example()) {
-    UC_LOG(("nsChannelClassifier: Allowlisting test domain"));
-    nsCOMPtr<nsIIOService> ios = services::GetIOService();
-    if (NS_WARN_IF(!ios)) {
-      return false;
-    }
-
-    rv = ios->NewURI(NS_LITERAL_CSTRING("http://allowlisted.example.com"),
-                     nullptr, nullptr, getter_AddRefs(topWinURI));
-    if (NS_WARN_IF(NS_FAILED(rv))) {
-      return false;
-    }
-  }
-
-  bool isAllowListed = false;
-  rv = AntiTrackingCommon::IsOnContentBlockingAllowList(
-      topWinURI, NS_UsePrivateBrowsing(aChannel), aPurpose, isAllowListed);
-  if (NS_FAILED(rv)) {  // normal for some loads, no need to print a warning
-    return false;
-  }
-
-  if (isAllowListed) {
-    if (UC_LOG_ENABLED()) {
-      nsCOMPtr<nsIURI> chanURI;
-      nsresult rv = aChannel->GetURI(getter_AddRefs(chanURI));
-      if (NS_WARN_IF(NS_FAILED(rv))) {
-        return isAllowListed;
-      }
-
-      nsCString chanSpec = chanURI->GetSpecOrDefault();
-      chanSpec.Truncate(
-          std::min(chanSpec.Length(), UrlClassifierCommon::sMaxSpecLength));
-      UC_LOG(("nsChannelClassifier: User override on channel[%p] (%s)",
-              aChannel, chanSpec.get()));
-    }
-  }
-
-  return isAllowListed;
-}
-
-// static
-bool UrlClassifierCommon::IsTrackingClassificationFlag(uint32_t aFlag) {
-  return (aFlag & nsIHttpChannel::ClassificationFlags::CLASSIFIED_TRACKING) ||
-         (aFlag &
-          nsIHttpChannel::ClassificationFlags::CLASSIFIED_FINGERPRINTING);
-}
-
 }  // namespace net
 }  // namespace mozilla
--- a/netwerk/url-classifier/UrlClassifierCommon.h
+++ b/netwerk/url-classifier/UrlClassifierCommon.h
@@ -37,27 +37,16 @@ class UrlClassifierCommon final {
                                     const nsACString& aProvider,
                                     const nsACString& aFullHash);
 
   // Use this function only when you are looking for a pairwise whitelist uri
   // with the format: http://toplevel.page/?resource=channel.uri.domain
   static nsresult CreatePairwiseWhiteListURI(nsIChannel* aChannel,
                                              nsIURI** aURI);
 
-  static void AnnotateChannel(
-      nsIChannel* aChannel,
-      AntiTrackingCommon::ContentBlockingAllowListPurpose aPurpose,
-      uint32_t aClassificationFlags, uint32_t aLoadingState);
-
-  static bool IsAllowListed(
-      nsIChannel* aChannel,
-      AntiTrackingCommon::ContentBlockingAllowListPurpose aPurpose);
-
-  static bool IsTrackingClassificationFlag(uint32_t aFlag);
-
  private:
   // aBlockedReason must be one of the nsIWebProgressListener state.
   static void NotifyChannelBlocked(nsIChannel* aChannel,
                                    nsIURI* aURIBeingLoaded,
                                    unsigned aBlockedReason);
 };
 
 }  // namespace net
--- a/netwerk/url-classifier/UrlClassifierFeatureBase.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureBase.cpp
@@ -159,10 +159,70 @@ UrlClassifierFeatureBase::HasHostInPrefe
 }
 
 NS_IMETHODIMP
 UrlClassifierFeatureBase::GetSkipHostList(nsACString& aList) {
   aList = mSkipHosts;
   return NS_OK;
 }
 
+bool UrlClassifierFeatureBase::IsAllowListed(
+    nsIChannel* aChannel,
+    AntiTrackingCommon::ContentBlockingAllowListPurpose aPurpose) {
+  MOZ_ASSERT(aPurpose == AntiTrackingCommon::eTrackingProtection ||
+             aPurpose == AntiTrackingCommon::eTrackingAnnotations ||
+             aPurpose == AntiTrackingCommon::eFingerprinting ||
+             aPurpose == AntiTrackingCommon::eCryptomining);
+
+  nsCOMPtr<nsIHttpChannelInternal> channel = do_QueryInterface(aChannel);
+  if (!channel) {
+    UC_LOG(("nsChannelClassifier: Not an HTTP channel"));
+    return false;
+  }
+
+  nsCOMPtr<nsIURI> topWinURI;
+  nsresult rv = channel->GetTopWindowURI(getter_AddRefs(topWinURI));
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return false;
+  }
+
+  if (!topWinURI && StaticPrefs::channelclassifier_allowlist_example()) {
+    UC_LOG(("nsChannelClassifier: Allowlisting test domain"));
+    nsCOMPtr<nsIIOService> ios = services::GetIOService();
+    if (NS_WARN_IF(!ios)) {
+      return false;
+    }
+
+    rv = ios->NewURI(NS_LITERAL_CSTRING("http://allowlisted.example.com"),
+                     nullptr, nullptr, getter_AddRefs(topWinURI));
+    if (NS_WARN_IF(NS_FAILED(rv))) {
+      return false;
+    }
+  }
+
+  bool isAllowListed = false;
+  rv = AntiTrackingCommon::IsOnContentBlockingAllowList(
+      topWinURI, NS_UsePrivateBrowsing(aChannel), aPurpose, isAllowListed);
+  if (NS_FAILED(rv)) {  // normal for some loads, no need to print a warning
+    return false;
+  }
+
+  if (isAllowListed) {
+    if (UC_LOG_ENABLED()) {
+      nsCOMPtr<nsIURI> chanURI;
+      nsresult rv = aChannel->GetURI(getter_AddRefs(chanURI));
+      if (NS_WARN_IF(NS_FAILED(rv))) {
+        return isAllowListed;
+      }
+
+      nsCString chanSpec = chanURI->GetSpecOrDefault();
+      chanSpec.Truncate(
+          std::min(chanSpec.Length(), UrlClassifierCommon::sMaxSpecLength));
+      UC_LOG(("nsChannelClassifier: User override on channel[%p] (%s)",
+              aChannel, chanSpec.get()));
+    }
+  }
+
+  return isAllowListed;
+}
+
 }  // namespace net
 }  // namespace mozilla
--- a/netwerk/url-classifier/UrlClassifierFeatureBase.h
+++ b/netwerk/url-classifier/UrlClassifierFeatureBase.h
@@ -53,16 +53,20 @@ class UrlClassifierFeatureBase : public 
                            const nsACString& aPrefWhitelistTableName,
                            const nsACString& aPrefSkipHosts);
 
   virtual ~UrlClassifierFeatureBase();
 
   void InitializePreferences();
   void ShutdownPreferences();
 
+  bool IsAllowListed(
+      nsIChannel* aChannel,
+      AntiTrackingCommon::ContentBlockingAllowListPurpose aPurpose);
+
  private:
   nsCString mName;
 
   nsCString mPrefSkipHosts;
 
   // 2: blacklist and whitelist.
   nsCString mPrefTables[2];
   nsTArray<nsCString> mTables[2];
deleted file mode 100644
--- a/netwerk/url-classifier/UrlClassifierFeatureCryptominingAnnotation.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "UrlClassifierFeatureCryptominingAnnotation.h"
-
-#include "mozilla/AntiTrackingCommon.h"
-#include "mozilla/net/UrlClassifierCommon.h"
-#include "mozilla/StaticPrefs.h"
-#include "nsContentUtils.h"
-#include "nsNetUtil.h"
-
-namespace mozilla {
-namespace net {
-
-namespace {
-
-#define CRYPTOMINING_ANNOTATION_FEATURE_NAME "cryptomining-annotation"
-
-#define URLCLASSIFIER_CRYPTOMINING_ANNOTATION_BLACKLIST \
-  "urlclassifier.features.cryptomining.annotate.blacklistTables"
-#define URLCLASSIFIER_CRYPTOMINING_ANNOTATION_BLACKLIST_TEST_ENTRIES \
-  "urlclassifier.features.cryptomining.annotate.blacklistHosts"
-#define URLCLASSIFIER_CRYPTOMINING_ANNOTATION_WHITELIST \
-  "urlclassifier.features.cryptomining.annotate.whitelistTables"
-#define URLCLASSIFIER_CRYPTOMINING_ANNOTATION_WHITELIST_TEST_ENTRIES \
-  "urlclassifier.features.cryptomining.annotate.whitelistHosts"
-#define TABLE_CRYPTOMINING_ANNOTATION_BLACKLIST_PREF \
-  "cryptomining-annotate-blacklist-pref"
-#define TABLE_CRYPTOMINING_ANNOTATION_WHITELIST_PREF \
-  "cryptomining-annotate-whitelist-pref"
-
-StaticRefPtr<UrlClassifierFeatureCryptominingAnnotation>
-    gFeatureCryptominingAnnotation;
-
-}  // namespace
-
-UrlClassifierFeatureCryptominingAnnotation::
-    UrlClassifierFeatureCryptominingAnnotation()
-    : UrlClassifierFeatureBase(
-          NS_LITERAL_CSTRING(CRYPTOMINING_ANNOTATION_FEATURE_NAME),
-          NS_LITERAL_CSTRING(URLCLASSIFIER_CRYPTOMINING_ANNOTATION_BLACKLIST),
-          NS_LITERAL_CSTRING(URLCLASSIFIER_CRYPTOMINING_ANNOTATION_WHITELIST),
-          NS_LITERAL_CSTRING(
-              URLCLASSIFIER_CRYPTOMINING_ANNOTATION_BLACKLIST_TEST_ENTRIES),
-          NS_LITERAL_CSTRING(
-              URLCLASSIFIER_CRYPTOMINING_ANNOTATION_WHITELIST_TEST_ENTRIES),
-          NS_LITERAL_CSTRING(TABLE_CRYPTOMINING_ANNOTATION_BLACKLIST_PREF),
-          NS_LITERAL_CSTRING(TABLE_CRYPTOMINING_ANNOTATION_WHITELIST_PREF),
-          EmptyCString()) {}
-
-/* static */ const char* UrlClassifierFeatureCryptominingAnnotation::Name() {
-  return CRYPTOMINING_ANNOTATION_FEATURE_NAME;
-}
-
-/* static */
-void UrlClassifierFeatureCryptominingAnnotation::MaybeInitialize() {
-  UC_LOG(("UrlClassifierFeatureCryptominingAnnotation: MaybeInitialize"));
-
-  if (!gFeatureCryptominingAnnotation) {
-    gFeatureCryptominingAnnotation =
-        new UrlClassifierFeatureCryptominingAnnotation();
-    gFeatureCryptominingAnnotation->InitializePreferences();
-  }
-}
-
-/* static */
-void UrlClassifierFeatureCryptominingAnnotation::MaybeShutdown() {
-  UC_LOG(("UrlClassifierFeatureCryptominingAnnotation: MaybeShutdown"));
-
-  if (gFeatureCryptominingAnnotation) {
-    gFeatureCryptominingAnnotation->ShutdownPreferences();
-    gFeatureCryptominingAnnotation = nullptr;
-  }
-}
-
-/* static */
-already_AddRefed<UrlClassifierFeatureCryptominingAnnotation>
-UrlClassifierFeatureCryptominingAnnotation::MaybeCreate(nsIChannel* aChannel) {
-  MOZ_ASSERT(aChannel);
-
-  UC_LOG(
-      ("UrlClassifierFeatureCryptominingAnnotation: MaybeCreate for channel %p",
-       aChannel));
-
-  if (!StaticPrefs::
-          privacy_trackingprotection_cryptomining_annotate_enabled()) {
-    return nullptr;
-  }
-
-  if (!UrlClassifierCommon::ShouldEnableClassifier(aChannel)) {
-    return nullptr;
-  }
-
-  MaybeInitialize();
-  MOZ_ASSERT(gFeatureCryptominingAnnotation);
-
-  RefPtr<UrlClassifierFeatureCryptominingAnnotation> self =
-      gFeatureCryptominingAnnotation;
-  return self.forget();
-}
-
-/* static */
-already_AddRefed<nsIUrlClassifierFeature>
-UrlClassifierFeatureCryptominingAnnotation::GetIfNameMatches(
-    const nsACString& aName) {
-  if (!aName.EqualsLiteral(CRYPTOMINING_ANNOTATION_FEATURE_NAME)) {
-    return nullptr;
-  }
-
-  MaybeInitialize();
-  MOZ_ASSERT(gFeatureCryptominingAnnotation);
-
-  RefPtr<UrlClassifierFeatureCryptominingAnnotation> self =
-      gFeatureCryptominingAnnotation;
-  return self.forget();
-}
-
-NS_IMETHODIMP
-UrlClassifierFeatureCryptominingAnnotation::ProcessChannel(
-    nsIChannel* aChannel, const nsACString& aList, bool* aShouldContinue) {
-  NS_ENSURE_ARG_POINTER(aChannel);
-  NS_ENSURE_ARG_POINTER(aShouldContinue);
-
-  // This is not a blocking feature.
-  *aShouldContinue = true;
-
-  UC_LOG(
-      ("UrlClassifierFeatureCryptominingAnnotation::ProcessChannel, annotating "
-       "channel[%p]",
-       aChannel));
-
-  UrlClassifierCommon::AnnotateChannel(
-      aChannel, AntiTrackingCommon::eCryptomining,
-      nsIHttpChannel::ClassificationFlags::CLASSIFIED_CRYPTOMINING,
-      nsIWebProgressListener::STATE_LOADED_CRYPTOMINING_CONTENT);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-UrlClassifierFeatureCryptominingAnnotation::GetURIByListType(
-    nsIChannel* aChannel, nsIUrlClassifierFeature::listType aListType,
-    nsIURI** aURI) {
-  NS_ENSURE_ARG_POINTER(aChannel);
-  NS_ENSURE_ARG_POINTER(aURI);
-
-  if (aListType == nsIUrlClassifierFeature::blacklist) {
-    return aChannel->GetURI(aURI);
-  }
-
-  MOZ_ASSERT(aListType == nsIUrlClassifierFeature::whitelist);
-  return UrlClassifierCommon::CreatePairwiseWhiteListURI(aChannel, aURI);
-}
-
-}  // namespace net
-}  // namespace mozilla
deleted file mode 100644
--- a/netwerk/url-classifier/UrlClassifierFeatureCryptominingAnnotation.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_net_UrlClassifierFeatureCryptominingAnnotation_h
-#define mozilla_net_UrlClassifierFeatureCryptominingAnnotation_h
-
-#include "UrlClassifierFeatureBase.h"
-
-class nsIChannel;
-
-namespace mozilla {
-namespace net {
-
-class UrlClassifierFeatureCryptominingAnnotation final
-    : public UrlClassifierFeatureBase {
- public:
-  static const char* Name();
-
-  static void MaybeShutdown();
-
-  static already_AddRefed<UrlClassifierFeatureCryptominingAnnotation>
-  MaybeCreate(nsIChannel* aChannel);
-
-  static already_AddRefed<nsIUrlClassifierFeature> GetIfNameMatches(
-      const nsACString& aName);
-
-  NS_IMETHOD ProcessChannel(nsIChannel* aChannel, const nsACString& aList,
-                            bool* aShouldContinue) override;
-
-  NS_IMETHOD GetURIByListType(nsIChannel* aChannel,
-                              nsIUrlClassifierFeature::listType aListType,
-                              nsIURI** aURI) override;
-
- private:
-  UrlClassifierFeatureCryptominingAnnotation();
-
-  static void MaybeInitialize();
-};
-
-}  // namespace net
-}  // namespace mozilla
-
-#endif  // mozilla_net_UrlClassifierFeatureCryptominingAnnotation_h
--- a/netwerk/url-classifier/UrlClassifierFeatureCryptominingProtection.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureCryptominingProtection.cpp
@@ -12,17 +12,17 @@
 #include "nsContentUtils.h"
 #include "nsNetUtil.h"
 
 namespace mozilla {
 namespace net {
 
 namespace {
 
-#define CRYPTOMINING_FEATURE_NAME "cryptomining-protection"
+#define CRYPTOMINING_FEATURE_NAME "cryptomining"
 
 #define URLCLASSIFIER_CRYPTOMINING_BLACKLIST \
   "urlclassifier.features.cryptomining.blacklistTables"
 #define URLCLASSIFIER_CRYPTOMINING_BLACKLIST_TEST_ENTRIES \
   "urlclassifier.features.cryptomining.blacklistHosts"
 #define URLCLASSIFIER_CRYPTOMINING_WHITELIST \
   "urlclassifier.features.cryptomining.whitelistTables"
 #define URLCLASSIFIER_CRYPTOMINING_WHITELIST_TEST_ENTRIES \
@@ -138,40 +138,48 @@ UrlClassifierFeatureCryptominingProtecti
 }
 
 NS_IMETHODIMP
 UrlClassifierFeatureCryptominingProtection::ProcessChannel(
     nsIChannel* aChannel, const nsACString& aList, bool* aShouldContinue) {
   NS_ENSURE_ARG_POINTER(aChannel);
   NS_ENSURE_ARG_POINTER(aShouldContinue);
 
-  bool isAllowListed = UrlClassifierCommon::IsAllowListed(
-      aChannel, AntiTrackingCommon::eCryptomining);
+  bool isAllowListed =
+      IsAllowListed(aChannel, AntiTrackingCommon::eCryptomining);
 
   // This is a blocking feature.
   *aShouldContinue = isAllowListed;
 
   if (isAllowListed) {
-    return NS_OK;
-  }
-
-  UrlClassifierCommon::SetBlockedContent(aChannel, NS_ERROR_CRYPTOMINING_URI,
-                                         aList, EmptyCString(), EmptyCString());
+    // Even with cryptomining blocking disabled, we still want to show the user
+    // that there are unblocked cryptominers on the site, so notify the UI that
+    // we loaded cryptomining content.  UI code can treat this notification
+    // differently depending on whether cryptomining blocking is enabled or
+    // disabled.
+    UrlClassifierCommon::NotifyChannelClassifierProtectionDisabled(
+        aChannel, nsIWebProgressListener::STATE_LOADED_CRYPTOMINING_CONTENT);
+  } else {
+    UrlClassifierCommon::SetBlockedContent(aChannel, NS_ERROR_CRYPTOMINING_URI,
+                                           aList, EmptyCString(),
+                                           EmptyCString());
 
-  UC_LOG(
-      ("UrlClassifierFeatureCryptominingProtection::ProcessChannel, "
-       "cancelling "
-       "channel[%p]",
-       aChannel));
-  nsCOMPtr<nsIHttpChannelInternal> httpChannel = do_QueryInterface(aChannel);
+    UC_LOG(
+        ("UrlClassifierFeatureCryptominingProtection::ProcessChannel, "
+         "cancelling "
+         "channel[%p]",
+         aChannel));
+    nsCOMPtr<nsIHttpChannelInternal> httpChannel = do_QueryInterface(aChannel);
 
-  if (httpChannel) {
-    Unused << httpChannel->CancelByChannelClassifier(NS_ERROR_CRYPTOMINING_URI);
-  } else {
-    Unused << aChannel->Cancel(NS_ERROR_CRYPTOMINING_URI);
+    if (httpChannel) {
+      Unused << httpChannel->CancelByChannelClassifier(
+          NS_ERROR_CRYPTOMINING_URI);
+    } else {
+      Unused << aChannel->Cancel(NS_ERROR_CRYPTOMINING_URI);
+    }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 UrlClassifierFeatureCryptominingProtection::GetURIByListType(
     nsIChannel* aChannel, nsIUrlClassifierFeature::listType aListType,
--- a/netwerk/url-classifier/UrlClassifierFeatureFactory.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureFactory.cpp
@@ -2,19 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/net/UrlClassifierFeatureFactory.h"
 
 // List of Features
-#include "UrlClassifierFeatureCryptominingAnnotation.h"
 #include "UrlClassifierFeatureCryptominingProtection.h"
-#include "UrlClassifierFeatureFingerprintingAnnotation.h"
 #include "UrlClassifierFeatureFingerprintingProtection.h"
 #include "UrlClassifierFeatureFlash.h"
 #include "UrlClassifierFeatureLoginReputation.h"
 #include "UrlClassifierFeaturePhishingProtection.h"
 #include "UrlClassifierFeatureTrackingProtection.h"
 #include "UrlClassifierFeatureTrackingAnnotation.h"
 #include "UrlClassifierFeatureCustomTables.h"
 
@@ -25,19 +23,17 @@ namespace net {
 
 /* static */
 void UrlClassifierFeatureFactory::Shutdown() {
   // We want to expose Features only in the parent process.
   if (!XRE_IsParentProcess()) {
     return;
   }
 
-  UrlClassifierFeatureCryptominingAnnotation::MaybeShutdown();
   UrlClassifierFeatureCryptominingProtection::MaybeShutdown();
-  UrlClassifierFeatureFingerprintingAnnotation::MaybeShutdown();
   UrlClassifierFeatureFingerprintingProtection::MaybeShutdown();
   UrlClassifierFeatureFlash::MaybeShutdown();
   UrlClassifierFeatureLoginReputation::MaybeShutdown();
   UrlClassifierFeaturePhishingProtection::MaybeShutdown();
   UrlClassifierFeatureTrackingAnnotation::MaybeShutdown();
   UrlClassifierFeatureTrackingProtection::MaybeShutdown();
 }
 
@@ -68,28 +64,16 @@ void UrlClassifierFeatureFactory::GetFea
   }
 
   // Tracking Protection
   feature = UrlClassifierFeatureTrackingProtection::MaybeCreate(aChannel);
   if (feature) {
     aFeatures.AppendElement(feature);
   }
 
-  // Cryptomining Annotation
-  feature = UrlClassifierFeatureCryptominingAnnotation::MaybeCreate(aChannel);
-  if (feature) {
-    aFeatures.AppendElement(feature);
-  }
-
-  // Fingerprinting Annotation
-  feature = UrlClassifierFeatureFingerprintingAnnotation::MaybeCreate(aChannel);
-  if (feature) {
-    aFeatures.AppendElement(feature);
-  }
-
   // Tracking Annotation
   feature = UrlClassifierFeatureTrackingAnnotation::MaybeCreate(aChannel);
   if (feature) {
     aFeatures.AppendElement(feature);
   }
 
   // Flash
   nsTArray<nsCOMPtr<nsIUrlClassifierFeature>> flashFeatures;
@@ -113,35 +97,22 @@ UrlClassifierFeatureFactory::GetFeatureL
 already_AddRefed<nsIUrlClassifierFeature>
 UrlClassifierFeatureFactory::GetFeatureByName(const nsACString& aName) {
   if (!XRE_IsParentProcess()) {
     return nullptr;
   }
 
   nsCOMPtr<nsIUrlClassifierFeature> feature;
 
-  // Cryptomining Annotation
-  feature = UrlClassifierFeatureCryptominingAnnotation::GetIfNameMatches(aName);
-  if (feature) {
-    return feature.forget();
-  }
-
   // Cryptomining Protection
   feature = UrlClassifierFeatureCryptominingProtection::GetIfNameMatches(aName);
   if (feature) {
     return feature.forget();
   }
 
-  // Fingerprinting Annotation
-  feature =
-      UrlClassifierFeatureFingerprintingAnnotation::GetIfNameMatches(aName);
-  if (feature) {
-    return feature.forget();
-  }
-
   // Fingerprinting Protection
   feature =
       UrlClassifierFeatureFingerprintingProtection::GetIfNameMatches(aName);
   if (feature) {
     return feature.forget();
   }
 
   // Tracking Protection
@@ -178,36 +149,23 @@ UrlClassifierFeatureFactory::GetFeatureB
 }
 
 /* static */
 void UrlClassifierFeatureFactory::GetFeatureNames(nsTArray<nsCString>& aArray) {
   if (!XRE_IsParentProcess()) {
     return;
   }
 
+  // Cryptomining Protection
   nsAutoCString name;
-
-  // Cryptomining Annotation
-  name.Assign(UrlClassifierFeatureCryptominingAnnotation::Name());
-  if (!name.IsEmpty()) {
-    aArray.AppendElement(name);
-  }
-
-  // Cryptomining Protection
   name.Assign(UrlClassifierFeatureCryptominingProtection::Name());
   if (!name.IsEmpty()) {
     aArray.AppendElement(name);
   }
 
-  // Fingerprinting Annotation
-  name.Assign(UrlClassifierFeatureFingerprintingAnnotation::Name());
-  if (!name.IsEmpty()) {
-    aArray.AppendElement(name);
-  }
-
   // Fingerprinting Protection
   name.Assign(UrlClassifierFeatureFingerprintingProtection::Name());
   if (!name.IsEmpty()) {
     aArray.AppendElement(name);
   }
 
   // Tracking Protection
   name.Assign(UrlClassifierFeatureTrackingProtection::Name());
deleted file mode 100644
--- a/netwerk/url-classifier/UrlClassifierFeatureFingerprintingAnnotation.cpp
+++ /dev/null
@@ -1,160 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "UrlClassifierFeatureFingerprintingAnnotation.h"
-
-#include "mozilla/AntiTrackingCommon.h"
-#include "mozilla/net/UrlClassifierCommon.h"
-#include "mozilla/StaticPrefs.h"
-#include "nsContentUtils.h"
-#include "nsNetUtil.h"
-
-namespace mozilla {
-namespace net {
-
-namespace {
-
-#define FINGERPRINTING_ANNOTATION_FEATURE_NAME "fingerprinting-annotation"
-
-#define URLCLASSIFIER_FINGERPRINTING_ANNOTATION_BLACKLIST \
-  "urlclassifier.features.fingerprinting.annotate.blacklistTables"
-#define URLCLASSIFIER_FINGERPRINTING_ANNOTATION_BLACKLIST_TEST_ENTRIES \
-  "urlclassifier.features.fingerprinting.annotate.blacklistHosts"
-#define URLCLASSIFIER_FINGERPRINTING_ANNOTATION_WHITELIST \
-  "urlclassifier.features.fingerprinting.annotate.whitelistTables"
-#define URLCLASSIFIER_FINGERPRINTING_ANNOTATION_WHITELIST_TEST_ENTRIES \
-  "urlclassifier.features.fingerprinting.annotate.whitelistHosts"
-#define TABLE_FINGERPRINTING_ANNOTATION_BLACKLIST_PREF \
-  "fingerprinting-annotate-blacklist-pref"
-#define TABLE_FINGERPRINTING_ANNOTATION_WHITELIST_PREF \
-  "fingerprinting-annotate-whitelist-pref"
-
-StaticRefPtr<UrlClassifierFeatureFingerprintingAnnotation>
-    gFeatureFingerprintingAnnotation;
-
-}  // namespace
-
-UrlClassifierFeatureFingerprintingAnnotation::
-    UrlClassifierFeatureFingerprintingAnnotation()
-    : UrlClassifierFeatureBase(
-          NS_LITERAL_CSTRING(FINGERPRINTING_ANNOTATION_FEATURE_NAME),
-          NS_LITERAL_CSTRING(URLCLASSIFIER_FINGERPRINTING_ANNOTATION_BLACKLIST),
-          NS_LITERAL_CSTRING(URLCLASSIFIER_FINGERPRINTING_ANNOTATION_WHITELIST),
-          NS_LITERAL_CSTRING(
-              URLCLASSIFIER_FINGERPRINTING_ANNOTATION_BLACKLIST_TEST_ENTRIES),
-          NS_LITERAL_CSTRING(
-              URLCLASSIFIER_FINGERPRINTING_ANNOTATION_WHITELIST_TEST_ENTRIES),
-          NS_LITERAL_CSTRING(TABLE_FINGERPRINTING_ANNOTATION_BLACKLIST_PREF),
-          NS_LITERAL_CSTRING(TABLE_FINGERPRINTING_ANNOTATION_WHITELIST_PREF),
-          EmptyCString()) {}
-
-/* static */ const char* UrlClassifierFeatureFingerprintingAnnotation::Name() {
-  return FINGERPRINTING_ANNOTATION_FEATURE_NAME;
-}
-
-/* static */
-void UrlClassifierFeatureFingerprintingAnnotation::MaybeInitialize() {
-  UC_LOG(("UrlClassifierFeatureFingerprintingAnnotation: MaybeInitialize"));
-
-  if (!gFeatureFingerprintingAnnotation) {
-    gFeatureFingerprintingAnnotation =
-        new UrlClassifierFeatureFingerprintingAnnotation();
-    gFeatureFingerprintingAnnotation->InitializePreferences();
-  }
-}
-
-/* static */
-void UrlClassifierFeatureFingerprintingAnnotation::MaybeShutdown() {
-  UC_LOG(("UrlClassifierFeatureFingerprintingAnnotation: MaybeShutdown"));
-
-  if (gFeatureFingerprintingAnnotation) {
-    gFeatureFingerprintingAnnotation->ShutdownPreferences();
-    gFeatureFingerprintingAnnotation = nullptr;
-  }
-}
-
-/* static */
-already_AddRefed<UrlClassifierFeatureFingerprintingAnnotation>
-UrlClassifierFeatureFingerprintingAnnotation::MaybeCreate(
-    nsIChannel* aChannel) {
-  MOZ_ASSERT(aChannel);
-
-  UC_LOG(
-      ("UrlClassifierFeatureFingerprintingAnnotation: MaybeCreate for channel "
-       "%p",
-       aChannel));
-
-  if (!StaticPrefs::
-          privacy_trackingprotection_fingerprinting_annotate_enabled()) {
-    return nullptr;
-  }
-
-  if (!UrlClassifierCommon::ShouldEnableClassifier(aChannel)) {
-    return nullptr;
-  }
-
-  MaybeInitialize();
-  MOZ_ASSERT(gFeatureFingerprintingAnnotation);
-
-  RefPtr<UrlClassifierFeatureFingerprintingAnnotation> self =
-      gFeatureFingerprintingAnnotation;
-  return self.forget();
-}
-
-/* static */
-already_AddRefed<nsIUrlClassifierFeature>
-UrlClassifierFeatureFingerprintingAnnotation::GetIfNameMatches(
-    const nsACString& aName) {
-  if (!aName.EqualsLiteral(FINGERPRINTING_ANNOTATION_FEATURE_NAME)) {
-    return nullptr;
-  }
-
-  MaybeInitialize();
-  MOZ_ASSERT(gFeatureFingerprintingAnnotation);
-
-  RefPtr<UrlClassifierFeatureFingerprintingAnnotation> self =
-      gFeatureFingerprintingAnnotation;
-  return self.forget();
-}
-
-NS_IMETHODIMP
-UrlClassifierFeatureFingerprintingAnnotation::ProcessChannel(
-    nsIChannel* aChannel, const nsACString& aList, bool* aShouldContinue) {
-  NS_ENSURE_ARG_POINTER(aChannel);
-  NS_ENSURE_ARG_POINTER(aShouldContinue);
-
-  // This is not a blocking feature.
-  *aShouldContinue = true;
-
-  UC_LOG(
-      ("UrlClassifierFeatureFingerprintingAnnotation::ProcessChannel, "
-       "annotating channel[%p]",
-       aChannel));
-
-  UrlClassifierCommon::AnnotateChannel(
-      aChannel, AntiTrackingCommon::eFingerprinting,
-      nsIHttpChannel::ClassificationFlags::CLASSIFIED_FINGERPRINTING,
-      nsIWebProgressListener::STATE_LOADED_FINGERPRINTING_CONTENT);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-UrlClassifierFeatureFingerprintingAnnotation::GetURIByListType(
-    nsIChannel* aChannel, nsIUrlClassifierFeature::listType aListType,
-    nsIURI** aURI) {
-  NS_ENSURE_ARG_POINTER(aChannel);
-  NS_ENSURE_ARG_POINTER(aURI);
-
-  if (aListType == nsIUrlClassifierFeature::blacklist) {
-    return aChannel->GetURI(aURI);
-  }
-
-  MOZ_ASSERT(aListType == nsIUrlClassifierFeature::whitelist);
-  return UrlClassifierCommon::CreatePairwiseWhiteListURI(aChannel, aURI);
-}
-
-}  // namespace net
-}  // namespace mozilla
deleted file mode 100644
--- a/netwerk/url-classifier/UrlClassifierFeatureFingerprintingAnnotation.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_net_UrlClassifierFeatureFingerprintingAnnotation_h
-#define mozilla_net_UrlClassifierFeatureFingerprintingAnnotation_h
-
-#include "UrlClassifierFeatureBase.h"
-
-class nsIChannel;
-
-namespace mozilla {
-namespace net {
-
-class UrlClassifierFeatureFingerprintingAnnotation final
-    : public UrlClassifierFeatureBase {
- public:
-  static const char* Name();
-
-  static void MaybeShutdown();
-
-  static already_AddRefed<UrlClassifierFeatureFingerprintingAnnotation>
-  MaybeCreate(nsIChannel* aChannel);
-
-  static already_AddRefed<nsIUrlClassifierFeature> GetIfNameMatches(
-      const nsACString& aName);
-
-  NS_IMETHOD ProcessChannel(nsIChannel* aChannel, const nsACString& aList,
-                            bool* aShouldContinue) override;
-
-  NS_IMETHOD GetURIByListType(nsIChannel* aChannel,
-                              nsIUrlClassifierFeature::listType aListType,
-                              nsIURI** aURI) override;
-
- private:
-  UrlClassifierFeatureFingerprintingAnnotation();
-
-  static void MaybeInitialize();
-};
-
-}  // namespace net
-}  // namespace mozilla
-
-#endif  // mozilla_net_UrlClassifierFeatureFingerprintingAnnotation_h
--- a/netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.cpp
@@ -12,17 +12,17 @@
 #include "nsContentUtils.h"
 #include "nsNetUtil.h"
 
 namespace mozilla {
 namespace net {
 
 namespace {
 
-#define FINGERPRINTING_FEATURE_NAME "fingerprinting-protection"
+#define FINGERPRINTING_FEATURE_NAME "fingerprinting"
 
 #define URLCLASSIFIER_FINGERPRINTING_BLACKLIST \
   "urlclassifier.features.fingerprinting.blacklistTables"
 #define URLCLASSIFIER_FINGERPRINTING_BLACKLIST_TEST_ENTRIES \
   "urlclassifier.features.fingerprinting.blacklistHosts"
 #define URLCLASSIFIER_FINGERPRINTING_WHITELIST \
   "urlclassifier.features.fingerprinting.whitelistTables"
 #define URLCLASSIFIER_FINGERPRINTING_WHITELIST_TEST_ENTRIES \
@@ -142,41 +142,48 @@ UrlClassifierFeatureFingerprintingProtec
 }
 
 NS_IMETHODIMP
 UrlClassifierFeatureFingerprintingProtection::ProcessChannel(
     nsIChannel* aChannel, const nsACString& aList, bool* aShouldContinue) {
   NS_ENSURE_ARG_POINTER(aChannel);
   NS_ENSURE_ARG_POINTER(aShouldContinue);
 
-  bool isAllowListed = UrlClassifierCommon::IsAllowListed(
-      aChannel, AntiTrackingCommon::eFingerprinting);
+  bool isAllowListed =
+      IsAllowListed(aChannel, AntiTrackingCommon::eFingerprinting);
 
   // This is a blocking feature.
   *aShouldContinue = isAllowListed;
 
   if (isAllowListed) {
-    return NS_OK;
-  }
-
-  UrlClassifierCommon::SetBlockedContent(aChannel, NS_ERROR_FINGERPRINTING_URI,
-                                         aList, EmptyCString(), EmptyCString());
+    // Even with fingerprinting blocking disabled, we still want to show the
+    // user that there are unblocked trackers on the site, so notify the UI that
+    // we loaded tracking content.  UI code can treat this notification
+    // differently depending on whether fingerprinting blocking is enabled or
+    // not.
+    UrlClassifierCommon::NotifyChannelClassifierProtectionDisabled(
+        aChannel, nsIWebProgressListener::STATE_LOADED_FINGERPRINTING_CONTENT);
+  } else {
+    UrlClassifierCommon::SetBlockedContent(aChannel,
+                                           NS_ERROR_FINGERPRINTING_URI, aList,
+                                           EmptyCString(), EmptyCString());
 
-  UC_LOG(
-      ("UrlClassifierFeatureFingerprintingProtection::ProcessChannel, "
-       "cancelling "
-       "channel[%p]",
-       aChannel));
-  nsCOMPtr<nsIHttpChannelInternal> httpChannel = do_QueryInterface(aChannel);
+    UC_LOG(
+        ("UrlClassifierFeatureFingerprintingProtection::ProcessChannel, "
+         "cancelling "
+         "channel[%p]",
+         aChannel));
+    nsCOMPtr<nsIHttpChannelInternal> httpChannel = do_QueryInterface(aChannel);
 
-  if (httpChannel) {
-    Unused << httpChannel->CancelByChannelClassifier(
-        NS_ERROR_FINGERPRINTING_URI);
-  } else {
-    Unused << aChannel->Cancel(NS_ERROR_FINGERPRINTING_URI);
+    if (httpChannel) {
+      Unused << httpChannel->CancelByChannelClassifier(
+          NS_ERROR_FINGERPRINTING_URI);
+    } else {
+      Unused << aChannel->Cancel(NS_ERROR_FINGERPRINTING_URI);
+    }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 UrlClassifierFeatureFingerprintingProtection::GetURIByListType(
     nsIChannel* aChannel, nsIUrlClassifierFeature::listType aListType,
--- a/netwerk/url-classifier/UrlClassifierFeatureTrackingAnnotation.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureTrackingAnnotation.cpp
@@ -3,20 +3,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "UrlClassifierFeatureTrackingAnnotation.h"
 
 #include "mozilla/AntiTrackingCommon.h"
 #include "mozilla/Logging.h"
+#include "mozilla/net/HttpBaseChannel.h"
 #include "mozilla/StaticPrefs.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/net/UrlClassifierCommon.h"
 #include "nsContentUtils.h"
+#include "nsQueryObject.h"
+#include "TrackingDummyChannel.h"
 
 namespace mozilla {
 namespace net {
 
 namespace {
 
 #define TRACKING_ANNOTATION_FEATURE_NAME "tracking-annotation"
 
@@ -30,16 +33,84 @@ namespace {
   "urlclassifier.trackingAnnotationWhitelistTable.testEntries"
 #define URLCLASSIFIER_TRACKING_ANNOTATION_SKIP_URLS \
   "urlclassifier.trackingAnnotationSkipURLs"
 #define TABLE_ANNOTATION_BLACKLIST_PREF "annotation-blacklist-pref"
 #define TABLE_ANNOTATION_WHITELIST_PREF "annotation-whitelist-pref"
 
 StaticRefPtr<UrlClassifierFeatureTrackingAnnotation> gFeatureTrackingAnnotation;
 
+static void SetIsTrackingResourceHelper(nsIChannel* aChannel,
+                                        bool aIsThirdParty) {
+  MOZ_ASSERT(aChannel);
+
+  nsCOMPtr<nsIParentChannel> parentChannel;
+  NS_QueryNotificationCallbacks(aChannel, parentChannel);
+  if (parentChannel) {
+    // This channel is a parent-process proxy for a child process
+    // request. We should notify the child process as well.
+    parentChannel->NotifyTrackingResource(aIsThirdParty);
+  }
+
+  RefPtr<HttpBaseChannel> httpChannel = do_QueryObject(aChannel);
+  if (httpChannel) {
+    httpChannel->SetIsTrackingResource(aIsThirdParty);
+  }
+
+  RefPtr<TrackingDummyChannel> dummyChannel = do_QueryObject(aChannel);
+  if (dummyChannel) {
+    dummyChannel->SetIsTrackingResource();
+  }
+}
+
+static void LowerPriorityHelper(nsIChannel* aChannel) {
+  MOZ_ASSERT(aChannel);
+
+  bool isBlockingResource = false;
+
+  nsCOMPtr<nsIClassOfService> cos(do_QueryInterface(aChannel));
+  if (cos) {
+    if (nsContentUtils::IsTailingEnabled()) {
+      uint32_t cosFlags = 0;
+      cos->GetClassFlags(&cosFlags);
+      isBlockingResource =
+          cosFlags & (nsIClassOfService::UrgentStart |
+                      nsIClassOfService::Leader | nsIClassOfService::Unblocked);
+
+      // Requests not allowed to be tailed are usually those with higher
+      // prioritization.  That overweights being a tracker: don't throttle
+      // them when not in background.
+      if (!(cosFlags & nsIClassOfService::TailForbidden)) {
+        cos->AddClassFlags(nsIClassOfService::Throttleable);
+      }
+    } else {
+      // Yes, we even don't want to evaluate the isBlockingResource when tailing
+      // is off see bug 1395525.
+
+      cos->AddClassFlags(nsIClassOfService::Throttleable);
+    }
+  }
+
+  if (!isBlockingResource) {
+    nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(aChannel);
+    if (p) {
+      if (UC_LOG_ENABLED()) {
+        nsCOMPtr<nsIURI> uri;
+        aChannel->GetURI(getter_AddRefs(uri));
+        nsAutoCString spec;
+        uri->GetAsciiSpec(spec);
+        spec.Truncate(
+            std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
+        UC_LOG(("Setting PRIORITY_LOWEST for channel[%p] (%s)", aChannel,
+                spec.get()));
+      }
+      p->SetPriority(nsISupportsPriority::PRIORITY_LOWEST);
+    }
+  }
+}
 
 }  // namespace
 
 UrlClassifierFeatureTrackingAnnotation::UrlClassifierFeatureTrackingAnnotation()
     : UrlClassifierFeatureBase(
           NS_LITERAL_CSTRING(TRACKING_ANNOTATION_FEATURE_NAME),
           NS_LITERAL_CSTRING(URLCLASSIFIER_ANNOTATION_BLACKLIST),
           NS_LITERAL_CSTRING(URLCLASSIFIER_ANNOTATION_WHITELIST),
@@ -119,20 +190,52 @@ UrlClassifierFeatureTrackingAnnotation::
                                                        const nsACString& aList,
                                                        bool* aShouldContinue) {
   NS_ENSURE_ARG_POINTER(aChannel);
   NS_ENSURE_ARG_POINTER(aShouldContinue);
 
   // This is not a blocking feature.
   *aShouldContinue = true;
 
-  UrlClassifierCommon::AnnotateChannel(
-      aChannel, AntiTrackingCommon::eTrackingAnnotations,
-      nsIHttpChannel::ClassificationFlags::CLASSIFIED_TRACKING,
-      nsIWebProgressListener::STATE_LOADED_TRACKING_CONTENT);
+  nsCOMPtr<nsIURI> chanURI;
+  nsresult rv = aChannel->GetURI(getter_AddRefs(chanURI));
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    UC_LOG(
+        ("UrlClassifierFeatureTrackingAnnotation::ProcessChannel "
+         "nsIChannel::GetURI(%p) failed",
+         (void*)aChannel));
+    return NS_OK;
+  }
+
+  bool isThirdPartyWithTopLevelWinURI =
+      nsContentUtils::IsThirdPartyWindowOrChannel(nullptr, aChannel, chanURI);
+
+  bool isAllowListed =
+      IsAllowListed(aChannel, AntiTrackingCommon::eTrackingAnnotations);
+
+  UC_LOG(
+      ("UrlClassifierFeatureTrackingAnnotation::ProcessChannel, annotating "
+       "channel[%p]",
+       aChannel));
+
+  SetIsTrackingResourceHelper(aChannel, isThirdPartyWithTopLevelWinURI);
+
+  if (isThirdPartyWithTopLevelWinURI || isAllowListed) {
+    // Even with TP disabled, we still want to show the user that there
+    // are unblocked trackers on the site, so notify the UI that we loaded
+    // tracking content. UI code can treat this notification differently
+    // depending on whether TP is enabled or disabled.
+    UrlClassifierCommon::NotifyChannelClassifierProtectionDisabled(
+        aChannel, nsIWebProgressListener::STATE_LOADED_TRACKING_CONTENT);
+  }
+
+  if (isThirdPartyWithTopLevelWinURI &&
+      StaticPrefs::privacy_trackingprotection_lower_network_priority()) {
+    LowerPriorityHelper(aChannel);
+  }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 UrlClassifierFeatureTrackingAnnotation::GetURIByListType(
     nsIChannel* aChannel, nsIUrlClassifierFeature::listType aListType,
     nsIURI** aURI) {
--- a/netwerk/url-classifier/UrlClassifierFeatureTrackingProtection.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureTrackingProtection.cpp
@@ -134,18 +134,18 @@ UrlClassifierFeatureTrackingProtection::
 
 NS_IMETHODIMP
 UrlClassifierFeatureTrackingProtection::ProcessChannel(nsIChannel* aChannel,
                                                        const nsACString& aList,
                                                        bool* aShouldContinue) {
   NS_ENSURE_ARG_POINTER(aChannel);
   NS_ENSURE_ARG_POINTER(aShouldContinue);
 
-  bool isAllowListed = UrlClassifierCommon::IsAllowListed(
-      aChannel, AntiTrackingCommon::eTrackingProtection);
+  bool isAllowListed =
+      IsAllowListed(aChannel, AntiTrackingCommon::eTrackingProtection);
 
   // This is a blocking feature.
   *aShouldContinue = isAllowListed;
 
   if (!isAllowListed) {
     UrlClassifierCommon::SetBlockedContent(
         aChannel, NS_ERROR_TRACKING_URI, aList, EmptyCString(), EmptyCString());
 
--- a/netwerk/url-classifier/moz.build
+++ b/netwerk/url-classifier/moz.build
@@ -26,21 +26,19 @@ XPCOM_MANIFESTS += [
 DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
 DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True
 
 UNIFIED_SOURCES += [
     'AsyncUrlChannelClassifier.cpp',
     'nsChannelClassifier.cpp',
     'UrlClassifierCommon.cpp',
     'UrlClassifierFeatureBase.cpp',
-    'UrlClassifierFeatureCryptominingAnnotation.cpp',
     'UrlClassifierFeatureCryptominingProtection.cpp',
     'UrlClassifierFeatureCustomTables.cpp',
     'UrlClassifierFeatureFactory.cpp',
-    'UrlClassifierFeatureFingerprintingAnnotation.cpp',
     'UrlClassifierFeatureFingerprintingProtection.cpp',
     'UrlClassifierFeatureFlash.cpp',
     'UrlClassifierFeatureLoginReputation.cpp',
     'UrlClassifierFeaturePhishingProtection.cpp',
     'UrlClassifierFeatureResult.cpp',
     'UrlClassifierFeatureTrackingAnnotation.cpp',
     'UrlClassifierFeatureTrackingProtection.cpp',
 ]
--- a/toolkit/components/url-classifier/SafeBrowsing.jsm
+++ b/toolkit/components/url-classifier/SafeBrowsing.jsm
@@ -110,46 +110,27 @@ const FEATURES = [
            "urlclassifier.flashSubDocExceptTable"],
     enabled() {
       return Services.prefs.getBoolPref("plugins.flashBlock.enabled");
     },
     update() {
       return Services.prefs.getBoolPref("browser.safebrowsing.features.flashBlock.update", this.enabled());
     },
   },
-  { name: "fingerprinting-annotation",
-    list: ["urlclassifier.features.fingerprinting.annotate.blacklistTables",
-           "urlclassifier.features.fingerprinting.annotate.whitelistTables"],
-    enabled() {
-      return Services.prefs.getBoolPref("privacy.trackingprotection.fingerprinting.annotate.enabled", false);
-    },
-    update() {
-      return Services.prefs.getBoolPref("browser.safebrowsing.features.fingerprinting.annotate.update", this.enabled());
-    },
-  },
-  { name: "fingerprinting-protection",
+  { name: "fingerprinting",
     list: ["urlclassifier.features.fingerprinting.blacklistTables",
            "urlclassifier.features.fingerprinting.whitelistTables"],
     enabled() {
       return Services.prefs.getBoolPref("privacy.trackingprotection.fingerprinting.enabled", false);
     },
     update() {
       return Services.prefs.getBoolPref("browser.safebrowsing.features.fingerprinting.update", this.enabled());
     },
   },
-  { name: "cryptomining-annotation",
-    list: ["urlclassifier.features.cryptomining.annotate.blacklistTables",
-           "urlclassifier.features.cryptomining.annotate.whitelistTables"],
-    enabled() {
-      return Services.prefs.getBoolPref("privacy.trackingprotection.annotate.cryptomining.enabled", false);
-    },
-    update() {
-      return Services.prefs.getBoolPref("browser.safebrowsing.features.cryptomining.annotate.update", this.enabled());
-    },
-  { name: "cryptomining-protection",
+  { name: "cryptomining",
     list: ["urlclassifier.features.cryptomining.blacklistTables",
            "urlclassifier.features.cryptomining.whitelistTables"],
     enabled() {
       return Services.prefs.getBoolPref("privacy.trackingprotection.cryptomining.enabled", false);
     },
     update() {
       return Services.prefs.getBoolPref("browser.safebrowsing.features.cryptomining.update", this.enabled());
     },
deleted file mode 100644
--- a/toolkit/components/url-classifier/tests/mochitest/features.js
+++ /dev/null
@@ -1,156 +0,0 @@
-var tests = [
-  // Config is an array with 4 elements:
-  // - annotation blacklist
-  // - annotation whitelist
-  // - tracking blacklist
-  // - tracking whitelist
-
-  // All disabled.
-  { config: [ false, false, false, false ], loadExpected: true,  annotationExpected: false },
-
-  // Just whitelisted.
-  { config: [ false, false, false, true  ], loadExpected: true,  annotationExpected: false },
-
-  // Just blacklisted.
-  { config: [ false, false, true,  false ], loadExpected: false, annotationExpected: false },
-
-  // whitelist + blacklist => whitelist wins
-  { config: [ false, false, true,  true  ], loadExpected: true,  annotationExpected: false },
-
-  // just annotated in whitelist.
-  { config: [ false, true,  false, false ], loadExpected: true,  annotationExpected: false },
-
-  // TP and annotation whitelisted.
-  { config: [ false, true,  false, true  ], loadExpected: true,  annotationExpected: false },
-
-  // Annotation whitelisted, but TP blacklisted.
-  { config: [ false, true,  true,  false ], loadExpected: false, annotationExpected: false },
-
-  // Annotation whitelisted. TP blacklisted and whitelisted: whitelist wins.
-  { config: [ false, true,  true,  true  ], loadExpected: true,  annotationExpected: false },
-
-  // Just blacklist annotated.
-  { config: [ true,  false, false, false ], loadExpected: true,  annotationExpected: true },
-
-  // annotated but TP whitelisted.
-  { config: [ true,  false, false, true  ], loadExpected: true,  annotationExpected: true },
-
-  // annotated and blacklisted.
-  { config: [ true,  false, true,  false ], loadExpected: false, annotationExpected: false },
-
-  // annotated, TP blacklisted and whitelisted: whitelist wins.
-  { config: [ true,  false, true,  true  ], loadExpected: true,  annotationExpected: true },
-
-  // annotated in white and blacklist.
-  { config: [ true,  true,  false, false ], loadExpected: true,  annotationExpected: false },
-
-  // annotated in white and blacklist. TP Whiteslited
-  { config: [ true,  true,  false, true  ], loadExpected: true,  annotationExpected: false },
-
-  // everywhere. TP whitelist wins.
-  { config: [ true,  true,  true,  true  ], loadExpected: true,  annotationExpected: false },
-];
-
-function prefBlacklistValue(value) {
-  return value ? "example.com" : "";
-}
-
-function prefWhitelistValue(value) {
-  return value ? "mochi.test" : "";
-}
-
-async function runTest(test, expectedFlag, expectedTrackingResource, prefs) {
-  let config = [
-    [ "urlclassifier.trackingAnnotationTable.testEntries", prefBlacklistValue(test.config[0]) ],
-    [ "urlclassifier.features.fingerprinting.annotate.blacklistHosts", prefBlacklistValue(test.config[0]) ],
-    [ "urlclassifier.features.cryptomining.annotate.blacklistHosts", prefBlacklistValue(test.config[0]) ],
-
-    [ "urlclassifier.trackingAnnotationWhitelistTable.testEntries", prefWhitelistValue(test.config[1]) ],
-    [ "urlclassifier.features.fingerprinting.annotate.whitelistHosts", prefWhitelistValue(test.config[1]) ],
-    [ "urlclassifier.features.cryptomining.annotate.whitelistHosts", prefWhitelistValue(test.config[1]) ],
-
-    [ "urlclassifier.trackingTable.testEntries", prefBlacklistValue(test.config[2]) ],
-    [ "urlclassifier.features.fingerprinting.blacklistHosts", prefBlacklistValue(test.config[2]) ],
-    [ "urlclassifier.features.cryptomining.blacklistHosts", prefBlacklistValue(test.config[2]) ],
-
-    [ "urlclassifier.trackingWhitelistTable.testEntries", prefWhitelistValue(test.config[3]) ],
-    [ "urlclassifier.features.fingerprinting.whitelistHosts", prefWhitelistValue(test.config[3]) ],
-    [ "urlclassifier.features.cryptomining.whitelistHosts", prefWhitelistValue(test.config[3]) ],
-  ];
-
-  info("Testing: " + config.toSource() + "\n");
-
-  await SpecialPowers.pushPrefEnv({set: config.concat(prefs) });
-
-  // This promise will be resolved when the chromeScript knows if the channel
-  // is annotated or not.
-  let annotationPromise;
-  if (test.loadExpected) {
-    info("We want to have annotation information");
-    annotationPromise = new Promise(resolve => {
-      chromeScript.addMessageListener("last-channel-flags",
-                                      data => resolve(data),
-                                      {once: true});
-    });
-  }
-
-  // Let's load an image with a random query string, just to avoid network cache.
-  let result = await new Promise(resolve => {
-    let image = new Image();
-    image.src = "http://example.com/tests/toolkit/components/url-classifier/tests/mochitest/raptor.jpg?" + Math.random();
-    image.onload = _ => resolve(true);
-    image.onerror = _ => resolve(false);
-  });
-
-  is(result, test.loadExpected, "The loading happened correctly");
-
-  if (annotationPromise) {
-    let data = await annotationPromise;
-    is(!!data.classificationFlags, test.annotationExpected, "The annotation happened correctly");
-    if (test.annotationExpected) {
-      is(data.classificationFlags, expectedFlag, "Correct flag");
-      is(data.isTrackingResource, expectedTrackingResource, "Tracking resource flag matches");
-    }
-  }
-}
-
-var chromeScript;
-
-function runTests(flag, prefs, trackingResource) {
-  chromeScript = SpecialPowers.loadChromeScript(_ => {
-    const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-    function onExamResp(subject, topic, data) {
-      let channel = subject.QueryInterface(Ci.nsIHttpChannel);
-      if (!channel ||
-          !channel.URI.spec.startsWith("http://example.com/tests/toolkit/components/url-classifier/tests/mochitest/raptor.jpg")) {
-        return;
-      }
-
-      // eslint-disable-next-line no-undef
-      sendAsyncMessage("last-channel-flags", {
-        classificationFlags: channel.classificationFlags,
-        isTrackingResource: channel.isTrackingResource,
-      });
-    }
-
-    // eslint-disable-next-line no-undef
-    addMessageListener("done", __ => {
-      Services.obs.removeObserver(onExamResp, "http-on-examine-response");
-    });
-
-    Services.obs.addObserver(onExamResp, "http-on-examine-response");
-
-    // eslint-disable-next-line no-undef
-    sendAsyncMessage("start-test");
-  });
-
-  chromeScript.addMessageListener("start-test", async _ => {
-    for (let test in tests) {
-      await runTest(tests[test], flag, trackingResource, prefs);
-    }
-
-    chromeScript.sendAsyncMessage("done");
-    SimpleTest.finish();
-  }, {once: true});
-}
--- a/toolkit/components/url-classifier/tests/mochitest/mochitest.ini
+++ b/toolkit/components/url-classifier/tests/mochitest/mochitest.ini
@@ -27,26 +27,23 @@ support-files =
   dnt.sjs
   update.sjs
   bad.css
   bad.css^headers^
   gethash.sjs
   gethashFrame.html
   seek.webm
   cache.sjs
-  features.js
 
 [test_classifier.html]
 skip-if = (os == 'linux' && debug) #Bug 1199778
 [test_classifier_match.html]
 [test_classifier_worker.html]
 [test_classify_ping.html]
 skip-if = (verify && debug && (os == 'win' || os == 'mac'))
 [test_classify_track.html]
 [test_gethash.html]
 [test_bug1254766.html]
 [test_cachemiss.html]
 skip-if = verify
 [test_annotation_vs_TP.html]
 [test_fingerprinting.html]
-[test_fingerprinting_annotate.html]
 [test_cryptomining.html]
-[test_cryptomining_annotate.html]
--- a/toolkit/components/url-classifier/tests/mochitest/test_annotation_vs_TP.html
+++ b/toolkit/components/url-classifier/tests/mochitest/test_annotation_vs_TP.html
@@ -1,27 +1,154 @@
 <!DOCTYPE HTML>
 <html>
 <head>
   <title>Test the relationship between annotation vs TP</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="text/javascript" src="features.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 
 <body>
 <script class="testbody" type="text/javascript">
 
-runTests(SpecialPowers.Ci.nsIHttpChannel.CLASSIFIED_TRACKING,
-         [
-           ["privacy.trackingprotection.enabled", true],
-           ["privacy.trackingprotection.annotate_channels", true],
-           ["privacy.trackingprotection.fingerprinting.annotate.enabled", false],
-           ["privacy.trackingprotection.fingerprinting.enabled", false],
-           ["privacy.trackingprotection.cryptomining.annotate.enabled", false],
-           ["privacy.trackingprotection.cryptomining.enabled", false],
-         ],
-         true /* a tracking resource */);
+var tests = [
+  // Config is an array with 4 elements:
+  // - annotation blacklist
+  // - annotation whitelist
+  // - tracking blacklist
+  // - tracking whitelist
+
+  // All disabled.
+  { config: [ false, false, false, false ], loadExpected: true,  annotationExpected: false },
+
+  // Just whitelisted.
+  { config: [ false, false, false, true  ], loadExpected: true,  annotationExpected: false },
+
+  // Just blacklisted.
+  { config: [ false, false, true,  false ], loadExpected: false, annotationExpected: false },
+
+  // whitelist + blacklist => whitelist wins
+  { config: [ false, false, true,  true  ], loadExpected: true,  annotationExpected: false },
+
+  // just annotated in whitelist.
+  { config: [ false, true,  false, false ], loadExpected: true,  annotationExpected: false },
+
+  // TP and annotation whitelisted.
+  { config: [ false, true,  false, true  ], loadExpected: true,  annotationExpected: false },
+
+  // Annotation whitelisted, but TP blacklisted.
+  { config: [ false, true,  true,  false ], loadExpected: false, annotationExpected: false },
+
+  // Annotation whitelisted. TP blacklisted and whitelisted: whitelist wins.
+  { config: [ false, true,  true,  true  ], loadExpected: true,  annotationExpected: false },
+
+  // Just blacklist annotated.
+  { config: [ true,  false, false, false ], loadExpected: true,  annotationExpected: true },
+
+  // annotated but TP whitelisted.
+  { config: [ true,  false, false, true  ], loadExpected: true,  annotationExpected: true },
+
+  // annotated and blacklisted.
+  { config: [ true,  false, true,  false ], loadExpected: false, annotationExpected: false },
+
+  // annotated, TP blacklisted and whitelisted: whitelist wins.
+  { config: [ true,  false, true,  true  ], loadExpected: true,  annotationExpected: true },
+
+  // annotated in white and blacklist.
+  { config: [ true,  true,  false, false ], loadExpected: true,  annotationExpected: false },
+
+  // annotated in white and blacklist. TP Whiteslited
+  { config: [ true,  true,  false, true  ], loadExpected: true,  annotationExpected: false },
+
+  // everywhere. TP whitelist wins.
+  { config: [ true,  true,  true,  true  ], loadExpected: true,  annotationExpected: false },
+];
+
+function prefBlacklistValue(value) {
+  return value ? "example.com" : "";
+}
+
+function prefWhitelistValue(value) {
+  return value ? "mochi.test" : "";
+}
+
+async function runTest(test) {
+  let config = [
+    [ "urlclassifier.trackingAnnotationTable.testEntries", prefBlacklistValue(test.config[0]) ],
+    [ "urlclassifier.trackingAnnotationWhitelistTable.testEntries", prefWhitelistValue(test.config[1]) ],
+    [ "urlclassifier.trackingTable.testEntries", prefBlacklistValue(test.config[2]) ],
+    [ "urlclassifier.trackingWhitelistTable.testEntries", prefWhitelistValue(test.config[3]) ],
+  ];
+
+  info("Testing: " + config.toSource() + "\n");
+
+  // Let's enable TP and annotation.
+  config.push(["privacy.trackingprotection.enabled", true]);
+  config.push(["privacy.trackingprotection.annotate_channels", true]);
+
+  await SpecialPowers.pushPrefEnv({set: config });
+
+  // This promise will be resolved when the chromeScript knows if the channel
+  // is annotated or not.
+  let annotationPromise;
+  if (test.loadExpected) {
+    info("We want to have annotation information");
+    annotationPromise = new Promise(resolve => {
+      chromeScript.addMessageListener("last-channel-status",
+                                      annotated => resolve(annotated),
+                                      {once: true});
+    });
+  }
+
+  // Let's load an image with a random query string, just to avoid network cache.
+  let result = await new Promise(resolve => {
+    let image = new Image();
+    image.src = "http://example.com/tests/toolkit/components/url-classifier/tests/mochitest/raptor.jpg?" + Math.random();
+    image.onload = _ => resolve(true);
+    image.onerror = _ => resolve(false);
+  });
+
+  is(result, test.loadExpected, "The loading happened correctly");
+
+  if (annotationPromise) {
+    is(await annotationPromise, test.annotationExpected, "The annotation happened correctly");
+  }
+}
+
+var chromeScript = SpecialPowers.loadChromeScript(_ => {
+  const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+
+  function onExamResp(subject, topic, data) {
+    let channel = subject.QueryInterface(Ci.nsIHttpChannel);
+    if (!channel ||
+        !channel.URI.spec.startsWith("http://example.com/tests/toolkit/components/url-classifier/tests/mochitest/raptor.jpg")) {
+      return;
+    }
+
+    // eslint-disable-next-line no-undef
+    sendAsyncMessage("last-channel-status", channel.isTrackingResource);
+  }
+
+  // eslint-disable-next-line no-undef
+  addMessageListener("done", __ => {
+    Services.obs.removeObserver(onExamResp, "http-on-examine-response");
+  });
+
+  Services.obs.addObserver(onExamResp, "http-on-examine-response");
+
+  // eslint-disable-next-line no-undef
+  sendAsyncMessage("start-test");
+});
+
+chromeScript.addMessageListener("start-test", async _ => {
+  for (let test in tests) {
+    await runTest(tests[test]);
+  }
+
+  chromeScript.sendAsyncMessage("done");
+  SimpleTest.finish();
+}, {once: true});
+
 SimpleTest.waitForExplicitFinish();
 
 </script>
 </body>
 </html>
deleted file mode 100644
--- a/toolkit/components/url-classifier/tests/mochitest/test_cryptomining_annotate.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test the relationship between annotation vs blocking - cryptomining</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="text/javascript" src="features.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-
-<body>
-<script class="testbody" type="text/javascript">
-
-runTests(SpecialPowers.Ci.nsIHttpChannel.CLASSIFIED_CRYPTOMINING,
-         [
-           ["privacy.trackingprotection.enabled", false],
-           ["privacy.trackingprotection.annotate_channels", false],
-           ["privacy.trackingprotection.fingerprinting.annotate.enabled", false],
-           ["privacy.trackingprotection.fingerprinting.enabled", false],
-           ["privacy.trackingprotection.cryptomining.annotate.enabled", true],
-           ["privacy.trackingprotection.cryptomining.enabled", true],
-         ],
-         false /* a tracking resource */);
-SimpleTest.waitForExplicitFinish();
-
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/toolkit/components/url-classifier/tests/mochitest/test_fingerprinting_annotate.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <title>Test the relationship between annotation vs blocking - fingerprinting</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="text/javascript" src="features.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-
-<body>
-<script class="testbody" type="text/javascript">
-
-runTests(SpecialPowers.Ci.nsIHttpChannel.CLASSIFIED_FINGERPRINTING,
-         [
-           ["privacy.trackingprotection.enabled", false],
-           ["privacy.trackingprotection.annotate_channels", false],
-           ["privacy.trackingprotection.fingerprinting.annotate.enabled", true],
-           ["privacy.trackingprotection.fingerprinting.enabled", true],
-           ["privacy.trackingprotection.cryptomining.annotate.enabled", false],
-           ["privacy.trackingprotection.cryptomining.enabled", false],
-         ],
-         true /* a tracking resource */);
-SimpleTest.waitForExplicitFinish();
-
-</script>
-</body>
-</html>
--- a/uriloader/exthandler/nsExternalProtocolHandler.cpp
+++ b/uriloader/exthandler/nsExternalProtocolHandler.cpp
@@ -400,18 +400,17 @@ NS_IMETHODIMP nsExtProtocolChannel::Noti
 
 NS_IMETHODIMP nsExtProtocolChannel::SetClassifierMatchedInfo(
     const nsACString &aList, const nsACString &aProvider,
     const nsACString &aFullHash) {
   // nothing to do
   return NS_OK;
 }
 
-NS_IMETHODIMP nsExtProtocolChannel::NotifyClassificationFlags(
-    uint32_t aClassificationFlags, bool aIsThirdParty) {
+NS_IMETHODIMP nsExtProtocolChannel::NotifyTrackingResource(bool aIsThirdParty) {
   // nothing to do
   return NS_OK;
 }
 
 NS_IMETHODIMP nsExtProtocolChannel::NotifyFlashPluginStateChanged(
     nsIHttpChannel::FlashPluginState aState) {
   // nothing to do
   return NS_OK;