Bug 555942: Style and attribute prefix fixes, no review
authorDave Townsend <dtownsend@oxymoronical.com>
Wed, 28 Apr 2010 09:42:07 -0700
changeset 41584 16f9f777d64d640c2aa1cef9fe47a9a6f0941f19
parent 41583 2b6722d6b864e8e618d4de243d01fb1d3e6de29d
child 41585 2425e0fb812df4fe8e0c0b585f6d23ac633fdc85
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs555942
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 555942: Style and attribute prefix fixes, no review * * * Fix argument renames for test_registry.js
toolkit/mozapps/extensions/AddonManager.jsm
toolkit/mozapps/extensions/AddonUpdateChecker.jsm
toolkit/mozapps/extensions/LightweightThemeManager.jsm
toolkit/mozapps/extensions/PluginProvider.jsm
toolkit/mozapps/extensions/XPIProvider.jsm
toolkit/mozapps/extensions/addonManager.js
toolkit/mozapps/extensions/amContentHandler.js
toolkit/mozapps/extensions/amIInstallTrigger.idl
toolkit/mozapps/extensions/amIWebInstallListener.idl
toolkit/mozapps/extensions/amIWebInstaller.idl
toolkit/mozapps/extensions/amInstallTrigger.cpp
toolkit/mozapps/extensions/amInstallTrigger.h
toolkit/mozapps/extensions/amWebInstallListener.js
toolkit/mozapps/extensions/test/xpcshell/head_addons.js
--- a/toolkit/mozapps/extensions/AddonManager.jsm
+++ b/toolkit/mozapps/extensions/AddonManager.jsm
@@ -52,109 +52,108 @@ const PROVIDERS = [
   "resource://gre/modules/XPIProvider.jsm",
   "resource://gre/modules/PluginProvider.jsm",
   "resource://gre/modules/LightweightThemeManager.jsm"
 ];
 
 /**
  * Logs a debugging message.
  *
- * @param   str
- *          The string to log
+ * @param  aStr
+ *         The string to log
  */
-function LOG(str) {
-  dump("*** addons.manager: " + str + "\n");
+function LOG(aStr) {
+  dump("*** addons.manager: " + aStr + "\n");
 }
 
 /**
  * Logs a warning message.
  *
- * @param   str
- *          The string to log
+ * @param  aStr
+ *         The string to log
  */
-function WARN(str) {
-  LOG(str);
+function WARN(aStr) {
+  LOG(aStr);
 }
 
 /**
  * Logs an error message.
  *
- * @param   str
- *          The string to log
+ * @param  aStr
+ *         The string to log
  */
-function ERROR(str) {
-  LOG(str);
+function ERROR(aStr) {
+  LOG(aStr);
 }
 
 /**
  * Calls a callback method consuming any thrown exception. Any parameters after
  * the callback parameter will be passed to the callback.
  *
- * @param   callback
- *          The callback method to call
+ * @param  aCallback
+ *         The callback method to call
  */
-function safeCall(callback) {
+function safeCall(aCallback) {
   var args = Array.slice(arguments, 1);
 
   try {
-    callback.apply(null, args);
+    aCallback.apply(null, args);
   }
   catch (e) {
     WARN("Exception calling callback: " + e);
   }
 }
 
 /**
  * Calls a method on a provider if it exists and consumes any thrown exception.
  * Any parameters after the dflt parameter are passed to the provider's method.
  *
- * @param   provider
- *          The provider to call
- * @param   method
- *          The method name to call
- * @param   dflt
- *          A default return value if the provider does not implement the named
- *          method or throws an error.
- * @return  the return value from the provider or dflt if the provider does not
- *          implement method or throws an error
+ * @param  aProvider
+ *         The provider to call
+ * @param  aMethod
+ *         The method name to call
+ * @param  aDefault
+ *         A default return value if the provider does not implement the named
+ *         method or throws an error.
+ * @return the return value from the provider or dflt if the provider does not
+ *         implement method or throws an error
  */
-function callProvider(provider, method, dflt) {
-  if (!(method in provider))
-    return dflt;
+function callProvider(aProvider, aMethod, aDefault) {
+  if (!(aMethod in aProvider))
+    return aDefault;
 
   var args = Array.slice(arguments, 3);
 
   try {
-    return provider[method].apply(provider, args);
-  }
-  catch (e) {
-    ERROR("Exception calling provider." + method + ": " + e);
-    return dflt;
+    return aProvider[aMethod].apply(aProvider, args);
+  } catch (e) {
+    ERROR("Exception calling provider." + aMethod + ": " + e);
+    return aDefault;
   }
 }
 
 /**
  * A helper class to repeatedly call a listener with each object in an array
  * optionally checking whether the object has a method in it.
  *
- * @param   objects
- *          The array of objects to iterate through
- * @param   method
- *          An optional method name, if not null any objects without this method
- *          will not be passed to the listener
- * @param   listener
- *          A listener implementing nextObject and noMoreObjects methods. The
- *          former will be called with the AsyncObjectCaller as the first
- *          parameter and the object as the second. noMoreObjects will be passed
- *          just the AsyncObjectCaller
+ * @param  aObjects
+ *         The array of objects to iterate through
+ * @param  aMethod
+ *         An optional method name, if not null any objects without this method
+ *         will not be passed to the listener
+ * @param  aListener
+ *         A listener implementing nextObject and noMoreObjects methods. The
+ *         former will be called with the AsyncObjectCaller as the first
+ *         parameter and the object as the second. noMoreObjects will be passed
+ *         just the AsyncObjectCaller
  */
-function AsyncObjectCaller(objects, method, listener) {
-  this.objects = objects.slice(0);
-  this.method = method;
-  this.listener = listener;
+function AsyncObjectCaller(aObjects, aMethod, aListener) {
+  this.objects = aObjects.slice(0);
+  this.method = aMethod;
+  this.listener = aListener;
 
   this.callNext();
 }
 
 AsyncObjectCaller.prototype = {
   objects: null,
   method: null,
   listener: null,
@@ -236,25 +235,25 @@ var AddonManagerInternal = {
                        getService(Ci.nsIAppStartup2);
       appStartup.needsRestart = needsRestart;
     }
   },
 
   /**
    * Registers a new AddonProvider.
    *
-   * @param   provider
-   *          The provider to register
+   * @param  aProvider
+   *         The provider to register
    */
-  registerProvider: function AMI_registerProvider(provider) {
-    this.providers.push(provider);
+  registerProvider: function AMI_registerProvider(aProvider) {
+    this.providers.push(aProvider);
 
     // If we're registering after startup call this provider's startup.
     if (this.started)
-      callProvider(provider, "startup");
+      callProvider(aProvider, "startup");
   },
 
   /**
    * Shuts down the addon manager and all registered providers, this must clean
    * up everything in order for automated tests to fake restarts.
    */
   shutdown: function AM_shutdown() {
     this.providers.forEach(function(provider) {
@@ -273,491 +272,491 @@ var AddonManagerInternal = {
   backgroundUpdateCheck: function AMI_backgroundUpdateCheck() {
     if (!Services.prefs.getBoolPref(PREF_EM_UPDATE_ENABLED))
       return;
 
     let scope = {};
     Components.utils.import("resource://gre/modules/LightweightThemeManager.jsm", scope);
     scope.LightweightThemeManager.updateCurrentTheme();
 
-    this.getAddonsByTypes(null, function getAddonsCallback(addons) {
-      addons.forEach(function BUC_forEachCallback(addon) {
-        if (addon.permissions & AddonManager.PERM_CAN_UPGRADE) {
-          addon.findUpdates({
-            onUpdateAvailable: function BUC_onUpdateAvailable(addon, install) {
-              install.install();
+    this.getAddonsByTypes(null, function getAddonsCallback(aAddons) {
+      aAddons.forEach(function BUC_forEachCallback(aAddon) {
+        if (aAddon.permissions & AddonManager.PERM_CAN_UPGRADE) {
+          aAddon.findUpdates({
+            onUpdateAvailable: function BUC_onUpdateAvailable(aAddon, aInstall) {
+              aInstall.install();
             }
           }, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
         }
       });
     });
   },
 
   /**
    * Calls all registered InstallListeners with an event. Any parameters after
    * the extraListeners parameter are passed to the listener.
    *
-   * @param   method
-   *          The method on the listeners to call
-   * @param   extraListeners
-   *          An array of extra InstallListeners to also call
-   * @return  false if any of the listeners returned false, true otherwise
+   * @param  aMethod
+   *         The method on the listeners to call
+   * @param  aExtraListeners
+   *         An array of extra InstallListeners to also call
+   * @return false if any of the listeners returned false, true otherwise
    */
-  callInstallListeners: function AMI_callInstallListeners(method, extraListeners) {
+  callInstallListeners: function AMI_callInstallListeners(aMethod, aExtraListeners) {
     let result = true;
     let listeners = this.installListeners;
-    if (extraListeners)
-      listeners = extraListeners.concat(listeners);
+    if (aExtraListeners)
+      listeners = aExtraListeners.concat(listeners);
     let args = Array.slice(arguments, 2);
 
     listeners.forEach(function(listener) {
       try {
-        if (method in listener) {
-          if (listener[method].apply(listener, args) === false)
+        if (aMethod in listener) {
+          if (listener[aMethod].apply(listener, args) === false)
             result = false;
         }
       }
       catch (e) {
-        WARN("InstallListener threw exception when calling " + method + ": " + e);
+        WARN("InstallListener threw exception when calling " + aMethod + ": " + e);
       }
     });
     return result;
   },
 
   /**
    * Calls all registered AddonListeners with an event. Any parameters after
    * the method parameter are passed to the listener.
    *
-   * @param   method
-   *          The method on the listeners to call
+   * @param  aMethod
+   *         The method on the listeners to call
    */
-  callAddonListeners: function AMI_callAddonListeners(method) {
+  callAddonListeners: function AMI_callAddonListeners(aMethod) {
     var args = Array.slice(arguments, 1);
     this.addonListeners.forEach(function(listener) {
       try {
-        if (method in listener)
-          listener[method].apply(listener, args);
+        if (aMethod in listener)
+          listener[aMethod].apply(listener, args);
       }
       catch (e) {
-        WARN("AddonListener threw exception when calling " + method + ": " + e);
+        WARN("AddonListener threw exception when calling " + aMethod + ": " + e);
       }
     });
   },
 
   /**
    * Notifies all providers that an add-on has been enabled when that type of
    * add-on only supports a single add-on being enabled at a time. This allows
    * the providers to disable theirs if necessary.
    *
-   * @param   id
-   *          The id of the enabled add-on
-   * @param   type
-   *          The type of the enabled add-on
-   * @param   pendingRestart
-   *          A boolean indicating if the change will only take place the next
-   *          time the application is restarted
+   * @param  aId
+   *         The id of the enabled add-on
+   * @param  aType
+   *         The type of the enabled add-on
+   * @param  aPendingRestart
+   *         A boolean indicating if the change will only take place the next
+   *         time the application is restarted
    */
-  notifyAddonChanged: function AMI_notifyAddonChanged(id, type, pendingRestart) {
+  notifyAddonChanged: function AMI_notifyAddonChanged(aId, aType, aPendingRestart) {
     this.providers.forEach(function(provider) {
-      callProvider(provider, "addonChanged", null, id, type, pendingRestart);
+      callProvider(provider, "addonChanged", null, aId, aType, aPendingRestart);
     });
   },
 
   /**
    * Asynchronously gets an AddonInstall for a URL.
    *
-   * @param   url
-   *          The url the add-on is located at
-   * @param   callback
-   *          A callback to pass the AddonInstall to
-   * @param   mimetype
-   *          The mimetype of the add-on
-   * @param   hash
-   *          An optional hash of the add-on
-   * @param   name
-   *          An optional placeholder name while the add-on is being downloaded
-   * @param   iconURL
-   *          An optional placeholder icon URL while the add-on is being downloaded
-   * @param   version
-   *          An optional placeholder version while the add-on is being downloaded
-   * @param   loadGroup
-   *          An optional nsILoadGroup to associate any network requests with
-   * @throws  if the url, callback or mimetype arguments are not specified
+   * @param  aUrl
+   *         The url the add-on is located at
+   * @param  aCallback
+   *         A callback to pass the AddonInstall to
+   * @param  aMimetype
+   *         The mimetype of the add-on
+   * @param  aHash
+   *         An optional hash of the add-on
+   * @param  aName
+   *         An optional placeholder name while the add-on is being downloaded
+   * @param  aIconURL
+   *         An optional placeholder icon URL while the add-on is being downloaded
+   * @param  aVersion
+   *         An optional placeholder version while the add-on is being downloaded
+   * @param  aLoadGroup
+   *         An optional nsILoadGroup to associate any network requests with
+   * @throws if the aUrl, aCallback or aMimetype arguments are not specified
    */
-  getInstallForURL: function AMI_getInstallForURL(url, callback, mimetype, hash,
-                                                  name, iconURL, version,
-                                                  loadGroup) {
-    if (!url || !mimetype || !callback)
+  getInstallForURL: function AMI_getInstallForURL(aUrl, aCallback, aMimetype,
+                                                  aHash, aName, aIconURL,
+                                                  aVersion, aLoadGroup) {
+    if (!aUrl || !aMimetype || !aCallback)
       throw new TypeError("Invalid arguments");
 
     for (let i = 0; i < this.providers.length; i++) {
-      if (callProvider(this.providers[i], "supportsMimetype", false, mimetype)) {
+      if (callProvider(this.providers[i], "supportsMimetype", false, aMimetype)) {
         callProvider(this.providers[i], "getInstallForURL", null,
-                     url, hash, name, iconURL, version, loadGroup,
-                     function(install) {
-          safeCall(callback, install);
+                     aUrl, aHash, aName, aIconURL, aVersion, aLoadGroup,
+                     function(aInstall) {
+          safeCall(aCallback, aInstall);
         });
         return;
       }
     }
-    safeCall(callback, null);
+    safeCall(aCallback, null);
   },
 
   /**
    * Asynchronously gets an AddonInstall for an nsIFile.
    *
-   * @param   file
-   *          the nsIFile where the add-on is located
-   * @param   callback
-   *          A callback to pass the AddonInstall to
-   * @param   mimetype
-   *          An optional mimetype hint for the add-on
-   * @throws  if the file or callback arguments are not specified
+   * @param  aFile
+   *         the nsIFile where the add-on is located
+   * @param  aCallback
+   *         A callback to pass the AddonInstall to
+   * @param  aMimetype
+   *         An optional mimetype hint for the add-on
+   * @throws if the aFile or aCallback arguments are not specified
    */
-  getInstallForFile: function AMI_getInstallForFile(file, callback, mimetype) {
-    if (!file || !callback)
+  getInstallForFile: function AMI_getInstallForFile(aFile, aCallback, aMimetype) {
+    if (!aFile || !aCallback)
       throw Cr.NS_ERROR_INVALID_ARG;
 
     new AsyncObjectCaller(this.providers, "getInstallForFile", {
-      nextObject: function(caller, provider) {
-        callProvider(provider, "getInstallForFile", null, file,
-                     function(install) {
-          if (install)
-            safeCall(callback, install);
+      nextObject: function(aCaller, aProvider) {
+        callProvider(aProvider, "getInstallForFile", null, aFile,
+                     function(aInstall) {
+          if (aInstall)
+            safeCall(aCallback, aInstall);
           else
-            caller.callNext();
+            aCaller.callNext();
         });
       },
 
-      noMoreObjects: function(caller) {
-        safeCall(callback, null);
+      noMoreObjects: function(aCaller) {
+        safeCall(aCallback, null);
       }
     });
   },
 
   /**
    * Asynchronously gets all current AddonInstalls optionally limiting to a list
    * of types.
    *
-   * @param   types
-   *          An optional array of types to retrieve. Each type is a string name
-   * @param   callback
-   *          A callback which will be passed an array of AddonInstalls
-   * @throws  if the callback argument is not specified
+   * @param  aTypes
+   *         An optional array of types to retrieve. Each type is a string name
+   * @param  aCallback
+   *         A callback which will be passed an array of AddonInstalls
+   * @throws if the aCallback argument is not specified
    */
-  getInstalls: function AMI_getInstalls(types, callback) {
-    if (!callback)
+  getInstalls: function AMI_getInstalls(aTypes, aCallback) {
+    if (!aCallback)
       throw Cr.NS_ERROR_INVALID_ARG;
 
     let installs = [];
 
     new AsyncObjectCaller(this.providers, "getInstalls", {
-      nextObject: function(caller, provider) {
-        callProvider(provider, "getInstalls", null, types,
-                     function(providerInstalls) {
-          installs = installs.concat(providerInstalls);
-          caller.callNext();
+      nextObject: function(aCaller, aProvider) {
+        callProvider(aProvider, "getInstalls", null, aTypes,
+                     function(aProviderInstalls) {
+          installs = installs.concat(aProviderInstalls);
+          aCaller.callNext();
         });
       },
 
-      noMoreObjects: function(caller) {
-        safeCall(callback, installs);
+      noMoreObjects: function(aCaller) {
+        safeCall(aCallback, installs);
       }
     });
   },
 
   /**
    * Checks whether installation is enabled for a particular mimetype.
    *
-   * @param   mimetype
-   *          The mimetype to check
-   * @return  true if installation is enabled for the mimetype
+   * @param  aMimetype
+   *         The mimetype to check
+   * @return true if installation is enabled for the mimetype
    */
-  isInstallEnabled: function AMI_isInstallEnabled(mimetype) {
+  isInstallEnabled: function AMI_isInstallEnabled(aMimetype) {
     for (let i = 0; i < this.providers.length; i++) {
-      if (callProvider(this.providers[i], "supportsMimetype", false, mimetype) &&
+      if (callProvider(this.providers[i], "supportsMimetype", false, aMimetype) &&
           callProvider(this.providers[i], "isInstallEnabled"))
         return true;
     }
     return false;
   },
 
   /**
    * Checks whether a particular source is allowed to install add-ons of a
    * given mimetype.
    *
-   * @param   mimetype
-   *          The mimetype of the add-on
-   * @param   uri
-   *          The uri of the source, may be null
-   * @return  true if the source is allowed to install this mimetype
+   * @param  aMimetype
+   *         The mimetype of the add-on
+   * @param  aURI
+   *         The uri of the source, may be null
+   * @return true if the source is allowed to install this mimetype
    */
-  isInstallAllowed: function AMI_isInstallAllowed(mimetype, uri) {
+  isInstallAllowed: function AMI_isInstallAllowed(aMimetype, aURI) {
     for (let i = 0; i < this.providers.length; i++) {
-      if (callProvider(this.providers[i], "supportsMimetype", false, mimetype) &&
-          callProvider(this.providers[i], "isInstallAllowed", null, uri))
+      if (callProvider(this.providers[i], "supportsMimetype", false, aMimetype) &&
+          callProvider(this.providers[i], "isInstallAllowed", null, aURI))
         return true;
     }
   },
 
   /**
    * Starts installation of an array of AddonInstalls notifying the registered
    * web install listener of blocked or started installs.
    *
-   * @param   mimetype
-   *          The mimetype of add-ons being installed
-   * @param   source
-   *          The nsIDOMWindowInternal that started the installs
-   * @param   uri
-   *          the nsIURI that started the installs
-   * @param   installs
-   *          The array of AddonInstalls to be installed
+   * @param  aMimetype
+   *         The mimetype of add-ons being installed
+   * @param  aSource
+   *         The nsIDOMWindowInternal that started the installs
+   * @param  aURI
+   *         the nsIURI that started the installs
+   * @param  aInstalls
+   *         The array of AddonInstalls to be installed
    */
-  installAddonsFromWebpage: function AMI_installAddonsFromWebpage(mimetype,
-                                                                  source,
-                                                                  uri,
-                                                                  installs) {
+  installAddonsFromWebpage: function AMI_installAddonsFromWebpage(aMimetype,
+                                                                  aSource,
+                                                                  aURI,
+                                                                  aInstalls) {
     if (!("@mozilla.org/addons/web-install-listener;1" in Cc)) {
       WARN("No web installer available, cancelling all installs");
-      installs.forEach(function(install) {
-        install.cancel();
+      aInstalls.forEach(function(aInstall) {
+        aInstall.cancel();
       });
       return;
     }
 
     try {
       let weblistener = Cc["@mozilla.org/addons/web-install-listener;1"].
                         getService(Ci.amIWebInstallListener);
 
-      if (!this.isInstallAllowed(mimetype, uri)) {
-        if (weblistener.onWebInstallBlocked(source, uri, installs,
-                                            installs.length)) {
-          installs.forEach(function(install) {
-            install.install();
+      if (!this.isInstallAllowed(aMimetype, aURI)) {
+        if (weblistener.onWebInstallBlocked(aSource, aURI, aInstalls,
+                                            aInstalls.length)) {
+          aInstalls.forEach(function(aInstall) {
+            aInstall.install();
           });
         }
       }
-      else if (weblistener.onWebInstallRequested(source, uri, installs,
-                                                 installs.length)) {
-        installs.forEach(function(install) {
-          install.install();
+      else if (weblistener.onWebInstallRequested(aSource, aURI, aInstalls,
+                                                   aInstalls.length)) {
+        aInstalls.forEach(function(aInstall) {
+          aInstall.install();
         });
       }
     }
     catch (e) {
       // In the event that the weblistener throws during instatiation or when
       // calling onWebInstallBlocked or onWebInstallRequested all of the
       // installs should get cancelled.
       WARN("Failure calling web installer: " + e);
-      installs.forEach(function(install) {
-        install.cancel();
+      aInstalls.forEach(function(aInstall) {
+        aInstall.cancel();
       });
     }
   },
 
   /**
    * Adds a new InstallListener if the listener is not already registered.
    *
-   * @param   listener
-   *          The InstallListener to add
+   * @param  aListener
+   *         The InstallListener to add
    */
-  addInstallListener: function AMI_addInstallListener(listener) {
-    if (!this.installListeners.some(function(i) { return i == listener; }))
-      this.installListeners.push(listener);
+  addInstallListener: function AMI_addInstallListener(aListener) {
+    if (!this.installListeners.some(function(i) { return i == aListener; }))
+      this.installListeners.push(aListener);
   },
 
   /**
    * Removes an InstallListener if the listener is registered.
    *
-   * @param   listener
-   *          The InstallListener to remove
+   * @param  aListener
+   *         The InstallListener to remove
    */
-  removeInstallListener: function AMI_removeInstallListener(listener) {
+  removeInstallListener: function AMI_removeInstallListener(aListener) {
     this.installListeners = this.installListeners.filter(function(i) {
-      return i != listener;
+      return i != aListener;
     });
   },
 
   /**
    * Asynchronously gets an add-on with a specific ID.
    *
-   * @param   id
-   *          The ID of the add-on to retrieve
-   * @param   callback
-   *          The callback to pass the retrieved add-on to
-   * @throws  if the id or callback arguments are not specified
+   * @param  aId
+   *         The ID of the add-on to retrieve
+   * @param  aCallback
+   *         The callback to pass the retrieved add-on to
+   * @throws if the aId or aCallback arguments are not specified
    */
-  getAddon: function AMI_getAddon(id, callback) {
-    if (!id || !callback)
+  getAddon: function AMI_getAddon(aId, aCallback) {
+    if (!aId || !aCallback)
       throw Cr.NS_ERROR_INVALID_ARG;
 
     new AsyncObjectCaller(this.providers, "getAddon", {
-      nextObject: function(caller, provider) {
-        callProvider(provider, "getAddon", null, id, function(addon) {
-          if (addon)
-            safeCall(callback, addon);
+      nextObject: function(aCaller, aProvider) {
+        callProvider(aProvider, "getAddon", null, aId, function(aAddon) {
+          if (aAddon)
+            safeCall(aCallback, aAddon);
           else
-            caller.callNext();
+            aCaller.callNext();
         });
       },
 
-      noMoreObjects: function(caller) {
-        safeCall(callback, null);
+      noMoreObjects: function(aCaller) {
+        safeCall(aCallback, null);
       }
     });
   },
 
   /**
    * Asynchronously gets an array of add-ons.
    *
-   * @param   ids
-   *          The array of IDs to retrieve
-   * @param   callback
-   *          The callback to pass an array of Addons to
-   * @throws  if the id or callback arguments are not specified
+   * @param  aIds
+   *         The array of IDs to retrieve
+   * @param  aCallback
+   *         The callback to pass an array of Addons to
+   * @throws if the aId or aCallback arguments are not specified
    */
-  getAddons: function AMI_getAddons(ids, callback) {
-    if (!ids || !callback)
+  getAddons: function AMI_getAddons(aIds, aCallback) {
+    if (!aIds || !aCallback)
       throw Cr.NS_ERROR_INVALID_ARG;
 
     let addons = [];
 
-    new AsyncObjectCaller(ids, null, {
-      nextObject: function(caller, id) {
-        AddonManagerInternal.getAddon(id, function(addon) {
-          addons.push(addon);
-          caller.callNext();
+    new AsyncObjectCaller(aIds, null, {
+      nextObject: function(aCaller, aId) {
+        AddonManagerInternal.getAddon(aId, function(aAddon) {
+          addons.push(aAddon);
+          aCaller.callNext();
         });
       },
 
-      noMoreObjects: function(caller) {
-        safeCall(callback, addons);
+      noMoreObjects: function(aCaller) {
+        safeCall(aCallback, addons);
       }
     });
   },
 
   /**
    * Asynchronously gets add-ons of specific types.
    *
-   * @param   types
-   *          An optional array of types to retrieve. Each type is a string name
-   * @param   callback
-   *          The callback to pass an array of Addons to.
-   * @throws  if the callback argument is not specified
+   * @param  aTypes
+   *         An optional array of types to retrieve. Each type is a string name
+   * @param  aCallback
+   *         The callback to pass an array of Addons to.
+   * @throws if the aCallback argument is not specified
    */
-  getAddonsByTypes: function AMI_getAddonsByTypes(types, callback) {
-    if (!callback)
+  getAddonsByTypes: function AMI_getAddonsByTypes(aTypes, aCallback) {
+    if (!aCallback)
       throw Cr.NS_ERROR_INVALID_ARG;
 
     let addons = [];
 
     new AsyncObjectCaller(this.providers, "getAddonsByTypes", {
-      nextObject: function(caller, provider) {
-        callProvider(provider, "getAddonsByTypes", null, types,
-                     function(providerAddons) {
-          addons = addons.concat(providerAddons);
-          caller.callNext();
+      nextObject: function(aCaller, aProvider) {
+        callProvider(aProvider, "getAddonsByTypes", null, aTypes,
+                     function(aProviderAddons) {
+          addons = addons.concat(aProviderAddons);
+          aCaller.callNext();
         });
       },
 
-      noMoreObjects: function(caller) {
-        safeCall(callback, addons);
+      noMoreObjects: function(aCaller) {
+        safeCall(aCallback, addons);
       }
     });
   },
 
   /**
    * Asynchronously gets add-ons that have operations waiting for an application
    * restart to complete.
    *
-   * @param   types
-   *          An optional array of types to retrieve. Each type is a string name
-   * @param   callback
-   *          The callback to pass the array of Addons to
-   * @throws  if the callback argument is not specified
+   * @param  aTypes
+   *         An optional array of types to retrieve. Each type is a string name
+   * @param  aCallback
+   *         The callback to pass the array of Addons to
+   * @throws if the aCallback argument is not specified
    */
   getAddonsWithPendingOperations:
-  function AMI_getAddonsWithPendingOperations(types, callback) {
-    if (!callback)
+  function AMI_getAddonsWithPendingOperations(aTypes, aCallback) {
+    if (!aCallback)
       throw Cr.NS_ERROR_INVALID_ARG;
 
     let addons = [];
 
     new AsyncObjectCaller(this.providers, "getAddonsWithPendingOperations", {
-      nextObject: function(caller, provider) {
-        callProvider(provider, "getAddonsWithPendingOperations", null, types,
-                     function(providerAddons) {
-          addons = addons.concat(providerAddons);
-          caller.callNext();
+      nextObject: function(aCaller, aProvider) {
+        callProvider(aProvider, "getAddonsWithPendingOperations", null, aTypes,
+                     function(aProviderAddons) {
+          addons = addons.concat(aProviderAddons);
+          aCaller.callNext();
         });
       },
 
       noMoreObjects: function(caller) {
-        safeCall(callback, addons);
+        safeCall(aCallback, addons);
       }
     });
   },
 
   /**
    * Adds a new AddonListener if the listener is not already registered.
    *
-   * @param   listener
-   *          The listener to add
+   * @param  aListener
+   *         The listener to add
    */
-  addAddonListener: function AMI_addAddonListener(listener) {
-    if (!this.addonListeners.some(function(i) { return i == listener; }))
-      this.addonListeners.push(listener);
+  addAddonListener: function AMI_addAddonListener(aListener) {
+    if (!this.addonListeners.some(function(i) { return i == aListener; }))
+      this.addonListeners.push(aListener);
   },
 
   /**
    * Removes an AddonListener if the listener is registered.
    *
-   * @param   listener
-   *          The listener to remove
+   * @param  aListener
+   *         The listener to remove
    */
-  removeAddonListener: function AMI_removeAddonListener(listener) {
+  removeAddonListener: function AMI_removeAddonListener(aListener) {
     this.addonListeners = this.addonListeners.filter(function(i) {
-      return i != listener;
+      return i != aListener;
     });
   }
 };
 
 /**
  * Should not be used outside of core Mozilla code. This is a private API for
  * the startup and platform integration code to use. Refer to the methods on
  * AddonManagerInternal for documentation however note that these methods are
  * subject to change at any time.
  */
 var AddonManagerPrivate = {
   startup: function AMP_startup() {
     AddonManagerInternal.startup();
   },
 
-  registerProvider: function AMP_registerProvider(provider) {
-    AddonManagerInternal.registerProvider(provider);
+  registerProvider: function AMP_registerProvider(aProvider) {
+    AddonManagerInternal.registerProvider(aProvider);
   },
 
   shutdown: function AMP_shutdown() {
     AddonManagerInternal.shutdown();
   },
 
   backgroundUpdateCheck: function AMP_backgroundUpdateCheck() {
     AddonManagerInternal.backgroundUpdateCheck();
   },
 
-  notifyAddonChanged: function AMP_notifyAddonChanged(id, type, pendingRestart) {
-    AddonManagerInternal.notifyAddonChanged(id, type, pendingRestart);
+  notifyAddonChanged: function AMP_notifyAddonChanged(aId, aType, aPendingRestart) {
+    AddonManagerInternal.notifyAddonChanged(aId, aType, aPendingRestart);
   },
 
-  callInstallListeners: function AMP_callInstallListeners(method) {
+  callInstallListeners: function AMP_callInstallListeners(aMethod) {
     return AddonManagerInternal.callInstallListeners.apply(AddonManagerInternal,
-                                                          arguments);
+                                                           arguments);
   },
 
-  callAddonListeners: function AMP_callAddonListeners(method) {
+  callAddonListeners: function AMP_callAddonListeners(aMethod) {
     AddonManagerInternal.callAddonListeners.apply(AddonManagerInternal, arguments);
   }
 };
 
 /**
  * This is the public API that UI and developers should be calling. All methods
  * just forward to AddonManagerInternal.
  */
@@ -834,69 +833,69 @@ var AddonManager = {
   SCOPE_USER: 2,
   // Installed and owned by the application.
   SCOPE_APPLICATION: 4,
   // Installed for all users of the computer.
   SCOPE_SYSTEM: 8,
   // The combination of all scopes.
   SCOPE_ALL: 15,
 
-  getInstallForURL: function AM_getInstallForURL(url, callback, mimetype, hash,
-                                                 name, iconURL, version,
-                                                 loadGroup) {
-    AddonManagerInternal.getInstallForURL(url, callback, mimetype, hash, name,
-                                         iconURL, version, loadGroup);
+  getInstallForURL: function AM_getInstallForURL(aUrl, aCallback, aMimetype,
+                                                 aHash, aName, aIconURL,
+                                                 aVersion, aLoadGroup) {
+    AddonManagerInternal.getInstallForURL(aUrl, aCallback, aMimetype, aHash,
+                                          aName, aIconURL, aVersion, aLoadGroup);
   },
 
-  getInstallForFile: function AM_getInstallForFile(file, callback, mimetype) {
-    AddonManagerInternal.getInstallForFile(file, callback, mimetype);
+  getInstallForFile: function AM_getInstallForFile(aFile, aCallback, aMimetype) {
+    AddonManagerInternal.getInstallForFile(aFile, aCallback, aMimetype);
   },
 
-  getAddon: function AM_getAddon(id, callback) {
-    AddonManagerInternal.getAddon(id, callback);
+  getAddon: function AM_getAddon(aId, aCallback) {
+    AddonManagerInternal.getAddon(aId, aCallback);
   },
 
-  getAddons: function AM_getAddons(ids, callback) {
-    AddonManagerInternal.getAddons(ids, callback);
+  getAddons: function AM_getAddons(aIds, aCallback) {
+    AddonManagerInternal.getAddons(aIds, aCallback);
   },
 
   getAddonsWithPendingOperations:
-  function AM_getAddonsWithPendingOperations(types, callback) {
-    AddonManagerInternal.getAddonsWithPendingOperations(types, callback);
+  function AM_getAddonsWithPendingOperations(aTypes, aCallback) {
+    AddonManagerInternal.getAddonsWithPendingOperations(aTypes, aCallback);
   },
 
-  getAddonsByTypes: function AM_getAddonsByTypes(types, callback) {
-    AddonManagerInternal.getAddonsByTypes(types, callback);
+  getAddonsByTypes: function AM_getAddonsByTypes(aTypes, aCallback) {
+    AddonManagerInternal.getAddonsByTypes(aTypes, aCallback);
   },
 
-  getInstalls: function AM_getInstalls(types, callback) {
-    AddonManagerInternal.getInstalls(types, callback);
+  getInstalls: function AM_getInstalls(aTypes, aCallback) {
+    AddonManagerInternal.getInstalls(aTypes, aCallback);
   },
 
-  isInstallEnabled: function AM_isInstallEnabled(type) {
-    return AddonManagerInternal.isInstallEnabled(type);
+  isInstallEnabled: function AM_isInstallEnabled(aType) {
+    return AddonManagerInternal.isInstallEnabled(aType);
   },
 
-  isInstallAllowed: function AM_isInstallAllowed(type, uri) {
-    return AddonManagerInternal.isInstallAllowed(type, uri);
+  isInstallAllowed: function AM_isInstallAllowed(aType, aUri) {
+    return AddonManagerInternal.isInstallAllowed(aType, aUri);
   },
 
-  installAddonsFromWebpage: function AM_installAddonsFromWebpage(type, source,
-                                                                 uri, installs) {
-    AddonManagerInternal.installAddonsFromWebpage(type, source, uri, installs);
+  installAddonsFromWebpage: function AM_installAddonsFromWebpage(aType, aSource,
+                                                                 aUri, aInstalls) {
+    AddonManagerInternal.installAddonsFromWebpage(aType, aSource, aUri, aInstalls);
   },
 
-  addInstallListener: function AM_addInstallListener(listener) {
-    AddonManagerInternal.addInstallListener(listener);
+  addInstallListener: function AM_addInstallListener(aListener) {
+    AddonManagerInternal.addInstallListener(aListener);
   },
 
-  removeInstallListener: function AM_removeInstallListener(listener) {
-    AddonManagerInternal.removeInstallListener(listener);
+  removeInstallListener: function AM_removeInstallListener(aListener) {
+    AddonManagerInternal.removeInstallListener(aListener);
   },
 
-  addAddonListener: function AM_addAddonListener(listener) {
-    AddonManagerInternal.addAddonListener(listener);
+  addAddonListener: function AM_addAddonListener(aListener) {
+    AddonManagerInternal.addAddonListener(aListener);
   },
 
-  removeAddonListener: function AM_removeAddonListener(listener) {
-    AddonManagerInternal.removeAddonListener(listener);
+  removeAddonListener: function AM_removeAddonListener(aListener) {
+    AddonManagerInternal.removeAddonListener(aListener);
   }
 };
--- a/toolkit/mozapps/extensions/AddonUpdateChecker.jsm
+++ b/toolkit/mozapps/extensions/AddonUpdateChecker.jsm
@@ -61,40 +61,40 @@ Components.utils.import("resource://gre/
 Components.utils.import("resource://gre/modules/CertUtils.jsm");
 
 var gRDF = Cc["@mozilla.org/rdf/rdf-service;1"].
            getService(Ci.nsIRDFService);
 
 /**
  * Logs a debug message.
  *
- * @param   str
- *          The string to log
+ * @param  aStr
+ *         The string to log
  */
-function LOG(str) {
-  dump("*** addons.updates: " + str + "\n");
+function LOG(aStr) {
+  dump("*** addons.updates: " + aStr + "\n");
 }
 
 /**
  * Logs a warning message
  *
- * @param   str
- *          The string to log
+ * @param  aStr
+ *         The string to log
  */
-function WARN(str) {
-  LOG(str);
+function WARN(aStr) {
+  LOG(aStr);
 }
 
 /**
  * Logs an error message
  *
- * @param   str
- *          The string to log
+ * @param  aStr
+ *         The string to log
  */
-function ERROR(str) {
+function ERROR(aStr) {
   LOG(str);
 }
 
 /**
  * A serialisation method for RDF data that produces an identical string
  * for matching RDF graphs.
  * The serialisation is not complete, only assertions stemming from a given
  * resource are included, multiple references to the same resource are not
@@ -109,243 +109,249 @@ function RDFSerializer() {
 
 RDFSerializer.prototype = {
   INDENT: "  ",      // The indent used for pretty-printing
   resources: null,   // Array of the resources that have been found
 
   /**
    * Escapes characters from a string that should not appear in XML.
    *
-   * @param   string
-   *          The string to be escaped
-   * @return  a string with all characters invalid in XML character data
-   *          converted to entity references.
+   * @param  aString
+   *         The string to be escaped
+   * @return a string with all characters invalid in XML character data
+   *         converted to entity references.
    */
-  escapeEntities: function RDFS_escapeEntities(string) {
-    string = string.replace(/&/g, "&amp;");
-    string = string.replace(/</g, "&lt;");
-    string = string.replace(/>/g, "&gt;");
-    return string.replace(/"/g, "&quot;");
+  escapeEntities: function RDFS_escapeEntities(aString) {
+    aString = aString.replace(/&/g, "&amp;");
+    aString = aString.replace(/</g, "&lt;");
+    aString = aString.replace(/>/g, "&gt;");
+    return aString.replace(/"/g, "&quot;");
   },
 
   /**
    * Serializes all the elements of an RDF container.
    *
-   * @param   ds
-   *          The RDF datasource
-   * @param   container
-   *          The RDF container to output the child elements of
-   * @param   indent
-   *          The current level of indent for pretty-printing
-   * @return  a string containing the serialized elements.
+   * @param  aDs
+   *         The RDF datasource
+   * @param  aContainer
+   *         The RDF container to output the child elements of
+   * @param  aIndent
+   *         The current level of indent for pretty-printing
+   * @return a string containing the serialized elements.
    */
-  serializeContainerItems: function RDFS_serializeContainerItems(ds, container, indent) {
+  serializeContainerItems: function RDFS_serializeContainerItems(aDs, aContainer,
+                                                                 aIndent) {
     var result = "";
-    var items = container.GetElements();
+    var items = aContainer.GetElements();
     while (items.hasMoreElements()) {
       var item = items.getNext().QueryInterface(Ci.nsIRDFResource);
-      result += indent + "<RDF:li>\n"
-      result += this.serializeResource(ds, item, indent + this.INDENT);
-      result += indent + "</RDF:li>\n"
+      result += aIndent + "<RDF:li>\n"
+      result += this.serializeResource(aDs, item, aIndent + this.INDENT);
+      result += aIndent + "</RDF:li>\n"
     }
     return result;
   },
 
   /**
    * Serializes all em:* (see EM_NS) properties of an RDF resource except for
    * the em:signature property. As this serialization is to be compared against
    * the manifest signature it cannot contain the em:signature property itself.
    *
-   * @param   ds
-   *          The RDF datasource
-   * @param   resource
-   *          The RDF resource that contains the properties to serialize
-   * @param   indent
-   *          The current level of indent for pretty-printing
-   * @return  a string containing the serialized properties.
-   * @throws  if the resource contains a property that cannot be serialized
+   * @param  aDs
+   *         The RDF datasource
+   * @param  aResource
+   *         The RDF resource that contains the properties to serialize
+   * @param  aIndent
+   *         The current level of indent for pretty-printing
+   * @return a string containing the serialized properties.
+   * @throws if the resource contains a property that cannot be serialized
    */
-  serializeResourceProperties: function RDFS_serializeResourceProperties(ds, resource, indent) {
+  serializeResourceProperties: function RDFS_serializeResourceProperties(aDs,
+                                                                         aResource,
+                                                                         aIndent) {
     var result = "";
     var items = [];
-    var arcs = ds.ArcLabelsOut(resource);
+    var arcs = aDs.ArcLabelsOut(aResource);
     while (arcs.hasMoreElements()) {
       var arc = arcs.getNext().QueryInterface(Ci.nsIRDFResource);
       if (arc.ValueUTF8.substring(0, PREFIX_NS_EM.length) != PREFIX_NS_EM)
         continue;
       var prop = arc.ValueUTF8.substring(PREFIX_NS_EM.length);
       if (prop == "signature")
         continue;
 
-      var targets = ds.GetTargets(resource, arc, true);
+      var targets = aDs.GetTargets(aResource, arc, true);
       while (targets.hasMoreElements()) {
         var target = targets.getNext();
         if (target instanceof Ci.nsIRDFResource) {
-          var item = indent + "<em:" + prop + ">\n";
-          item += this.serializeResource(ds, target, indent + this.INDENT);
-          item += indent + "</em:" + prop + ">\n";
+          var item = aIndent + "<em:" + prop + ">\n";
+          item += this.serializeResource(aDs, target, aIndent + this.INDENT);
+          item += aIndent + "</em:" + prop + ">\n";
           items.push(item);
         }
         else if (target instanceof Ci.nsIRDFLiteral) {
-          items.push(indent + "<em:" + prop + ">" + this.escapeEntities(target.Value) + "</em:" + prop + ">\n");
+          items.push(aIndent + "<em:" + prop + ">" +
+                     this.escapeEntities(target.Value) + "</em:" + prop + ">\n");
         }
         else if (target instanceof Ci.nsIRDFInt) {
-          items.push(indent + "<em:" + prop + " NC:parseType=\"Integer\">" + target.Value + "</em:" + prop + ">\n");
+          items.push(aIndent + "<em:" + prop + " NC:parseType=\"Integer\">" +
+                     target.Value + "</em:" + prop + ">\n");
         }
         else {
           throw new Error("Cannot serialize unknown literal type");
         }
       }
     }
     items.sort();
     result += items.join("");
     return result;
   },
 
   /**
    * Recursively serializes an RDF resource and all resources it links to.
    * This will only output EM_NS properties and will ignore any em:signature
    * property.
    *
-   * @param   ds
-   *          The RDF datasource
-   * @param   resource
-   *          The RDF resource to serialize
-   * @param   indent
-   *          The current level of indent for pretty-printing. If undefined no
-   *          indent will be added
-   * @return  a string containing the serialized resource.
-   * @throws  if the RDF data contains multiple references to the same resource.
+   * @param  aDs
+   *         The RDF datasource
+   * @param  aResource
+   *         The RDF resource to serialize
+   * @param  aIndent
+   *         The current level of indent for pretty-printing. If undefined no
+   *         indent will be added
+   * @return a string containing the serialized resource.
+   * @throws if the RDF data contains multiple references to the same resource.
    */
-  serializeResource: function RDFS_serializeResource(ds, resource, indent) {
-    if (this.resources.indexOf(resource) != -1 ) {
+  serializeResource: function RDFS_serializeResource(aDs, aResource, aIndent) {
+    if (this.resources.indexOf(aResource) != -1 ) {
       // We cannot output multiple references to the same resource.
-      throw new Error("Cannot serialize multiple references to " + resource.Value);
+      throw new Error("Cannot serialize multiple references to " + aResource.Value);
     }
-    if (indent === undefined)
-      indent = "";
+    if (aIndent === undefined)
+      aIndent = "";
 
-    this.resources.push(resource);
+    this.resources.push(aResource);
     var container = null;
     var type = "Description";
-    if (this.cUtils.IsSeq(ds, resource)) {
+    if (this.cUtils.IsSeq(aDs, aResource)) {
       type = "Seq";
-      container = this.cUtils.MakeSeq(ds, resource);
+      container = this.cUtils.MakeSeq(aDs, aResource);
     }
-    else if (this.cUtils.IsAlt(ds, resource)) {
+    else if (this.cUtils.IsAlt(aDs, aResource)) {
       type = "Alt";
-      container = this.cUtils.MakeAlt(ds, resource);
+      container = this.cUtils.MakeAlt(aDs, aResource);
     }
-    else if (this.cUtils.IsBag(ds, resource)) {
+    else if (this.cUtils.IsBag(aDs, aResource)) {
       type = "Bag";
-      container = this.cUtils.MakeBag(ds, resource);
+      container = this.cUtils.MakeBag(aDs, aResource);
     }
 
-    var result = indent + "<RDF:" + type;
-    if (!gRDF.IsAnonymousResource(resource))
-      result += " about=\"" + this.escapeEntities(resource.ValueUTF8) + "\"";
+    var result = aIndent + "<RDF:" + type;
+    if (!gRDF.IsAnonymousResource(aResource))
+      result += " about=\"" + this.escapeEntities(aResource.ValueUTF8) + "\"";
     result += ">\n";
 
     if (container)
-      result += this.serializeContainerItems(ds, container, indent + this.INDENT);
+      result += this.serializeContainerItems(aDs, container, aIndent + this.INDENT);
 
-    result += this.serializeResourceProperties(ds, resource, indent + this.INDENT);
+    result += this.serializeResourceProperties(aDs, aResource, aIndent + this.INDENT);
 
-    result += indent + "</RDF:" + type + ">\n";
+    result += aIndent + "</RDF:" + type + ">\n";
     return result;
   }
 }
 
 /**
  * Parses an RDF style update manifest into an array of update objects.
  *
- * @param   id
- *          The ID of the add-on being checked for updates
- * @param   type
- *          The type of the add-on being checked for updates
- * @param   updateKey
- *          An optional update key for the add-on
- * @param   The XMLHttpRequest that has retrieved the update manifest
- * @return  an array of update objects
- * @throws  if the update manifest is invalid in any way
+ * @param  aId
+ *         The ID of the add-on being checked for updates
+ * @param  aType
+ *         The type of the add-on being checked for updates
+ * @param  aUpdateKey
+ *         An optional update key for the add-on
+ * @param  aRequest
+ *         The XMLHttpRequest that has retrieved the update manifest
+ * @return an array of update objects
+ * @throws if the update manifest is invalid in any way
  */
-function parseRDFManifest(id, type, updateKey, request) {
-  function EM_R(prop) {
-    return gRDF.GetResource(PREFIX_NS_EM + prop);
+function parseRDFManifest(aId, aType, aUpdateKey, aRequest) {
+  function EM_R(aProp) {
+    return gRDF.GetResource(PREFIX_NS_EM + aProp);
   }
 
-  function getValue(literal) {
-    if (literal instanceof Ci.nsIRDFLiteral)
-      return literal.Value;
-    if (literal instanceof Ci.nsIRDFResource)
-      return literal.Value;
-    if (literal instanceof Ci.nsIRDFInt)
-      return literal.Value;
+  function getValue(aLiteral) {
+    if (aLiteral instanceof Ci.nsIRDFLiteral)
+      return aLiteral.Value;
+    if (aLiteral instanceof Ci.nsIRDFResource)
+      return aLiteral.Value;
+    if (aLiteral instanceof Ci.nsIRDFInt)
+      return aLiteral.Value;
     return null;
   }
 
-  function getProperty(ds, source, property) {
-    return getValue(ds.GetTarget(source, EM_R(property), true));
+  function getProperty(aDs, aSource, aProperty) {
+    return getValue(aDs.GetTarget(aSource, EM_R(aProperty), true));
   }
 
-  function getRequiredProperty(ds, source, property) {
-    let value = getProperty(ds, source, property);
+  function getRequiredProperty(aDs, aSource, aProperty) {
+    let value = getProperty(aDs, aSource, aProperty);
     if (!value)
-      throw new Error("Update manifest is missing a required " + property + " property.");
+      throw new Error("Update manifest is missing a required " + aProperty + " property.");
     return value;
   }
 
   let rdfParser = Cc["@mozilla.org/rdf/xml-parser;1"].
                   createInstance(Ci.nsIRDFXMLParser);
   let ds = Cc["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"].
            createInstance(Ci.nsIRDFDataSource);
-  rdfParser.parseString(ds, request.channel.URI, request.responseText);
+  rdfParser.parseString(ds, aRequest.channel.URI, aRequest.responseText);
 
-  switch (type) {
+  switch (aType) {
   case "extension":
-    var item = PREFIX_EXTENSION + id;
+    var item = PREFIX_EXTENSION + aId;
     break;
   case "theme":
-    item = PREFIX_THEME + id;
+    item = PREFIX_THEME + aId;
     break;
   default:
-    item = PREFIX_ITEM + id;
+    item = PREFIX_ITEM + aId;
     break;
   }
 
   let extensionRes  = gRDF.GetResource(item);
 
   // If we have an update key then the update manifest must be signed
-  if (updateKey) {
+  if (aUpdateKey) {
     let signature = getProperty(ds, extensionRes, "signature");
     if (!signature)
-      throw new Error("Update manifest for " + id + " does not contain a required signature");
+      throw new Error("Update manifest for " + aId + " does not contain a required signature");
     let serializer = new RDFSerializer();
     let updateString = null;
 
     try {
       updateString = serializer.serializeResource(ds, extensionRes);
     }
     catch (e) {
-      throw new Error("Failed to generate signed string for " + id + ". Serializer threw " + e);
+      throw new Error("Failed to generate signed string for " + aId + ". Serializer threw " + e);
     }
 
     let result = false;
 
     try {
       let verifier = Cc["@mozilla.org/security/datasignatureverifier;1"].
                      getService(Ci.nsIDataSignatureVerifier);
-      result = verifier.verifyData(updateString, signature, updateKey);
+      result = verifier.verifyData(updateString, signature, aUpdateKey);
     }
     catch (e) {
-      throw new Error("The signature or updateKey for " + id + " is malformed");
+      throw new Error("The signature or updateKey for " + aId + " is malformed");
     }
 
     if (!result)
-      throw new Error("The signature for " + id + " was not created by the add-on's updateKey");
+      throw new Error("The signature for " + aId + " was not created by the add-on's updateKey");
   }
 
   let updates = ds.GetTarget(extensionRes, EM_R("updates"), true);
 
   if (!updates || !(updates instanceof Ci.nsIRDFResource))
     throw new Error("Missing updates property for " + extensionRes.Value);
 
   let cu = Cc["@mozilla.org/rdf/container-utils;1"].
@@ -369,17 +375,17 @@ function parseRDFManifest(id, type, upda
   while (items.hasMoreElements()) {
     let item = items.getNext().QueryInterface(Ci.nsIRDFResource);
     let version = getProperty(ds, item, "version");
     if (!version) {
       WARN("Update manifest is missing a required version property.");
       continue;
     }
 
-    LOG("Found an update entry for " + id + " version " + version);
+    LOG("Found an update entry for " + aId + " version " + version);
 
     let targetApps = ds.GetTargets(item, EM_R("targetApplication"), true);
     while (targetApps.hasMoreElements()) {
       let targetApp = targetApps.getNext().QueryInterface(Ci.nsIRDFResource);
 
       let appEntry = {};
       try {
         appEntry.id = getRequiredProperty(ds, targetApp, "id");
@@ -412,41 +418,41 @@ function parseRDFManifest(id, type, upda
   }
   return results;
 }
 
 /**
  * Starts downloading an update manifest and then passes it to an appropriate
  * parser to convert to an array of update objects
  *
- * @param   id
- *          The ID of the add-on being checked for updates
- * @param   type
- *          The type of add-on being checked for updates
- * @param   updateKey
- *          An optional update key for the add-on
- * @param   url
- *          The URL of the update manifest
- * @param   observer
- *          An observer to pass results to
+ * @param  aId
+ *         The ID of the add-on being checked for updates
+ * @param  aType
+ *         The type of add-on being checked for updates
+ * @param  aUpdateKey
+ *         An optional update key for the add-on
+ * @param  aUrl
+ *         The URL of the update manifest
+ * @param  aObserver
+ *         An observer to pass results to
  */
-function UpdateParser(id, type, updateKey, url, observer) {
-  this.id = id;
-  this.type = type;
-  this.updateKey = updateKey;
-  this.observer = observer;
+function UpdateParser(aId, aType, aUpdateKey, aUrl, aObserver) {
+  this.id = aId;
+  this.type = aType;
+  this.updateKey = aUpdateKey;
+  this.observer = aObserver;
 
   this.timer = Cc["@mozilla.org/timer;1"].
                createInstance(Ci.nsITimer);
   this.timer.initWithCallback(this, TIMEOUT, Ci.nsITimer.TYPE_ONE_SHOT);
 
-  LOG("Requesting " + url);
+  LOG("Requesting " + aUrl);
   this.request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
                  createInstance(Ci.nsIXMLHttpRequest);
-  this.request.open("GET", url, true);
+  this.request.open("GET", aUrl, true);
   this.request.channel.notificationCallbacks = new BadCertHandler();
   this.request.channel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE;
   this.request.overrideMimeType("text/xml");
   var self = this;
   this.request.onload = function(event) { self.onLoad() };
   this.request.onerror = function(event) { self.onError() };
   this.request.send(null);
 }
@@ -521,153 +527,153 @@ UpdateParser.prototype = {
     this.request = null;
 
     this.notifyError(AddonUpdateChecker.ERROR_DOWNLOAD_ERROR);
   },
 
   /**
    * Helper method to notify the observer that an error occured.
    */
-  notifyError: function UP_notifyError(status) {
+  notifyError: function UP_notifyError(aStatus) {
     if ("onUpdateCheckError" in this.observer)
-      this.observer.onUpdateCheckError(status);
+      this.observer.onUpdateCheckError(aStatus);
   },
 
   /**
    * Called when the request has timed out and should be canceled.
    */
-  notify: function UP_notify(timer) {
+  notify: function UP_notify(aTimer) {
     this.timer = null;
     this.request.abort();
     this.request = null;
 
     WARN("Request timed out");
 
     this.notifyError(AddonUpdateChecker.ERROR_TIMEOUT);
   }
 };
 
 /**
  * Tests if an update matches a version of the application or platform
  *
- * @param   update
- *          The available update
- * @param   appVersion
- *          The application version to use
- * @param   platformVersion
- *          The platform version to use
- * @return  true if the update is compatible with the application/platform
+ * @param  aUpdate
+ *         The available update
+ * @param  aAppVersion
+ *         The application version to use
+ * @param  aPlatformVersion
+ *         The platform version to use
+ * @return true if the update is compatible with the application/platform
  */
-function matchesVersions(update, appVersion, platformVersion) {
+function matchesVersions(aUpdate, aAppVersion, aPlatformVersion) {
   let result = false;
-  for (let i = 0; i < update.targetApplications.length; i++) {
-    let app = update.targetApplications[i];
+  for (let i = 0; i < aUpdate.targetApplications.length; i++) {
+    let app = aUpdate.targetApplications[i];
     if (app.id == Services.appinfo.ID) {
-      return (Services.vc.compare(appVersion, app.minVersion) >= 0) &&
-             (Services.vc.compare(appVersion, app.maxVersion) <= 0);
+      return (Services.vc.compare(aAppVersion, app.minVersion) >= 0) &&
+             (Services.vc.compare(aAppVersion, app.maxVersion) <= 0);
     }
     if (app.id == TOOLKIT_ID) {
-      result = (Services.vc.compare(platformVersion, app.minVersion) >= 0) &&
-               (Services.vc.compare(platformVersion, app.maxVersion) <= 0);
+      result = (Services.vc.compare(aPlatformVersion, app.minVersion) >= 0) &&
+               (Services.vc.compare(aPlatformVersion, app.maxVersion) <= 0);
     }
   }
   return result;
 }
 
 var AddonUpdateChecker = {
   ERROR_TIMEOUT: -1,
   ERROR_DOWNLOAD_ERROR: -2,
   ERROR_PARSE_ERROR: -3,
   ERROR_UNKNOWN_FORMAT: -4,
   ERROR_SECURITY_ERROR: -5,
 
   /**
    * Retrieves the best matching compatibility update for the application from
    * a list of available update objects.
    *
-   * @param   updates
-   *          An array of update objects
-   * @param   version
-   *          The version of the add-on to get new compatibility information for
-   * @param   ignoreCompatibility
-   *          An optional parameter to get the first compatibility update that
-   *          is compatible with any version of the application or toolkit
-   * @param   appVersion
-   *          The version of the application or null to use the current version
-   * @param   platformVersion
-   *          The version of the platform or null to use the current version
-   * @return  an update object if one matches or null if not
+   * @param  aUpdates
+   *         An array of update objects
+   * @param  aVersion
+   *         The version of the add-on to get new compatibility information for
+   * @param  aIgnoreCompatibility
+   *         An optional parameter to get the first compatibility update that
+   *         is compatible with any version of the application or toolkit
+   * @param  aAppVersion
+   *         The version of the application or null to use the current version
+   * @param  aPlatformVersion
+   *         The version of the platform or null to use the current version
+   * @return an update object if one matches or null if not
    */
-  getCompatibilityUpdate: function AUC_getCompatibilityUpdate(updates, version,
-                                                              ignoreCompatibility,
-                                                              appVersion,
-                                                              platformVersion) {
-    if (!appVersion)
-      appVersion = Services.appinfo.version;
-    if (!platformVersion)
-      platformVersion = Services.appinfo.platformVersion;
+  getCompatibilityUpdate: function AUC_getCompatibilityUpdate(aUpdates, aVersion,
+                                                              aIgnoreCompatibility,
+                                                              aAppVersion,
+                                                              aPlatformVersion) {
+    if (!aAppVersion)
+      aAppVersion = Services.appinfo.version;
+    if (!aPlatformVersion)
+      aPlatformVersion = Services.appinfo.platformVersion;
 
-    for (let i = 0; i < updates.length; i++) {
-      if (Services.vc.compare(updates[i].version, version) == 0) {
-        if (ignoreCompatibility) {
-          for (let j = 0; j < updates[i].targetApplications.length; j++) {
-            let id = updates[i].targetApplications[j].id;
+    for (let i = 0; i < aUpdates.length; i++) {
+      if (Services.vc.compare(aUpdates[i].version, aVersion) == 0) {
+        if (aIgnoreCompatibility) {
+          for (let j = 0; j < aUpdates[i].targetApplications.length; j++) {
+            let id = aUpdates[i].targetApplications[j].id;
             if (id == Services.appinfo.ID || id == TOOLKIT_ID)
-              return updates[i];
+              return aUpdates[i];
           }
         }
-        else if (matchesVersions(updates[i], appVersion, platformVersion)) {
-          return updates[i];
+        else if (matchesVersions(aUpdates[i], aAppVersion, aPlatformVersion)) {
+          return aUpdates[i];
         }
       }
     }
     return null;
   },
 
   /**
    * Returns the newest available update from a list of update objects.
    *
-   * @param   updates
-   *          An array of update objects
-   * @param   appVersion
-   *          The version of the application or null to use the current version
-   * @param   platformVersion
-   *          The version of the platform or null to use the current version
-   * @return  an update object if one matches or null if not
+   * @param  aUpdates
+   *         An array of update objects
+   * @param  aAppVersion
+   *         The version of the application or null to use the current version
+   * @param  aPlatformVersion
+   *         The version of the platform or null to use the current version
+   * @return an update object if one matches or null if not
    */
-  getNewestCompatibleUpdate: function AUC_getNewestCompatibleUpdate(updates,
-                                                                    appVersion,
-                                                                    platformVersion) {
-    if (!appVersion)
-      appVersion = Services.appinfo.version;
-    if (!platformVersion)
-      platformVersion = Services.appinfo.platformVersion;
+  getNewestCompatibleUpdate: function AUC_getNewestCompatibleUpdate(aUpdates,
+                                                                    aAppVersion,
+                                                                    aPlatformVersion) {
+    if (!aAppVersion)
+      aAppVersion = Services.appinfo.version;
+    if (!aPlatformVersion)
+      aPlatformVersion = Services.appinfo.platformVersion;
 
     let newest = null;
-    for (let i = 0; i < updates.length; i++) {
-      if (!updates[i].updateURL)
+    for (let i = 0; i < aUpdates.length; i++) {
+      if (!aUpdates[i].updateURL)
         continue;
-      if ((newest == null || (Services.vc.compare(newest.version, updates[i].version) < 0)) &&
-          matchesVersions(updates[i], appVersion, platformVersion))
-        newest = updates[i];
+      if ((newest == null || (Services.vc.compare(newest.version, aUpdates[i].version) < 0)) &&
+          matchesVersions(aUpdates[i], aAppVersion, aPlatformVersion))
+        newest = aUpdates[i];
     }
     return newest;
   },
 
   /**
    * Starts an update check.
    *
-   * @param   id
-   *          The ID of the add-on being checked for updates
-   * @param   type
-   *          The type of add-on being checked for updates
-   * @param   updateKey
-   *          An optional update key for the add-on
-   * @param   url
-   *          The URL of the add-on's update manifest
-   * @param   observer
-   *          An observer to notify of results
+   * @param  aId
+   *         The ID of the add-on being checked for updates
+   * @param  aType
+   *         The type of add-on being checked for updates
+   * @param  aUpdateKey
+   *         An optional update key for the add-on
+   * @param  aUrl
+   *         The URL of the add-on's update manifest
+   * @param  aObserver
+   *         An observer to notify of results
    */
-  checkForUpdates: function AUC_checkForUpdates(id, type, updateKey, url,
-                                                observer) {
-    new UpdateParser(id, type, updateKey, url, observer);
+  checkForUpdates: function AUC_checkForUpdates(aId, aType, aUpdateKey, aUrl,
+                                                aObserver) {
+    new UpdateParser(aId, aType, aUpdateKey, aUrl, aObserver);
   }
 };
--- a/toolkit/mozapps/extensions/LightweightThemeManager.jsm
+++ b/toolkit/mozapps/extensions/LightweightThemeManager.jsm
@@ -226,18 +226,18 @@ var LightweightThemeManager = {
     };
 
     req.send(null);
   },
 
   /**
    * Switches to a new lightweight theme.
    *
-   * @param   aData
-   *          The lightweight theme to switch to
+   * @param  aData
+   *         The lightweight theme to switch to
    */
   themeChanged: function(aData) {
     if (_previewTimer) {
       _previewTimer.cancel();
       _previewTimer = null;
     }
 
     if (aData) {
@@ -267,23 +267,23 @@ var LightweightThemeManager = {
       Services.prefs.clearUserPref(PREF_LWTHEME_TO_SELECT);
     }
   },
 
   /**
    * Called when a new add-on has been enabled when only one add-on of that type
    * can be enabled.
    *
-   * @param   aId
-   *          The ID of the newly enabled add-on
-   * @param   aType
-   *          The type of the newly enabled add-on
-   * @param   aPendingRestart
-   *          true if the newly enabled add-on will only become enabled after a
-   *          restart
+   * @param  aId
+   *         The ID of the newly enabled add-on
+   * @param  aType
+   *         The type of the newly enabled add-on
+   * @param  aPendingRestart
+   *         true if the newly enabled add-on will only become enabled after a
+   *         restart
    */
   addonChanged: function(aId, aType, aPendingRestart) {
     if (aType != ADDON_TYPE)
       return;
 
     let id = _getInternalID(aId);
     let current = this.currentTheme;
 
@@ -336,20 +336,20 @@ var LightweightThemeManager = {
         AddonManagerPrivate.callAddonListeners("onEnabled", wrapper);
       }
     }
   },
 
   /**
    * Called to get an Addon with a particular ID.
    *
-   * @param   aId
-   *          The ID of the add-on to retrieve
-   * @param   aCallback
-   *          A callback to pass the Addon to
+   * @param  aId
+   *         The ID of the add-on to retrieve
+   * @param  aCallback
+   *         A callback to pass the Addon to
    */
   getAddon: function(aId, aCallback) {
     let id = _getInternalID(aId);
     if (!id) {
       aCallback(null);
       return;
      }
 
@@ -360,20 +360,20 @@ var LightweightThemeManager = {
     }
 
     aCallback(new AddonWrapper(theme));
   },
 
   /**
    * Called to get Addons of a particular type.
    *
-   * @param   aTypes
-   *          An array of types to fetch. Can be null to get all types.
-   * @param   aCallback
-   *          A callback to pass an array of Addons to
+   * @param  aTypes
+   *         An array of types to fetch. Can be null to get all types.
+   * @param  aCallback
+   *         A callback to pass an array of Addons to
    */
   getAddonsByTypes: function(aTypes, aCallback) {
     if (aTypes && aTypes.indexOf(ADDON_TYPE) == -1) {
       aCallback([]);
       return;
     }
 
     aCallback([new AddonWrapper(a) for each (a in this.usedThemes)]);
--- a/toolkit/mozapps/extensions/PluginProvider.jsm
+++ b/toolkit/mozapps/extensions/PluginProvider.jsm
@@ -41,180 +41,187 @@ const Cc = Components.classes;
 const Ci = Components.interfaces;
 
 var EXPORTED_SYMBOLS = [];
 
 Components.utils.import("resource://gre/modules/AddonManager.jsm");
 
 /**
  * Logs a debug message.
- * @param   str
- *          The string to log
+ *
+ * @param  aStr
+ *         The string to log
  */
-function LOG(str) {
-  dump("*** addons.plugins: " + str + "\n");
+function LOG(aStr) {
+  dump("*** addons.plugins: " + aStr + "\n");
 }
 
 /**
  * Logs a warning message.
- * @param   str
- *          The string to log
+ *
+ * @param  aStr
+ *         The string to log
  */
-function WARN(str) {
-  LOG(str);
+function WARN(aStr) {
+  LOG(aStr);
 }
 
 /**
  * Logs an error message.
- * @param   str
- *          The string to log
+ *
+ * @param  aStr
+ *         The string to log
  */
-function ERROR(str) {
-  LOG(str);
+function ERROR(aStr) {
+  LOG(aStr);
 }
 
 var PluginProvider = {
   // A dictionary mapping IDs to names and descriptions
   plugins: null,
 
   /**
    * Called to get an Addon with a particular ID.
-   * @param   id
-   *          The ID of the add-on to retrieve
-   * @param   callback
-   *          A callback to pass the Addon to
+   *
+   * @param  aId
+   *         The ID of the add-on to retrieve
+   * @param  aCallback
+   *         A callback to pass the Addon to
    */
-  getAddon: function PL_getAddon(id, callback) {
+  getAddon: function PL_getAddon(aId, aCallback) {
     if (!this.plugins)
       this.buildPluginList();
 
-    if (id in this.plugins) {
-      let name = this.plugins[id].name;
-      let description = this.plugins[id].description;
+    if (aId in this.plugins) {
+      let name = this.plugins[aId].name;
+      let description = this.plugins[aId].description;
 
       let tags = Cc["@mozilla.org/plugin/host;1"].
                  getService(Ci.nsIPluginHost).
                  getPluginTags({});
       let selected = [];
-      tags.forEach(function(tag) {
-        if (tag.name == name && tag.description == description)
-          selected.push(tag);
+      tags.forEach(function(aTag) {
+        if (aTag.name == name && aTag.description == description)
+          selected.push(aTag);
       }, this);
 
-      callback(new PluginWrapper(id, name, description, selected));
+      aCallback(new PluginWrapper(aId, name, description, selected));
     }
     else {
-      callback(null);
+      aCallback(null);
     }
   },
 
   /**
    * Called to get Addons of a particular type.
-   * @param   types
-   *          An array of types to fetch. Can be null to get all types.
-   * @param   callback
-   *          A callback to pass an array of Addons to
+   *
+   * @param  aTypes
+   *         An array of types to fetch. Can be null to get all types.
+   * @param  callback
+   *         A callback to pass an array of Addons to
    */
-  getAddonsByTypes: function PL_getAddonsByTypes(types, callback) {
-    if (types && types.indexOf("plugin") < 0) {
-      callback([]);
+  getAddonsByTypes: function PL_getAddonsByTypes(aTypes, aCallback) {
+    if (aTypes && aTypes.indexOf("plugin") < 0) {
+      aCallback([]);
       return;
     }
 
     if (!this.plugins)
       this.buildPluginList();
 
     let results = [];
 
     for (let id in this.plugins) {
-      this.getAddon(id, function(addon) {
-        results.push(addon);
+      this.getAddon(id, function(aAddon) {
+        results.push(aAddon);
       });
     }
 
-    callback(results);
+    aCallback(results);
   },
 
   /**
    * Called to get Addons that have pending operations.
-   * @param   types
-   *          An array of types to fetch. Can be null to get all types
-   * @param   callback
-   *          A callback to pass an array of Addons to
+   *
+   * @param  aTypes
+   *         An array of types to fetch. Can be null to get all types
+   * @param  aCallback
+   *         A callback to pass an array of Addons to
    */
-  getAddonsWithPendingOperations: function PL_getAddonsWithPendingOperations(types, callback) {
-    callback([]);
+  getAddonsWithPendingOperations: function PL_getAddonsWithPendingOperations(aTypes, aCallback) {
+    aCallback([]);
   },
 
   /**
    * Called to get the current AddonInstalls, optionally restricting by type.
-   * @param   types
-   *          An array of types or null to get all types
-   * @param   callback
-   *          A callback to pass the array of AddonInstalls to
+   *
+   * @param  aTypes
+   *         An array of types or null to get all types
+   * @param  aCallback
+   *         A callback to pass the array of AddonInstalls to
    */
-  getInstalls: function PL_getInstalls(types, callback) {
-    callback([]);
+  getInstalls: function PL_getInstalls(aTypes, aCallback) {
+    aCallback([]);
   },
 
   buildPluginList: function PL_buildPluginList() {
     let tags = Cc["@mozilla.org/plugin/host;1"].
                getService(Ci.nsIPluginHost).
                getPluginTags({});
 
     this.plugins = {};
     let seen = {};
-    tags.forEach(function(tag) {
-      if (!(tag.name in seen))
-        seen[tag.name] = {};
-      if (!(tag.description in seen[tag.name])) {
+    tags.forEach(function(aTag) {
+      if (!(aTag.name in seen))
+        seen[aTag.name] = {};
+      if (!(aTag.description in seen[aTag.name])) {
         let id = Cc["@mozilla.org/uuid-generator;1"].
                  getService(Ci.nsIUUIDGenerator).
                  generateUUID();
         this.plugins[id] = {
-          name: tag.name,
-          description: tag.description
+          name: aTag.name,
+          description: aTag.description
         };
-        seen[tag.name][tag.description] = true;
+        seen[aTag.name][aTag.description] = true;
       }
     }, this);
   }
 };
 
 /**
  * The PluginWrapper wraps a set of nsIPluginTags to provide the data visible to
  * public callers through the API.
  */
-function PluginWrapper(id, name, description, tags) {
-  let safedesc = description.replace(/<\/?[a-z][^>]*>/gi, " ");
+function PluginWrapper(aId, aName, aDescription, aTags) {
+  let safedesc = aDescription.replace(/<\/?[a-z][^>]*>/gi, " ");
   let homepageURL = null;
-  if (/<A\s+HREF=[^>]*>/i.test(description))
-    homepageURL = /<A\s+HREF=["']?([^>"'\s]*)/i.exec(description)[1];
+  if (/<A\s+HREF=[^>]*>/i.test(aDescription))
+    homepageURL = /<A\s+HREF=["']?([^>"'\s]*)/i.exec(aDescription)[1];
 
-  this.__defineGetter__("id", function() id);
+  this.__defineGetter__("id", function() aId);
   this.__defineGetter__("type", function() "plugin");
-  this.__defineGetter__("name", function() name);
+  this.__defineGetter__("name", function() aName);
   this.__defineGetter__("description", function() safedesc);
-  this.__defineGetter__("version", function() tags[0].version);
+  this.__defineGetter__("version", function() aTags[0].version);
   this.__defineGetter__("homepageURL", function() homepageURL);
 
-  this.__defineGetter__("isActive", function() !tags[0].blocklisted && !tags[0].disabled);
+  this.__defineGetter__("isActive", function() !aTags[0].blocklisted && !aTags[0].disabled);
   this.__defineGetter__("isCompatible", function() true);
-  this.__defineGetter__("appDisabled", function() tags[0].blocklisted);
-  this.__defineGetter__("userDisabled", function() tags[0].disabled);
-  this.__defineSetter__("userDisabled", function(val) {
-    if (tags[0].disabled == val)
+  this.__defineGetter__("appDisabled", function() aTags[0].blocklisted);
+  this.__defineGetter__("userDisabled", function() aTags[0].disabled);
+  this.__defineSetter__("userDisabled", function(aVal) {
+    if (aTags[0].disabled == aVal)
       return;
 
-    tags.forEach(function(tag) {
-      tag.disabled = val;
+    aTags.forEach(function(aTag) {
+      aTag.disabled = aVal;
     });
-    AddonManagerPrivate.callAddonListeners(val ? "onDisabling" : "onEnabling", this, false);
-    AddonManagerPrivate.callAddonListeners(val ? "onDisabled" : "onEnabled", this);
-    return val;
+    AddonManagerPrivate.callAddonListeners(aVal ? "onDisabling" : "onEnabling", this, false);
+    AddonManagerPrivate.callAddonListeners(aVal ? "onDisabled" : "onEnabled", this);
+    return aVal;
   });
 
   this.__defineGetter__("pendingOperations", function() {
     return 0;
   });
 
   this.__defineGetter__("permissions", function() {
     let permissions = 0;
@@ -230,24 +237,24 @@ function PluginWrapper(id, name, descrip
   this.uninstall = function() {
     throw new Error("Cannot uninstall plugins");
   };
 
   this.cancelUninstall = function() {
     throw new Error("Plugin is not marked to be uninstalled");
   };
 
-  this.findUpdates = function(listener, reason, appVersion, platformVersion) {
+  this.findUpdates = function(aListener, aReason, aAppVersion, aPlatformVersion) {
     throw new Error("Cannot search for updates for plugins");
   };
 
-  this.hasResource = function(path) {
+  this.hasResource = function(aPath) {
     return false;
   },
 
-  this.getResourceURL = function(path) {
+  this.getResourceURL = function(aPath) {
     return null;
   }
 }
 
 PluginWrapper.prototype = { };
 
 AddonManagerPrivate.registerProvider(PluginProvider);
--- a/toolkit/mozapps/extensions/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
@@ -114,61 +114,61 @@ const TYPES = {
 /**
  * Valid IDs fit this pattern.
  */
 var gIDTest = /^(\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}|[a-z0-9-\._]*\@[a-z0-9-\._]+)$/i;
 
 /**
  * Logs a debug message.
  *
- * @param   str
- *          The string to log
+ * @param  aStr
+ *         The string to log
  */
-function LOG(str) {
-  dump("*** addons.xpi: " + str + "\n");
+function LOG(aStr) {
+  dump("*** addons.xpi: " + aStr + "\n");
 }
 
 /**
  * Logs a warning message.
  *
- * @param   str
- *          The string to log
+ * @param  str
+ *         The string to log
  */
-function WARN(str) {
-  LOG(str);
+function WARN(aStr) {
+  LOG(aStr);
 }
 
 /**
  * Logs an error message.
  *
- * @param   str
- *          The string to log
+ * @param  str
+ *         The string to log
  */
-function ERROR(str) {
-  LOG(str);
+function ERROR(aStr) {
+  LOG(aStr);
 }
 
 /**
  * Gets the currently selected locale for display.
  * @return  the selected locale or "en-US" if none is selected
  */
 function getLocale() {
   if (Prefs.getBoolPref(PREF_MATCH_OS_LOCALE), false)
     return Services.locale.getLocaleComponentForUserAgent();
   return Prefs.getCharPref(PREF_SELECTED_LOCALE, "en-US");
 }
 
 /**
  * Selects the closest matching locale from a list of locales.
  *
- * @param   locales
- *          An array of locales
- * @return  the best match for the currently selected locale
+ * @param  aLocales
+ *         An array of locales
+ * @return the best match for the currently selected locale
  */
-function findClosestLocale(locales) {
+function findClosestLocale(aLocales) {
   let appLocale = getLocale();
 
   // Holds the best matching localized resource
   var bestmatch = null;
   // The number of locale parts it matched with
   var bestmatchcount = 0;
   // The number of locale parts in the match
   var bestpartcount = 0;
@@ -176,17 +176,17 @@ function findClosestLocale(locales) {
   var matchLocales = [appLocale.toLowerCase()];
   /* If the current locale is English then it will find a match if there is
      a valid match for en-US so no point searching that locale too. */
   if (matchLocales[0].substring(0, 3) != "en-")
     matchLocales.push("en-us");
 
   for each (var locale in matchLocales) {
     var lparts = locale.split("-");
-    for each (var localized in locales) {
+    for each (var localized in aLocales) {
       for each (found in localized.locales) {
         found = found.toLowerCase();
         // Exact match is returned immediately
         if (locale == found)
           return localized;
 
         var fparts = found.split("-");
         /* If we have found a possible match and this one isn't any longer
@@ -216,138 +216,138 @@ function findClosestLocale(locales) {
       return bestmatch;
   }
   return null;
 }
 
 /**
  * Calculates whether an add-on should be appDisabled or not.
  *
- * @param   addon
- *          The add-on to check
- * @return  true if the add-on should not be appDisabled
+ * @param  aAddon
+ *         The add-on to check
+ * @return true if the add-on should not be appDisabled
  */
-function isUsableAddon(addon) {
+function isUsableAddon(aAddon) {
   // Hack to ensure the default theme is always usable
-  if (addon.type == "theme" && addon.internalName == XPIProvider.defaultSkin)
+  if (aAddon.type == "theme" && aAddon.internalName == XPIProvider.defaultSkin)
     return true;
   if (XPIProvider.checkCompatibility) {
-    if (!addon.isCompatible)
+    if (!aAddon.isCompatible)
       return false;
   }
   else {
-    if (!addon.matchingTargetApplication)
+    if (!aAddon.matchingTargetApplication)
       return false;
   }
-  if (XPIProvider.checkUpdateSecurity && !addon.providesUpdatesSecurely)
+  if (XPIProvider.checkUpdateSecurity && !aAddon.providesUpdatesSecurely)
     return false;
-  return addon.blocklistState != Ci.nsIBlocklistService.STATE_BLOCKED;
+  return aAddon.blocklistState != Ci.nsIBlocklistService.STATE_BLOCKED;
 }
 
 /**
  * Reads an AddonInternal object from an RDF stream.
  *
- * @param   uri
- *          The URI that the manifest is being read from
- * @param   stream
- *          An open stream to read the RDF from
- * @return  an AddonInternal object
- * @throws  if the install manifest in the RDF stream is corrupt or could not
- *          be read
+ * @param  aUri
+ *         The URI that the manifest is being read from
+ * @param  aStream
+ *         An open stream to read the RDF from
+ * @return an AddonInternal object
+ * @throws if the install manifest in the RDF stream is corrupt or could not
+ *         be read
  */
-function loadManifestFromRDF(uri, stream) {
+function loadManifestFromRDF(aUri, aStream) {
   let RDF = Cc["@mozilla.org/rdf/rdf-service;1"].
             getService(Ci.nsIRDFService);
   const RDFURI_INSTALL_MANIFEST_ROOT = "urn:mozilla:install-manifest";
   const PREFIX_NS_EM = "http://www.mozilla.org/2004/em-rdf#";
 
-  function EM_R(property) {
-    return RDF.GetResource(PREFIX_NS_EM + property);
+  function EM_R(aProperty) {
+    return RDF.GetResource(PREFIX_NS_EM + aProperty);
   }
 
-  function getValue(literal) {
-    if (literal instanceof Ci.nsIRDFLiteral)
-      return literal.Value;
-    if (literal instanceof Ci.nsIRDFResource)
-      return literal.Value;
-    if (literal instanceof Ci.nsIRDFInt)
-      return literal.Value;
+  function getValue(aLiteral) {
+    if (aLiteral instanceof Ci.nsIRDFLiteral)
+      return aLiteral.Value;
+    if (aLiteral instanceof Ci.nsIRDFResource)
+      return aLiteral.Value;
+    if (aLiteral instanceof Ci.nsIRDFInt)
+      return aLiteral.Value;
     return null;
   }
 
-  function getProperty(ds, source, property) {
-    return getValue(ds.GetTarget(source, EM_R(property), true));
+  function getProperty(aDs, aSource, aProperty) {
+    return getValue(aDs.GetTarget(aSource, EM_R(aProperty), true));
   }
 
-  function getPropertyArray(ds, source, property) {
+  function getPropertyArray(aDs, aSource, aProperty) {
     let values = [];
-    let targets = ds.GetTargets(source, EM_R(property), true);
+    let targets = aDs.GetTargets(aSource, EM_R(aProperty), true);
     while (targets.hasMoreElements())
       values.push(getValue(targets.getNext()));
 
     return values;
   }
 
-  function readLocale(ds, source, isDefault) {
+  function readLocale(aDs, aSource, isDefault) {
     let locale = { };
     if (!isDefault) {
       locale.locales = [];
-      let targets = ds.GetTargets(source, EM_R("locale"), true);
+      let targets = ds.GetTargets(aSource, EM_R("locale"), true);
       while (targets.hasMoreElements())
         locale.locales.push(getValue(targets.getNext()));
 
       if (locale.locales.length == 0)
         throw new Error("No locales given for localized properties");
     }
 
-    PROP_LOCALE_SINGLE.forEach(function(prop) {
-      locale[prop] = getProperty(ds, source, prop);
+    PROP_LOCALE_SINGLE.forEach(function(aProp) {
+      locale[aProp] = getProperty(aDs, aSource, aProp);
     });
 
-    PROP_LOCALE_MULTI.forEach(function(prop) {
-      locale[prop] = getPropertyArray(ds, source,
-                                      prop.substring(0, prop.length - 1));
+    PROP_LOCALE_MULTI.forEach(function(aProp) {
+      locale[aProp] = getPropertyArray(aDs, aSource,
+                                       aProp.substring(0, aProp.length - 1));
     });
 
     return locale;
   }
 
   let rdfParser = Cc["@mozilla.org/rdf/xml-parser;1"].
                   createInstance(Ci.nsIRDFXMLParser)
   let ds = Cc["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"].
            createInstance(Ci.nsIRDFDataSource);
-  let listener = rdfParser.parseAsync(ds, uri);
+  let listener = rdfParser.parseAsync(ds, aUri);
   let channel = Cc["@mozilla.org/network/input-stream-channel;1"].
                 createInstance(Ci.nsIInputStreamChannel);
-  channel.setURI(uri);
-  channel.contentStream = stream;
+  channel.setURI(aUri);
+  channel.contentStream = aStream;
   channel.QueryInterface(Ci.nsIChannel);
   channel.contentType = "text/xml";
 
   listener.onStartRequest(channel, null);
 
   try {
     let pos = 0;
-    let count = stream.available();
+    let count = aStream.available();
     while (count > 0) {
-      listener.onDataAvailable(channel, null, stream, pos, count);
+      listener.onDataAvailable(channel, null, aStream, pos, count);
       pos += count;
-      count = stream.available();
+      count = aStream.available();
     }
     listener.onStopRequest(channel, null, Components.results.NS_OK);
   }
   catch (e) {
     listener.onStopRequest(channel, null, e.result);
     throw e;
   }
 
   let root = RDF.GetResource(RDFURI_INSTALL_MANIFEST_ROOT);
   let addon = new AddonInternal();
-  PROP_METADATA.forEach(function(prop) {
-    addon[prop] = getProperty(ds, root, prop);
+  PROP_METADATA.forEach(function(aProp) {
+    addon[aProp] = getProperty(ds, root, aProp);
   });
   if (!addon.id || !addon.version)
     throw new Error("No ID or version in install manifest");
 
   if (!addon.type) {
     addon.type = addon.internalName ? "theme" : "extension";
   }
   else {
@@ -379,382 +379,380 @@ function loadManifestFromRDF(uri, stream
     addon.locales.push(readLocale(ds, target, false));
   }
 
   addon.targetApplications = [];
   targets = ds.GetTargets(root, EM_R("targetApplication"), true);
   while (targets.hasMoreElements()) {
     let target = targets.getNext().QueryInterface(Ci.nsIRDFResource);
     let targetAppInfo = {};
-    PROP_TARGETAPP.forEach(function(prop) {
-      targetAppInfo[prop] = getProperty(ds, target, prop);
+    PROP_TARGETAPP.forEach(function(aProp) {
+      targetAppInfo[aProp] = getProperty(ds, target, aProp);
     });
     if (!targetAppInfo.id || !targetAppInfo.minVersion ||
         !targetAppInfo.maxVersion)
       throw new Error("Invalid targetApplication entry in install manifest");
     addon.targetApplications.push(targetAppInfo);
   }
 
   addon.targetPlatforms = getPropertyArray(ds, root, "targetPlatform");
 
   // Themes are disabled by default unless they are currently selected
-  if (addon.type == "theme") {
+  if (addon.type == "theme")
     addon.userDisabled = addon.internalName != XPIProvider.selectedSkin;
-  }
-  else {
+  else
     addon.userDisabled = false;
-  }
   addon.appDisabled = !isUsableAddon(addon);
 
   return addon;
 }
 
 /**
  * Loads an AddonInternal object from an add-on extracted in a directory.
  *
- * @param   dir
- *          The nsIFile directory holding the add-on
- * @return  an AddonInternal object
- * @throws  if the directory does not contain a valid install manifest
+ * @param  aDir
+ *         The nsIFile directory holding the add-on
+ * @return an AddonInternal object
+ * @throws if the directory does not contain a valid install manifest
  */
-function loadManifestFromDir(dir) {
-  let file = dir.clone();
+function loadManifestFromDir(aDir) {
+  let file = aDir.clone();
   file.append(FILE_INSTALL_MANIFEST);
   if (!file.exists() || !file.isFile())
     throw new Error("Directory " + dir.path + " does not contain a valid " +
                     "install manifest");
 
   let fis = Cc["@mozilla.org/network/file-input-stream;1"].
             createInstance(Ci.nsIFileInputStream);
   fis.init(file, -1, -1, false);
   let bis = Cc["@mozilla.org/network/buffered-input-stream;1"].
             createInstance(Ci.nsIBufferedInputStream);
   bis.init(fis, 4096);
 
   try {
     let addon = loadManifestFromRDF(Services.io.newFileURI(file), bis);
-    addon._sourceBundle = dir.clone().QueryInterface(Ci.nsILocalFile);
+    addon._sourceBundle = aDir.clone().QueryInterface(Ci.nsILocalFile);
     return addon;
   }
   finally {
     bis.close();
     fis.close();
   }
 }
 
 /**
  * Creates a jar: URI for a file inside a ZIP file.
  *
- * @param   jarfile
- *          The ZIP file as an nsIFile
- * @param   path
- *          The path inside the ZIP file
- * @return  an nsIURI for the file
+ * @param  aJarfile
+ *         The ZIP file as an nsIFile
+ * @param  aPath
+ *         The path inside the ZIP file
+ * @return an nsIURI for the file
  */
-function buildJarURI(jarfile, path) {
-  let uri = Services.io.newFileURI(jarfile);
-  uri = "jar:" + uri.spec + "!/" + path;
+function buildJarURI(aJarfile, aPath) {
+  let uri = Services.io.newFileURI(aJarfile);
+  uri = "jar:" + uri.spec + "!/" + aPath;
   return NetUtil.newURI(uri);
 }
 
 /**
  * Extracts files from a ZIP file into a directory.
  *
- * @param   zipFile
- *          The source ZIP file that contains the add-on.
- * @param   dir
- *          The nsIFile to extract to.
+ * @param  aZipFile
+ *         The source ZIP file that contains the add-on.
+ * @param  aDir
+ *         The nsIFile to extract to.
  */
-function extractFiles(zipFile, dir) {
-  function getTargetFile(dir, entry) {
-    let target = dir.clone();
-    entry.split("/").forEach(function(part) {
-      target.append(part);
+function extractFiles(aZipFile, aDir) {
+  function getTargetFile(aDir, entry) {
+    let target = aDir.clone();
+    entry.split("/").forEach(function(aPart) {
+      target.append(aPart);
     });
     return target;
   }
 
   let zipReader = Cc["@mozilla.org/libjar/zip-reader;1"].
                   createInstance(Ci.nsIZipReader);
-  zipReader.open(zipFile);
+  zipReader.open(aZipFile);
 
   try {
     // create directories first
     let entries = zipReader.findEntries("*/");
     while (entries.hasMore()) {
       var entryName = entries.getNext();
-      let target = getTargetFile(dir, entryName);
+      let target = getTargetFile(aDir, entryName);
       if (!target.exists()) {
         try {
           target.create(Ci.nsILocalFile.DIRECTORY_TYPE,
                         FileUtils.PERMS_DIRECTORY);
         }
         catch (e) {
           ERROR("extractFiles: failed to create target directory for " +
                 "extraction file = " + target.path + ", exception = " + e +
                 "\n");
         }
       }
     }
 
     entries = zipReader.findEntries(null);
     while (entries.hasMore()) {
       let entryName = entries.getNext();
-      let target = getTargetFile(dir, entryName);
+      let target = getTargetFile(aDir, entryName);
       if (target.exists())
         continue;
 
       zipReader.extract(entryName, target);
       target.permissions |= FileUtils.PERMS_FILE;
     }
   }
   finally {
     zipReader.close();
   }
 }
 
 /**
  * Verifies that a zip file's contents are all signed by the same principal.
  * Directory entries and anything in the META-INF directory are not checked.
  *
- * @param   zip
- *          A nsIZipReader to check
- * @param   principal
- *          The nsIPrincipal to compare against
- * @return  true if all the contents that should be signed were signed by the
- *          principal
+ * @param  aZip
+ *         A nsIZipReader to check
+ * @param  aPrincipal
+ *         The nsIPrincipal to compare against
+ * @return true if all the contents that should be signed were signed by the
+ *         principal
  */
-function verifyZipSigning(zip, principal) {
+function verifyZipSigning(aZip, aPrincipal) {
   var count = 0;
-  var entries = zip.findEntries(null);
+  var entries = aZip.findEntries(null);
   while (entries.hasMore()) {
     var entry = entries.getNext();
     // Nothing in META-INF is in the manifest.
     if (entry.substr(0, 9) == "META-INF/")
       continue;
     // Directory entries aren't in the manifest.
     if (entry.substr(-1) == "/")
       continue;
     count++;
-    var entryPrincipal = zip.getCertificatePrincipal(entry);
-    if (!entryPrincipal || !principal.equals(entryPrincipal))
+    var entryPrincipal = aZip.getCertificatePrincipal(entry);
+    if (!entryPrincipal || !aPrincipal.equals(entryPrincipal))
       return false;
   }
-  return zip.manifestEntriesCount == count;
+  return aZip.manifestEntriesCount == count;
 }
 
 /**
  * Replaces %...% strings in an addon url (update and updateInfo) with
  * appropriate values.
  *
- * @param   addon
- *          The AddonInternal representing the add-on
- * @param   uri
- *          The uri to escape
- * @param   updateType
- *          An optional number representing the type of update, only applicable
- *          when creating a url for retrieving an update manifest
- * @param   appVersion
- *          The optional application version to use for %APP_VERSION%
- * @return  the appropriately escaped uri.
+ * @param  aAddon
+ *         The AddonInternal representing the add-on
+ * @param  aUri
+ *         The uri to escape
+ * @param  aUpdateType
+ *         An optional number representing the type of update, only applicable
+ *         when creating a url for retrieving an update manifest
+ * @param  aAppVersion
+ *         The optional application version to use for %APP_VERSION%
+ * @return the appropriately escaped uri.
  */
-function escapeAddonURI(addon, uri, updateType, appVersion)
+function escapeAddonURI(aAddon, aUri, aUpdateType, aAppVersion)
 {
-  var addonStatus = addon.userDisabled ? "userDisabled" : "userEnabled";
-
-  if (!addon.isCompatible)
+  var addonStatus = aAddon.userDisabled ? "userDisabled" : "userEnabled";
+
+  if (!aAddon.isCompatible)
     addonStatus += ",incompatible";
-  if (addon.blocklistState > 0)
+  if (aAddon.blocklistState > 0)
     addonStatus += ",blocklisted";
 
   try {
     var xpcomABI = Services.appinfo.XPCOMABI;
   } catch (ex) {
     xpcomABI = UNKNOWN_XPCOM_ABI;
   }
 
-  uri = uri.replace(/%ITEM_ID%/g, addon.id);
-  uri = uri.replace(/%ITEM_VERSION%/g, addon.version);
+  let uri = aUri.replace(/%ITEM_ID%/g, aAddon.id);
+  uri = uri.replace(/%ITEM_VERSION%/g, aAddon.version);
   uri = uri.replace(/%ITEM_STATUS%/g, addonStatus);
   uri = uri.replace(/%APP_ID%/g, Services.appinfo.ID);
-  uri = uri.replace(/%APP_VERSION%/g, appVersion ? appVersion :
-                                                   Services.appinfo.version);
+  uri = uri.replace(/%APP_VERSION%/g, aAppVersion ? aAppVersion :
+                                                    Services.appinfo.version);
   uri = uri.replace(/%REQ_VERSION%/g, REQ_VERSION);
   uri = uri.replace(/%APP_OS%/g, Services.appinfo.OS);
   uri = uri.replace(/%APP_ABI%/g, xpcomABI);
   uri = uri.replace(/%APP_LOCALE%/g, getLocale());
   uri = uri.replace(/%CURRENT_APP_VERSION%/g, Services.appinfo.version);
 
   // If there is an updateType then replace the UPDATE_TYPE string
-  if (updateType)
-    uri = uri.replace(/%UPDATE_TYPE%/g, updateType);
+  if (aUpdateType)
+    uri = uri.replace(/%UPDATE_TYPE%/g, aUpdateType);
 
   // If this add-on has compatibility information for either the current
   // application or toolkit then replace the ITEM_MAXAPPVERSION with the
   // maxVersion
-  let app = addon.matchingTargetApplication;
+  let app = aAddon.matchingTargetApplication;
   if (app)
     var maxVersion = app.maxVersion;
   else
     maxVersion = "";
   uri = uri.replace(/%ITEM_MAXAPPVERSION%/g, maxVersion);
 
   // Replace custom parameters (names of custom parameters must have at
   // least 3 characters to prevent lookups for something like %D0%C8)
   var catMan = null;
-  uri = uri.replace(/%(\w{3,})%/g, function(match, param) {
+  uri = uri.replace(/%(\w{3,})%/g, function(aMatch, aParam) {
     if (!catMan) {
       catMan = Cc["@mozilla.org/categorymanager;1"].
                getService(Ci.nsICategoryManager);
     }
 
     try {
-      var contractID = catMan.getCategoryEntry(CATEGORY_UPDATE_PARAMS, param);
+      var contractID = catMan.getCategoryEntry(CATEGORY_UPDATE_PARAMS, aParam);
       var paramHandler = Cc[contractID].getService(Ci.nsIPropertyBag2);
-      return paramHandler.getPropertyAsAString(param);
+      return paramHandler.getPropertyAsAString(aParam);
     }
     catch(e) {
-      return match;
+      return aMatch;
     }
   });
 
   // escape() does not properly encode + symbols in any embedded FVF strings.
   return uri.replace(/\+/g, "%2B");
 }
 
 /**
  * Copies properties from one object to another. If no target object is passed
  * a new object will be created and returned.
  *
- * @param   object
- *          An object to copy from
- * @param   properties
- *          An array of properties to be copied
- * @param   target
- *          An optional target object to copy the properties to
- * @return  the object that the properties were copied onto
+ * @param  aObject
+ *         An object to copy from
+ * @param  aProperties
+ *         An array of properties to be copied
+ * @param  aTarget
+ *         An optional target object to copy the properties to
+ * @return the object that the properties were copied onto
  */
-function copyProperties(object, properties, target) {
-  if (!target)
-    target = {};
-  properties.forEach(function(prop) {
-    target[prop] = object[prop];
+function copyProperties(aObject, aProperties, aTarget) {
+  if (!aTarget)
+    aTarget = {};
+  aProperties.forEach(function(aProp) {
+    aTarget[aProp] = aObject[aProp];
   });
-  return target;
+  return aTarget;
 }
 
 /**
  * Copies properties from a mozIStorageRow to an object. If no target object is
  * passed a new object will be created and returned.
  *
- * @param   row
- *          A mozIStorageRow to copy from
- * @param   properties
- *          An array of properties to be copied
- * @param   target
- *          An optional target object to copy the properties to
- * @return  the object that the properties were copied onto
+ * @param  aRow
+ *         A mozIStorageRow to copy from
+ * @param  aProperties
+ *         An array of properties to be copied
+ * @param  aTarget
+ *         An optional target object to copy the properties to
+ * @return the object that the properties were copied onto
  */
-function copyRowProperties(row, properties, target) {
-  if (!target)
-    target = {};
-  properties.forEach(function(prop) {
-    target[prop] = row.getResultByName(prop);
+function copyRowProperties(aRow, aProperties, aTarget) {
+  if (!aTarget)
+    aTarget = {};
+  aProperties.forEach(function(aProp) {
+    aTarget[aProp] = aRow.getResultByName(aProp);
   });
-  return target;
+  return aTarget;
 }
 
 /**
  * A generator to synchronously return result rows from an mozIStorageStatement.
  *
- * @param   statement
- *          The statement to execute
+ * @param  aStatement
+ *         The statement to execute
  */
-function resultRows(statement) {
+function resultRows(aStatement) {
   try {
-    while (statement.executeStep())
-      yield statement.row;
+    while (aStatement.executeStep())
+      yield aStatement.row;
   }
   finally {
-    statement.reset();
+    aStatement.reset();
   }
 }
 
 /**
  * A helpful wrapper around the prefs service that allows for default values
  * when requested values aren't set.
  */
 var Prefs = {
   /**
    * Gets a preference from the default branch ignoring user-set values.
    *
-   * @param   name
-   *          The name of the preference
-   * @param   defaultValue
-   *          A value to return if the preference does not exist
-   * @return  the default value of the preference or defaultValue if there is
-   *          none
+   * @param  aName
+   *         The name of the preference
+   * @param  aDefaultValue
+   *         A value to return if the preference does not exist
+   * @return the default value of the preference or aDefaultValue if there is
+   *         none
    */
-  getDefaultCharPref: function(name, defaultValue) {
+  getDefaultCharPref: function(aName, aDefaultValue) {
     try {
-      return Services.prefs.getDefaultBranch("").getCharPref(name);
+      return Services.prefs.getDefaultBranch("").getCharPref(aName);
     }
     catch (e) {
     }
-    return defaultValue;
+    return aDefaultValue;
   },
 
   /**
    * Gets a string preference.
    *
-   * @param   name
-   *          The name of the preference
-   * @param   defaultValue
-   *          A value to return if the preference does not exist
-   * @return  the value of the preference or defaultValue if there is none
+   * @param  aName
+   *         The name of the preference
+   * @param  aDefaultValue
+   *         A value to return if the preference does not exist
+   * @return the value of the preference or aDefaultValue if there is none
    */
-  getCharPref: function(name, defaultValue) {
+  getCharPref: function(aName, aDefaultValue) {
     try {
-      return Services.prefs.getCharPref(name);
+      return Services.prefs.getCharPref(aName);
     }
     catch (e) {
     }
-    return defaultValue;
+    return aDefaultValue;
   },
 
   /**
    * Gets a boolean preference.
    *
-   * @param   name
-   *          The name of the preference
-   * @param   defaultValue
-   *          A value to return if the preference does not exist
-   * @return  the value of the preference or defaultValue if there is none
+   * @param  aName
+   *         The name of the preference
+   * @param  aDefaultValue
+   *         A value to return if the preference does not exist
+   * @return the value of the preference or aDefaultValue if there is none
    */
-  getBoolPref: function(name, defaultValue) {
+  getBoolPref: function(aName, aDefaultValue) {
     try {
-      return Services.prefs.getBoolPref(name);
+      return Services.prefs.getBoolPref(aName);
     }
     catch (e) {
     }
-    return defaultValue;
+    return aDefaultValue;
   },
 
   /**
    * Gets an integer preference.
    *
-   * @param   name
-   *          The name of the preference
-   * @param   defaultValue
-   *          A value to return if the preference does not exist
-   * @return  the value of the preference or defaultValue if there is none
+   * @param  aName
+   *         The name of the preference
+   * @param  defaultValue
+   *         A value to return if the preference does not exist
+   * @return the value of the preference or defaultValue if there is none
    */
-  getIntPref: function(name, defaultValue) {
+  getIntPref: function(aName, defaultValue) {
     try {
-      return Services.prefs.getIntPref(name);
+      return Services.prefs.getIntPref(aName);
     }
     catch (e) {
     }
     return defaultValue;
   }
 }
 
 var XPIProvider = {
@@ -787,44 +785,44 @@ var XPIProvider = {
    * Starts the XPI provider initializes the install locations and prefs.
    */
   startup: function XPI_startup() {
     LOG("startup");
     this.installs = [];
     this.installLocations = [];
     this.installLocationsByName = {};
 
-    function addDirectoryInstallLocation(name, key, paths, scope, locked) {
+    function addDirectoryInstallLocation(aName, aKey, aPaths, aScope, aLocked) {
       try {
-        var dir = FileUtils.getDir(key, paths);
+        var dir = FileUtils.getDir(aKey, aPaths);
       }
       catch (e) {
         // Some directories aren't defined on some platforms, ignore them
-        LOG("Skipping unavailable install location " + name);
+        LOG("Skipping unavailable install location " + aName);
         return;
       }
 
       try {
-        var location = new DirectoryInstallLocation(name, dir, scope, locked);
+        var location = new DirectoryInstallLocation(aName, dir, aScope, aLocked);
       }
       catch (e) {
-        WARN("Failed to add directory install location " + name + " " + e);
+        WARN("Failed to add directory install location " + aName + " " + e);
         return;
       }
 
       XPIProvider.installLocations.push(location);
       XPIProvider.installLocationsByName[location.name] = location;
     }
 
-    function addRegistryInstallLocation(name, rootkey, scope) {
+    function addRegistryInstallLocation(aName, aRootkey, aScope) {
       try {
-        var location = new WinRegInstallLocation(name, rootkey, scope);
+        var location = new WinRegInstallLocation(aName, aRootkey, aScope);
       }
       catch (e) {
-        WARN("Failed to add registry install location " + name + " " + e);
+        WARN("Failed to add registry install location " + aName + " " + e);
         return;
       }
 
       XPIProvider.installLocations.push(location);
       XPIProvider.installLocationsByName[location.name] = location;
     }
 
     let hasRegistry = ("nsIWindowsRegKey" in Ci);
@@ -950,81 +948,81 @@ var XPIProvider = {
       Services.appinfo.annotateCrashReport("Add-ons", data);
     }
     catch (e) { }
   },
 
   /**
    * Gets the add-on states for an install location.
    *
-   * @param   location
-   *          The install location to retrieve the add-on states for
-   * @return  a dictionary mapping add-on IDs to objects with a descriptor
-   *          property which contains the add-ons directory descriptor and an
-   *          mtime property which contains the add-on's last modified time as
-   *          the number of milliseconds since the epoch.
+   * @param  location
+   *         The install location to retrieve the add-on states for
+   * @return a dictionary mapping add-on IDs to objects with a descriptor
+   *         property which contains the add-ons directory descriptor and an
+   *         mtime property which contains the add-on's last modified time as
+   *         the number of milliseconds since the epoch.
    */
-  getAddonStates: function XPI_getAddonStates(location) {
+  getAddonStates: function XPI_getAddonStates(aLocation) {
     let addonStates = {};
-    location.addonLocations.forEach(function(dir) {
-      let id = location.getIDForLocation(dir);
+    aLocation.addonLocations.forEach(function(dir) {
+      let id = aLocation.getIDForLocation(dir);
       addonStates[id] = {
         descriptor: dir.persistentDescriptor,
         mtime: dir.lastModifiedTime
       };
     });
 
     return addonStates;
   },
 
   /**
    * Gets an array of install location states which uniquely describes all
    * installed add-ons with the add-on's InstallLocation name and last modified
    * time.
    *
-   * @return  an array of add-on states for each install location. Each state
-   *          is an object with a name property holding the location's name and
-   *          an addons property holding the add-on states for the location
+   * @return an array of add-on states for each install location. Each state
+   *         is an object with a name property holding the location's name and
+   *         an addons property holding the add-on states for the location
    */
   getInstallLocationStates: function XPI_getInstallLocationStates() {
     let states = [];
-    this.installLocations.forEach(function(location) {
-      let addons = location.addonLocations;
+    this.installLocations.forEach(function(aLocation) {
+      let addons = aLocation.addonLocations;
       if (addons.length == 0)
         return;
 
       let locationState = {
-        name: location.name,
-        addons: this.getAddonStates(location)
+        name: aLocation.name,
+        addons: this.getAddonStates(aLocation)
       };
 
       states.push(locationState);
     }, this);
     return states;
   },
 
   /**
    * Check the staging directories of install locations for any add-ons to be
    * installed or add-ons to be uninstalled.
    *
-   * @param   manifests
-   *          A dictionary to add detected install manifests to for the purpose
-   *          of passing through updated compatibility information
-   * @return  true if an add-on was installed or uninstalled
+   * @param  aManifests
+   *         A dictionary to add detected install manifests to for the purpose
+   *         of passing through updated compatibility information
+   * @return true if an add-on was installed or uninstalled
    */
-  processPendingFileChanges: function XPI_processPendingFileChanges(manifests) {
+  processPendingFileChanges: function XPI_processPendingFileChanges(aManifests) {
     // TODO maybe this should be passed off to the install locations to handle?
     let changed = false;
-    this.installLocations.forEach(function(location) {
-      manifests[location.name] = {};
+    this.installLocations.forEach(function(aLocation) {
+      aManifests[aLocation.name] = {};
       // We can't install or uninstall anything in locked locations
-      if (location.locked)
+      if (aLocation.locked)
         return;
 
-      let stagingDir = location.getStagingDir();
+      let stagingDir = aLocation.getStagingDir();
       if (!stagingDir || !stagingDir.exists())
         return;
 
       let entries = stagingDir.directoryEntries;
       while (entries.hasMoreElements()) {
         let stageDirEntry = entries.getNext().QueryInterface(Ci.nsILocalFile);
 
         // Only directories are important. Files may be updated manifests.
@@ -1043,56 +1041,56 @@ var XPIProvider = {
 
         // Check if the directory contains an install manifest.
         let manifest = stageDirEntry.clone();
         manifest.append(FILE_INSTALL_MANIFEST);
 
         // If the install manifest doesn't exist uninstall this add-on in this
         // install location.
         if (!manifest.exists()) {
-          LOG("Processing uninstall of " + id + " in " + location.name);
-          location.uninstallAddon(id);
+          LOG("Processing uninstall of " + id + " in " + aLocation.name);
+          aLocation.uninstallAddon(id);
           // The file check later will spot the removal and cleanup the database
           changed = true;
           continue;
         }
 
-        LOG("Processing install of " + id + " in " + location.name);
+        LOG("Processing install of " + id + " in " + aLocation.name);
         try {
-          var addonInstallDir = location.installAddon(id, stageDirEntry);
+          var addonInstallDir = aLocation.installAddon(id, stageDirEntry);
         }
         catch (e) {
-          ERROR("Failed to install staged add-on " + id + " in " + location.name +
+          ERROR("Failed to install staged add-on " + id + " in " + aLocation.name +
                 ": " + e);
           continue;
         }
 
-        manifests[location.name][id] = null;
+        aManifests[aLocation.name][id] = null;
         changed = true;
 
         // Check for a cached AddonInternal for this add-on, it may contain
         // updated compatibility information
         let jsonfile = stagingDir.clone();
         jsonfile.append(id + ".json");
         if (jsonfile.exists()) {
-          LOG("Found updated manifest for " + id + " in " + location.name);
+          LOG("Found updated manifest for " + id + " in " + aLocation.name);
           let fis = Cc["@mozilla.org/network/file-input-stream;1"].
                        createInstance(Ci.nsIFileInputStream);
           let json = Cc["@mozilla.org/dom/json;1"].
                      createInstance(Ci.nsIJSON);
 
           try {
             fis.init(jsonfile, -1, 0, 0);
-            manifests[location.name][id] = json.decodeFromStream(fis,
-                                                                 jsonfile.fileSize);
-            manifests[location.name][id]._sourceBundle = addonInstallDir;
+            aManifests[aLocation.name][id] = json.decodeFromStream(fis,
+                                                                   jsonfile.fileSize);
+            aManifests[aLocation.name][id]._sourceBundle = addonInstallDir;
           }
           catch (e) {
             ERROR("Unable to read add-on manifest for " + id + " in " +
-                  location.name + ": " + e);
+                  aLocation.name + ": " + e);
           }
           finally {
             fis.close();
           }
         }
       }
 
       try {
@@ -1106,381 +1104,381 @@ var XPIProvider = {
     return changed;
   },
 
   /**
    * Compares the add-ons that are currently installed to those that were
    * known to be installed when the application last ran and applies any
    * changes found to the database.
    *
-   * @param   state
-   *          The array of current install location states
-   * @param   manifests
-   *          A dictionary of cached AddonInstalls for add-ons that have been
-   *          installed
-   * @param   updateCompatibility
-   *          true to update add-ons appDisabled property when the application
-   *          version has changed
-   * @return  true if a change requiring a restart was detected
+   * @param  aState
+   *         The array of current install location states
+   * @param  aManifests
+   *         A dictionary of cached AddonInstalls for add-ons that have been
+   *         installed
+   * @param  aUpdateCompatibility
+   *         true to update add-ons appDisabled property when the application
+   *         version has changed
+   * @return true if a change requiring a restart was detected
    */
-  processFileChanges: function XPI_processFileChanges(state, manifests,
-                                                      updateCompatibility,
-                                                      migrateData) {
+  processFileChanges: function XPI_processFileChanges(aState, aManifests,
+                                                      aUpdateCompatibility,
+                                                      aMigrateData) {
     let visibleAddons = {};
 
     /**
      * Updates an add-on's metadata and determines if a restart of the
      * application is necessary. This is called when either the add-on's
      * install directory path or last modified time has changed.
      *
-     * @param   installLocation
-     *          The install location containing the add-on
-     * @param   oldAddon
-     *          The AddonInternal as it appeared the last time the application
-     *          ran
-     * @param   addonState
-     *          The new state of the add-on
-     * @return  true if restarting the application is required to complete
-     *          changing this add-on
+     * @param  aInstallLocation
+     *         The install location containing the add-on
+     * @param  aOldAddon
+     *         The AddonInternal as it appeared the last time the application
+     *         ran
+     * @param  aAddonState
+     *         The new state of the add-on
+     * @return true if restarting the application is required to complete
+     *         changing this add-on
      */
-    function updateMetadata(installLocation, oldAddon, addonState) {
-      LOG("Add-on " + oldAddon.id + " modified in " + installLocation.name);
+    function updateMetadata(aInstallLocation, aOldAddon, aAddonState) {
+      LOG("Add-on " + aOldAddon.id + " modified in " + aInstallLocation.name);
 
       // Check if there is an updated install manifest for this add-on
-      let newAddon = manifests[installLocation.name][oldAddon.id];
+      let newAddon = aManifests[aInstallLocation.name][aOldAddon.id];
 
       try {
         // If not load it from the directory
         if (!newAddon) {
-          let dir = installLocation.getLocationForID(oldAddon.id);
+          let dir = aInstallLocation.getLocationForID(aOldAddon.id);
           newAddon = loadManifestFromDir(dir);
         }
 
         // The ID in the manifest that was loaded must match the ID of the old
         // add-on.
-        if (newAddon.id != oldAddon.id)
+        if (newAddon.id != aOldAddon.id)
           throw new Error("Incorrect id in install manifest");
       }
       catch (e) {
         WARN("Add-on is invalid: " + e);
-        XPIDatabase.removeAddonMetadata(oldAddon);
-        if (!installLocation.locked)
-          installLocation.uninstallAddon(oldAddon.id);
+        XPIDatabase.removeAddonMetadata(aOldAddon);
+        if (!aInstallLocation.locked)
+          aInstallLocation.uninstallAddon(aOldAddon.id);
         else
           WARN("Could not uninstall invalid item from locked install location");
         // If this was an active add-on then we must force a restart
-        if (oldAddon.active) {
-          if (oldAddon.type == "bootstrapped")
-            delete XPIProvider.bootstrappedAddons[oldAddon.id];
+        if (aOldAddon.active) {
+          if (aOldAddon.type == "bootstrapped")
+            delete XPIProvider.bootstrappedAddons[aOldAddon.id];
           else
             return true;
         }
 
         return false;
       }
 
       // Set the additional properties on the new AddonInternal
-      newAddon._installLocation = installLocation;
-      newAddon.userDisabled = oldAddon.userDisabled;
-      newAddon.installDate = oldAddon.installDate;
-      newAddon.updateDate = addonState.mtime;
+      newAddon._installLocation = aInstallLocation;
+      newAddon.userDisabled = aOldAddon.userDisabled;
+      newAddon.installDate = aOldAddon.installDate;
+      newAddon.updateDate = aAddonState.mtime;
       newAddon.visible = !(newAddon.id in visibleAddons);
 
       // Update the database
-      XPIDatabase.updateAddonMetadata(oldAddon, newAddon, addonState.descriptor);
+      XPIDatabase.updateAddonMetadata(aOldAddon, newAddon, aAddonState.descriptor);
       if (newAddon.visible) {
         visibleAddons[newAddon.id] = newAddon;
         // If the old version was active and wasn't bootstrapped or the new
         // version will be active and isn't bootstrapped then we must force a
         // restart
-        if ((oldAddon.active && oldAddon.type != "bootstrapped") ||
+        if ((aOldAddon.active && aOldAddon.type != "bootstrapped") ||
             (newAddon.active && newAddon.type != "bootstrapped")) {
           return true;
         }
       }
 
       return false;
     }
 
     /**
      * Called when no change has been detected for an add-on's metadata. The
      * add-on may have become visible due to other add-ons being removed or
      * the add-on may need to be updated when the application version has
      * changed.
      *
-     * @param   installLocation
-     *          The install location containing the add-on
-     * @param   oldAddon
-     *          The AddonInternal as it appeared the last time the application
-     *          ran
-     * @param   addonState
-     *          The new state of the add-on
-     * @return  a boolean indicating if restarting the application is required
-     *          to complete changing this add-on
+     * @param  aInstallLocation
+     *         The install location containing the add-on
+     * @param  aOldAddon
+     *         The AddonInternal as it appeared the last time the application
+     *         ran
+     * @param  aAddonState
+     *         The new state of the add-on
+     * @return a boolean indicating if restarting the application is required
+     *         to complete changing this add-on
      */
-    function updateVisibilityAndCompatibility(installLocation, oldAddon,
-                                              addonState) {
+    function updateVisibilityAndCompatibility(aInstallLocation, aOldAddon,
+                                              aAddonState) {
       let changed = false;
 
       // This add-ons metadata has not changed but it may have become visible
-      if (!(oldAddon.id in visibleAddons)) {
-        visibleAddons[oldAddon.id] = oldAddon;
-
-        if (!oldAddon.visible) {
-          XPIDatabase.makeAddonVisible(oldAddon);
+      if (!(aOldAddon.id in visibleAddons)) {
+        visibleAddons[aOldAddon.id] = aOldAddon;
+
+        if (!aOldAddon.visible) {
+          XPIDatabase.makeAddonVisible(aOldAddon);
 
           // If the add-on is bootstrappable and it should be active then
           // mark it as active and add it to the list to be activated.
-          if (oldAddon.type == "bootstrapped" && !oldAddon.appDisabled &&
-              !oldAddon.userDisabled) {
-            oldAddon.active = true;
-            XPIDatabase.updateAddonActive(oldAddon);
-            XPIProvider.bootstrappedAddons[oldAddon.id] = {
-              version: oldAddon.version,
-              descriptor: addonState.descriptor
+          if (aOldAddon.type == "bootstrapped" && !aOldAddon.appDisabled &&
+              !aOldAddon.userDisabled) {
+            aOldAddon.active = true;
+            XPIDatabase.updateAddonActive(aOldAddon);
+            XPIProvider.bootstrappedAddons[aOldAddon.id] = {
+              version: aOldAddon.version,
+              descriptor: aAddonState.descriptor
             };
           }
           else {
             // Otherwise a restart is necessary
             changed = true;
           }
         }
       }
 
       // App version changed, we may need to update the appDisabled property.
-      if (updateCompatibility) {
-        let appDisabled = !isUsableAddon(oldAddon);
+      if (aUpdateCompatibility) {
+        let appDisabled = !isUsableAddon(aOldAddon);
 
         // If the property has changed update the database.
-        if (appDisabled != oldAddon.appDisabled) {
-          LOG("Add-on " + oldAddon.id + " changed appDisabled state to " +
+        if (appDisabled != aOldAddon.appDisabled) {
+          LOG("Add-on " + aOldAddon.id + " changed appDisabled state to " +
               appDisabled);
-          XPIDatabase.setAddonProperties(oldAddon, {
+          XPIDatabase.setAddonProperties(aOldAddon, {
             appDisabled: appDisabled
           });
 
           // If this is a visible add-on and it isn't userDisabled then we
           // may need a restart or to update the bootstrap list.
-          if (oldAddon.visible && !oldAddon.userDisabled) {
-            if (oldAddon.type == "bootstrapped") {
+          if (aOldAddon.visible && !aOldAddon.userDisabled) {
+            if (aOldAddon.type == "bootstrapped") {
               // When visible and not userDisabled, active is the opposite of
               // appDisabled.
-              oldAddon.active = !oldAddon.appDisabled;
-              XPIDatabase.updateAddonActive(oldAddon);
-              if (oldAddon.active) {
-                XPIProvider.bootstrappedAddons[oldAddon.id] = {
-                  version: oldAddon.version,
-                  descriptor: addonState.descriptor
+              aOldAddon.active = !aOldAddon.appDisabled;
+              XPIDatabase.updateAddonActive(aOldAddon);
+              if (aOldAddon.active) {
+                XPIProvider.bootstrappedAddons[aOldAddon.id] = {
+                  version: aOldAddon.version,
+                  descriptor: aAddonState.descriptor
                 };
               }
               else {
-                delete XPIProvider.bootstrappedAddons[oldAddon.id];
+                delete XPIProvider.bootstrappedAddons[aOldAddon.id];
               }
             }
             else {
               changed = true;
             }
           }
         }
       }
 
       return changed;
     }
 
     /**
      * Called when an add-on has been removed.
      *
-     * @param   installLocation
-     *          The install location containing the add-on
-     * @param   oldAddon
-     *          The AddonInternal as it appeared the last time the application
-     *          ran
-     * @return  a boolean indicating if restarting the application is required
-     *          to complete changing this add-on
+     * @param  aInstallLocation
+     *         The install location containing the add-on
+     * @param  aOldAddon
+     *         The AddonInternal as it appeared the last time the application
+     *         ran
+     * @return a boolean indicating if restarting the application is required
+     *         to complete changing this add-on
      */
-    function removeMetadata(installLocation, oldAddon) {
+    function removeMetadata(aInstallLocation, aOldAddon) {
       // This add-on has disappeared
-      LOG("Add-on " + oldAddon.id + " removed from " + installLocation.name);
-      XPIDatabase.removeAddonMetadata(oldAddon);
-      if (oldAddon.active) {
+      LOG("Add-on " + aOldAddon.id + " removed from " + aInstallLocation.name);
+      XPIDatabase.removeAddonMetadata(aOldAddon);
+      if (aOldAddon.active) {
 
         // Enable the default theme if the previously active theme has been
         // removed
-        if (oldAddon.type == "theme")
+        if (aOldAddon.type == "theme")
           XPIProvider.enableDefaultTheme();
 
         // If this was an active add-on and bootstrapped we must remove it from
         // the bootstrapped list, otherwise we need to force a restart.
-        if (oldAddon.type != "bootstrapped")
+        if (aOldAddon.type != "bootstrapped")
           return true;
 
-        delete XPIProvider.bootstrappedAddons[oldAddon.id];
+        delete XPIProvider.bootstrappedAddons[aOldAddon.id];
       }
 
       return false;
     }
 
     /**
      * Called when a new add-on has been detected.
      *
-     * @param   installLocation
-     *          The install location containing the add-on
-     * @param   id
-     *          The ID of the add-on
-     * @param   addonState
-     *          The new state of the add-on
-     * @param   migrateData
-     *          If during startup the database had to be upgraded this will
-     *          contain data that used to be held about this add-on
-     * @return  a boolean indicating if restarting the application is required
-     *          to complete changing this add-on
+     * @param  aInstallLocation
+     *         The install location containing the add-on
+     * @param  aId
+     *         The ID of the add-on
+     * @param  aAddonState
+     *         The new state of the add-on
+     * @param  aMigrateData
+     *         If during startup the database had to be upgraded this will
+     *         contain data that used to be held about this add-on
+     * @return a boolean indicating if restarting the application is required
+     *         to complete changing this add-on
      */
-    function addMetadata(installLocation, id, addonState, migrateData) {
-      LOG("New add-on " + id + " installed in " + installLocation.name);
+    function addMetadata(aInstallLocation, aId, aAddonState, aMigrateData) {
+      LOG("New add-on " + aId + " installed in " + aInstallLocation.name);
 
       // Check the updated manifests lists for a manifest for this add-on
-      let newAddon = manifests[installLocation.name][id];
+      let newAddon = aManifests[aInstallLocation.name][aId];
 
       try {
         // Otherwise load the manifest from the add-on's directory.
         if (!newAddon)
-          newAddon = loadManifestFromDir(installLocation.getLocationForID(id));
+          newAddon = loadManifestFromDir(aInstallLocation.getLocationForID(aId));
         // The add-on in the manifest should match the add-on ID.
-        if (newAddon.id != id)
+        if (newAddon.id != aId)
           throw new Error("Incorrect id in install manifest");
       }
       catch (e) {
         WARN("Add-on is invalid: " + e);
 
         // Remove the invalid add-on from the install location if the install
         // location isn't locked, no restart will be necessary
-        if (!installLocation.locked)
-          installLocation.uninstallAddon(id);
+        if (!aInstallLocation.locked)
+          aInstallLocation.uninstallAddon(aId);
         else
           WARN("Could not uninstall invalid item from locked install location");
         return false;
       }
 
       // Update the AddonInternal properties.
-      newAddon._installLocation = installLocation;
+      newAddon._installLocation = aInstallLocation;
       newAddon.visible = !(newAddon.id in visibleAddons);
-      newAddon.installDate = addonState.mtime;
-      newAddon.updateDate = addonState.mtime;
+      newAddon.installDate = aAddonState.mtime;
+      newAddon.updateDate = aAddonState.mtime;
 
       // If there is migration data then apply it.
-      if (migrateData) {
-        newAddon.userDisabled = migrateData.userDisabled;
-        if ("installDate" in migrateData)
-          newAddon.installDate = migrateData.installDate;
+      if (aMigrateData) {
+        newAddon.userDisabled = aMigrateData.userDisabled;
+        if ("installDate" in aMigrateData)
+          newAddon.installDate = aMigrateData.installDate;
       }
 
       // Update the database.
-      XPIDatabase.addAddonMetadata(newAddon, addonState.descriptor);
+      XPIDatabase.addAddonMetadata(newAddon, aAddonState.descriptor);
 
       // Visible bootstrapped add-ons need to be added to the bootstrap list.
       if (newAddon.visible) {
         visibleAddons[newAddon.id] = newAddon;
         if (newAddon.type != "bootstrapped")
           return true;
 
         XPIProvider.bootstrappedAddons[newAddon.id] = {
           version: newAddon.version,
-          descriptor: addonState.descriptor
+          descriptor: aAddonState.descriptor
         };
       }
 
       return false;
     }
 
     let changed = false;
     let knownLocations = XPIDatabase.getInstallLocations();
 
     // The install locations are iterated in reverse order of priority so when
     // there are multiple add-ons installed with the same ID the one that
     // should be visible is the first one encountered.
-    state.reverse().forEach(function(st) {
+    aState.reverse().forEach(function(aSt) {
 
       // We can't include the install location directly in the state as it has
       // to be cached as JSON.
-      let installLocation = this.installLocationsByName[st.name];
-      let addonStates = st.addons;
+      let installLocation = this.installLocationsByName[aSt.name];
+      let addonStates = aSt.addons;
 
       // Check if the database knows about any add-ons in this install location.
       let pos = knownLocations.indexOf(installLocation.name);
       if (pos >= 0) {
         knownLocations.splice(pos, 1);
         let addons = XPIDatabase.getAddonsInLocation(installLocation.name);
         // Iterate through the add-ons installed the last time the application
         // ran
-        addons.forEach(function(oldAddon) {
+        addons.forEach(function(aOldAddon) {
           // Check if the add-on is still installed
-          if (oldAddon.id in addonStates) {
-            let addonState = addonStates[oldAddon.id];
-            delete addonStates[oldAddon.id];
+          if (aOldAddon.id in addonStates) {
+            let addonState = addonStates[aOldAddon.id];
+            delete addonStates[aOldAddon.id];
 
             // The add-on has changed if the modification time has changed, or
             // the directory it is installed in has changed or we have an
             // updated manifest for it.
-            if (oldAddon.id in manifests[installLocation.name] ||
-                oldAddon.updateDate != addonState.mtime ||
-                oldAddon._descriptor != addonState.descriptor) {
-              changed = updateMetadata(installLocation, oldAddon, addonState) ||
+            if (aOldAddon.id in aManifests[installLocation.name] ||
+                aOldAddon.updateDate != addonState.mtime ||
+                aOldAddon._descriptor != addonState.descriptor) {
+              changed = updateMetadata(installLocation, aOldAddon, addonState) ||
                         changed;
             }
             else {
               changed = updateVisibilityAndCompatibility(installLocation,
-                                                         oldAddon, addonState) ||
+                                                         aOldAddon, addonState) ||
                         changed;
             }
           }
           else {
-            changed = removeMetadata(installLocation, oldAddon) || changed;
+            changed = removeMetadata(installLocation, aOldAddon) || changed;
           }
         }, this);
       }
 
       // All the remaining add-ons in this install location must be new.
 
       // Get the migration data for this install location.
       let locMigrateData = {};
-      if (migrateData && installLocation.name in migrateData)
-        locMigrateData = migrateData[installLocation.name];
+      if (aMigrateData && installLocation.name in aMigrateData)
+        locMigrateData = aMigrateData[installLocation.name];
       for (let id in addonStates) {
         changed = addMetadata(installLocation, id, addonStates[id],
                               locMigrateData[id]) || changed;
       }
     }, this);
 
     // The remaining locations that had add-ons installed in them no longer
     // have any add-ons installed in them, or the locations no longer exist.
     // The metadata for the add-ons that were in them must be removed from the
     // database.
-    knownLocations.forEach(function(location) {
-      let addons = XPIDatabase.getAddonsInLocation(location);
-      addons.forEach(function(oldAddon) {
-        changed = removeMetadata(location, oldAddon) || changed;
+    knownLocations.forEach(function(aLocation) {
+      let addons = XPIDatabase.getAddonsInLocation(aLocation);
+      addons.forEach(function(aOldAddon) {
+        changed = removeMetadata(aLocation, aOldAddon) || changed;
       }, this);
     }, this);
 
     // Cache the new install location states
     cache = JSON.stringify(this.getInstallLocationStates());
     Services.prefs.setCharPref(PREF_INSTALL_CACHE, cache);
     return changed;
   },
 
   /**
    * Checks for any changes that have occurred since the last time the
    * application was launched.
    *
-   * @param   appChanged
-   *          true if the application has changed version number since the last
-   *          launch
-   * @return  true if a change requiring a restart was detected
+   * @param  aAppChanged
+   *         true if the application has changed version number since the last
+   *         launch
+   * @return true if a change requiring a restart was detected
    */
-  checkForChanges: function XPI_checkForChanges(appChanged) {
+  checkForChanges: function XPI_checkForChanges(aAppChanged) {
     LOG("checkForChanges");
 
     // First install any new add-ons into the locations, we'll detect these when
     // we read the install state
     let manifests = {};
     let changed = this.processPendingFileChanges(manifests);
 
     // We have to hold the DB scheme in prefs so we don't need to load the
@@ -1500,20 +1498,20 @@ var XPIProvider = {
         cache = Prefs.getCharPref(PREF_INSTALL_CACHE, null);
     }
 
     // Load the list of bootstrapped add-ons first so processFileChanges can
     // modify it
     this.bootstrappedAddons = JSON.parse(Prefs.getCharPref(PREF_BOOTSTRAP_ADDONS,
                                          "{}"));
     let state = this.getInstallLocationStates();
-    if (appChanged || changed || cache == null ||
+    if (aAppChanged || changed || cache == null ||
         cache != JSON.stringify(state)) {
       try {
-        changed = this.processFileChanges(state, manifests, appChanged,
+        changed = this.processFileChanges(state, manifests, aAppChanged,
                                           migrateData);
       }
       catch (e) {
         ERROR("Error processing file changes: " + e);
       }
     }
 
     // If the application crashed before completing any pending operations then
@@ -1542,234 +1540,240 @@ var XPIProvider = {
       let dir = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
       dir.persistentDescriptor = bootstrappedAddons[id].descriptor;
       this.activateAddon(id, bootstrappedAddons[id].version, dir, true, false);
     }
 
     // Let these shutdown a little earlier when they still have access to most
     // of XPCOM
     Services.obs.addObserver({
-      observe: function(subject, topic, data) {
+      observe: function(aSubject, aTopic, aData) {
         Services.prefs.setCharPref(PREF_BOOTSTRAP_ADDONS,
                                    JSON.stringify(XPIProvider.bootstrappedAddons));
         for (let id in XPIProvider.bootstrappedAddons)
           XPIProvider.deactivateAddon(id, true, false);
         Services.obs.removeObserver(this, "quit-application-granted");
       }
     }, "quit-application-granted", false);
 
     return false;
   },
 
   /**
    * Called to test whether this provider supports installing a particular
    * mimetype.
    *
-   * @param   mimetype
-   *          The mimetype to check for
-   * @return  true if the mimetype is application/x-xpinstall
+   * @param  aMimetype
+   *         The mimetype to check for
+   * @return true if the mimetype is application/x-xpinstall
    */
-  supportsMimetype: function XPI_supportsMimetype(mimetype) {
-    return mimetype == "application/x-xpinstall";
+  supportsMimetype: function XPI_supportsMimetype(aMimetype) {
+    return aMimetype == "application/x-xpinstall";
   },
 
   /**
    * Called to test whether installing XPI add-ons is enabled.
    *
-   * @return  true if installing is enabled
+   * @return true if installing is enabled
    */
   isInstallEnabled: function XPI_isInstallEnabled() {
     // Default to enabled if the preference does not exist
     return Prefs.getBoolPref(PREF_XPI_ENABLED, true);
   },
 
   /**
    * Called to test whether installing XPI add-ons from a URI is allowed.
    *
-   * @param   uri
-   *          The URI being installed from
-   * @return  true if installing is allowed
+   * @param  aUri
+   *         The URI being installed from
+   * @return true if installing is allowed
    */
-  isInstallAllowed: function XPI_isInstallAllowed(uri) {
+  isInstallAllowed: function XPI_isInstallAllowed(aUri) {
     if (!this.isInstallEnabled())
       return false;
 
-    if (!uri)
+    if (!aUri)
       return true;
 
     // file: and chrome: don't need whitelisted hosts
-    if (uri.schemeIs("chrome") || uri.schemeIs("file"))
+    if (aUri.schemeIs("chrome") || aUri.schemeIs("file"))
       return true;
 
 
-    let permission = Services.perms.testPermission(uri, XPI_PERMISSION);
+    let permission = Services.perms.testPermission(aUri, XPI_PERMISSION);
     if (permission == Ci.nsIPermissionManager.DENY_ACTION)
       return false;
 
     let requireWhitelist = Prefs.getBoolPref(PREF_XPI_WHITELIST_REQUIRED, true);
     if (requireWhitelist && (permission != Ci.nsIPermissionManager.ALLOW_ACTION))
       return false;
 
     return true;
   },
 
   /**
    * Called to get an AddonInstall to download and install an add-on from a URL.
    *
-   * @param   url
-   *          The URL to be installed
-   * @param   hash
-   *          A hash for the install
-   * @param   name
-   *          A name for the install
-   * @param   iconURL
-   *          An icon URL for the install
-   * @param   version
-   *          A version for the install
-   * @param   loadGroup
-   *          An nsILoadGroup to associate requests with
-   * @param   callback
-   *          A callback to pass the AddonInstall to
+   * @param  aUrl
+   *         The URL to be installed
+   * @param  aHash
+   *         A hash for the install
+   * @param  aName
+   *         A name for the install
+   * @param  aIconURL
+   *         An icon URL for the install
+   * @param  aVersion
+   *         A version for the install
+   * @param  aLoadGroup
+   *         An nsILoadGroup to associate requests with
+   * @param  aCallback
+   *         A callback to pass the AddonInstall to
    */
-  getInstallForURL: function XPI_getInstallForURL(url, hash, name, iconURL,
-                                                  version, loadGroup, callback) {
-    AddonInstall.createDownload(function(install) {
-      callback(install.wrapper);
-    }, url, hash, name, iconURL, version, loadGroup);
+  getInstallForURL: function XPI_getInstallForURL(aUrl, aHash, aName, aIconURL,
+                                                  aVersion, aLoadGroup, aCallback) {
+    AddonInstall.createDownload(function(aInstall) {
+      aCallback(aInstall.wrapper);
+    }, aUrl, aHash, aName, aIconURL, aVersion, aLoadGroup);
   },
 
   /**
    * Called to get an AddonInstall to install an add-on from a local file.
    *
-   * @param   file
-   *          The file to be installed
-   * @param   callback
-   *          A callback to pass the AddonInstall to
+   * @param  aFile
+   *         The file to be installed
+   * @param  aCallback
+   *         A callback to pass the AddonInstall to
    */
-  getInstallForFile: function XPI_getInstallForFile(file, callback) {
-    AddonInstall.createInstall(function(install) {
-      if (install)
-        callback(install.wrapper);
+  getInstallForFile: function XPI_getInstallForFile(aFile, aCallback) {
+    AddonInstall.createInstall(function(aInstall) {
+      if (aInstall)
+        aCallback(aInstall.wrapper);
       else
-        callback(null);
-    }, file);
+        aCallback(null);
+    }, aFile);
   },
 
-  removeActiveInstall: function XPI_removeActiveInstall(install) {
-    this.installs = this.installs.filter(function(i) i != install);
+  /**
+   * Removes an AddonInstall from the list of active installs.
+   *
+   * @param  install
+   *         The AddonInstall to remove
+   */
+  removeActiveInstall: function XPI_removeActiveInstall(aInstall) {
+    this.installs = this.installs.filter(function(i) i != aInstall);
   },
 
   /**
    * Called to get an Addon with a particular ID.
    *
-   * @param   id
-   *          The ID of the add-on to retrieve
-   * @param   callback
-   *          A callback to pass the Addon to
+   * @param  aId
+   *         The ID of the add-on to retrieve
+   * @param  aCallback
+   *         A callback to pass the Addon to
    */
-  getAddon: function XPI_getAddon(id, callback) {
-    XPIDatabase.getVisibleAddonForID(id, function(addon) {
-      if (addon)
-        callback(createWrapper(addon));
+  getAddon: function XPI_getAddon(aId, aCallback) {
+    XPIDatabase.getVisibleAddonForID(aId, function(aAddon) {
+      if (aAddon)
+        aCallback(createWrapper(aAddon));
       else
-        callback(null);
+        aCallback(null);
     });
   },
 
   /**
    * Called to get Addons of a particular type.
    *
-   * @param   types
-   *          An array of types to fetch. Can be null to get all types.
-   * @param   callback
-   *          A callback to pass an array of Addons to
+   * @param  aTypes
+   *         An array of types to fetch. Can be null to get all types.
+   * @param  aCallback
+   *         A callback to pass an array of Addons to
    */
-  getAddonsByTypes: function XPI_getAddonsByTypes(types, callback) {
-    XPIDatabase.getVisibleAddons(types, function(addons) {
-      callback([createWrapper(a) for each (a in addons)]);
+  getAddonsByTypes: function XPI_getAddonsByTypes(aTypes, aCallback) {
+    XPIDatabase.getVisibleAddons(aTypes, function(aAddons) {
+      aCallback([createWrapper(a) for each (a in aAddons)]);
     });
   },
 
   /**
    * Called to get Addons that have pending operations.
    *
-   * @param   types
-   *          An array of types to fetch. Can be null to get all types
-   * @param   callback
-   *          A callback to pass an array of Addons to
+   * @param  aTypes
+   *         An array of types to fetch. Can be null to get all types
+   * @param  aCallback
+   *         A callback to pass an array of Addons to
    */
   getAddonsWithPendingOperations:
-  function XPI_getAddonsWithPendingOperations(types, callback) {
-    XPIDatabase.getVisibleAddonsWithPendingOperations(types, function(addons) {
-      let results = [createWrapper(a) for each (a in addons)];
-      XPIProvider.installs.forEach(function(install) {
-        if (install.state == AddonManager.STATE_INSTALLED &&
-            !(install.addon instanceof DBAddonInternal))
-          results.push(createWrapper(install.addon));
+  function XPI_getAddonsWithPendingOperations(aTypes, aCallback) {
+    XPIDatabase.getVisibleAddonsWithPendingOperations(aTypes, function(aAddons) {
+      let results = [createWrapper(a) for each (a in aAddons)];
+      XPIProvider.installs.forEach(function(aInstall) {
+        if (aInstall.state == AddonManager.STATE_INSTALLED &&
+            !(aInstall.addon instanceof DBAddonInternal))
+          results.push(createWrapper(aInstall.addon));
       });
-      callback(results);
+      aCallback(results);
     });
   },
 
   /**
    * Called to get the current AddonInstalls, optionally limiting to a list of
    * types.
    *
-   * @param   types
-   *          An array of types or null to get all types
-   * @param   callback
-   *          A callback to pass the array of AddonInstalls to
+   * @param  aTypes
+   *         An array of types or null to get all types
+   * @param  aCallback
+   *         A callback to pass the array of AddonInstalls to
    */
-  getInstalls: function XPI_getInstalls(types, callback) {
+  getInstalls: function XPI_getInstalls(aTypes, aCallback) {
     let results = [];
-    this.installs.forEach(function(install) {
-      if (!types || types.indexOf(install.type) >= 0)
-        results.push(install.wrapper);
+    this.installs.forEach(function(aInstall) {
+      if (!aTypes || aTypes.indexOf(aInstall.type) >= 0)
+        results.push(aInstall.wrapper);
     });
-    callback(results);
+    aCallback(results);
   },
 
   /**
    * Called when a new add-on has been enabled when only one add-on of that type
    * can be enabled.
    *
-   * @param   id
-   *          The ID of the newly enabled add-on
-   * @param   type
-   *          The type of the newly enabled add-on
-   * @param   pendingRestart
-   *          true if the newly enabled add-on will only become enabled after a
-   *          restart
+   * @param  aId
+   *         The ID of the newly enabled add-on
+   * @param  aType
+   *         The type of the newly enabled add-on
+   * @param  aPendingRestart
+   *         true if the newly enabled add-on will only become enabled after a
+   *         restart
    */
-  addonChanged: function XPI_addonChanged(id, type, pendingRestart) {
+  addonChanged: function XPI_addonChanged(aId, aType, aPendingRestart) {
     // We only care about themes in this provider
-    if (type != "theme")
+    if (aType != "theme")
       return;
 
-    if (!id) {
+    if (!aId) {
       // Fallback to the default theme when no theme was enabled
       this.enableDefaultTheme();
       return;
     }
 
     // Look for the previously enabled theme and find the internalName of the
     // currently selected theme
     let previousTheme = null;
     let newSkin = this.defaultSkin;
     let addons = XPIDatabase.getAddonsByType("theme");
-    addons.forEach(function(a) {
-      if (!a.visible)
+    addons.forEach(function(aTheme) {
+      if (!aTheme.visible)
         return;
-      if (a.id == id)
-        newSkin = a.internalName;
-      else if (a.userDisabled == false && !a.pendingUninstall)
-        previousTheme = a;
+      if (aTheme.id == aId)
+        newSkin = aTheme.internalName;
+      else if (aTheme.userDisabled == false && !aTheme.pendingUninstall)
+        previousTheme = aTheme;
     }, this);
 
-    if (pendingRestart) {
+    if (aPendingRestart) {
       Services.prefs.setBoolPref(PREF_DSS_SWITCHPENDING, true);
       Services.prefs.setCharPref(PREF_DSS_SKIN_TO_SELECT, newSkin);
     }
     else {
       Services.prefs.setCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN, newSkin);
     }
     this.selectedSkin = newSkin;
 
@@ -1781,413 +1785,413 @@ var XPIProvider = {
 
   /**
    * When the previously selected theme is removed this method will be called
    * to enable the default theme.
    */
   enableDefaultTheme: function XPI_enableDefaultTheme() {
     LOG("Activating default theme");
     let addons = XPIDatabase.getAddonsByType("theme");
-    addons.forEach(function(a) {
+    addons.forEach(function(aTheme) {
       // If this is theme contains the default skin and it is currently visible
       // then mark it as enabled.
-      if (a.internalName == this.defaultSkin && a.visible)
-        this.updateAddonDisabledState(a, false);
+      if (aTheme.internalName == this.defaultSkin && aTheme.visible)
+        this.updateAddonDisabledState(aTheme, false);
     }, this);
   },
 
   /**
    * Notified when a preference we're interested in has changed.
    *
    * @see nsIObserver
    */
-  observe: function XPI_observe(subject, topic, data) {
-    switch (data) {
+  observe: function XPI_observe(aSubject, aTopic, aData) {
+    switch (aData) {
     case this.checkCompatibilityPref:
     case PREF_EM_CHECK_UPDATE_SECURITY:
       this.checkCompatibility = Prefs.getBoolPref(this.checkCompatibilityPref,
                                                   true);
       this.checkUpdateSecurity = Prefs.getBoolPref(PREF_EM_CHECK_UPDATE_SECURITY,
                                                    true);
       this.updateAllAddonDisabledStates();
       break;
     }
   },
 
   /**
    * Tests whether enabling an add-on will require a restart.
    *
-   * @param   addon
-   *          The add-on to test
-   * @return  true if the operation requires a restart
+   * @param  aAddon
+   *         The add-on to test
+   * @return true if the operation requires a restart
    */
-  enableRequiresRestart: function XPI_enableRequiresRestart(addon) {
+  enableRequiresRestart: function XPI_enableRequiresRestart(aAddon) {
     // If the theme we're enabling is the skin currently selected then it doesn't
     // require a restart to enable it.
-    if (addon.type == "theme")
-      return addon.internalName !=
+    if (aAddon.type == "theme")
+      return aAddon.internalName !=
              Prefs.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN);
 
-    return addon.type != "bootstrapped";
+    return aAddon.type != "bootstrapped";
   },
 
   /**
    * Tests whether disabling an add-on will require a restart.
    *
-   * @param   addon
-   *          The add-on to test
-   * @return  true if the operation requires a restart
+   * @param  aAddon
+   *         The add-on to test
+   * @return true if the operation requires a restart
    */
-  disableRequiresRestart: function XPI_disableRequiresRestart(addon) {
+  disableRequiresRestart: function XPI_disableRequiresRestart(aAddon) {
     // This sounds odd but it is correct. Themes are only ever asked to disable
     // after another theme has been enabled. Disabling the theme only requires
     // a restart if enabling the other theme does too. If the selected skin doesn't
     // match the current skin then a restart is necessary.
-    if (addon.type == "theme")
+    if (aAddon.type == "theme")
       return this.selectedSkin !=
              Prefs.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN);
 
-    return addon.type != "bootstrapped";
+    return aAddon.type != "bootstrapped";
   },
 
   /**
    * Tests whether installing an add-on will require a restart.
    *
-   * @param   addon
-   *          The add-on to test
-   * @return  true if the operation requires a restart
+   * @param  aAddon
+   *         The add-on to test
+   * @return true if the operation requires a restart
    */
-  installRequiresRestart: function XPI_installRequiresRestart(addon) {
+  installRequiresRestart: function XPI_installRequiresRestart(aAddon) {
     // Themes not currently in use can be installed immediately
-    if (addon.type == "theme")
-      return addon.internalName ==
+    if (aAddon.type == "theme")
+      return aAddon.internalName ==
              Prefs.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN);
 
-    return addon.type != "bootstrapped";
+    return aAddon.type != "bootstrapped";
   },
 
   /**
    * Tests whether uninstalling an add-on will require a restart.
    *
-   * @param   addon
-   *          The add-on to test
-   * @return  true if the operation requires a restart
+   * @param  aAddon
+   *         The add-on to test
+   * @return true if the operation requires a restart
    */
-  uninstallRequiresRestart: function XPI_uninstallRequiresRestart(addon) {
+  uninstallRequiresRestart: function XPI_uninstallRequiresRestart(aAddon) {
     // Themes not currently in use can be uninstalled immediately
-    if (addon.type == "theme")
-      return addon.internalName ==
+    if (aAddon.type == "theme")
+      return aAddon.internalName ==
              Prefs.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN);
 
-    return addon.type != "bootstrapped";
+    return aAddon.type != "bootstrapped";
   },
 
   /**
    * Calls a method in a bootstrap.js loaded scope logging any exceptions thrown.
    *
-   * @param   id
-   *          The ID of the add-on being bootstrapped
-   * @param   scope
-   *          The loaded JS scope to call into
-   * @param   methods
-   *          An array of methods. The first method in the array that exists in
-   *          the scope will be called
+   * @param  aId
+   *         The ID of the add-on being bootstrapped
+   * @param  aScope
+   *         The loaded JS scope to call into
+   * @param  aMethods
+   *         An array of methods. The first method in the array that exists in
+   *         the scope will be called
    */
-  callBootstrapMethod: function XPI_callBootstrapMethod(id, scope, methods) {
-    for (let i = 0; i < methods.length; i++) {
-      if (methods[i] in scope) {
-        LOG("Calling bootstrap method " + methods[i] + " on " + id);
+  callBootstrapMethod: function XPI_callBootstrapMethod(aId, aScope, aMethods) {
+    for (let i = 0; i < aMethods.length; i++) {
+      if (aMethods[i] in aScope) {
+        LOG("Calling bootstrap method " + aMethods[i] + " on " + aId);
 
         try {
-          scope[methods[i]](id);
+          aScope[aMethods[i]](aId);
         }
         catch (e) {
-          WARN("Exception running bootstrap method " + methods[i] + " on " +
-               id + ": " + e);
+          WARN("Exception running bootstrap method " + aMethods[i] + " on " +
+               aId + ": " + e);
         }
         return;
       }
     }
   },
 
   /**
    * Activates a bootstrapped add-on by loading its JS scope and calling the
    * appropriate method on it. Adds the add-on and its scope to the
    * bootstrapScopes and bootstrappedAddons dictionaries.
    *
-   * @param   id
-   *          The ID of the add-on being activated
-   * @param   version
-   *          The version of the add-on being activated
-   * @param   dir
-   *          The directory containing the add-on
-   * @param   startup
-   *          true if the add-on is being activated during startup
-   * @param   install
-   *          true if the add-on is being activated during installation
+   * @param  aId
+   *         The ID of the add-on being activated
+   * @param  aVersion
+   *         The version of the add-on being activated
+   * @param  aDir
+   *         The directory containing the add-on
+   * @param  aStartup
+   *         true if the add-on is being activated during startup
+   * @param  aInstall
+   *         true if the add-on is being activated during installation
    */
-  activateAddon: function XPI_activateAddon(id, version, dir, startup, install) {
+  activateAddon: function XPI_activateAddon(aId, aVersion, aDir, aStartup, aInstall) {
     let methods = ["enable"];
-    if (startup)
+    if (aStartup)
       methods.unshift("startup");
-    if (install)
+    if (aInstall)
       methods.unshift("install");
-    let bootstrap = dir.clone();
+    let bootstrap = aDir.clone();
     bootstrap.append("bootstrap.js");
     if (bootstrap.exists()) {
       let uri = Services.io.newFileURI(bootstrap);
       let principal = Cc["@mozilla.org/systemprincipal;1"].
                       createInstance(Ci.nsIPrincipal);
       let scope = new Components.utils.Sandbox(principal);
       let loader = Cc["@mozilla.org/moz/jssubscript-loader;1"].
                    createInstance(Ci.mozIJSSubScriptLoader);
 
       // Mark the add-on as active for the crash reporter before loading
-      this.bootstrappedAddons[id] = {
-        version: version,
-        descriptor: dir.persistentDescriptor
+      this.bootstrappedAddons[aId] = {
+        version: aVersion,
+        descriptor: aDir.persistentDescriptor
       };
-      this.bootstrapScopes[id] = scope;
+      this.bootstrapScopes[aId] = scope;
       this.addAddonsToCrashReporter();
 
       try {
         loader.loadSubScript(uri.spec, scope);
       }
       catch (e) {
-        WARN("Error loading bootstrap.js for " + id + ": " + e);
+        WARN("Error loading bootstrap.js for " + aId + ": " + e);
       }
 
-      this.callBootstrapMethod(id, scope, methods);
+      this.callBootstrapMethod(aId, scope, methods);
     }
     else {
-      WARN("Bootstrap missing for " + id);
+      WARN("Bootstrap missing for " + aId);
     }
   },
 
   /**
    * Dectivates a bootstrapped add-on by by calling the appropriate method on
    * the cached JS scope. Removes the add-on and its scope from the
    * bootstrapScopes and bootstrappedAddons dictionaries.
    *
-   * @param   id
-   *          The ID of the add-on being deactivated
-   * @param   shutdown
-   *          true if the add-on is being deactivated during shutdown
-   * @param   uninstall
-   *          true if the add-on is being deactivated during uninstallation
+   * @param  aId
+   *         The ID of the add-on being deactivated
+   * @param  aShutdown
+   *         true if the add-on is being deactivated during shutdown
+   * @param  aUninstall
+   *         true if the add-on is being deactivated during uninstallation
    */
-  deactivateAddon: function XPI_deactivateAddon(id, shutdown, uninstall) {
-    if (!(id in this.bootstrappedAddons)) {
+  deactivateAddon: function XPI_deactivateAddon(aId, aShutdown, aUninstall) {
+    if (!(aId in this.bootstrappedAddons)) {
       ERROR("Attempted to deactivate an add-on that was never activated");
       return;
     }
-    let scope = this.bootstrapScopes[id];
-    delete this.bootstrappedAddons[id];
-    delete this.bootstrapScopes[id];
+    let scope = this.bootstrapScopes[aId];
+    delete this.bootstrappedAddons[aId];
+    delete this.bootstrapScopes[aId];
 
     let methods = ["disable"];
-    if (shutdown)
+    if (aShutdown)
       methods.unshift("shutdown");
-    if (uninstall)
+    if (aUninstall)
       methods.unshift("uninstall");
-    this.callBootstrapMethod(id, scope, methods);
+    this.callBootstrapMethod(aId, scope, methods);
 
     this.addAddonsToCrashReporter();
   },
 
   /**
    * Updates the appDisabled property for all add-ons.
    */
   updateAllAddonDisabledStates: function XPI_updateAllAddonDisabledStates() {
     let addons = XPIDatabase.getAddons();
-    addons.forEach(function(addon) {
-      this.updateAddonDisabledState(addon);
+    addons.forEach(function(aAddon) {
+      this.updateAddonDisabledState(aAddon);
     }, this);
   },
 
   /**
    * Updates the disabled state for an add-on. Its appDisabled property will be
    * calculated and if the add-on is changed appropriate notifications will be
    * sent out to the registered AddonListeners.
    *
-   * @param   addon
-   *          The DBAddonInternal to update
-   * @param   userDisabled
-   *          Value for the userDisabled property. If undefined the value will
-   *          not change
-   * @throws  if addon is not a DBAddonInternal
+   * @param  aAddon
+   *         The DBAddonInternal to update
+   * @param  aUserDisabled
+   *         Value for the userDisabled property. If undefined the value will
+   *         not change
+   * @throws if addon is not a DBAddonInternal
    */
-  updateAddonDisabledState: function XPI_updateAddonDisabledState(addon,
-                                                                  userDisabled) {
-    if (!(addon instanceof DBAddonInternal))
+  updateAddonDisabledState: function XPI_updateAddonDisabledState(aAddon,
+                                                                  aUserDisabled) {
+    if (!(aAddon instanceof DBAddonInternal))
       throw new Error("Can only update addon states for installed addons.");
 
-    if (userDisabled === undefined)
-      userDisabled = addon.userDisabled;
-
-    let appDisabled = !isUsableAddon(addon);
+    if (aUserDisabled === undefined)
+      aUserDisabled = aAddon.userDisabled;
+
+    let appDisabled = !isUsableAddon(aAddon);
     // No change means nothing to do here
-    if (addon.userDisabled == userDisabled &&
-        addon.appDisabled == appDisabled)
+    if (aAddon.userDisabled == aUserDisabled &&
+        aAddon.appDisabled == appDisabled)
       return;
 
-    let wasDisabled = addon.userDisabled || addon.appDisabled;
-    let isDisabled = userDisabled || appDisabled;
+    let wasDisabled = aAddon.userDisabled || aAddon.appDisabled;
+    let isDisabled = aUserDisabled || appDisabled;
 
     // Update the properties in the database
-    XPIDatabase.setAddonProperties(addon, {
-      userDisabled: userDisabled,
+    XPIDatabase.setAddonProperties(aAddon, {
+      userDisabled: aUserDisabled,
       appDisabled: appDisabled
     });
 
     // If the add-on is not visible or the add-on is not changing state then
     // there is no need to do anything else
-    if (!addon.visible || (wasDisabled == isDisabled))
+    if (!aAddon.visible || (wasDisabled == isDisabled))
       return;
 
     // Flag that active states in the database need to be updated on shutdown
     Services.prefs.setBoolPref(PREF_PENDING_OPERATIONS, true);
 
-    let wrapper = createWrapper(addon);
+    let wrapper = createWrapper(aAddon);
     // Have we just gone back to the current state?
-    if (isDisabled != addon.active) {
+    if (isDisabled != aAddon.active) {
       AddonManagerPrivate.callAddonListeners("onOperationCancelled", wrapper);
     }
     else {
       if (isDisabled) {
-        var needsRestart = this.disableRequiresRestart(addon);
+        var needsRestart = this.disableRequiresRestart(aAddon);
         AddonManagerPrivate.callAddonListeners("onDisabling", wrapper,
                                                needsRestart);
       }
       else {
-        needsRestart = this.enableRequiresRestart(addon);
+        needsRestart = this.enableRequiresRestart(aAddon);
         AddonManagerPrivate.callAddonListeners("onEnabling", wrapper,
                                                needsRestart);
       }
 
       if (!needsRestart) {
-        addon.active = !isDisabled;
-        XPIDatabase.updateAddonActive(addon);
+        aAddon.active = !isDisabled;
+        XPIDatabase.updateAddonActive(aAddon);
         if (isDisabled) {
-          if (addon.type == "bootstrapped")
-            this.deactivateAddon(addon.id, false, false);
+          if (aAddon.type == "bootstrapped")
+            this.deactivateAddon(aAddon.id, false, false);
           AddonManagerPrivate.callAddonListeners("onDisabled", wrapper);
         }
         else {
-          if (addon.type == "bootstrapped") {
-            let dir = addon._installLocation.getLocationForID(addon.id);
-            this.activateAddon(addon.id, addon.version, dir, false, false);
+          if (aAddon.type == "bootstrapped") {
+            let dir = aAddon._installLocation.getLocationForID(aAddon.id);
+            this.activateAddon(aAddon.id, aAddon.version, dir, false, false);
           }
           AddonManagerPrivate.callAddonListeners("onEnabled", wrapper);
         }
       }
     }
 
     // Notify any other providers that a new theme has been enabled
-    if (addon.type == "theme" && !isDisabled)
-      AddonManagerPrivate.notifyAddonChanged(addon.id, addon.type, true);
+    if (aAddon.type == "theme" && !isDisabled)
+      AddonManagerPrivate.notifyAddonChanged(aAddon.id, aAddon.type, true);
   },
 
   /**
    * Uninstalls an add-on, immediately if possible or marks it as pending
    * uninstall if not.
    *
-   * @param   addon
-   *          The DBAddonInternal to uninstall
-   * @throws  if the addon cannot be uninstalled because it is in an install
-   *          location that does not allow it
+   * @param  aAddon
+   *         The DBAddonInternal to uninstall
+   * @throws if the addon cannot be uninstalled because it is in an install
+   *         location that does not allow it
    */
-  uninstallAddon: function XPI_uninstallAddon(addon) {
-    if (!(addon instanceof DBAddonInternal))
+  uninstallAddon: function XPI_uninstallAddon(aAddon) {
+    if (!(aAddon instanceof DBAddonInternal))
       throw new Error("Can only uninstall installed addons.");
 
-    if (addon._installLocation.locked)
+    if (aAddon._installLocation.locked)
       throw new Error("Cannot uninstall addons from locked install locations");
 
     // Inactive add-ons don't require a restart to uninstall
-    let requiresRestart = addon.active && this.uninstallRequiresRestart(addon);
+    let requiresRestart = aAddon.active && this.uninstallRequiresRestart(aAddon);
 
     if (requiresRestart) {
       // We create an empty directory in the staging directory to indicate that
       // an uninstall is necessary on next startup.
-      let stage = addon._installLocation.getStagingDir();
-      stage.append(addon.id);
+      let stage = aAddon._installLocation.getStagingDir();
+      stage.append(aAddon.id);
       if (!stage.exists())
         stage.create(Ci.nsIFile.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
 
-      XPIDatabase.setAddonProperties(addon, {
+      XPIDatabase.setAddonProperties(aAddon, {
         pendingUninstall: true
       });
       Services.prefs.setBoolPref(PREF_PENDING_OPERATIONS, true);
     }
 
     // If the add-on is not visible then there is no need to notify listeners.
-    if (!addon.visible)
+    if (!aAddon.visible)
       return;
 
-    let wrapper = createWrapper(addon);
+    let wrapper = createWrapper(aAddon);
     AddonManagerPrivate.callAddonListeners("onUninstalling", wrapper,
                                            requiresRestart);
 
     if (!requiresRestart) {
-      if (addon.type == "bootstrapped")
-        this.deactivateAddon(addon.id, false, true);
-      addon._installLocation.uninstallAddon(addon.id);
-      XPIDatabase.removeAddonMetadata(addon);
+      if (aAddon.type == "bootstrapped")
+        this.deactivateAddon(aAddon.id, false, true);
+      aAddon._installLocation.uninstallAddon(aAddon.id);
+      XPIDatabase.removeAddonMetadata(aAddon);
       AddonManagerPrivate.callAddonListeners("onUninstalled", wrapper);
       // TODO reveal hidden add-ons (bug 557710)
     }
 
     // Notify any other providers that a new theme has been enabled
-    if (addon.type == "theme" && addon.active)
-      AddonManagerPrivate.notifyAddonChanged(null, addon.type, requiresRestart);
+    if (aAddon.type == "theme" && aAddon.active)
+      AddonManagerPrivate.notifyAddonChanged(null, aAddon.type, requiresRestart);
   },
 
   /**
    * Cancels the pending uninstall of an add-on.
    *
-   * @param   addon
-   *          The DBAddonInternal to cancel uninstall for
+   * @param  aAddon
+   *         The DBAddonInternal to cancel uninstall for
    */
-  cancelUninstallAddon: function XPI_cancelUninstallAddon(addon) {
-    if (!(addon instanceof DBAddonInternal))
+  cancelUninstallAddon: function XPI_cancelUninstallAddon(aAddon) {
+    if (!(aAddon instanceof DBAddonInternal))
       throw new Error("Can only cancel uninstall for installed addons.");
 
-    let stagedAddon = addon._installLocation.getStagingDir();
-    stagedAddon.append(addon.id);
+    let stagedAddon = aAddon._installLocation.getStagingDir();
+    stagedAddon.append(aAddon.id);
     if (stagedAddon.exists())
       stagedAddon.remove(true);
 
-    XPIDatabase.setAddonProperties(addon, {
+    XPIDatabase.setAddonProperties(aAddon, {
       pendingUninstall: false
     });
 
-    if (!addon.visible)
+    if (!aAddon.visible)
       return;
 
     Services.prefs.setBoolPref(PREF_PENDING_OPERATIONS, true);
 
     // TODO hide hidden add-ons (bug 557710)
-    let wrapper = createWrapper(addon);
+    let wrapper = createWrapper(aAddon);
     AddonManagerPrivate.callAddonListeners("onOperationCancelled", wrapper);
 
     // Notify any other providers that this theme is now enabled again.
-    if (addon.type == "theme" && addon.active)
-      AddonManagerPrivate.notifyAddonChanged(addon.id, addon.type, false);
+    if (aAddon.type == "theme" && aAddon.active)
+      AddonManagerPrivate.notifyAddonChanged(aAddon.id, aAddon.type, false);
   }
 };
 
 const FIELDS_ADDON = "internal_id, id, location, version, type, internalName, " +
                      "updateURL, updateKey, optionsURL, aboutURL, iconURL, " +
                      "defaultLocale, visible, active, userDisabled, appDisabled, " +
                      "pendingUninstall, descriptor, installDate, updateDate";
 
 // A helper function to simply log any errors that occur during async statements.
-function asyncErrorLogger(error) {
-  ERROR("SQL error " + error.result + ": " + error.message);
+function asyncErrorLogger(aError) {
+  ERROR("SQL error " + aError.result + ": " + aError.message);
 }
 
 var XPIDatabase = {
   // true if the database connection has been opened
   initialized: false,
   // A cache of statements that are used and need to be finalized on shutdown
   statementCache: {},
   // A cache of weak referenced DBAddonInternals so we can reuse objects where
@@ -2262,17 +2266,17 @@ var XPIDatabase = {
     updateTargetApplications: "UPDATE targetApplication SET " +
                               "minVersion=:minVersion, maxVersion=:maxVersion " +
                               "WHERE addon_internal_id=:internal_id AND id=:id",
   },
 
   /**
    * Opens a new connection to the database file.
    *
-   * @return  the mozIStorageConnection for the database
+   * @return the mozIStorageConnection for the database
    */
   openConnection: function XPIDB_openConnection() {
     this.initialized = true;
     let dbfile = FileUtils.getFile(KEY_PROFILEDIR, [FILE_DATABASE], true);
     delete this.connection;
     return this.connection = Services.storage.openDatabase(dbfile);
   },
 
@@ -2281,36 +2285,37 @@ var XPIDatabase = {
    */
   get connection() {
     return this.openConnection();
   },
 
   /**
    * Migrates data from a previous database schema.
    *
-   * @param   oldSchema
-   *          The previous schema
-   * @return  an object holding information about what add-ons were previously
-   *          userDisabled
+   * @param  oldSchema
+   *         The previous schema
+   * @return an object holding information about what add-ons were previously
+   *         userDisabled
    */
-  migrateData: function XPIDB_migrateData(oldSchema) {
-    LOG("Migrating data from schema " + oldSchema);
+  migrateData: function XPIDB_migrateData(aOldSchema) {
+    LOG("Migrating data from schema " + aOldSchema);
     let migrateData = {};
 
-    if (oldSchema == 0) {
+    if (aOldSchema == 0) {
       // Migrate data from extensions.rdf
       let rdffile = FileUtils.getFile(KEY_PROFILEDIR, [FILE_OLD_DATABASE], true);
       if (rdffile.exists()) {
         let RDF = Cc["@mozilla.org/rdf/rdf-service;1"].
                   getService(Ci.nsIRDFService);
         const PREFIX_NS_EM = "http://www.mozilla.org/2004/em-rdf#";
 
-        function EM_R(property) {
-          return RDF.GetResource(PREFIX_NS_EM + property);
+        function EM_R(aProperty) {
+          return RDF.GetResource(PREFIX_NS_EM + aProperty);
         }
+
         let ds = RDF.GetDataSourceBlocking(Services.io.newFileURI(rdffile).spec);
 
         // Look for any add-ons that were disabled or going to be disabled
         ["true", "needs-disable"].forEach(function(val) {
           let sources = ds.GetSources(EM_R("userDisabled"), RDF.GetLiteral(val),
                                       true);
           while (sources.hasMoreElements()) {
             let source = sources.getNext().QueryInterface(Ci.nsIRDFResource);
@@ -2383,34 +2388,34 @@ var XPIDatabase = {
       });
     }
   },
 
   /**
    * Gets a cached statement or creates a new statement if it doesn't already
    * exist.
    *
-   * @param   key
-   *          A unique key to reference the statement
-   * @param   sql
-   *          An optional SQL string to use for the query, otherwise a
-   *          predefined sql string for the key will be used.
-   * @return  a mozIStorageStatement for the passed SQL
+   * @param  key
+   *         A unique key to reference the statement
+   * @param  aSql
+   *         An optional SQL string to use for the query, otherwise a
+   *         predefined sql string for the key will be used.
+   * @return a mozIStorageStatement for the passed SQL
    */
-  getStatement: function XPIDB_getStatement(key, sql) {
-    if (key in this.statementCache)
-      return this.statementCache[key];
-    if (!sql)
-      sql = this.statements[key];
+  getStatement: function XPIDB_getStatement(aKey, aSql) {
+    if (aKey in this.statementCache)
+      return this.statementCache[aKey];
+    if (!aSql)
+      aSql = this.statements[aKey];
 
     try {
-      return this.statementCache[key] = this.connection.createStatement(sql);
+      return this.statementCache[aKey] = this.connection.createStatement(aSql);
     }
     catch (e) {
-      ERROR("Error creating statement " + key + " (" + sql + ")");
+      ERROR("Error creating statement " + aKey + " (" + aSql + ")");
       throw e;
     }
   },
 
   /**
    * Creates the schema in the database.
    */
   createSchema: function XPIDB_createSchema() {
@@ -2457,267 +2462,267 @@ var XPIDatabase = {
       "END");
     this.connection.schemaVersion = DB_SCHEMA;
     Services.prefs.setIntPref(PREF_DB_SCHEMA, DB_SCHEMA);
   },
 
   /**
    * Synchronously reads the multi-value locale strings for a locale
    *
-   * @param   locale
-   *          The locale object to read into
+   * @param  aLocale
+   *         The locale object to read into
    */
-  _readLocaleStrings: function XPIDB__readLocaleStrings(locale) {
+  _readLocaleStrings: function XPIDB__readLocaleStrings(aLocale) {
     let stmt = this.getStatement("_readLocaleStrings");
 
     stmt.params.id = locale.id;
     for (let row in resultRows(stmt)) {
       if (!(row.type in locale))
-        locale[row.type] = [];
-      locale[row.type].push(row.value);
+        aLocale[row.type] = [];
+      aLocale[row.type].push(row.value);
     }
   },
 
   /**
    * Synchronously reads the locales for an add-on
    *
-   * @param   addon
-   *          The DBAddonInternal to read the locales for
-   * @return  the array of locales
+   * @param  aAddon
+   *         The DBAddonInternal to read the locales for
+   * @return the array of locales
    */
-  _getLocales: function XPIDB__getLocales(addon) {
+  _getLocales: function XPIDB__getLocales(aAddon) {
     let stmt = this.getStatement("_getLocales");
 
     let locales = [];
-    stmt.params.internal_id = addon._internal_id;
+    stmt.params.internal_id = aAddon._internal_id;
     for (let row in resultRows(stmt)) {
       let locale = {
         id: row.id,
         locales: [row.locale]
       };
       copyProperties(row, PROP_LOCALE_SINGLE, locale);
       locales.push(locale);
     }
-    locales.forEach(function(locale) {
-      this._readLocaleStrings(locale);
+    locales.forEach(function(aLocale) {
+      this._readLocaleStrings(aLocale);
     }, this);
     return locales;
   },
 
   /**
    * Synchronously reads the default locale for an add-on
    *
-   * @param   addon
-   *          The DBAddonInternal to read the default locale for
-   * @return  the default locale for the add-on
-   * @throws  if the database does not contain the default locale information
+   * @param  aAddon
+   *         The DBAddonInternal to read the default locale for
+   * @return the default locale for the add-on
+   * @throws if the database does not contain the default locale information
    */
-  _getDefaultLocale: function XPIDB__getDefaultLocale(addon) {
+  _getDefaultLocale: function XPIDB__getDefaultLocale(aAddon) {
     let stmt = this.getStatement("_getDefaultLocale");
 
-    stmt.params.id = addon._defaultLocale;
+    stmt.params.id = aAddon._defaultLocale;
     if (!stmt.executeStep())
-      throw new Error("Missing default locale for " + addon.id);
+      throw new Error("Missing default locale for " + aAddon.id);
     let locale = copyProperties(stmt.row, PROP_LOCALE_SINGLE);
-    locale.id = addon._defaultLocale;
+    locale.id = aAddon._defaultLocale;
     stmt.reset();
     this._readLocaleStrings(locale);
     return locale;
   },
 
   /**
    * Synchronously reads the target application entries for an add-on
    *
-   * @param   addon
-   *          The DBAddonInternal to read the target applications for
-   * @return  an array of target applications
+   * @param  aAddon
+   *         The DBAddonInternal to read the target applications for
+   * @return an array of target applications
    */
-  _getTargetApplications: function XPIDB__getTargetApplications(addon) {
+  _getTargetApplications: function XPIDB__getTargetApplications(aAddon) {
     let stmt = this.getStatement("_getTargetApplications");
 
-    stmt.params.internal_id = addon._internal_id;
+    stmt.params.internal_id = aAddon._internal_id;
     return [copyProperties(row, PROP_TARGETAPP) for each (row in resultRows(stmt))];
   },
 
   /**
    * Synchronously makes a DBAddonInternal from a storage row or returns one
+   * from the cache.
    *
-   * from the cache.
-   * @param   row
-   *          The storage row to make the DBAddonInternal from
-   * @return  a DBAddonInternal
+   * @param  aRow
+   *         The storage row to make the DBAddonInternal from
+   * @return a DBAddonInternal
    */
-  makeAddonFromRow: function XPIDB_makeAddonFromRow(row) {
-    if (this.addonCache[row.internal_id]) {
-      let addon = this.addonCache[row.internal_id].get();
+  makeAddonFromRow: function XPIDB_makeAddonFromRow(aRow) {
+    if (this.addonCache[aRow.internal_id]) {
+      let addon = this.addonCache[aRow.internal_id].get();
       if (addon)
         return addon;
     }
 
     let addon = new DBAddonInternal();
-    addon._internal_id = row.internal_id;
-    addon._installLocation = XPIProvider.installLocationsByName[row.location];
-    addon._descriptor = row.descriptor;
-    copyProperties(row, PROP_METADATA, addon);
-    addon._defaultLocale = row.defaultLocale;
-    addon.installDate = row.installDate;
-    addon.updateDate = row.updateDate;
+    addon._internal_id = aRow.internal_id;
+    addon._installLocation = XPIProvider.installLocationsByName[aRow.location];
+    addon._descriptor = aRow.descriptor;
+    copyProperties(aRow, PROP_METADATA, addon);
+    addon._defaultLocale = aRow.defaultLocale;
+    addon.installDate = aRow.installDate;
+    addon.updateDate = aRow.updateDate;
     ["visible", "active", "userDisabled", "appDisabled",
-     "pendingUninstall"].forEach(function(prop) {
-      addon[prop] = row[prop] != 0;
+     "pendingUninstall"].forEach(function(aProp) {
+      addon[aProp] = aRow[aProp] != 0;
     });
-    this.addonCache[row.internal_id] = Components.utils.getWeakReference(addon);
+    this.addonCache[aRow.internal_id] = Components.utils.getWeakReference(addon);
     return addon;
   },
 
   /**
    * Asynchronously fetches additional metadata for a DBAddonInternal.
    *
-   * @param   addon
-   *          The DBAddonInternal
-   * @param   callback
-   *          The callback to call when the metadata is completely retrieved
+   * @param  aAddon
+   *         The DBAddonInternal
+   * @param  aCallback
+   *         The callback to call when the metadata is completely retrieved
    */
-  fetchAddonMetadata: function XPIDB_fetchAddonMetadata(addon, callback) {
-    function readLocaleStrings(locale, callback) {
+  fetchAddonMetadata: function XPIDB_fetchAddonMetadata(aAddon, aCallback) {
+    function readLocaleStrings(aLocale, aCallback) {
       let stmt = XPIDatabase.getStatement("_readLocaleStrings");
 
-      stmt.params.id = locale.id;
+      stmt.params.id = aLocale.id;
       stmt.executeAsync({
-        handleResult: function(results) {
+        handleResult: function(aResults) {
           let row = null;
-          while (row = results.getNextRow()) {
+          while (row = aResults.getNextRow()) {
             let type = row.getResultByName("type");
-            if (!(type in locale))
-              locale[type] = [];
-            locale[type].push(row.getResultByName("value"));
+            if (!(type in aLocale))
+              aLocale[type] = [];
+            aLocale[type].push(row.getResultByName("value"));
           }
         },
 
         handleError: asyncErrorLogger,
 
-        handleCompletion: function(reason) {
-          callback();
+        handleCompletion: function(aReason) {
+          aCallback();
         }
       });
     }
 
     function readDefaultLocale() {
-      delete addon.defaultLocale;
+      delete aAddon.defaultLocale;
       let stmt = XPIDatabase.getStatement("_getDefaultLocale");
 
-      stmt.params.id = addon._defaultLocale;
+      stmt.params.id = aAddon._defaultLocale;
       stmt.executeAsync({
-        handleResult: function(results) {
-          addon.defaultLocale = copyRowProperties(results.getNextRow(),
+        handleResult: function(aResults) {
+          aAddon.defaultLocale = copyRowProperties(aResults.getNextRow(),
                                                   PROP_LOCALE_SINGLE);
-          addon.defaultLocale.id = addon._defaultLocale;
+          aAddon.defaultLocale.id = aAddon._defaultLocale;
         },
 
         handleError: asyncErrorLogger,
 
-        handleCompletion: function(reason) {
-          if (addon.defaultLocale) {
-            readLocaleStrings(addon.defaultLocale, readLocales);
+        handleCompletion: function(aReason) {
+          if (aAddon.defaultLocale) {
+            readLocaleStrings(aAddon.defaultLocale, readLocales);
           }
           else {
-            ERROR("Missing default locale for " + addon.id);
+            ERROR("Missing default locale for " + aAddon.id);
             readLocales();
           }
         }
       });
     }
 
     function readLocales() {
-      delete addon.locales;
-      addon.locales = [];
+      delete aAddon.locales;
+      aAddon.locales = [];
       let stmt = XPIDatabase.getStatement("_getLocales");
 
-      stmt.params.internal_id = addon._internal_id;
+      stmt.params.internal_id = aAddon._internal_id;
       stmt.executeAsync({
-        handleResult: function(results) {
+        handleResult: function(aResults) {
           let row = null;
-          while (row = results.getNextRow()) {
+          while (row = aResults.getNextRow()) {
             let locale = {
               id: row.getResultByName("id"),
               locales: [row.getResultByName("locale")]
             };
             copyRowProperties(row, PROP_LOCALE_SINGLE, locale);
-            addon.locales.push(locale);
+            aAddon.locales.push(locale);
           }
         },
 
         handleError: asyncErrorLogger,
 
-        handleCompletion: function(reason) {
+        handleCompletion: function(aReason) {
           let pos = 0;
           function readNextLocale() {
-            if (pos < addon.locales.length)
-              readLocaleStrings(addon.locales[pos++], readNextLocale);
+            if (pos < aAddon.locales.length)
+              readLocaleStrings(aAddon.locales[pos++], readNextLocale);
             else
               readTargetApplications();
           }
 
           readNextLocale();
         }
       });
     }
 
     function readTargetApplications() {
-      delete addon.targetApplications;
-      addon.targetApplications = [];
+      delete aAddon.targetApplications;
+      aAddon.targetApplications = [];
       let stmt = XPIDatabase.getStatement("_getTargetApplications");
 
-      stmt.params.internal_id = addon._internal_id;
+      stmt.params.internal_id = aAddon._internal_id;
       stmt.executeAsync({
-        handleResult: function(results) {
+        handleResult: function(aResults) {
           let row = null;
-          while (row = results.getNextRow())
-            addon.targetApplications.push(copyRowProperties(row, PROP_TARGETAPP));
+          while (row = aResults.getNextRow())
+            aAddon.targetApplications.push(copyRowProperties(row, PROP_TARGETAPP));
         },
 
         handleError: asyncErrorLogger,
 
-        handleCompletion: function(reason) {
-          callback(addon);
+        handleCompletion: function(aReason) {
+          aCallback(aAddon);
         }
       });
     }
 
     readDefaultLocale();
   },
 
   /**
    * Synchronously makes a DBAddonInternal from a mozIStorageRow or returns one
    * from the cache.
    *
-   * @param   row
-   *          The mozIStorageRow to make the DBAddonInternal from
-   * @return  a DBAddonInternal
+   * @param  aRow
+   *         The mozIStorageRow to make the DBAddonInternal from
+   * @return a DBAddonInternal
    */
-  makeAddonFromRowAsync: function XPIDB_makeAddonFromRowAsync(row) {
-    let internal_id = row.getResultByName("internal_id");
+  makeAddonFromRowAsync: function XPIDB_makeAddonFromRowAsync(aRow) {
+    let internal_id = aRow.getResultByName("internal_id");
     if (this.addonCache[internal_id]) {
       let addon = this.addonCache[internal_id].get();
       if (addon)
         return addon;
     }
 
     let addon = new DBAddonInternal();
     addon._internal_id = internal_id;
-    let location = row.getResultByName("location");
+    let location = aRow.getResultByName("location");
     addon._installLocation = XPIProvider.installLocationsByName[location];
-    addon._descriptor = row.getResultByName("descriptor");
-    copyRowProperties(row, PROP_METADATA, addon);
-    addon._defaultLocale = row.getResultByName("defaultLocale");
-    addon.installDate = row.getResultByName("installDate");
-    addon.updateDate = row.getResultByName("updateDate");
+    addon._descriptor = aRow.getResultByName("descriptor");
+    copyRowProperties(aRow, PROP_METADATA, addon);
+    addon._defaultLocale = aRow.getResultByName("defaultLocale");
+    addon.installDate = aRow.getResultByName("installDate");
+    addon.updateDate = aRow.getResultByName("updateDate");
     ["visible", "active", "userDisabled", "appDisabled",
-     "pendingUninstall"].forEach(function(prop) {
-      addon[prop] = row.getResultByName(prop) != 0;
+     "pendingUninstall"].forEach(function(aProp) {
+      addon[aProp] = aRow.getResultByName(aProp) != 0;
     });
     this.addonCache[internal_id] = Components.utils.getWeakReference(addon);
     return addon;
   },
 
   /**
    * Synchronously reads all install locations known about by the database. This
    * is often a a subset of the total install locations when not all have
@@ -2730,206 +2735,206 @@ var XPIDatabase = {
     let stmt = this.getStatement("getInstallLocations");
 
     return [row.location for each (row in resultRows(stmt))];
   },
 
   /**
    * Synchronously reads all the add-ons in a particular install location.
    *
-   * @param   location
-   *          The name of the install location
-   * @return  an array of DBAddonInternals
+   * @param  location
+   *         The name of the install location
+   * @return an array of DBAddonInternals
    */
-  getAddonsInLocation: function XPIDB_getAddonsInLocation(location) {
+  getAddonsInLocation: function XPIDB_getAddonsInLocation(aLocation) {
     let stmt = this.getStatement("getAddonsInLocation");
 
-    stmt.params.location = location;
+    stmt.params.location = aLocation;
     return [this.makeAddonFromRow(row) for each (row in resultRows(stmt))];
   },
 
   /**
    * Asynchronously gets an add-on with a particular ID in a particular
    * install location.
    *
-   * @param   id
-   *          The ID of the add-on to retrieve
-   * @param   locations
-   *          The name of the install location
-   * @param   callback
-   *          A callback to pass the DBAddonInternal to
+   * @param  aId
+   *         The ID of the add-on to retrieve
+   * @param  aLocation
+   *         The name of the install location
+   * @param  aCallback
+   *         A callback to pass the DBAddonInternal to
    */
-  getAddonInLocation: function XPIDB_getAddonInLocation(id, location, callback) {
+  getAddonInLocation: function XPIDB_getAddonInLocation(aId, aLocation, aCallback) {
     let stmt = this.getStatement("getAddonInLocation");
 
-    stmt.params.id = id;
-    stmt.params.location = location;
+    stmt.params.id = aId;
+    stmt.params.location = aLocation;
     stmt.executeAsync({
       addon: null,
 
-      handleResult: function(results) {
-        this.addon = XPIDatabase.makeAddonFromRowAsync(results.getNextRow());
+      handleResult: function(aResults) {
+        this.addon = XPIDatabase.makeAddonFromRowAsync(aResults.getNextRow());
       },
 
       handleError: asyncErrorLogger,
 
-      handleCompletion: function(reason) {
+      handleCompletion: function(aReason) {
         if (this.addon)
-          XPIDatabase.fetchAddonMetadata(this.addon, callback);
+          XPIDatabase.fetchAddonMetadata(this.addon, aCallback);
         else
-          callback(null);
+          aCallback(null);
       }
     });
   },
 
   /**
    * Asynchronously gets the add-on with an ID that is visible.
    *
-   * @param   id
-   *          The ID of the add-on to retrieve
-   * @param   callback
-   *          A callback to pass the DBAddonInternal to
+   * @param  aId
+   *         The ID of the add-on to retrieve
+   * @param  aCallback
+   *         A callback to pass the DBAddonInternal to
    */
-  getVisibleAddonForID: function XPIDB_getVisibleAddonForID(id, callback) {
+  getVisibleAddonForID: function XPIDB_getVisibleAddonForID(aId, aCallback) {
     let stmt = this.getStatement("getVisibleAddonForID");
 
-    stmt.params.id = id;
+    stmt.params.id = aId;
     stmt.executeAsync({
       addon: null,
 
-      handleResult: function(results) {
-        this.addon = XPIDatabase.makeAddonFromRowAsync(results.getNextRow());
+      handleResult: function(aResults) {
+        this.addon = XPIDatabase.makeAddonFromRowAsync(aResults.getNextRow());
       },
 
       handleError: asyncErrorLogger,
 
-      handleCompletion: function(reason) {
+      handleCompletion: function(aReason) {
         if (this.addon)
-          XPIDatabase.fetchAddonMetadata(this.addon, callback);
+          XPIDatabase.fetchAddonMetadata(this.addon, aCallback);
         else
-          callback(null);
+          aCallback(null);
       }
     });
   },
 
   /**
    * Asynchronously gets the visible add-ons, optionally restricting by type.
    *
-   * @param   types
-   *          An array of types to include or null to include all types
-   * @param   callback
-   *          A callback to pass the array of DBAddonInternals to
+   * @param  aTypes
+   *         An array of types to include or null to include all types
+   * @param  aCallback
+   *         A callback to pass the array of DBAddonInternals to
    */
-  getVisibleAddons: function XPIDB_getVisibleAddons(types, callback) {
+  getVisibleAddons: function XPIDB_getVisibleAddons(aTypes, aCallback) {
     let stmt = null;
-    if (!types || types.length == 0) {
+    if (!aTypes || aTypes.length == 0) {
       stmt = this.getStatement("getVisibleAddons");
     }
     else {
       let sql = "SELECT * FROM addon WHERE visible=1 AND type IN (";
-      for (let i = 1; i <= types.length; i++) {
+      for (let i = 1; i <= aTypes.length; i++) {
         sql += "?" + i;
-        if (i < types.length)
+        if (i < aTypes.length)
           sql += ",";
       }
       sql += ")";
 
       // Note that binding to index 0 sets the value for the ?1 parameter
-      stmt = this.getStatement("getVisibleAddons_" + types.length, sql);
-      for (let i = 0; i < types.length; i++)
-        stmt.bindStringParameter(i, types[i]);
+      stmt = this.getStatement("getVisibleAddons_" + aTypes.length, sql);
+      for (let i = 0; i < aTypes.length; i++)
+        stmt.bindStringParameter(i, aTypes[i]);
     }
 
     let addons = [];
     stmt.executeAsync({
-      handleResult: function(results) {
+      handleResult: function(aResults) {
         let row = null;
-        while (row = results.getNextRow())
+        while (row = aResults.getNextRow())
           addons.push(XPIDatabase.makeAddonFromRowAsync(row));
       },
 
       handleError: asyncErrorLogger,
 
-      handleCompletion: function(reason) {
+      handleCompletion: function(aReason) {
         let pos = 0;
         function readNextAddon() {
           if (pos < addons.length)
             XPIDatabase.fetchAddonMetadata(addons[pos++], readNextAddon);
           else
-            callback(addons);
+            aCallback(addons);
         }
 
         readNextAddon();
       }
     });
   },
 
   /**
    * Synchronously gets all add-ons of a particular type.
    *
-   * @param   type
-   *          The type of add-on to retrieve
-   * @return  an array of DBAddonInternals
+   * @param  aType
+   *         The type of add-on to retrieve
+   * @return an array of DBAddonInternals
    */
-  getAddonsByType: function XPIDB_getAddonsByType(type) {
+  getAddonsByType: function XPIDB_getAddonsByType(aType) {
     let stmt = this.getStatement("getAddonsByType");
 
-    stmt.params.type = type;
+    stmt.params.type = aType;
     return [this.makeAddonFromRow(row) for each (row in resultRows(stmt))];;
   },
 
   /**
    * Asynchronously gets all add-ons with pending operations.
    *
-   * @param   types
-   *          The types of add-ons to retrieve or null to get all types
-   * @param   callback
-   *          A callback to pass the array of DBAddonInternal to
+   * @param  aTypes
+   *         The types of add-ons to retrieve or null to get all types
+   * @param  aCallback
+   *         A callback to pass the array of DBAddonInternal to
    */
   getVisibleAddonsWithPendingOperations:
-    function XPIDB_getVisibleAddonsWithPendingOperations(types, callback) {
+    function XPIDB_getVisibleAddonsWithPendingOperations(aTypes, aCallback) {
     let stmt = null;
-    if (!types || types.length == 0) {
+    if (!aTypes || aTypes.length == 0) {
       stmt = this.getStatement("getVisibleAddonsWithPendingOperations");
     }
     else {
       let sql = "SELECT * FROM addon WHERE visible=1 AND " +
                 "(pendingUninstall=1 OR MAX(userDisabled,appDisabled)=active) " +
                 "AND type IN (";
-      for (let i = 1; i <= types.length; i++) {
+      for (let i = 1; i <= aTypes.length; i++) {
         sql += "?" + i;
-        if (i < types.length)
+        if (i < aTypes.length)
           sql += ",";
       }
       sql += ")";
 
       // Note that binding to index 0 sets the value for the ?1 parameter
       stmt = this.getStatement("getVisibleAddonsWithPendingOperations_" +
-                               types.length, sql);
-      for (let i = 0; i < types.length; i++)
-        stmt.bindStringParameter(i, types[i]);
+                               aTypes.length, sql);
+      for (let i = 0; i < aTypes.length; i++)
+        stmt.bindStringParameter(i, aTypes[i]);
     }
 
     let addons = [];
     stmt.executeAsync({
-      handleResult: function(results) {
+      handleResult: function(aResults) {
         let row = null;
-        while (row = results.getNextRow())
+        while (row = aResults.getNextRow())
           addons.push(XPIDatabase.makeAddonFromRowAsync(row));
       },
 
       handleError: asyncErrorLogger,
 
-      handleCompletion: function(reason) {
+      handleCompletion: function(aReason) {
         let pos = 0;
         function readNextAddon() {
           if (pos < addons.length)
             XPIDatabase.fetchAddonMetadata(addons[pos++], readNextAddon);
           else
-            callback(addons);
+            aCallback(addons);
         }
 
         readNextAddon();
       }
     });
   },
 
   /**
@@ -2941,212 +2946,210 @@ var XPIDatabase = {
     let stmt = this.getStatement("getAddons");
 
     return [this.makeAddonFromRow(row) for each (row in resultRows(stmt))];;
   },
 
   /**
    * Synchronously adds an AddonInternal's metadata to the database.
    *
-   * @param   addon
-   *          AddonInternal to add
-   * @param   descriptor
-   *          The file descriptor of the add-on's directory
+   * @param  aAddon
+   *         AddonInternal to add
+   * @param  aDescriptor
+   *         The file descriptor of the add-on's directory
    */
-  addAddonMetadata: function XPIDB_addAddonMetadata(addon, descriptor) {
+  addAddonMetadata: function XPIDB_addAddonMetadata(aAddon, aDescriptor) {
     let localestmt = this.getStatement("addAddonMetadata_locale");
     let stringstmt = this.getStatement("addAddonMetadata_strings");
 
-    function insertLocale(locale) {
-      copyProperties(locale, PROP_LOCALE_SINGLE, localestmt.params);
+    function insertLocale(aLocale) {
+      copyProperties(aLocale, PROP_LOCALE_SINGLE, localestmt.params);
       localestmt.execute();
       let row = XPIDatabase.connection.lastInsertRowID;
 
-      PROP_LOCALE_MULTI.forEach(function(prop) {
-        locale[prop].forEach(function(str) {
+      PROP_LOCALE_MULTI.forEach(function(aProp) {
+        aLocale[aProp].forEach(function(aStr) {
           stringstmt.params.locale = row;
-          stringstmt.params.type = prop;
-          stringstmt.params.value = str;
+          stringstmt.params.type = aProp;
+          stringstmt.params.value = aStr;
           stringstmt.execute();
         });
       });
       return row;
     }
 
-    if (addon.visible) {
+    if (aAddon.visible) {
       let stmt = this.getStatement("clearVisibleAddons");
-      stmt.params.id = addon.id;
+      stmt.params.id = aAddon.id;
       stmt.execute();
     }
 
     let stmt = this.getStatement("addAddonMetadata_addon");
 
-    stmt.params.locale = insertLocale(addon.defaultLocale);
-    stmt.params.location = addon._installLocation.name;
-    stmt.params.descriptor = descriptor;
-    stmt.params.installDate = addon.installDate;
-    stmt.params.updateDate = addon.updateDate;
-    copyProperties(addon, PROP_METADATA, stmt.params);
-    ["visible", "userDisabled", "appDisabled"].forEach(function(prop) {
-      stmt.params[prop] = addon[prop] ? 1 : 0;
+    stmt.params.locale = insertLocale(aAddon.defaultLocale);
+    stmt.params.location = aAddon._installLocation.name;
+    stmt.params.descriptor = aDescriptor;
+    stmt.params.installDate = aAddon.installDate;
+    stmt.params.updateDate = aAddon.updateDate;
+    copyProperties(aAddon, PROP_METADATA, stmt.params);
+    ["visible", "userDisabled", "appDisabled"].forEach(function(aProp) {
+      stmt.params[aProp] = aAddon[aProp] ? 1 : 0;
     });
-    stmt.params.active = (addon.visible && !addon.userDisabled &&
-                          !addon.appDisabled) ? 1 : 0;
+    stmt.params.active = (aAddon.visible && !aAddon.userDisabled &&
+                          !aAddon.appDisabled) ? 1 : 0;
     stmt.execute();
     let internal_id = this.connection.lastInsertRowID;
 
     stmt = this.getStatement("addAddonMetadata_addon_locale");
-    addon.locales.forEach(function(locale) {
-      let id = insertLocale(locale);
-      locale.locales.forEach(function(name) {
+    aAddon.locales.forEach(function(aLocale) {
+      let id = insertLocale(aLocale);
+      aLocale.locales.forEach(function(aName) {
         stmt.params.internal_id = internal_id;
-        stmt.params.name = name;
-        stmt.params.locale = insertLocale(locale);
+        stmt.params.name = aName;
+        stmt.params.locale = insertLocale(aLocale);
         stmt.execute();
       });
     });
 
     stmt = this.getStatement("addAddonMetadata_targetApplication");
 
-    addon.targetApplications.forEach(function(app) {
+    aAddon.targetApplications.forEach(function(aApp) {
       stmt.params.internal_id = internal_id;
-      stmt.params.id = app.id;
-      stmt.params.minVersion = app.minVersion;
-      stmt.params.maxVersion = app.maxVersion;
+      stmt.params.id = aApp.id;
+      stmt.params.minVersion = aApp.minVersion;
+      stmt.params.maxVersion = aApp.maxVersion;
       stmt.execute();
     });
   },
 
   /**
    * Synchronously updates an add-ons metadata in the database. Currently just
    * removes and recreates.
    *
-   * @param   oldAddon
-   *          The DBAddonInternal to be replaced
-   * @param   newAddon
-   *          The new AddonInternal to add
-   * @param   descriptor
-   *          The file descriptor of the add-on's directory
+   * @param  aOldAddon
+   *         The DBAddonInternal to be replaced
+   * @param  aNewAddon
+   *         The new AddonInternal to add
+   * @param  aDescriptor
+   *         The file descriptor of the add-on's directory
    */
-  updateAddonMetadata: function XPIDB_updateAddonMetadata(oldAddon, newAddon,
-                                                          descriptor) {
-    this.removeAddonMetadata(oldAddon);
-    this.addAddonMetadata(newAddon, descriptor);
+  updateAddonMetadata: function XPIDB_updateAddonMetadata(aOldAddon, aNewAddon,
+                                                          aDescriptor) {
+    this.removeAddonMetadata(aOldAddon);
+    this.addAddonMetadata(aNewAddon, aDescriptor);
   },
 
   /**
    * Synchronously updates the target application entries for an add-on.
    *
-   * @param   addon
-   *          The DBAddonInternal being updated
-   * @param   targets
-   *          The array of target applications to update
+   * @param  aAddon
+   *         The DBAddonInternal being updated
+   * @param  aTargets
+   *         The array of target applications to update
    */
-  updateTargetApplications: function XPIDB_updateTargetApplications(addon,
-                                                                    targets) {
+  updateTargetApplications: function XPIDB_updateTargetApplications(aAddon,
+                                                                    aTargets) {
     let stmt = this.getStatement("updateTargetApplications");
-    targets.forEach(function(target) {
-      stmt.params.internal_id = addon._internal_id;
-      stmt.params.id = target.id;
-      stmt.params.minVersion = target.minVersion;
-      stmt.params.maxVersion = target.maxVersion;
+    aTargets.forEach(function(aTarget) {
+      stmt.params.internal_id = aAddon._internal_id;
+      stmt.params.id = aTarget.id;
+      stmt.params.minVersion = aTarget.minVersion;
+      stmt.params.maxVersion = aTarget.maxVersion;
       stmt.execute();
     });
   },
 
   /**
    * Synchronously removes an add-on from the database.
    *
-   * @param   addon
-   *          The DBAddonInternal being removed
+   * @param  aAddon
+   *         The DBAddonInternal being removed
    */
-  removeAddonMetadata: function XPIDB_removeAddonMetadata(addon) {
+  removeAddonMetadata: function XPIDB_removeAddonMetadata(aAddon) {
     let stmt = this.getStatement("removeAddonMetadata");
-    stmt.params.internal_id = addon._internal_id;
+    stmt.params.internal_id = aAddon._internal_id;
     stmt.execute();
   },
 
   /**
    * Synchronously marks a DBAddonInternal as visible marking all other
    * instances with the same ID as not visible.
    *
-   * @param   addon
-   *          The DBAddonInternal to make visible
-   * @param   locations
-   *          The name of the install location
-   * @param   callback
-   *          A callback to pass the DBAddonInternal to
+   * @param  aAddon
+   *         The DBAddonInternal to make visible
+   * @param  callback
+   *         A callback to pass the DBAddonInternal to
    */
-  makeAddonVisible: function XPIDB_makeAddonVisible(addon) {
+  makeAddonVisible: function XPIDB_makeAddonVisible(aAddon) {
     let stmt = this.getStatement("clearVisibleAddons");
-    stmt.params.id = addon.id;
+    stmt.params.id = aAddon.id;
     stmt.execute();
 
     stmt = this.getStatement("makeAddonVisible");
-    stmt.params.internal_id = addon._internal_id;
+    stmt.params.internal_id = aAddon._internal_id;
     stmt.execute();
 
-    addon.visible = true;
+    aAddon.visible = true;
   },
 
   /**
    * Synchronously sets properties for an add-on.
    *
-   * @param   addon
-   *          The DBAddonInternal being updated
-   * @param   properties
-   *          A dictionary of properties to set
+   * @param  aAddon
+   *         The DBAddonInternal being updated
+   * @param  aProperties
+   *         A dictionary of properties to set
    */
-  setAddonProperties: function XPIDB_setAddonProperties(addon, properties) {
+  setAddonProperties: function XPIDB_setAddonProperties(aAddon, aProperties) {
     function convertBoolean(value) {
       return value ? 1 : 0;
     }
 
     let stmt = this.getStatement("setAddonProperties");
-    stmt.params.internal_id = addon._internal_id;
-
-    if ("userDisabled" in properties) {
-      stmt.params.userDisabled = convertBoolean(properties.userDisabled);
-      addon.userDisabled = properties.userDisabled;
+    stmt.params.internal_id = aAddon._internal_id;
+
+    if ("userDisabled" in aProperties) {
+      stmt.params.userDisabled = convertBoolean(aProperties.userDisabled);
+      aAddon.userDisabled = aProperties.userDisabled;
     }
     else {
-      stmt.params.userDisabled = convertBoolean(addon.userDisabled);
+      stmt.params.userDisabled = convertBoolean(aAddon.userDisabled);
     }
 
-    if ("appDisabled" in properties) {
-      stmt.params.appDisabled = convertBoolean(properties.appDisabled);
-      addon.appDisabled = properties.appDisabled;
+    if ("appDisabled" in aProperties) {
+      stmt.params.appDisabled = convertBoolean(aProperties.appDisabled);
+      aAddon.appDisabled = aProperties.appDisabled;
     }
     else {
-      stmt.params.appDisabled = convertBoolean(addon.appDisabled);
+      stmt.params.appDisabled = convertBoolean(aAddon.appDisabled);
     }
 
-    if ("pendingUninstall" in properties) {
-      stmt.params.pendingUninstall = convertBoolean(properties.pendingUninstall);
-      addon.pendingUninstall = properties.pendingUninstall;
+    if ("pendingUninstall" in aProperties) {
+      stmt.params.pendingUninstall = convertBoolean(aProperties.pendingUninstall);
+      aAddon.pendingUninstall = aProperties.pendingUninstall;
     }
     else {
-      stmt.params.pendingUninstall = convertBoolean(addon.pendingUninstall);
+      stmt.params.pendingUninstall = convertBoolean(aAddon.pendingUninstall);
     }
 
     stmt.execute();
   },
 
   /**
    * Synchronously pdates an add-on's active flag in the database.
    *
-   * @param   addon
-   *          The DBAddonInternal to update
+   * @param  aAddon
+   *         The DBAddonInternal to update
    */
-  updateAddonActive: function XPIDB_updateAddonActive(addon) {
+  updateAddonActive: function XPIDB_updateAddonActive(aAddon) {
     LOG("Updating add-on state");
 
     stmt = this.getStatement("deactivateThemes");
-    stmt.params.internal_id = addon._internal_id;
-    stmt.params.active = addon.active ? 1 : 0;
+    stmt.params.internal_id = aAddon._internal_id;
+    stmt.params.active = aAddon.active ? 1 : 0;
     stmt.execute();
   },
 
   /**
    * Synchronously calculates and updates all the active flags in the database.
    */
   updateActiveAddons: function XPIDB_updateActiveAddons() {
     LOG("Updating add-on states");
@@ -3194,53 +3197,53 @@ var XPIDatabase = {
     Services.prefs.setCharPref(PREF_EM_ENABLED_ADDONS, enabledAddons.join(","));
   }
 };
 
 /**
  * Instantiates an AddonInstall and passes the new object to a callback when
  * it is complete.
  *
- * @param   callback
- *          The callback to pass the AddonInstall to
- * @param   installLocation
- *          The install location the add-on will be installed into
- * @param   url
- *          The nsIURL to get the add-on from. If this is an nsIFileURL then
- *          the add-on will not need to be downloaded
- * @param   hash
- *          An optional hash for the add-on
- * @param   name
- *          An optional name for the add-on
- * @param   type
- *          An optional type for the add-on
- * @param   iconURL
- *          An optional icon for the add-on
- * @param   version
- *          An optional version for the add-on
- * @param   infoURL
- *          An optional URL of release notes for the add-on
- * @param   existingAddon
- *          The add-on this install will update if known
- * @param   loadGroup
- *          The nsILoadGroup to associate any requests with
- * @throws  if the url is the url of a local file and the hash does not match
- *          or the add-on does not contain an valid install manifest
+ * @param  aCallback
+ *         The callback to pass the AddonInstall to
+ * @param  aInstallLocation
+ *         The install location the add-on will be installed into
+ * @param  aUrl
+ *         The nsIURL to get the add-on from. If this is an nsIFileURL then
+ *         the add-on will not need to be downloaded
+ * @param  aHash
+ *         An optional hash for the add-on
+ * @param  aName
+ *         An optional name for the add-on
+ * @param  aType
+ *         An optional type for the add-on
+ * @param  aIconURL
+ *         An optional icon for the add-on
+ * @param  aVersion
+ *         An optional version for the add-on
+ * @param  aInfoURL
+ *         An optional URL of release notes for the add-on
+ * @param  aExistingAddon
+ *         The add-on this install will update if known
+ * @param  aLoadGroup
+ *         The nsILoadGroup to associate any requests with
+ * @throws if the url is the url of a local file and the hash does not match
+ *         or the add-on does not contain an valid install manifest
  */
-function AddonInstall(callback, installLocation, url, hash, name, type, iconURL,
-                      version, infoURL, existingAddon, loadGroup) {
+function AddonInstall(aCallback, aInstallLocation, aUrl, aHash, aName, aType,
+                      aIconURL, aVersion, aInfoURL, aExistingAddon, aLoadGroup) {
   this.wrapper = new AddonInstallWrapper(this);
-  this.installLocation = installLocation;
-  this.sourceURL = url;
-  this.loadGroup = loadGroup;
+  this.installLocation = aInstallLocation;
+  this.sourceURL = aUrl;
+  this.loadGroup = aLoadGroup;
   this.listeners = [];
-  this.existingAddon = existingAddon;
-
-  if (url instanceof Ci.nsIFileURL) {
-    this.file = url.file.QueryInterface(Ci.nsILocalFile);
+  this.existingAddon = aExistingAddon;
+
+  if (aUrl instanceof Ci.nsIFileURL) {
+    this.file = aUrl.file.QueryInterface(Ci.nsILocalFile);
     this.state = AddonManager.STATE_DOWNLOADED;
     this.progress = this.file.fileSize;
     this.maxProgress = this.file.fileSize;
 
     if (this.hash) {
       let crypto = Cc["@mozilla.org/security/hash;1"].
                    createInstance(Ci.nsICryptoHash);
       let fis = Cc["@mozilla.org/network/file-input-stream;1"].
@@ -3254,57 +3257,58 @@ function AddonInstall(callback, installL
 
     this.loadManifest();
     this.name = this.addon.selectedLocale.name;
     this.type = this.addon.type;
     this.version = this.addon.version;
     this.iconURL = this.addon.iconURL;
 
     let self = this;
-    XPIDatabase.getVisibleAddonForID(this.addon.id, function(addon) {
-      self.existingAddon = addon;
+    XPIDatabase.getVisibleAddonForID(this.addon.id, function(aAddon) {
+      self.existingAddon = aAddon;
 
       if (!self.addon.isCompatible) {
         // TODO Should we send some event here?
-        this.state = AddonManager.STATE_CHECKING;
+        self.state = AddonManager.STATE_CHECKING;
         new UpdateChecker(self.addon, {
-          onUpdateFinished: function(addon) {
+          onUpdateFinished: function(aAddon) {
+            self.state = AddonManager.STATE_DOWNLOADED;
             XPIProvider.installs.push(self);
             AddonManagerPrivate.callInstallListeners("onNewInstall",
                                                      self.listeners,
                                                      self.wrapper);
 
-            callback(self);
+            aCallback(self);
           }
         }, AddonManager.UPDATE_WHEN_ADDON_INSTALLED);
       }
       else {
         XPIProvider.installs.push(self);
         AddonManagerPrivate.callInstallListeners("onNewInstall", self.listeners,
                                                  self.wrapper);
 
-        callback(self);
+        aCallback(self);
       }
     });
   }
   else {
     this.state = AddonManager.STATE_AVAILABLE;
-    this.name = name;
-    this.type = type;
-    this.version = version;
-    this.iconURL = iconURL;
+    this.name = aName;
+    this.type = aType;
+    this.version = aVersion;
+    this.iconURL = aIconURL;
     this.progress = 0;
     this.maxProgress = -1;
-    this.hash = hash;
+    this.hash = aHash;
 
     XPIProvider.installs.push(this);
     AddonManagerPrivate.callInstallListeners("onNewInstall", this.listeners,
                                              this.wrapper);
 
-    callback(this);
+    aCallback(this);
   }
 }
 
 AddonInstall.prototype = {
   installLocation: null,
   wrapper: null,
   stream: null,
   crypto: null,
@@ -3328,17 +3332,17 @@ AddonInstall.prototype = {
   state: null,
   progress: null,
   maxProgress: null,
 
   /**
    * Starts installation of this add-on from whatever state it is currently at
    * if possible.
    *
-   * @throws  if installation cannot proceed from the current state
+   * @throws if installation cannot proceed from the current state
    */
   install: function AI_install() {
     switch (this.state) {
     case AddonManager.STATE_AVAILABLE:
       this.startDownload();
       break;
     case AddonManager.STATE_DOWNLOADED:
       this.startInstall();
@@ -3351,17 +3355,17 @@ AddonInstall.prototype = {
     default:
       throw new Error("Cannot start installing from this state");
     }
   },
 
   /**
    * Cancels installation of this add-on.
    *
-   * @throws  if installation cannot be cancelled from the current state
+   * @throws if installation cannot be cancelled from the current state
    */
   cancel: function AI_cancel() {
     switch (this.state) {
     case AddonManager.STATE_DOWNLOADING:
       this.channel.cancel(Cr.NS_BINDING_ABORTED);
     case AddonManager.STATE_AVAILABLE:
     case AddonManager.STATE_DOWNLOADED:
       LOG("Cancelling download of " + this.sourceURL.spec);
@@ -3391,42 +3395,42 @@ AddonInstall.prototype = {
       throw new Error("Cannot cancel from this state");
     }
   },
 
   /**
    * Adds an InstallListener for this instance if the listener is not already
    * registered.
    *
-   * @param   listener
-   *          The InstallListener to add
+   * @param  aListener
+   *         The InstallListener to add
    */
-  addListener: function AI_addListener(listener) {
-    if (!this.listeners.some(function(i) { return i == listener; }))
-      this.listeners.push(listener);
+  addListener: function AI_addListener(aListener) {
+    if (!this.listeners.some(function(i) { return i == aListener; }))
+      this.listeners.push(aListener);
   },
 
   /**
    * Removes an InstallListener for this instance if it is registered.
    *
-   * @param   listener
-   *          The InstallListener to remove
+   * @param  aListener
+   *         The InstallListener to remove
    */
-  removeListener: function AI_removeListener(listener) {
+  removeListener: function AI_removeListener(aListener) {
     this.listeners = this.listeners.filter(function(i) {
-      return i != listener;
+      return i != aListener;
     });
   },
 
   /**
    * Called after the add-on is a local file and the signature and install
    * manifest can be read.
    *
-   * @throws  if the add-on does not contain a valid install manifest or the
-   *          XPI is incorrectly signed
+   * @throws if the add-on does not contain a valid install manifest or the
+   *         XPI is incorrectly signed
    */
   loadManifest: function AI_loadManifest() {
     let zipreader = Cc["@mozilla.org/libjar/zip-reader;1"].
                     createInstance(Ci.nsIZipReader);
     zipreader.open(this.file);
 
     try {
       let principal = zipreader.getCertificatePrincipal(null);
@@ -3467,17 +3471,17 @@ AddonInstall.prototype = {
         zis.close();
       }
     }
     finally {
       zipreader.close();
     }
   },
 
-  observe: function AI_observe(subject, topic, data) {
+  observe: function AI_observe(aSubject, aTopic, aData) {
     // Network is going offline
     this.cancel();
   },
 
   /**
    * Starts downloading the add-on's XPI file.
    */
   startDownload: function AI_startDownload() {
@@ -3552,70 +3556,70 @@ AddonInstall.prototype = {
     }
   },
 
   /**
    * Update the crypto hasher with the new data and call the progress listeners.
    *
    * @see nsIStreamListener
    */
-  onDataAvailable: function AI_onDataAvailable(request, context, inputstream,
-                                               offset, count) {
-    this.crypto.updateFromStream(inputstream, count);
-    this.progress += count;
+  onDataAvailable: function AI_onDataAvailable(aRequest, aContext, aInputstream,
+                                               aOffset, aCount) {
+    this.crypto.updateFromStream(aInputstream, aCount);
+    this.progress += aCount;
     if (!AddonManagerPrivate.callInstallListeners("onDownloadProgress",
                                                   this.listeners, this.wrapper)) {
       // TODO cancel the download and make it available again (bug 553024)
     }
   },
 
   /**
    * This is the first chance to get at real headers on the channel.
    *
    * @see nsIStreamListener
    */
-  onStartRequest: function AI_onStartRequest(request, context) {
+  onStartRequest: function AI_onStartRequest(aRequest, aContext) {
     // We must remove the request from the load group otherwise if the user
     // closes the page that triggered it the download will be cancelled
     if (this.loadGroup)
-      this.loadGroup.removeRequest(request, null, Cr.NS_BINDING_RETARGETED);
+      this.loadGroup.removeRequest(aRequest, null, Cr.NS_BINDING_RETARGETED);
 
     this.progress = 0;
-    if (request instanceof Ci.nsIChannel) {
+    if (aRequest instanceof Ci.nsIChannel) {
       try {
-        this.maxProgress = request.contentLength;
+        this.maxProgress = aRequest.contentLength;
       }
       catch (e) {
       }
       LOG("Download started for " + this.sourceURL.spec + " to file " +
           this.file.path);
     }
   },
 
   /**
    * The download is complete.
    *
    * @see nsIStreamListener
    */
-  onStopRequest: function AI_onStopRequest(request, context, status) {
+  onStopRequest: function AI_onStopRequest(aRequest, aContext, aStatus) {
     this.stream.close();
     this.channel = null;
     Services.obs.removeObserver(this, "network:offline-about-to-go-offline");
 
     // If the download was cancelled then all events will have already been sent
-    if (status == Cr.NS_BINDING_ABORTED)
+    if (aStatus == Cr.NS_BINDING_ABORTED)
       return;
 
     LOG("Download of " + this.sourceURL.spec + " completed.");
 
-    if (Components.isSuccessCode(status)) {
-      if (!(request instanceof Ci.nsIHttpChannel) || request.requestSucceeded) {
-        if (!this.hash && (request instanceof Ci.nsIChannel)) {
+    if (Components.isSuccessCode(aStatus)) {
+      if (!(aRequest instanceof Ci.nsIHttpChannel) || aRequest.requestSucceeded) {
+        if (!this.hash && (aRequest instanceof Ci.nsIChannel)) {
           try {
-            checkCert(request);
+            checkCert(aRequest);
           }
           catch (e) {
             this.downloadFailed(AddonManager.ERROR_NETWORK_FAILURE, e);
             return;
           }
         }
 
         // return the two-digit hexadecimal code for a byte
@@ -3642,64 +3646,64 @@ AddonInstall.prototype = {
           if (this.addon.isCompatible) {
             this.downloadCompleted();
           }
           else {
             // TODO Should we send some event here (bug 557716)?
             this.state = AddonManager.STATE_CHECKING;
             let self = this;
             new UpdateChecker(this.addon, {
-              onUpdateFinished: function(addon) {
+              onUpdateFinished: function(aAddon) {
                 self.downloadCompleted();
               }
             }, AddonManager.UPDATE_WHEN_ADDON_INSTALLED);
           }
         }
         catch (e) {
           this.downloadFailed(AddonManager.ERROR_CORRUPT_FILE, e);
         }
       }
       else {
-        if (request instanceof Ci.nsIHttpChannel)
+        if (aRequest instanceof Ci.nsIHttpChannel)
           this.downloadFailed(AddonManager.ERROR_NETWORK_FAILURE,
-                              request.responseStatus + " " +
-                              request.responseStatusText);
+                              aRequest.responseStatus + " " +
+                              aRequest.responseStatusText);
         else
-          this.downloadFailed(AddonManager.ERROR_NETWORK_FAILURE, status);
+          this.downloadFailed(AddonManager.ERROR_NETWORK_FAILURE, aStatus);
       }
     }
     else {
-      this.downloadFailed(AddonManager.ERROR_NETWORK_FAILURE, status);
+      this.downloadFailed(AddonManager.ERROR_NETWORK_FAILURE, aStatus);
     }
   },
 
   /**
    * Notify listeners that the download failed.
    *
-   * @param   reason
-   *          Something to log about the failure
-   * @param   error
-   *          The error code to pass to the listeners
+   * @param  aReason
+   *         Something to log about the failure
+   * @param  error
+   *         The error code to pass to the listeners
    */
-  downloadFailed: function(reason, error) {
-    WARN("Download failed: " + error + "\n");
+  downloadFailed: function(aReason, aError) {
+    WARN("Download failed: " + aError + "\n");
     this.state = AddonManager.STATE_DOWNLOAD_FAILED;
     XPIProvider.removeActiveInstall(this);
     AddonManagerPrivate.callInstallListeners("onDownloadFailed", this.listeners,
-                                             this.wrapper, reason);
+                                             this.wrapper, aReason);
     this.file.remove(true);
   },
 
   /**
    * Notify listeners that the download completed.
    */
   downloadCompleted: function() {
     let self = this;
-    XPIDatabase.getVisibleAddonForID(this.addon.id, function(addon) {
-      self.existingAddon = addon;
+    XPIDatabase.getVisibleAddonForID(this.addon.id, function(aAddon) {
+      self.existingAddon = aAddon;
       self.state = AddonManager.STATE_DOWNLOADED;
       if (AddonManagerPrivate.callInstallListeners("onDownloadEnded",
                                                    self.listeners,
                                                    self.wrapper))
         self.install();
     });
   },
 
@@ -3862,202 +3866,204 @@ AddonInstall.prototype = {
     }
   }
 }
 
 /**
  * Creates a new AddonInstall to install an add-on from a local file. Installs
  * always go into the profile install location.
  *
- * @param   callback
- *          The callback to pass the new AddonInstall to
- * @param   file
- *          The file to install
+ * @param  aCallback
+ *         The callback to pass the new AddonInstall to
+ * @param  aFile
+ *         The file to install
  */
-AddonInstall.createInstall = function(callback, file) {
+AddonInstall.createInstall = function(aCallback, aFile) {
   let location = XPIProvider.installLocationsByName[KEY_APP_PROFILE];
-  let url = Services.io.newFileURI(file);
+  let url = Services.io.newFileURI(aFile);
 
   try {
-    new AddonInstall(callback, location, url);
+    new AddonInstall(aCallback, location, url);
   }
   catch(e) {
-    callback(null);
+    ERROR(e);
+    aCallback(null);
   }
 };
 
 /**
  * Creates a new AddonInstall to download and install a URL.
  *
- * @param   callback
- *          The callback to pass the new AddonInstall to
- * @param   uri
- *          The URI to download
- * @param   hash
- *          A hash for the add-on
- * @param   name
- *          A name for the add-on
- * @param   iconURL
- *          An icon URL for the add-on
- * @param   version
- *          A version for the add-on
- * @param   loadGroup
- *          An nsILoadGroup to associate the download with
+ * @param  aCallback
+ *         The callback to pass the new AddonInstall to
+ * @param  aUri
+ *         The URI to download
+ * @param  aHash
+ *         A hash for the add-on
+ * @param  aName
+ *         A name for the add-on
+ * @param  aIconURL
+ *         An icon URL for the add-on
+ * @param  aVersion
+ *         A version for the add-on
+ * @param  aLoadGroup
+ *         An nsILoadGroup to associate the download with
  */
-AddonInstall.createDownload = function(callback, uri, hash, name, iconURL,
-                                       version, loadGroup) {
+AddonInstall.createDownload = function(aCallback, aUri, aHash, aName, aIconURL,
+                                       aVersion, aLoadGroup) {
   let location = XPIProvider.installLocationsByName[KEY_APP_PROFILE];
-  let url = NetUtil.newURI(uri);
-  new AddonInstall(callback, location, url, hash, name, null,
-                   iconURL, version, null, null, loadGroup);
+  let url = NetUtil.newURI(aUri);
+  new AddonInstall(aCallback, location, url, aHash, aName, null,
+                   aIconURL, aVersion, null, null, aLoadGroup);
 };
 
 /**
  * Creates a new AddonInstall for an update.
  *
- * @param   callback
- *          The callback to pass the new AddonInstall to
- * @param   addon
- *          The add-on being updated
- * @param   update
- *          The metadata about the new version from the update manifest
+ * @param  aCallback
+ *         The callback to pass the new AddonInstall to
+ * @param  aAddon
+ *         The add-on being updated
+ * @param  aUpdate
+ *         The metadata about the new version from the update manifest
  */
-AddonInstall.createUpdate = function(callback, addon, update) {
-  let url = NetUtil.newURI(update.updateURL);
+AddonInstall.createUpdate = function(aCallback, aAddon, aUpdate) {
+  let url = NetUtil.newURI(aUpdate.updateURL);
   let infoURL = null;
-  if (update.updateInfoURL)
-    infoURL = escapeAddonURI(addon, update.updateInfoURL);
-  new AddonInstall(callback, addon._installLocation, url, update.updateHash,
-                   addon.selectedLocale.name, addon.type,
-                   addon.iconURL, update.version, infoURL, addon);
+  if (aUpdate.updateInfoURL)
+    infoURL = escapeAddonURI(aAddon, aUpdate.updateInfoURL);
+  new AddonInstall(aCallback, aAddon._installLocation, url, aUpdate.updateHash,
+                   aAddon.selectedLocale.name, aAddon.type,
+                   aAddon.iconURL, aUpdate.version, infoURL, aAddon);
 };
 
 /**
  * Creates a wrapper for an AddonInstall that only exposes the public API
  *
- * @param   install
- *          The AddonInstall to create a wrapper for
+ * @param  install
+ *         The AddonInstall to create a wrapper for
  */
-function AddonInstallWrapper(install) {
+function AddonInstallWrapper(aInstall) {
   ["name", "type", "version", "iconURL", "infoURL", "file", "state", "progress",
-   "maxProgress", "certificate", "certName"].forEach(function(prop) {
-    this.__defineGetter__(prop, function() install[prop]);
+   "maxProgress", "certificate", "certName"].forEach(function(aProp) {
+    this.__defineGetter__(aProp, function() aInstall[aProp]);
   }, this);
 
   this.__defineGetter__("existingAddon", function() {
-    return createWrapper(install.existingAddon);
+    return createWrapper(aInstall.existingAddon);
   });
-  this.__defineGetter__("addon", function() createWrapper(install.addon));
-  this.__defineGetter__("sourceURL", function() install.sourceURL.spec);
+  this.__defineGetter__("addon", function() createWrapper(aInstall.addon));
+  this.__defineGetter__("sourceURL", function() aInstall.sourceURL.spec);
 
   this.install = function() {
-    install.install();
+    aInstall.install();
   }
 
   this.cancel = function() {
-    install.cancel();
+    aInstall.cancel();
   }
 
   this.addListener = function(listener) {
-    install.addListener(listener);
+    aInstall.addListener(listener);
   }
 
   this.removeListener = function(listener) {
-    install.removeListener(listener);
+    aInstall.removeListener(listener);
   }
 }
 
 AddonInstallWrapper.prototype = {};
 
 /**
  * Creates a new update checker.
  *
- * @param   addon
- *          The add-on to check for updates
- * @param   listener
- *          An UpdateListener to notify of updates
- * @param   reason
- *          The reason for the update check
- * @param   appVersion
- *          An optional application version to check for updates for
- * @param   platformVersion
- *          An optional platform version to check for updates for
- * @throws  if the listener or reason arguments are not valid
+ * @param  aAddon
+ *         The add-on to check for updates
+ * @param  aListener
+ *         An UpdateListener to notify of updates
+ * @param  aReason
+ *         The reason for the update check
+ * @param  aAppVersion
+ *         An optional application version to check for updates for
+ * @param  aPlatformVersion
+ *         An optional platform version to check for updates for
+ * @throws if the aListener or aReason arguments are not valid
  */
-function UpdateChecker(addon, listener, reason, appVersion, platformVersion) {
-  if (!listener || !reason)
+function UpdateChecker(aAddon, aListener, aReason, aAppVersion, aPlatformVersion) {
+  if (!aListener || !aReason)
     throw Cr.NS_ERROR_INVALID_ARG;
 
   Components.utils.import("resource://gre/modules/AddonUpdateChecker.jsm");
 
-  this.addon = addon;
-  this.listener = listener;
-  this.appVersion = appVersion;
-  this.platformVersion = platformVersion;
-  this.syncCompatibility = (reason == AddonManager.UPDATE_WHEN_NEW_APP_INSTALLED);
-
-  let updateURL = addon.updateURL ? addon.updateURL :
-                                    Services.prefs.getCharPref(PREF_EM_UPDATE_URL);
+  this.addon = aAddon;
+  this.listener = aListener;
+  this.appVersion = aAppVersion;
+  this.platformVersion = aPlatformVersion;
+  this.syncCompatibility = (aReason == AddonManager.UPDATE_WHEN_NEW_APP_INSTALLED);
+
+  let updateURL = aAddon.updateURL ? aAddon.updateURL :
+                                     Services.prefs.getCharPref(PREF_EM_UPDATE_URL);
 
   const UPDATE_TYPE_COMPATIBILITY = 32;
   const UPDATE_TYPE_NEWVERSION = 64;
 
-  reason |= UPDATE_TYPE_COMPATIBILITY;
+  aReason |= UPDATE_TYPE_COMPATIBILITY;
   if ("onUpdateAvailable" in this.listener)
-    reason |= UPDATE_TYPE_NEWVERSION;
-
-  let url = escapeAddonURI(addon, updateURL, reason, appVersion);
-  AddonUpdateChecker.checkForUpdates(addon.id, addon.type, addon.updateKey, url, this);
+    aReason |= UPDATE_TYPE_NEWVERSION;
+
+  let url = escapeAddonURI(aAddon, updateURL, aReason, aAppVersion);
+  AddonUpdateChecker.checkForUpdates(aAddon.id, aAddon.type, aAddon.updateKey,
+                                     url, this);
 }
 
 UpdateChecker.prototype = {
   addon: null,
   listener: null,
   appVersion: null,
   platformVersion: null,
   syncCompatibility: null,
 
   /**
    * Called when AddonUpdateChecker completes the update check
    *
    * @param   updates
    *          The list of update details for the add-on
    */
-  onUpdateCheckComplete: function UC_onUpdateCheckComplete(updates) {
+  onUpdateCheckComplete: function UC_onUpdateCheckComplete(aUpdates) {
     let AUC = AddonUpdateChecker;
 
     // Always apply any compatibility update for the current version
-    let compatUpdate = AUC.getCompatibilityUpdate(updates, this.addon.version,
+    let compatUpdate = AUC.getCompatibilityUpdate(aUpdates, this.addon.version,
                                                   this.syncCompatibility);
 
     // Apply the compatibility update to the database
     if (compatUpdate)
       this.addon.applyCompatibilityUpdate(compatUpdate, this.syncCompatibility);
 
     // If the request is for an application or platform version that is
     // different to the current application or platform version then look for a
     // compatibility update for those versions.
     if ((this.appVersion &&
          Services.vc.compare(this.appVersion, Services.appinfo.version) != 0) ||
         (this.platformVersion &&
          Services.vc.compare(this.platformVersion, Services.appinfo.platformVersion) != 0)) {
-      compatUpdate = AUC.getCompatibilityUpdate(updates, this.addon.version,
+      compatUpdate = AUC.getCompatibilityUpdate(aUpdates, this.addon.version,
                                                 false, this.appVersion,
                                                 this.platformVersion);
     }
 
     if (compatUpdate) {
       if ("onCompatibilityUpdateAvailable" in this.listener)
         this.listener.onCompatibilityUpdateAvailable(createWrapper(this.addon));
     }
     else if ("onNoCompatibilityUpdateAvailable" in this.listener) {
       this.listener.onNoCompatibilityUpdateAvailable(createWrapper(this.addon));
     }
 
-    let update = AUC.getNewestCompatibleUpdate(updates,
+    let update = AUC.getNewestCompatibleUpdate(aUpdates,
                                                this.appVersion,
                                                this.platformVersion);
     if (update && Services.vc.compare(this.addon.version, update.version) < 0) {
       if ("onUpdateAvailable" in this.listener) {
         let self = this;
         AddonInstall.createUpdate(function(install) {
           self.listener.onUpdateAvailable(createWrapper(self.addon),
                                           install.wrapper);
@@ -4075,22 +4081,22 @@ UpdateChecker.prototype = {
       if ("onUpdateFinished" in this.listener)
         this.listener.onUpdateFinished(createWrapper(this.addon));
     }
   },
 
   /**
    * Called when AddonUpdateChecker fails the update check
    *
-   * @param   error
-   *          An error status
+   * @param  error
+   *         An error status
    */
-  onUpdateCheckError: function UC_onUpdateCheckError(error) {
+  onUpdateCheckError: function UC_onUpdateCheckError(aError) {
     if ("onNoUpdateAvailable" in this.listener)
-      this.listener.onNoUpdateAvailable(createWrapper(this.addon), error);
+      this.listener.onNoUpdateAvailable(createWrapper(this.addon), aError);
     if ("onUpdateFinished" in this.listener)
       this.listener.onUpdateFinished(createWrapper(this.addon));
   }
 };
 
 /**
  * The AddonInternal is an internal only representation of add-ons. It may
  * have come from the database (see DBAddonInternal below) or an install
@@ -4118,31 +4124,31 @@ AddonInternal.prototype = {
     return !!(this.updateKey || !this.updateURL ||
               this.updateURL.substring(0, 6) == "https:");
   },
 
   get isCompatible() {
     return this.isCompatibleWith();
   },
 
-  isCompatibleWith: function(appVersion, platformVersion) {
+  isCompatibleWith: function(aAppVersion, aPlatformVersion) {
     let app = this.matchingTargetApplication;
     if (!app)
       return false;
 
-    if (!appVersion)
-      appVersion = Services.appinfo.version;
-    if (!platformVersion)
-      platformVersion = Services.appinfo.platformVersion;
+    if (!aAppVersion)
+      aAppVersion = Services.appinfo.version;
+    if (!aPlatformVersion)
+      aPlatformVersion = Services.appinfo.platformVersion;
 
     let version;
     if (app.id == Services.appinfo.ID)
-      version = appVersion;
+      version = aAppVersion;
     else if (app.id == TOOLKIT_ID)
-      version = platformVersion
+      version = aPlatformVersion
 
     return (Services.vc.compare(version, app.minVersion) >= 0) &&
            (Services.vc.compare(version, app.maxVersion) <= 0)
   },
 
   get matchingTargetApplication() {
     let app = null;
     for (let i = 0; i < this.targetApplications.length; i++) {
@@ -4155,23 +4161,23 @@ AddonInternal.prototype = {
   },
 
   get blocklistState() {
     let bs = Cc["@mozilla.org/extensions/blocklist;1"].
              getService(Ci.nsIBlocklistService);
     return bs.getAddonBlocklistState(this.id, this.version);
   },
 
-  applyCompatibilityUpdate: function(update, syncCompatibility) {
-    this.targetApplications.forEach(function(ta) {
-      update.targetApplications.forEach(function(updateTarget) {
-        if (ta.id == updateTarget.id && (syncCompatibility ||
-            Services.vc.compare(ta.maxVersion, updateTarget.maxVersion) < 0)) {
-          ta.minVersion = updateTarget.minVersion;
-          ta.maxVersion = updateTarget.maxVersion;
+  applyCompatibilityUpdate: function(aUpdate, aSyncCompatibility) {
+    this.targetApplications.forEach(function(aTargetApp) {
+      aUpdate.targetApplications.forEach(function(aUpdateTarget) {
+        if (aTargetApp.id == aUpdateTarget.id && (aSyncCompatibility ||
+            Services.vc.compare(aTargetApp.maxVersion, aUpdateTarget.maxVersion) < 0)) {
+          aTargetApp.minVersion = aUpdateTarget.minVersion;
+          aTargetApp.maxVersion = aUpdateTarget.maxVersion;
         }
       });
     });
     this.appDisabled = !isUsableAddon(this);
   }
 };
 
 /**
@@ -4206,25 +4212,25 @@ function DBAddonInternal() {
           install.installLocation == this._installLocation) {
         return this.pendingUpgrade = install.addon;
       }
     };
   });
 }
 
 DBAddonInternal.prototype = {
-  applyCompatibilityUpdate: function(update, syncCompatibility) {
+  applyCompatibilityUpdate: function(aUpdate, aSyncCompatibility) {
     let changes = [];
-    this.targetApplications.forEach(function(ta) {
-      update.targetApplications.forEach(function(updateTarget) {
-        if (ta.id == updateTarget.id && (syncCompatibility ||
-            Services.vc.compare(ta.maxVersion, updateTarget.maxVersion) < 0)) {
-          ta.minVersion = updateTarget.minVersion;
-          ta.maxVersion = updateTarget.maxVersion;
-          changes.push(ta);
+    this.targetApplications.forEach(function(aTargetApp) {
+      aUpdate.targetApplications.forEach(function(aUpdateTarget) {
+        if (aTargetApp.id == aUpdateTarget.id && (aSyncCompatibility ||
+            Services.vc.compare(aTargetApp.maxVersion, aUpdateTarget.maxVersion) < 0)) {
+          aTargetApp.minVersion = aUpdateTarget.minVersion;
+          aTargetApp.maxVersion = aUpdateTarget.maxVersion;
+          changes.push(aUpdateTarget);
         }
       });
     });
     XPIDatabase.updateTargetApplications(this, changes);
     XPIProvider.updateAddonDisabledState(this);
   }
 }
 
@@ -4232,222 +4238,222 @@ DBAddonInternal.prototype.__proto__ = Ad
 
 /**
  * Creates an AddonWrapper for an AddonInternal.
  *
  * @param   addon
  *          The AddonInternal to wrap
  * @return  an AddonWrapper or null if addon was null
  */
-function createWrapper(addon) {
-  if (!addon)
+function createWrapper(aAddon) {
+  if (!aAddon)
     return null;
-  if (!addon.wrapper)
-    addon.wrapper = new AddonWrapper(addon);
-  return addon.wrapper;
+  if (!aAddon.wrapper)
+    aAddon.wrapper = new AddonWrapper(aAddon);
+  return aAddon.wrapper;
 }
 
 /**
  * The AddonWrapper wraps an Addon to provide the data visible to consumers of
  * the public API.
  */
-function AddonWrapper(addon) {
+function AddonWrapper(aAddon) {
   ["id", "version", "type", "optionsURL", "aboutURL", "isCompatible",
    "providesUpdatesSecurely", "blocklistState", "appDisabled",
-   "userDisabled"].forEach(function(prop) {
-     this.__defineGetter__(prop, function() addon[prop]);
+   "userDisabled"].forEach(function(aProp) {
+     this.__defineGetter__(aProp, function() aAddon[aProp]);
   }, this);
 
-  ["installDate", "updateDate"].forEach(function(prop) {
-    this.__defineGetter__(prop, function() new Date(addon[prop]));
+  ["installDate", "updateDate"].forEach(function(aProp) {
+    this.__defineGetter__(aProp, function() new Date(aAddon[aProp]));
   }, this);
 
   this.__defineGetter__("iconURL", function() {
-      return addon.active ? addon.iconURL : null;
+      return aAddon.active ? aAddon.iconURL : null;
   });
 
-  PROP_LOCALE_SINGLE.forEach(function(prop) {
-    this.__defineGetter__(prop, function() {
-      if (addon.active) {
+  PROP_LOCALE_SINGLE.forEach(function(aProp) {
+    this.__defineGetter__(aProp, function() {
+      if (aAddon.active) {
         try {
-          let pref = PREF_EM_EXTENSION_FORMAT + addon.id + "." + prop;
+          let pref = PREF_EM_EXTENSION_FORMAT + aAddon.id + "." + aProp;
           let value = Services.prefs.getComplexValue(pref,
                                                      Ci.nsIPrefLocalizedString);
           if (value.data)
             return value.data;
         }
         catch (e) {
         }
       }
-      return addon.selectedLocale[prop];
+      return aAddon.selectedLocale[aProp];
     });
   }, this);
 
-  PROP_LOCALE_MULTI.forEach(function(prop) {
-    this.__defineGetter__(prop, function() {
-      if (addon.active) {
-        let pref = PREF_EM_EXTENSION_FORMAT + addon.id + "." +
-                   prop.substring(0, prop.length - 1);
+  PROP_LOCALE_MULTI.forEach(function(aProp) {
+    this.__defineGetter__(aProp, function() {
+      if (aAddon.active) {
+        let pref = PREF_EM_EXTENSION_FORMAT + aAddon.id + "." +
+                   aProp.substring(0, aProp.length - 1);
         let list = Services.prefs.getChildList(pref, {});
         if (list.length > 0) {
           let results = [];
-          list.forEach(function(pref) {
-            let value = Services.prefs.getComplexValue(pref,
+          list.forEach(function(aPref) {
+            let value = Services.prefs.getComplexValue(aPref,
                                                        Ci.nsIPrefLocalizedString);
             if (value.data)
               results.push(value.data);
           });
           return results;
         }
       }
 
-      return addon.selectedLocale[prop];
+      return aAddon.selectedLocale[aProp];
 
     });
   }, this);
 
   this.__defineGetter__("screenshots", function() {
     return [];
   });
 
   this.__defineGetter__("updateAutomatically", function() {
-    return addon.updateAutomatically;
+    return aAddon.updateAutomatically;
   });
   this.__defineSetter__("updateAutomatically", function(val) {
     // TODO store this in the DB (bug 557849)
-    addon.updateAutomatically = val;
+    aAddon.updateAutomatically = val;
   });
 
   this.__defineGetter__("install", function() {
-    if (!("_install" in addon) || !addon._install)
+    if (!("_install" in aAddon) || !aAddon._install)
       return null;
-    return addon._install.wrapper;
+    return aAddon._install.wrapper;
   });
 
   this.__defineGetter__("pendingUpgrade", function() {
-    return createWrapper(addon.pendingUpgrade);
+    return createWrapper(aAddon.pendingUpgrade);
   });
 
   this.__defineGetter__("scope", function() {
-    if (addon._installLocation)
-      return addon._installLocation.scope;
+    if (aAddon._installLocation)
+      return aAddon._installLocation.scope;
 
     return AddonManager.SCOPE_PROFILE;
   });
 
   this.__defineGetter__("pendingOperations", function() {
     let pending = 0;
-    if (!(addon instanceof DBAddonInternal))
+    if (!(aAddon instanceof DBAddonInternal))
       pending |= AddonManager.PENDING_INSTALL;
-    else if (addon.pendingUninstall)
+    else if (aAddon.pendingUninstall)
       pending |= AddonManager.PENDING_UNINSTALL;
 
-    if (addon.active && (addon.userDisabled || addon.appDisabled))
+    if (aAddon.active && (aAddon.userDisabled || aAddon.appDisabled))
       pending |= AddonManager.PENDING_DISABLE;
-    else if (!addon.active && (!addon.userDisabled && !addon.appDisabled))
+    else if (!aAddon.active && (!aAddon.userDisabled && !aAddon.appDisabled))
       pending |= AddonManager.PENDING_ENABLE;
 
-    if (addon.pendingUpgrade)
+    if (aAddon.pendingUpgrade)
       pending |= AddonManager.PENDING_UPGRADE;
 
     return pending;
   });
 
   this.__defineGetter__("permissions", function() {
     let permissions = 0;
-    if (!addon.appDisabled) {
-      if (addon.userDisabled)
+    if (!aAddon.appDisabled) {
+      if (aAddon.userDisabled)
         permissions |= AddonManager.PERM_CAN_ENABLE;
-      else if (addon.type != "theme")
+      else if (aAddon.type != "theme")
         permissions |= AddonManager.PERM_CAN_DISABLE;
     }
-    if (addon._installLocation) {
-      if (!addon._installLocation.locked) {
+    if (aAddon._installLocation) {
+      if (!aAddon._installLocation.locked) {
         permissions |= AddonManager.PERM_CAN_UPGRADE;
-        if (!addon.pendingUninstall)
+        if (!aAddon.pendingUninstall)
           permissions |= AddonManager.PERM_CAN_UNINSTALL;
       }
     }
     return permissions;
   });
 
-  this.__defineGetter__("isActive", function() addon.active);
+  this.__defineGetter__("isActive", function() aAddon.active);
   this.__defineSetter__("userDisabled", function(val) {
-    if (addon.type == "theme" && val)
+    if (aAddon.type == "theme" && val)
       throw new Error("Cannot disable the active theme");
 
-    if (addon instanceof DBAddonInternal)
-      XPIProvider.updateAddonDisabledState(addon, val);
+    if (aAddon instanceof DBAddonInternal)
+      XPIProvider.updateAddonDisabledState(aAddon, val);
     else
-      addon.userDisabled = val;
+      aAddon.userDisabled = val;
   });
 
-  this.isCompatibleWith = function(appVersion, platformVersion) {
-    return addon.isCompatibleWith(appVersion, platformVersion);
+  this.isCompatibleWith = function(aAppVersion, aPlatformVersion) {
+    return aAddon.isCompatibleWith(aAppVersion, aPlatformVersion);
   };
 
   this.uninstall = function() {
-    if (!(addon instanceof DBAddonInternal))
+    if (!(aAddon instanceof DBAddonInternal))
       throw new Error("Cannot uninstall an add-on that isn't installed");
-    if (addon.pendingUninstall)
+    if (aAddon.pendingUninstall)
       throw new Error("Add-on is already marked to be uninstalled");
-    XPIProvider.uninstallAddon(addon);
+    XPIProvider.uninstallAddon(aAddon);
   };
 
   this.cancelUninstall = function() {
-    if (!(addon instanceof DBAddonInternal))
+    if (!(aAddon instanceof DBAddonInternal))
       throw new Error("Cannot cancel uninstall for an add-on that isn't installed");
-    if (!addon.pendingUninstall)
+    if (!aAddon.pendingUninstall)
       throw new Error("Add-on is not marked to be uninstalled");
-    XPIProvider.cancelUninstallAddon(addon);
+    XPIProvider.cancelUninstallAddon(aAddon);
   };
 
-  this.findUpdates = function(listener, reason, appVersion, platformVersion) {
-    new UpdateChecker(addon, listener, reason, appVersion, platformVersion);
+  this.findUpdates = function(aListener, aReason, aAppVersion, aPlatformVersion) {
+    new UpdateChecker(aAddon, aListener, aReason, aAppVersion, aPlatformVersion);
   };
 
-  this.hasResource = function(path) {
+  this.hasResource = function(aPath) {
     let bundle = null;
-    if (addon instanceof DBAddonInternal) {
-      bundle = addon._sourceBundle = addon._installLocation
-                                          .getLocationForID(addon.id);
+    if (aAddon instanceof DBAddonInternal) {
+      bundle = aAddon._sourceBundle = aAddon._installLocation
+                                            .getLocationForID(aAddon.id);
     }
     else {
-      bundle = addon._sourceBundle.clone();
+      bundle = aAddon._sourceBundle.clone();
     }
 
     if (bundle.isDirectory()) {
-      bundle.append(path);
+      bundle.append(aPath);
       return bundle.exists();
     }
 
     let zipReader = Cc["@mozilla.org/libjar/zip-reader;1"].
                     createInstance(Ci.nsIZipReader);
     zipReader.open(bundle);
-    let result = zipReader.hasEntry(path);
+    let result = zipReader.hasEntry(aPath);
     zipReader.close();
     return result;
   },
 
-  this.getResourceURL = function(path) {
+  this.getResourceURL = function(aPath) {
     let bundle = null;
-    if (addon instanceof DBAddonInternal) {
-      bundle = addon._sourceBundle = addon._installLocation
-                                          .getLocationForID(addon.id);
+    if (aAddon instanceof DBAddonInternal) {
+      bundle = aAddon._sourceBundle = aAddon._installLocation
+                                            .getLocationForID(aAddon.id);
     }
     else {
-      bundle = addon._sourceBundle.clone();
+      bundle = aAddon._sourceBundle.clone();
     }
 
     if (bundle.isDirectory()) {
-      bundle.append(path);
+      bundle.append(aPath);
       return Services.io.newFileURI(bundle).spec;
     }
 
-    return buildJarURI(bundle, path).spec;
+    return buildJarURI(bundle, aPath).spec;
   }
 }
 
 AddonWrapper.prototype = {
   get screenshots() {
     return [];
   }
 };
@@ -4463,37 +4469,37 @@ AddonWrapper.prototype = {
  * name as the add-on's ID.
  *
  * There may also a special directory named "staged" which can contain
  * directories with the same name as an add-on ID. If the directory is empty
  * then it means the add-on will be uninstalled from this location during the
  * next startup. If the directory contains the add-on's files then they will be
  * installed during the next startup.
  *
- * @param   name
- *          The string identifier for the install location
- * @param   directory
- *          The nsIFile directory for the install location
- * @param   scope
- *          The scope of add-ons installed in this location
- * @param   locked
- *          true if add-ons cannot be installed, uninstalled or upgraded in the
- *          install location
+ * @param  aName
+ *         The string identifier for the install location
+ * @param  aDirectory
+ *         The nsIFile directory for the install location
+ * @param  aScope
+ *         The scope of add-ons installed in this location
+ * @param  aLocked
+ *         true if add-ons cannot be installed, uninstalled or upgraded in the
+ *         install location
  */
-function DirectoryInstallLocation(name, directory, scope, locked) {
-  this._name = name;
-  this.locked = locked;
-  this._directory = directory;
-  this._scope = scope
+function DirectoryInstallLocation(aName, aDirectory, aScope, aLocked) {
+  this._name = aName;
+  this.locked = aLocked;
+  this._directory = aDirectory;
+  this._scope = aScope
   this._IDToDirMap = {};
   this._DirToIDMap = {};
 
-  if (!directory.exists())
+  if (!aDirectory.exists())
     return;
-  if (!directory.isDirectory())
+  if (!aDirectory.isDirectory())
     throw new Error("Location must be a directory.");
 
   this._readAddons();
 }
 
 DirectoryInstallLocation.prototype = {
   _name       : "",
   _directory   : null,
@@ -4502,20 +4508,20 @@ DirectoryInstallLocation.prototype = {
 
   /**
    * Reads a directory linked to in a file.
    *
    * @param   file
    *          The file containing the directory path
    * @return  a nsILocalFile object representing the linked directory.
    */
-  _readDirectoryFromFile: function DirInstallLocation__readDirectoryFromFile(file) {
+  _readDirectoryFromFile: function DirInstallLocation__readDirectoryFromFile(aFile) {
     let fis = Cc["@mozilla.org/network/file-input-stream;1"].
               createInstance(Ci.nsIFileInputStream);
-    fis.init(file, -1, -1, false);
+    fis.init(aFile, -1, -1, false);
     let line = { value: "" };
     if (fis instanceof Ci.nsILineInputStream)
       fis.readLine(line);
     fis.close();
     if (line.value) {
       let linkedDirectory = Cc["@mozilla.org/file/local;1"].
                             createInstance(Ci.nsILocalFile);
 
@@ -4607,114 +4613,114 @@ DirectoryInstallLocation.prototype = {
     }
     return locations;
   },
 
   /**
    * Gets the staging directory to put add-ons that are pending install and
    * uninstall into.
    *
-   * @return  an nsIFile
+   * @return an nsIFile
    */
   getStagingDir: function DirInstallLocation_getStagingDir() {
     let dir = this._directory.clone();
     dir.append(DIR_STAGE);
     return dir;
   },
 
   /**
    * Installs an add-on from a directory into the install location.
    *
-   * @param   id
-   *          The ID of the add-on to install
-   * @param   source
-   *          The directory to install from
-   * @return  an nsIFile indicating where the add-on was installed to
+   * @param  aId
+   *         The ID of the add-on to install
+   * @param  aSource
+   *         The directory to install from
+   * @return an nsIFile indicating where the add-on was installed to
    */
-  installAddon: function DirInstallLocation_installAddon(id, source) {
+  installAddon: function DirInstallLocation_installAddon(aId, aSource) {
     let dir = this._directory.clone().QueryInterface(Ci.nsILocalFile);
-    dir.append(id);
+    dir.append(aId);
     if (dir.exists())
       dir.remove(true);
 
-    source = source.clone();
-    source.moveTo(this._directory, id);
-    this._DirToIDMap[dir.path] = id;
-    this._IDToDirMap[id] = dir;
+    aSource = aSource.clone();
+    aSource.moveTo(this._directory, aId);
+    this._DirToIDMap[dir.path] = aId;
+    this._IDToDirMap[aId] = dir;
 
     return dir;
   },
 
   /**
    * Uninstalls an add-on from this location.
    *
-   * @param   id
-   *          The ID of the add-on to uninstall
-   * @throws  if the ID does not match any of the add-ons installed
+   * @param  aId
+   *         The ID of the add-on to uninstall
+   * @throws if the ID does not match any of the add-ons installed
    */
-  uninstallAddon: function DirInstallLocation_uninstallAddon(id) {
+  uninstallAddon: function DirInstallLocation_uninstallAddon(aId) {
     let dir = this._directory.clone();
-    dir.append(id);
+    dir.append(aId);
 
     delete this._DirToIDMap[dir.path];
-    delete this._IDToDirMap[id];
+    delete this._IDToDirMap[aId];
 
     if (!dir.exists())
-      throw new Error("Attempt to uninstall unknown add-on " + id);
+      throw new Error("Attempt to uninstall unknown add-on " + aId);
 
     dir.remove(true);
   },
 
   /**
    * Gets the ID of the add-on installed in the given directory.
    *
-   * @param   dir
-   *          The nsIFile directory to look in
-   * @return  the ID
-   * @throws  if the directory does not represent an installed add-on
+   * @param  aDir
+   *         The nsIFile directory to look in
+   * @return the ID
+   * @throws if the directory does not represent an installed add-on
    */
-  getIDForLocation: function DirInstallLocation_getIDForLocation(dir) {
-    if (dir.path in this._DirToIDMap)
-      return this._DirToIDMap[dir.path];
-    throw new Error("Unknown add-on location " + dir.path);
+  getIDForLocation: function DirInstallLocation_getIDForLocation(aDir) {
+    if (aDir.path in this._DirToIDMap)
+      return this._DirToIDMap[aDir.path];
+    throw new Error("Unknown add-on location " + aDir.path);
   },
 
   /**
    * Gets the directory that the add-on with the given ID is installed in.
    *
-   * @param   id
-   *          The ID of the add-on
-   * @return  the directory
-   * @throws  if the ID does not match any of the add-ons installed
+   * @param  aId
+   *         The ID of the add-on
+   * @return the directory
+   * @throws if the ID does not match any of the add-ons installed
    */
-  getLocationForID: function DirInstallLocation_getLocationForID(id) {
-    if (id in this._IDToDirMap)
-      return this._IDToDirMap[id].clone().QueryInterface(Ci.nsILocalFile);
-    throw new Error("Unknown add-on ID " + id);
+  getLocationForID: function DirInstallLocation_getLocationForID(aId) {
+    if (aId in this._IDToDirMap)
+      return this._IDToDirMap[aId].clone().QueryInterface(Ci.nsILocalFile);
+    throw new Error("Unknown add-on ID " + aId);
   }
 };
 
 #ifdef XP_WIN
 /**
  * An object that identifies a registry install location for add-ons. The location
  * consists of a registry key which contains string values mapping ID to the
  * directory where an add-on is installed
  *
- * @param   name
- *          The string identifier of this Install Location.
- * @param   rootKey
- *          The root key (one of the ROOT_KEY_ values from nsIWindowsRegKey).
- * @param   scope
- *          The scope of add-ons installed in this location
+ * @param  aName
+ *         The string identifier of this Install Location.
+ * @param  aRootKey
+ *         The root key (one of the ROOT_KEY_ values from nsIWindowsRegKey).
+ * @param  scope
+ *         The scope of add-ons installed in this location
  */
-function WinRegInstallLocation(name, rootKey, scope) {
+function WinRegInstallLocation(aName, aRootKey, aScope) {
   this.locked = true;
-  this._name = name;
-  this._rootKey = rootKey;
-  this._scope = scope;
+  this._name = aName;
+  this._rootKey = aRootKey;
+  this._scope = aScope;
   this._IDToDirMap = {};
   this._DirToIDMap = {};
 
   let path = this._appKeyPath + "\\Extensions";
   let key = Cc["@mozilla.org/windows-registry-key;1"].
             createInstance(Ci.nsIWindowsRegKey);
 
   // Reading the registry may throw an exception, and that's ok.  In error
@@ -4756,27 +4762,27 @@ WinRegInstallLocation.prototype = {
 
     return "SOFTWARE\\" + appVendor + appName;
   },
 
   /**
    * Read the registry and build a mapping between ID and directory for each
    * installed add-on.
    *
-   * @param   key
-   *          The key that contains the ID to path mapping
+   * @param  key
+   *         The key that contains the ID to path mapping
    */
-  _readAddons: function RegInstallLocation__readAddons(key) {
-    let count = key.valueCount;
+  _readAddons: function RegInstallLocation__readAddons(aKey) {
+    let count = aKey.valueCount;
     for (let i = 0; i < count; ++i) {
-      let id = key.getValueName(i);
+      let id = aKey.getValueName(i);
 
       let dir = Cc["@mozilla.org/file/local;1"].
                 createInstance(Ci.nsILocalFile);
-      dir.initWithPath(key.readStringValue(id));
+      dir.initWithPath(aKey.readStringValue(id));
 
       if (dir.exists() && dir.isDirectory()) {
         this._IDToDirMap[id] = dir;
         this._DirToIDMap[dir.path] = id;
       }
       else {
         WARN("Ignoring missing add-on in " + dir.path);
       }
@@ -4807,35 +4813,35 @@ WinRegInstallLocation.prototype = {
                          .QueryInterface(Ci.nsILocalFile));
     }
     return locations;
   },
 
   /**
    * Gets the ID of the add-on installed in the given directory.
    *
-   * @param   file
-   *          The directory to look in
-   * @return  the ID
-   * @throws  if the directory does not represent an installed add-on
+   * @param  aFile
+   *         The directory to look in
+   * @return the ID
+   * @throws if the directory does not represent an installed add-on
    */
-  getIDForLocation: function RegInstallLocation_getIDForLocation(file) {
-    if (file.path in this._DirToIDMap)
-      return this._DirToIDMap[file.path];
+  getIDForLocation: function RegInstallLocation_getIDForLocation(aFile) {
+    if (aFile.path in this._DirToIDMap)
+      return this._DirToIDMap[aFile.path];
     throw new Error("Unknown add-on location");
   },
 
   /**
    * Gets the directory that the add-on with the given ID is installed in.
    *
-   * @param   id
-   *          The ID of the add-on
-   * @returns the directory
+   * @param  aId
+   *         The ID of the add-on
+   * @return the directory
    */
-  getLocationForID: function RegInstallLocation_getLocationForID(id) {
-    if (id in this._IDToDirMap)
-      return this._IDToDirMap[id].clone().QueryInterface(Ci.nsILocalFile);
+  getLocationForID: function RegInstallLocation_getLocationForID(aId) {
+    if (aId in this._IDToDirMap)
+      return this._IDToDirMap[aId].clone().QueryInterface(Ci.nsILocalFile);
     throw new Error("Unknown add-on ID");
   }
 };
 #endif
 
 AddonManagerPrivate.registerProvider(XPIProvider);
--- a/toolkit/mozapps/extensions/addonManager.js
+++ b/toolkit/mozapps/extensions/addonManager.js
@@ -61,131 +61,131 @@ Components.utils.import("resource://gre/
 
 var gSingleton = null;
 
 function amManager() {
   Components.utils.import("resource://gre/modules/AddonManager.jsm");
 }
 
 amManager.prototype = {
-  observe: function AMC_observe(subject, topic, data) {
+  observe: function AMC_observe(aSubject, aTopic, aData) {
     let os = Cc["@mozilla.org/observer-service;1"].
              getService(Ci.nsIObserverService);
 
-    switch (topic) {
+    switch (aTopic) {
     case "profile-after-change":
       os.addObserver(this, "xpcom-shutdown", false);
       AddonManagerPrivate.startup();
       break;
     case "xpcom-shutdown":
       os.removeObserver(this, "xpcom-shutdown");
       AddonManagerPrivate.shutdown();
       break;
     }
   },
 
   /**
    * @see amIWebInstaller.idl
    */
-  isInstallEnabled: function AMC_isInstallEnabled(mimetype, referer) {
-    return AddonManager.isInstallEnabled(mimetype);
+  isInstallEnabled: function AMC_isInstallEnabled(aMimetype, aReferer) {
+    return AddonManager.isInstallEnabled(aMimetype);
   },
 
   /**
    * @see amIWebInstaller.idl
    */
-  installAddonsFromWebpage: function AMC_installAddonsFromWebpage(mimetype,
-                                                                  window,
-                                                                  referer, uris,
-                                                                  hashes, names,
-                                                                  icons, callback) {
-    if (uris.length == 0)
+  installAddonsFromWebpage: function AMC_installAddonsFromWebpage(aMimetype,
+                                                                  aWindow,
+                                                                  aReferer, aUris,
+                                                                  aHashes, aNames,
+                                                                  aIcons, aCallback) {
+    if (aUris.length == 0)
       return false;
 
     let retval = true;
-    if (!AddonManager.isInstallAllowed(mimetype, referer)) {
-      callback = null;
+    if (!AddonManager.isInstallAllowed(aMimetype, aReferer)) {
+      aCallback = null;
       retval = false;
     }
 
     let loadGroup = null;
 
     try {
-      loadGroup = window.QueryInterface(Ci.nsIInterfaceRequestor)
-                        .getInterface(Ci.nsIWebNavigation)
-                        .QueryInterface(Ci.nsIDocumentLoader).loadGroup;
+      loadGroup = aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
+                         .getInterface(Ci.nsIWebNavigation)
+                         .QueryInterface(Ci.nsIDocumentLoader).loadGroup;
     }
     catch (e) {
     }
 
     let installs = [];
     function buildNextInstall() {
-      if (uris.length == 0) {
-        AddonManager.installAddonsFromWebpage(mimetype, window, referer, installs);
+      if (aUris.length == 0) {
+        AddonManager.installAddonsFromWebpage(aMimetype, aWindow, aReferer, installs);
         return;
       }
-      let uri = uris.shift();
-      AddonManager.getInstallForURL(uri, function(install) {
-        if (install) {
-          installs.push(install);
-          if (callback) {
-            install.addListener({
-              onDownloadCancelled: function(install) {
-                callback.onInstallEnded(uri, USER_CANCELLED);
+      let uri = aUris.shift();
+      AddonManager.getInstallForURL(uri, function(aInstall) {
+        if (aInstall) {
+          installs.push(aInstall);
+          if (aCallback) {
+            aInstall.addListener({
+              onDownloadCancelled: function(aInstall) {
+                aCallback.onInstallEnded(uri, USER_CANCELLED);
               },
 
-              onDownloadFailed: function(install, error) {
-                if (error == AddonManager.ERROR_CORRUPT_FILE)
-                  callback.onInstallEnded(uri, CANT_READ_ARCHIVE);
+              onDownloadFailed: function(aInstall, aError) {
+                if (aError == AddonManager.ERROR_CORRUPT_FILE)
+                  aCallback.onInstallEnded(uri, CANT_READ_ARCHIVE);
                 else
-                  callback.onInstallEnded(uri, DOWNLOAD_ERROR);
+                  aCallback.onInstallEnded(uri, DOWNLOAD_ERROR);
               },
 
-              onInstallFailed: function(install, error) {
-                callback.onInstallEnded(uri, EXECUTION_ERROR);
+              onInstallFailed: function(aInstall, aError) {
+                aCallback.onInstallEnded(uri, EXECUTION_ERROR);
               },
 
-              onInstallEnded: function(install, status) {
-                callback.onInstallEnded(uri, SUCCESS);
+              onInstallEnded: function(aInstall, aStatus) {
+                aCallback.onInstallEnded(uri, SUCCESS);
               }
             });
           }
         }
-        else if (callback) {
-          callback.callback(uri, UNSUPPORTED_TYPE);
+        else if (aCallback) {
+          aCallback.onInstallEnded(uri, UNSUPPORTED_TYPE);
         }
         buildNextInstall();
-      }, mimetype, hashes.shift(), names.shift(), icons.shift(), null, loadGroup);
+      }, aMimetype, aHashes.shift(), aNames.shift(), aIcons.shift(), null, loadGroup);
     }
     buildNextInstall();
 
     return retval;
   },
 
-  notify: function AMC_notify(timer) {
+  notify: function AMC_notify(aTimer) {
     AddonManagerPrivate.backgroundUpdateCheck();
   },
 
   classDescription: "Addons Manager",
   contractID: "@mozilla.org/addons/integration;1",
   classID: Components.ID("{4399533d-08d1-458c-a87a-235f74451cfa}"),
   _xpcom_categories: [{ category: "profile-after-change" },
                       { category: "update-timer",
                         value: "@mozilla.org/addons/integration;1," +
                                "getService,addon-background-update-timer," +
                                PREF_EM_UPDATE_INTERVAL + ",86400" }],
   _xpcom_factory: {
-    createInstance: function(outer, iid) {
-      if (outer != null)
+    createInstance: function(aOuter, aIid) {
+      if (aOuter != null)
         throw Cr.NS_ERROR_NO_AGGREGATION;
   
       if (!gSingleton)
         gSingleton = new amManager();
-      return gSingleton.QueryInterface(iid);
+      return gSingleton.QueryInterface(aIid);
     }
   },
   QueryInterface: XPCOMUtils.generateQI([Ci.amIWebInstaller,
                                          Ci.nsITimerCallback,
                                          Ci.nsIObserver])
 };
 
-function NSGetModule(compMgr, fileSpec)
+function NSGetModule(aCompMgr, aFileSpec)
   XPCOMUtils.generateModule([amManager]);
--- a/toolkit/mozapps/extensions/amContentHandler.js
+++ b/toolkit/mozapps/extensions/amContentHandler.js
@@ -47,48 +47,50 @@ Components.utils.import("resource://gre/
 
 function amContentHandler() {
 }
 
 amContentHandler.prototype = {
   /**
    * Handles a new request for an application/x-xpinstall file.
    *
-   * @param   mimetype
-   *          The mimetype of the file
-   * @param   context
-   *          The context passed to nsIChannel.asyncOpen
+   * @param  aMimetype
+   *         The mimetype of the file
+   * @param  aContext
+   *         The context passed to nsIChannel.asyncOpen
+   * @param  aRequest
+   *         The nsIRequest dealing with the content
    */
-  handleContent: function XCH_handleContent(mimetype, context, request) {
-    if (mimetype != XPI_CONTENT_TYPE)
+  handleContent: function XCH_handleContent(aMimetype, aContext, aRequest) {
+    if (aMimetype != XPI_CONTENT_TYPE)
       throw Cr.NS_ERROR_WONT_HANDLE_CONTENT;
 
-    if (!(request instanceof Ci.nsIChannel))
+    if (!(aRequest instanceof Ci.nsIChannel))
       throw Cr.NS_ERROR_WONT_HANDLE_CONTENT;
 
-    let uri = request.URI;
+    let uri = aRequest.URI;
 
     let referer = null;
-    if (request instanceof Ci.nsIPropertyBag2) {
-      referer = request.getPropertyAsInterface("docshell.internalReferrer",
-                                               Ci.nsIURI);
+    if (aRequest instanceof Ci.nsIPropertyBag2) {
+      referer = aRequest.getPropertyAsInterface("docshell.internalReferrer",
+                                                Ci.nsIURI);
     }
 
     let window = null;
-    let callbacks = request.notificationCallbacks ?
-                    request.notificationCallbacks :
-                    request.loadGroup.notificationCallbacks;
+    let callbacks = aRequest.notificationCallbacks ?
+                    aRequest.notificationCallbacks :
+                    aRequest.loadGroup.notificationCallbacks;
     if (callbacks)
       window = callbacks.getInterface(Ci.nsIDOMWindow);
 
-    request.cancel(Cr.NS_BINDING_ABORTED);
+    aRequest.cancel(Cr.NS_BINDING_ABORTED);
 
     let manager = Cc["@mozilla.org/addons/integration;1"].
                   getService(Ci.amIWebInstaller);
-    manager.installAddonsFromWebpage(mimetype, window, referer, [uri.spec],
+    manager.installAddonsFromWebpage(aMimetype, window, referer, [uri.spec],
                                      [null], [null], [null], null, 1);
   },
 
   classDescription: "XPI Content Handler",
   contractID: "@mozilla.org/uriloader/content-handler;1?type=" + XPI_CONTENT_TYPE,
   classID: Components.ID("{7beb3ba8-6ec3-41b4-b67c-da89b8518922}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentHandler])
 };
--- a/toolkit/mozapps/extensions/amIInstallTrigger.idl
+++ b/toolkit/mozapps/extensions/amIInstallTrigger.idl
@@ -43,22 +43,23 @@ interface nsIVariant;
  * A callback function that webpages can implement to be notified when triggered
  * installs complete.
  */
 [scriptable, function, uuid(bb22f5c0-3ca1-48f6-873c-54e87987700f)]
 interface amIInstallCallback : nsISupports
 {
   /**
    * Called when an install completes or fails.
-   * @param   url
-   *          The url of the add-on being installed
-   * @param   status
-   *          0 if the install was successful or negative if not
+   *
+   * @param  aUrl
+   *         The url of the add-on being installed
+   * @param  aStatus
+   *         0 if the install was successful or negative if not
    */
-  void onInstallEnded(in AString url, in PRInt32 status);
+  void onInstallEnded(in AString aUrl, in PRInt32 aStatus);
 };
 
 /**
  * The interface for the InstallTrigger object available to all websites.
  */
 [scriptable, uuid(14b4e84d-001c-4403-a608-52a67ffaab40)]
 interface amIInstallTrigger : nsISupports
 {
@@ -79,48 +80,48 @@ interface amIInstallTrigger : nsISupport
   /**
    * Tests if installation is enabled.
    */
   boolean enabled();
 
   /**
    * Starts a new installation of a set of add-ons.
    *
-   * @param   args
-   *          The add-ons to install. This should be a JS object, each property
-   *          is the name of an add-on to be installed. The value of the
-   *          property should either be a string URL, or an object with the
-   *          following properties:
-   *           * URL for the add-on's URL
-   *           * IconURL for an icon for the add-on
-   *           * Hash for a hash of the add-on
-   * @param   callback
-   *          A callback to call as each installation succeeds or fails
-   * @return  true if the installations were successfully started
+   * @param  aArgs
+   *         The add-ons to install. This should be a JS object, each property
+   *         is the name of an add-on to be installed. The value of the
+   *         property should either be a string URL, or an object with the
+   *         following properties:
+   *          * URL for the add-on's URL
+   *          * IconURL for an icon for the add-on
+   *          * Hash for a hash of the add-on
+   * @param  aCallback
+   *         A callback to call as each installation succeeds or fails
+   * @return true if the installations were successfully started
    */
-  boolean install(in nsIVariant args, [optional] in amIInstallCallback callback);
+  boolean install(in nsIVariant aArgs, [optional] in amIInstallCallback aCallback);
 
   /**
    * Starts installing a new add-on. This method is deprecated, please use
    * "install" in the future.
    *
-   * @param   type
-   *          Unused, retained for backwards compatibility
-   * @param   url
-   *          The URL of the add-on
-   * @param   skin
-   *          Unused, retained for backwards compatibility
-   * @return  true if the installation was successfully started
+   * @param  aType
+   *         Unused, retained for backwards compatibility
+   * @param  aUrl
+   *         The URL of the add-on
+   * @param  aSkin
+   *         Unused, retained for backwards compatibility
+   * @return true if the installation was successfully started
    */
-  boolean installChrome(in PRUint32 type, in AString url, in AString skin);
+  boolean installChrome(in PRUint32 aType, in AString aUrl, in AString aSkin);
 
   /**
    * Starts installing a new add-on. This method is deprecated, please use
    * "install" in the future.
    *
-   * @param   url
-   *          The URL of the add-on
-   * @param   flags
-   *          Unused, retained for backwards compatibility
-   * @return  true if the installation was successfully started
+   * @param  aUrl
+   *         The URL of the add-on
+   * @param  aFlags
+   *         Unused, retained for backwards compatibility
+   * @return true if the installation was successfully started
    */
-  boolean startSoftwareUpdate(in AString url, [optional] in PRInt32 flags);
+  boolean startSoftwareUpdate(in AString aUrl, [optional] in PRInt32 aFlags);
 };
--- a/toolkit/mozapps/extensions/amIWebInstallListener.idl
+++ b/toolkit/mozapps/extensions/amIWebInstallListener.idl
@@ -67,39 +67,39 @@ interface amIWebInstallInfo : nsISupport
  */
 [scriptable, uuid(ea806f3a-1b27-4d3d-9aee-88dec4c29fda)]
 interface amIWebInstallListener : nsISupports
 {
   /**
    * Called when the website is not allowed to directly prompt the user to
    * install add-ons.
    *
-   * @param   window
-   *          The window that triggered the installs
-   * @param   uri
-   *          The URI of the site that triggered the installs
-   * @param   installs
-   *          The AddonInstalls that were blocked
-   * @param   count
-   *          The number of AddonInstalls
-   * @return  true if the caller should start the installs
+   * @param  aWindow
+   *         The window that triggered the installs
+   * @param  aUri
+   *         The URI of the site that triggered the installs
+   * @param  aInstalls
+   *         The AddonInstalls that were blocked
+   * @param  aCount
+   *         The number of AddonInstalls
+   * @return true if the caller should start the installs
    */
-  boolean onWebInstallBlocked(in nsIDOMWindowInternal window, in nsIURI uri,
-                              [array, size_is(count)] in nsIVariant installs,
-                              [optional] in PRUint32 count);
+  boolean onWebInstallBlocked(in nsIDOMWindowInternal aWindow, in nsIURI aUri,
+                              [array, size_is(aCount)] in nsIVariant aInstalls,
+                              [optional] in PRUint32 aCount);
 
   /**
    * Called when a website wants to ask the user to install add-ons.
    *
-   * @param   window
-   *          The window that triggered the installs
-   * @param   uri
-   *          The URI of the site that triggered the installs
-   * @param   installs
-   *          The AddonInstalls that were requested
-   * @param   count
-   *          The number of AddonInstalls
-   * @return  true if the caller should start the installs
+   * @param  aWindow
+   *         The window that triggered the installs
+   * @param  aUri
+   *         The URI of the site that triggered the installs
+   * @param  aInstalls
+   *         The AddonInstalls that were requested
+   * @param  aCount
+   *         The number of AddonInstalls
+   * @return true if the caller should start the installs
    */
-  boolean onWebInstallRequested(in nsIDOMWindowInternal window, in nsIURI uri,
-                                [array, size_is(count)] in nsIVariant installs,
-                                [optional] in PRUint32 count);
+  boolean onWebInstallRequested(in nsIDOMWindowInternal aWindow, in nsIURI aUri,
+                                [array, size_is(aCount)] in nsIVariant aInstalls,
+                                [optional] in PRUint32 aCount);
 };
--- a/toolkit/mozapps/extensions/amIWebInstaller.idl
+++ b/toolkit/mozapps/extensions/amIWebInstaller.idl
@@ -46,50 +46,50 @@ interface nsIURI;
  * This interface is used to allow webpages to start installing add-ons.
  */
 [scriptable, uuid(4fdf4f84-73dc-4857-9bbe-84895e8afd5d)]
 interface amIWebInstaller : nsISupports
 {
   /**
    * Checks if installation is enabled for a webpage.
    *
-   * @param   mimetype
-   *          The mimetype for the add-on to be installed
-   * @param   referer
-   *          The URL of the webpage trying to install an add-on
-   * @return  true if installation is enabled
+   * @param  aMimetype
+   *         The mimetype for the add-on to be installed
+   * @param  referer
+   *         The URL of the webpage trying to install an add-on
+   * @return true if installation is enabled
    */
-  boolean isInstallEnabled(in AString mimetype, in nsIURI referer);
+  boolean isInstallEnabled(in AString aMimetype, in nsIURI aReferer);
 
   /**
    * Installs an array of add-ons at the request of a webpage
    *
-   * @param   mimetype
-   *          The mimetype for the add-ons
-   * @param   window
-   *          The window installing the add-ons
-   * @param   referer
-   *          The URI for the webpage installing the add-ons
-   * @param   uris
-   *          The URIs of add-ons to be installed
-   * @param   hashes
-   *          The hashes for the add-ons to be installed
-   * @param   names
-   *          The names for the add-ons to be installed
-   * @param   icons
-   *          The icons for the add-ons to be installed
-   * @param   callback
-   *          An optional callback to notify about installation success and
-   *          failure
-   * @param   installCount
-   *          An optional argument including the number of add-ons to install
-   * @return  true if the installation was successfully started
+   * @param  aMimetype
+   *         The mimetype for the add-ons
+   * @param  aWindow
+   *         The window installing the add-ons
+   * @param  aReferer
+   *         The URI for the webpage installing the add-ons
+   * @param  aUris
+   *         The URIs of add-ons to be installed
+   * @param  aHashes
+   *         The hashes for the add-ons to be installed
+   * @param  aNames
+   *         The names for the add-ons to be installed
+   * @param  aIcons
+   *         The icons for the add-ons to be installed
+   * @param  aCallback
+   *         An optional callback to notify about installation success and
+   *         failure
+   * @param  aInstallCount
+   *         An optional argument including the number of add-ons to install
+   * @return true if the installation was successfully started
    */
-  boolean installAddonsFromWebpage(in AString mimetype,
-                                   in nsIDOMWindowInternal window,
-                                   in nsIURI referer,
-                                   [array, size_is(installCount)] in wstring uris,
-                                   [array, size_is(installCount)] in wstring hashes,
-                                   [array, size_is(installCount)] in wstring names,
-                                   [array, size_is(installCount)] in wstring icons,
-                                   [optional] in amIInstallCallback callback,
-                                   [optional] in PRUint32 installCount);
+  boolean installAddonsFromWebpage(in AString aMimetype,
+                                   in nsIDOMWindowInternal aWindow,
+                                   in nsIURI aReferer,
+                                   [array, size_is(aInstallCount)] in wstring aUris,
+                                   [array, size_is(aInstallCount)] in wstring aHashes,
+                                   [array, size_is(aInstallCount)] in wstring aNames,
+                                   [array, size_is(aInstallCount)] in wstring aIcons,
+                                   [optional] in amIInstallCallback aCallback,
+                                   [optional] in PRUint32 aInstallCount);
 };
--- a/toolkit/mozapps/extensions/amInstallTrigger.cpp
+++ b/toolkit/mozapps/extensions/amInstallTrigger.cpp
@@ -51,34 +51,34 @@
 #include "nsIDOMDocument.h"
 #include "nsNetUtil.h"
 #include "nsIScriptSecurityManager.h"
 
 //
 // Helper function for URI verification
 //
 static nsresult
-CheckLoadURIFromScript(JSContext *cx, const nsACString& uriStr)
+CheckLoadURIFromScript(JSContext *aCx, const nsACString& aUriStr)
 {
   nsresult rv;
   nsCOMPtr<nsIScriptSecurityManager> secman(do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // get the script principal
   nsCOMPtr<nsIPrincipal> principal;
   rv = secman->GetSubjectPrincipal(getter_AddRefs(principal));
   NS_ENSURE_SUCCESS(rv, rv);
   if (!principal)
     return NS_ERROR_FAILURE;
 
   // convert the requested URL string to a URI
   // Note that we use a null base URI here, since that's what we use when we
   // actually convert the string into a URI to load.
   nsCOMPtr<nsIURI> uri;
-  rv = NS_NewURI(getter_AddRefs(uri), uriStr);
+  rv = NS_NewURI(getter_AddRefs(uri), aUriStr);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // are we allowed to load this one?
   rv = secman->CheckLoadURIWithPrincipal(principal, uri,
                   nsIScriptSecurityManager::DISALLOW_INHERIT_PRINCIPAL);
   return rv;
 }
 
@@ -109,20 +109,20 @@ amInstallTrigger::GetJSContext()
   nsresult rv = cc->GetJSContext(&cx);
   if (NS_FAILED(rv))
     return nsnull;
 
   return cx;
 }
 
 already_AddRefed<nsIDOMWindowInternal>
-amInstallTrigger::GetOriginatingWindow(JSContext* cx)
+amInstallTrigger::GetOriginatingWindow(JSContext* aCx)
 {
   nsIScriptGlobalObject *globalObject = nsnull;
-  nsIScriptContext *scriptContext = GetScriptContextFromJSContext(cx);
+  nsIScriptContext *scriptContext = GetScriptContextFromJSContext(aCx);
   if (!scriptContext)
     return nsnull;
 
   globalObject = scriptContext->GetGlobalObject();
   if (!globalObject)
     return nsnull;
 
   nsCOMPtr<nsIDOMWindowInternal> window = do_QueryInterface(globalObject);
@@ -157,26 +157,26 @@ amInstallTrigger::Enabled(PRBool *_retva
   nsCOMPtr<nsIDOMWindowInternal> window = GetOriginatingWindow(GetJSContext());
   nsCOMPtr<nsIURI> referer = GetOriginatingURI(window);
 
   return mManager->IsInstallEnabled(NS_LITERAL_STRING("application/x-xpinstall"), referer, _retval);
 }
 
 /* boolean install (in nsIVariant args, [optional] in amIInstallCallback callback); */
 NS_IMETHODIMP
-amInstallTrigger::Install(nsIVariant *args,
-                          amIInstallCallback *callback,
+amInstallTrigger::Install(nsIVariant *aArgs,
+                          amIInstallCallback *aCallback,
                           PRBool *_retval NS_OUTPARAM)
 {
   JSContext *cx = GetJSContext();
   nsCOMPtr<nsIDOMWindowInternal> window = GetOriginatingWindow(cx);
   nsCOMPtr<nsIURI> referer = GetOriginatingURI(window);
 
   jsval params;
-  nsresult rv = args->GetAsJSVal(&params);
+  nsresult rv = aArgs->GetAsJSVal(&params);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (!JSVAL_IS_OBJECT(params) || !JSVAL_TO_OBJECT(params))
     return NS_ERROR_INVALID_ARG;
 
   JSIdArray *ida = JS_Enumerate(cx, JSVAL_TO_OBJECT(params));
   if (!ida)
     return NS_ERROR_FAILURE;
@@ -282,56 +282,56 @@ amInstallTrigger::Install(nsIVariant *ar
     hashes.AppendElement(hash);
   }
 
   JS_DestroyIdArray(cx, ida);
 
   rv = mManager->InstallAddonsFromWebpage(NS_LITERAL_STRING("application/x-xpinstall"),
                                           window, referer, uris.Elements(),
                                           hashes.Elements(), names.Elements(),
-                                          icons.Elements(), callback, count,
+                                          icons.Elements(), aCallback, count,
                                           _retval);
 
   for (PRUint32 i = 0; i < uris.Length(); i++) {
     NS_Free(const_cast<PRUnichar*>(uris[i]));
     if (icons[i])
       NS_Free(const_cast<PRUnichar*>(icons[i]));
   }
 
   return rv;
 }
 
 /* boolean installChrome (in PRUint32 type, in AString url, in AString skin); */
 NS_IMETHODIMP
-amInstallTrigger::InstallChrome(PRUint32 type,
-                                const nsAString & url,
-                                const nsAString & skin,
+amInstallTrigger::InstallChrome(PRUint32 aType,
+                                const nsAString & aUrl,
+                                const nsAString & aSkin,
                                 PRBool *_retval NS_OUTPARAM)
 {
-  return StartSoftwareUpdate(url, 0, _retval);
+  return StartSoftwareUpdate(aUrl, 0, _retval);
 }
 
 /* boolean startSoftwareUpdate (in AString url, [optional] in PRInt32 flags); */
 NS_IMETHODIMP
-amInstallTrigger::StartSoftwareUpdate(const nsAString & url,
-                                      PRInt32 flags,
+amInstallTrigger::StartSoftwareUpdate(const nsAString & aUrl,
+                                      PRInt32 aFlags,
                                       PRBool *_retval NS_OUTPARAM)
 {
   nsresult rv;
 
   JSContext *cx = GetJSContext();
   nsCOMPtr<nsIDOMWindowInternal> window = GetOriginatingWindow(cx);
   nsCOMPtr<nsIURI> referer = GetOriginatingURI(window);
 
   nsTArray<const PRUnichar*> names;
   nsTArray<const PRUnichar*> uris;
   nsTArray<const PRUnichar*> icons;
   nsTArray<const PRUnichar*> hashes;
 
-  nsCString tmpURI = NS_ConvertUTF16toUTF8(url);
+  nsCString tmpURI = NS_ConvertUTF16toUTF8(aUrl);
   // Get relative URL to load
   if (referer) {
     rv = referer->Resolve(tmpURI, tmpURI);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   rv = CheckLoadURIFromScript(cx, tmpURI);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -352,19 +352,19 @@ amInstallTrigger::StartSoftwareUpdate(co
 
 NS_DECL_CLASSINFO(amInstallTrigger)
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(amInstallTrigger)
 
 static NS_METHOD
 RegisterInstallTrigger(nsIComponentManager *aCompMgr,
                        nsIFile *aPath,
-                       const char *registryLocation,
-                       const char *componentType,
-                       const nsModuleComponentInfo *info)
+                       const char *aRegistryLocation,
+                       const char *aComponentType,
+                       const nsModuleComponentInfo *aInfo)
 {
   nsresult rv = NS_OK;
 
   nsCOMPtr<nsICategoryManager> catman = 
     do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsXPIDLCString previous;
--- a/toolkit/mozapps/extensions/amInstallTrigger.h
+++ b/toolkit/mozapps/extensions/amInstallTrigger.h
@@ -53,13 +53,13 @@ public:
   NS_DECL_AMIINSTALLTRIGGER
 
   amInstallTrigger();
 
 private:
   ~amInstallTrigger();
 
   JSContext* GetJSContext();
-  already_AddRefed<nsIDOMWindowInternal> GetOriginatingWindow(JSContext* cx);
+  already_AddRefed<nsIDOMWindowInternal> GetOriginatingWindow(JSContext* aCx);
   already_AddRefed<nsIURI> GetOriginatingURI(nsIDOMWindowInternal* aWindow);
 
   nsCOMPtr<amIWebInstaller> mManager;
 };
--- a/toolkit/mozapps/extensions/amWebInstallListener.js
+++ b/toolkit/mozapps/extensions/amWebInstallListener.js
@@ -50,53 +50,53 @@ const Cr = Components.results;
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/AddonManager.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 /**
  * Logs a warning message
  *
- * @param   str
- *          The string to log
+ * @param  aStr
+ *         The string to log
  */
-function WARN(str) {
-  dump("*** addons.weblistener: " + str + "\n");
+function WARN(aStr) {
+  dump("*** addons.weblistener: " + aStr + "\n");
 }
 
 /**
  * Creates a new installer to monitor downloads and prompt to install when
  * ready
  *
- * @param    window
- *           The window that started the installations
- * @param    url
- *           The URL that started the installations
- * @installs installs
- *           An array of AddonInstalls
+ * @param  aWindow
+ *         The window that started the installations
+ * @param  aUrl
+ *         The URL that started the installations
+ * @param  aInstalls
+ *         An array of AddonInstalls
  */
-function Installer(window, url, installs) {
-  this.window = window;
-  this.url = url;
-  this.downloads = installs;
+function Installer(aWindow, aUrl, aInstalls) {
+  this.window = aWindow;
+  this.url = aUrl;
+  this.downloads = aInstalls;
   this.installs = [];
 
   this.bundle = Cc["@mozilla.org/intl/stringbundle;1"].
                 getService(Ci.nsIStringBundleService).
                 createBundle("chrome://mozapps/locale/extensions/extensions.properties");
 
-  this.count = installs.length;
-  installs.forEach(function(install) {
-    install.addListener(this);
+  this.count = aInstalls.length;
+  aInstalls.forEach(function(aInstall) {
+    aInstall.addListener(this);
 
     // Might already be a local file
-    if (install.state == AddonManager.STATE_DOWNLOADED)
-      this.onDownloadEnded(install);
+    if (aInstall.state == AddonManager.STATE_DOWNLOADED)
+      this.onDownloadEnded(aInstall);
     else
-      install.install();
+      aInstall.install();
   }, this);
 }
 
 Installer.prototype = {
   window: null,
   downloads: null,
   installs: null,
   count: null,
@@ -116,106 +116,106 @@ Installer.prototype = {
     args.url = this.url;
     args.installs = this.installs;
     args.wrappedJSObject = args;
 
     Services.ww.openWindow(this.window, "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul",
                            null, "chrome,modal,centerscreen", args);
   },
 
-  onDownloadCancelled: function(install) {
-    install.removeListener(this);
+  onDownloadCancelled: function(aInstall) {
+    aInstall.removeListener(this);
 
     this.checkAllDownloaded();
   },
 
-  onDownloadFailed: function(install, error) {
-    install.removeListener(this);
+  onDownloadFailed: function(aInstall, aError) {
+    aInstall.removeListener(this);
 
     // TODO show some better error
-    Services.prompt.alert(this.window, "Download Failed", "The download of " + install.sourceURL + " failed: " + error);
+    Services.prompt.alert(this.window, "Download Failed", "The download of " + aInstall.sourceURL + " failed: " + aError);
     this.checkAllDownloaded();
   },
 
-  onDownloadEnded: function(install) {
-    install.removeListener(this);
+  onDownloadEnded: function(aInstall) {
+    aInstall.removeListener(this);
 
-    if (install.addon.appDisabled) {
+    if (aInstall.addon.appDisabled) {
       // App disabled items are not compatible
-      install.cancel();
+      aInstall.cancel();
 
       let title = null;
       let text = null;
 
       let problems = "";
-      if (!install.addon.isCompatible)
+      if (!aInstall.addon.isCompatible)
         problems += "incompatible, ";
-      if (!install.addon.providesUpdatesSecurely)
+      if (!aInstall.addon.providesUpdatesSecurely)
         problems += "insecure updates, ";
-      if (install.addon.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED) {
+      if (aInstall.addon.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED) {
         problems += "blocklisted, ";
         title = bundle.GetStringFromName("blocklistedInstallTitle2");
         text = this.bundle.formatStringFromName("blocklistedInstallMsg2",
                                                 [install.addon.name], 1);
       }
       problems = problems.substring(0, problems.length - 2);
-      WARN("Not installing " + install.addon.id + " because of the following: " + problems);
+      WARN("Not installing " + aInstall.addon.id + " because of the following: " + problems);
 
       title = this.bundle.GetStringFromName("incompatibleTitle2", 1);
       text = this.bundle.formatStringFromName("incompatibleMessage",
-                                              [install.addon.name,
-                                               install.addon.version,
+                                              [aInstall.addon.name,
+                                               aInstall.addon.version,
                                                Services.appinfo.name,
                                                Services.appinfo.version], 4);
       Services.prompt.alert(this.window, title, text);
     }
     else {
-      this.installs.push(install);
+      this.installs.push(aInstall);
     }
 
     this.checkAllDownloaded();
     return false;
   },
 };
 
 function extWebInstallListener() {
 }
 
 extWebInstallListener.prototype = {
   /**
    * @see amIWebInstallListener.idl
    */
-  onWebInstallBlocked: function(window, uri, installs) {
+  onWebInstallBlocked: function(aWindow, aUri, aInstalls) {
     let info = {
-      originatingWindow: window,
-      originatingURI: uri,
-      installs: installs,
+      originatingWindow: aWindow,
+      originatingURI: aUri,
+      installs: aInstalls,
 
       install: function() {
         dump("Start installs\n");
         new Installer(this.originatingWindow, this.originatingURI, this.installs);
       },
 
       QueryInterface: XPCOMUtils.generateQI([Ci.amIWebInstallInfo])
     };
     Services.obs.notifyObservers(info, "addon-install-blocked", null);
 
     return false;
   },
 
   /**
    * @see amIWebInstallListener.idl
    */
-  onWebInstallRequested: function(window, uri, installs) {
-    new Installer(window, uri, installs);
+  onWebInstallRequested: function(aWindow, aUri, aInstalls) {
+    new Installer(aWindow, aUri, aInstalls);
 
     // We start the installs ourself
     return false;
   },
 
   classDescription: "XPI Install Handler",
   contractID: "@mozilla.org/addons/web-install-listener;1",
   classID: Components.ID("{0f38e086-89a3-40a5-8ffc-9b694de1d04a}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.amIWebInstallListener])
 };
 
-function NSGetModule(compMgr, fileSpec)
+function NSGetModule(aCompMgr, aFileSpec)
   XPCOMUtils.generateModule([extWebInstallListener]);
--- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
@@ -61,136 +61,136 @@ function createAppInfo(id, name, version
   registrar.registerFactory(XULAPPINFO_CID, "XULAppInfo",
                             XULAPPINFO_CONTRACTID, XULAppInfoFactory);
 }
 
 /**
  * Tests that an add-on does appear in the crash report annotations, if
  * crash reporting is enabled. The test will fail if the add-on is not in the
  * annotation.
- * @param   id
- *          The ID of the add-on
- * @param   version
- *          The version of the add-on
+ * @param  aId
+ *         The ID of the add-on
+ * @param  aVersion
+ *         The version of the add-on
  */
-function do_check_in_crash_annotation(id, version) {
+function do_check_in_crash_annotation(aId, aVersion) {
   if (!("nsICrashReporter" in AM_Ci))
     return;
 
   if (!("Add-ons" in gAppInfo.annotations)) {
     do_check_false(true);
     return;
   }
 
   let addons = gAppInfo.annotations["Add-ons"].split(",");
-  do_check_false(addons.indexOf(id + ":" + version) < 0);
+  do_check_false(addons.indexOf(aId + ":" + aVersion) < 0);
 }
 
 /**
  * Tests that an add-on does not appear in the crash report annotations, if
  * crash reporting is enabled. The test will fail if the add-on is in the
  * annotation.
- * @param   id
- *          The ID of the add-on
- * @param   version
- *          The version of the add-on
+ * @param  aId
+ *         The ID of the add-on
+ * @param  aVersion
+ *         The version of the add-on
  */
-function do_check_not_in_crash_annotation(id, version) {
+function do_check_not_in_crash_annotation(aId, aVersion) {
   if (!("nsICrashReporter" in AM_Ci))
     return;
 
   if (!("Add-ons" in gAppInfo.annotations)) {
     do_check_true(true);
     return;
   }
 
   let addons = gAppInfo.annotations["Add-ons"].split(",");
-  do_check_true(addons.indexOf(id + ":" + version) < 0);
+  do_check_true(addons.indexOf(aId + ":" + aVersion) < 0);
 }
 
 /**
  * Returns a testcase xpi
  *
- * @param   name
- *          The name of the testcase (without extension)
- * @return  an nsILocalFile pointing to the testcase xpi
+ * @param  aName
+ *         The name of the testcase (without extension)
+ * @return an nsILocalFile pointing to the testcase xpi
  */
-function do_get_addon(name) {
-  return do_get_file("addons/" + name + ".xpi");
+function do_get_addon(aName) {
+  return do_get_file("addons/" + aName + ".xpi");
 }
 
 /**
  * Starts up the add-on manager as if it was started by the application. This
  * will simulate any restarts requested by the manager.
  *
- * @param   expectedRestarts
- *          An optional parameter to specify the expected number of restarts.
- *          If passed and the number of restarts requested differs then the
- *          test will fail
- * @param   appChanged
- *          An optional boolean parameter to simulate the case where the
- *          application has changed version since the last run. If not passed it
- *          defaults to true
+ * @param  aExpectedRestarts
+ *         An optional parameter to specify the expected number of restarts.
+ *         If passed and the number of restarts requested differs then the
+ *         test will fail
+ * @param  aAppChanged
+ *         An optional boolean parameter to simulate the case where the
+ *         application has changed version since the last run. If not passed it
+ *         defaults to true
  */
-function startupManager(expectedRestarts, appChanged) {
+function startupManager(aExpectedRestarts, aAppChanged) {
   if (gInternalManager)
     do_throw("Test attempt to startup manager that was already started.");
 
-  if (appChanged === undefined)
-    appChanged = true;
+  if (aAppChanged === undefined)
+    aAppChanged = true;
 
   // Load the add-ons list as it was during application startup
-  loadAddonsList(appChanged);
+  loadAddonsList(aAppChanged);
 
   gInternalManager = AM_Cc["@mozilla.org/addons/integration;1"].
                      getService(AM_Ci.nsIObserver).
                      QueryInterface(AM_Ci.nsITimerCallback);
 
   gInternalManager.observe(null, "profile-after-change", "startup");
 
   let appStartup = AM_Cc["@mozilla.org/toolkit/app-startup;1"].
                    getService(AM_Ci.nsIAppStartup2);
-  var restart = appChanged || appStartup.needsRestart;
+  var restart = aAppChanged || appStartup.needsRestart;
   appStartup.needsRestart = false;
 
   if (restart) {
-    if (expectedRestarts !== undefined)
-      restartManager(expectedRestarts - 1);
+    if (aExpectedRestarts !== undefined)
+      restartManager(aExpectedRestarts - 1);
     else
       restartManager();
   }
-  else if (expectedRestarts !== undefined) {
-    if (expectedRestarts > 0)
-      do_throw("Expected to need to restart " + expectedRestarts + " more times");
-    else if (expectedRestarts < 0)
-      do_throw("Restarted " + (-expectedRestarts) + " more times than expected");
+  else if (aExpectedRestarts !== undefined) {
+    if (aExpectedRestarts > 0)
+      do_throw("Expected to need to restart " + aExpectedRestarts + " more times");
+    else if (aExpectedRestarts < 0)
+      do_throw("Restarted " + (-aExpectedRestarts) + " more times than expected");
   }
 }
 
 /**
  * Restarts the add-on manager as if the host application was restarted. This
  * will simulate any restarts requested by the manager.
  *
- * @param   expectedRestarts
- *          An optional parameter to specify the expected number of restarts.
- *          If passed and the number of restarts requested differs then the
- *          test will fail
- * @param   newVersion
- *          An optional new version to use for the application. Passing this
- *          will change nsIXULAppInfo.version and make the startup appear as if
- *          the application version has changed.
+ * @param  aExpectedRestarts
+ *         An optional parameter to specify the expected number of restarts.
+ *         If passed and the number of restarts requested differs then the
+ *         test will fail
+ * @param  aNewVersion
+ *         An optional new version to use for the application. Passing this
+ *         will change nsIXULAppInfo.version and make the startup appear as if
+ *         the application version has changed.
  */
-function restartManager(expectedRestarts, newVersion) {
+function restartManager(aExpectedRestarts, aNewVersion) {
   shutdownManager();
-  if (newVersion) {
-    gAppInfo.version = newVersion;
-    startupManager(expectedRestarts, true);
+  if (aNewVersion) {
+    gAppInfo.version = aNewVersion;
+    startupManager(aExpectedRestarts, true);
   }
   else {
-    startupManager(expectedRestarts, false);
+    startupManager(aExpectedRestarts, false);
   }
 }
 
 function shutdownManager() {
   if (!gInternalManager)
     return;
 
   let obs = AM_Cc["@mozilla.org/observer-service;1"].
@@ -198,22 +198,22 @@ function shutdownManager() {
   obs.notifyObservers(null, "quit-application-granted", null);
   gInternalManager.observe(null, "xpcom-shutdown", null);
   gInternalManager = null;
 
   // Clear any crash report annotations
   gAppInfo.annotations = {};
 }
 
-function loadAddonsList(appChanged) {
-  function readDirectories(section) {
+function loadAddonsList(aAppChanged) {
+  function readDirectories(aSection) {
     var dirs = [];
-    var keys = parser.getKeys(section);
+    var keys = parser.getKeys(aSection);
     while (keys.hasMore()) {
-      let descriptor = parser.getString(section, keys.getNext());
+      let descriptor = parser.getString(aSection, keys.getNext());
       try {
         let file = AM_Cc["@mozilla.org/file/local;1"].
                    createInstance(AM_Ci.nsILocalFile);
         file.persistentDescriptor = descriptor;
         dirs.push(file);
       }
       catch (e) {
         // Throws if the directory doesn't exist, we can ignore this since the
@@ -227,229 +227,229 @@ function loadAddonsList(appChanged) {
     extensions: [],
     themes: []
   };
 
   var file = gProfD.clone();
   file.append("extensions.ini");
   if (!file.exists())
     return;
-  if (appChanged) {
+  if (aAppChanged) {
     file.remove(true);
     return;
   }
 
   var factory = AM_Cc["@mozilla.org/xpcom/ini-parser-factory;1"].
                 getService(AM_Ci.nsIINIParserFactory);
   var parser = factory.createINIParser(file);
   gAddonsList.extensions = readDirectories("ExtensionDirs");
   gAddonsList.themes = readDirectories("ThemeDirs");
 }
 
-function isItemInAddonsList(type, dir, id) {
-  var path = dir.clone();
-  path.append(id);
-  for (var i = 0; i < gAddonsList[type].length; i++) {
-    if (gAddonsList[type][i].equals(path))
+function isItemInAddonsList(aType, aDir, aId) {
+  var path = aDir.clone();
+  path.append(aId);
+  for (var i = 0; i < gAddonsList[aType].length; i++) {
+    if (gAddonsList[aType][i].equals(path))
       return true;
   }
   return false;
 }
 
-function isThemeInAddonsList(dir, id) {
-  return isItemInAddonsList("themes", dir, id);
+function isThemeInAddonsList(aDir, aId) {
+  return isItemInAddonsList("themes", aDir, aId);
 }
 
-function isExtensionInAddonsList(dir, id) {
-  return isItemInAddonsList("extensions", dir, id);
+function isExtensionInAddonsList(aDir, aId) {
+  return isItemInAddonsList("extensions", aDir, aId);
 }
 
 /**
  * Escapes any occurances of &, ", < or > with XML entities.
  *
  * @param   str
  *          The string to escape
  * @return  The escaped string
  */
-function escapeXML(str) {
-  return str.toString()
-            .replace(/&/g, "&amp;")
-            .replace(/"/g, "&quot;")
-            .replace(/</g, "&lt;")
-            .replace(/>/g, "&gt;");
+function escapeXML(aStr) {
+  return aStr.toString()
+             .replace(/&/g, "&amp;")
+             .replace(/"/g, "&quot;")
+             .replace(/</g, "&lt;")
+             .replace(/>/g, "&gt;");
 }
 
-function writeLocaleStrings(data) {
+function writeLocaleStrings(aData) {
   let rdf = "";
-  ["name", "description", "creator", "homepageURL"].forEach(function(prop) {
-    if (prop in data)
-      rdf += "<em:" + prop + ">" + escapeXML(data[prop]) + "</em:" + prop + ">\n";
+  ["name", "description", "creator", "homepageURL"].forEach(function(aProp) {
+    if (aProp in aData)
+      rdf += "<em:" + aProp + ">" + escapeXML(aData[aProp]) + "</em:" + aProp + ">\n";
   });
 
-  ["developer", "translator", "contributor"].forEach(function(prop) {
-    if (prop in data) {
-      data[prop].forEach(function(value) {
-        rdf += "<em:" + prop + ">" + escapeXML(value) + "</em:" + prop + ">\n";
+  ["developer", "translator", "contributor"].forEach(function(aProp) {
+    if (aProp in aData) {
+      aData[aProp].forEach(function(aValue) {
+        rdf += "<em:" + aProp + ">" + escapeXML(aValue) + "</em:" + aProp + ">\n";
       });
     }
   });
   return rdf;
 }
 
 /**
  * Writes an install.rdf manifest into a directory using the properties passed
  * in a JS object. The objects should contain a property for each property to
  * appear in the RDFThe object may contain an array of objects with id,
  * minVersion and maxVersion in the targetApplications property to give target
  * application compatibility.
  *
- * @param   data
+ * @param   aData
  *          The object holding data about the add-on
- * @param   dir
+ * @param   aDir
  *          The directory to add the install.rdf to
  */
-function writeInstallRDFToDir(data, dir) {
+function writeInstallRDFToDir(aData, aDir) {
   var rdf = '<?xml version="1.0"?>\n';
   rdf += '<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n' +
          '     xmlns:em="http://www.mozilla.org/2004/em-rdf#">\n';
   rdf += '<Description about="urn:mozilla:install-manifest">\n';
 
   ["id", "version", "type", "internalName", "updateURL", "updateKey",
-   "optionsURL", "aboutURL", "iconURL"].forEach(function(prop) {
-    if (prop in data)
-      rdf += "<em:" + prop + ">" + escapeXML(data[prop]) + "</em:" + prop + ">\n";
+   "optionsURL", "aboutURL", "iconURL"].forEach(function(aProp) {
+    if (aProp in aData)
+      rdf += "<em:" + aProp + ">" + escapeXML(aData[aProp]) + "</em:" + aProp + ">\n";
   });
 
-  rdf += writeLocaleStrings(data);
+  rdf += writeLocaleStrings(aData);
 
-  if ("targetApplications" in data) {
-    data.targetApplications.forEach(function(app) {
+  if ("targetApplications" in aData) {
+    aData.targetApplications.forEach(function(aApp) {
       rdf += "<em:targetApplication><Description>\n";
-      ["id", "minVersion", "maxVersion"].forEach(function(prop) {
-        if (prop in app)
-          rdf += "<em:" + prop + ">" + escapeXML(app[prop]) + "</em:" + prop + ">\n";
+      ["id", "minVersion", "maxVersion"].forEach(function(aProp) {
+        if (aProp in aApp)
+          rdf += "<em:" + aProp + ">" + escapeXML(aApp[aProp]) + "</em:" + aProp + ">\n";
       });
       rdf += "</Description></em:targetApplication>\n";
     });
   }
 
   rdf += "</Description>\n</RDF>\n";
 
-  if (!dir.exists())
-    dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755);
-  var file = dir.clone();
+  if (!aDir.exists())
+    aDir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755);
+  var file = aDir.clone();
   file.append("install.rdf");
   if (file.exists())
     file.remove(true);
   var fos = AM_Cc["@mozilla.org/network/file-output-stream;1"].
             createInstance(AM_Ci.nsIFileOutputStream);
   fos.init(file,
            FileUtils.MODE_WRONLY | FileUtils.MODE_CREATE | FileUtils.MODE_TRUNCATE,
            FileUtils.PERMS_FILE, 0);
   fos.write(rdf, rdf.length);
   fos.close();
 }
 
-function registerDirectory(key, dir) {
+function registerDirectory(aKey, aDir) {
   var dirProvider = {
-    getFile: function(prop, persistent) {
-      persistent.value = true;
-      if (prop == key)
-        return dir.clone();
+    getFile: function(aProp, aPersistent) {
+      aPersistent.value = true;
+      if (aProp == aKey)
+        return aDir.clone();
       return null;
     },
 
     QueryInterface: XPCOMUtils.generateQI([AM_Ci.nsIDirectoryServiceProvider,
                                            AM_Ci.nsISupports])
   };
   Services.dirsvc.registerProvider(dirProvider);
 }
 
 var gExpectedEvents = {};
 var gExpectedInstalls = [];
 var gNext = null;
 
-function getExpectedEvent(id) {
-  if (!(id in gExpectedEvents))
-    do_throw("Wasn't expecting events for " + id);
-  if (gExpectedEvents[id].length == 0)
-    do_throw("Too many events for " + id);
-  let event = gExpectedEvents[id].shift();
+function getExpectedEvent(aId) {
+  if (!(aId in gExpectedEvents))
+    do_throw("Wasn't expecting events for " + aId);
+  if (gExpectedEvents[aId].length == 0)
+    do_throw("Too many events for " + aId);
+  let event = gExpectedEvents[aId].shift();
   if (event instanceof Array)
     return event;
   return [event, true];
 }
 
 const AddonListener = {
-  onEnabling: function(addon, requiresRestart) {
-    let [event, expectedRestart] = getExpectedEvent(addon.id);
+  onEnabling: function(aAddon, aRequiresRestart) {
+    let [event, expectedRestart] = getExpectedEvent(aAddon.id);
     do_check_eq("onEnabling", event);
-    do_check_eq(requiresRestart, expectedRestart);
+    do_check_eq(aRequiresRestart, expectedRestart);
     if (expectedRestart)
-      do_check_true(hasFlag(addon.pendingOperations, AddonManager.PENDING_ENABLE));
-    do_check_false(hasFlag(addon.permissions, AddonManager.PERM_CAN_ENABLE));
+      do_check_true(hasFlag(aAddon.pendingOperations, AddonManager.PENDING_ENABLE));
+    do_check_false(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_ENABLE));
     return check_test_completed(arguments);
   },
 
-  onEnabled: function(addon) {
-    let [event, expectedRestart] = getExpectedEvent(addon.id);
+  onEnabled: function(aAddon) {
+    let [event, expectedRestart] = getExpectedEvent(aAddon.id);
     do_check_eq("onEnabled", event);
-    do_check_false(hasFlag(addon.permissions, AddonManager.PERM_CAN_ENABLE));
+    do_check_false(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_ENABLE));
     return check_test_completed(arguments);
   },
 
-  onDisabling: function(addon, requiresRestart) {
-    let [event, expectedRestart] = getExpectedEvent(addon.id);
+  onDisabling: function(aAddon, aRequiresRestart) {
+    let [event, expectedRestart] = getExpectedEvent(aAddon.id);
     do_check_eq("onDisabling", event);
-    do_check_eq(requiresRestart, expectedRestart);
+    do_check_eq(aRequiresRestart, expectedRestart);
     if (expectedRestart)
-      do_check_true(hasFlag(addon.pendingOperations, AddonManager.PENDING_DISABLE));
-    do_check_false(hasFlag(addon.permissions, AddonManager.PERM_CAN_DISABLE));
+      do_check_true(hasFlag(aAddon.pendingOperations, AddonManager.PENDING_DISABLE));
+    do_check_false(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_DISABLE));
     return check_test_completed(arguments);
   },
 
-  onDisabled: function(addon) {
-    let [event, expectedRestart] = getExpectedEvent(addon.id);
+  onDisabled: function(aAddon) {
+    let [event, expectedRestart] = getExpectedEvent(aAddon.id);
     do_check_eq("onDisabled", event);
-    do_check_false(hasFlag(addon.permissions, AddonManager.PERM_CAN_DISABLE));
+    do_check_false(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_DISABLE));
     return check_test_completed(arguments);
   },
 
-  onInstalling: function(addon, requiresRestart) {
-    let [event, expectedRestart] = getExpectedEvent(addon.id);
+  onInstalling: function(aAddon, aRequiresRestart) {
+    let [event, expectedRestart] = getExpectedEvent(aAddon.id);
     do_check_eq("onInstalling", event);
-    do_check_eq(requiresRestart, expectedRestart);
+    do_check_eq(aRequiresRestart, expectedRestart);
     if (expectedRestart)
-      do_check_true(hasFlag(addon.pendingOperations, AddonManager.PENDING_INSTALL));
+      do_check_true(hasFlag(aAddon.pendingOperations, AddonManager.PENDING_INSTALL));
     return check_test_completed(arguments);
   },
 
-  onInstalled: function(addon) {
-    let [event, expectedRestart] = getExpectedEvent(addon.id);
+  onInstalled: function(aAddon) {
+    let [event, expectedRestart] = getExpectedEvent(aAddon.id);
     do_check_eq("onInstalled", event);
     return check_test_completed(arguments);
   },
 
-  onUninstalling: function(addon, requiresRestart) {
-    let [event, expectedRestart] = getExpectedEvent(addon.id);
+  onUninstalling: function(aAddon, aRequiresRestart) {
+    let [event, expectedRestart] = getExpectedEvent(aAddon.id);
     do_check_eq("onUninstalling", event);
-    do_check_eq(requiresRestart, expectedRestart);
+    do_check_eq(aRequiresRestart, expectedRestart);
     if (expectedRestart)
-      do_check_true(hasFlag(addon.pendingOperations, AddonManager.PENDING_UNINSTALL));
+      do_check_true(hasFlag(aAddon.pendingOperations, AddonManager.PENDING_UNINSTALL));
     return check_test_completed(arguments);
   },
 
-  onUninstalled: function(addon) {
-    let [event, expectedRestart] = getExpectedEvent(addon.id);
+  onUninstalled: function(aAddon) {
+    let [event, expectedRestart] = getExpectedEvent(aAddon.id);
     do_check_eq("onUninstalled", event);
     return check_test_completed(arguments);
   },
 
-  onOperationCancelled: function(addon) {
-    let [event, expectedRestart] = getExpectedEvent(addon.id);
+  onOperationCancelled: function(aAddon) {
+    let [event, expectedRestart] = getExpectedEvent(aAddon.id);
     do_check_eq("onOperationCancelled", event);
     return check_test_completed(arguments);
   }
 };
 
 const InstallListener = {
   onNewInstall: function(install) {
     if (install.state != AddonManager.STATE_DOWNLOADED &&
@@ -502,51 +502,51 @@ const InstallListener = {
   },
 
   onInstallCancelled: function(install) {
     do_check_eq(install.state, AddonManager.STATE_CANCELLED);
     do_check_eq("onInstallCancelled", gExpectedInstalls.shift());
     return check_test_completed(arguments);
   },
 
-  onExternalInstall: function(addon, existingAddon, requiresRestart) {
+  onExternalInstall: function(aAddon, existingAddon, aRequiresRestart) {
     do_check_eq("onExternalInstall", gExpectedInstalls.shift());
-    do_check_false(requiresRestart);
+    do_check_false(aRequiresRestart);
     return check_test_completed(arguments);
   }
 };
 
-function hasFlag(bits, flag) {
-  return (bits & flag) != 0;
+function hasFlag(aBits, aFlag) {
+  return (aBits & aFlag) != 0;
 }
 
 // Just a wrapper around setting the expected events
-function prepare_test(expectedEvents, expectedInstalls, next) {
+function prepare_test(aExpectedEvents, aExpectedInstalls, aNext) {
   AddonManager.addAddonListener(AddonListener);
   AddonManager.addInstallListener(InstallListener);
 
-  gExpectedInstalls = expectedInstalls;
-  gExpectedEvents = expectedEvents;
-  gNext = next;
+  gExpectedInstalls = aExpectedInstalls;
+  gExpectedEvents = aExpectedEvents;
+  gNext = aNext;
 }
 
 // Checks if all expected events have been seen and if so calls the callback
-function check_test_completed(args) {
+function check_test_completed(aArgs) {
   if (!gNext)
     return;
 
   if (gExpectedInstalls.length > 0)
     return;
 
   for (let id in gExpectedEvents) {
     if (gExpectedEvents[id].length > 0)
       return;
   }
 
-  return gNext.apply(null, args);
+  return gNext.apply(null, aArgs);
 }
 
 // Verifies that all the expected events for all add-ons were seen
 function ensure_test_completed() {
   for (let i in gExpectedEvents) {
     if (gExpectedEvents[i].length > 0)
       do_throw("Didn't see all the expected events for " + i);
   }
@@ -554,116 +554,116 @@ function ensure_test_completed() {
   if (gExpectedInstalls)
     do_check_eq(gExpectedInstalls.length, 0);
 }
 
 /**
  * A helper method to install an array of AddonInstall to completion and then
  * call a provided callback.
  *
- * @param   installs
+ * @param   aInstalls
  *          The array of AddonInstalls to install
- * @param   callback
+ * @param   aCallback
  *          The callback to call when all installs have finished
  */
-function completeAllInstalls(installs, callback) {
+function completeAllInstalls(aInstalls, aCallback) {
+  let count = aInstalls.length;
+
   if (count == 0) {
-    callback();
+    aCallback();
     return;
   }
 
-  let count = installs.length;
-
-  function installCompleted(install) {
-    install.removeListener(listener);
+  function installCompleted(aInstall) {
+    aInstall.removeListener(listener);
 
     if (--count == 0)
-      callback();
+      aCallback();
   }
 
   let listener = {
     onDownloadFailed: installCompleted,
     onDownloadCancelled: installCompleted,
     onInstallFailed: installCompleted,
     onInstallCancelled: installCompleted,
     onInstallEnded: installCompleted
   };
 
-  installs.forEach(function(install) {
-    install.addListener(listener);
-    install.install();
+  aInstalls.forEach(function(aInstall) {
+    aInstall.addListener(listener);
+    aInstall.install();
   });
 }
 
 /**
  * A helper method to install an array of files and call a callback after the
  * installs are completed.
  *
- * @param   files
+ * @param   aFiles
  *          The array of files to install
- * @param   callback
+ * @param   aCallback
  *          The callback to call when all installs have finished
- * @param   ignoreIncompatible
+ * @param   aIgnoreIncompatible
  *          Optional parameter to ignore add-ons that are incompatible in
  *          aome way with the application
  */
-function installAllFiles(files, callback, ignoreIncompatible) {
-  let count = files.length;
+function installAllFiles(aFiles, aCallback, aIgnoreIncompatible) {
+  let count = aFiles.length;
   let installs = [];
 
-  files.forEach(function(file) {
-    AddonManager.getInstallForFile(file, function(install) {
-      if (!install)
-        do_throw("No AddonInstall created for " + file.path);
+  aFiles.forEach(function(aFile) {
+    AddonManager.getInstallForFile(aFile, function(aInstall) {
+      if (!aInstall)
+        do_throw("No AddonInstall created for " + aFile.path);
 
-      if (!ignoreIncompatible || !install.addon.appDisabled)
-        installs.push(install);
+      if (!aIgnoreIncompatible || !aInstall.addon.appDisabled)
+        installs.push(aInstall);
 
       if (--count == 0)
-        completeAllInstalls(installs, callback);
+        completeAllInstalls(installs, aCallback);
     });
   });
 }
 
 if ("nsIWindowsRegKey" in AM_Ci) {
   var MockRegistry = {
     LOCAL_MACHINE: {},
     CURRENT_USER: {},
 
-    setValue: function(root, path, name, value) {
-      switch (root) {
+    setValue: function(aRoot, aPath, aName, aValue) {
+      switch (aRoot) {
       case AM_Ci.nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE:
         var rootKey = MockRegistry.LOCAL_MACHINE;
         break
       case AM_Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER:
         rootKey = MockRegistry.CURRENT_USER;
         break
       }
 
-      if (!(path in rootKey)) {
-        rootKey[path] = [];
+      if (!(aPath in rootKey)) {
+        rootKey[aPath] = [];
       }
       else {
-        for (let i = 0; i < rootKey[path].length; i++) {
-          if (rootKey[path][i].name == name) {
-            if (value === null)
-              rootKey[path].splice(i, 1);
+        for (let i = 0; i < rootKey[aPath].length; i++) {
+          if (rootKey[aPath][i].name == aName) {
+            if (aValue === null)
+              rootKey[aPath].splice(i, 1);
             else
-              rootKey[path][i].value = value;
+              rootKey[aPath][i].value = aValue;
             return;
           }
         }
       }
 
-      if (value === null)
+      if (aValue === null)
         return;
 
-      rootKey[path].push({
-        name: name,
-        value: value
+      rootKey[aPath].push({
+        name: aName,
+        value: aValue
       });
     }
   };
 
   /**
    * This is a mock nsIWindowsRegistry implementation. It only implements the
    * methods that the extension manager requires.
    */