| 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 * This view displays options for importing/exporting the captured data. Its | 6 * This view displays options for importing/exporting the captured data. Its |
| 7 * primarily usefulness is to allow users to copy-paste their data in an easy | 7 * primarily usefulness is to allow users to copy-paste their data in an easy |
| 8 * to read format for bug reports. | 8 * to read format for bug reports. |
| 9 * | 9 * |
| 10 * - Has a button to generate a text report. | 10 * - Has a button to generate a text report. |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 } | 85 } |
| 86 | 86 |
| 87 text.push(''); | 87 text.push(''); |
| 88 text.push('----------------------------------------------'); | 88 text.push('----------------------------------------------'); |
| 89 text.push(' Requests'); | 89 text.push(' Requests'); |
| 90 text.push('----------------------------------------------'); | 90 text.push('----------------------------------------------'); |
| 91 text.push(''); | 91 text.push(''); |
| 92 | 92 |
| 93 this.appendRequestsPrintedAsText_(text); | 93 this.appendRequestsPrintedAsText_(text); |
| 94 | 94 |
| 95 text.push(''); |
| 96 text.push('----------------------------------------------'); |
| 97 text.push(' Http cache stats'); |
| 98 text.push('----------------------------------------------'); |
| 99 text.push(''); |
| 100 |
| 101 var httpCacheStats = g_browser.httpCacheInfo_.currentData_.stats; |
| 102 for (var statName in httpCacheStats) |
| 103 text.push(statName + ': ' + httpCacheStats[statName]); |
| 104 |
| 95 // Open a new window to display this text. | 105 // Open a new window to display this text. |
| 96 this.setText_(text.join('\n')); | 106 this.setText_(text.join('\n')); |
| 97 }; | 107 }; |
| 98 | 108 |
| 99 DataView.prototype.appendRequestsPrintedAsText_ = function(out) { | 109 DataView.prototype.appendRequestsPrintedAsText_ = function(out) { |
| 100 // Concatenate the passively captured events with the actively captured events | 110 // Concatenate the passively captured events with the actively captured events |
| 101 // into a single array. | 111 // into a single array. |
| 102 var allEvents = g_browser.getAllPassivelyCapturedEvents().concat( | 112 var allEvents = g_browser.getAllPassivelyCapturedEvents().concat( |
| 103 g_browser.getAllActivelyCapturedEvents()); | 113 g_browser.getAllActivelyCapturedEvents()); |
| 104 | 114 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 for (var i = 0; i < arrayData.length; ++i) { | 170 for (var i = 0; i < arrayData.length; ++i) { |
| 161 var e = arrayData[i]; | 171 var e = arrayData[i]; |
| 162 var eString = '[' + i + ']: '; | 172 var eString = '[' + i + ']: '; |
| 163 for (var key in e) { | 173 for (var key in e) { |
| 164 eString += key + "=" + e[key] + "; "; | 174 eString += key + "=" + e[key] + "; "; |
| 165 } | 175 } |
| 166 out.push(eString); | 176 out.push(eString); |
| 167 } | 177 } |
| 168 }; | 178 }; |
| 169 | 179 |
| OLD | NEW |