blob: 25b66ae57b49cf90723451fa5f3faf531a529e71 [file] [log] [blame]
// Copyright 2015 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
'use strict';
/**
* @fileoverview Class to hold state while processing netlog messages.
*/
/** @constructor */
function LogSummary() {
this.managers = [];
this.logStartTime = -1;
this.logEndTime = -1;
this.prevLogLineTime = -1;
}
/**
* Helper method to add flagged messages to an object.
*
* @param {Object} noteHolder Object to get the new note.
* @param {Number} noteTime Time stamp from log message.
* @param {String} noteMessage Message from the log.
* @private
*/
function addNote(noteHolder, noteTime, noteMessage) {
if (!noteHolder.notes) {
noteHolder.notes = [];
}
var newNote = {time: noteTime, message: noteMessage};
noteHolder.notes.push(newNote);
}