| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var SourceEntry = (function() { | 5 var SourceEntry = (function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * A SourceEntry gathers all log entries with the same source. | 9 * A SourceEntry gathers all log entries with the same source. |
| 10 * | 10 * |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 * source ID. If source is still active, uses the current time for the | 210 * source ID. If source is still active, uses the current time for the |
| 211 * last event. | 211 * last event. |
| 212 */ | 212 */ |
| 213 getDuration: function() { | 213 getDuration: function() { |
| 214 var startTicks = this.entries_[0].time; | 214 var startTicks = this.entries_[0].time; |
| 215 var startTime = timeutil.convertTimeTicksToDate(startTicks).getTime(); | 215 var startTime = timeutil.convertTimeTicksToDate(startTicks).getTime(); |
| 216 var endTime = this.getEndTime(); | 216 var endTime = this.getEndTime(); |
| 217 return endTime - startTime; | 217 return endTime - startTime; |
| 218 }, | 218 }, |
| 219 | 219 |
| 220 printAsText: function() { | 220 /** |
| 221 return PrintSourceEntriesAsText(this.entries_); | 221 * Prints descriptive text about |entries_| to a new node added to the end |
| 222 * of |parent|. |
| 223 */ |
| 224 printAsText: function(parent) { |
| 225 printLogEntriesAsText(this.entries_, parent); |
| 222 } | 226 } |
| 223 }; | 227 }; |
| 224 | 228 |
| 225 return SourceEntry; | 229 return SourceEntry; |
| 226 })(); | 230 })(); |
| OLD | NEW |