B2G/gecko/toolkit/mozapps/extensions/AddonManager.jsm
/**
   * Determines whether an Addon should auto-update or not.
   *
   * @param  aAddon
   *         The Addon representing the add-on
   * @return true if the addon should auto-update, false otherwise.
   */
Determines whether an Addon should auto-update or not.
@param  aAddon
The Addon representing the add-on
@return true if the addon should auto-update, false otherwise.
Determines whether an Addon should auto - update or not . @param aAddon The Addon representing the add - on @return true if the addon should auto - update false otherwise .
function AM_shouldAutoUpdate(aAddon) {
    if (!aAddon || typeof aAddon != "object")
      throw Components.Exception("aAddon must be specified",
                                 Cr.NS_ERROR_INVALID_ARG);
    if (!("applyBackgroundUpdates" in aAddon))
      return false;
    if (aAddon.applyBackgroundUpdates == AddonManager.AUTOUPDATE_ENABLE)
      return true;
    if (aAddon.applyBackgroundUpdates == AddonManager.AUTOUPDATE_DISABLE)
      return false;
    return this.autoUpdateDefault;
  }
function AM_shouldAutoUpdate ( aAddon ) { if ( ! aAddon || typeof aAddon != "object" ) throw Components . Exception ( "aAddon must be specified" , Cr . NS_ERROR_INVALID_ARG ) ; if ( ! ( "applyBackgroundUpdates" in aAddon ) ) return false ; if ( aAddon . applyBackgroundUpdates == AddonManager . AUTOUPDATE_ENABLE ) return true ; if ( aAddon . applyBackgroundUpdates == AddonManager . AUTOUPDATE_DISABLE ) return false ; return this . autoUpdateDefault ; }
Determines whether an Addon should auto-update or not.
Determines whether an Addon should auto - update or not .