home *** CD-ROM | disk | FTP | other *** search
/ Minami 83 / MINAMI83.iso / Extra / DivXInstaller.exe / $PLUGINSDIR / GoogleToolbarFirefox.msi / xpi / amulet-jslib / globalstore.js < prev    next >
Text File  |  2006-08-07  |  4KB  |  123 lines

  1. function PROT_GlobalStore(prefix, lang) {
  2. this.debugZone = "globalstore";
  3. this.prefix_ = prefix;
  4. this.lang_ = lang;
  5. }
  6. PROT_GlobalStore.prototype.getPhishWardenEnabledPrefName = function() {
  7. return this.prefix_ + "enabled";
  8. }
  9. PROT_GlobalStore.prototype.getServerCheckEnabledPrefName = function() {
  10. return this.prefix_ + "advancedprotection";
  11. }
  12. PROT_GlobalStore.prototype.getServerCheckEnabledDefaultPrefName = function() {
  13. return this.prefix_ + "advancedprotection.default";
  14. }
  15. PROT_GlobalStore.prototype.getSendUserReportsPrefName = function() {
  16. return this.getServerCheckEnabledPrefName();
  17. }
  18. PROT_GlobalStore.prototype.getContentAnalyzerEnabledPrefName = function() {
  19. return this.getServerCheckEnabledPrefName();
  20. }
  21. PROT_GlobalStore.prototype.getSkipLocalWhitelistPrefName = function() {
  22. return this.prefix_ + "skip.local-whitelist";
  23. }
  24. PROT_GlobalStore.prototype.getHaveRunBeforePrefName = function() {
  25. return this.prefix_ + "hasrun";
  26. }
  27. PROT_GlobalStore.prototype.getToolbarPageRankPrefName = function() {
  28. return "google.toolbar.button_option.gtbPageRank";
  29. }
  30. PROT_GlobalStore.prototype.getTableVersionPrefPrefix = function() {
  31. return this.prefix_ + "tableversion.";
  32. }
  33. PROT_GlobalStore.prototype.getAppDirectoryName = function () {
  34. return "google_safebrowsing";
  35. }
  36. PROT_GlobalStore.prototype.getGetMeOutOfHereURL = function () {
  37. var url = "http://www.google.com/";
  38. var prefs = Cc["@mozilla.org/preferences-service;1"]
  39. .getService(Ci.nsIPrefService).getBranch(null);
  40. try {
  41. var url = prefs.getComplexValue("browser.startup.homepage",
  42. Ci.nsIPrefLocalizedString).data;
  43. } catch(e) {
  44. G_Debug(this, "Couldn't get homepage pref: " + e);
  45. }
  46. return url;
  47. }
  48. PROT_GlobalStore.prototype.getAntiPhishingURL = function () {
  49. return "http://antiphishing.org";
  50. }
  51. PROT_GlobalStore.prototype.getPolicyURL = function () {
  52. return "http://www.google.com/support/toolbar/?quick=privacy&v=2.0f&hl="
  53. + this.lang_;
  54. }
  55. PROT_GlobalStore.prototype.getSubmitSuccessURL = function() {
  56. return "http://www.google.com/tools/firefox/toolbar/FT2/intl/"
  57. + this.lang_ + "/submit_success.html";
  58. }
  59. PROT_GlobalStore.prototype.getGenericPhishSubmitURL = function () {
  60. var url = Cc["@mozilla.org/network/standard-url;1"]
  61. .createInstance(Ci.nsIURL);
  62. url.spec = "http://www.google.com/safebrowsing/report_general/?continue="
  63. + encodeURIComponent(this.getSubmitSuccessURL()) + "&hl="
  64. + this.lang_;
  65. return url;
  66. }
  67. PROT_GlobalStore.prototype.getFalsePositiveURL = function () {
  68. var url = Cc["@mozilla.org/network/standard-url;1"]
  69. .createInstance(Ci.nsIURL);
  70. url.spec = "http://www.google.com/safebrowsing/report_error/?continue="
  71. + encodeURIComponent(this.getSubmitSuccessURL()) + "&hl="
  72. + this.lang_;
  73. return url;
  74. }
  75. PROT_GlobalStore.prototype.getSubmitUrl = function () {
  76. var url = Cc["@mozilla.org/network/standard-url;1"]
  77. .createInstance(Ci.nsIURL);
  78. url.spec = "http://www.google.com/safebrowsing/report_phish/?continue="
  79. + encodeURIComponent(this.getSubmitSuccessURL()) + "&hl="
  80. + this.lang_;
  81. return url;
  82. }
  83. PROT_GlobalStore.prototype.getHomePageURL = function () {
  84. return "http://www.google.com/tools/service/npredir?r=ff_tb_home&hl="
  85. + this.lang_;
  86. }
  87. PROT_GlobalStore.prototype.getPhishingFaqURL = function () {
  88. return "http://www.google.com/tools/service/npredir?r=ff_tb_faq&hl="
  89. + this.lang_;
  90. }
  91. PROT_GlobalStore.prototype.getTestURLs = function () {
  92. return [ "http://www.google.com/tools/firefox/toolbar/FT2/intl/"
  93. + this.lang_ + "/phish-o-rama.html",
  94. "http://www.google.com/tools/firefox/safebrowsing/phish-o-rama.html" ];
  95. }
  96. PROT_GlobalStore.prototype.getLocalizedTestURL = function() {
  97. return this.getTestURLs()[0];
  98. }
  99. PROT_GlobalStore.prototype.getLookupserverURL = function () {
  100. return "http://sb.google.com/safebrowsing/lookup?";
  101. }
  102. PROT_GlobalStore.prototype.getUpdateserverURL = function () {
  103. return "http://sb.google.com/safebrowsing/update?";
  104. }
  105. PROT_GlobalStore.prototype.getActionReportURL = function () {
  106. return "http://sb.google.com/safebrowsing/report?";
  107. }
  108. PROT_GlobalStore.prototype.getResultsReportURL = function () {
  109. return "http://sb.google.com/safebrowsing/results?";
  110. }
  111. PROT_GlobalStore.prototype.getGetKeyURL = function () {
  112. return "https://www.google.com/safebrowsing/getkey?";
  113. }
  114. PROT_GlobalStore.prototype.getKeyFilename = function () {
  115. return "kf.txt";
  116. }
  117. PROT_GlobalStore.prototype.getExtensionName = function() {
  118. return "Google Safe Browsing";
  119. }
  120. PROT_GlobalStore.prototype.getContentAnalyzerUnittestEnabledPrefName = function() {
  121. return "google.toolbar.contentanalyzer_unittest_enabled";
  122. }
  123.