| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 * This view displays a summary of the state of each HTTP pipelined connection, | 6 * This view displays a summary of the state of each HTTP pipelined connection, |
| 7 * and has links to display them in the events tab. | 7 * and has links to display them in the events tab. |
| 8 */ | 8 */ |
| 9 var HttpPipelineView = (function() { | 9 var HttpPipelineView = (function() { |
| 10 'use strict'; | 10 'use strict'; |
| 11 | 11 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 } | 114 } |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 /** | 117 /** |
| 118 * Creates a table printer to print out the state of a list of HTTP pipelined | 118 * Creates a table printer to print out the state of a list of HTTP pipelined |
| 119 * connections. | 119 * connections. |
| 120 */ | 120 */ |
| 121 function createConnectionTablePrinter(httpPipelinedConnectionInfo) { | 121 function createConnectionTablePrinter(httpPipelinedConnectionInfo) { |
| 122 var tablePrinter = new TablePrinter(); | 122 var tablePrinter = new TablePrinter(); |
| 123 tablePrinter.addHeaderCell('Host'); | 123 tablePrinter.addHeaderCell('Host'); |
| 124 tablePrinter.addHeaderCell('Forced'); |
| 124 tablePrinter.addHeaderCell('Depth'); | 125 tablePrinter.addHeaderCell('Depth'); |
| 125 tablePrinter.addHeaderCell('Capacity'); | 126 tablePrinter.addHeaderCell('Capacity'); |
| 126 tablePrinter.addHeaderCell('Usable'); | 127 tablePrinter.addHeaderCell('Usable'); |
| 127 tablePrinter.addHeaderCell('Active'); | 128 tablePrinter.addHeaderCell('Active'); |
| 128 tablePrinter.addHeaderCell('ID'); | 129 tablePrinter.addHeaderCell('ID'); |
| 129 | 130 |
| 130 for (var i = 0; i < httpPipelinedConnectionInfo.length; i++) { | 131 for (var i = 0; i < httpPipelinedConnectionInfo.length; i++) { |
| 131 var host = httpPipelinedConnectionInfo[i]; | 132 var host = httpPipelinedConnectionInfo[i]; |
| 132 for (var j = 0; j < host.length; j++) { | 133 for (var j = 0; j < host.length; j++) { |
| 133 var connection = host[j]; | 134 var connection = host[j]; |
| 134 tablePrinter.addRow(); | 135 tablePrinter.addRow(); |
| 135 | 136 |
| 136 tablePrinter.addCell(connection.host); | 137 tablePrinter.addCell(connection.host); |
| 138 tablePrinter.addCell( |
| 139 connection.forced === undefined ? false : connection.forced); |
| 137 tablePrinter.addCell(connection.depth); | 140 tablePrinter.addCell(connection.depth); |
| 138 tablePrinter.addCell(connection.capacity); | 141 tablePrinter.addCell(connection.capacity); |
| 139 tablePrinter.addCell(connection.usable); | 142 tablePrinter.addCell(connection.usable); |
| 140 tablePrinter.addCell(connection.active); | 143 tablePrinter.addCell(connection.active); |
| 141 | 144 |
| 142 var idCell = tablePrinter.addCell(connection.source_id); | 145 var idCell = tablePrinter.addCell(connection.source_id); |
| 143 idCell.link = '#events&q=id:' + connection.source_id; | 146 idCell.link = '#events&q=id:' + connection.source_id; |
| 144 } | 147 } |
| 145 } | 148 } |
| 146 return tablePrinter; | 149 return tablePrinter; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 160 tablePrinter.addRow(); | 163 tablePrinter.addRow(); |
| 161 | 164 |
| 162 tablePrinter.addCell(entry.host); | 165 tablePrinter.addCell(entry.host); |
| 163 tablePrinter.addCell(entry.capability); | 166 tablePrinter.addCell(entry.capability); |
| 164 } | 167 } |
| 165 return tablePrinter; | 168 return tablePrinter; |
| 166 } | 169 } |
| 167 | 170 |
| 168 return HttpPipelineView; | 171 return HttpPipelineView; |
| 169 })(); | 172 })(); |
| OLD | NEW |