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

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

Issue 10987030: Make about:net-internal's filters work a bit better. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Response to comments, retry upload (First corrupt?) Created 8 years, 3 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/source_tracker.js ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/net_internals/table_printer.js
===================================================================
--- chrome/browser/resources/net_internals/table_printer.js (revision 158398)
+++ chrome/browser/resources/net_internals/table_printer.js (working copy)
@@ -111,6 +111,27 @@
},
/**
+ * Returns true if searchString can be found entirely within a cell.
+ * Case insensitive.
+ *
+ * @param {string} string String to search for, must be lowercase.
+ * @return {boolean} True if some cell contains searchString.
+ */
+ search: function(searchString) {
+ var numColumns = this.getNumColumns();
+ for (var r = 0; r < this.rows_.length; ++r) {
+ for (var c = 0; c < numColumns; ++c) {
+ var cell = this.getCell_(r, c);
+ if (!cell)
+ continue;
+ if (cell.text.toLowerCase().indexOf(searchString) != -1)
+ return true;
+ }
+ }
+ return false;
+ },
+
+ /**
* Prints a formatted text representation of the table data to the
* node |parent|. |spacing| indicates number of extra spaces, if any,
* to add between columns.
« no previous file with comments | « chrome/browser/resources/net_internals/source_tracker.js ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698