Bug 1394031 - Remove mCryptoHash members of nsUrlClassifierDBServiceWorker and ProtocolParser
The usage of cryptoHash consists of a complete set of Init, Update, and Finish, there's no reason to keep it around MozReview-Commit-ID: 7bT9IsWEM5m
This commit is contained in:
@@ -8,8 +8,6 @@
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsArrayUtils.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsICryptoHash.h"
|
||||
#include "nsICryptoHMAC.h"
|
||||
#include "nsIDirectoryService.h"
|
||||
#include "nsIKeyModule.h"
|
||||
#include "nsIObserverService.h"
|
||||
@@ -467,8 +465,6 @@ nsUrlClassifierDBServiceWorker::BeginStream(const nsACString &table)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
mProtocolParser->Init(mCryptoHash);
|
||||
|
||||
if (!table.IsEmpty()) {
|
||||
mProtocolParser->SetCurrentTable(table);
|
||||
}
|
||||
@@ -809,7 +805,6 @@ nsUrlClassifierDBServiceWorker::CloseDb()
|
||||
mClassifier = nullptr;
|
||||
}
|
||||
|
||||
mCryptoHash = nullptr;
|
||||
LOG(("urlclassifier db closed\n"));
|
||||
|
||||
return NS_OK;
|
||||
@@ -944,9 +939,6 @@ nsUrlClassifierDBServiceWorker::OpenDb()
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
mCryptoHash = do_CreateInstance(NS_CRYPTO_HASH_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsAutoPtr<Classifier> classifier(new (fallible) Classifier());
|
||||
if (!classifier) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
Reference in New Issue
Block a user