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

Side by Side Diff: chrome/browser/resources/net_internals/source_tracker.js

Issue 8200011: Add NetLog support to UDP sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: ??? Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/net_internals/source_entry.js ('k') | net/base/net_log.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var SourceTracker = (function() { 5 var SourceTracker = (function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * This class keeps track of all NetLog events. 9 * This class keeps track of all NetLog events.
10 * It receives events from the browser and when loading a log file, and passes 10 * It receives events from the browser and when loading a log file, and passes
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 /** 69 /**
70 * Returns the number of events that were captured passively by the 70 * Returns the number of events that were captured passively by the
71 * browser prior to when the net-internals page was started. 71 * browser prior to when the net-internals page was started.
72 */ 72 */
73 getNumPassivelyCapturedEvents: function() { 73 getNumPassivelyCapturedEvents: function() {
74 return this.numPassivelyCapturedEvents_; 74 return this.numPassivelyCapturedEvents_;
75 }, 75 },
76 76
77 /** 77 /**
78 * Returns the description of the specified SourceEntry, or an empty string
79 * if it doesn't exist.
80 */
81 getDescription: function(id) {
82 var entry = this.getSourceEntry(id);
83 if (entry)
84 return entry.getDescription();
85 return '';
86 },
87
88 /**
78 * Returns the specified SourceEntry. 89 * Returns the specified SourceEntry.
79 */ 90 */
80 getSourceEntry: function(id) { 91 getSourceEntry: function(id) {
81 return this.sourceEntries_[id]; 92 return this.sourceEntries_[id];
82 }, 93 },
83 94
84 onReceivedPassiveLogEntries: function(logEntries) { 95 onReceivedPassiveLogEntries: function(logEntries) {
85 // Due to an expected race condition, it is possible to receive actively 96 // Due to an expected race condition, it is possible to receive actively
86 // captured log entries before the passively logged entries are received. 97 // captured log entries before the passively logged entries are received.
87 // 98 //
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 * ovserver.deleteAllSourceEntries() 222 * ovserver.deleteAllSourceEntries()
212 * observer.onSecurityStrippingChanged() 223 * observer.onSecurityStrippingChanged()
213 */ 224 */
214 addObserver: function(observer) { 225 addObserver: function(observer) {
215 this.observers_.push(observer); 226 this.observers_.push(observer);
216 } 227 }
217 }; 228 };
218 229
219 return SourceTracker; 230 return SourceTracker;
220 })(); 231 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/source_entry.js ('k') | net/base/net_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698