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

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

Issue 1560025: Initialize the new net internals page using the passively collected log entri... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add missing unittest file Created 10 years, 8 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/index.html ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 /** 5 /**
6 * Dictionary of constants (initialized by browser). 6 * Dictionary of constants (initialized by browser).
7 */ 7 */
8 var LogEventType = null; 8 var LogEventType = null;
9 var LogEventPhase = null; 9 var LogEventPhase = null;
10 var LogSourceType = null; 10 var LogSourceType = null;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 this.badProxiesObservers_, 'onBadProxiesChanged', badProxies); 202 this.badProxiesObservers_, 'onBadProxiesChanged', badProxies);
203 }; 203 };
204 204
205 BrowserBridge.prototype.receivedHostResolverCache = 205 BrowserBridge.prototype.receivedHostResolverCache =
206 function(hostResolverCache) { 206 function(hostResolverCache) {
207 this.dispatchToObserversFromPoll_( 207 this.dispatchToObserversFromPoll_(
208 this.hostResolverCacheObservers_, 'onHostResolverCacheChanged', 208 this.hostResolverCacheObservers_, 'onHostResolverCacheChanged',
209 hostResolverCache); 209 hostResolverCache);
210 }; 210 };
211 211
212 BrowserBridge.prototype.receivedPassiveLogEntries = function(entries) {
213 for (var i = 0; i < entries.length; ++i)
214 this.receivedLogEntry(entries[i]);
215 };
216
212 //------------------------------------------------------------------------------ 217 //------------------------------------------------------------------------------
213 218
214 /** 219 /**
215 * Adds a listener of log entries. |observer| will be called back when new log 220 * Adds a listener of log entries. |observer| will be called back when new log
216 * data arrives, through: 221 * data arrives, through:
217 * 222 *
218 * observer.onLogEntryAdded(logEntry) 223 * observer.onLogEntryAdded(logEntry)
219 */ 224 */
220 BrowserBridge.prototype.addLogObserver = function(observer) { 225 BrowserBridge.prototype.addLogObserver = function(observer) {
221 this.logObservers_.push(observer); 226 this.logObservers_.push(observer);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 // If the data hasn't changed since last time, no need to notify observers. 301 // If the data hasn't changed since last time, no need to notify observers.
297 if (prevData && JSON.stringify(prevData) == JSON.stringify(data)) 302 if (prevData && JSON.stringify(prevData) == JSON.stringify(data))
298 return; 303 return;
299 304
300 this.prevPollData_[method] = data; 305 this.prevPollData_[method] = data;
301 306
302 // Ok, notify the observers of the change. 307 // Ok, notify the observers of the change.
303 for (var i = 0; i < observerList.length; ++i) 308 for (var i = 0; i < observerList.length; ++i)
304 observerList[i][method](data); 309 observerList[i][method](data);
305 }; 310 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/index.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698