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 27 matching lines...) Expand all Loading... |
38 } | 38 } |
39 | 39 |
40 // If we have a net error code, update |this.isError_| if appropriate. | 40 // If we have a net error code, update |this.isError_| if appropriate. |
41 if (logEntry.params) { | 41 if (logEntry.params) { |
42 var netErrorCode = logEntry.params.net_error; | 42 var netErrorCode = logEntry.params.net_error; |
43 // Skip both cases where netErrorCode is undefined, and cases where it | 43 // Skip both cases where netErrorCode is undefined, and cases where it |
44 // is 0, indicating no actual error occurred. | 44 // is 0, indicating no actual error occurred. |
45 if (netErrorCode) { | 45 if (netErrorCode) { |
46 // Ignore error code caused by not finding an entry in the cache. | 46 // Ignore error code caused by not finding an entry in the cache. |
47 if (logEntry.type != EventType.HTTP_CACHE_OPEN_ENTRY || | 47 if (logEntry.type != EventType.HTTP_CACHE_OPEN_ENTRY || |
48 netErrorCode != NetError.FAILED) { | 48 netErrorCode != NetError.ERR_FAILED) { |
49 this.isError_ = true; | 49 this.isError_ = true; |
50 } | 50 } |
51 } | 51 } |
52 } | 52 } |
53 | 53 |
54 var prevStartEntry = this.getStartEntry_(); | 54 var prevStartEntry = this.getStartEntry_(); |
55 this.entries_.push(logEntry); | 55 this.entries_.push(logEntry); |
56 var curStartEntry = this.getStartEntry_(); | 56 var curStartEntry = this.getStartEntry_(); |
57 | 57 |
58 // If we just got the first entry for this source. | 58 // If we just got the first entry for this source. |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 this.entries_, | 340 this.entries_, |
341 SourceTracker.getInstance().getPrivacyStripping(), | 341 SourceTracker.getInstance().getPrivacyStripping(), |
342 SourceTracker.getInstance().getUseRelativeTimes() ? | 342 SourceTracker.getInstance().getUseRelativeTimes() ? |
343 timeutil.getBaseTime() : 0, | 343 timeutil.getBaseTime() : 0, |
344 Constants.clientInfo.numericDate); | 344 Constants.clientInfo.numericDate); |
345 }, | 345 }, |
346 }; | 346 }; |
347 | 347 |
348 return SourceEntry; | 348 return SourceEntry; |
349 })(); | 349 })(); |
OLD | NEW |