| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 /** | 5 /** |
| 6 * TODO(eroman): This needs better presentation, and cleaner code. This | 6 * TODO(eroman): This needs better presentation, and cleaner code. This |
| 7 * implementation is more of a transitionary step as | 7 * implementation is more of a transitionary step as |
| 8 * the old net-internals is replaced. | 8 * the old net-internals is replaced. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 var entry = entries[i]; | 46 var entry = entries[i]; |
| 47 | 47 |
| 48 // Avoid printing the END for a BEGIN that was immediately before. | 48 // Avoid printing the END for a BEGIN that was immediately before. |
| 49 if (entry.isEnd() && entry.begin && entry.begin.index == i - 1) { | 49 if (entry.isEnd() && entry.begin && entry.begin.index == i - 1) { |
| 50 continue; | 50 continue; |
| 51 } | 51 } |
| 52 | 52 |
| 53 tablePrinter.addRow(); | 53 tablePrinter.addRow(); |
| 54 | 54 |
| 55 tablePrinter.addCell('t='); | 55 tablePrinter.addCell('t='); |
| 56 var tCell = tablePrinter.addCell(entry.orig.time); | 56 var tCell = tablePrinter.addCell( |
| 57 g_browser.convertTimeTicksToDate(entry.orig.time).getTime()); |
| 57 tCell.alignRight = true; | 58 tCell.alignRight = true; |
| 58 tablePrinter.addCell(' '); | 59 tablePrinter.addCell(' '); |
| 59 | 60 |
| 60 var indentationStr = makeRepeatedString(' ', entry.getDepth() * 3); | 61 var indentationStr = makeRepeatedString(' ', entry.getDepth() * 3); |
| 61 var mainCell = | 62 var mainCell = |
| 62 tablePrinter.addCell(indentationStr + getTextForEvent(entry)); | 63 tablePrinter.addCell(indentationStr + getTextForEvent(entry)); |
| 63 tablePrinter.addCell(' '); | 64 tablePrinter.addCell(' '); |
| 64 | 65 |
| 65 // Get the elapsed time. | 66 // Get the elapsed time. |
| 66 if (entry.isBegin()) { | 67 if (entry.isBegin()) { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 text = ' '; | 162 text = ' '; |
| 162 } | 163 } |
| 163 | 164 |
| 164 text += getKeyWithValue(LogEventType, entry.orig.type); | 165 text += getKeyWithValue(LogEventType, entry.orig.type); |
| 165 return text; | 166 return text; |
| 166 } | 167 } |
| 167 | 168 |
| 168 // End of anonymous namespace. | 169 // End of anonymous namespace. |
| 169 })(); | 170 })(); |
| 170 | 171 |
| OLD | NEW |