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

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: Cleaned up year on licence text. 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..584eb14297df158335d9809e38a74b4e6f165bda 100644
--- a/chrome/browser/resources/net_internals/source_entry.js
+++ b/chrome/browser/resources/net_internals/source_entry.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -131,6 +131,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)
@@ -155,6 +158,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 ||
@@ -165,6 +173,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