| 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 information on the HTTP cache. | 6 * This view displays information on the HTTP cache. |
| 7 * @constructor | 7 * @constructor |
| 8 */ | 8 */ |
| 9 function HttpCacheView(mainBoxId, reloadButtonId, statsDivId, | 9 function HttpCacheView(mainBoxId, reloadButtonId, statsDivId, |
| 10 entryListingDivId) { | 10 entryListingDivId) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 addTextNode(li, statName + ': ' + info.stats[statName]); | 33 addTextNode(li, statName + ': ' + info.stats[statName]); |
| 34 } | 34 } |
| 35 | 35 |
| 36 // Print the entries. | 36 // Print the entries. |
| 37 var keysOl = addNode(this.entryListingDiv_, 'ol'); | 37 var keysOl = addNode(this.entryListingDiv_, 'ol'); |
| 38 for (var i = 0; i < info.keys.length; ++i) { | 38 for (var i = 0; i < info.keys.length; ++i) { |
| 39 var key = info.keys[i]; | 39 var key = info.keys[i]; |
| 40 var li = addNode(keysOl, 'li'); | 40 var li = addNode(keysOl, 'li'); |
| 41 var a = addNode(li, 'a'); | 41 var a = addNode(li, 'a'); |
| 42 addTextNode(a, key); | 42 addTextNode(a, key); |
| 43 a.href = 'chrome://net-internals/view-cache/' + key; | 43 a.href = 'chrome://view-http-cache/' + key; |
| 44 a.target = '_blank'; | 44 a.target = '_blank'; |
| 45 } | 45 } |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 HttpCacheView.prototype.reloadListing_ = function() { | 48 HttpCacheView.prototype.reloadListing_ = function() { |
| 49 this.entryListingDiv_.innerHTML = 'Loading...'; | 49 this.entryListingDiv_.innerHTML = 'Loading...'; |
| 50 this.statsDiv_.innerHTML = 'Loading...'; | 50 this.statsDiv_.innerHTML = 'Loading...'; |
| 51 g_browser.sendGetHttpCacheInfo(); | 51 g_browser.sendGetHttpCacheInfo(); |
| 52 }; | 52 }; |
| OLD | NEW |