Bug 429755: Apply some random fuzz to safebrowsing backoff intervals. r=tony, a=beltzner

This commit is contained in:
2008-04-23 09:57:55 -07:00
parent 7f5932b5e7
commit 7aa96bd46d
4 changed files with 76 additions and 65 deletions

View File

@@ -150,13 +150,17 @@ PROT_DataProvider.prototype.getUrlPref_ = function(prefName) {
var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
.getService(Components.interfaces.nsIXULAppInfo);
var mozClientStr = MOZ_OFFICIAL_BUILD ? 'navclient-auto-ffox' : appInfo.name;
var mozClientStr = this.prefs_.getPref("browser.safebrowsing.clientid",
MOZ_OFFICIAL_BUILD ? 'navclient-auto-ffox' : appInfo.name);
var versionStr = this.prefs_.getPref("browser.safebrowsing.clientver",
appInfo.version);
// Parameter substitution
url = url.replace(MOZ_PARAM_LOCALE, this.getLocale_());
url = url.replace(MOZ_PARAM_CLIENT, mozClientStr);
url = url.replace(MOZ_PARAM_BUILDID, appInfo.appBuildID);
url = url.replace(MOZ_PARAM_VERSION, appInfo.version);
url = url.replace(MOZ_PARAM_VERSION, versionStr);
return url;
}