B2G/gecko/browser/components/downloads/src/DownloadsCommon.jsm
/**
   * Called when a new download data item is available, either during the
   * asynchronous data load or when a new download is started.
   *
   * @param aDataItem
   *        DownloadsDataItem object that was just added.
   * @param aNewest
   *        When true, indicates that this item is the most recent and should be
   *        added in the topmost position.  This happens when a new download is
   *        started.  When false, indicates that the item is the least recent
   *        with regard to the items that have been already added. The latter
   *        generally happens during the asynchronous data load.
   */
Called when a new download data item is available, either during the
asynchronous data load or when a new download is started.

@param aDataItem
DownloadsDataItem object that was just added.
@param aNewest
When true, indicates that this item is the most recent and should be
added in the topmost position.  This happens when a new download is
started.  When false, indicates that the item is the least recent
with regard to the items that have been already added. The latter
generally happens during the asynchronous data load.
Called when a new download data item is available either during the asynchronous data load or when a new download is started . @param aDataItem DownloadsDataItem object that was just added . @param aNewest When true indicates that this item is the most recent and should be added in the topmost position . This happens when a new download is started . When false indicates that the item is the least recent with regard to the items that have been already added . The latter generally happens during the asynchronous data load .
function DID_onDataItemAdded(aDataItem, aNewest)
  {
    this._itemCount++;
    this._updateViews();
  }
function DID_onDataItemAdded ( aDataItem , aNewest ) { this . _itemCount ++ ; this . _updateViews ( ) ; }
Called when a new download data item is available, either during the
 asynchronous data load or when a new download is started.
Called when a new download data item is available either during the asynchronous data load or when a new download is started .