Chromium Code Reviews| 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 /** | 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'; |
| (...skipping 103 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(connection.forced); | |
|
mmenke
2012/02/23 18:54:58
Suggest you do something to avoid displaying 'unde
James Simonsen
2012/02/23 23:49:46
Good point. I hadn't thought about that.
| |
| 137 tablePrinter.addCell(connection.depth); | 139 tablePrinter.addCell(connection.depth); |
| 138 tablePrinter.addCell(connection.capacity); | 140 tablePrinter.addCell(connection.capacity); |
| 139 tablePrinter.addCell(connection.usable); | 141 tablePrinter.addCell(connection.usable); |
| 140 tablePrinter.addCell(connection.active); | 142 tablePrinter.addCell(connection.active); |
| 141 | 143 |
| 142 var idCell = tablePrinter.addCell(connection.source_id); | 144 var idCell = tablePrinter.addCell(connection.source_id); |
| 143 idCell.link = '#events&q=id:' + connection.source_id; | 145 idCell.link = '#events&q=id:' + connection.source_id; |
| 144 } | 146 } |
| 145 } | 147 } |
| 146 return tablePrinter; | 148 return tablePrinter; |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 160 tablePrinter.addRow(); | 162 tablePrinter.addRow(); |
| 161 | 163 |
| 162 tablePrinter.addCell(entry.host); | 164 tablePrinter.addCell(entry.host); |
| 163 tablePrinter.addCell(entry.capability); | 165 tablePrinter.addCell(entry.capability); |
| 164 } | 166 } |
| 165 return tablePrinter; | 167 return tablePrinter; |
| 166 } | 168 } |
| 167 | 169 |
| 168 return HttpPipelineView; | 170 return HttpPipelineView; |
| 169 })(); | 171 })(); |
| OLD | NEW |