Chromium Code Reviews| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 return; | 77 return; |
| 78 } | 78 } |
| 79 | 79 |
| 80 switch (e.source.type) { | 80 switch (e.source.type) { |
| 81 case EventSourceType.URL_REQUEST: | 81 case EventSourceType.URL_REQUEST: |
| 82 // TODO(ricea): Remove SOCKET_STREAM after M41 is released. | 82 // TODO(ricea): Remove SOCKET_STREAM after M41 is released. |
| 83 case EventSourceType.SOCKET_STREAM: | 83 case EventSourceType.SOCKET_STREAM: |
| 84 case EventSourceType.HTTP_STREAM_JOB: | 84 case EventSourceType.HTTP_STREAM_JOB: |
| 85 this.description_ = e.params.url; | 85 this.description_ = e.params.url; |
| 86 break; | 86 break; |
| 87 // TODO(davidben): Remove CONNECT_JOB after M57 is released. | |
| 87 case EventSourceType.CONNECT_JOB: | 88 case EventSourceType.CONNECT_JOB: |
|
mmenke
2016/11/30 15:09:24
This works, even if EventSourceType.CONNECT_JOB is
davidben
2016/11/30 17:37:49
Apparently. EventSourceType.SOCKET_STREAM is also
mmenke
2016/11/30 20:51:59
But....then we'd have multiple "case -1:", instead
davidben
2016/11/30 20:58:38
Yup, works fine. JavaScript is fine with duplicate
| |
| 89 case EventSourceType.TRANSPORT_CONNECT_JOB: | |
| 90 case EventSourceType.SSL_CONNECT_JOB: | |
| 91 case EventSourceType.SOCKS_CONNECT_JOB: | |
| 92 case EventSourceType.HTTP_PROXY_CONNECT_JOB: | |
| 93 case EventSourceType.WEB_SOCKET_TRANSPORT_CONNECT_JOB: | |
| 88 this.description_ = e.params.group_name; | 94 this.description_ = e.params.group_name; |
| 89 break; | 95 break; |
| 90 case EventSourceType.HOST_RESOLVER_IMPL_JOB: | 96 case EventSourceType.HOST_RESOLVER_IMPL_JOB: |
| 91 case EventSourceType.HOST_RESOLVER_IMPL_PROC_TASK: | 97 case EventSourceType.HOST_RESOLVER_IMPL_PROC_TASK: |
| 92 this.description_ = e.params.host; | 98 this.description_ = e.params.host; |
| 93 break; | 99 break; |
| 94 case EventSourceType.DISK_CACHE_ENTRY: | 100 case EventSourceType.DISK_CACHE_ENTRY: |
| 95 case EventSourceType.MEMORY_CACHE_ENTRY: | 101 case EventSourceType.MEMORY_CACHE_ENTRY: |
| 96 this.description_ = e.params.key; | 102 this.description_ = e.params.key; |
| 97 break; | 103 break; |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 340 this.entries_, | 346 this.entries_, |
| 341 SourceTracker.getInstance().getPrivacyStripping(), | 347 SourceTracker.getInstance().getPrivacyStripping(), |
| 342 SourceTracker.getInstance().getUseRelativeTimes() ? | 348 SourceTracker.getInstance().getUseRelativeTimes() ? |
| 343 timeutil.getBaseTime() : 0, | 349 timeutil.getBaseTime() : 0, |
| 344 Constants.clientInfo.numericDate); | 350 Constants.clientInfo.numericDate); |
| 345 }, | 351 }, |
| 346 }; | 352 }; |
| 347 | 353 |
| 348 return SourceEntry; | 354 return SourceEntry; |
| 349 })(); | 355 })(); |
| OLD | NEW |