Bug 998370: Rollback bugs 997759, 989232, 985720, 985623 in beta (r=backout,ba=sledru)
authorMonica Chew <mmc@mozilla.com>
Fri, 18 Apr 2014 10:55:42 -0700
changeset 183805 4f4941d4cda9
parent 183804 ba1c380f55b9
child 183806 9208db873dbf
push id3493
push usermchew@mozilla.com
push date2014-04-18 18:30 +0000
treeherdermozilla-beta@4f4941d4cda9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs998370, 997759, 989232, 985720, 985623
milestone29.0
Bug 998370: Rollback bugs 997759, 989232, 985720, 985623 in beta (r=backout,ba=sledru)
browser/app/profile/firefox.js
browser/components/safebrowsing/content/test/head.js
modules/libpref/src/init/all.js
toolkit/components/downloads/ApplicationReputation.cpp
toolkit/components/url-classifier/Classifier.cpp
toolkit/components/url-classifier/Classifier.h
toolkit/components/url-classifier/SafeBrowsing.jsm
toolkit/components/url-classifier/nsIUrlClassifierDBService.idl
toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
toolkit/components/url-classifier/nsUrlClassifierDBService.h
toolkit/components/url-classifier/nsUrlClassifierProxies.cpp
toolkit/components/url-classifier/nsUrlClassifierProxies.h
toolkit/components/url-classifier/tests/mochitest/test_classifier.html
toolkit/components/url-classifier/tests/mochitest/test_classifier_worker.html
toolkit/components/url-classifier/tests/mochitest/test_lookup_system_principal.html
toolkit/components/url-classifier/tests/unit/head_urlclassifier.js
toolkit/components/url-classifier/tests/unit/test_dbservice.js
toolkit/components/url-classifier/tests/unit/test_digest256.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -824,23 +824,18 @@ pref("urlclassifier.alternate_error_page
 // The number of random entries to send with a gethash request.
 pref("urlclassifier.gethashnoise", 4);
 
 // If an urlclassifier table has not been updated in this number of seconds,
 // a gethash request will be forced to check that the result is still in
 // the database.
 pref("urlclassifier.max-complete-age", 2700);
 // Tables for application reputation.
-pref("urlclassifier.downloadBlockTable", "goog-badbinurl-shavar");
-// Only download the whitelist on Windows, since the whitelist is
-// only useful for suppressing remote lookups for signed binaries which we can
-// only verify on Windows (Bug 974579).
-#ifdef XP_WIN
-pref("urlclassifier.downloadAllowTable", "goog-downloadwhite-digest256");
-#endif
+pref("urlclassifier.download_block_table", "");
+pref("urlclassifier.download_allow_table", "");
 #endif
 
 pref("browser.geolocation.warning.infoURL", "https://www.mozilla.org/%LOCALE%/firefox/geolocation/");
 
 pref("browser.EULA.version", 3);
 pref("browser.rights.version", 3);
 pref("browser.rights.3.shown", false);
 
--- a/browser/components/safebrowsing/content/test/head.js
+++ b/browser/components/safebrowsing/content/test/head.js
@@ -1,5 +1,3 @@
 // Force SafeBrowsing to be initialized for the tests
-Services.prefs.setCharPref("urlclassifier.malware_table", "test-malware-simple");
-Services.prefs.setCharPref("urlclassifier.phish_table", "test-phish-simple");
 SafeBrowsing.init();
 
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -4491,16 +4491,15 @@ pref("dom.voicemail.enabled", false);
 // Numeric default service id for Voice Mail API calls with |serviceId|
 // parameter omitted.
 pref("dom.voicemail.defaultServiceId", 0);
 
 // DOM Inter-App Communication API.
 pref("dom.inter-app-communication-api.enabled", false);
 
 // The tables used for Safebrowsing phishing and malware checks.
-pref("urlclassifier.malware_table", "goog-malware-shavar,test-malware-simple");
-pref("urlclassifier.phish_table", "goog-phish-shavar,test-phish-simple");
-pref("urlclassifier.downloadBlockTable", "");
-pref("urlclassifier.downloadAllowTable", "");
-pref("urlclassifier.disallow_completions", "test-malware-simple,test-phish-simple,goog-downloadwhite-digest256");
+pref("urlclassifier.malware_table", "goog-malware-shavar");
+pref("urlclassifier.phish_table", "goog-phish-shavar");
+pref("urlclassifier.download_block_table", "");
+pref("urlclassifier.download_allow_table", "");
 
 // Turn off Spatial navigation by default.
 pref("snav.enabled", false);
--- a/toolkit/components/downloads/ApplicationReputation.cpp
+++ b/toolkit/components/downloads/ApplicationReputation.cpp
@@ -37,18 +37,18 @@ using mozilla::Preferences;
 using mozilla::Telemetry::Accumulate;
 
 // Preferences that we need to initialize the query. We may need another
 // preference than browser.safebrowsing.malware.enabled, or simply use
 // browser.safebrowsing.appRepURL. See bug 887041.
 #define PREF_SB_APP_REP_URL "browser.safebrowsing.appRepURL"
 #define PREF_SB_MALWARE_ENABLED "browser.safebrowsing.malware.enabled"
 #define PREF_GENERAL_LOCALE "general.useragent.locale"
-#define PREF_DOWNLOAD_BLOCK_TABLE "urlclassifier.downloadBlockTable"
-#define PREF_DOWNLOAD_ALLOW_TABLE "urlclassifier.downloadAllowTable"
+#define PREF_DOWNLOAD_BLOCK_TABLE "urlclassifier.download_block_table"
+#define PREF_DOWNLOAD_ALLOW_TABLE "urlclassifier.download_allow_table"
 
 /**
  * Keep track of pending lookups. Once the ApplicationReputationService creates
  * this, it is guaranteed to call mCallback. This class is private to
  * ApplicationReputationService.
  */
 class PendingLookup MOZ_FINAL :
   public nsIStreamListener,
@@ -433,22 +433,10 @@ nsresult ApplicationReputationService::Q
   // way to wrap a URI inside a principal, since principals can't be
   // constructed.
   rv = mSecurityManager->GetNoAppCodebasePrincipal(uri,
                                                    getter_AddRefs(principal));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Check local lists to see if the URI has already been whitelisted or
   // blacklisted.
-  nsAutoCString tables;
-  nsAutoCString allowlist;
-  Preferences::GetCString(PREF_DOWNLOAD_ALLOW_TABLE, &allowlist);
-  if (!allowlist.IsEmpty()) {
-    tables.Append(allowlist);
-  }
-  nsAutoCString blocklist;
-  Preferences::GetCString(PREF_DOWNLOAD_BLOCK_TABLE, &blocklist);
-  if (!blocklist.IsEmpty()) {
-    tables.Append(",");
-    tables.Append(blocklist);
-  }
-  return mDBService->Lookup(principal, tables, lookup);
+  return mDBService->Lookup(principal, lookup);
 }
--- a/toolkit/components/url-classifier/Classifier.cpp
+++ b/toolkit/components/url-classifier/Classifier.cpp
@@ -27,38 +27,16 @@ extern PRLogModuleInfo *gUrlClassifierDb
 
 #define STORE_DIRECTORY      NS_LITERAL_CSTRING("safebrowsing")
 #define TO_DELETE_DIR_SUFFIX NS_LITERAL_CSTRING("-to_delete")
 #define BACKUP_DIR_SUFFIX    NS_LITERAL_CSTRING("-backup")
 
 namespace mozilla {
 namespace safebrowsing {
 
-void
-Classifier::SplitTables(const nsACString& str, nsTArray<nsCString>& tables)
-{
-  tables.Clear();
-
-  nsACString::const_iterator begin, iter, end;
-  str.BeginReading(begin);
-  str.EndReading(end);
-  while (begin != end) {
-    iter = begin;
-    FindCharInReadable(',', iter, end);
-    nsDependentCSubstring table = Substring(begin,iter);
-    if (!table.IsEmpty()) {
-      tables.AppendElement(Substring(begin, iter));
-    }
-    begin = iter;
-    if (begin != end) {
-      begin++;
-    }
-  }
-}
-
 Classifier::Classifier()
   : mFreshTime(45 * 60)
 {
 }
 
 Classifier::~Classifier()
 {
   Close();
@@ -212,35 +190,32 @@ Classifier::TableRequest(nsACString& aRe
       aResult.Append(subList);
     }
 
     aResult.Append('\n');
   }
 }
 
 nsresult
-Classifier::Check(const nsACString& aSpec,
-                  const nsACString& aTables,
-                  LookupResultArray& aResults)
+Classifier::Check(const nsACString& aSpec, LookupResultArray& aResults)
 {
   Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_CL_CHECK_TIME> timer;
 
   // Get the set of fragments based on the url. This is necessary because we
   // only look up at most 5 URLs per aSpec, even if aSpec has more than 5
   // components.
   nsTArray<nsCString> fragments;
   nsresult rv = LookupCache::GetLookupFragments(aSpec, &fragments);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsTArray<nsCString> activeTables;
-  SplitTables(aTables, activeTables);
+  ActiveTables(activeTables);
 
   nsTArray<LookupCache*> cacheArray;
   for (uint32_t i = 0; i < activeTables.Length(); i++) {
-    LOG(("Checking table %s", activeTables[i].get()));
     LookupCache *cache = GetLookupCache(activeTables[i]);
     if (cache) {
       cacheArray.AppendElement(cache);
     } else {
       return NS_ERROR_FAILURE;
     }
   }
 
--- a/toolkit/components/url-classifier/Classifier.h
+++ b/toolkit/components/url-classifier/Classifier.h
@@ -38,21 +38,19 @@ public:
   void TableRequest(nsACString& aResult);
 
   /*
    * Get all tables that we know about.
    */
   nsresult ActiveTables(nsTArray<nsCString>& aTables);
 
   /**
-   * Check a URL against the specified tables.
+   * Check a URL against the database.
    */
-  nsresult Check(const nsACString& aSpec,
-                 const nsACString& tables,
-                 LookupResultArray& aResults);
+  nsresult Check(const nsACString& aSpec, LookupResultArray& aResults);
 
   /**
    * Apply the table updates in the array.  Takes ownership of
    * the updates in the array and clears it.  Wacky!
    */
   nsresult ApplyUpdates(nsTArray<TableUpdate*>* aUpdates);
   /**
    * Failed update. Spoil the entries so we don't block hosts
@@ -65,18 +63,16 @@ public:
   /*
    * Get a bunch of extra prefixes to query for completion
    * and mask the real entry being requested
    */
   nsresult ReadNoiseEntries(const Prefix& aPrefix,
                             const nsACString& aTableName,
                             uint32_t aCount,
                             PrefixArray* aNoiseEntries);
-  static void SplitTables(const nsACString& str, nsTArray<nsCString>& tables);
-
 private:
   void DropStores();
   nsresult CreateStoreDirectory();
   nsresult SetupPathNames();
   nsresult RecoverBackups();
   nsresult CleanToDelete();
   nsresult BackupTables();
   nsresult RemoveBackupTables();
--- a/toolkit/components/url-classifier/SafeBrowsing.jsm
+++ b/toolkit/components/url-classifier/SafeBrowsing.jsm
@@ -5,29 +5,22 @@
 this.EXPORTED_SYMBOLS = ["SafeBrowsing"];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/Services.jsm");
 
-// Skip all the ones containining "test", because we never need to ask for
-// updates for them.
-function getLists(prefName) {
-  return Services.prefs.getCharPref(prefName).split(",")
-    .filter(function(value) { return value.indexOf("test-") == -1; })
-    .map(function(value) { return value.trim(); });
-}
-
-// These may be a comma-separated lists of tables.
-const phishingLists = getLists("urlclassifier.phish_table");
-const malwareLists = getLists("urlclassifier.malware_table");
-const downloadBlockLists = getLists("urlclassifier.downloadBlockTable");
-const downloadAllowLists = getLists("urlclassifier.downloadAllowTable");
+const phishingList = Services.prefs.getCharPref("urlclassifier.phish_table");
+const malwareList = Services.prefs.getCharPref("urlclassifier.malware_table");
+const downloadBlockList =
+  Services.prefs.getCharPref("urlclassifier.download_block_table");
+const downloadAllowList =
+  Services.prefs.getCharPref("urlclassifier.download_allow_table");
 
 var debug = false;
 function log(...stuff) {
   if (!debug)
     return;
 
   let msg = "SafeBrowsing: " + stuff.join(" ");
   Services.console.logStringMessage(msg);
@@ -43,28 +36,20 @@ this.SafeBrowsing = {
     }
 
     Services.prefs.addObserver("browser.safebrowsing", this.readPrefs.bind(this), false);
     this.readPrefs();
 
     // Register our two types of tables, and add custom Mozilla entries
     let listManager = Cc["@mozilla.org/url-classifier/listmanager;1"].
                       getService(Ci.nsIUrlListManager);
-    for (let i = 0; i < phishingLists.length; ++i) {
-      listManager.registerTable(phishingLists[i], false);
-    }
-    for (let i = 0; i < malwareLists.length; ++i) {
-      listManager.registerTable(malwareLists[i], false);
-    }
-    for (let i = 0; i < downloadBlockLists.length; ++i) {
-      listManager.registerTable(downloadBlockLists[i], false);
-    }
-    for (let i = 0; i < downloadAllowLists.length; ++i) {
-      listManager.registerTable(downloadAllowLists[i], false);
-    }
+    listManager.registerTable(phishingList, false);
+    listManager.registerTable(malwareList, false);
+    listManager.registerTable(downloadBlockList, false);
+    listManager.registerTable(downloadAllowList, false);
     this.addMozEntries();
 
     this.controlUpdateChecking();
     this.initialized = true;
 
     log("init() finished");
   },
 
@@ -139,43 +124,29 @@ this.SafeBrowsing = {
 
 
   controlUpdateChecking: function() {
     log("phishingEnabled:", this.phishingEnabled, "malwareEnabled:", this.malwareEnabled);
 
     let listManager = Cc["@mozilla.org/url-classifier/listmanager;1"].
                       getService(Ci.nsIUrlListManager);
 
-    for (let i = 0; i < phishingLists.length; ++i) {
-      if (this.phishingEnabled) {
-        listManager.enableUpdate(phishingLists[i]);
-      } else {
-        listManager.disableUpdate(phishingLists[i]);
-      }
-    }
-    for (let i = 0; i < malwareLists.length; ++i) {
-      if (this.malwareEnabled) {
-        listManager.enableUpdate(malwareLists[i]);
-      } else {
-        listManager.disableUpdate(malwareLists[i]);
-      }
-    }
-    for (let i = 0; i < downloadBlockLists.length; ++i) {
-      if (this.malwareEnabled) {
-        listManager.enableUpdate(downloadBlockLists[i]);
-      } else {
-        listManager.disableUpdate(downloadBlockLists[i]);
-      }
-    }
-    for (let i = 0; i < downloadAllowLists.length; ++i) {
-      if (this.malwareEnabled) {
-        listManager.enableUpdate(downloadAllowLists[i]);
-      } else {
-        listManager.disableUpdate(downloadAllowLists[i]);
-      }
+    if (this.phishingEnabled)
+      listManager.enableUpdate(phishingList);
+    else
+      listManager.disableUpdate(phishingList);
+
+    if (this.malwareEnabled) {
+      listManager.enableUpdate(malwareList);
+      listManager.enableUpdate(downloadBlockList);
+      listManager.enableUpdate(downloadAllowList);
+    } else {
+      listManager.disableUpdate(malwareList);
+      listManager.disableUpdate(downloadBlockList);
+      listManager.disableUpdate(downloadAllowList);
     }
   },
 
 
   addMozEntries: function() {
     // Add test entries to the DB.
     // XXX bug 779008 - this could be done by DB itself?
     const phishURL   = "mozilla.org/firefox/its-a-trap.html";
--- a/toolkit/components/url-classifier/nsIUrlClassifierDBService.idl
+++ b/toolkit/components/url-classifier/nsIUrlClassifierDBService.idl
@@ -61,28 +61,27 @@ interface nsIUrlClassifierUpdateObserver
   void updateSuccess(in unsigned long requestedTimeout);
 };
 
 /**
  * This is a proxy class that is instantiated and called from the JS thread.
  * It provides async methods for querying and updating the database.  As the
  * methods complete, they call the callback function.
  */
-[scriptable, uuid(3f9e61e5-01bd-45d0-8dd2-f1abcd20dbb7)]
+[scriptable, uuid(8a389f21-f821-4e29-9c6b-3de6f33cd7cf)]
 interface nsIUrlClassifierDBService : nsISupports
 {
   /**
-   * Looks up a URI in the specified tables.
+   * Looks up a URI in the database.
    *
    * @param principal: The principal containing the URI to search.
    * @param c: The callback will be called with a comma-separated list
    *        of tables to which the key belongs.
    */
   void lookup(in nsIPrincipal principal,
-              in ACString tables,
               in nsIUrlClassifierCallback c);
 
   /**
    * Lists the tables along with which chunks are available in each table.
    * This list is in the format of the request body:
    *   tablename;chunkdata\n
    *   tablename2;chunkdata2\n
    *
@@ -180,17 +179,17 @@ interface nsIUrlClassifierDBService : ns
    */
   void resetDatabase();
 };
 
 /**
  * Interface for the actual worker thread.  Implementations of this need not
  * be thread aware and just work on the database.
  */
-[scriptable, uuid(abcd7978-c304-4a7d-a44c-33c2ed5441e7)]
+[scriptable, uuid(0445be75-b114-43ea-89dc-aa16af26e77e)]
 interface nsIUrlClassifierDBServiceWorker : nsIUrlClassifierDBService
 {
   // Provide a way to forcibly close the db connection.
   void closeDb();
 
   [noscript]void cacheCompletions(in CacheCompletionArray completions);
   [noscript]void cacheMisses(in PrefixArray misses);
 };
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
@@ -66,19 +66,18 @@ PRLogModuleInfo *gUrlClassifierDbService
 #define CHECK_PHISHING_PREF     "browser.safebrowsing.enabled"
 #define CHECK_PHISHING_DEFAULT  false
 
 #define GETHASH_NOISE_PREF      "urlclassifier.gethashnoise"
 #define GETHASH_NOISE_DEFAULT   4
 
 #define MALWARE_TABLE_PREF      "urlclassifier.malware_table"
 #define PHISH_TABLE_PREF        "urlclassifier.phish_table"
-#define DOWNLOAD_BLOCK_TABLE_PREF "urlclassifier.downloadBlockTable"
-#define DOWNLOAD_ALLOW_TABLE_PREF "urlclassifier.downloadAllowTable"
-#define DISALLOW_COMPLETION_TABLE_PREF "urlclassifier.disallow_completions"
+#define DOWNLOAD_BLOCK_TABLE_PREF "urlclassifier.download_block_table"
+#define DOWNLOAD_ALLOW_TABLE_PREF "urlclassifier.download_allow_table"
 
 #define CONFIRM_AGE_PREF        "urlclassifier.max-complete-age"
 #define CONFIRM_AGE_DEFAULT_SEC (45 * 60)
 
 class nsUrlClassifierDBServiceWorker;
 
 // Singleton instance.
 static nsUrlClassifierDBService* sUrlClassifierDBService;
@@ -86,34 +85,50 @@ static nsUrlClassifierDBService* sUrlCla
 nsIThread* nsUrlClassifierDBService::gDbBackgroundThread = nullptr;
 
 // Once we've committed to shutting down, don't do work in the background
 // thread.
 static bool gShuttingDownThread = false;
 
 static mozilla::Atomic<int32_t> gFreshnessGuarantee(CONFIRM_AGE_DEFAULT_SEC);
 
+static void
+SplitTables(const nsACString& str, nsTArray<nsCString>& tables)
+{
+  tables.Clear();
+
+  nsACString::const_iterator begin, iter, end;
+  str.BeginReading(begin);
+  str.EndReading(end);
+  while (begin != end) {
+    iter = begin;
+    FindCharInReadable(',', iter, end);
+    tables.AppendElement(Substring(begin, iter));
+    begin = iter;
+    if (begin != end)
+      begin++;
+  }
+}
+
 // -------------------------------------------------------------------------
 // Actual worker implemenatation
 class nsUrlClassifierDBServiceWorker MOZ_FINAL :
   public nsIUrlClassifierDBServiceWorker
 {
 public:
   nsUrlClassifierDBServiceWorker();
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURLCLASSIFIERDBSERVICE
   NS_DECL_NSIURLCLASSIFIERDBSERVICEWORKER
 
   nsresult Init(uint32_t aGethashNoise, nsCOMPtr<nsIFile> aCacheDir);
 
   // Queue a lookup for the worker to perform, called in the main thread.
-  // tables is a comma-separated list of tables to query
   nsresult QueueLookup(const nsACString& lookupKey,
-                       const nsACString& tables,
                        nsIUrlClassifierLookupCallback* callback);
 
   // Handle any queued-up lookups.  We call this function during long-running
   // update operations to prevent lookups from blocking for too long.
   nsresult HandlePendingLookups();
 
 private:
   // No subclassing
@@ -129,19 +144,17 @@ private:
 
   // Reset the in-progress update stream
   void ResetStream();
 
   // Reset the in-progress update
   void ResetUpdate();
 
   // Perform a classifier lookup for a given url.
-  nsresult DoLookup(const nsACString& spec,
-                    const nsACString& tables,
-                    nsIUrlClassifierLookupCallback* c);
+  nsresult DoLookup(const nsACString& spec, nsIUrlClassifierLookupCallback* c);
 
   nsresult AddNoise(const Prefix aPrefix,
                     const nsCString tableName,
                     uint32_t aCount,
                     LookupResultArray& results);
 
   nsCOMPtr<nsICryptoHash> mCryptoHash;
 
@@ -174,17 +187,16 @@ private:
   // Pending lookups are stored in a queue for processing.  The queue
   // is protected by mPendingLookupLock.
   Mutex mPendingLookupLock;
 
   class PendingLookup {
   public:
     TimeStamp mStartTime;
     nsCString mKey;
-    nsCString mTables;
     nsCOMPtr<nsIUrlClassifierLookupCallback> mCallback;
   };
 
   // list of pending lookups
   nsTArray<PendingLookup> mPendingLookups;
 };
 
 NS_IMPL_ISUPPORTS2(nsUrlClassifierDBServiceWorker,
@@ -214,28 +226,26 @@ nsUrlClassifierDBServiceWorker::Init(uin
 
   ResetUpdate();
 
   return NS_OK;
 }
 
 nsresult
 nsUrlClassifierDBServiceWorker::QueueLookup(const nsACString& spec,
-                                            const nsACString& tables,
                                             nsIUrlClassifierLookupCallback* callback)
 {
   MutexAutoLock lock(mPendingLookupLock);
 
   PendingLookup* lookup = mPendingLookups.AppendElement();
   if (!lookup) return NS_ERROR_OUT_OF_MEMORY;
 
   lookup->mStartTime = TimeStamp::Now();
   lookup->mKey = spec;
   lookup->mCallback = callback;
-  lookup->mTables = tables;
 
   return NS_OK;
 }
 
 /**
  * Lookup up a key in the database is a two step process:
  *
  * a) First we look for any Entries in the database that might apply to this
@@ -243,17 +253,16 @@ nsUrlClassifierDBServiceWorker::QueueLoo
  *    the two-part domain name (example.com) and the three-part name
  *    (www.example.com).  We check the database for both of these.
  * b) If we find any entries, we check the list of fragments for that entry
  *    against the possible subfragments of the URL as described in the
  *    "Simplified Regular Expression Lookup" section of the protocol doc.
  */
 nsresult
 nsUrlClassifierDBServiceWorker::DoLookup(const nsACString& spec,
-                                         const nsACString& tables,
                                          nsIUrlClassifierLookupCallback* c)
 {
   if (gShuttingDownThread) {
     c->LookupComplete(nullptr);
     return NS_ERROR_NOT_INITIALIZED;
   }
 
   nsresult rv = OpenDb();
@@ -274,17 +283,17 @@ nsUrlClassifierDBServiceWorker::DoLookup
   if (!results) {
     c->LookupComplete(nullptr);
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   // we ignore failures from Check because we'd rather return the
   // results that were found than fail.
   mClassifier->SetFreshTime(gFreshnessGuarantee);
-  mClassifier->Check(spec, tables, *results);
+  mClassifier->Check(spec, *results);
 
   LOG(("Found %d results.", results->Length()));
 
 
 #if defined(PR_LOGGING)
   if (LOG_ENABLED()) {
     PRIntervalTime clockEnd = PR_IntervalNow();
     LOG(("query took %dms\n",
@@ -322,17 +331,17 @@ nsresult
 nsUrlClassifierDBServiceWorker::HandlePendingLookups()
 {
   MutexAutoLock lock(mPendingLookupLock);
   while (mPendingLookups.Length() > 0) {
     PendingLookup lookup = mPendingLookups[0];
     mPendingLookups.RemoveElementAt(0);
     {
       MutexAutoUnlock unlock(mPendingLookupLock);
-      DoLookup(lookup.mKey, lookup.mTables, lookup.mCallback);
+      DoLookup(lookup.mKey, lookup.mCallback);
     }
     double lookupTime = (TimeStamp::Now() - lookup.mStartTime).ToMilliseconds();
     Telemetry::Accumulate(Telemetry::URLCLASSIFIER_LOOKUP_TIME,
                           static_cast<uint32_t>(lookupTime));
   }
 
   return NS_OK;
 }
@@ -364,17 +373,16 @@ nsUrlClassifierDBServiceWorker::AddNoise
   }
 
   return NS_OK;
 }
 
 // Lookup a key in the db.
 NS_IMETHODIMP
 nsUrlClassifierDBServiceWorker::Lookup(nsIPrincipal* aPrincipal,
-                                       const nsACString& aTables,
                                        nsIUrlClassifierCallback* c)
 {
   return HandlePendingLookups();
 }
 
 NS_IMETHODIMP
 nsUrlClassifierDBServiceWorker::GetTables(nsIUrlClassifierCallback* c)
 {
@@ -434,17 +442,17 @@ nsUrlClassifierDBServiceWorker::BeginUpd
   nsresult rv = OpenDb();
   if (NS_FAILED(rv)) {
     NS_ERROR("Unable to open SafeBrowsing database");
     return NS_ERROR_FAILURE;
   }
 
   mUpdateStatus = NS_OK;
   mUpdateObserver = observer;
-  Classifier::SplitTables(tables, mUpdateTables);
+  SplitTables(tables, mUpdateTables);
 
   return NS_OK;
 }
 
 // Called from the stream updater.
 NS_IMETHODIMP
 nsUrlClassifierDBServiceWorker::BeginStream(const nsACString &table)
 {
@@ -1088,30 +1096,26 @@ nsUrlClassifierDBService::Init()
   gFreshnessGuarantee = Preferences::GetInt(CONFIRM_AGE_PREF,
     CONFIRM_AGE_DEFAULT_SEC);
   mGethashTables.AppendElement(Preferences::GetCString(PHISH_TABLE_PREF));
   mGethashTables.AppendElement(Preferences::GetCString(MALWARE_TABLE_PREF));
   mGethashTables.AppendElement(Preferences::GetCString(
     DOWNLOAD_BLOCK_TABLE_PREF));
   mGethashTables.AppendElement(Preferences::GetCString(
     DOWNLOAD_ALLOW_TABLE_PREF));
-  nsCString tables;
-  Preferences::GetCString(DISALLOW_COMPLETION_TABLE_PREF, &tables);
-  Classifier::SplitTables(tables, mDisallowCompletionsTables);
 
   // Do we *really* need to be able to change all of these at runtime?
   Preferences::AddStrongObserver(this, CHECK_MALWARE_PREF);
   Preferences::AddStrongObserver(this, CHECK_PHISHING_PREF);
   Preferences::AddStrongObserver(this, GETHASH_NOISE_PREF);
   Preferences::AddStrongObserver(this, CONFIRM_AGE_PREF);
   Preferences::AddStrongObserver(this, PHISH_TABLE_PREF);
   Preferences::AddStrongObserver(this, MALWARE_TABLE_PREF);
   Preferences::AddStrongObserver(this, DOWNLOAD_BLOCK_TABLE_PREF);
   Preferences::AddStrongObserver(this, DOWNLOAD_ALLOW_TABLE_PREF);
-  Preferences::AddStrongObserver(this, DISALLOW_COMPLETION_TABLE_PREF);
 
   // Force PSM loading on main thread
   nsresult rv;
   nsCOMPtr<nsICryptoHash> acryptoHash = do_CreateInstance(NS_CRYPTO_HASH_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Directory providers must also be accessed on the main thread.
   nsCOMPtr<nsIFile> cacheDir;
@@ -1147,17 +1151,16 @@ nsUrlClassifierDBService::Init()
     return NS_ERROR_FAILURE;
 
   observerService->AddObserver(this, "profile-before-change", false);
   observerService->AddObserver(this, "xpcom-shutdown-threads", false);
 
   return NS_OK;
 }
 
-// nsChannelClassifier is the only consumer of this interface.
 NS_IMETHODIMP
 nsUrlClassifierDBService::Classify(nsIPrincipal* aPrincipal,
                                    nsIURIClassifierCallback* c,
                                    bool* result)
 {
   NS_ENSURE_ARG(aPrincipal);
   NS_ENSURE_TRUE(gDbBackgroundThread, NS_ERROR_NOT_INITIALIZED);
 
@@ -1165,53 +1168,39 @@ nsUrlClassifierDBService::Classify(nsIPr
     *result = false;
     return NS_OK;
   }
 
   nsRefPtr<nsUrlClassifierClassifyCallback> callback =
     new nsUrlClassifierClassifyCallback(c, mCheckMalware, mCheckPhishing);
   if (!callback) return NS_ERROR_OUT_OF_MEMORY;
 
-  nsAutoCString tables;
-  nsAutoCString malware;
-  Preferences::GetCString(MALWARE_TABLE_PREF, &malware);
-  if (!malware.IsEmpty()) {
-    tables.Append(malware);
-  }
-  nsAutoCString phishing;
-  Preferences::GetCString(PHISH_TABLE_PREF, &phishing);
-  if (!phishing.IsEmpty()) {
-    tables.Append(",");
-    tables.Append(phishing);
-  }
-  nsresult rv = LookupURI(aPrincipal, tables, callback, false, result);
+  nsresult rv = LookupURI(aPrincipal, 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;
 }
 
 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, c, true, &dummy);
+  return LookupURI(aPrincipal, c, true, &dummy);
 }
 
 nsresult
 nsUrlClassifierDBService::LookupURI(nsIPrincipal* aPrincipal,
-                                    const nsACString& tables,
                                     nsIUrlClassifierCallback* c,
                                     bool forceLookup,
                                     bool *didLookup)
 {
   NS_ENSURE_TRUE(gDbBackgroundThread, NS_ERROR_NOT_INITIALIZED);
   NS_ENSURE_ARG(aPrincipal);
 
   if (nsContentUtils::IsSystemPrincipal(aPrincipal)) {
@@ -1268,22 +1257,21 @@ nsUrlClassifierDBService::LookupURI(nsIP
   if (!callback)
     return NS_ERROR_OUT_OF_MEMORY;
 
   nsCOMPtr<nsIUrlClassifierLookupCallback> proxyCallback =
     new UrlClassifierLookupCallbackProxy(callback);
 
   // Queue this lookup and call the lookup function to flush the queue if
   // necessary.
-  rv = mWorker->QueueLookup(key, tables, proxyCallback);
+  rv = mWorker->QueueLookup(key, proxyCallback);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // This seems to just call HandlePendingLookups.
-  nsAutoCString dummy;
-  return mWorkerProxy->Lookup(nullptr, dummy, nullptr);
+  return mWorkerProxy->Lookup(nullptr, nullptr);
 }
 
 NS_IMETHODIMP
 nsUrlClassifierDBService::GetTables(nsIUrlClassifierCallback* c)
 {
   NS_ENSURE_TRUE(gDbBackgroundThread, NS_ERROR_NOT_INITIALIZED);
 
   // The proxy callback uses the current thread.
@@ -1392,30 +1380,24 @@ nsUrlClassifierDBService::CacheMisses(Pr
 
   return mWorkerProxy->CacheMisses(results);
 }
 
 bool
 nsUrlClassifierDBService::GetCompleter(const nsACString &tableName,
                                        nsIUrlClassifierHashCompleter **completer)
 {
-  // If we have specified a completer, go ahead and query it. This is only
-  // used by tests.
   if (mCompleters.Get(tableName, completer)) {
     return true;
   }
 
-  // If we don't know about this table at all, or are disallowing completions
-  // for it, skip completion checks.
-  if (!mGethashTables.Contains(tableName) ||
-      mDisallowCompletionsTables.Contains(tableName)) {
+  if (!mGethashTables.Contains(tableName)) {
     return false;
   }
 
-  // Otherwise, call gethash to find the hash completions.
   return NS_SUCCEEDED(CallGetService(NS_URLCLASSIFIERHASHCOMPLETER_CONTRACTID,
                                      completer));
 }
 
 NS_IMETHODIMP
 nsUrlClassifierDBService::Observe(nsISupports *aSubject, const char *aTopic,
                                   const char16_t *aData)
 {
@@ -1436,21 +1418,16 @@ nsUrlClassifierDBService::Observe(nsISup
       // Just read everything again.
       mGethashTables.Clear();
       mGethashTables.AppendElement(Preferences::GetCString(PHISH_TABLE_PREF));
       mGethashTables.AppendElement(Preferences::GetCString(MALWARE_TABLE_PREF));
       mGethashTables.AppendElement(Preferences::GetCString(
         DOWNLOAD_BLOCK_TABLE_PREF));
       mGethashTables.AppendElement(Preferences::GetCString(
         DOWNLOAD_ALLOW_TABLE_PREF));
-    } else if (NS_LITERAL_STRING(DISALLOW_COMPLETION_TABLE_PREF).Equals(aData)) {
-      mDisallowCompletionsTables.Clear();
-      nsCString tables;
-      Preferences::GetCString(DISALLOW_COMPLETION_TABLE_PREF, &tables);
-      Classifier::SplitTables(tables, mDisallowCompletionsTables);
     } else if (NS_LITERAL_STRING(CONFIRM_AGE_PREF).Equals(aData)) {
       gFreshnessGuarantee = Preferences::GetInt(CONFIRM_AGE_PREF,
         CONFIRM_AGE_DEFAULT_SEC);
     }
   } else if (!strcmp(aTopic, "profile-before-change") ||
              !strcmp(aTopic, "xpcom-shutdown-threads")) {
     Shutdown();
   } else {
@@ -1474,17 +1451,16 @@ nsUrlClassifierDBService::Shutdown()
   nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
   if (prefs) {
     prefs->RemoveObserver(CHECK_MALWARE_PREF, this);
     prefs->RemoveObserver(CHECK_PHISHING_PREF, this);
     prefs->RemoveObserver(PHISH_TABLE_PREF, this);
     prefs->RemoveObserver(MALWARE_TABLE_PREF, this);
     prefs->RemoveObserver(DOWNLOAD_BLOCK_TABLE_PREF, this);
     prefs->RemoveObserver(DOWNLOAD_ALLOW_TABLE_PREF, this);
-    prefs->RemoveObserver(DISALLOW_COMPLETION_TABLE_PREF, this);
     prefs->RemoveObserver(CONFIRM_AGE_PREF, this);
   }
 
   DebugOnly<nsresult> rv;
   // First close the db connection.
   if (mWorker) {
     rv = mWorkerProxy->CancelUpdate();
     NS_ASSERTION(NS_SUCCEEDED(rv), "failed to post cancel update event");
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.h
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.h
@@ -66,17 +66,16 @@ public:
 private:
   // No subclassing
   ~nsUrlClassifierDBService();
 
   // Disallow copy constructor
   nsUrlClassifierDBService(nsUrlClassifierDBService&);
 
   nsresult LookupURI(nsIPrincipal* aPrincipal,
-                     const nsACString& tables,
                      nsIUrlClassifierCallback* c,
                      bool forceCheck, bool *didCheck);
 
   // Close db connection and join the background thread if it exists.
   nsresult Shutdown();
 
   // Check if the key is on a known-clean host.
   nsresult CheckClean(const nsACString &lookupKey,
@@ -99,18 +98,15 @@ private:
   // CancelUpdate()/FinishUpdate().  This is used to prevent competing
   // updates, not to determine whether an update is still being
   // processed.
   bool mInUpdate;
 
   // 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;
-
   // Thread that we do the updates on.
   static nsIThread* gDbBackgroundThread;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsUrlClassifierDBService, NS_URLCLASSIFIERDBSERVICE_CID)
 
 #endif // nsUrlClassifierDBService_h_
--- a/toolkit/components/url-classifier/nsUrlClassifierProxies.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierProxies.cpp
@@ -18,28 +18,26 @@ DispatchToWorkerThread(nsIRunnable* r)
   return t->Dispatch(r, NS_DISPATCH_NORMAL);
 }
 
 NS_IMPL_ISUPPORTS1(UrlClassifierDBServiceWorkerProxy,
                               nsIUrlClassifierDBServiceWorker)
 
 NS_IMETHODIMP
 UrlClassifierDBServiceWorkerProxy::Lookup(nsIPrincipal* aPrincipal,
-                                          const nsACString& aTables,
                                           nsIUrlClassifierCallback* aCB)
 {
-  nsCOMPtr<nsIRunnable> r = new LookupRunnable(mTarget, aPrincipal, aTables,
-                                               aCB);
+  nsCOMPtr<nsIRunnable> r = new LookupRunnable(mTarget, aPrincipal, aCB);
   return DispatchToWorkerThread(r);
 }
 
 NS_IMETHODIMP
 UrlClassifierDBServiceWorkerProxy::LookupRunnable::Run()
 {
-  (void) mTarget->Lookup(mPrincipal, mLookupTables, mCB);
+  (void) mTarget->Lookup(mPrincipal, mCB);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 UrlClassifierDBServiceWorkerProxy::GetTables(nsIUrlClassifierCallback* aCB)
 {
   nsCOMPtr<nsIRunnable> r = new GetTablesRunnable(mTarget, aCB);
   return DispatchToWorkerThread(r);
--- a/toolkit/components/url-classifier/nsUrlClassifierProxies.h
+++ b/toolkit/components/url-classifier/nsUrlClassifierProxies.h
@@ -29,30 +29,27 @@ public:
   NS_DECL_NSIURLCLASSIFIERDBSERVICE
   NS_DECL_NSIURLCLASSIFIERDBSERVICEWORKER
 
   class LookupRunnable : public nsRunnable
   {
   public:
     LookupRunnable(nsIUrlClassifierDBServiceWorker* aTarget,
                    nsIPrincipal* aPrincipal,
-                   const nsACString& aTables,
                    nsIUrlClassifierCallback* aCB)
       : mTarget(aTarget)
       , mPrincipal(aPrincipal)
-      , mLookupTables(aTables)
       , mCB(aCB)
     { }
 
     NS_DECL_NSIRUNNABLE
 
   private:
     nsCOMPtr<nsIUrlClassifierDBServiceWorker> mTarget;
     nsCOMPtr<nsIPrincipal> mPrincipal;
-    nsCString mLookupTables;
     nsCOMPtr<nsIUrlClassifierCallback> mCB;
   };
 
   class GetTablesRunnable : public nsRunnable
   {
   public:
     GetTablesRunnable(nsIUrlClassifierDBServiceWorker* aTarget,
                       nsIUrlClassifierCallback* aCB)
--- a/toolkit/components/url-classifier/tests/mochitest/test_classifier.html
+++ b/toolkit/components/url-classifier/tests/mochitest/test_classifier.html
@@ -1,16 +1,17 @@
 <!DOCTYPE HTML>
 <html>
 <head>
   <title>Test the URI Classifier</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 
+<body onload="doUpdate(testUpdate);">
 <p id="display"></p>
 <div id="content" style="display: none">
 </div>
 <pre id="test">
 
 <script class="testbody" type="text/javascript">
 
 var Cc = SpecialPowers.Cc;
@@ -55,21 +56,16 @@ function doUpdate(update) {
 
   dbService.beginUpdate(listener, "test-malware-simple", "");
   dbService.beginStream("", "");
   dbService.updateStream(update);
   dbService.finishStream();
   dbService.finishUpdate();
 }
 
-SpecialPowers.pushPrefEnv(
-  {"set" : [["urlclassifier.malware_table", "test-malware-simple"],
-            ["urlclassifier.phish_table", "test-phish-simple"]]},
-  function() { doUpdate(testUpdate); });
-
 // Expected finish() call is in "classifierFrame.html".
 SimpleTest.waitForExplicitFinish();
 
 </script>
 
 </pre>
 <iframe id="testFrame" onload=""></iframe>
 </body>
--- a/toolkit/components/url-classifier/tests/mochitest/test_classifier_worker.html
+++ b/toolkit/components/url-classifier/tests/mochitest/test_classifier_worker.html
@@ -1,16 +1,17 @@
 <!DOCTYPE HTML>
 <html>
 <head>
   <title>Test the URI Classifier</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 
+<body onload="doUpdate(testUpdate);">
 <p id="display"></p>
 <div id="content" style="display: none">
 </div>
 <pre id="test">
 
 <script class="testbody" type="text/javascript">
 
 var Cc = SpecialPowers.Cc;
@@ -67,21 +68,16 @@ function onmessage(event)
   if (pieces[0] == "finish") {
     SimpleTest.finish();
     return;
   }
 
   is(pieces[0], "success", pieces[1]);
 }
 
-SpecialPowers.pushPrefEnv(
-  {"set" : [["urlclassifier.malware_table", "test-malware-simple"],
-            ["urlclassifier.phish_table", "test-phish-simple"]]},
-  function() { doUpdate(testUpdate); });
-
 window.addEventListener("message", onmessage, false);
 
 SimpleTest.waitForExplicitFinish();
 
 </script>
 
 </pre>
 <iframe id="testFrame" onload=""></iframe>
--- a/toolkit/components/url-classifier/tests/mochitest/test_lookup_system_principal.html
+++ b/toolkit/components/url-classifier/tests/mochitest/test_lookup_system_principal.html
@@ -14,16 +14,16 @@
 <script type="text/javascript">
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 
 var dbService = Cc["@mozilla.org/url-classifier/dbservice;1"]
                 .getService(Ci.nsIUrlClassifierDBService);
 
-dbService.lookup(document.nodePrincipal, "", function(arg) {});
+dbService.lookup(document.nodePrincipal, function(arg) {});
 
 ok(true, "lookup() didn't crash");
 
 </script>
 </pre>
 </body>
-</html>
+</html>
\ No newline at end of file
--- a/toolkit/components/url-classifier/tests/unit/head_urlclassifier.js
+++ b/toolkit/components/url-classifier/tests/unit/head_urlclassifier.js
@@ -26,19 +26,16 @@ var secMan = Cc["@mozilla.org/scriptsecu
 var prefBranch = Cc["@mozilla.org/preferences-service;1"].
                  getService(Ci.nsIPrefBranch);
 prefBranch.setIntPref("urlclassifier.gethashnoise", 0);
 
 // Enable malware/phishing checking for tests
 prefBranch.setBoolPref("browser.safebrowsing.malware.enabled", true);
 prefBranch.setBoolPref("browser.safebrowsing.enabled", true);
 
-// Enable all completions for tests
-prefBranch.setCharPref("urlclassifier.disallow_completions", "");
-
 function delFile(name) {
   try {
     // Delete a previously created sqlite file
     var file = dirSvc.get('ProfLD', Ci.nsIFile);
     file.append(name);
     if (file.exists())
       file.remove(false);
   } catch(e) {
@@ -51,18 +48,16 @@ function cleanUp() {
   delFile("safebrowsing/test-phish-simple.sbstore");
   delFile("safebrowsing/test-malware-simple.sbstore");
   delFile("safebrowsing/test-phish-simple.cache");
   delFile("safebrowsing/test-malware-simple.cache");
   delFile("safebrowsing/test-phish-simple.pset");
   delFile("safebrowsing/test-malware-simple.pset");
 }
 
-var allTables = "test-phish-simple,test-malware-simple";
-
 var dbservice = Cc["@mozilla.org/url-classifier/dbservice;1"].getService(Ci.nsIUrlClassifierDBService);
 var streamUpdater = Cc["@mozilla.org/url-classifier/streamupdater;1"]
                     .getService(Ci.nsIUrlClassifierStreamUpdater);
 
 
 /*
  * Builds an update from an object that looks like:
  *{ "test-phish-simple" : [{
@@ -200,21 +195,21 @@ tableData : function(expectedTables, cb)
 checkUrls: function(urls, expected, cb)
 {
   // work with a copy of the list.
   urls = urls.slice(0);
   var doLookup = function() {
     if (urls.length > 0) {
       var fragment = urls.shift();
       var principal = secMan.getNoAppCodebasePrincipal(iosvc.newURI("http://" + fragment, null, null));
-      dbservice.lookup(principal, allTables,
-                                function(arg) {
-                                  do_check_eq(expected, arg);
-                                  doLookup();
-                                }, true);
+      dbservice.lookup(principal,
+                       function(arg) {
+                         do_check_eq(expected, arg);
+                         doLookup();
+                       }, true);
     } else {
       cb();
     }
   };
   doLookup();
 },
 
 urlsDontExist: function(urls, cb)
--- a/toolkit/components/url-classifier/tests/unit/test_dbservice.js
+++ b/toolkit/components/url-classifier/tests/unit/test_dbservice.js
@@ -91,17 +91,17 @@ function testFailure(arg) {
 }
 
 function checkNoHost()
 {
   // Looking up a no-host uri such as a data: uri should throw an exception.
   var exception;
   try {
     var principal = secMan.getNoAppCodebasePrincipal(iosvc.newURI("data:text/html,<b>test</b>", null, null));
-    dbservice.lookup(principal, allTables);
+    dbservice.lookup(principal);
 
     exception = false;
   } catch(e) {
     exception = true;
   }
   do_check_true(exception);
 
   do_test_finished();
@@ -110,17 +110,17 @@ function checkNoHost()
 function tablesCallbackWithoutSub(tables)
 {
   var parts = tables.split("\n");
   parts.sort();
 
   // there's a leading \n here because splitting left an empty string
   // after the trailing newline, which will sort first
   do_check_eq(parts.join("\n"),
-              "\ntest-malware-simple;a:1\ntest-phish-simple;a:2");
+              "\ntesting-malware-simple;a:1\ntesting-phish-simple;a:2");
 
   checkNoHost();
 }
 
 
 function expireSubSuccess(result) {
   dbservice.getTables(tablesCallbackWithoutSub);
 }
@@ -128,22 +128,22 @@ function expireSubSuccess(result) {
 function tablesCallbackWithSub(tables)
 {
   var parts = tables.split("\n");
   parts.sort();
 
   // there's a leading \n here because splitting left an empty string
   // after the trailing newline, which will sort first
   do_check_eq(parts.join("\n"),
-              "\ntest-malware-simple;a:1\ntest-phish-simple;a:2:s:3");
+              "\ntesting-malware-simple;a:1\ntesting-phish-simple;a:2:s:3");
 
   // verify that expiring a sub chunk removes its name from the list
   var data =
     "n:1000\n" +
-    "i:test-phish-simple\n" +
+    "i:testing-phish-simple\n" +
     "sd:3\n";
 
   doSimpleUpdate(data, expireSubSuccess, testFailure);
 }
 
 function checkChunksWithSub()
 {
   dbservice.getTables(tablesCallbackWithSub);
@@ -152,74 +152,74 @@ function checkChunksWithSub()
 function checkDone() {
   if (--numExpecting == 0)
     checkChunksWithSub();
 }
 
 function phishExists(result) {
   dumpn("phishExists: " + result);
   try {
-    do_check_true(result.indexOf("test-phish-simple") != -1);
+    do_check_true(result.indexOf("testing-phish-simple") != -1);
   } finally {
     checkDone();
   }
 }
 
 function phishDoesntExist(result) {
   dumpn("phishDoesntExist: " + result);
   try {
-    do_check_true(result.indexOf("test-phish-simple") == -1);
+    do_check_true(result.indexOf("testing-phish-simple") == -1);
   } finally {
     checkDone();
   }
 }
 
 function malwareExists(result) {
   dumpn("malwareExists: " + result);
 
   try {
-    do_check_true(result.indexOf("test-malware-simple") != -1);
+    do_check_true(result.indexOf("testing-malware-simple") != -1);
   } finally {
     checkDone();
   }
 }
 
 function checkState()
 {
   numExpecting = 0;
 
   for (var key in phishExpected) {
     var principal = secMan.getNoAppCodebasePrincipal(iosvc.newURI("http://" + key, null, null));
-    dbservice.lookup(principal, allTables, phishExists, true);
+    dbservice.lookup(principal, phishExists, true);
     numExpecting++;
   }
 
   for (var key in phishUnexpected) {
     var principal = secMan.getNoAppCodebasePrincipal(iosvc.newURI("http://" + key, null, null));
-    dbservice.lookup(principal, allTables, phishDoesntExist, true);
+    dbservice.lookup(principal, phishDoesntExist, true);
     numExpecting++;
   }
 
   for (var key in malwareExpected) {
     var principal = secMan.getNoAppCodebasePrincipal(iosvc.newURI("http://" + key, null, null));
-    dbservice.lookup(principal, allTables, malwareExists, true);
+    dbservice.lookup(principal, malwareExists, true);
     numExpecting++;
   }
 }
 
 function testSubSuccess(result)
 {
   do_check_eq(result, "1000");
   checkState();
 }
 
 function do_subs() {
   var data =
     "n:1000\n" +
-    "i:test-phish-simple\n" +
+    "i:testing-phish-simple\n" +
     "s:3:32:" + chunk3Sub.length + "\n" +
     chunk3Sub + "\n" +
     "ad:1\n" +
     "ad:4-6\n";
 
   doSimpleUpdate(data, testSubSuccess, testFailure);
 }
 
@@ -231,28 +231,28 @@ function testAddSuccess(arg) {
 
 function do_adds() {
   // This test relies on the fact that only -regexp tables are ungzipped,
   // and only -hash tables are assumed to be pre-md5'd.  So we use
   // a 'simple' table type to get simple hostname-per-line semantics.
 
   var data =
     "n:1000\n" +
-    "i:test-phish-simple\n" +
+    "i:testing-phish-simple\n" +
     "a:1:32:" + chunk1.length + "\n" +
     chunk1 + "\n" +
     "a:2:32:" + chunk2.length + "\n" +
     chunk2 + "\n" +
     "a:4:32:" + chunk4.length + "\n" +
     chunk4 + "\n" +
     "a:5:32:" + chunk5.length + "\n" +
     chunk5 + "\n" +
     "a:6:32:" + chunk6.length + "\n" +
     chunk6 + "\n" +
-    "i:test-malware-simple\n" +
+    "i:testing-malware-simple\n" +
     "a:1:32:" + chunk2.length + "\n" +
       chunk2 + "\n";
 
   doSimpleUpdate(data, testAddSuccess, testFailure);
 }
 
 function run_test() {
   do_adds();
--- a/toolkit/components/url-classifier/tests/unit/test_digest256.js
+++ b/toolkit/components/url-classifier/tests/unit/test_digest256.js
@@ -120,27 +120,25 @@ add_test(function test_update() {
     "goog-downloadwhite-digest256",
     "goog-downloadwhite-digest256;\n",
     updateSuccess, handleError, handleError);
 });
 
 add_test(function test_url_not_whitelisted() {
   let uri = createURI("http://example.com");
   let principal = gSecMan.getNoAppCodebasePrincipal(uri);
-  gDbService.lookup(principal, "goog-downloadwhite-digest256",
-    function handleEvent(aEvent) {
-      // This URI is not on any lists.
-      do_check_eq("", aEvent);
-      run_next_test();
-    });
+  gDbService.lookup(principal, function handleEvent(aEvent) {
+    // This URI is not on any lists.
+    do_check_eq("", aEvent);
+    run_next_test();
+  });
 });
 
 add_test(function test_url_whitelisted() {
   // Hash of "whitelisted.com/" (canonicalized URL) is:
   // 93CA5F48E15E9861CD37C2D95DB43D23CC6E6DE5C3F8FA6E8BE66F97CC518907
   let uri = createURI("http://whitelisted.com");
   let principal = gSecMan.getNoAppCodebasePrincipal(uri);
-  gDbService.lookup(principal, "goog-downloadwhite-digest256",
-    function handleEvent(aEvent) {
-      do_check_eq("goog-downloadwhite-digest256", aEvent);
-      run_next_test();
-    });
+  gDbService.lookup(principal, function handleEvent(aEvent) {
+    do_check_eq("goog-downloadwhite-digest256", aEvent);
+    run_next_test();
+  });
 });