Bug 1501458 - Remove unused tracking protection code from nsUrlClassifierDBService. r=baku
authorDimi Lee <dlee@mozilla.com>
Thu, 17 Jan 2019 21:24:43 +0000
changeset 511462 33e42b897fb122df45448648f6a1d2e1a62ce083
parent 511461 c28522aaf3918c5f556c65432f8bf14a65bff65a
child 511463 f412108e7d77f62d7eea2461e7e76e007356fa7b
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1501458
milestone66.0a1
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
Bug 1501458 - Remove unused tracking protection code from nsUrlClassifierDBService. r=baku No one is using the aUseTrackingProtection parameter and also tracking protection related preference in Classify API. And we shouldn't use it that way in the future. Differential Revision: https://phabricator.services.mozilla.com/D16798
dom/ipc/ContentChild.cpp
dom/ipc/ContentChild.h
dom/ipc/ContentParent.cpp
dom/ipc/ContentParent.h
dom/ipc/PContent.ipdl
dom/ipc/URLClassifierParent.cpp
dom/ipc/URLClassifierParent.h
netwerk/url-classifier/nsChannelClassifier.cpp
netwerk/url-classifier/nsIURIClassifier.idl
testing/specialpowers/content/specialpowersAPI.js
toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
toolkit/components/url-classifier/nsUrlClassifierDBService.h
toolkit/components/url-classifier/tests/mochitest/test_classifier.html
toolkit/components/url-classifier/tests/mochitest/test_classifier_match.html
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -3190,18 +3190,17 @@ mozilla::ipc::IPCResult ContentChild::Re
     nsAutoCString formattedMessage("IPDL error: \"");
     formattedMessage.AppendASCII(aErrorMsg);
     formattedMessage.AppendLiteral(R"(".)");
     NS_WARNING(formattedMessage.get());
   }
 }
 
 PURLClassifierChild* ContentChild::AllocPURLClassifierChild(
-    const Principal& aPrincipal, const bool& aUseTrackingProtection,
-    bool* aSuccess) {
+    const Principal& aPrincipal, bool* aSuccess) {
   *aSuccess = true;
   return new URLClassifierChild();
 }
 
 bool ContentChild::DeallocPURLClassifierChild(PURLClassifierChild* aActor) {
   MOZ_ASSERT(aActor);
   delete aActor;
   return true;
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -632,18 +632,17 @@ class ContentChild final : public PConte
   // Get a reference to the font list passed from the chrome process,
   // for use during gfx initialization.
   InfallibleTArray<mozilla::dom::SystemFontListEntry>& SystemFontList() {
     return mFontList;
   }
 
   // PURLClassifierChild
   virtual PURLClassifierChild* AllocPURLClassifierChild(
-      const Principal& aPrincipal, const bool& aUseTrackingProtection,
-      bool* aSuccess) override;
+      const Principal& aPrincipal, bool* aSuccess) override;
   virtual bool DeallocPURLClassifierChild(PURLClassifierChild* aActor) override;
 
   // PURLClassifierLocalChild
   virtual PURLClassifierLocalChild* AllocPURLClassifierLocalChild(
       const URIParams& aUri,
       const nsTArray<IPCURLClassifierFeature>& aFeatures) override;
   virtual bool DeallocPURLClassifierLocalChild(
       PURLClassifierLocalChild* aActor) override;
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -5336,39 +5336,37 @@ mozilla::ipc::IPCResult ContentParent::R
                                     aDiscardedData);
   return IPC_OK();
 }
 
 //////////////////////////////////////////////////////////////////
 // PURLClassifierParent
 
 PURLClassifierParent* ContentParent::AllocPURLClassifierParent(
-    const Principal& aPrincipal, const bool& aUseTrackingProtection,
-    bool* aSuccess) {
+    const Principal& aPrincipal, bool* aSuccess) {
   MOZ_ASSERT(NS_IsMainThread());
 
   *aSuccess = true;
   RefPtr<URLClassifierParent> actor = new URLClassifierParent();
   return actor.forget().take();
 }
 
 mozilla::ipc::IPCResult ContentParent::RecvPURLClassifierConstructor(
-    PURLClassifierParent* aActor, const Principal& aPrincipal,
-    const bool& aUseTrackingProtection, bool* aSuccess) {
+    PURLClassifierParent* aActor, const Principal& aPrincipal, bool* aSuccess) {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aActor);
   *aSuccess = false;
 
   auto* actor = static_cast<URLClassifierParent*>(aActor);
   nsCOMPtr<nsIPrincipal> principal(aPrincipal);
   if (!principal) {
     actor->ClassificationFailed();
     return IPC_OK();
   }
-  return actor->StartClassify(principal, aUseTrackingProtection, aSuccess);
+  return actor->StartClassify(principal, aSuccess);
 }
 
 bool ContentParent::DeallocPURLClassifierParent(PURLClassifierParent* aActor) {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aActor);
 
   RefPtr<URLClassifierParent> actor =
       dont_AddRef(static_cast<URLClassifierParent*>(aActor));
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -553,21 +553,20 @@ class ContentParent final : public PCont
   virtual mozilla::ipc::IPCResult RecvA11yHandlerControl(
       const uint32_t& aPid,
       const IHandlerControlHolder& aHandlerControl) override;
 
   virtual int32_t Pid() const override;
 
   // PURLClassifierParent.
   virtual PURLClassifierParent* AllocPURLClassifierParent(
-      const Principal& aPrincipal, const bool& aUseTrackingProtection,
-      bool* aSuccess) override;
+      const Principal& aPrincipal, bool* aSuccess) override;
   virtual mozilla::ipc::IPCResult RecvPURLClassifierConstructor(
       PURLClassifierParent* aActor, const Principal& aPrincipal,
-      const bool& aUseTrackingProtection, bool* aSuccess) override;
+      bool* aSuccess) override;
 
   // PURLClassifierLocalParent.
   virtual PURLClassifierLocalParent* AllocPURLClassifierLocalParent(
       const URIParams& aURI,
       const nsTArray<IPCURLClassifierFeature>& aFeatures) override;
 
   virtual mozilla::ipc::IPCResult RecvPURLClassifierLocalConstructor(
       PURLClassifierLocalParent* aActor, const URIParams& aURI,
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -811,17 +811,17 @@ parent:
     async PMedia();
 
     async PWebrtcGlobal();
 
     async PPresentation();
 
     async CreateAudioIPCConnection() returns (FileDescriptor fd);
 
-    sync PURLClassifier(Principal principal, bool useTrackingProtection)
+    sync PURLClassifier(Principal principal)
         returns (bool success);
 
     async PURLClassifierLocal(URIParams uri, IPCURLClassifierFeature[] features);
 
     async PLoginReputation(URIParams formURI);
 
     // Services remoting
 
--- a/dom/ipc/URLClassifierParent.cpp
+++ b/dom/ipc/URLClassifierParent.cpp
@@ -13,26 +13,25 @@ using namespace mozilla;
 using namespace mozilla::dom;
 
 /////////////////////////////////////////////////////////////////////
 // URLClassifierParent.
 
 NS_IMPL_ISUPPORTS(URLClassifierParent, nsIURIClassifierCallback)
 
 mozilla::ipc::IPCResult URLClassifierParent::StartClassify(
-    nsIPrincipal* aPrincipal, bool aUseTrackingProtection, bool* aSuccess) {
+    nsIPrincipal* aPrincipal, bool* aSuccess) {
   *aSuccess = false;
   nsresult rv = NS_OK;
   // Note that in safe mode, the URL classifier service isn't available, so we
   // should handle the service not being present gracefully.
   nsCOMPtr<nsIURIClassifier> uriClassifier =
       do_GetService(NS_URICLASSIFIERSERVICE_CONTRACTID, &rv);
   if (NS_SUCCEEDED(rv)) {
-    rv = uriClassifier->Classify(aPrincipal, nullptr, aUseTrackingProtection,
-                                 this, aSuccess);
+    rv = uriClassifier->Classify(aPrincipal, nullptr, this, aSuccess);
   }
   if (NS_FAILED(rv) || !*aSuccess) {
     // We treat the case where we fail to classify and the case where the
     // classifier returns successfully but doesn't perform a lookup as the
     // classification not yielding any results, so we just kill the child actor
     // without ever calling out callback in both cases.
     // This means that code using this in the child process will only get a hit
     // on its callback if some classification actually happens.
--- a/dom/ipc/URLClassifierParent.h
+++ b/dom/ipc/URLClassifierParent.h
@@ -19,17 +19,16 @@ namespace dom {
 // URLClassifierParent
 
 class URLClassifierParent : public nsIURIClassifierCallback,
                             public PURLClassifierParent {
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   mozilla::ipc::IPCResult StartClassify(nsIPrincipal* aPrincipal,
-                                        bool aUseTrackingProtection,
                                         bool* aSuccess);
 
   // nsIURIClassifierCallback.
   NS_IMETHOD OnClassifyComplete(nsresult aErrorCode, const nsACString& aList,
                                 const nsACString& aProvider,
                                 const nsACString& aFullHash) override {
     if (mIPCOpen) {
       ClassifierInfo info = ClassifierInfo(
--- a/netwerk/url-classifier/nsChannelClassifier.cpp
+++ b/netwerk/url-classifier/nsChannelClassifier.cpp
@@ -220,18 +220,17 @@ nsresult nsChannelClassifier::StartInter
     principal->GetURI(getter_AddRefs(principalURI));
     nsCString spec = principalURI->GetSpecOrDefault();
     spec.Truncate(std::min(spec.Length(), UrlClassifierCommon::sMaxSpecLength));
     LOG(("nsChannelClassifier[%p]: Classifying principal %s on channel[%p]",
          this, spec.get(), mChannel.get()));
   }
   // The classify is running in parent process, no need to give a valid event
   // target
-  rv =
-      uriClassifier->Classify(principal, nullptr, false, this, &expectCallback);
+  rv = uriClassifier->Classify(principal, nullptr, this, &expectCallback);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   if (expectCallback) {
     // Suspend the channel, it will be resumed when we get the classifier
     // callback.
     rv = mChannel->Suspend();
--- a/netwerk/url-classifier/nsIURIClassifier.idl
+++ b/netwerk/url-classifier/nsIURIClassifier.idl
@@ -58,32 +58,27 @@ interface nsIURIClassifier : nsISupports
    * @param aPrincipal
    *        The principal that should be checked by the URI classifier.
    *
    * @param nsIEventTarget
    *        Event target for constructing actor in content process.
    *        The event target should be tied to Docgroup/Tabgroup by
    *        using EventTargetFor
    *
-   * @param aTrackingProtectionEnabled
-   *        Whether or not to classify the given URI against tracking
-   *        protection lists
-   *
    * @param aCallback
    *        The URI classifier will call this callback when the URI has been
    *        classified.
    *
    * @return <code>false</code> if classification is not necessary.  The
    *         callback will not be called.
    *         <code>true</code> if classification will be performed.  The
    *         callback will be called.
    */
   boolean classify(in nsIPrincipal aPrincipal,
                    in nsIEventTarget aEventTarget,
-                   in boolean aTrackingProtectionEnabled,
                    in nsIURIClassifierCallback aCallback);
 
   /**
    * Asynchronously classify a URI with list of features. This does not make
    * network requests.
    */
   void asyncClassifyLocalWithFeatures(in nsIURI aURI,
                                       in Array<nsIUrlClassifierFeature> aFeatures,
--- a/testing/specialpowers/content/specialpowersAPI.js
+++ b/testing/specialpowers/content/specialpowersAPI.js
@@ -2217,32 +2217,32 @@ SpecialPowersAPI.prototype = {
 
   /* Bug 1339006 Runnables of nsIURIClassifier.classify may be labeled by
    * SystemGroup, but some test cases may run as web content. That would assert
    * when trying to enter web content from a runnable labeled by the
    * SystemGroup. To avoid that, we run classify from SpecialPowers which is
    * chrome-privileged and allowed to run inside SystemGroup
    */
 
-  doUrlClassify(principal, eventTarget, tpEnabled, callback) {
+  doUrlClassify(principal, eventTarget, callback) {
     let classifierService =
       Cc["@mozilla.org/url-classifier/dbservice;1"].getService(Ci.nsIURIClassifier);
 
     let wrapCallback = (...args) => {
       Services.tm.dispatchToMainThread(() => {
         if (typeof callback == "function") {
           callback(...args);
         } else {
           callback.onClassifyComplete.call(undefined, ...args);
         }
       });
     };
 
     return classifierService.classify(unwrapIfWrapped(principal), eventTarget,
-                                      tpEnabled, wrapCallback);
+                                      wrapCallback);
   },
 
   // TODO: Bug 1353701 - Supports custom event target for labelling.
   doUrlClassifyLocal(uri, tables, callback) {
     let classifierService =
       Cc["@mozilla.org/url-classifier/dbservice;1"].getService(Ci.nsIURIClassifier);
 
     let wrapCallback = results => {
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
@@ -55,19 +55,16 @@
 #include "UrlClassifierTelemetryUtils.h"
 #include "nsIURLFormatter.h"
 #include "nsIUploadChannel.h"
 #include "nsStringStream.h"
 #include "nsNetUtil.h"
 #include "nsToolkitCompsCID.h"
 #include "nsIClassifiedChannel.h"
 
-#define TABLE_TRACKING_BLACKLIST_PREF "tracking-blacklist-pref"
-#define TABLE_TRACKING_WHITELIST_PREF "tracking-whitelist-pref"
-
 namespace mozilla {
 namespace safebrowsing {
 
 nsresult TablesToResponse(const nsACString& tables) {
   if (tables.IsEmpty()) {
     return NS_OK;
   }
 
@@ -1647,19 +1644,16 @@ nsresult nsUrlClassifierDBService::ReadT
       Preferences::GetBool(CHECK_PHISHING_PREF, CHECK_PHISHING_DEFAULT);
   mCheckBlockedURIs =
       Preferences::GetBool(CHECK_BLOCKED_PREF, CHECK_BLOCKED_DEFAULT);
 
   nsAutoCString allTables;
   nsAutoCString tables;
 
   mBaseTables.Truncate();
-  mTrackingProtectionTables.Truncate();
-  mTrackingProtectionWhitelistExtraEntriesByPrefs.Truncate();
-  mTrackingProtectionBlacklistExtraEntriesByPrefs.Truncate();
 
   Preferences::GetCString(PHISH_TABLE_PREF, allTables);
   if (mCheckPhishing) {
     AppendTables(allTables, mBaseTables);
   }
 
   Preferences::GetCString(MALWARE_TABLE_PREF, tables);
   AppendTables(tables, allTables);
@@ -1679,27 +1673,19 @@ nsresult nsUrlClassifierDBService::ReadT
   Preferences::GetCString(DOWNLOAD_ALLOW_TABLE_PREF, tables);
   AppendTables(tables, allTables);
 
   Preferences::GetCString(PASSWORD_ALLOW_TABLE_PREF, tables);
   AppendTables(tables, allTables);
 
   Preferences::GetCString(TRACKING_TABLE_PREF, tables);
   AppendTables(tables, allTables);
-  AppendTables(tables, mTrackingProtectionTables);
-
-  Preferences::GetCString(TRACKING_TABLE_TEST_ENTRIES_PREF, tables);
-  AppendTables(tables, mTrackingProtectionBlacklistExtraEntriesByPrefs);
 
   Preferences::GetCString(TRACKING_WHITELIST_TABLE_PREF, tables);
   AppendTables(tables, allTables);
-  AppendTables(tables, mTrackingProtectionTables);
-
-  Preferences::GetCString(TRACKING_WHITELIST_TABLE_TEST_ENTRIES_PREF, tables);
-  AppendTables(tables, mTrackingProtectionWhitelistExtraEntriesByPrefs);
 
   Classifier::SplitTables(allTables, mGethashTables);
 
   Preferences::GetCString(DISALLOW_COMPLETION_TABLE_PREF, tables);
   Classifier::SplitTables(tables, mDisallowCompletionsTables);
 
   return NS_OK;
 }
@@ -1799,81 +1785,62 @@ nsresult nsUrlClassifierDBService::Init(
 
   return NS_OK;
 }
 
 // nsChannelClassifier is the only consumer of this interface.
 NS_IMETHODIMP
 nsUrlClassifierDBService::Classify(nsIPrincipal* aPrincipal,
                                    nsIEventTarget* aEventTarget,
-                                   bool aTrackingProtectionEnabled,
                                    nsIURIClassifierCallback* c, bool* result) {
   NS_ENSURE_ARG(aPrincipal);
 
   if (XRE_IsContentProcess()) {
     using namespace mozilla::dom;
 
     ContentChild* content = ContentChild::GetSingleton();
     MOZ_ASSERT(content);
 
-    auto actor =
-        static_cast<URLClassifierChild*>(content->AllocPURLClassifierChild(
-            IPC::Principal(aPrincipal), aTrackingProtectionEnabled, result));
+    auto actor = static_cast<URLClassifierChild*>(
+        content->AllocPURLClassifierChild(IPC::Principal(aPrincipal), result));
     MOZ_ASSERT(actor);
 
     if (aEventTarget) {
       content->SetEventTargetForActor(actor, aEventTarget);
     } else {
       // In the case null event target we should use systemgroup event target
       NS_WARNING(
           ("Null event target, we should use SystemGroup to do labelling"));
       nsCOMPtr<nsIEventTarget> systemGroupEventTarget =
           mozilla::SystemGroup::EventTargetFor(mozilla::TaskCategory::Other);
       content->SetEventTargetForActor(actor, systemGroupEventTarget);
     }
     if (!content->SendPURLClassifierConstructor(
-            actor, IPC::Principal(aPrincipal), aTrackingProtectionEnabled,
-            result)) {
+            actor, IPC::Principal(aPrincipal), result)) {
       *result = false;
       return NS_ERROR_FAILURE;
     }
 
     actor->SetCallback(c);
     return NS_OK;
   }
 
   NS_ENSURE_TRUE(gDbBackgroundThread, NS_ERROR_NOT_INITIALIZED);
 
-  if (!(mCheckMalware || mCheckPhishing || aTrackingProtectionEnabled ||
-        mCheckBlockedURIs)) {
+  if (!(mCheckMalware || mCheckPhishing || mCheckBlockedURIs)) {
     *result = false;
     return NS_OK;
   }
 
   RefPtr<nsUrlClassifierClassifyCallback> callback =
       new (fallible) nsUrlClassifierClassifyCallback(c);
 
   if (!callback) return NS_ERROR_OUT_OF_MEMORY;
 
-  nsCString tables = mBaseTables;
-  nsTArray<nsCString> extraTablesByPrefs;
-  nsTArray<nsCString> extraEntriesByPrefs;
-  if (aTrackingProtectionEnabled) {
-    AppendTables(mTrackingProtectionTables, tables);
-    extraTablesByPrefs.AppendElement(TABLE_TRACKING_WHITELIST_PREF);
-    extraEntriesByPrefs.AppendElement(
-        mTrackingProtectionWhitelistExtraEntriesByPrefs);
-
-    extraTablesByPrefs.AppendElement(TABLE_TRACKING_BLACKLIST_PREF);
-    extraEntriesByPrefs.AppendElement(
-        mTrackingProtectionBlacklistExtraEntriesByPrefs);
-  }
-
-  nsresult rv = LookupURI(aPrincipal, tables, extraTablesByPrefs,
-                          extraEntriesByPrefs, callback, false, result);
+  nsresult rv = LookupURI(aPrincipal, mBaseTables, callback, false, result);
   if (rv == NS_ERROR_MALFORMED_URI) {
     *result = false;
     // The URI had no hostname, don't try to classify it.
     return NS_OK;
   }
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
@@ -2101,24 +2068,21 @@ nsUrlClassifierDBService::SendThreatHitR
 
 NS_IMETHODIMP
 nsUrlClassifierDBService::Lookup(nsIPrincipal* aPrincipal,
                                  const nsACString& tables,
                                  nsIUrlClassifierCallback* c) {
   NS_ENSURE_TRUE(gDbBackgroundThread, NS_ERROR_NOT_INITIALIZED);
 
   bool dummy;
-  return LookupURI(aPrincipal, tables, nsTArray<nsCString>(),
-                   nsTArray<nsCString>(), c, true, &dummy);
+  return LookupURI(aPrincipal, tables, c, true, &dummy);
 }
 
 nsresult nsUrlClassifierDBService::LookupURI(
     nsIPrincipal* aPrincipal, const nsACString& tables,
-    const nsTArray<nsCString>& aExtraTablesByPrefs,
-    const nsTArray<nsCString>& aExtraEntriesByPrefs,
     nsIUrlClassifierCallback* c, bool forceLookup, bool* didLookup) {
   NS_ENSURE_TRUE(gDbBackgroundThread, NS_ERROR_NOT_INITIALIZED);
   NS_ENSURE_ARG(aPrincipal);
 
   if (nsContentUtils::IsSystemPrincipal(aPrincipal)) {
     *didLookup = false;
     return NS_OK;
   }
@@ -2126,43 +2090,16 @@ nsresult nsUrlClassifierDBService::Looku
   nsCOMPtr<nsIURI> uri;
   nsresult rv = aPrincipal->GetURI(getter_AddRefs(uri));
   NS_ENSURE_SUCCESS(rv, rv);
   NS_ENSURE_TRUE(uri, NS_ERROR_FAILURE);
 
   uri = NS_GetInnermostURI(uri);
   NS_ENSURE_TRUE(uri, NS_ERROR_FAILURE);
 
-  if (aExtraTablesByPrefs.Length() != aExtraEntriesByPrefs.Length()) {
-    return NS_ERROR_FAILURE;
-  }
-
-  if (!aExtraEntriesByPrefs.IsEmpty()) {
-    nsAutoCString host;
-    rv = uri->GetHost(host);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    for (uint32_t i = 0; i < aExtraEntriesByPrefs.Length(); ++i) {
-      nsTArray<nsCString> entries;
-      Classifier::SplitTables(aExtraEntriesByPrefs[i], entries);
-      if (entries.Contains(host)) {
-        *didLookup = true;
-
-        nsCString table = aExtraTablesByPrefs[i];
-        nsCOMPtr<nsIUrlClassifierCallback> callback(c);
-        nsCOMPtr<nsIRunnable> cbRunnable = NS_NewRunnableFunction(
-            "nsUrlClassifierDBService::LookupURI",
-            [callback, table]() -> void { callback->HandleEvent(table); });
-
-        NS_DispatchToMainThread(cbRunnable);
-        return NS_OK;
-      }
-    }
-  }
-
   nsAutoCString key;
   // Canonicalize the url
   nsCOMPtr<nsIUrlClassifierUtils> utilsService =
       do_GetService(NS_URLCLASSIFIERUTILS_CONTRACTID);
   rv = utilsService->GetKeyForURI(uri, key);
   if (NS_FAILED(rv)) return rv;
 
   if (forceLookup) {
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.h
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.h
@@ -52,21 +52,17 @@
 
 #define CHECK_BLOCKED_PREF "browser.safebrowsing.blockedURIs.enabled"
 #define CHECK_BLOCKED_DEFAULT false
 
 // Comma-separated lists
 #define MALWARE_TABLE_PREF "urlclassifier.malwareTable"
 #define PHISH_TABLE_PREF "urlclassifier.phishTable"
 #define TRACKING_TABLE_PREF "urlclassifier.trackingTable"
-#define TRACKING_TABLE_TEST_ENTRIES_PREF \
-  "urlclassifier.trackingTable.testEntries"
 #define TRACKING_WHITELIST_TABLE_PREF "urlclassifier.trackingWhitelistTable"
-#define TRACKING_WHITELIST_TABLE_TEST_ENTRIES_PREF \
-  "urlclassifier.trackingWhitelistTable.testEntries"
 #define BLOCKED_TABLE_PREF "urlclassifier.blockedTable"
 #define DOWNLOAD_BLOCK_TABLE_PREF "urlclassifier.downloadBlockTable"
 #define DOWNLOAD_ALLOW_TABLE_PREF "urlclassifier.downloadAllowTable"
 #define DISALLOW_COMPLETION_TABLE_PREF "urlclassifier.disallow_completions"
 #define PASSWORD_ALLOW_TABLE_PREF "urlclassifier.passwordAllowTable"
 
 using namespace mozilla::safebrowsing;
 
@@ -119,33 +115,29 @@ class nsUrlClassifierDBService final : p
  private:
   const nsTArray<nsCString> kObservedPrefs = {
       NS_LITERAL_CSTRING(CHECK_MALWARE_PREF),
       NS_LITERAL_CSTRING(CHECK_PHISHING_PREF),
       NS_LITERAL_CSTRING(CHECK_BLOCKED_PREF),
       NS_LITERAL_CSTRING(MALWARE_TABLE_PREF),
       NS_LITERAL_CSTRING(PHISH_TABLE_PREF),
       NS_LITERAL_CSTRING(TRACKING_TABLE_PREF),
-      NS_LITERAL_CSTRING(TRACKING_TABLE_TEST_ENTRIES_PREF),
       NS_LITERAL_CSTRING(TRACKING_WHITELIST_TABLE_PREF),
-      NS_LITERAL_CSTRING(TRACKING_WHITELIST_TABLE_TEST_ENTRIES_PREF),
       NS_LITERAL_CSTRING(BLOCKED_TABLE_PREF),
       NS_LITERAL_CSTRING(DOWNLOAD_BLOCK_TABLE_PREF),
       NS_LITERAL_CSTRING(DOWNLOAD_ALLOW_TABLE_PREF),
       NS_LITERAL_CSTRING(DISALLOW_COMPLETION_TABLE_PREF)};
 
   // No subclassing
   ~nsUrlClassifierDBService();
 
   // Disallow copy constructor
   nsUrlClassifierDBService(nsUrlClassifierDBService&);
 
   nsresult LookupURI(nsIPrincipal* aPrincipal, const nsACString& tables,
-                     const nsTArray<nsCString>& extraTablesByPrefs,
-                     const nsTArray<nsCString>& extraEntriesByPrefs,
                      nsIUrlClassifierCallback* c, bool forceCheck,
                      bool* didCheck);
 
   // Post an event to worker thread to release objects when receive
   // 'quit-application'
   nsresult PreShutdown();
 
   // Close db connection and join the background thread if it exists.
@@ -186,23 +178,18 @@ class nsUrlClassifierDBService final : p
 
   // The list of tables that can use the default hash completer object.
   nsTArray<nsCString> mGethashTables;
 
   // The list of tables that should never be hash completed.
   nsTArray<nsCString> mDisallowCompletionsTables;
 
   // Comma-separated list of tables to use in lookups.
-  nsCString mTrackingProtectionTables;
   nsCString mBaseTables;
 
-  // Comma-separated hosts set by prefs to use in lookups.
-  nsCString mTrackingProtectionWhitelistExtraEntriesByPrefs;
-  nsCString mTrackingProtectionBlacklistExtraEntriesByPrefs;
-
   // Thread that we do the updates on.
   static nsIThread* gDbBackgroundThread;
 };
 
 class nsUrlClassifierDBServiceWorker final : public nsIUrlClassifierDBService {
  public:
   nsUrlClassifierDBServiceWorker();
 
--- a/toolkit/components/url-classifier/tests/mochitest/test_classifier.html
+++ b/toolkit/components/url-classifier/tests/mochitest/test_classifier.html
@@ -22,99 +22,50 @@ var firstLoad = true;
 // URL in test-phish-simple, breaking the tests following this one.
 var testData = [
   { url: "malware.example.com/",
     db: "test-malware-simple",
   },
   { url: "unwanted.example.com/",
     db: "test-unwanted-simple",
   },
-  { url: "tracking.example.com/",
-    db: "test-track-simple",
-  },
   { url: "blocked.example.com/",
     db: "test-block-simple",
   },
   { url: "harmful.example.com/",
     db: "test-harmful-simple",
   },
 ];
 
 const Cc = SpecialPowers.Cc;
 const Ci = SpecialPowers.Ci;
 const Cr = SpecialPowers.Cr;
 
 var testURLs = [
   { url: "http://example.com",
-    trackingProtection: false,
-    table: "",
-    result: Cr.NS_OK,
-  },
-  { url: "http://example.com",
-    trackingProtection: true,
     table: "",
     result: Cr.NS_OK,
   },
   { url: "http://malware.example.com",
-    trackingProtection: false,
-    table: "test-malware-simple",
-    result: Cr.NS_ERROR_MALWARE_URI,
-  },
-  { url: "http://malware.example.com",
-    trackingProtection: true,
     table: "test-malware-simple",
     result: Cr.NS_ERROR_MALWARE_URI,
   },
   { url: "http://unwanted.example.com",
-    trackingProtection: false,
-    table: "test-unwanted-simple",
-    result: Cr.NS_ERROR_UNWANTED_URI,
-  },
-  { url: "http://unwanted.example.com",
-    trackingProtection: true,
     table: "test-unwanted-simple",
     result: Cr.NS_ERROR_UNWANTED_URI,
   },
   { url: "http://itisatrap.org/firefox/its-a-trap.html",
-    trackingProtection: false,
-    table: "test-phish-simple",
-    result: Cr.NS_ERROR_PHISHING_URI,
-  },
-  { url: "http://itisatrap.org/firefox/its-a-trap.html",
-    trackingProtection: true,
     table: "test-phish-simple",
     result: Cr.NS_ERROR_PHISHING_URI,
   },
   { url: "http://harmful.example.com",
-    trackingProtection: false,
-    table: "test-harmful-simple",
-    result: Cr.NS_ERROR_HARMFUL_URI,
-  },
-  { url: "http://harmful.example.com",
-    trackingProtection: true,
     table: "test-harmful-simple",
     result: Cr.NS_ERROR_HARMFUL_URI,
   },
-  { url: "http://tracking.example.com",
-    trackingProtection: false,
-    table: "test-track-simple",
-    result: Cr.NS_OK,
-  },
-  { url: "http://tracking.example.com",
-    trackingProtection: true,
-    table: "test-track-simple",
-    result: Cr.NS_ERROR_TRACKING_URI,
-  },
   { url: "http://blocked.example.com",
-    trackingProtection: false,
-    table: "test-block-simple",
-    result: Cr.NS_ERROR_BLOCKED_URI,
-  },
-  { url: "http://blocked.example.com",
-    trackingProtection: true,
     table: "test-block-simple",
     result: Cr.NS_ERROR_BLOCKED_URI,
   },
 ];
 
 function loadTestFrame() {
   document.getElementById("testFrame").src = "classifierFrame.html";
 }
@@ -136,47 +87,45 @@ function updateError(errorCode) {
 function testService() {
   return new Promise(resolve => {
     function runNextTest() {
       if (!testURLs.length) {
         resolve();
         return;
       }
       let test = testURLs.shift();
-      let tables = "test-malware-simple,test-unwanted-simple,test-phish-simple,test-track-simple,test-block-simple,test-harmful-simple";
+      let tables = "test-malware-simple,test-unwanted-simple,test-phish-simple,test-block-simple,test-harmful-simple";
       let uri = SpecialPowers.Services.io.newURI(test.url);
       let prin = SpecialPowers.Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
-      SpecialPowers.doUrlClassify(prin, null, test.trackingProtection, function(errorCode) {
+      SpecialPowers.doUrlClassify(prin, null, function(errorCode) {
         is(errorCode, test.result,
-           `Successful asynchronous classification of ${test.url} with TP=${test.trackingProtection}`);
+           `Successful asynchronous classification of ${test.url}`);
         SpecialPowers.doUrlClassifyLocal(uri, tables, function(results) {
           if (results.length == 0) {
             is(test.table, "",
-               `Successful asynchronous local classification of ${test.url} with TP=${test.trackingProtection}`);
+               `Successful asynchronous local classification of ${test.url}`);
           } else {
             let result = results[0].QueryInterface(Ci.nsIUrlClassifierFeatureResult);
             is(result.list, test.table,
-               `Successful asynchronous local classification of ${test.url} with TP=${test.trackingProtection}`);
+               `Successful asynchronous local classification of ${test.url}`);
           }
           runNextTest();
         });
 
       });
     }
     runNextTest(resolve);
   });
 }
 
 SpecialPowers.pushPrefEnv(
   {"set": [["urlclassifier.malwareTable", "test-malware-simple,test-unwanted-simple,test-harmful-simple"],
            ["urlclassifier.phishTable", "test-phish-simple"],
            ["urlclassifier.downloadBlockTable", "test-block-simple"],
-           ["urlclassifier.trackingTable", "test-track-simple"],
-           ["browser.safebrowsing.debug", true],
-           ["privacy.trackingprotection.annotate_channels", true]]},
+           ["browser.safebrowsing.debug", true]]},
   function() {
     classifierHelper.waitForInit()
       .then(() => classifierHelper.addUrlToDB(testData))
       .then(updateSuccess)
       .catch(err => {
         updateError(err);
       })
       .then(testService)
--- a/toolkit/components/url-classifier/tests/mochitest/test_classifier_match.html
+++ b/toolkit/components/url-classifier/tests/mochitest/test_classifier_match.html
@@ -149,17 +149,17 @@ function runTest() {
     function runNextTest() {
       if (!testDatas.length) {
         resolve();
         return;
       }
       let test = testDatas.shift();
       let uri = SpecialPowers.Services.io.newURI(test.url);
       let prin = SpecialPowers.Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
-      SpecialPowers.doUrlClassify(prin, null, false, function(errorCode, table, provider, fullhash) {
+      SpecialPowers.doUrlClassify(prin, null, function(errorCode, table, provider, fullhash) {
         is(errorCode, test.expect.error, `Test url ${test.url} correct error`);
         is(table, test.expect.table, `Test url ${test.url} correct table`);
         is(provider, test.expect.provider, `Test url ${test.url} correct provider`);
         is(fullhash, btoa(test.expect.fullhash), `Test url ${test.url} correct full hash`);
         runNextTest();
       });
     }
     runNextTest();