B2G/gecko/browser/components/preferences/aboutPermissions.js
/**
   * Gets the number of history visits for the site.
   *
   * @param aCallback
   *        A function that takes the visit count (a number) as a parameter.
   */
Gets the number of history visits for the site.
@param aCallback
A function that takes the visit count (a number) as a parameter.
Gets the number of history visits for the site . @param aCallback A function that takes the visit count ( a number ) as a parameter .
function Site_getVisitCount(aCallback) {
    let rev_host = this.host.split("").reverse().join("") + ".";
    gVisitStmt.params.rev_host = rev_host;
    gVisitStmt.executeAsync({
      handleResult: function(aResults) {
        let row = aResults.getNextRow();
        let count = row.getResultByName("count") || 0;
        try {
          aCallback(count);
        } catch (e) {
          Cu.reportError("AboutPermissions: " + e);
        }
      },
      handleError: function(aError) {
        Cu.reportError("AboutPermissions: " + aError);
      },
      handleCompletion: function(aReason) {
      }
    });
  }
function Site_getVisitCount ( aCallback ) { let rev_host = this . host . split ( "" ) . reverse ( ) . join ( "" ) + "." ; gVisitStmt . params . rev_host = rev_host ; gVisitStmt . executeAsync ( { handleResult : function ( aResults ) { let row = aResults . getNextRow ( ) ; let count = row . getResultByName ( "count" ) || 0 ; try { aCallback ( count ) ; } catch ( e ) { Cu . reportError ( "AboutPermissions: " + e ) ; } } , handleError : function ( aError ) { Cu . reportError ( "AboutPermissions: " + aError ) ; } , handleCompletion : function ( aReason ) { } } ) ; }
Gets the number of history visits for the site.
Gets the number of history visits for the site .