Bug 999477: Fix FindInReadable calls in ApplicationReputation (r=gcp)

This commit is contained in:
Monica Chew 2014-04-22 09:14:55 -07:00
parent 242df22ac5
commit 706b954764

View File

@ -298,7 +298,7 @@ PendingDBLookup::HandleEvent(const nsACString& tables)
// Blocklisting trumps allowlisting.
nsAutoCString blockList;
Preferences::GetCString(PREF_DOWNLOAD_BLOCK_TABLE, &blockList);
if (!mAllowlistOnly && FindInReadable(tables, blockList)) {
if (!mAllowlistOnly && FindInReadable(blockList, tables)) {
Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_LOCAL, BLOCK_LIST);
LOG(("Found principal %s on blocklist [this = %p]", mSpec.get(), this));
return mPendingLookup->OnComplete(true, NS_OK);
@ -306,7 +306,7 @@ PendingDBLookup::HandleEvent(const nsACString& tables)
nsAutoCString allowList;
Preferences::GetCString(PREF_DOWNLOAD_ALLOW_TABLE, &allowList);
if (FindInReadable(tables, allowList)) {
if (FindInReadable(allowList, tables)) {
Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_LOCAL, ALLOW_LIST);
LOG(("Found principal %s on allowlist [this = %p]", mSpec.get(), this));
return mPendingLookup->OnComplete(false, NS_OK);