зеркало из https://github.com/mozilla/pjs.git
Bug 354199 ��� firefox fetches a key from sb.google.com in local list mode
patch: only get key when in remote mode r=mmchew
This commit is contained in:
Родитель
8f46f173d1
Коммит
2a4cae1b8b
|
@ -80,6 +80,10 @@ function PROT_DataProvider() {
|
|||
// Watch for when anti-phishing is toggled on or off.
|
||||
this.prefs_.addObserver(kPhishWardenEnabledPref,
|
||||
BindToObject(this.loadDataProviderPrefs_, this));
|
||||
|
||||
// Watch for when remote lookups are toggled on or off.
|
||||
this.prefs_.addObserver(kPhishWardenRemoteLookups,
|
||||
BindToObject(this.loadDataProviderPrefs_, this));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -129,11 +133,15 @@ PROT_DataProvider.prototype.updateListManager_ = function() {
|
|||
listManager.setUpdateUrl(this.getUpdateURL());
|
||||
|
||||
// setKeyUrl has the side effect of fetching a key from the server.
|
||||
// This shouldn't happen if anti-phishing is disabled, so we need to
|
||||
// check for that.
|
||||
// This shouldn't happen if anti-phishing is disabled or we're in local
|
||||
// list mode, so we need to check for that.
|
||||
var isEnabled = this.prefs_.getPref(kPhishWardenEnabledPref, false);
|
||||
if (isEnabled) {
|
||||
var remoteLookups = this.prefs_.getPref(kPhishWardenRemoteLookups, false);
|
||||
if (isEnabled && remoteLookups) {
|
||||
listManager.setKeyUrl(this.getKeyURL());
|
||||
} else {
|
||||
// Clear the key to stop updates.
|
||||
listManager.setKeyUrl("");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче