| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 addTextNode(dtCell, '?]'); | 82 addTextNode(dtCell, '?]'); |
| 83 } | 83 } |
| 84 } else { | 84 } else { |
| 85 mainCell.colSpan = '3'; | 85 mainCell.colSpan = '3'; |
| 86 } | 86 } |
| 87 | 87 |
| 88 // Output the extra parameters. | 88 // Output the extra parameters. |
| 89 // TODO(eroman): Do type-specific formatting. | 89 // TODO(eroman): Do type-specific formatting. |
| 90 if (entry.orig.extra_parameters != undefined) { | 90 if (entry.orig.extra_parameters != undefined) { |
| 91 addNode(mainCell, 'br'); | 91 addNode(mainCell, 'br'); |
| 92 addTextNode(mainCell, 'params: ' + entry.orig.extra_parameters); | 92 addTextNode(mainCell, JSON.stringify(entry.orig.extra_parameters)); |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 | 96 |
| 97 function getTextForEvent(entry) { | 97 function getTextForEvent(entry) { |
| 98 var text = ''; | 98 var text = ''; |
| 99 | 99 |
| 100 if (entry.isBegin()) { | 100 if (entry.isBegin()) { |
| 101 text = '+' + text; | 101 text = '+' + text; |
| 102 } else if (entry.isEnd()) { | 102 } else if (entry.isEnd()) { |
| 103 text = '-' + text; | 103 text = '-' + text; |
| 104 } else { | 104 } else { |
| 105 text = '.'; | 105 text = '.'; |
| 106 } | 106 } |
| 107 | 107 |
| 108 text += getKeyWithValue(LogEventType, entry.orig.type); | 108 text += getKeyWithValue(LogEventType, entry.orig.type); |
| 109 return text; | 109 return text; |
| 110 } | 110 } |
| 111 | 111 |
| 112 // End of anonymous namespace. | 112 // End of anonymous namespace. |
| 113 })(); | 113 })(); |
| 114 | 114 |
| OLD | NEW |