let ([rate, unit] = this._convertByteUnits(byteRate)) {  if (rate != this.priorRate) { if (this.rateChanges++ == this.rateChangeLimit) {  this.priorRate = rate; this.rateChanges = 0; } else {  rate = this.priorRate; } } else this.rateChanges = 0;  
let ([rate, unit] = this._convertByteUnits(aDownload.speed)) { 
  onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress,                              aCurTotalProgress, aMaxTotalProgress, aDownload)  {    var overallProgress = aCurTotalProgress;    // Get current time.    var now = (new Date()).getTime();        // If interval hasn't elapsed, ignore it.    if (now - this.lastUpdate < interval && aMaxTotalProgress != "-1" &&          parseInt(aCurTotalProgress) < parseInt(aMaxTotalProgress)) {      return;    }    // Update this time.    this.lastUpdate = now;    var downloadID = "dl" + aDownload.id;    var download = this.doc.getElementById(downloadID);    // Calculate percentage.    var percent;    if (aMaxTotalProgress > 0) {      percent = Math.floor((overallProgress*100.0)/aMaxTotalProgress);      if (percent > 100)        percent = 100;      // Advance progress meter.      if (download) {        download.setAttribute("progress", percent);        download.setAttribute("progressmode", "normal");                onUpdateProgress();      }    } else {      percent = -1;      // Progress meter should be barber-pole in this case.      download.setAttribute("progressmode", "undetermined");    }    // Now that we've set the progress and the time, update the UI with     // all the the pertinent information (bytes transferred, bytes total,    // download rate, time remaining).     let status = this._statusFormat;    // Update the bytes transferred and bytes total    let ([progress, progressUnits] = this._convertByteUnits(aCurTotalProgress),         [total, totalUnits] = this._convertByteUnits(aMaxTotalProgress),         transfer) {      if (total <= 0)        transfer = this._transferNoTotal;      else if (progressUnits == totalUnits)        transfer = this._transferSameUnits;      else        transfer = this._transferDiffUnits;      transfer = this._replaceInsert(transfer, 1, progress);      transfer = this._replaceInsert(transfer, 2, progressUnits);      transfer = this._replaceInsert(transfer, 3, total);      transfer = this._replaceInsert(transfer, 4, totalUnits);      // Insert 1 is the download progress      status = this._replaceInsert(status, 1, transfer);      if (download)        download.setAttribute("status-internal", transfer);    }    // Update the download rate    let ([rate, unit] = this._convertByteUnits(byteRate)) {      // Don't update too often!      if (rate != this.priorRate) {        if (this.rateChanges++ == this.rateChangeLimit) {          // Time to update download rate.          this.priorRate = rate;          this.rateChanges = 0;        } else {          // Stick with old rate for a bit longer.          rate = this.priorRate;        }      } else        this.rateChanges = 0;      // Insert 2 is the download rate      status = this._replaceInsert(status, 2, rate);      // Insert 3 is the |unit|/sec      status = this._replaceInsert(status, 3, unit);    }    // Update time remaining.    let (remain) {      if ((aDownload.speed > 0) && (aMaxTotalProgress > 0))        remain = this._formatSeconds((aMaxTotalProgress - aCurTotalProgress) /                                     aDownload.speed) + " " + this._remain;      else        remain = this._unknownTimeLeft;      // Insert 4 is the time remaining      status = this._replaceInsert(status, 4, remain);    }        if (download)      download.setAttribute("status", status);  },
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/fd16c650dcd1b4a1f0d9f511bcc4e8e0cb130c81/DownloadProgressListener.js/clean/toolkit/mozapps/downloads/content/DownloadProgressListener.js