Bug 1434206 - Remove unused and undefined functions. r?gcp
mProtocolV2 is still used to skip the caching of misses on V4:
https://searchfox.org/mozilla-central/rev/d4b9e50875ad7e5d20f2fee6a53418315f6dfcc0/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp#1353-1357
MozReview-Commit-ID: 2cHh9JiZuHh
--- a/toolkit/components/url-classifier/Classifier.h
+++ b/toolkit/components/url-classifier/Classifier.h
@@ -79,18 +79,16 @@ public:
*/
void FlushAndDisableAsyncUpdate();
/**
* Apply full hashes retrived from gethash to cache.
*/
nsresult ApplyFullHashes(nsTArray<TableUpdate*>* aUpdates);
- nsresult CacheCompletions(const CacheResultArray& aResults);
- uint32_t GetHashKey(void) { return mHashKey; }
/*
* 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);
--- a/toolkit/components/url-classifier/LookupCache.h
+++ b/toolkit/components/url-classifier/LookupCache.h
@@ -77,17 +77,16 @@ public:
nsCString mTableName;
uint32_t mPartialHashLength;
// True as long as this lookup is complete and hasn't expired.
bool mConfirmed;
- // TODO : Is this necessary
bool mProtocolV2;
};
typedef nsTArray<LookupResult> LookupResultArray;
class CacheResult {
public:
enum { V2, V4 };
--- a/toolkit/components/url-classifier/nsIUrlClassifierDBService.idl
+++ b/toolkit/components/url-classifier/nsIUrlClassifierDBService.idl
@@ -2,21 +2,18 @@
* 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 "nsISupports.idl"
%{C++
#include "Entries.h"
#include "LookupCache.h"
-class nsUrlClassifierLookupResult;
%}
[ptr] native ResultArray(nsTArray<mozilla::safebrowsing::LookupResult>);
-[ptr] native CacheCompletionArray(nsTArray<mozilla::safebrowsing::CacheResult>);
-[ptr] native PrefixArray(mozilla::safebrowsing::PrefixArray);
interface nsIUrlClassifierHashCompleter;
interface nsIPrincipal;
// Interface for JS function callbacks
[scriptable, function, uuid(4ca27b6b-a674-4b3d-ab30-d21e2da2dffb)]
interface nsIUrlClassifierCallback : nsISupports {
void handleEvent(in ACString value);
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.h
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.h
@@ -141,20 +141,16 @@ private:
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.
nsresult Shutdown();
- // Check if the key is on a known-clean host.
- nsresult CheckClean(const nsACString &lookupKey,
- bool *clean);
-
nsresult ReadTablesFromPrefs();
RefPtr<nsUrlClassifierDBServiceWorker> mWorker;
RefPtr<UrlClassifierDBServiceWorkerProxy> mWorkerProxy;
nsInterfaceHashtable<nsCStringHashKey, nsIUrlClassifierHashCompleter> mCompleters;
// TRUE if the nsURIClassifier implementation should check for malware