B2G/gecko/browser/components/preferences/aboutPermissions.js
/**
   * Gets the favicon to use for the site. The callback only gets called if
   * a favicon is found for either the http URI or the https URI.
   *
   * @param aCallback
   *        A callback function that takes a favicon image URL as a parameter.
   */
Gets the favicon to use for the site. The callback only gets called if
a favicon is found for either the http URI or the https URI.

@param aCallback
A callback function that takes a favicon image URL as a parameter.
Gets the favicon to use for the site . The callback only gets called if a favicon is found for either the http URI or the https URI . @param aCallback A callback function that takes a favicon image URL as a parameter .
function Site_getFavicon(aCallback) {
    function invokeCallback(aFaviconURI) {
      try {
        aCallback(gFaviconService.getFaviconLinkForIcon(aFaviconURI).spec);
      } catch (e) {
        Cu.reportError("AboutPermissions: " + e);
      }
    }
    gFaviconService.getFaviconURLForPage(this.httpsURI, function (aURI) {
      if (aURI) {
        invokeCallback(aURI);
      } else {
        gFaviconService.getFaviconURLForPage(this.httpURI, function (aURI) {
          if (aURI) {
            invokeCallback(aURI);
          }
        });
      }
    }.bind(this));
  }
function Site_getFavicon ( aCallback ) { function invokeCallback ( aFaviconURI ) { try { aCallback ( gFaviconService . getFaviconLinkForIcon ( aFaviconURI ) . spec ) ; } catch ( e ) { Cu . reportError ( "AboutPermissions: " + e ) ; } } gFaviconService . getFaviconURLForPage ( this . httpsURI , function ( aURI ) { if ( aURI ) { invokeCallback ( aURI ) ; } else { gFaviconService . getFaviconURLForPage ( this . httpURI , function ( aURI ) { if ( aURI ) { invokeCallback ( aURI ) ; } } ) ; } } . bind ( this ) ) ; }
Gets the favicon to use for the site.
Gets the favicon to use for the site .
// Use getFaviconLinkForIcon to get image data from the database instead // of using the favicon URI to fetch image data over the network. // Try to find favicon for both URIs, but always prefer the https favicon.