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 // TODO(eroman): put these methods into a namespace. | 5 // TODO(eroman): put these methods into a namespace. |
| 6 | 6 |
| 7 var createLogEntryTablePrinter; | 7 var createLogEntryTablePrinter; |
| 8 var proxySettingsToString; | 8 var proxySettingsToString; |
| 9 var stripPrivacyInfo; | 9 var stripPrivacyInfo; |
| 10 | 10 |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 267 /** | 267 /** |
| 268 * Finds a writer to format the parameters for events of type |eventType|. | 268 * Finds a writer to format the parameters for events of type |eventType|. |
| 269 * | 269 * |
| 270 * @return {function} The returned function "writer" can be invoked | 270 * @return {function} The returned function "writer" can be invoked |
| 271 * as |writer(entry, writer, consumedParams)|. It will | 271 * as |writer(entry, writer, consumedParams)|. It will |
| 272 * output the parameters of |entry| to |out|, and fill | 272 * output the parameters of |entry| to |out|, and fill |
| 273 * |consumedParams| with the keys of the parameters | 273 * |consumedParams| with the keys of the parameters |
| 274 * consumed. If no writer is available for |eventType| then | 274 * consumed. If no writer is available for |eventType| then |
| 275 * returns null. | 275 * returns null. |
| 276 */ | 276 */ |
| 277 function getParamaterWriterForEventType(eventType) { | 277 function getParamaterWriterForEventType(eventType) { |
|
mmenke
2016/10/25 15:08:06
While you're here, could you fix the spelling of t
| |
| 278 switch (eventType) { | 278 switch (eventType) { |
| 279 case EventType.HTTP_TRANSACTION_SEND_REQUEST_HEADERS: | 279 case EventType.HTTP_TRANSACTION_SEND_REQUEST_HEADERS: |
| 280 case EventType.HTTP_TRANSACTION_SEND_TUNNEL_HEADERS: | 280 case EventType.HTTP_TRANSACTION_SEND_TUNNEL_HEADERS: |
| 281 case EventType.TYPE_HTTP_CACHE_CALLER_REQUEST_HEADERS: | 281 case EventType.TYPE_HTTP_CACHE_CALLER_REQUEST_HEADERS: |
| 282 return writeParamsForRequestHeaders; | 282 return writeParamsForRequestHeaders; |
| 283 | 283 |
| 284 case EventType.PROXY_CONFIG_CHANGED: | 284 case EventType.PROXY_CONFIG_CHANGED: |
| 285 return writeParamsForProxyConfigChanged; | 285 return writeParamsForProxyConfigChanged; |
| 286 | 286 |
| 287 case EventType.CERT_VERIFIER_JOB: | 287 case EventType.CERT_VERIFIER_JOB: |
| 288 case EventType.SSL_CERTIFICATES_RECEIVED: | 288 case EventType.SSL_CERTIFICATES_RECEIVED: |
| 289 return writeParamsForCertificates; | 289 return writeParamsForCertificates; |
| 290 case EventType.CERT_CT_COMPLIANCE_CHECKED: | |
| 290 case EventType.EV_CERT_CT_COMPLIANCE_CHECKED: | 291 case EventType.EV_CERT_CT_COMPLIANCE_CHECKED: |
| 291 return writeParamsForCheckedEVCertificates; | 292 return writeParamsForCheckedCertificates; |
| 292 | 293 |
| 293 case EventType.SSL_VERSION_FALLBACK: | 294 case EventType.SSL_VERSION_FALLBACK: |
| 294 return writeParamsForSSLVersionFallback; | 295 return writeParamsForSSLVersionFallback; |
| 295 } | 296 } |
| 296 return null; | 297 return null; |
| 297 } | 298 } |
| 298 | 299 |
| 299 /** | 300 /** |
| 300 * Default parameter writer that outputs a visualization of field named |key| | 301 * Default parameter writer that outputs a visualization of field named |key| |
| 301 * with value |value| to |out|. | 302 * with value |value| to |out|. |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 643 | 644 |
| 644 if (typeof(entry.params.cert_status) == 'number') { | 645 if (typeof(entry.params.cert_status) == 'number') { |
| 645 var valueStr = entry.params.cert_status + ' (' + | 646 var valueStr = entry.params.cert_status + ' (' + |
| 646 getCertStatusFlagSymbolicString(entry.params.cert_status) + ')'; | 647 getCertStatusFlagSymbolicString(entry.params.cert_status) + ')'; |
| 647 out.writeArrowKeyValue('cert_status', valueStr); | 648 out.writeArrowKeyValue('cert_status', valueStr); |
| 648 consumedParams.cert_status = true; | 649 consumedParams.cert_status = true; |
| 649 } | 650 } |
| 650 | 651 |
| 651 } | 652 } |
| 652 | 653 |
| 653 function writeParamsForCheckedEVCertificates(entry, out, consumedParams) { | 654 function writeParamsForCheckedCertificates(entry, out, consumedParams) { |
| 654 if (typeof(entry.params.certificate) == 'object') | 655 if (typeof(entry.params.certificate) == 'object') |
| 655 writeCertificateParam( | 656 writeCertificateParam( |
| 656 entry.params.certificate, out, consumedParams, 'certificate'); | 657 entry.params.certificate, out, consumedParams, 'certificate'); |
| 657 } | 658 } |
| 658 | 659 |
| 659 /** | 660 /** |
| 660 * Outputs the SSL version fallback parameters of |entry| to |out|. | 661 * Outputs the SSL version fallback parameters of |entry| to |out|. |
| 661 */ | 662 */ |
| 662 function writeParamsForSSLVersionFallback(entry, out, consumedParams) { | 663 function writeParamsForSSLVersionFallback(entry, out, consumedParams) { |
| 663 var params = entry.params; | 664 var params = entry.params; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 802 } | 803 } |
| 803 | 804 |
| 804 if (config.source != undefined && config.source != 'UNKNOWN') | 805 if (config.source != undefined && config.source != 'UNKNOWN') |
| 805 result.push('Source: ' + config.source); | 806 result.push('Source: ' + config.source); |
| 806 | 807 |
| 807 return result.join('\n'); | 808 return result.join('\n'); |
| 808 }; | 809 }; |
| 809 | 810 |
| 810 // End of anonymous namespace. | 811 // End of anonymous namespace. |
| 811 })(); | 812 })(); |
| OLD | NEW |