B2G/gecko/browser/components/downloads/src/DownloadsCommon.jsm
/**
 * Represents a single item in the list of downloads.  This object either wraps
 * an existing nsIDownload from the Download Manager, or provides the same
 * information read directly from the downloads database, with the possibility
 * of querying the nsIDownload lazily, for performance reasons.
 *
 * @param aSource
 *        Object containing the data with which the item should be initialized.
 *        This should implement either nsIDownload or mozIStorageRow.
 */
Represents a single item in the list of downloads.  This object either wraps
an existing nsIDownload from the Download Manager, or provides the same
information read directly from the downloads database, with the possibility
of querying the nsIDownload lazily, for performance reasons.

@param aSource
Object containing the data with which the item should be initialized.
This should implement either nsIDownload or mozIStorageRow.
Represents a single item in the list of downloads . This object either wraps an existing nsIDownload from the Download Manager or provides the same information read directly from the downloads database with the possibility of querying the nsIDownload lazily for performance reasons . @param aSource Object containing the data with which the item should be initialized . This should implement either nsIDownload or mozIStorageRow .
function DownloadsDataItem(aSource)
{
  if (aSource instanceof Ci.nsIDownload) {
    this._initFromDownload(aSource);
  } else {
    this._initFromDataRow(aSource);
  }
}
function DownloadsDataItem ( aSource ) { if ( aSource instanceof Ci . nsIDownload ) { this . _initFromDownload ( aSource ) ; } else { this . _initFromDataRow ( aSource ) ; } }
Represents a single item in the list of downloads.
Represents a single item in the list of downloads .