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

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

Issue 9288084: Added Net logging to FileStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed typo in posix version of file stream. Created 8 years, 11 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
Index: chrome/browser/resources/net_internals/source_entry.js
diff --git a/chrome/browser/resources/net_internals/source_entry.js b/chrome/browser/resources/net_internals/source_entry.js
index 1a244dbebdecbefe4c02726ab137ead6634d2f73..071c9432735997a254a2f650302fbca952370f2f 100644
--- a/chrome/browser/resources/net_internals/source_entry.js
+++ b/chrome/browser/resources/net_internals/source_entry.js
@@ -131,6 +131,12 @@ var SourceEntry = (function() {
case LogSourceType.DNS_TRANSACTION:
this.description_ = e.params.hostname;
break;
+ case LogSourceType.FILESTREAM:
+ /* Use the open info */
mmenke 2012/01/30 22:38:39 nit: Current style in net-internals JS files is t
ahendrickson 2012/01/31 20:12:40 Done.
+ e = this.findLogEntryByType(LogEventType.FILE_STREAM_OPEN);
mmenke 2012/01/30 22:38:39 This should be in findLogEntryByType_. Changes in
ahendrickson 2012/01/31 20:12:40 Done.
+ if (e != undefined)
+ this.description_ = e.params.file_name;
+ break;
}
if (this.description_ == undefined)
@@ -165,6 +171,19 @@ var SourceEntry = (function() {
return this.entries_[0];
},
+ /**
+ * Returns the first entry with the specified type, or undefined if not
+ * found.
+ */
+ findLogEntryByType: function(type) {
+ for (var i = 0; i < this.entries_.length; ++i) {
+ if (this.entries_[i].type == type) {
+ return this.entries_[i];
+ }
+ }
+ return undefined;
+ },
+
getLogEntries: function() {
return this.entries_;
},

Powered by Google App Engine
This is Rietveld 408576698