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

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

Issue 11583027: NetLog: Move the group_name to a CONNECT_JOB's first event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add backward compatibility Created 7 years, 12 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 | « no previous file | net/base/net_log_event_type_list.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 SourceEntry = (function() { 5 var SourceEntry = (function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * A SourceEntry gathers all log entries with the same source. 9 * A SourceEntry gathers all log entries with the same source.
10 * 10 *
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // Otherwise, if the file was opened, use that name 195 // Otherwise, if the file was opened, use that name
196 e = this.findLogEntryByType_(EventType.DOWNLOAD_FILE_OPENED); 196 e = this.findLogEntryByType_(EventType.DOWNLOAD_FILE_OPENED);
197 if (e != undefined) 197 if (e != undefined)
198 return e; 198 return e;
199 // History items are never opened, so use the activation info 199 // History items are never opened, so use the activation info
200 e = this.findLogEntryByType_(EventType.DOWNLOAD_ITEM_ACTIVE); 200 e = this.findLogEntryByType_(EventType.DOWNLOAD_ITEM_ACTIVE);
201 if (e != undefined) 201 if (e != undefined)
202 return e; 202 return e;
203 } 203 }
204 if (this.entries_.length >= 2) { 204 if (this.entries_.length >= 2) {
205 if (this.entries_[0].type == EventType.SOCKET_POOL_CONNECT_JOB || 205 // Needed for compatability with log dumps prior to M26.
206 this.entries_[1].type == EventType.UDP_CONNECT) { 206 // TODO(mmenke): Remove this.
207 if (this.entries_[0].type == EventType.SOCKET_POOL_CONNECT_JOB &&
208 this.entries_[0].params == undefined) {
207 return this.entries_[1]; 209 return this.entries_[1];
208 } 210 }
211 if (this.entries_[1].type == EventType.UDP_CONNECT)
212 return this.entries_[1];
209 if (this.entries_[0].type == EventType.REQUEST_ALIVE && 213 if (this.entries_[0].type == EventType.REQUEST_ALIVE &&
210 this.entries_[0].params == undefined) { 214 this.entries_[0].params == undefined) {
211 var start_index = 1; 215 var start_index = 1;
212 // Skip over URL_REQUEST_BLOCKED_ON_DELEGATE events for URL_REQUESTs. 216 // Skip over URL_REQUEST_BLOCKED_ON_DELEGATE events for URL_REQUESTs.
213 while (start_index + 1 < this.entries_.length && 217 while (start_index + 1 < this.entries_.length &&
214 this.entries_[start_index].type == 218 this.entries_[start_index].type ==
215 EventType.URL_REQUEST_BLOCKED_ON_DELEGATE) { 219 EventType.URL_REQUEST_BLOCKED_ON_DELEGATE) {
216 ++start_index; 220 ++start_index;
217 } 221 }
218 return this.entries_[start_index]; 222 return this.entries_[start_index];
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 printAsText: function(parent) { 317 printAsText: function(parent) {
314 // The date will be undefined if not viewing a loaded log file. 318 // The date will be undefined if not viewing a loaded log file.
315 printLogEntriesAsText(this.entries_, parent, 319 printLogEntriesAsText(this.entries_, parent,
316 SourceTracker.getInstance().getPrivacyStripping(), 320 SourceTracker.getInstance().getPrivacyStripping(),
317 Constants.clientInfo.numericDate); 321 Constants.clientInfo.numericDate);
318 } 322 }
319 }; 323 };
320 324
321 return SourceEntry; 325 return SourceEntry;
322 })(); 326 })();
OLDNEW
« no previous file with comments | « no previous file | net/base/net_log_event_type_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698