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

Unified Diff: chrome/browser/resources/net_internals/sourceentry.js

Issue 3119027: Adds HostResolveImpl Requests and Jobs to log. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/net_internals/main.css ('k') | chrome/service/net/service_url_request_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/net_internals/sourceentry.js
===================================================================
--- chrome/browser/resources/net_internals/sourceentry.js (revision 57182)
+++ chrome/browser/resources/net_internals/sourceentry.js (working copy)
@@ -67,8 +67,11 @@
var curStartEntry = this.getStartEntry_();
// If we just got the first entry for this source.
- if (!prevStartEntry && curStartEntry) {
- this.createRow_();
+ if (prevStartEntry != curStartEntry) {
+ if (!prevStartEntry)
+ this.createRow_();
+ else
+ this.updateDescription_();
// Only apply the filter during the first update.
// TODO(eroman): once filters use other data, apply it on each update.
@@ -116,6 +119,11 @@
this.setMouseoverStyle(false);
};
+SourceEntry.prototype.updateDescription_ = function() {
+ this.descriptionCell_.innerHTML = '';
+ addTextNode(this.descriptionCell_, this.getDescription());
+}
+
SourceEntry.prototype.createRow_ = function() {
// Create a row.
var tr = addNode(this.parentView_.tableBody_, 'tr');
@@ -131,6 +139,7 @@
var typeCell = addNode(tr, 'td');
var descriptionCell = addNode(tr, 'td');
+ this.descriptionCell_ = descriptionCell;
// Connect listeners.
checkbox.onchange = this.onCheckboxToggled_.bind(this);
@@ -150,7 +159,7 @@
addTextNode(idCell, "-");
var sourceTypeString = this.getSourceTypeString();
addTextNode(typeCell, sourceTypeString);
- addTextNode(descriptionCell, this.getDescription());
+ this.updateDescription_();
// Add a CSS classname specific to this source type (so CSS can specify
// different stylings for different types).
@@ -182,6 +191,9 @@
return e.params.url;
case LogSourceType.CONNECT_JOB:
return e.params.group_name;
+ case LogSourceType.HOST_RESOLVER_IMPL_REQUEST:
+ case LogSourceType.HOST_RESOLVER_IMPL_JOB:
+ return e.params.host;
}
return '';
@@ -196,11 +208,12 @@
SourceEntry.prototype.getStartEntry_ = function() {
if (this.entries_.length < 1)
return undefined;
- if (this.entries_[0].type != LogEventType.REQUEST_ALIVE)
- return this.entries_[0];
- if (this.entries_.length < 2)
- return undefined;
- return this.entries_[1];
+ if (this.entries_.length >= 2) {
+ if (this.entries_[0].type == LogEventType.REQUEST_ALIVE ||
+ this.entries_[0].type == LogEventType.SOCKET_POOL_CONNECT_JOB)
+ return this.entries_[1];
+ }
+ return this.entries_[0];
};
SourceEntry.prototype.getLogEntries = function() {
« no previous file with comments | « chrome/browser/resources/net_internals/main.css ('k') | chrome/service/net/service_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698