Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: chrome/browser/resources/net_internals/httpcacheview.js

Issue 7531005: Rename the net_internals file names to include hyphens. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add some missing files Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 /**
6 * This view displays information on the HTTP cache.
7 * @constructor
8 */
9 function HttpCacheView() {
10 const mainBoxId = 'httpCacheTabContent';
11 const statsDivId = 'httpCacheStats';
12
13 DivView.call(this, mainBoxId);
14
15 this.statsDiv_ = $(statsDivId);
16
17 // Register to receive http cache info.
18 g_browser.addHttpCacheInfoObserver(this);
19 }
20
21 inherits(HttpCacheView, DivView);
22
23 HttpCacheView.prototype.onLoadLogFinish = function(data) {
24 return this.onHttpCacheInfoChanged(data.httpCacheInfo);
25 };
26
27 HttpCacheView.prototype.onHttpCacheInfoChanged = function(info) {
28 this.statsDiv_.innerHTML = '';
29
30 if (!info)
31 return false;
32
33 // Print the statistics.
34 var statsUl = addNode(this.statsDiv_, 'ul');
35 for (var statName in info.stats) {
36 var li = addNode(statsUl, 'li');
37 addTextNode(li, statName + ': ' + info.stats[statName]);
38 }
39 return true;
40 };
41
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698