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

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

Issue 8890016: Make source_dependencies in about:net-internals clickable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix missed variable name change Created 9 years 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
Index: chrome/browser/resources/net_internals/source_row.js
===================================================================
--- chrome/browser/resources/net_internals/source_row.js (revision 112998)
+++ chrome/browser/resources/net_internals/source_row.js (working copy)
@@ -36,7 +36,7 @@
createRow_: function() {
// Create a row.
var tr = addNode(this.parentView_.tableBody_, 'tr');
- tr._id = this.sourceEntry_.getSourceId();
+ tr._id = this.getSourceId();
tr.style.display = 'none';
this.row_ = tr;
@@ -63,8 +63,8 @@
tr.onmouseout = this.onMouseout_.bind(this);
// Set the cell values to match this source's data.
- if (this.sourceEntry_.getSourceId() >= 0) {
- addTextNode(idCell, this.sourceEntry_.getSourceId());
+ if (this.getSourceId() >= 0) {
+ addTextNode(idCell, this.getSourceId());
} else {
addTextNode(idCell, '-');
}
@@ -179,17 +179,19 @@
// Check source ID, if needed.
if (filter.id) {
- if (filter.id.indexOf(this.sourceEntry_.getSourceId() + '') == -1)
+ if (filter.id.indexOf(this.getSourceId() + '') == -1)
return false;
}
if (filter.text == '')
return true;
- var filterText = filter.text;
- var entryText = this.sourceEntry_.printAsText().toLowerCase();
+ // The description is not always contained in one of the log entries.
+ if (this.description_.toLowerCase().indexOf(filter.text) != -1)
+ return true;
- return entryText.indexOf(filterText) != -1;
+ var entryText = JSON.stringify(this.sourceEntry_.getLogEntries());
+ return entryText.toLowerCase().indexOf(filter.text) != -1;
},
isSelected: function() {
@@ -203,7 +205,7 @@
this.isSelected_ = isSelected;
this.setSelectedStyles(isSelected);
- this.parentView_.modifySelectionArray(this, isSelected);
+ this.parentView_.modifySelectionArray(this.getSourceId(), isSelected);
this.parentView_.onSelectionChanged();
},
@@ -245,6 +247,10 @@
return this.row_.childNodes[0].firstChild;
},
+ getSourceId: function() {
+ return this.sourceEntry_.getSourceId();
+ },
+
/**
* Returns source ID of the entry whose row is currently above this one's.
* Returns null if no such node exists.
« no previous file with comments | « chrome/browser/resources/net_internals/source_entry.js ('k') | chrome/browser/resources/net_internals/table_printer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698