B2G/gaia/apps/communications/dialer/js/call_log_db.js
/**
   * Delete all!
   *
   * param callback
   *        Function to be called to clear the database.
   *
   * return (via callback) error message if needed.
   */
Delete all.
param callback
Function to be called to clear the database.

return (via callback) error message if needed.
Delete all . param callback Function to be called to clear the database . return ( via callback ) error message if needed .
function deleteAll(callback) {
    var self = this;
    this._newTxn('readwrite', [this._dbRecentsStore, this._dbGroupsStore],
                 function(error, txn, stores) {
      if (error) {
        self._asyncReturn(callback, error);
        return;
      }
      var recentsStore = stores[0];
      var groupsStore = stores[1];
      recentsStore.clear().onsuccess = function onsuccess() {
        groupsStore.clear().onsuccess = function onsuccess() {
          self._asyncReturn(callback);
        };
      };
    });
  }
function deleteAll ( callback ) { var self = this ; this . _newTxn ( 'readwrite' , [ this . _dbRecentsStore , this . _dbGroupsStore ] , function ( error , txn , stores ) { if ( error ) { self . _asyncReturn ( callback , error ) ; return ; } var recentsStore = stores [ 0 ] ; var groupsStore = stores [ 1 ] ; recentsStore . clear ( ) . onsuccess = function onsuccess ( ) { groupsStore . clear ( ) . onsuccess = function onsuccess ( ) { self . _asyncReturn ( callback ) ; } ; } ; } ) ; }
Delete all!
Delete all!