apps/email/js/ext/mailapi/same-frame-setup.js
/**
 * Implements the interface of `MailSlice` as presented to `FolderStorage`, but
 * it is only interested in accumulating a list of new messages that have not
 * already been read.
 *
 * FUTURE WORK: Listen for changes that make a message that was previously
 * believed to be new no longer new, such as having been marked read by
 * another client.  We don't care about that right now because we lack the
 * ability to revoke notifications via the mozNotifications API.
 */
Implements the interface of `MailSlice` as presented to `FolderStorage`, but
it is only interested in accumulating a list of new messages that have not
already been read.

FUTURE WORK: Listen for changes that make a message that was previously
believed to be new no longer new, such as having been marked read by
another client.  We don't care about that right now because we lack the
ability to revoke notifications via the mozNotifications API.
Implements the interface of ` MailSlice ` as presented to ` FolderStorage ` but it is only interested in accumulating a list of new messages that have not already been read . FUTURE WORK : Listen for changes that make a message that was previously believed to be new no longer new such as having been marked read by another client . We don ' t care about that right now because we lack the ability to revoke notifications via the mozNotifications API .
function CronSlice(storage, desiredNew, callback) {
  this._storage = storage;
  this._callback = callback;
  this.startTS = null;
  this.startUID = null;
  this.endTS = null;
  this.endUID = null;
  this.waitingOnData = false;
  this._accumulating = false;
  this.headers = [];
  this._desiredNew = desiredNew;
  this._newHeaders = [];
  this.desiredHeaders = 10;
  this.ignoreHeaders = false;
}
function CronSlice ( storage , desiredNew , callback ) { this . _storage = storage ; this . _callback = callback ; this . startTS = null ; this . startUID = null ; this . endTS = null ; this . endUID = null ; this . waitingOnData = false ; this . _accumulating = false ; this . headers = [ ] ; this . _desiredNew = desiredNew ; this . _newHeaders = [ ] ; this . desiredHeaders = 10 ; this . ignoreHeaders = false ; }
Implements the interface of `MailSlice` as presented to `FolderStorage`, but
 it is only interested in accumulating a list of new messages that have not
 already been read.
Implements the interface of ` MailSlice ` as presented to ` FolderStorage ` but it is only interested in accumulating a list of new messages that have not already been read .
// Maintain the list of all headers for the IMAP sync logic's benefit for now. // However, we don't bother sorting it; we just care about the length. // XXX for now, assume that the 10 most recent headers will cover us.  Being // less than (or the same as) the initial fill sync of 15 is advantageous in // that it avoids us triggering a deepening sync on IMAP.