| Index: chrome/browser/resources/net_internals/main.js
|
| ===================================================================
|
| --- chrome/browser/resources/net_internals/main.js (revision 46639)
|
| +++ chrome/browser/resources/net_internals/main.js (working copy)
|
| @@ -66,6 +66,11 @@
|
| var testView = new TestView("testTabContent", "testUrlInput", "testStart",
|
| "testSummary");
|
|
|
| + var httpCacheView = new HttpCacheView("httpCacheTabContent",
|
| + "reloadHttpCacheListing",
|
| + "httpCacheStats",
|
| + "httpCacheListing");
|
| +
|
| // Create a view which lets you tab between the different sub-views.
|
| var categoryTabSwitcher =
|
| new TabSwitcherView(new DivView('categoryTabHandles'));
|
| @@ -76,8 +81,7 @@
|
| categoryTabSwitcher.addTab('dnsTab', dnsView, false);
|
| categoryTabSwitcher.addTab('socketsTab', new DivView('socketsTabContent'),
|
| false);
|
| - categoryTabSwitcher.addTab('httpCacheTab',
|
| - new DivView('httpCacheTabContent'), false);
|
| + categoryTabSwitcher.addTab('httpCacheTab', httpCacheView, false);
|
| categoryTabSwitcher.addTab('dataTab', dataView, false);
|
| categoryTabSwitcher.addTab('testTab', testView, false);
|
|
|
| @@ -121,6 +125,7 @@
|
| // List of observers for various bits of browser state.
|
| this.logObservers_ = [];
|
| this.connectionTestsObservers_ = [];
|
| + this.httpCacheInfoObservers_ = [];
|
| this.proxySettings_ = new PollableDataHelper('onProxySettingsChanged');
|
| this.badProxies_ = new PollableDataHelper('onBadProxiesChanged');
|
| this.hostResolverCache_ =
|
| @@ -183,6 +188,10 @@
|
| chrome.send('startConnectionTests', [url]);
|
| };
|
|
|
| +BrowserBridge.prototype.sendGetHttpCacheInfo = function() {
|
| + chrome.send('getHttpCacheInfo');
|
| +};
|
| +
|
| //------------------------------------------------------------------------------
|
| // Messages received from the browser
|
| //------------------------------------------------------------------------------
|
| @@ -261,6 +270,11 @@
|
| this.connectionTestsObservers_[i].onCompletedConnectionTestSuite();
|
| };
|
|
|
| +BrowserBridge.prototype.receivedHttpCacheInfo = function(info) {
|
| + for (var i = 0; i < this.httpCacheInfoObservers_.length; ++i)
|
| + this.httpCacheInfoObservers_[i].onHttpCacheInfoReceived(info);
|
| +};
|
| +
|
| //------------------------------------------------------------------------------
|
|
|
| /**
|
| @@ -325,6 +339,16 @@
|
| };
|
|
|
| /**
|
| + * Adds a listener for the http cache info results.
|
| + * The observer will be called back with:
|
| + *
|
| + * observer.onHttpCacheInfoReceived(info);
|
| + */
|
| +BrowserBridge.prototype.addHttpCacheInfoObserver = function(observer) {
|
| + this.httpCacheInfoObservers_.push(observer);
|
| +};
|
| +
|
| +/**
|
| * The browser gives us times in terms of "time ticks" in milliseconds.
|
| * This function converts the tick count to a Date() object.
|
| *
|
|
|