зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1100024: ClassifyLocal should not lookup in any tables if safebrowsing is disabled (r=gcp)
This commit is contained in:
Родитель
6601228f73
Коммит
152c9afdc4
|
@ -1269,17 +1269,19 @@ nsUrlClassifierDBService::Init()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
static void BuildTables(bool aTrackingProtectionEnabled, nsCString &tables)
|
||||
void
|
||||
nsUrlClassifierDBService::BuildTables(bool aTrackingProtectionEnabled,
|
||||
nsCString &tables)
|
||||
{
|
||||
nsAutoCString malware;
|
||||
// LookupURI takes a comma-separated list already.
|
||||
Preferences::GetCString(MALWARE_TABLE_PREF, &malware);
|
||||
if (!malware.IsEmpty()) {
|
||||
if (mCheckMalware && !malware.IsEmpty()) {
|
||||
tables.Append(malware);
|
||||
}
|
||||
nsAutoCString phishing;
|
||||
Preferences::GetCString(PHISH_TABLE_PREF, &phishing);
|
||||
if (!phishing.IsEmpty()) {
|
||||
if (mCheckPhishing && !phishing.IsEmpty()) {
|
||||
tables.Append(',');
|
||||
tables.Append(phishing);
|
||||
}
|
||||
|
|
|
@ -87,6 +87,9 @@ private:
|
|||
// Read everything into mGethashTables and mDisallowCompletionTables
|
||||
nsresult ReadTablesFromPrefs();
|
||||
|
||||
// Build a comma-separated list of tables to check
|
||||
void BuildTables(bool trackingProtectionEnabled, nsCString& tables);
|
||||
|
||||
nsRefPtr<nsUrlClassifierDBServiceWorker> mWorker;
|
||||
nsCOMPtr<nsIUrlClassifierDBServiceWorker> mWorkerProxy;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче