B2G/gecko/toolkit/components/url-classifier/content/multi-querier.js
/**
 * This class helps us batch a series of async calls to the db.
 * If any of the tokens is in the database, we fire callback with
 * true as a param.  If all the tokens are not in the  database,
 * we fire callback with false as a param.
 * This is an "Abstract" base class.  Subclasses need to supply
 * the condition_ method.
 *
 * @param tokens Array of strings to lookup in the db
 * @param tableName String name of the table
 * @param callback Function callback function that takes true if the condition
 *        passes.
 */
This class helps us batch a series of async calls to the db.
If any of the tokens is in the database, we fire callback with
true as a param.  If all the tokens are not in the  database,
we fire callback with false as a param.
This is an "Abstract" base class.  Subclasses need to supply
the condition_ method.

@param tokens Array of strings to lookup in the db
@param tableName String name of the table
@param callback Function callback function that takes true if the condition
passes.
This class helps us batch a series of async calls to the db . If any of the tokens is in the database we fire callback with true as a param . If all the tokens are not in the database we fire callback with false as a param . This is an " Abstract " base class . Subclasses need to supply the condition_ method . @param tokens Array of strings to lookup in the db @param tableName String name of the table @param callback Function callback function that takes true if the condition passes .
function MultiQuerier(tokens, tableName, callback) {
  this.tokens_ = tokens;
  this.tableName_ = tableName;
  this.callback_ = callback;
  this.dbservice_ = Cc["@mozilla.org/url-classifier/dbservice;1"]
                    .getService(Ci.nsIUrlClassifierDBService);
  this.key_ = null;
}
function MultiQuerier ( tokens , tableName , callback ) { this . tokens_ = tokens ; this . tableName_ = tableName ; this . callback_ = callback ; this . dbservice_ = Cc [ "@mozilla.org/url-classifier/dbservice;1" ] . getService ( Ci . nsIUrlClassifierDBService ) ; this . key_ = null ; }
This class helps us batch a series of async calls to the db.
This class helps us batch a series of async calls to the db .
// We put the current token in this variable.