home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Minami 83
/
MINAMI83.iso
/
Extra
/
DivXInstaller.exe
/
$PLUGINSDIR
/
GoogleToolbarFirefox.msi
/
xpi
/
amulet-jslib
/
globalstore.js
< prev
next >
Wrap
Text File
|
2006-08-07
|
4KB
|
123 lines
function PROT_GlobalStore(prefix, lang) {
this.debugZone = "globalstore";
this.prefix_ = prefix;
this.lang_ = lang;
}
PROT_GlobalStore.prototype.getPhishWardenEnabledPrefName = function() {
return this.prefix_ + "enabled";
}
PROT_GlobalStore.prototype.getServerCheckEnabledPrefName = function() {
return this.prefix_ + "advancedprotection";
}
PROT_GlobalStore.prototype.getServerCheckEnabledDefaultPrefName = function() {
return this.prefix_ + "advancedprotection.default";
}
PROT_GlobalStore.prototype.getSendUserReportsPrefName = function() {
return this.getServerCheckEnabledPrefName();
}
PROT_GlobalStore.prototype.getContentAnalyzerEnabledPrefName = function() {
return this.getServerCheckEnabledPrefName();
}
PROT_GlobalStore.prototype.getSkipLocalWhitelistPrefName = function() {
return this.prefix_ + "skip.local-whitelist";
}
PROT_GlobalStore.prototype.getHaveRunBeforePrefName = function() {
return this.prefix_ + "hasrun";
}
PROT_GlobalStore.prototype.getToolbarPageRankPrefName = function() {
return "google.toolbar.button_option.gtbPageRank";
}
PROT_GlobalStore.prototype.getTableVersionPrefPrefix = function() {
return this.prefix_ + "tableversion.";
}
PROT_GlobalStore.prototype.getAppDirectoryName = function () {
return "google_safebrowsing";
}
PROT_GlobalStore.prototype.getGetMeOutOfHereURL = function () {
var url = "http://www.google.com/";
var prefs = Cc["@mozilla.org/preferences-service;1"]
.getService(Ci.nsIPrefService).getBranch(null);
try {
var url = prefs.getComplexValue("browser.startup.homepage",
Ci.nsIPrefLocalizedString).data;
} catch(e) {
G_Debug(this, "Couldn't get homepage pref: " + e);
}
return url;
}
PROT_GlobalStore.prototype.getAntiPhishingURL = function () {
return "http://antiphishing.org";
}
PROT_GlobalStore.prototype.getPolicyURL = function () {
return "http://www.google.com/support/toolbar/?quick=privacy&v=2.0f&hl="
+ this.lang_;
}
PROT_GlobalStore.prototype.getSubmitSuccessURL = function() {
return "http://www.google.com/tools/firefox/toolbar/FT2/intl/"
+ this.lang_ + "/submit_success.html";
}
PROT_GlobalStore.prototype.getGenericPhishSubmitURL = function () {
var url = Cc["@mozilla.org/network/standard-url;1"]
.createInstance(Ci.nsIURL);
url.spec = "http://www.google.com/safebrowsing/report_general/?continue="
+ encodeURIComponent(this.getSubmitSuccessURL()) + "&hl="
+ this.lang_;
return url;
}
PROT_GlobalStore.prototype.getFalsePositiveURL = function () {
var url = Cc["@mozilla.org/network/standard-url;1"]
.createInstance(Ci.nsIURL);
url.spec = "http://www.google.com/safebrowsing/report_error/?continue="
+ encodeURIComponent(this.getSubmitSuccessURL()) + "&hl="
+ this.lang_;
return url;
}
PROT_GlobalStore.prototype.getSubmitUrl = function () {
var url = Cc["@mozilla.org/network/standard-url;1"]
.createInstance(Ci.nsIURL);
url.spec = "http://www.google.com/safebrowsing/report_phish/?continue="
+ encodeURIComponent(this.getSubmitSuccessURL()) + "&hl="
+ this.lang_;
return url;
}
PROT_GlobalStore.prototype.getHomePageURL = function () {
return "http://www.google.com/tools/service/npredir?r=ff_tb_home&hl="
+ this.lang_;
}
PROT_GlobalStore.prototype.getPhishingFaqURL = function () {
return "http://www.google.com/tools/service/npredir?r=ff_tb_faq&hl="
+ this.lang_;
}
PROT_GlobalStore.prototype.getTestURLs = function () {
return [ "http://www.google.com/tools/firefox/toolbar/FT2/intl/"
+ this.lang_ + "/phish-o-rama.html",
"http://www.google.com/tools/firefox/safebrowsing/phish-o-rama.html" ];
}
PROT_GlobalStore.prototype.getLocalizedTestURL = function() {
return this.getTestURLs()[0];
}
PROT_GlobalStore.prototype.getLookupserverURL = function () {
return "http://sb.google.com/safebrowsing/lookup?";
}
PROT_GlobalStore.prototype.getUpdateserverURL = function () {
return "http://sb.google.com/safebrowsing/update?";
}
PROT_GlobalStore.prototype.getActionReportURL = function () {
return "http://sb.google.com/safebrowsing/report?";
}
PROT_GlobalStore.prototype.getResultsReportURL = function () {
return "http://sb.google.com/safebrowsing/results?";
}
PROT_GlobalStore.prototype.getGetKeyURL = function () {
return "https://www.google.com/safebrowsing/getkey?";
}
PROT_GlobalStore.prototype.getKeyFilename = function () {
return "kf.txt";
}
PROT_GlobalStore.prototype.getExtensionName = function() {
return "Google Safe Browsing";
}
PROT_GlobalStore.prototype.getContentAnalyzerUnittestEnabledPrefName = function() {
return "google.toolbar.contentanalyzer_unittest_enabled";
}