diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-12 18:15:20 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-12 18:15:20 +0000 |
commit | 02d8d78f984d3201ad038460bc57dd66ac293ac2 (patch) | |
tree | 692b0a5c7d716ffd5db5f643b930d003cfe24d6d | |
parent | e772db3f04f1079a07d702c6aa4e0394f2147af9 (diff) | |
download | chromium_src-02d8d78f984d3201ad038460bc57dd66ac293ac2.zip chromium_src-02d8d78f984d3201ad038460bc57dd66ac293ac2.tar.gz chromium_src-02d8d78f984d3201ad038460bc57dd66ac293ac2.tar.bz2 |
Aesthetic: Make the display of "network changed events" in about:net-internals prettier.
BUG=46822
Review URL: http://codereview.chromium.org/2932008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52105 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/resources/net_internals/main.css | 4 | ||||
-rw-r--r-- | chrome/browser/resources/net_internals/sourceentry.js | 16 |
2 files changed, 19 insertions, 1 deletions
diff --git a/chrome/browser/resources/net_internals/main.css b/chrome/browser/resources/net_internals/main.css index 74a0c28..ecef780 100644 --- a/chrome/browser/resources/net_internals/main.css +++ b/chrome/browser/resources/net_internals/main.css @@ -95,6 +95,10 @@ body { color: green; } +#requestsListTableBody .source_NONE { + color: red; +} + .tabSwitcher { margin-top: 10px; margin-left: 10px; diff --git a/chrome/browser/resources/net_internals/sourceentry.js b/chrome/browser/resources/net_internals/sourceentry.js index a0507e4..74313d2 100644 --- a/chrome/browser/resources/net_internals/sourceentry.js +++ b/chrome/browser/resources/net_internals/sourceentry.js @@ -151,9 +151,23 @@ SourceEntry.prototype.createRow_ = function() { changeClassName(this.row_, "source_" + sourceTypeString, true); }; +/** + * Returns a description for this source log stream, which will be displayed + * in the list view. Most often this is a URL that identifies the request, + * or a hostname for a connect job, etc... + */ SourceEntry.prototype.getDescription = function() { var e = this.getStartEntry_(); - if (!e || e.params == undefined) + if (!e) + return ''; + + if (e.source.type == LogSourceType.NONE) { + // NONE is what we use for global events that aren't actually grouped + // by a "source ID", so we will just stringize the event's type. + return getKeyWithValue(LogEventType, e.type); + } + + if (e.params == undefined) return ''; switch (e.source.type) { |