Bug 1547041 - Update and tidy SeaMonkey application preferences - Part 1: fixing commas, semicolons and old function naming. r=frg
authorIan Neal <iann_cvs@blueyonder.co.uk>
Sat, 22 Jun 2019 11:04:32 +0200
changeset 35921 bcf0c2684ace6bca63d1fa08f35c8016e1d8bb54
parent 35920 342eb3a6e773b3471fe9f92534711ef73094e869
child 35922 60e3e0e72160bfd8bf8c183428ab38eb11ac4a9b
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersfrg
bugs1547041
Bug 1547041 - Update and tidy SeaMonkey application preferences - Part 1: fixing commas, semicolons and old function naming. r=frg
suite/components/pref/content/pref-applications.js
--- a/suite/components/pref/content/pref-applications.js
+++ b/suite/components/pref/content/pref-applications.js
@@ -194,33 +194,33 @@ HandlerInfoWrapper.prototype = {
     return this.wrappedHandlerInfo.preferredApplicationHandler;
   },
 
   set preferredApplicationHandler(aNewValue) {
     this.wrappedHandlerInfo.preferredApplicationHandler = aNewValue;
 
     // Make sure the preferred handler is in the set of possible handlers.
     if (aNewValue)
-      this.addPossibleApplicationHandler(aNewValue)
+      this.addPossibleApplicationHandler(aNewValue);
   },
 
   get possibleApplicationHandlers() {
     return this.wrappedHandlerInfo.possibleApplicationHandlers;
   },
 
-  addPossibleApplicationHandler: function(aNewHandler) {
+  addPossibleApplicationHandler(aNewHandler) {
     try {
       if (this.possibleApplicationHandlers.indexOf(0, aNewHandler) != -1)
         return;
     } catch (e) {
     }
     this.possibleApplicationHandlers.appendElement(aNewHandler);
   },
 
-  removePossibleApplicationHandler: function(aHandler) {
+  removePossibleApplicationHandler(aHandler) {
     var defaultApp = this.preferredApplicationHandler;
     if (defaultApp && aHandler.equals(defaultApp)) {
       // If the app we remove was the default app, we must make sure
       // it won't be used anymore
       this.alwaysAskBeforeHandling = true;
       this.preferredApplicationHandler = null;
     }
 
@@ -340,43 +340,43 @@ HandlerInfoWrapper.prototype = {
   // check for the presence of a user-configured record to determine whether
   // or not this type is only handled by a plugin.  Filed as bug 395142.
   handledOnlyByPlugin: undefined,
 
   get isDisabledPluginType() {
     return this._getDisabledPluginTypes().indexOf(this.type) != -1;
   },
 
-  _getDisabledPluginTypes: function() {
+  _getDisabledPluginTypes() {
     var types = "";
 
     if (Services.prefs.prefHasUserValue(PREF_DISABLED_PLUGIN_TYPES))
       types = Services.prefs.getCharPref(PREF_DISABLED_PLUGIN_TYPES);
 
     // Only split if the string isn't empty so we don't end up with an array
     // containing a single empty string.
     return types ? types.split(",") : [];
   },
 
-  disablePluginType: function() {
+  disablePluginType() {
     var disabledPluginTypes = this._getDisabledPluginTypes();
 
     if (disabledPluginTypes.indexOf(this.type) == -1)
       disabledPluginTypes.push(this.type);
 
     Services.prefs.setCharPref(PREF_DISABLED_PLUGIN_TYPES,
                                disabledPluginTypes.join(","));
 
     // Update the category manager so existing browser windows update.
     categoryMgr.deleteCategoryEntry("Gecko-Content-Viewers",
                                           this.type,
                                           false);
   },
 
-  enablePluginType: function() {
+  enablePluginType() {
     var disabledPluginTypes = this._getDisabledPluginTypes();
 
     var type = this.type;
     disabledPluginTypes = disabledPluginTypes.filter(v => v != type);
 
     Services.prefs.setCharPref(PREF_DISABLED_PLUGIN_TYPES,
                                disabledPluginTypes.join(","));
 
@@ -388,33 +388,33 @@ HandlerInfoWrapper.prototype = {
                        false,
                        true);
   },
 
 
   //**************************************************************************//
   // Storage
 
-  store: function() {
+  store() {
     handlerSvc.store(this.wrappedHandlerInfo);
   },
 
 
   //**************************************************************************//
   // Icons
 
   get smallIcon() {
     return this._getIcon(16);
   },
 
   get largeIcon() {
     return this._getIcon(32);
   },
 
-  _getIcon: function(aSize) {
+  _getIcon(aSize) {
     if (this.primaryExtension)
       return "moz-icon://goat." + this.primaryExtension + "?size=" + aSize;
 
     if (this.wrappedHandlerInfo instanceof Ci.nsIMIMEInfo)
       return "moz-icon://goat?size=" + aSize + "&contentType=" + this.type;
 
     // We're falling back to a generic icon when we can't get a URL for one
     // (for example in the case of protocol schemes).
@@ -445,16 +445,18 @@ HandlerInfoWrapper.prototype = {
  * don't provide.
  */
 
 function FeedHandlerInfo(aMIMEType) {
   HandlerInfoWrapper.call(this, aMIMEType, null);
 }
 
 FeedHandlerInfo.prototype = {
+  __proto__: HandlerInfoWrapper.prototype,
+
   //**************************************************************************//
   // nsIHandlerInfo
 
   get description() {
     return document.getElementById("bundlePrefApplications")
                    .getString(this.typeClass);
   },
 
@@ -540,17 +542,17 @@ FeedHandlerInfo.prototype = {
 
       removeElementAt: function(aIndex) {
         this._removed.push(this._inner[aIndex]);
         this._inner.splice(aIndex, 1);
       },
 
       queryElementAt: function(aIndex, aInterface) {
         return this._inner[aIndex].QueryInterface(aInterface);
-      }
+      },
     };
 
     // Add the selected local app if it's different from the OS default handler.
     // Unlike for other types, we can store only one local app at a time for the
     // feed type, since we store it in a preference that historically stores
     // only a single path.  But we display all the local apps the user chooses
     // while the prefpane is open, only dropping the list when the user closes
     // the prefpane, for maximum usability and consistency with other types.
@@ -704,17 +706,17 @@ FeedHandlerInfo.prototype = {
   //**************************************************************************//
   // Storage
 
   // Changes to the preferred action and handler take effect immediately
   // (we write them out to the preferences right as they happen),
   // so we when the controller calls store() after modifying the handlers,
   // the only thing we need to store is the removal of possible handlers
   // XXX Should we hold off on making the changes until this method gets called?
-  store: function() {
+  store() {
     for (let app of this._possibleApplicationHandlers._removed) {
       if (app instanceof Ci.nsILocalHandlerApp) {
         let pref = document.getElementById(PREF_FEED_SELECTED_APP);
         var preferredAppFile = pref.value;
         if (preferredAppFile) {
           let preferredApp = getLocalHandlerApp(preferredAppFile);
           if (app.equals(preferredApp))
             pref.reset();
@@ -734,46 +736,44 @@ FeedHandlerInfo.prototype = {
 
   smallIcon: null,
 
   largeIcon: null,
 
   // The type class is used for setting icons through CSS for types that don't
   // explicitly set their icons.
   typeClass: "webFeed",
-
-  __proto__: HandlerInfoWrapper.prototype
 };
 
 var feedHandlerInfo = {
   __proto__: new FeedHandlerInfo(TYPE_MAYBE_FEED),
   _prefSelectedApp: PREF_FEED_SELECTED_APP,
   _prefSelectedWeb: PREF_FEED_SELECTED_WEB,
   _prefSelectedAction: PREF_FEED_SELECTED_ACTION,
   _prefSelectedReader: PREF_FEED_SELECTED_READER,
-  typeClass: "webFeed"
-}
+  typeClass: "webFeed",
+};
 
 var videoFeedHandlerInfo = {
   __proto__: new FeedHandlerInfo(TYPE_MAYBE_VIDEO_FEED),
   _prefSelectedApp: PREF_VIDEO_FEED_SELECTED_APP,
   _prefSelectedWeb: PREF_VIDEO_FEED_SELECTED_WEB,
   _prefSelectedAction: PREF_VIDEO_FEED_SELECTED_ACTION,
   _prefSelectedReader: PREF_VIDEO_FEED_SELECTED_READER,
-  typeClass: "videoPodcastFeed"
-}
+  typeClass: "videoPodcastFeed",
+};
 
 var audioFeedHandlerInfo = {
   __proto__: new FeedHandlerInfo(TYPE_MAYBE_AUDIO_FEED),
   _prefSelectedApp: PREF_AUDIO_FEED_SELECTED_APP,
   _prefSelectedWeb: PREF_AUDIO_FEED_SELECTED_WEB,
   _prefSelectedAction: PREF_AUDIO_FEED_SELECTED_ACTION,
   _prefSelectedReader: PREF_AUDIO_FEED_SELECTED_READER,
-  typeClass: "audioPodcastFeed"
-}
+  typeClass: "audioPodcastFeed",
+};
 
 
 //****************************************************************************//
 // Prefpane Controller
 
 var gApplicationsPane = {
   // The set of types the app knows how to handle.  A hash of HandlerInfoWrapper
   // objects, indexed by type.
@@ -803,17 +803,17 @@ var gApplicationsPane = {
   _prefsBundle    : null,
   _list           : null,
   _filter         : null,
 
 
   //**************************************************************************//
   // Initialization & Destruction
 
-  init: function() {
+  init() {
     // Initialize shortcuts to some commonly accessed elements & values.
     this._brandShortName =
       document.getElementById("bundleBrand").getString("brandShortName");
     this._prefsBundle = document.getElementById("bundlePrefApplications");
     this._list = document.getElementById("handlersView");
     this._filter = document.getElementById("filter");
 
     // Observe preferences that influence what we display so we can rebuild
@@ -856,17 +856,17 @@ var gApplicationsPane = {
     this._rebuildVisibleTypes();
     this._sortVisibleTypes();
     this._rebuildView();
 
     // Notify observers that the UI is now ready
     Services.obs.notifyObservers(window, "app-handler-pane-loaded");
   },
 
-  destroy: function() {
+  destroy() {
     this._list.removeEventListener("command", this);
     this._list.removeEventListener("select", this);
     window.removeEventListener("unload", this);
     Services.prefs.removeObserver(PREF_SHOW_PLUGINS_IN_LIST, this);
     Services.prefs.removeObserver(PREF_HIDE_PLUGINS_WITHOUT_EXTENSIONS, this);
     Services.prefs.removeObserver(PREF_FEED_SELECTED_APP, this);
     Services.prefs.removeObserver(PREF_FEED_SELECTED_WEB, this);
     Services.prefs.removeObserver(PREF_FEED_SELECTED_ACTION, this);
@@ -892,17 +892,17 @@ var gApplicationsPane = {
 
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
 
   //**************************************************************************//
   // nsIObserver
 
-  observe: function (aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     // Rebuild the list when there are changes to preferences that influence
     // whether or not to show certain entries in the list.
     if (aTopic == "nsPref:changed" && !this._storingAction) {
       // These two prefs alter the list of visible types, so we have to rebuild
       // that list when they change.
       if (aData == PREF_SHOW_PLUGINS_IN_LIST ||
           aData == PREF_HIDE_PLUGINS_WITHOUT_EXTENSIONS) {
         this._rebuildVisibleTypes();
@@ -914,17 +914,17 @@ var gApplicationsPane = {
       this._rebuildView();
     }
   },
 
 
   //**************************************************************************//
   // nsIDOMEventListener
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "unload":
         this.destroy();
         break;
       case "select":
         if (this._list.selectedItem)
           this._list.setAttribute("lastSelectedType",
                                   this._list.selectedItem.type);
@@ -956,23 +956,23 @@ var gApplicationsPane = {
         }
     }
   },
 
 
   //**************************************************************************//
   // Composed Model Construction
 
-  _loadData: function() {
+  _loadData() {
     this._loadFeedHandler();
     this._loadPluginHandlers();
     this._loadApplicationHandlers();
   },
 
-  _loadFeedHandler: function() {
+  _loadFeedHandler() {
     this._handledTypes[TYPE_MAYBE_FEED] = feedHandlerInfo;
     feedHandlerInfo.handledOnlyByPlugin = false;
 
     this._handledTypes[TYPE_MAYBE_VIDEO_FEED] = videoFeedHandlerInfo;
     videoFeedHandlerInfo.handledOnlyByPlugin = false;
 
     this._handledTypes[TYPE_MAYBE_AUDIO_FEED] = audioFeedHandlerInfo;
     audioFeedHandlerInfo.handledOnlyByPlugin = false;
@@ -993,17 +993,17 @@ var gApplicationsPane = {
    *
    * I'll also note that my reading of nsPluginTag::RegisterWithCategoryManager
    * suggests that enabledPlugin is only determined during registration
    * and does not get updated when plugin.disable_full_page_plugin_for_types
    * changes (unless modification of that preference spawns reregistration).
    * So even if we could use enabledPlugin to get the plugin that would be used,
    * we'd still need to check the pref ourselves to find out if it's enabled.
    */
-  _loadPluginHandlers: function() {
+  _loadPluginHandlers() {
     let pluginHost = Cc["@mozilla.org/plugin/host;1"]
                        .getService(Ci.nsIPluginHost);
     for (let pluginTag of pluginHost.getPluginTags()) {
       for (let type of pluginTag.getMimeTypes()) {
         let handlerInfoWrapper;
         if (type in this._handledTypes)
           handlerInfoWrapper = this._handledTypes[type];
         else {
@@ -1017,17 +1017,17 @@ var gApplicationsPane = {
         handlerInfoWrapper.plugin = pluginHost.getPluginTagForType(type);
       }
     }
   },
 
   /**
    * Load the set of handlers defined by the application datastore.
    */
-  _loadApplicationHandlers: function() {
+  _loadApplicationHandlers() {
     var wrappedHandlerInfos = handlerSvc.enumerate();
     while (wrappedHandlerInfos.hasMoreElements()) {
       let wrappedHandlerInfo =
         wrappedHandlerInfos.getNext().QueryInterface(Ci.nsIHandlerInfo);
       let type = wrappedHandlerInfo.type;
 
       let handlerInfoWrapper;
       if (type in this._handledTypes)
@@ -1040,17 +1040,17 @@ var gApplicationsPane = {
       handlerInfoWrapper.handledOnlyByPlugin = false;
     }
   },
 
 
   //**************************************************************************//
   // View Construction
 
-  _rebuildVisibleTypes: function() {
+  _rebuildVisibleTypes() {
     // Reset the list of visible types and the visible type description counts.
     this._visibleTypes = [];
     this._visibleTypeDescriptionCount = {};
 
     // Get the preferences that help determine what types to show.
     var showPlugins = Services.prefs.getBoolPref(PREF_SHOW_PLUGINS_IN_LIST);
     var hidePluginsWithoutExtensions =
         Services.prefs.getBoolPref(PREF_HIDE_PLUGINS_WITHOUT_EXTENSIONS);
@@ -1079,17 +1079,17 @@ var gApplicationsPane = {
 
       if (handlerInfo.description in this._visibleTypeDescriptionCount)
         this._visibleTypeDescriptionCount[handlerInfo.description]++;
       else
         this._visibleTypeDescriptionCount[handlerInfo.description] = 1;
     }
   },
 
-  _rebuildView: function() {
+  _rebuildView() {
     // Clear the list of entries (the first 2 elements are <listcols> and
     // <listhead>, they should never get removed).
     while (this._list.childNodes.length > 2)
       this._list.lastChild.remove();
 
     var visibleTypes = this._visibleTypes;
 
     // If the user is filtering the list, then only show matching types.
@@ -1115,33 +1115,33 @@ var gApplicationsPane = {
         else
           item.setAttribute("appHandlerIcon", "app");
       }
 
       this._list.appendChild(item);
     }
   },
 
-  _matchesFilter: function(aType) {
+  _matchesFilter(aType) {
     var filterValue = this._filter.value.toLowerCase();
     return this._describeType(aType).toLowerCase().indexOf(filterValue) != -1 ||
            this._describePreferredAction(aType).toLowerCase().indexOf(filterValue) != -1;
   },
 
   /**
    * Describe, in a human-readable fashion, the type represented by the given
    * handler info object.  Normally this is just the description provided by
    * the info object, but if more than one object presents the same description,
    * then we annotate the duplicate descriptions with the type itself to help
    * users distinguish between those types.
    *
    * @param aHandlerInfo {nsIHandlerInfo} the type being described
    * @returns {string} a description of the type
    */
-  _describeType: function(aHandlerInfo) {
+  _describeType(aHandlerInfo) {
     if (this._visibleTypeDescriptionCount[aHandlerInfo.description] > 1)
       return this._prefsBundle.getFormattedString("typeDescriptionWithType",
                                                   [aHandlerInfo.description,
                                                    aHandlerInfo.type]);
 
     return aHandlerInfo.description;
   },
 
@@ -1152,17 +1152,17 @@ var gApplicationsPane = {
    * XXX Should this be part of the HandlerInfoWrapper interface?  It would
    * violate the separation of model and view, but it might make more sense
    * nonetheless (f.e. it would make sortTypes easier).
    *
    * @param aHandlerInfo {nsIHandlerInfo} the type whose preferred action
    *                                      is being described
    * @returns {string} a description of the action
    */
-  _describePreferredAction: function(aHandlerInfo) {
+  _describePreferredAction(aHandlerInfo) {
     // alwaysAskBeforeHandling overrides the preferred action, so if that flag
     // is set, then describe that behavior instead.  For most types, this is
     // the "alwaysAsk" string, but for the feed type we show something special.
     if (aHandlerInfo.alwaysAskBeforeHandling) {
       if (isFeedType(aHandlerInfo.type))
         return this._prefsBundle.getFormattedString("previewInApp",
                                                     [this._brandShortName]);
       else
@@ -1213,17 +1213,17 @@ var gApplicationsPane = {
 
   /**
    * Whether or not the given handler app is valid.
    *
    * @param aHandlerApp {nsIHandlerApp} the handler app in question
    *
    * @returns {boolean} whether or not it's valid
    */
-  isValidHandlerApp: function(aHandlerApp) {
+  isValidHandlerApp(aHandlerApp) {
     if (!aHandlerApp)
       return false;
 
     if (aHandlerApp instanceof Ci.nsILocalHandlerApp)
       return this._isValidHandlerExecutable(aHandlerApp.executable);
 
     if (aHandlerApp instanceof Ci.nsIWebHandlerApp)
       return aHandlerApp.uriTemplate;
@@ -1232,32 +1232,32 @@ var gApplicationsPane = {
       return aHandlerApp.uri;
  
     if (aHandlerApp instanceof Ci.nsIGIOMimeApp)
       return aHandlerApp.command;
 
     return false;
   },
 
-  _isValidHandlerExecutable: function(aExecutable) {
+  _isValidHandlerExecutable(aExecutable) {
     var file = Services.dirsvc.get("XREExeF",
                                    Ci.nsIFile);
     return aExecutable &&
            aExecutable.exists() &&
            aExecutable.isExecutable() &&
            aExecutable.leafName != file.leafName;
   },
 
   /**
    * Rebuild the actions menu for the selected entry. Gets called by
    * the listcell constructor when an entry in the list gets selected.
    * Note that this would not work from onselect on the listbox because
    * the XBL needs to be applied _before_ calling this function!
    */
-  rebuildActionsMenu: function() {
+  rebuildActionsMenu() {
     var typeItem = this._list.selectedItem;
     var handlerInfo = this._handledTypes[typeItem.type];
     var cell =
       document.getAnonymousElementByAttribute(typeItem, "anonid", "action-cell");
     var menu =
       document.getAnonymousElementByAttribute(cell, "anonid", "action-menu");
     var menuPopup = menu.menupopup;
 
@@ -1468,17 +1468,17 @@ var gApplicationsPane = {
   //**************************************************************************//
   // Sorting & Filtering
 
   _sortColumn: null,
 
   /**
    * Sort the list when the user clicks on a column header.
    */
-  sort: function (event) {
+  sort(event) {
     var column = event.target;
 
     // If the user clicked on a new sort column, remove the direction indicator
     // from the old column.
     if (this._sortColumn && this._sortColumn != column)
       this._sortColumn.removeAttribute("sortDirection");
 
     this._sortColumn = column;
@@ -1491,17 +1491,17 @@ var gApplicationsPane = {
 
     this._sortVisibleTypes();
     this._rebuildView();
   },
 
   /**
    * Sort the list of visible types by the current sort column/direction.
    */
-  _sortVisibleTypes: function() {
+  _sortVisibleTypes() {
     var t = this;
 
     function sortByType(a, b) {
       return t._describeType(a).toLowerCase()
               .localeCompare(t._describeType(b).toLowerCase());
     }
 
     function sortByAction(a, b) {
@@ -1521,28 +1521,28 @@ var gApplicationsPane = {
     if (this._sortColumn.getAttribute("sortDirection") == "descending")
       this._visibleTypes.reverse();
   },
 
 
   //**************************************************************************//
   // Changes
 
-  onSelectAction: function(aActionItem) {
+  onSelectAction(aActionItem) {
     this._storingAction = true;
 
     try {
       this._storeAction(aActionItem);
     }
     finally {
       this._storingAction = false;
     }
   },
 
-  _storeAction: function(aActionItem) {
+  _storeAction(aActionItem) {
     var typeItem = this._list.selectedItem;
     var handlerInfo = this._handledTypes[typeItem.type];
 
     let action = parseInt(aActionItem.getAttribute("value"));
 
     // Set the plugin state if we're enabling or disabling a plugin.
     if (action == kActionUsePlugin)
       handlerInfo.enablePluginType();
@@ -1577,17 +1577,17 @@ var gApplicationsPane = {
       var sysIcon = this._getIconURLForPreferredAction(handlerInfo);
       if (sysIcon)
         typeItem.setAttribute("actionIcon", sysIcon);
       else
         typeItem.setAttribute("appHandlerIcon", "app");
     }
   },
 
-  manageApp: function() {
+  manageApp() {
     var typeItem = this._list.selectedItem;
     var handlerInfo = this._handledTypes[typeItem.type];
 
     document.documentElement.openSubDialog("chrome://communicator/content/pref/pref-applicationManager.xul",
                                            "", handlerInfo);
 
     // Rebuild the actions menu so that we revert to the previous selection,
     // or "Always ask" if the previous default application has been removed
@@ -1600,17 +1600,17 @@ var gApplicationsPane = {
       var sysIcon = this._getIconURLForPreferredAction(handlerInfo);
       if (sysIcon)
         typeItem.setAttribute("actionIcon", sysIcon);
       else
         typeItem.setAttribute("appHandlerIcon", "app");
     }
   },
 
-  chooseApp: function() {
+  chooseApp() {
     var handlerApp;
     let onSelectionDone = function() {
       // Rebuild the actions menu whether the user picked an app or canceled.
       // If they picked an app, we want to add the app to the menu and select it.
       // If they canceled, we want to go back to their previous selection.
       this.rebuildActionsMenu();
 
       // If the user picked a new app from the menu, select it.
@@ -1681,17 +1681,17 @@ var gApplicationsPane = {
           let handlerInfo = this._handledTypes[this._list.selectedItem.type];
           handlerInfo.addPossibleApplicationHandler(handlerApp);
         }
         onSelectionDone();
       });
     }
   },
 
-  _setIconClassForPreferredAction: function(aHandlerInfo, aElement) {
+  _setIconClassForPreferredAction(aHandlerInfo, aElement) {
     // If this returns true, the attribute that CSS sniffs for was set to something
     // so you shouldn't manually set an icon URI.
     // This removes the existing actionIcon attribute if any, even if returning false.
     aElement.removeAttribute("actionIcon");
 
     if (aHandlerInfo.alwaysAskBeforeHandling) {
       aElement.setAttribute("appHandlerIcon", "ask");
       return true;
@@ -1712,68 +1712,68 @@ var gApplicationsPane = {
       case kActionUsePlugin:
         aElement.setAttribute("appHandlerIcon", "plugin");
         return true;
     }
     aElement.removeAttribute("appHandlerIcon");
     return false;
   },
 
-  _getIconURLForPreferredAction: function(aHandlerInfo) {
+  _getIconURLForPreferredAction(aHandlerInfo) {
     switch (aHandlerInfo.preferredAction) {
       case Ci.nsIHandlerInfo.useSystemDefault:
         return this._getIconURLForSystemDefault(aHandlerInfo);
 
       case Ci.nsIHandlerInfo.useHelperApp:
         let preferredApp = aHandlerInfo.preferredApplicationHandler;
         if (this.isValidHandlerApp(preferredApp))
           return this._getIconURLForHandlerApp(preferredApp);
         break;
     }
     // This should never happen, but if preferredAction is set to some weird
     // value, then fall back to the generic application icon.
     return null;
   },
 
-  _getIconURLForHandlerApp: function(aHandlerApp) {
+  _getIconURLForHandlerApp(aHandlerApp) {
     if (aHandlerApp instanceof Ci.nsILocalHandlerApp)
       return this._getIconURLForFile(aHandlerApp.executable);
 
     if (Services.prefs.getBoolPref("browser.chrome.favicons")) { // q.v. Bug 514671
       if (aHandlerApp instanceof Ci.nsIWebHandlerApp)
         return this._getIconURLForWebApp(aHandlerApp.uriTemplate);
 
       if (aHandlerApp instanceof Ci.nsIWebContentHandlerInfo)
-        return this._getIconURLForWebApp(aHandlerApp.uri)
+        return this._getIconURLForWebApp(aHandlerApp.uri);
     }
 
     // We know nothing about other kinds of handler apps.
     return "";
   },
 
-  _getIconURLForFile: function(aFile) {
+  _getIconURLForFile(aFile) {
     var fph = Services.io.getProtocolHandler("file")
                          .QueryInterface(Ci.nsIFileProtocolHandler);
     var urlSpec = fph.getURLSpecFromFile(aFile);
 
     return "moz-icon://" + urlSpec + "?size=16";
   },
 
-  _getIconURLForWebApp: function(aWebAppURITemplate) {
+  _getIconURLForWebApp(aWebAppURITemplate) {
     var uri = Services.io.newURI(aWebAppURITemplate);
 
     // Unfortunately we need to use favicon.ico here, but we don't know
     // about any other possibility to retrieve an icon for the web app/site
     // without loading a specific full URL and parsing it for a possible
     // shortcut icon.
 
     return /^https?/.test(uri.scheme) ? uri.resolve("/favicon.ico") : "";
   },
 
-  _getIconURLForSystemDefault: function(aHandlerInfo) {
+  _getIconURLForSystemDefault(aHandlerInfo) {
     // Handler info objects for MIME types on some OSes implement a property bag
     // interface from which we can get an icon for the default app, so if we're
     // dealing with a MIME type on one of those OSes, then try to get the icon.
     if ("wrappedHandlerInfo" in aHandlerInfo) {
       let wrappedHandlerInfo = aHandlerInfo.wrappedHandlerInfo;
 
       if (wrappedHandlerInfo instanceof Ci.nsIMIMEInfo &&
           wrappedHandlerInfo instanceof Ci.nsIPropertyBag) {