diff options
Diffstat (limited to 'chrome')
11 files changed, 96 insertions, 81 deletions
diff --git a/chrome/browser/dom_ui/net_internals_ui.cc b/chrome/browser/dom_ui/net_internals_ui.cc index 908c8dad..90d2a09 100644 --- a/chrome/browser/dom_ui/net_internals_ui.cc +++ b/chrome/browser/dom_ui/net_internals_ui.cc @@ -618,15 +618,6 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady( } OnGetPassiveLogEntries(NULL); - OnGetProxySettings(NULL); - OnGetBadProxies(NULL); - OnGetHostResolverInfo(NULL); - OnGetHttpCacheInfo(NULL); - OnGetSocketPoolInfo(NULL); - OnGetSpdySessionInfo(NULL); -#ifdef OS_WIN - OnGetServiceProviders(NULL); -#endif } void NetInternalsMessageHandler::IOThreadImpl::OnGetProxySettings( diff --git a/chrome/browser/resources/net_internals/dataview.js b/chrome/browser/resources/net_internals/dataview.js index 38dc5a3..2535303 100644 --- a/chrome/browser/resources/net_internals/dataview.js +++ b/chrome/browser/resources/net_internals/dataview.js @@ -100,7 +100,7 @@ DataView.prototype.onExportToText_ = function() { if (this.waitingForUpdate_) return; this.waitingForUpdate = true; - this.setText_("Generating..."); + this.setText_('Generating...'); g_browser.updateAllInfo(this.onUpdateAllCompleted.bind(this)); }; diff --git a/chrome/browser/resources/net_internals/eventsview.js b/chrome/browser/resources/net_internals/eventsview.js index 6c7ee91..7af86aa 100644 --- a/chrome/browser/resources/net_internals/eventsview.js +++ b/chrome/browser/resources/net_internals/eventsview.js @@ -57,7 +57,7 @@ function EventsView(tableBodyId, filterInputId, filterCountId, this.filterInput_ = document.getElementById(filterInputId); this.filterCount_ = document.getElementById(filterCountId); - this.filterInput_.addEventListener("search", + this.filterInput_.addEventListener('search', this.onFilterTextChanged_.bind(this), true); document.getElementById(deleteSelectedId).onclick = @@ -449,6 +449,14 @@ EventsView.prototype.onLogEntryAdded = function(logEntry) { }; /** + * Returns the SourceEntry with the specified ID, if there is one. + * Otherwise, returns undefined. + */ +EventsView.prototype.getSourceEntry = function(id) { + return this.sourceIdToEntryMap_[id]; +}; + +/** * Called whenever some log events are deleted. |sourceIds| lists * the source IDs of all deleted log entries. */ @@ -601,5 +609,5 @@ EventsView.prototype.repaintFilterCounter_ = function() { this.outstandingRepaintFilterCounter_ = false; this.filterCount_.innerHTML = ''; addTextNode(this.filterCount_, - this.numPostfilter_ + " of " + this.numPrefilter_); + this.numPostfilter_ + ' of ' + this.numPrefilter_); }; diff --git a/chrome/browser/resources/net_internals/logviewpainter.js b/chrome/browser/resources/net_internals/logviewpainter.js index 3d6d7e1..82686c6 100644 --- a/chrome/browser/resources/net_internals/logviewpainter.js +++ b/chrome/browser/resources/net_internals/logviewpainter.js @@ -289,7 +289,7 @@ function stripCookieOrLoginInfo(line) { for (var i = 0; i < patterns.length; i++) { var match = patterns[i].exec(line); if (match != null) - return match + " [value was stripped]"; + return match + ' [value was stripped]'; } return line; } diff --git a/chrome/browser/resources/net_internals/main.js b/chrome/browser/resources/net_internals/main.js index e71fade..5249789 100644 --- a/chrome/browser/resources/net_internals/main.js +++ b/chrome/browser/resources/net_internals/main.js @@ -39,70 +39,70 @@ function onLoaded() { 'sortByDescription', // IDs for the details view. - "detailsTabHandles", - "detailsLogTab", - "detailsTimelineTab", - "detailsLogBox", - "detailsTimelineBox", + 'detailsTabHandles', + 'detailsLogTab', + 'detailsTimelineTab', + 'detailsLogBox', + 'detailsTimelineBox', // IDs for the layout boxes. - "filterBox", - "eventsBox", - "actionBox", - "splitterBox"); + 'filterBox', + 'eventsBox', + 'actionBox', + 'splitterBox'); // Create a view which will display info on the proxy setup. - var proxyView = new ProxyView("proxyTabContent", - "proxyOriginalSettings", - "proxyEffectiveSettings", - "proxyReloadSettings", - "badProxiesTableBody", - "clearBadProxies"); + var proxyView = new ProxyView('proxyTabContent', + 'proxyOriginalSettings', + 'proxyEffectiveSettings', + 'proxyReloadSettings', + 'badProxiesTableBody', + 'clearBadProxies'); // Create a view which will display information on the host resolver. - var dnsView = new DnsView("dnsTabContent", - "hostResolverCacheTbody", - "clearHostResolverCache", - "hostResolverDefaultFamily", - "hostResolverIPv6Disabled", - "hostResolverEnableIPv6", - "hostResolverCacheCapacity", - "hostResolverCacheTTLSuccess", - "hostResolverCacheTTLFailure"); + var dnsView = new DnsView('dnsTabContent', + 'hostResolverCacheTbody', + 'clearHostResolverCache', + 'hostResolverDefaultFamily', + 'hostResolverIPv6Disabled', + 'hostResolverEnableIPv6', + 'hostResolverCacheCapacity', + 'hostResolverCacheTTLSuccess', + 'hostResolverCacheTTLFailure'); // Create a view which will display import/export options to control the // captured data. - var dataView = new DataView("dataTabContent", "exportedDataText", - "exportToText", "securityStrippingCheckbox", - "byteLoggingCheckbox", - "passivelyCapturedCount", - "activelyCapturedCount", - "dataViewDeleteAll"); + var dataView = new DataView('dataTabContent', 'exportedDataText', + 'exportToText', 'securityStrippingCheckbox', + 'byteLoggingCheckbox', + 'passivelyCapturedCount', + 'activelyCapturedCount', + 'dataViewDeleteAll'); // Create a view which will display the results and controls for connection // tests. - var testView = new TestView("testTabContent", "testUrlInput", - "connectionTestsForm", "testSummary"); + var testView = new TestView('testTabContent', 'testUrlInput', + 'connectionTestsForm', 'testSummary'); - var httpCacheView = new HttpCacheView("httpCacheTabContent", - "httpCacheStats"); + var httpCacheView = new HttpCacheView('httpCacheTabContent', + 'httpCacheStats'); - var socketsView = new SocketsView("socketsTabContent", - "socketPoolDiv", - "socketPoolGroupsDiv"); + var socketsView = new SocketsView('socketsTabContent', + 'socketPoolDiv', + 'socketPoolGroupsDiv'); - var spdyView = new SpdyView("spdyTabContent", - "spdySessionNoneSpan", - "spdySessionLinkSpan", - "spdySessionDiv"); + var spdyView = new SpdyView('spdyTabContent', + 'spdySessionNoneSpan', + 'spdySessionLinkSpan', + 'spdySessionDiv'); var serviceView; if (g_browser.isPlatformWindows()) { - serviceView = new ServiceProvidersView("serviceProvidersTab", - "serviceProvidersTabContent", - "serviceProvidersTbody", - "namespaceProvidersTbody"); + serviceView = new ServiceProvidersView('serviceProvidersTab', + 'serviceProvidersTabContent', + 'serviceProvidersTbody', + 'namespaceProvidersTbody'); } // Create a view which lets you tab between the different sub-views. diff --git a/chrome/browser/resources/net_internals/resizableverticalsplitview.js b/chrome/browser/resources/net_internals/resizableverticalsplitview.js index 289e20d..ed77914 100644 --- a/chrome/browser/resources/net_internals/resizableverticalsplitview.js +++ b/chrome/browser/resources/net_internals/resizableverticalsplitview.js @@ -35,7 +35,7 @@ function ResizableVerticalSplitView(leftView, rightView, sizerView) { // Setup the "sizer" so it can be dragged left/right to reposition the // vertical split. sizerView.getNode().addEventListener( - "mousedown", this.onDragSizerStart_.bind(this), true); + 'mousedown', this.onDragSizerStart_.bind(this), true); } inherits(ResizableVerticalSplitView, View); @@ -89,8 +89,8 @@ ResizableVerticalSplitView.prototype.onDragSizerStart_ = function(event) { this.sizerMouseMoveListener_ = this.onDragSizer.bind(this); this.sizerMouseUpListener_ = this.onDragSizerEnd.bind(this); - window.addEventListener("mousemove", this.sizerMouseMoveListener_, true); - window.addEventListener("mouseup", this.sizerMouseUpListener_, true); + window.addEventListener('mousemove', this.sizerMouseMoveListener_, true); + window.addEventListener('mouseup', this.sizerMouseUpListener_, true); event.preventDefault(); }; @@ -119,8 +119,8 @@ ResizableVerticalSplitView.prototype.onDragSizer = function(event) { * Called once the mouse has been released, and the dragging is over. */ ResizableVerticalSplitView.prototype.onDragSizerEnd = function(event) { - window.removeEventListener("mousemove", this.sizerMouseMoveListener_, true); - window.removeEventListener("mouseup", this.sizerMouseUpListener_, true); + window.removeEventListener('mousemove', this.sizerMouseMoveListener_, true); + window.removeEventListener('mouseup', this.sizerMouseUpListener_, true); this.sizerMouseMoveListener_ = null; this.sizerMouseUpListener_ = null; diff --git a/chrome/browser/resources/net_internals/serviceprovidersview.js b/chrome/browser/resources/net_internals/serviceprovidersview.js index 0ea36be..ba5d8e4 100644 --- a/chrome/browser/resources/net_internals/serviceprovidersview.js +++ b/chrome/browser/resources/net_internals/serviceprovidersview.js @@ -33,8 +33,8 @@ inherits(ServiceProvidersView, DivView); ServiceProvidersView.prototype.onServiceProvidersChanged = function(serviceProviders) { - this.updateServiceProviders_(serviceProviders["service_providers"]); - this.updateNamespaceProviders_(serviceProviders["namespace_providers"]); + this.updateServiceProviders_(serviceProviders['service_providers']); + this.updateNamespaceProviders_(serviceProviders['namespace_providers']); }; /** diff --git a/chrome/browser/resources/net_internals/socketpoolwrapper.js b/chrome/browser/resources/net_internals/socketpoolwrapper.js index be5a60c..e58a3e0 100644 --- a/chrome/browser/resources/net_internals/socketpoolwrapper.js +++ b/chrome/browser/resources/net_internals/socketpoolwrapper.js @@ -165,5 +165,5 @@ SocketPoolWrapper.prototype.createGroupTablePrinter = function() { SocketPoolWrapper.sourceListLink = function(sources) { if (!sources.length) return null; - return "#events&q=id:" + sources.join("%20id:"); + return '#events&q=id:' + sources.join('%20id:'); } diff --git a/chrome/browser/resources/net_internals/sourceentry.js b/chrome/browser/resources/net_internals/sourceentry.js index ff98bfe..4a4df6e 100644 --- a/chrome/browser/resources/net_internals/sourceentry.js +++ b/chrome/browser/resources/net_internals/sourceentry.js @@ -190,14 +190,14 @@ SourceEntry.prototype.createRow_ = function() { if (this.getSourceId() >= 0) addTextNode(idCell, this.getSourceId()); else - addTextNode(idCell, "-"); + addTextNode(idCell, '-'); var sourceTypeString = this.getSourceTypeString(); addTextNode(typeCell, sourceTypeString); this.updateDescription_(); // Add a CSS classname specific to this source type (so CSS can specify // different stylings for different types). - changeClassName(this.row_, "source_" + sourceTypeString, true); + changeClassName(this.row_, 'source_' + sourceTypeString, true); }; /** @@ -219,20 +219,36 @@ SourceEntry.prototype.getDescription = function() { if (e.params == undefined) return ''; + var description = ''; switch (e.source.type) { case LogSourceType.URL_REQUEST: case LogSourceType.SOCKET_STREAM: - return e.params.url; + description = e.params.url; + break; case LogSourceType.CONNECT_JOB: - return e.params.group_name; + description = e.params.group_name; + break; case LogSourceType.HOST_RESOLVER_IMPL_REQUEST: case LogSourceType.HOST_RESOLVER_IMPL_JOB: - return e.params.host; + description = e.params.host; + break; case LogSourceType.SPDY_SESSION: - return e.params.host + ' (' + e.params.proxy + ')'; + if (e.params.host) + description = e.params.host + ' (' + e.params.proxy + ')'; + break; + case LogSourceType.SOCKET: + if (e.params.source_dependency != undefined) { + var connectJobSourceEntry = + this.parentView_.getSourceEntry(e.params.source_dependency.id); + if (connectJobSourceEntry) + description = connectJobSourceEntry.getDescription(); + } + break; } - return ''; + if (description == undefined) + return ''; + return description; }; /** diff --git a/chrome/browser/resources/net_internals/util.js b/chrome/browser/resources/net_internals/util.js index bfa7621..e1a8337 100644 --- a/chrome/browser/resources/net_internals/util.js +++ b/chrome/browser/resources/net_internals/util.js @@ -17,22 +17,22 @@ function inherits(childCtor, parentCtor) { * Sets the width (in pixels) on a DOM node. */ function setNodeWidth(node, widthPx) { - node.style.width = widthPx.toFixed(0) + "px"; + node.style.width = widthPx.toFixed(0) + 'px'; } /** * Sets the height (in pixels) on a DOM node. */ function setNodeHeight(node, heightPx) { - node.style.height = heightPx.toFixed(0) + "px"; + node.style.height = heightPx.toFixed(0) + 'px'; } /** * Sets the position and size of a DOM node (in pixels). */ function setNodePosition(node, leftPx, topPx, widthPx, heightPx) { - node.style.left = leftPx.toFixed(0) + "px"; - node.style.top = topPx.toFixed(0) + "px"; + node.style.left = leftPx.toFixed(0) + 'px'; + node.style.top = topPx.toFixed(0) + 'px'; setNodeWidth(node, widthPx); setNodeHeight(node, heightPx); } @@ -78,7 +78,7 @@ function addNodeWithText(parentNode, tagName, text) { */ function changeClassName(node, classNameToAddOrRemove, isAdd) { // Multiple classes can be separated by spaces. - var currentNames = node.className.split(" "); + var currentNames = node.className.split(' '); if (isAdd) { if (!(classNameToAddOrRemove in currentNames)) { @@ -93,7 +93,7 @@ function changeClassName(node, classNameToAddOrRemove, isAdd) { } } - node.className = currentNames.join(" "); + node.className = currentNames.join(' '); } function getKeyWithValue(map, value) { diff --git a/chrome/browser/resources/net_internals/view.js b/chrome/browser/resources/net_internals/view.js index 1e0ece8..bf76b4d 100644 --- a/chrome/browser/resources/net_internals/view.js +++ b/chrome/browser/resources/net_internals/view.js @@ -92,7 +92,7 @@ inherits(DivView, View); DivView.prototype.setGeometry = function(left, top, width, height) { DivView.superClass_.setGeometry.call(this, left, top, width, height); - this.node_.style.position = "absolute"; + this.node_.style.position = 'absolute'; setNodePosition(this.node_, left, top, width, height); }; @@ -120,7 +120,7 @@ DivView.prototype.getNode = function() { function WindowView(childView) { View.call(this); this.childView_ = childView; - window.addEventListener("resize", this.resetGeometry.bind(this), true); + window.addEventListener('resize', this.resetGeometry.bind(this), true); } inherits(WindowView, View); |