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

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 copyright issue. 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 389369b2b934188f0b874dcdc3abc8701f73f995..c24f27b8b04f2cace6fdefc1521334d6506f5306 100644
--- a/chrome/browser/resources/net_internals/source_entry.js
+++ b/chrome/browser/resources/net_internals/source_entry.js
@@ -132,6 +132,9 @@ var SourceEntry = (function() {
case LogSourceType.DNS_TRANSACTION:
this.description_ = e.params.hostname;
break;
+ case LogSourceType.FILESTREAM:
+ this.description_ = e.params.file_name;
+ break;
}
if (this.description_ == undefined)
@@ -156,6 +159,11 @@ var SourceEntry = (function() {
getStartEntry_: function() {
if (this.entries_.length < 1)
return undefined;
+ if (this.entries_[0].source.type == LogSourceType.FILESTREAM) {
+ var e = this.findLogEntryByType_(LogEventType.FILE_STREAM_OPEN);
+ if (e != undefined)
+ return e;
+ }
if (this.entries_.length >= 2) {
if (this.entries_[0].type == LogEventType.REQUEST_ALIVE ||
this.entries_[0].type == LogEventType.SOCKET_POOL_CONNECT_JOB ||
@@ -166,6 +174,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_;
},
« no previous file with comments | « chrome/browser/resources/net_internals/events_view.css ('k') | chrome/browser/safe_browsing/bloom_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698