OLD | NEW |
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 * in the list view. Most often this is a URL that identifies the request, | 179 * in the list view. Most often this is a URL that identifies the request, |
180 * or a hostname for a connect job, etc... | 180 * or a hostname for a connect job, etc... |
181 */ | 181 */ |
182 getDescription: function() { | 182 getDescription: function() { |
183 return this.description_; | 183 return this.description_; |
184 }, | 184 }, |
185 | 185 |
186 /** | 186 /** |
187 * Returns the starting entry for this source. Conceptually this is the | 187 * Returns the starting entry for this source. Conceptually this is the |
188 * first entry that was logged to this source. However, we skip over the | 188 * first entry that was logged to this source. However, we skip over the |
189 * TYPE_REQUEST_ALIVE entries which wrap TYPE_URL_REQUEST_START_JOB | 189 * TYPE_REQUEST_ALIVE entries without parameters which wrap |
190 * entries. | 190 * TYPE_URL_REQUEST_START_JOB entries. (TYPE_REQUEST_ALIVE may or may not |
| 191 * have parameters depending on what version of Chromium they were |
| 192 * generated from.) |
191 */ | 193 */ |
192 getStartEntry_: function() { | 194 getStartEntry_: function() { |
193 if (this.entries_.length < 1) | 195 if (this.entries_.length < 1) |
194 return undefined; | 196 return undefined; |
195 if (this.entries_[0].source.type == EventSourceType.FILESTREAM) { | 197 if (this.entries_[0].source.type == EventSourceType.FILESTREAM) { |
196 var e = this.findLogEntryByType_(EventType.FILE_STREAM_OPEN); | 198 var e = this.findLogEntryByType_(EventType.FILE_STREAM_OPEN); |
197 if (e != undefined) | 199 if (e != undefined) |
198 return e; | 200 return e; |
199 } | 201 } |
200 if (this.entries_[0].source.type == EventSourceType.DOWNLOAD) { | 202 if (this.entries_[0].source.type == EventSourceType.DOWNLOAD) { |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 this.entries_, | 348 this.entries_, |
347 SourceTracker.getInstance().getPrivacyStripping(), | 349 SourceTracker.getInstance().getPrivacyStripping(), |
348 SourceTracker.getInstance().getUseRelativeTimes() ? | 350 SourceTracker.getInstance().getUseRelativeTimes() ? |
349 timeutil.getBaseTime() : 0, | 351 timeutil.getBaseTime() : 0, |
350 Constants.clientInfo.numericDate); | 352 Constants.clientInfo.numericDate); |
351 }, | 353 }, |
352 }; | 354 }; |
353 | 355 |
354 return SourceEntry; | 356 return SourceEntry; |
355 })(); | 357 })(); |
OLD | NEW |