зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1614434 - Remove unsused function BuildCache. r=gcp
Removed unused function BuildCache(LookupCacheV2* cache, const _PrefixArray& aPrefixArray). This also required removal of RefPtr<T> SetupLookupCache(const _PrefixArray& aPrefixArray) (formerly line 229). Differential Revision: https://phabricator.services.mozilla.com/D62614 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
8f0af48cb1
Коммит
36e86b0e9d
|
@ -192,18 +192,6 @@ void CheckContent(LookupCacheV4* aCache, const _PrefixArray& aPrefixArray) {
|
|||
}
|
||||
}
|
||||
|
||||
static nsresult BuildCache(LookupCacheV2* cache,
|
||||
const _PrefixArray& aPrefixArray) {
|
||||
AddPrefixArray prefixes;
|
||||
AddCompleteArray completions;
|
||||
nsresult rv = PrefixArrayToAddPrefixArray(aPrefixArray, prefixes);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
return cache->Build(prefixes, completions);
|
||||
}
|
||||
|
||||
static nsresult BuildCache(LookupCacheV4* cache,
|
||||
const _PrefixArray& aPrefixArray) {
|
||||
PrefixStringMap map;
|
||||
|
@ -225,23 +213,6 @@ RefPtr<T> SetupLookupCache(const _PrefixArray& aPrefixArray,
|
|||
return cache;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
RefPtr<T> SetupLookupCache(const _PrefixArray& aPrefixArray) {
|
||||
nsCOMPtr<nsIFile> file;
|
||||
NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(file));
|
||||
|
||||
file->AppendNative(GTEST_SAFEBROWSING_DIR);
|
||||
|
||||
RefPtr<T> cache = new T(GTEST_TABLE_V4, EmptyCString(), file);
|
||||
nsresult rv = cache->Init();
|
||||
EXPECT_EQ(rv, NS_OK);
|
||||
|
||||
rv = BuildCache(cache, aPrefixArray);
|
||||
EXPECT_EQ(rv, NS_OK);
|
||||
|
||||
return cache;
|
||||
}
|
||||
|
||||
nsresult BuildLookupCache(const RefPtr<Classifier>& classifier,
|
||||
const nsACString& aTable,
|
||||
_PrefixArray& aPrefixArray) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче