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
3 // found in the LICENSE file.
5 // NOTE: No header guards are used, since this file is intended to be expanded
6 // directly into net_log.h. DO NOT include this file anywhere else.
8 // In the event of a failure, a many end events will have a |net_error|
9 // parameter with the integer error code associated with the failure. Most
10 // of these parameters are not individually documented.
12 // --------------------------------------------------------------------------
13 // General pseudo-events
14 // --------------------------------------------------------------------------
16 // Something got cancelled (we determine what is cancelled based on the
17 // log context around it.)
20 // Something failed (we determine what failed based on the log context
22 // The event has the following parameters:
25 // "net_error": <The net error code integer for the failure>,
29 // Marks the creation/destruction of a request (net::URLRequest or
31 EVENT_TYPE(REQUEST_ALIVE)
33 // ------------------------------------------------------------------------
35 // ------------------------------------------------------------------------
37 // The start/end of waiting on a host resolve (DNS) request.
38 // The BEGIN phase contains the following parameters:
41 // "source_dependency": <Source id of the request being waited on>,
43 EVENT_TYPE(HOST_RESOLVER_IMPL)
45 // The start/end of a host resolve (DNS) request. Note that these events are
46 // logged for all DNS requests, though not all requests result in the creation
47 // of a HostResolvedImpl::Request object.
49 // The BEGIN phase contains the following parameters:
52 // "host": <Hostname associated with the request>,
53 // "address_family": <The address family to restrict results to>
54 // "allow_cached_response": <Whether it is ok to return a result from
56 // "is_speculative": <Whether this request was started by the DNS
58 // "source_dependency": <Source id, if any, of what created the request>,
61 // If an error occurred, the END phase will contain these parameters:
63 // "net_error": <The net error code integer for the failure>,
65 EVENT_TYPE(HOST_RESOLVER_IMPL_REQUEST)
67 // This event is logged when IPv6 support is determined via IPv6 connect probe.
68 EVENT_TYPE(HOST_RESOLVER_IMPL_IPV6_SUPPORTED)
70 // This event is logged when a request is handled by a cache entry.
71 EVENT_TYPE(HOST_RESOLVER_IMPL_CACHE_HIT)
73 // This event is logged when a request is handled by a HOSTS entry.
74 EVENT_TYPE(HOST_RESOLVER_IMPL_HOSTS_HIT)
76 // This event is created when a new HostResolverImpl::Job is about to be created
78 EVENT_TYPE(HOST_RESOLVER_IMPL_CREATE_JOB)
80 // The creation/completion of a HostResolverImpl::Job which is created for
81 // Requests that cannot be resolved synchronously.
83 // The BEGIN phase contains the following parameters:
86 // "host": <Hostname associated with the request>,
87 // "source_dependency": <Source id, if any, of what created the request>,
90 // On success, the END phase has these parameters:
92 // "address_list": <The host name being resolved>,
94 // If an error occurred, the END phase will contain these parameters:
96 // "net_error": <The net error code integer for the failure>,
98 EVENT_TYPE(HOST_RESOLVER_IMPL_JOB)
100 // This event is created when a HostResolverImpl::Job is evicted from
101 // PriorityDispatch before it can start, because the limit on number of queued
103 EVENT_TYPE(HOST_RESOLVER_IMPL_JOB_EVICTED)
105 // This event is created when a HostResolverImpl::Job is started by
107 EVENT_TYPE(HOST_RESOLVER_IMPL_JOB_STARTED)
109 // This event is created when HostResolverImpl::ProcJob is about to start a new
110 // attempt to resolve the host.
112 // The ATTEMPT_STARTED event has the parameters:
115 // "attempt_number": <the number of the attempt that is resolving the host>,
117 EVENT_TYPE(HOST_RESOLVER_IMPL_ATTEMPT_STARTED)
119 // This event is created when HostResolverImpl::ProcJob has finished resolving
122 // The ATTEMPT_FINISHED event has the parameters:
125 // "attempt_number": <the number of the attempt that has resolved the host>,
127 // If an error occurred, the END phase will contain these additional parameters:
129 // "net_error": <The net error code integer for the failure>,
130 // "os_error": <The exact error code integer that getaddrinfo() returned>,
132 EVENT_TYPE(HOST_RESOLVER_IMPL_ATTEMPT_FINISHED)
134 // This is logged for a request when it's attached to a
135 // HostResolverImpl::Job. When this occurs without a preceding
136 // HOST_RESOLVER_IMPL_CREATE_JOB entry, it means the request was attached to an
137 // existing HostResolverImpl::Job.
139 // The event contains the following parameters:
142 // "source_dependency": <Source identifier for the attached Job>,
145 EVENT_TYPE(HOST_RESOLVER_IMPL_JOB_ATTACH)
147 // This event is logged for the job to which the request is attached.
148 // In that case, the event contains the following parameters:
151 // "source_dependency": <Source identifier for the attached Request>,
152 // "priority": <New priority of the job>,
154 EVENT_TYPE(HOST_RESOLVER_IMPL_JOB_REQUEST_ATTACH)
156 // This is logged for a job when a request is cancelled and detached.
158 // The event contains the following parameters:
161 // "source_dependency": <Source identifier for the detached Request>,
162 // "priority": <New priority of the job>,
164 EVENT_TYPE(HOST_RESOLVER_IMPL_JOB_REQUEST_DETACH)
166 // The creation/completion of a HostResolverImpl::ProcTask to call getaddrinfo.
167 // The BEGIN phase contains the following parameters:
170 // "hostname": <Hostname associated with the request>,
173 // On success, the END phase has these parameters:
175 // "address_list": <The resolved addresses>,
177 // If an error occurred, the END phase will contain these parameters:
179 // "net_error": <The net error code integer for the failure>,
180 // "os_error": <The exact error code integer that getaddrinfo() returned>,
182 EVENT_TYPE(HOST_RESOLVER_IMPL_PROC_TASK)
184 // The creation/completion of a HostResolverImpl::DnsTask to manage a
185 // DnsTransaction. The BEGIN phase contains the following parameters:
188 // "source_dependency": <Source id of DnsTransaction>,
191 // On success, the END phase has these parameters:
193 // "address_list": <The resolved addresses>,
195 // If an error occurred, the END phase will contain these parameters:
197 // "net_error": <The net error code integer for the failure>,
198 // "dns_error": <The detailed DnsResponse::Result>
200 EVENT_TYPE(HOST_RESOLVER_IMPL_DNS_TASK)
202 // ------------------------------------------------------------------------
204 // ------------------------------------------------------------------------
206 // The start/end of auto-detect + custom PAC URL configuration.
207 EVENT_TYPE(PROXY_SCRIPT_DECIDER)
209 // The start/end of when proxy autoconfig was artificially paused following
210 // a network change event. (We wait some amount of time after being told of
211 // network changes to avoid hitting spurious errors during auto-detect).
212 EVENT_TYPE(PROXY_SCRIPT_DECIDER_WAIT)
214 // The start/end of download of a PAC script. This could be the well-known
215 // WPAD URL (if testing auto-detect), or a custom PAC URL.
217 // The START event has the parameters:
219 // "source": <String describing where PAC script comes from>,
222 // If the fetch failed, then the END phase has these parameters:
224 // "net_error": <Net error code integer>,
226 EVENT_TYPE(PROXY_SCRIPT_DECIDER_FETCH_PAC_SCRIPT)
228 // This event means that initialization failed because there was no
229 // configured script fetcher. (This indicates a configuration error).
230 EVENT_TYPE(PROXY_SCRIPT_DECIDER_HAS_NO_FETCHER)
232 // This event is emitted after deciding to fall-back to the next source
233 // of PAC scripts in the list.
234 EVENT_TYPE(PROXY_SCRIPT_DECIDER_FALLING_BACK_TO_NEXT_PAC_SOURCE)
236 // ------------------------------------------------------------------------
238 // ------------------------------------------------------------------------
240 // The start/end of a proxy resolve request.
241 EVENT_TYPE(PROXY_SERVICE)
243 // The time while a request is waiting on InitProxyResolver to configure
244 // against either WPAD or custom PAC URL. The specifics on this time
245 // are found from ProxyService::init_proxy_resolver_log().
246 EVENT_TYPE(PROXY_SERVICE_WAITING_FOR_INIT_PAC)
248 // This event is emitted to show what the PAC script returned. It can contain
249 // extra parameters that are either:
251 // "pac_string": <List of valid proxy servers, in PAC format>,
254 // Or if the the resolver failed:
256 // "net_error": <Net error code that resolver failed with>,
258 EVENT_TYPE(PROXY_SERVICE_RESOLVED_PROXY_LIST)
260 // This event is emitted whenever the proxy settings used by ProxyService
263 // It contains these parameters:
265 // "old_config": <Dump of the previous proxy settings>,
266 // "new_config": <Dump of the new proxy settings>,
269 // Note that the "old_config" key will be omitted on the first fetch of the
270 // proxy settings (since there wasn't a previous value).
271 EVENT_TYPE(PROXY_CONFIG_CHANGED)
273 // Emitted when a list of bad proxies is reported to the proxy service.
277 // "bad_proxy_list": <List of bad proxies>,
279 EVENT_TYPE(BAD_PROXY_LIST_REPORTED)
281 // ------------------------------------------------------------------------
283 // ------------------------------------------------------------------------
285 // Emitted when the first proxy server in a list is being marked as
286 // bad and proxy resolution is going to failover to the next one in
287 // the list. The fallback is local to the request.
291 // "bad_proxy": <URI representation of the failed proxy server>,
293 EVENT_TYPE(PROXY_LIST_FALLBACK)
295 // ------------------------------------------------------------------------
296 // ProxyResolverV8Tracing
297 // ------------------------------------------------------------------------
299 // This event is emitted when a javascript error has been triggered by a
300 // PAC script. It contains the following event parameters:
302 // "line_number": <The line number in the PAC script
303 // (or -1 if not applicable)>,
304 // "message": <The error message>,
306 EVENT_TYPE(PAC_JAVASCRIPT_ERROR)
308 // This event is emitted when a PAC script called alert(). It contains the
309 // following event parameters:
311 // "message": <The string of the alert>,
313 EVENT_TYPE(PAC_JAVASCRIPT_ALERT)
315 // ------------------------------------------------------------------------
316 // MultiThreadedProxyResolver
317 // ------------------------------------------------------------------------
319 // Measures the time that a proxy resolve request was stalled waiting for a
320 // proxy resolver thread to free-up.
321 EVENT_TYPE(WAITING_FOR_PROXY_RESOLVER_THREAD)
323 // This event is emitted just before a PAC request is bound to a thread. It
324 // contains these parameters:
327 // "thread_number": <Identifier for the PAC thread that is going to
328 // run this request>,
330 EVENT_TYPE(SUBMITTED_TO_RESOLVER_THREAD)
332 // ------------------------------------------------------------------------
333 // Socket (Shared by stream and datagram sockets)
334 // ------------------------------------------------------------------------
336 // Marks the begin/end of a socket (TCP/SOCKS/SSL/UDP/"SpdyProxyClientSocket").
338 // The BEGIN phase contains the following parameters:
341 // "source_dependency": <Source identifier for the controlling entity>,
343 EVENT_TYPE(SOCKET_ALIVE)
345 // ------------------------------------------------------------------------
347 // ------------------------------------------------------------------------
349 // The start/end of a TCP connect(). This corresponds with a call to
350 // TCPClientSocket::Connect().
352 // The START event contains these parameters:
355 // "address_list": <List of network address strings>,
358 // And the END event will contain the following parameters:
361 // "net_error": <Net integer error code, on error>,
362 // "source_address": <Local source address of the connection, on success>,
364 EVENT_TYPE(TCP_CONNECT)
366 // Nested within TCP_CONNECT, there may be multiple attempts to connect
367 // to the individual addresses. The START event will describe the
368 // address the attempt is for:
371 // "address": <String of the network address>,
374 // And the END event will contain the system error code if it failed:
377 // "os_error": <Integer error code the operating system returned>,
379 EVENT_TYPE(TCP_CONNECT_ATTEMPT)
381 // The start/end of a TCP accept(). This corresponds with a call to
382 // TCPServerSocket::Accept().
384 // The END event will contain the following parameters on success:
386 // "address": <Remote address of the accepted connection>,
388 // On failure it contains the following parameters
390 // "net_error": <Net integer error code>,
392 EVENT_TYPE(TCP_ACCEPT)
394 // This event is logged to the socket stream whenever the socket is
395 // acquired/released via a ClientSocketHandle.
397 // The BEGIN phase contains the following parameters:
400 // "source_dependency": <Source identifier for the controlling entity>,
402 EVENT_TYPE(SOCKET_IN_USE)
404 // The start/end of a SOCKS connect().
405 EVENT_TYPE(SOCKS_CONNECT)
407 // The start/end of a SOCKS5 connect().
408 EVENT_TYPE(SOCKS5_CONNECT)
410 // This event is emitted when the SOCKS connect fails because the provided
411 // was longer than 255 characters.
412 EVENT_TYPE(SOCKS_HOSTNAME_TOO_BIG)
414 // These events are emitted when insufficient data was read while
415 // trying to establish a connection to the SOCKS proxy server
416 // (during the greeting phase or handshake phase, respectively).
417 EVENT_TYPE(SOCKS_UNEXPECTEDLY_CLOSED_DURING_GREETING)
418 EVENT_TYPE(SOCKS_UNEXPECTEDLY_CLOSED_DURING_HANDSHAKE)
420 // This event indicates that a bad version number was received in the
421 // proxy server's response. The extra parameters show its value:
423 // "version": <Integer version number in the response>,
425 EVENT_TYPE(SOCKS_UNEXPECTED_VERSION)
427 // This event indicates that the SOCKS proxy server returned an error while
428 // trying to create a connection. The following parameters will be attached
431 // "error_code": <Integer error code returned by the server>,
433 EVENT_TYPE(SOCKS_SERVER_ERROR)
435 // This event indicates that the SOCKS proxy server asked for an authentication
436 // method that we don't support. The following parameters are attached to the
439 // "method": <Integer method code>,
441 EVENT_TYPE(SOCKS_UNEXPECTED_AUTH)
443 // This event indicates that the SOCKS proxy server's response indicated an
444 // address type which we are not prepared to handle.
445 // The following parameters are attached to the event:
447 // "address_type": <Integer code for the address type>,
449 EVENT_TYPE(SOCKS_UNKNOWN_ADDRESS_TYPE)
451 // The start/end of an SSL "connect" (aka client handshake).
452 EVENT_TYPE(SSL_CONNECT)
454 // The start/end of an SSL server handshake (aka "accept").
455 EVENT_TYPE(SSL_SERVER_HANDSHAKE)
457 // The SSL server requested a client certificate.
458 EVENT_TYPE(SSL_CLIENT_CERT_REQUESTED)
460 // The start/end of getting a domain-bound certificate and private key.
462 // The END event will contain the following parameters on failure:
465 // "net_error": <Net integer error code>,
467 EVENT_TYPE(SSL_GET_DOMAIN_BOUND_CERT)
469 // The SSL server requested a channel id.
470 EVENT_TYPE(SSL_CHANNEL_ID_REQUESTED)
472 // A channel ID was provided to the SSL library to be sent to the SSL server.
473 EVENT_TYPE(SSL_CHANNEL_ID_PROVIDED)
475 // A client certificate (or none) was provided to the SSL library to be sent
476 // to the SSL server.
477 // The following parameters are attached to the event:
479 // "cert_count": <Number of certificates>,
481 // A cert_count of 0 means no client certificate was provided.
482 // A cert_count of -1 means a client certificate was provided but we don't
483 // know the size of the certificate chain.
484 EVENT_TYPE(SSL_CLIENT_CERT_PROVIDED)
486 // An SSL error occurred while trying to do the indicated activity.
487 // The following parameters are attached to the event:
489 // "net_error": <Integer code for the specific error type>,
490 // "ssl_lib_error": <SSL library's integer code for the specific error type>
492 EVENT_TYPE(SSL_HANDSHAKE_ERROR)
493 EVENT_TYPE(SSL_READ_ERROR)
494 EVENT_TYPE(SSL_WRITE_ERROR)
496 // An SSL connection needs to be retried with a lower protocol version because
497 // the server may be intolerant of the protocol version we offered.
498 // The following parameters are attached to the event:
500 // "host_and_port": <String encoding the host and port>,
501 // "net_error": <Net integer error code>,
502 // "version_before": <SSL version before the fallback>,
503 // "version_after": <SSL version after the fallback>,
505 EVENT_TYPE(SSL_VERSION_FALLBACK)
507 // We found that our prediction of the server's certificates was correct and
508 // we merged the verification with the SSLHostInfo. (Note: now obsolete.)
509 EVENT_TYPE(SSL_VERIFICATION_MERGED)
511 // An SSL error occurred while calling an NSS function not directly related to
512 // one of the above activities. Can also be used when more information than
513 // is provided by just an error code is needed:
515 // "function": <Name of the NSS function, as a string>,
516 // "param": <Most relevant parameter, if any>,
517 // "ssl_lib_error": <NSS library's integer code for the specific error type>
519 EVENT_TYPE(SSL_NSS_ERROR)
521 // The specified number of bytes were sent on the socket. Depending on the
522 // source of the event, may be logged either once the data is sent, or when it
523 // is queued to be sent.
524 // The following parameters are attached:
526 // "byte_count": <Number of bytes that were just sent>,
527 // "hex_encoded_bytes": <The exact bytes sent, as a hexadecimal string.
528 // Only present when byte logging is enabled>,
530 EVENT_TYPE(SOCKET_BYTES_SENT)
531 EVENT_TYPE(SSL_SOCKET_BYTES_SENT)
533 // The specified number of bytes were received on the socket.
534 // The following parameters are attached:
536 // "byte_count": <Number of bytes that were just received>,
537 // "hex_encoded_bytes": <The exact bytes received, as a hexadecimal string.
538 // Only present when byte logging is enabled>,
540 EVENT_TYPE(SOCKET_BYTES_RECEIVED)
541 EVENT_TYPE(SSL_SOCKET_BYTES_RECEIVED)
543 // A socket error occurred while trying to do the indicated activity.
544 // The following parameters are attached to the event:
546 // "net_error": <Integer code for the specific error type>,
547 // "os_error": <Integer error code the operating system returned>
549 EVENT_TYPE(SOCKET_READ_ERROR)
550 EVENT_TYPE(SOCKET_WRITE_ERROR)
552 // The socket was closed locally (The socket may or may not have been closed
553 // by the remote side already)
554 EVENT_TYPE(SOCKET_CLOSED)
556 // Certificates were received from the SSL server (during a handshake or
557 // renegotiation). This event is only present when logging at LOG_ALL.
558 // The following parameters are attached to the event:
560 // "certificates": <A list of PEM encoded certificates in the order that
561 // they were sent by the server>,
563 EVENT_TYPE(SSL_CERTIFICATES_RECEIVED)
565 // Signed Certificate Timestamps were received from the server.
566 // The following parameters are attached to the event:
568 // "embedded_scts": Base64-encoded SignedCertificateTimestampList,
569 // "scts_from_ocsp_response": Base64-encoded SignedCertificateTimestampList,
570 // "scts_from_tls_extension": Base64-encoded SignedCertificateTimestampList,
573 // The SignedCertificateTimestampList is defined in RFC6962 and is exactly as
574 // received from the server.
575 EVENT_TYPE(SIGNED_CERTIFICATE_TIMESTAMPS_RECEIVED)
577 // Signed Certificate Timestamps were checked.
578 // The following parameters are attached to the event:
580 // "verified_scts": <A list of SCTs>,
581 // "invalid_scts": <A list of SCTs>,
582 // "scts_from_unknown_logs": <A list of SCTs>,
585 // Where each SCT is an object:
587 // "origin": <one of: "embedded_in_certificate", "tls_extension", "ocsp">,
588 // "version": <numeric version>,
589 // "log_id": <base64-encoded log id>,
590 // "timestamp": <numeric timestamp in milliseconds since the Unix epoch>,
591 // "hash_algorithm": <name of the hash algorithm>,
592 // "signature_algorithm": <name of the signature algorithm>,
593 // "signature_data": <base64-encoded signature bytes>,
595 EVENT_TYPE(SIGNED_CERTIFICATE_TIMESTAMPS_CHECKED)
597 // ------------------------------------------------------------------------
599 // ------------------------------------------------------------------------
601 // The start/end of a UDP client connecting.
603 // The START event contains these parameters:
606 // "address": <Remote address being connected to>,
609 // And the END event will contain the following parameter:
612 // "net_error": <Net integer error code, on failure>,
614 EVENT_TYPE(UDP_CONNECT)
616 // The local address of the UDP socket, retrieved via getsockname.
617 // The following parameters are attached:
619 // "address": <Local address bound to the socket>,
621 EVENT_TYPE(UDP_LOCAL_ADDRESS)
623 // The specified number of bytes were transferred on the socket.
624 // The following parameters are attached:
626 // "address": <Remote address of data transfer. Not present when not
627 // specified for UDP_BYTES_SENT events>,
628 // "byte_count": <Number of bytes that were just received>,
629 // "hex_encoded_bytes": <The exact bytes received, as a hexadecimal string.
630 // Only present when byte logging is enabled>,
632 EVENT_TYPE(UDP_BYTES_RECEIVED)
633 EVENT_TYPE(UDP_BYTES_SENT)
635 // Logged when an error occurs while reading or writing to/from a UDP socket.
636 // The following parameters are attached:
638 // "net_error": <Net error code>,
640 EVENT_TYPE(UDP_RECEIVE_ERROR)
641 EVENT_TYPE(UDP_SEND_ERROR)
643 // ------------------------------------------------------------------------
644 // ClientSocketPoolBase::ConnectJob
645 // ------------------------------------------------------------------------
647 // The start/end of a ConnectJob.
649 // The BEGIN phase has these parameters:
652 // "group_name": <The group name for the socket request.>,
654 EVENT_TYPE(SOCKET_POOL_CONNECT_JOB)
656 // The start/end of the ConnectJob::Connect().
657 EVENT_TYPE(SOCKET_POOL_CONNECT_JOB_CONNECT)
659 // This event is logged whenever the ConnectJob gets a new socket
660 // association. The event parameters point to that socket:
663 // "source_dependency": <The source identifier for the new socket.>,
665 EVENT_TYPE(CONNECT_JOB_SET_SOCKET)
667 // Whether the connect job timed out.
668 EVENT_TYPE(SOCKET_POOL_CONNECT_JOB_TIMED_OUT)
670 // ------------------------------------------------------------------------
671 // ClientSocketPoolBaseHelper
672 // ------------------------------------------------------------------------
674 // The start/end of a client socket pool request for a socket.
675 EVENT_TYPE(SOCKET_POOL)
677 // The request stalled because there are too many sockets in the pool.
678 EVENT_TYPE(SOCKET_POOL_STALLED_MAX_SOCKETS)
680 // The request stalled because there are too many sockets in the group.
681 EVENT_TYPE(SOCKET_POOL_STALLED_MAX_SOCKETS_PER_GROUP)
683 // Indicates that we reused an existing socket. Attached to the event are
686 // "idle_ms": <The number of milliseconds the socket was sitting idle for>,
688 EVENT_TYPE(SOCKET_POOL_REUSED_AN_EXISTING_SOCKET)
690 // This event simply describes the host:port that were requested from the
691 // socket pool. Its parameters are:
693 // "host_and_port": <String encoding the host and port>,
695 EVENT_TYPE(TCP_CLIENT_SOCKET_POOL_REQUESTED_SOCKET)
697 // This event simply describes the host:port that were requested from the
698 // socket pool. Its parameters are:
700 // "host_and_port": <String encoding the host and port>,
702 EVENT_TYPE(TCP_CLIENT_SOCKET_POOL_REQUESTED_SOCKETS)
705 // A backup connect job is created due to slow connect.
706 EVENT_TYPE(BACKUP_CONNECT_JOB_CREATED)
708 // This event is sent when a connect job is eventually bound to a request
709 // (because of late binding and socket backup jobs, we don't assign the job to
710 // a request until it has completed).
712 // The event parameters are:
714 // "source_dependency": <Source identifer for the connect job we are
717 EVENT_TYPE(SOCKET_POOL_BOUND_TO_CONNECT_JOB)
719 // Identifies the NetLog::Source() for the Socket assigned to the pending
720 // request. The event parameters are:
722 // "source_dependency": <Source identifier for the socket we acquired>,
724 EVENT_TYPE(SOCKET_POOL_BOUND_TO_SOCKET)
726 // The start/end of a client socket pool request for multiple sockets.
727 // The event parameters are:
729 // "num_sockets": <Number of sockets we're trying to ensure are connected>,
731 EVENT_TYPE(SOCKET_POOL_CONNECTING_N_SOCKETS)
733 // ------------------------------------------------------------------------
735 // ------------------------------------------------------------------------
737 // Measures the time it took a net::URLRequestJob to start. For the most part
738 // this corresponds with the time between net::URLRequest::Start() and
739 // net::URLRequest::ResponseStarted(), however it is also repeated for every
740 // redirect, and every intercepted job that handles the request.
742 // For the BEGIN phase, the following parameters are attached:
744 // "url": <String of URL being loaded>,
745 // "method": <The method ("POST" or "GET" or "HEAD" etc..)>,
746 // "load_flags": <Numeric value of the combined load flags>,
747 // "priority": <Numeric priority of the request>,
748 // "upload_id" <String of upload body identifier, if present>,
751 // For the END phase, if there was an error, the following parameters are
754 // "net_error": <Net error code of the failure>,
756 EVENT_TYPE(URL_REQUEST_START_JOB)
758 // This event is sent once a net::URLRequest receives a redirect. The parameters
759 // attached to the event are:
761 // "location": <The URL that was redirected to>,
763 EVENT_TYPE(URL_REQUEST_REDIRECTED)
765 // Measures the time between when a net::URLRequest calls a delegate that can
766 // block it, and when the delegate allows the request to resume.
767 EVENT_TYPE(URL_REQUEST_DELEGATE)
769 // Logged when a delegate informs the URL_REQUEST of what's currently blocking
770 // the request. The parameters attached to the begin event are:
772 // "delegate_info": <Information about what's blocking the request>,
774 EVENT_TYPE(DELEGATE_INFO)
776 // The specified number of bytes were read from the net::URLRequest.
777 // The filtered event is used when the bytes were passed through a filter before
778 // being read. This event is only present when byte logging is enabled.
779 // The following parameters are attached:
781 // "byte_count": <Number of bytes that were just sent>,
782 // "hex_encoded_bytes": <The exact bytes sent, as a hexadecimal string>,
784 EVENT_TYPE(URL_REQUEST_JOB_BYTES_READ)
785 EVENT_TYPE(URL_REQUEST_JOB_FILTERED_BYTES_READ)
787 // This event is sent when the priority of a net::URLRequest is
788 // changed after it has started. The following parameters are attached:
790 // "priority": <Numerical value of the priority (higher is more important)>,
792 EVENT_TYPE(URL_REQUEST_SET_PRIORITY)
794 EVENT_TYPE(URL_REQUEST_REDIRECT_JOB)
795 // This event is logged when a URLRequestRedirectJob is started for a request.
796 // The following parameters are attached:
798 // "reason": <Reason for the redirect, as a string>,
801 EVENT_TYPE(URL_REQUEST_FAKE_RESPONSE_HEADERS_CREATED)
802 // This event is logged when a URLRequestRedirectJob creates the fake response
803 // headers for a request, prior to returning them.
804 // The following parameters are attached:
806 // "headers": <The list of header:value pairs>,
809 // ------------------------------------------------------------------------
811 // ------------------------------------------------------------------------
813 // Measures the time while getting a reference to the back end.
814 EVENT_TYPE(HTTP_CACHE_GET_BACKEND)
816 // Measures the time while opening a disk cache entry.
817 EVENT_TYPE(HTTP_CACHE_OPEN_ENTRY)
819 // Measures the time while creating a disk cache entry.
820 EVENT_TYPE(HTTP_CACHE_CREATE_ENTRY)
822 // Measures the time it takes to add a HttpCache::Transaction to an http cache
823 // entry's list of active Transactions.
824 EVENT_TYPE(HTTP_CACHE_ADD_TO_ENTRY)
826 // Measures the time while deleting a disk cache entry.
827 EVENT_TYPE(HTTP_CACHE_DOOM_ENTRY)
829 // Measures the time while reading/writing a disk cache entry's response headers
831 EVENT_TYPE(HTTP_CACHE_READ_INFO)
832 EVENT_TYPE(HTTP_CACHE_WRITE_INFO)
834 // Measures the time while reading/writing a disk cache entry's body.
835 EVENT_TYPE(HTTP_CACHE_READ_DATA)
836 EVENT_TYPE(HTTP_CACHE_WRITE_DATA)
838 // Identifies the NetLog::Source() for the asynchronous HttpCache::Transaction
839 // that will revalidate this entry.
840 // The event parameters are:
842 // "source_dependency": <Source identifier for the async Transaction>
844 EVENT_TYPE(HTTP_CACHE_VALIDATE_RESOURCE_ASYNC)
846 // The start/end of performing an async revalidation.
847 // For the BEGIN phase, the event parameters are:
849 // "source_dependency": <Source identifier for the Request>
850 // "url": <String of URL being loaded>,
851 // "method": <Method of request>
854 // For the END phase, if there was an error, the following parameters are
857 // "net_error": <Net error code of the failure>,
859 EVENT_TYPE(ASYNC_REVALIDATION)
861 // ------------------------------------------------------------------------
862 // Disk Cache / Memory Cache
863 // ------------------------------------------------------------------------
865 // The creation/destruction of a disk_cache::EntryImpl object. The "creation"
866 // is considered to be the point at which an Entry is first considered to be
867 // good and associated with a key. Note that disk and memory cache entries
868 // share event types.
870 // For the BEGIN phase, the following parameters are attached:
872 // "created": <true if the Entry was created, rather than being opened>,
873 // "key": <The Entry's key>,
875 EVENT_TYPE(DISK_CACHE_ENTRY_IMPL)
876 EVENT_TYPE(DISK_CACHE_MEM_ENTRY_IMPL)
878 // Logs the time required to read/write data from/to a cache entry.
880 // For the BEGIN phase, the following parameters are attached:
882 // "index": <Index being read/written>,
883 // "offset": <Offset being read/written>,
884 // "buf_len": <Length of buffer being read to/written from>,
885 // "truncate": <If present for a write, the truncate flag is set to true.
886 // Not present in reads or writes where it is false>,
889 // For the END phase, the following parameters are attached:
891 // "bytes_copied": <Number of bytes copied. Not present on error>,
892 // "net_error": <Network error code. Only present on error>,
894 EVENT_TYPE(ENTRY_READ_DATA)
895 EVENT_TYPE(ENTRY_WRITE_DATA)
897 // Logged when sparse read/write operation starts/stops for an Entry.
899 // For the BEGIN phase, the following parameters are attached:
901 // "offset": <Offset at which to start reading>,
902 // "buff_len": <Bytes to read/write>,
904 EVENT_TYPE(SPARSE_READ)
905 EVENT_TYPE(SPARSE_WRITE)
907 // Logged when a parent Entry starts/stops reading/writing a child Entry's data.
909 // For the BEGIN phase, the following parameters are attached:
911 // "source_dependency": <Source id of the child entry>,
912 // "child_len": <Bytes to read/write from/to child>,
914 EVENT_TYPE(SPARSE_READ_CHILD_DATA)
915 EVENT_TYPE(SPARSE_WRITE_CHILD_DATA)
917 // Logged when sparse GetAvailableRange operation starts/stops for an Entry.
919 // For the BEGIN phase, the following parameters are attached:
921 // "buff_len": <Bytes to read/write>,
922 // "offset": <Offset at which to start reading>,
925 // For the END phase, the following parameters are attached. No parameters are
926 // attached when cancelled:
928 // "length": <Length of returned range. Only present on success>,
929 // "start": <Position where returned range starts. Only present on success>,
930 // "net_error": <Resulting error code. Only present on failure. This may be
931 // "OK" when there's no error, but no available bytes in the
934 EVENT_TYPE(SPARSE_GET_RANGE)
936 // Indicates the children of a sparse EntryImpl are about to be deleted.
937 // Not logged for MemEntryImpls.
938 EVENT_TYPE(SPARSE_DELETE_CHILDREN)
940 // Logged when an EntryImpl is closed. Not logged for MemEntryImpls.
941 EVENT_TYPE(ENTRY_CLOSE)
943 // Logged when an entry is doomed.
944 EVENT_TYPE(ENTRY_DOOM)
946 // ------------------------------------------------------------------------
947 // HttpStreamFactoryImpl
948 // ------------------------------------------------------------------------
950 // Measures the time taken to fulfill the HttpStreamRequest.
951 EVENT_TYPE(HTTP_STREAM_REQUEST)
953 // Measures the time taken to execute the HttpStreamFactoryImpl::Job
954 EVENT_TYPE(HTTP_STREAM_JOB)
956 // Identifies the NetLog::Source() for the Job that fulfilled the Request.
957 // The event parameters are:
959 // "source_dependency": <Source identifier for Job we acquired>,
961 EVENT_TYPE(HTTP_STREAM_REQUEST_BOUND_TO_JOB)
963 // Identifies the NetLog::Source() for the Request that the Job was attached to.
964 // The event parameters are:
966 // "source_dependency": <Source identifier for the Request to which we were
969 EVENT_TYPE(HTTP_STREAM_JOB_BOUND_TO_REQUEST)
971 // Logs the protocol negotiated with the server. The event parameters are:
973 // "status": <The NPN status ("negotiated", "unsupported", "no-overlap")>,
974 // "proto": <The NPN protocol negotiated>,
975 // "server_protos": <The list of server advertised protocols>,
977 EVENT_TYPE(HTTP_STREAM_REQUEST_PROTO)
979 // ------------------------------------------------------------------------
980 // HttpNetworkTransaction
981 // ------------------------------------------------------------------------
983 // Measures the time taken to send the tunnel request to the server.
984 EVENT_TYPE(HTTP_TRANSACTION_TUNNEL_SEND_REQUEST)
986 // This event is sent for a tunnel request.
987 // The following parameters are attached:
989 // "line": <The HTTP request line, CRLF terminated>,
990 // "headers": <The list of header:value pairs>,
992 EVENT_TYPE(HTTP_TRANSACTION_SEND_TUNNEL_HEADERS)
994 // Measures the time to read the tunnel response headers from the server.
995 EVENT_TYPE(HTTP_TRANSACTION_TUNNEL_READ_HEADERS)
997 // This event is sent on receipt of the HTTP response headers to a tunnel
999 // The following parameters are attached:
1001 // "headers": <The list of header:value pairs>,
1003 EVENT_TYPE(HTTP_TRANSACTION_READ_TUNNEL_RESPONSE_HEADERS)
1005 // Measures the time taken to send the request to the server.
1006 EVENT_TYPE(HTTP_TRANSACTION_SEND_REQUEST)
1008 // This event is sent for a HTTP request.
1009 // The following parameters are attached:
1011 // "line": <The HTTP request line, CRLF terminated>,
1012 // "headers": <The list of header:value pairs>,
1014 EVENT_TYPE(HTTP_TRANSACTION_SEND_REQUEST_HEADERS)
1016 // Logged when a request body is sent.
1017 // The following parameters are attached:
1019 // "did_merge": <True if the body was merged with the headers for writing>,
1020 // "is_chunked": <True if chunked>,
1021 // "length": <The length of the body. May not be accurate when body is not
1024 EVENT_TYPE(HTTP_TRANSACTION_SEND_REQUEST_BODY)
1026 // This event is sent for a HTTP request over a SPDY stream.
1027 // The following parameters are attached:
1029 // "headers": <The list of header:value pairs>,
1031 EVENT_TYPE(HTTP_TRANSACTION_SPDY_SEND_REQUEST_HEADERS)
1033 // This event is sent for a HTTP request over a SPDY stream.
1034 // The following parameters are attached:
1036 // "headers": <The list of header:value pairs>,
1037 // "quic_priority": <Integer representing the priority of this request>,
1038 // "quic_stream_id": <Id of the QUIC stream sending this request>,
1040 EVENT_TYPE(HTTP_TRANSACTION_QUIC_SEND_REQUEST_HEADERS)
1042 // Measures the time to read HTTP response headers from the server.
1043 EVENT_TYPE(HTTP_TRANSACTION_READ_HEADERS)
1045 // This event is sent on receipt of the HTTP response headers.
1046 // The following parameters are attached:
1048 // "headers": <The list of header:value pairs>,
1050 EVENT_TYPE(HTTP_TRANSACTION_READ_RESPONSE_HEADERS)
1052 // Measures the time to read the entity body from the server.
1053 EVENT_TYPE(HTTP_TRANSACTION_READ_BODY)
1055 // Measures the time taken to read the response out of the socket before
1056 // restarting for authentication, on keep alive connections.
1057 EVENT_TYPE(HTTP_TRANSACTION_DRAIN_BODY_FOR_AUTH_RESTART)
1059 // This event is sent when we try to restart a transaction after an error.
1060 // The following parameters are attached:
1062 // "net_error": <The net error code integer for the failure, if applicable>,
1063 // "http_status_code": <HTTP status code indicating an error, if
1066 EVENT_TYPE(HTTP_TRANSACTION_RESTART_AFTER_ERROR)
1068 // ------------------------------------------------------------------------
1070 // ------------------------------------------------------------------------
1072 // The start/end of a SpdySession.
1074 // "host": <The host-port string>,
1075 // "proxy": <The Proxy PAC string>,
1077 EVENT_TYPE(SPDY_SESSION)
1079 // The SpdySession has been initilized with a socket.
1081 // "source_dependency": <Source identifier for the underlying socket>,
1083 EVENT_TYPE(SPDY_SESSION_INITIALIZED)
1085 // This event is sent for a SPDY SYN_STREAM.
1086 // The following parameters are attached:
1088 // "flags": <The control frame flags>,
1089 // "headers": <The list of header:value pairs>,
1090 // "id": <The stream id>,
1092 EVENT_TYPE(SPDY_SESSION_SYN_STREAM)
1094 // This event is sent for a SPDY SYN_STREAM pushed by the server, where a
1095 // net::URLRequest is already waiting for the stream.
1096 // The following parameters are attached:
1098 // "flags": <The control frame flags>,
1099 // "headers": <The list of header:value pairs>,
1100 // "id": <The stream id>,
1101 // "associated_stream": <The stream id>,
1103 EVENT_TYPE(SPDY_SESSION_PUSHED_SYN_STREAM)
1105 // This event is sent for a sending SPDY HEADERS frame.
1106 // The following parameters are attached:
1108 // "flags": <The control frame flags>,
1109 // "headers": <The list of header:value pairs>,
1110 // "id": <The stream id>,
1112 EVENT_TYPE(SPDY_SESSION_SEND_HEADERS)
1114 // This event is sent for a receiving SPDY HEADERS frame.
1115 // The following parameters are attached:
1117 // "flags": <The control frame flags>,
1118 // "headers": <The list of header:value pairs>,
1119 // "id": <The stream id>,
1121 EVENT_TYPE(SPDY_SESSION_RECV_HEADERS)
1123 // This event is sent for a SPDY SYN_REPLY.
1124 // The following parameters are attached:
1126 // "flags": <The control frame flags>,
1127 // "headers": <The list of header:value pairs>,
1128 // "id": <The stream id>,
1130 EVENT_TYPE(SPDY_SESSION_SYN_REPLY)
1132 // On sending a SPDY SETTINGS frame.
1133 // The following parameters are attached:
1135 // "settings": <The list of setting id, flags and value>,
1137 EVENT_TYPE(SPDY_SESSION_SEND_SETTINGS)
1139 // Receipt of a SPDY SETTINGS frame is received.
1140 // The following parameters are attached:
1142 // "host": <The host-port string>,
1143 // "clear_persisted": <Boolean indicating whether to clear all persisted
1144 // settings data for the given host>,
1146 EVENT_TYPE(SPDY_SESSION_RECV_SETTINGS)
1148 // Receipt of a SPDY SETTING frame.
1149 // The following parameters are attached:
1151 // "id": <The setting id>,
1152 // "flags": <The setting flags>,
1153 // "value": <The setting value>,
1155 EVENT_TYPE(SPDY_SESSION_RECV_SETTING)
1157 // The receipt of a RST_STREAM
1158 // The following parameters are attached:
1160 // "stream_id": <The stream ID for the window update>,
1161 // "status": <The reason for the RST_STREAM>,
1163 EVENT_TYPE(SPDY_SESSION_RST_STREAM)
1165 // Sending of a RST_STREAM
1166 // The following parameters are attached:
1168 // "stream_id": <The stream ID for the window update>,
1169 // "status": <The reason for the RST_STREAM>,
1170 // "description": <The textual description for the RST_STREAM>,
1172 EVENT_TYPE(SPDY_SESSION_SEND_RST_STREAM)
1174 // Sending of a SPDY PING frame.
1175 // The following parameters are attached:
1177 // "unique_id": <The unique id of the PING message>,
1178 // "type": <The PING type ("sent", "received")>,
1180 EVENT_TYPE(SPDY_SESSION_PING)
1182 // Receipt of a SPDY GOAWAY frame.
1183 // The following parameters are attached:
1185 // "last_accepted_stream_id": <Last stream id accepted by the server, duh>,
1186 // "active_streams": <Number of active streams>,
1187 // "unclaimed_streams": <Number of unclaimed push streams>,
1188 // "status": <The reason for the GOAWAY>,
1190 EVENT_TYPE(SPDY_SESSION_GOAWAY)
1192 // Receipt of a SPDY WINDOW_UPDATE frame (which controls the send window).
1194 // "stream_id": <The stream ID for the window update>,
1195 // "delta" : <The delta window size>,
1197 EVENT_TYPE(SPDY_SESSION_RECEIVED_WINDOW_UPDATE_FRAME)
1199 // Sending of a SPDY WINDOW_UPDATE frame (which controls the receive window).
1201 // "stream_id": <The stream ID for the window update>,
1202 // "delta" : <The delta window size>,
1204 EVENT_TYPE(SPDY_SESSION_SENT_WINDOW_UPDATE_FRAME)
1206 // This event indicates that the send window has been updated for a session.
1208 // "delta": <The window size delta>,
1209 // "new_window": <The new window size>,
1211 EVENT_TYPE(SPDY_SESSION_UPDATE_SEND_WINDOW)
1213 // This event indicates that the recv window has been updated for a session.
1215 // "delta": <The window size delta>,
1216 // "new_window": <The new window size>,
1218 EVENT_TYPE(SPDY_SESSION_UPDATE_RECV_WINDOW)
1220 // Sending of a SPDY CREDENTIAL frame (which sends a certificate or
1221 // certificate chain to the server).
1223 // "slot" : <The slot that this certificate should be stored in>,
1224 // "origin" : <The origin this certificate should be used for>,
1226 EVENT_TYPE(SPDY_SESSION_SEND_CREDENTIAL)
1228 // Sending a data frame
1230 // "stream_id": <The stream ID for the window update>,
1231 // "length" : <The size of data sent>,
1232 // "flags" : <Send data flags>,
1234 EVENT_TYPE(SPDY_SESSION_SEND_DATA)
1236 // Receiving a data frame
1238 // "stream_id": <The stream ID for the window update>,
1239 // "length" : <The size of data received>,
1240 // "flags" : <Receive data flags>,
1242 EVENT_TYPE(SPDY_SESSION_RECV_DATA)
1244 // This event is sent for a receiving SPDY PUSH_PROMISE frame.
1245 // The following parameters are attached:
1247 // "headers": <The list of header:value pairs>,
1248 // "id": <The stream id>,
1249 // "promised_stream_id": <The stream id>,
1251 EVENT_TYPE(SPDY_SESSION_RECV_PUSH_PROMISE)
1253 // A stream is stalled by the session send window being closed.
1254 EVENT_TYPE(SPDY_SESSION_STREAM_STALLED_BY_SESSION_SEND_WINDOW)
1256 // A stream is stalled by its send window being closed.
1257 EVENT_TYPE(SPDY_SESSION_STREAM_STALLED_BY_STREAM_SEND_WINDOW)
1259 // Session is closing
1261 // "net_error" : <The error status of the closure>,
1262 // "description": <The textual description for the closure>,
1264 EVENT_TYPE(SPDY_SESSION_CLOSE)
1266 // Event when the creation of a stream is stalled because we're at
1267 // the maximum number of concurrent streams.
1268 EVENT_TYPE(SPDY_SESSION_STALLED_MAX_STREAMS)
1270 // Received a value for initial window size in SETTINGS frame with
1271 // flow control turned off.
1272 EVENT_TYPE(SPDY_SESSION_INITIAL_WINDOW_SIZE_NO_FLOW_CONTROL)
1274 // Received an out-of-range value for initial window size in SETTINGS
1277 // "initial_window_size" : <The initial window size>,
1279 EVENT_TYPE(SPDY_SESSION_INITIAL_WINDOW_SIZE_OUT_OF_RANGE)
1281 // Updating streams send window size by the delta window size.
1283 // "delta_window_size" : <The delta window size>,
1285 EVENT_TYPE(SPDY_SESSION_UPDATE_STREAMS_SEND_WINDOW_SIZE)
1287 // ------------------------------------------------------------------------
1289 // ------------------------------------------------------------------------
1291 // This event indicates the pool is reusing an existing session
1293 // "source_dependency": <The session id>,
1295 EVENT_TYPE(SPDY_SESSION_POOL_FOUND_EXISTING_SESSION)
1297 // This event indicates the pool is reusing an existing session from an
1298 // IP pooling match.
1300 // "source_dependency": <The session id>,
1302 EVENT_TYPE(SPDY_SESSION_POOL_FOUND_EXISTING_SESSION_FROM_IP_POOL)
1304 // This event indicates the pool created a new session
1306 // "source_dependency": <The session id>,
1308 EVENT_TYPE(SPDY_SESSION_POOL_CREATED_NEW_SESSION)
1310 // This event indicates that a SSL socket has been upgraded to a SPDY session.
1312 // "source_dependency": <The session id>,
1314 EVENT_TYPE(SPDY_SESSION_POOL_IMPORTED_SESSION_FROM_SOCKET)
1316 // This event indicates that the session has been removed.
1318 // "source_dependency": <The session id>,
1320 EVENT_TYPE(SPDY_SESSION_POOL_REMOVE_SESSION)
1322 // ------------------------------------------------------------------------
1324 // ------------------------------------------------------------------------
1326 // The begin and end of a SPDY STREAM.
1327 EVENT_TYPE(SPDY_STREAM)
1329 // A stream is attached to a pushed stream.
1330 EVENT_TYPE(SPDY_STREAM_ADOPTED_PUSH_STREAM)
1332 // A stream is unstalled by flow control.
1333 EVENT_TYPE(SPDY_STREAM_FLOW_CONTROL_UNSTALLED)
1335 // This event indicates that the send window has been updated for a stream.
1337 // "id": <The stream id>,
1338 // "delta": <The window size delta>,
1339 // "new_window": <The new window size>,
1341 EVENT_TYPE(SPDY_STREAM_UPDATE_SEND_WINDOW)
1343 // This event indicates that the recv window has been updated for a stream.
1345 // "id": <The stream id>,
1346 // "delta": <The window size delta>,
1347 // "new_window": <The new window size>,
1349 EVENT_TYPE(SPDY_STREAM_UPDATE_RECV_WINDOW)
1351 // This event indicates a stream error
1353 // "id": <The stream id>,
1354 // "status": <The error status>,
1355 // "description": <The textual description for the error>,
1357 EVENT_TYPE(SPDY_STREAM_ERROR)
1359 // ------------------------------------------------------------------------
1360 // SpdyProxyClientSocket
1361 // ------------------------------------------------------------------------
1363 EVENT_TYPE(SPDY_PROXY_CLIENT_SESSION)
1364 // Identifies the SPDY session a source is using.
1366 // "source_dependency": <Source identifier for the underlying session>,
1369 // ------------------------------------------------------------------------
1371 // ------------------------------------------------------------------------
1373 // The start/end of a QuicSession.
1375 // "host": <The host-port string>,
1377 EVENT_TYPE(QUIC_SESSION)
1379 // Session is closing because of an error.
1381 // "net_error": <Net error code for the closure>,
1383 EVENT_TYPE(QUIC_SESSION_CLOSE_ON_ERROR)
1385 // Session verified a certificate from the server.
1387 // "subjects": <list of DNS names that the certificate is valid for>,
1389 EVENT_TYPE(QUIC_SESSION_CERTIFICATE_VERIFIED)
1391 // Session received a QUIC packet.
1393 // "peer_address": <The ip:port of the peer>,
1394 // "self_address": <The local ip:port which received the packet>,
1396 EVENT_TYPE(QUIC_SESSION_PACKET_RECEIVED)
1398 // Session sent a QUIC packet.
1400 // "encryption_level": <The EncryptionLevel of the packet>,
1401 // "transmission_type": <The TransmissionType of the packet>,
1402 // "packet_sequence_number": <The packet's full 64-bit sequence number,
1403 // as a base-10 string.>,
1404 // "size": <The size of the packet in bytes>
1406 EVENT_TYPE(QUIC_SESSION_PACKET_SENT)
1408 // Session retransmitted a QUIC packet.
1410 // "old_packet_sequence_number": <The old packet's full 64-bit sequence
1411 // number, as a base-10 string.>,
1412 // "new_packet_sequence_number": <The new packet's full 64-bit sequence
1413 // number, as a base-10 string.>,
1415 EVENT_TYPE(QUIC_SESSION_PACKET_RETRANSMITTED)
1417 // Session received a QUIC packet header for a valid packet.
1419 // "connection_id": <The 64-bit CONNECTION_ID for this connection, as a
1421 // "public_flags": <The public flags set for this packet>,
1422 // "packet_sequence_number": <The packet's full 64-bit sequence number,
1423 // as a base-10 string.>,
1424 // "private_flags": <The private flags set for this packet>,
1425 // "fec_group": <The FEC group of this packet>,
1427 EVENT_TYPE(QUIC_SESSION_PACKET_HEADER_RECEIVED)
1429 // Session received a STREAM frame.
1431 // "stream_id": <The id of the stream which this data is for>,
1432 // "fin": <True if this is the final data set by the peer on this stream>,
1433 // "offset": <Offset in the byte stream where this data starts>,
1434 // "length": <Length of the data in this frame>,
1436 EVENT_TYPE(QUIC_SESSION_STREAM_FRAME_RECEIVED)
1438 // Session sent a STREAM frame.
1440 // "stream_id": <The id of the stream which this data is for>,
1441 // "fin": <True if this is the final data set by the peer on this stream>,
1442 // "offset": <Offset in the byte stream where this data starts>,
1443 // "length": <Length of the data in this frame>,
1445 EVENT_TYPE(QUIC_SESSION_STREAM_FRAME_SENT)
1447 // Session received an ACK frame.
1449 // "sent_info": <Details of packet sent by the peer>
1451 // "least_unacked": <Lowest sequence number of a packet sent by the peer
1452 // for which it has not received an ACK>,
1454 // "received_info": <Details of packet received by the peer>
1456 // "largest_observed": <The largest sequence number of a packet received
1457 // by (or inferred by) the peer>,
1458 // "missing": <List of sequence numbers of packets lower than
1459 // largest_observed which have not been received by the
1463 EVENT_TYPE(QUIC_SESSION_ACK_FRAME_RECEIVED)
1465 // Session sent an ACK frame.
1467 // "sent_info": <Details of packet sent by the peer>
1469 // "least_unacked": <Lowest sequence number of a packet sent by the peer
1470 // for which it has not received an ACK>,
1472 // "received_info": <Details of packet received by the peer>
1474 // "largest_observed": <The largest sequence number of a packet received
1475 // by (or inferred by) the peer>,
1476 // "missing": <List of sequence numbers of packets lower than
1477 // largest_observed which have not been received by the
1481 EVENT_TYPE(QUIC_SESSION_ACK_FRAME_SENT)
1483 // Session received a WINDOW_UPDATE frame.
1485 // "stream_id": <The id of the stream which this data is for>,
1486 // "byte_offset": <Byte offset in the stream>,
1488 EVENT_TYPE(QUIC_SESSION_WINDOW_UPDATE_FRAME_RECEIVED)
1490 // Session sent a WINDOW_UPDATE frame.
1492 // "stream_id": <The id of the stream which this data is for>,
1493 // "byte_offset": <Byte offset in the stream>,
1495 EVENT_TYPE(QUIC_SESSION_WINDOW_UPDATE_FRAME_SENT)
1497 // Session received a BLOCKED frame.
1499 // "stream_id": <The id of the stream which this data is for>,
1501 EVENT_TYPE(QUIC_SESSION_BLOCKED_FRAME_RECEIVED)
1503 // Session sent a BLOCKED frame.
1505 // "stream_id": <The id of the stream which this data is for>,
1507 EVENT_TYPE(QUIC_SESSION_BLOCKED_FRAME_SENT)
1509 // Session received a GOAWAY frame.
1511 // "quic_error": <QuicErrorCode in the frame>,
1512 // "last_good_stream_id": <Last correctly received stream id by the server>,
1513 // "reason_phrase": <Prose justifying go-away request>,
1515 EVENT_TYPE(QUIC_SESSION_GOAWAY_FRAME_RECEIVED)
1517 // Session sent a GOAWAY frame.
1519 // "quic_error": <QuicErrorCode in the frame>,
1520 // "last_good_stream_id": <Last correctly received stream id by the server>,
1521 // "reason_phrase": <Prose justifying go-away request>,
1523 EVENT_TYPE(QUIC_SESSION_GOAWAY_FRAME_SENT)
1525 // Session received a PING frame.
1526 EVENT_TYPE(QUIC_SESSION_PING_FRAME_RECEIVED)
1528 // Session sent a PING frame.
1529 EVENT_TYPE(QUIC_SESSION_PING_FRAME_SENT)
1531 // Session received a STOP_WAITING frame.
1533 // "sent_info": <Details of packet sent by the peer>
1535 // "least_unacked": <Lowest sequence number of a packet sent by the peer
1536 // for which it has not received an ACK>,
1539 EVENT_TYPE(QUIC_SESSION_STOP_WAITING_FRAME_RECEIVED)
1541 // Session sent an STOP_WAITING frame.
1543 // "sent_info": <Details of packet sent by the peer>
1545 // "least_unacked": <Lowest sequence number of a packet sent by the peer
1546 // for which it has not received an ACK>,
1549 EVENT_TYPE(QUIC_SESSION_STOP_WAITING_FRAME_SENT)
1551 // Session recevied a RST_STREAM frame.
1553 // "offset": <Offset in the byte stream which triggered the reset>,
1554 // "quic_rst_stream_error": <QuicRstStreamErrorCode in the frame>,
1555 // "details": <Human readable description>,
1557 EVENT_TYPE(QUIC_SESSION_RST_STREAM_FRAME_RECEIVED)
1559 // Session sent a RST_STREAM frame.
1561 // "offset": <Offset in the byte stream which triggered the reset>,
1562 // "quic_rst_stream_error": <QuicRstStreamErrorCode in the frame>,
1563 // "details": <Human readable description>,
1565 EVENT_TYPE(QUIC_SESSION_RST_STREAM_FRAME_SENT)
1567 // Session received a CONGESTION_FEEDBACK frame.
1569 // "type": <The specific type of feedback being provided>,
1570 // Other per-feedback type details:
1572 // for InterArrival:
1573 // "accumulated_number_of_lost_packets": <Total number of lost packets
1574 // over the life of this session>,
1575 // "received_packets": <List of strings of the form:
1576 // <sequence_number>@<receive_time_in_ms>>,
1579 // "bitrate_in_bytes_per_second": <The configured bytes per second>,
1582 // "accumulated_number_of_lost_packets": <Total number of lost packets
1583 // over the life of this session>,
1584 // "receive_window": <Number of bytes in the receive window>,
1586 EVENT_TYPE(QUIC_SESSION_CONGESTION_FEEDBACK_FRAME_RECEIVED)
1588 // Session received a CONGESTION_FEEDBACK frame.
1590 // "type": <The specific type of feedback being provided>,
1591 // Other per-feedback type details:
1593 // for InterArrival:
1594 // "accumulated_number_of_lost_packets": <Total number of lost packets
1595 // over the life of this session>,
1596 // "received_packets": <List of strings of the form:
1597 // <sequence_number>@<receive_time_in_ms>>,
1600 // "bitrate_in_bytes_per_second": <The configured bytes per second>,
1603 // "accumulated_number_of_lost_packets": <Total number of lost packets
1604 // over the life of this session>,
1605 // "receive_window": <Number of bytes in the receive window>,
1607 EVENT_TYPE(QUIC_SESSION_CONGESTION_FEEDBACK_FRAME_SENT)
1609 // Session received a CONNECTION_CLOSE frame.
1611 // "quic_error": <QuicErrorCode in the frame>,
1612 // "details": <Human readable description>,
1614 EVENT_TYPE(QUIC_SESSION_CONNECTION_CLOSE_FRAME_RECEIVED)
1616 // Session received a CONNECTION_CLOSE frame.
1618 // "quic_error": <QuicErrorCode in the frame>,
1619 // "details": <Human readable description>,
1621 EVENT_TYPE(QUIC_SESSION_CONNECTION_CLOSE_FRAME_SENT)
1623 // Session received a public reset packet.
1626 EVENT_TYPE(QUIC_SESSION_PUBLIC_RESET_PACKET_RECEIVED)
1628 // Session received a version negotiation packet.
1630 // "versions": <List of QUIC versions supported by the server>,
1632 EVENT_TYPE(QUIC_SESSION_VERSION_NEGOTIATION_PACKET_RECEIVED)
1634 // Session sucessfully negotiated QUIC version number.
1636 // "version": <String of QUIC version negotiated with the server>,
1638 EVENT_TYPE(QUIC_SESSION_VERSION_NEGOTIATED)
1640 // Session revived a QUIC packet packet via FEC.
1642 // "connection_id": <The 64-bit CONNECTION_ID for this connection, as a
1644 // "public_flags": <The public flags set for this packet>,
1645 // "packet_sequence_number": <The packet's full 64-bit sequence number,
1646 // as a base-10 string.>,
1647 // "private_flags": <The private flags set for this packet>,
1648 // "fec_group": <The FEC group of this packet>,
1650 EVENT_TYPE(QUIC_SESSION_PACKET_HEADER_REVIVED)
1652 // Session received a crypto handshake message.
1654 // "quic_crypto_handshake_message": <The human readable dump of the message
1657 EVENT_TYPE(QUIC_SESSION_CRYPTO_HANDSHAKE_MESSAGE_RECEIVED)
1659 // Session sent a crypto handshake message.
1661 // "quic_crypto_handshake_message": <The human readable dump of the message
1664 EVENT_TYPE(QUIC_SESSION_CRYPTO_HANDSHAKE_MESSAGE_SENT)
1666 // Session was closed, either remotely or by the peer.
1668 // "quic_error": <QuicErrorCode which caused the connection to be closed>,
1669 // "from_peer": <True if the peer closed the connection>
1671 EVENT_TYPE(QUIC_SESSION_CLOSED)
1673 // ------------------------------------------------------------------------
1675 // ------------------------------------------------------------------------
1677 // The stream is sending the request headers.
1679 // "headers": <The list of header:value pairs>
1681 EVENT_TYPE(QUIC_HTTP_STREAM_SEND_REQUEST_HEADERS)
1683 // The stream has read the response headers.
1685 // "headers": <The list of header:value pairs>
1687 EVENT_TYPE(QUIC_HTTP_STREAM_READ_RESPONSE_HEADERS)
1689 // ------------------------------------------------------------------------
1691 // ------------------------------------------------------------------------
1693 // Measures the time to read HTTP response headers from the server.
1694 EVENT_TYPE(HTTP_STREAM_PARSER_READ_HEADERS)
1696 // ------------------------------------------------------------------------
1698 // ------------------------------------------------------------------------
1700 // Measures the time between SocketStream::Connect() and
1701 // SocketStream::DidEstablishConnection()
1703 // For the BEGIN phase, the following parameters are attached:
1705 // "url": <String of URL being loaded>,
1708 // For the END phase, if there was an error, the following parameters are
1711 // "net_error": <Net error code of the failure>,
1713 EVENT_TYPE(SOCKET_STREAM_CONNECT)
1715 // A message sent on the SocketStream.
1716 EVENT_TYPE(SOCKET_STREAM_SENT)
1718 // A message received on the SocketStream.
1719 EVENT_TYPE(SOCKET_STREAM_RECEIVED)
1721 // ------------------------------------------------------------------------
1723 // ------------------------------------------------------------------------
1725 // This event is sent for a WebSocket handshake request.
1726 // The following parameters are attached:
1728 // "headers": <handshake request message>,
1730 EVENT_TYPE(WEB_SOCKET_SEND_REQUEST_HEADERS)
1732 // This event is sent on receipt of the WebSocket handshake response headers.
1733 // The following parameters are attached:
1735 // "headers": <handshake response message>,
1737 EVENT_TYPE(WEB_SOCKET_READ_RESPONSE_HEADERS)
1739 // ------------------------------------------------------------------------
1740 // SOCKS5ClientSocket
1741 // ------------------------------------------------------------------------
1743 // The time spent sending the "greeting" to the SOCKS server.
1744 EVENT_TYPE(SOCKS5_GREET_WRITE)
1746 // The time spent waiting for the "greeting" response from the SOCKS server.
1747 EVENT_TYPE(SOCKS5_GREET_READ)
1749 // The time spent sending the CONNECT request to the SOCKS server.
1750 EVENT_TYPE(SOCKS5_HANDSHAKE_WRITE)
1752 // The time spent waiting for the response to the CONNECT request.
1753 EVENT_TYPE(SOCKS5_HANDSHAKE_READ)
1755 // ------------------------------------------------------------------------
1756 // HTTP Authentication
1757 // ------------------------------------------------------------------------
1759 // The time spent authenticating to the proxy.
1760 EVENT_TYPE(AUTH_PROXY)
1762 // The time spent authentication to the server.
1763 EVENT_TYPE(AUTH_SERVER)
1765 // ------------------------------------------------------------------------
1766 // HTML5 Application Cache
1767 // ------------------------------------------------------------------------
1769 // This event is emitted whenever a request is satistifed directly from
1771 EVENT_TYPE(APPCACHE_DELIVERING_CACHED_RESPONSE)
1773 // This event is emitted whenever the appcache uses a fallback response.
1774 EVENT_TYPE(APPCACHE_DELIVERING_FALLBACK_RESPONSE)
1776 // This event is emitted whenever the appcache generates an error response.
1777 EVENT_TYPE(APPCACHE_DELIVERING_ERROR_RESPONSE)
1779 // This event is emitted whenever the appcache executes script to compute
1781 EVENT_TYPE(APPCACHE_DELIVERING_EXECUTABLE_RESPONSE)
1783 // ------------------------------------------------------------------------
1785 // ------------------------------------------------------------------------
1786 // These are events which are not grouped by source id, as they have no
1789 // This event is emitted whenever NetworkChangeNotifier determines that an
1790 // active network adapter's IP address has changed.
1791 EVENT_TYPE(NETWORK_IP_ADDRESSES_CHANGED)
1793 // This event is emitted whenever NetworkChangeNotifier determines that an
1794 // active network adapter's connectivity status has changed.
1796 // "new_connection_type": <Type of the new connection>
1798 EVENT_TYPE(NETWORK_CONNECTIVITY_CHANGED)
1800 // This event is emitted whenever NetworkChangeNotifier determines that a change
1801 // occurs to the host computer's hardware or software that affects the route
1802 // network packets take to any network server.
1804 // "new_connection_type": <Type of the new connection>
1806 EVENT_TYPE(NETWORK_CHANGED)
1808 // This event is emitted whenever HostResolverImpl receives a new DnsConfig
1809 // from the DnsConfigService.
1811 // "nameservers": <List of name server IPs>,
1812 // "search": <List of domain suffixes>,
1813 // "num_hosts": <Number of entries in the HOSTS file>,
1814 // <other>: <See DnsConfig>
1816 EVENT_TYPE(DNS_CONFIG_CHANGED)
1818 // ------------------------------------------------------------------------
1819 // Exponential back-off throttling events
1820 // ------------------------------------------------------------------------
1822 // Emitted when back-off is disabled for a given host, or the first time
1823 // a localhost URL is used (back-off is always disabled for localhost).
1825 // "host": <The hostname back-off was disabled for>
1827 EVENT_TYPE(THROTTLING_DISABLED_FOR_HOST)
1829 // Emitted when a request is denied due to exponential back-off throttling.
1831 // "url": <URL that was being requested>,
1832 // "num_failures": <Failure count for the URL>,
1833 // "release_after_ms": <Number of milliseconds until URL will be unblocked>
1835 EVENT_TYPE(THROTTLING_REJECTED_REQUEST)
1837 // ------------------------------------------------------------------------
1839 // ------------------------------------------------------------------------
1841 // The start/end of a DnsTransaction.
1843 // The BEGIN phase contains the following parameters:
1846 // "hostname": <The hostname it is trying to resolve>,
1847 // "query_type": <Type of the query>,
1850 // The END phase contains the following parameters:
1853 // "net_error": <The net error code for the failure, if any>,
1855 EVENT_TYPE(DNS_TRANSACTION)
1857 // The start/end of a DnsTransaction query for a fully-qualified domain name.
1859 // The BEGIN phase contains the following parameters:
1862 // "qname": <The fully-qualified domain name it is trying to resolve>,
1865 // The END phase contains the following parameters:
1868 // "net_error": <The net error code for the failure, if any>,
1870 EVENT_TYPE(DNS_TRANSACTION_QUERY)
1872 // This event is created when DnsTransaction creates a new UDP socket and
1873 // tries to resolve the fully-qualified name.
1875 // It has a single parameter:
1878 // "source_dependency": <Source id of the UDP socket created for the
1881 EVENT_TYPE(DNS_TRANSACTION_ATTEMPT)
1883 // This event is created when DnsTransaction creates a new TCP socket and
1884 // tries to resolve the fully-qualified name.
1886 // It has a single parameter:
1889 // "source_dependency": <Source id of the TCP socket created for the
1892 EVENT_TYPE(DNS_TRANSACTION_TCP_ATTEMPT)
1894 // This event is created when DnsTransaction receives a matching response.
1896 // It has the following parameters:
1899 // "rcode": <rcode in the received response>,
1900 // "answer_count": <answer_count in the received response>,
1901 // "source_dependency": <Source id of the UDP socket that received the
1904 EVENT_TYPE(DNS_TRANSACTION_RESPONSE)
1906 // ------------------------------------------------------------------------
1908 // ------------------------------------------------------------------------
1910 // TODO(eroman): This is a layering violation. Fix this in the context
1911 // of http://crbug.com/90674.
1913 // This event is created when a Chrome extension aborts a request.
1916 // "extension_id": <Extension ID that caused the abortion>
1918 EVENT_TYPE(CHROME_EXTENSION_ABORTED_REQUEST)
1920 // This event is created when a Chrome extension redirects a request.
1923 // "extension_id": <Extension ID that caused the redirection>
1925 EVENT_TYPE(CHROME_EXTENSION_REDIRECTED_REQUEST)
1927 // This event is created when a Chrome extension modifieds the headers of a
1931 // "extension_id": <Extension ID that caused the modification>,
1932 // "modified_headers": [ "<header>: <value>", ... ],
1933 // "deleted_headers": [ "<header>", ... ]
1935 EVENT_TYPE(CHROME_EXTENSION_MODIFIED_HEADERS)
1937 // This event is created when a Chrome extension tried to modify a request
1938 // but was ignored due to a conflict.
1941 // "extension_id": <Extension ID that was ignored>
1943 EVENT_TYPE(CHROME_EXTENSION_IGNORED_DUE_TO_CONFLICT)
1945 // This event is created when a Chrome extension provides authentication
1949 // "extension_id": <Extension ID that provides credentials>
1951 EVENT_TYPE(CHROME_EXTENSION_PROVIDE_AUTH_CREDENTIALS)
1953 // ------------------------------------------------------------------------
1954 // HostBlacklistManager
1955 // ------------------------------------------------------------------------
1957 // TODO(joaodasilva): Layering violation, see comment above.
1958 // http://crbug.com/90674.
1960 // This event is created when a request is blocked by a policy.
1961 EVENT_TYPE(CHROME_POLICY_ABORTED_REQUEST)
1963 // ------------------------------------------------------------------------
1965 // ------------------------------------------------------------------------
1967 // This event is created when we start a CertVerifier request.
1968 EVENT_TYPE(CERT_VERIFIER_REQUEST)
1970 // This event is created when we start a CertVerifier job.
1971 // The BEGIN phase event parameters are:
1973 // "certificates": <A list of PEM encoded certificates, the first one
1974 // being the certificate to verify and the remaining
1975 // being intermediate certificates to assist path
1976 // building. Only present when byte logging is enabled.>
1979 // The END phase event parameters are:
1981 // "cert_status": <Bitmask of CERT_STATUS_*
1982 // from net/base/cert_status_flags.h>
1983 // "common_name_fallback_used": <True if a fallback to the common name
1984 // was used when matching the host
1985 // name, rather than using the
1987 // "has_md2": <True if a certificate in the certificate chain is signed with
1988 // a MD2 signature.>
1989 // "has_md4": <True if a certificate in the certificate chain is signed with
1990 // a MD4 signature.>
1991 // "has_md5": <True if a certificate in the certificate chain is signed with
1992 // a MD5 signature.>
1993 // "is_issued_by_additional_trust_anchor": <True if the root CA used for
1994 // this verification came from the
1995 // list of additional trust
1997 // "is_issued_by_known_root": <True if we recognise the root CA as a
1998 // standard root. If it isn't then it's
1999 // probably the case that this certificate
2000 // was generated by a MITM proxy whose root
2001 // has been installed locally. This is
2002 // meaningless if the certificate was not
2004 // "public_key_hashes": <If the certificate was successfully verified then
2005 // this contains the hashes, in several hash
2006 // algorithms, of the SubjectPublicKeyInfos of the
2008 // "verified_cert": <The certificate chain that was constructed
2009 // during verification. Note that though the verified
2010 // certificate will match the originally supplied
2011 // certificate, the intermediate certificates stored
2012 // within may be substantially different. In the event
2013 // of a verification failure, this will contain the
2014 // chain as supplied by the server. This may be NULL
2015 // if running within the sandbox.>
2017 EVENT_TYPE(CERT_VERIFIER_JOB)
2019 // This event is created when a CertVerifier request attaches to a job.
2021 // The event parameters are:
2023 // "source_dependency": <Source identifer for the job we are bound to>,
2025 EVENT_TYPE(CERT_VERIFIER_REQUEST_BOUND_TO_JOB)
2027 // ------------------------------------------------------------------------
2028 // Download start events.
2029 // ------------------------------------------------------------------------
2031 // This event is created when a download is started, and lets the URL request
2032 // event source know what download source it is using.
2034 // "source_dependency": <Source id of the download>,
2036 EVENT_TYPE(DOWNLOAD_STARTED)
2038 // This event is created when a download is started, and lets the download
2039 // event source know what URL request it's associated with.
2041 // "source_dependency": <Source id of the request being waited on>,
2043 EVENT_TYPE(DOWNLOAD_URL_REQUEST)
2045 // ------------------------------------------------------------------------
2046 // DownloadItem events.
2047 // ------------------------------------------------------------------------
2049 // This event lives for as long as a download item is active.
2050 // The BEGIN event occurs right after constrction, and has the following
2053 // "type": <New/history/save page>,
2054 // "id": <Download ID>,
2055 // "original_url": <URL that initiated the download>,
2056 // "final_url": <URL of the actual download file>,
2057 // "file_name": <initial file name, based on DownloadItem's members:
2058 // For History downloads it's the |full_path_|
2059 // For other downloads, uses the first non-empty variable of:
2060 // |state_info.force_filename|
2061 // |suggested_filename_|
2062 // the filename specified in the final URL>,
2063 // "danger_type": <NOT_DANGEROUS, DANGEROUS_FILE, DANGEROUS_URL,
2064 // DANGEROUS_CONTENT, MAYBE_DANGEROUS_CONTENT,
2065 // UNCOMMON_CONTENT, USER_VALIDATED, DANGEROUS_HOST,
2066 // POTENTIALLY_UNWANTED>,
2067 // "start_offset": <Where to start writing (defaults to 0)>,
2068 // "has_user_gesture": <Whether or not we think the user initiated
2071 // The END event will occur when the download is interrupted, canceled or
2073 // DownloadItems that are loaded from history and are never active simply ADD
2074 // one of these events.
2075 EVENT_TYPE(DOWNLOAD_ITEM_ACTIVE)
2077 // This event is created when a download item's danger type
2078 // has been modified.
2080 // "danger_type": <The new danger type. See above for possible values.>,
2082 EVENT_TYPE(DOWNLOAD_ITEM_SAFETY_STATE_UPDATED)
2084 // This event is created when a download item is updated.
2086 // "bytes_so_far": <Number of bytes received>,
2087 // "hash_state": <Current hash state, as a hex-encoded binary string>,
2089 EVENT_TYPE(DOWNLOAD_ITEM_UPDATED)
2091 // This event is created when a download item is renamed.
2093 // "old_filename": <Old file name>,
2094 // "new_filename": <New file name>,
2096 EVENT_TYPE(DOWNLOAD_ITEM_RENAMED)
2098 // This event is created when a download item is interrupted.
2100 // "interrupt_reason": <The reason for the interruption>,
2101 // "bytes_so_far": <Number of bytes received>,
2102 // "hash_state": <Current hash state, as a hex-encoded binary string>,
2104 EVENT_TYPE(DOWNLOAD_ITEM_INTERRUPTED)
2106 // This event is created when a download item is resumed.
2108 // "user_initiated": <True if user initiated resume>,
2109 // "reason": <The reason for the interruption>,
2110 // "bytes_so_far": <Number of bytes received>,
2111 // "hash_state": <Current hash state, as a hex-encoded binary string>,
2113 EVENT_TYPE(DOWNLOAD_ITEM_RESUMED)
2115 // This event is created when a download item is completing.
2117 // "bytes_so_far": <Number of bytes received>,
2118 // "final_hash": <Final hash, as a hex-encoded binary string>,
2120 EVENT_TYPE(DOWNLOAD_ITEM_COMPLETING)
2122 // This event is created when a download item is finished.
2124 // "auto_opened": <Whether or not the download was auto-opened>
2126 EVENT_TYPE(DOWNLOAD_ITEM_FINISHED)
2128 // This event is created when a download item is canceled.
2130 // "bytes_so_far": <Number of bytes received>,
2131 // "hash_state": <Current hash state, as a hex-encoded binary string>,
2133 EVENT_TYPE(DOWNLOAD_ITEM_CANCELED)
2135 // ------------------------------------------------------------------------
2136 // DownloadFile events.
2137 // ------------------------------------------------------------------------
2139 // This event is created when a download file is opened, and lasts until
2140 // the file is closed.
2141 // The BEGIN event has the following parameters:
2143 // "file_name": <The name of the file>,
2144 // "start_offset": <The position at which to start writing>,
2146 EVENT_TYPE(DOWNLOAD_FILE_OPENED)
2148 // This event is created when the stream between download source
2149 // and download file is drained.
2151 // "stream_size": <Total size of all bytes drained from the stream>
2152 // "num_buffers": <How many separate buffers those bytes were in>
2154 EVENT_TYPE(DOWNLOAD_STREAM_DRAINED)
2156 // This event is created when a download file is renamed.
2158 // "old_filename": <Old filename>,
2159 // "new_filename": <New filename>,
2161 EVENT_TYPE(DOWNLOAD_FILE_RENAMED)
2163 // This event is created when a download file is closed. This event is allowed
2164 // to occur even if the file is not open.
2165 EVENT_TYPE(DOWNLOAD_FILE_CLOSED)
2167 // This event is created when a download file is detached.
2168 EVENT_TYPE(DOWNLOAD_FILE_DETACHED)
2170 // This event is created when a download file is deleted.
2171 EVENT_TYPE(DOWNLOAD_FILE_DELETED)
2173 // This event is created when a download file operation has an error.
2175 // "operation": <open, write, close, etc>,
2176 // "net_error": <net::Error code>,
2177 // "os_error": <OS depedent error code>
2178 // "interrupt_reason": <Download interrupt reason>
2180 EVENT_TYPE(DOWNLOAD_FILE_ERROR)
2182 // This event is created when a download file is annotating with source
2183 // information (for Mark Of The Web and anti-virus integration).
2184 EVENT_TYPE(DOWNLOAD_FILE_ANNOTATED)
2186 // ------------------------------------------------------------------------
2187 // FileStream events.
2188 // ------------------------------------------------------------------------
2190 // This event lasts the lifetime of a file stream.
2191 EVENT_TYPE(FILE_STREAM_ALIVE)
2193 // This event is created when a file stream is associated with a NetLog source.
2194 // It indicates what file stream event source is used.
2196 // "source_dependency": <Source id of the file stream>,
2198 EVENT_TYPE(FILE_STREAM_SOURCE)
2200 // This event is created when a file stream is associated with a NetLog source.
2201 // It indicates what event source owns the file stream source.
2203 // "source_dependency": <Source id of the owner of the file stream>,
2205 EVENT_TYPE(FILE_STREAM_BOUND_TO_OWNER)
2207 // Mark the opening/closing of a file stream.
2208 // The BEGIN event has the following parameters:
2212 EVENT_TYPE(FILE_STREAM_OPEN)
2214 // This event is created when a file stream operation has an error.
2216 // "operation": <open, write, close, etc>,
2217 // "os_error": <OS-dependent error code>,
2218 // "net_error": <net::Error code>,
2220 EVENT_TYPE(FILE_STREAM_ERROR)
2222 // -----------------------------------------------------------------------------
2224 // -----------------------------------------------------------------------------
2226 // This event is created when an FTP command is sent. It contains following
2229 // "command": <String - the command sent to remote server>
2231 EVENT_TYPE(FTP_COMMAND_SENT)
2233 // This event is created when FTP control connection is made. It contains
2234 // following parameters:
2236 // "source_dependency": <id of log for control connection socket>
2238 EVENT_TYPE(FTP_CONTROL_CONNECTION)
2240 // This event is created when FTP data connection is made. It contains
2241 // following parameters:
2243 // "source_dependency": <id of log for data connection socket>
2245 EVENT_TYPE(FTP_DATA_CONNECTION)
2247 // This event is created when FTP control connection response is processed.
2248 // It contains following parameters:
2250 // "lines": <list of strings - each representing a line of the response>
2251 // "status_code": <numeric status code of the response>
2253 EVENT_TYPE(FTP_CONTROL_RESPONSE)
2255 // -----------------------------------------------------------------------------
2256 // Simple Cache events.
2257 // -----------------------------------------------------------------------------
2259 // This event lasts the lifetime of a Simple Cache entry.
2260 // It contains the following parameter:
2262 // "entry_hash": <hash of the entry, formatted as a hex string>
2264 EVENT_TYPE(SIMPLE_CACHE_ENTRY)
2266 // This event is created when the entry's key is set.
2267 // It contains the following parameter:
2269 // "key": <key of the entry>
2271 EVENT_TYPE(SIMPLE_CACHE_ENTRY_SET_KEY)
2273 // This event is created when OpenEntry is called. It has no parameters.
2274 EVENT_TYPE(SIMPLE_CACHE_ENTRY_OPEN_CALL)
2276 // This event is created when the Simple Cache actually begins opening the
2277 // cache entry. It has no parameters.
2278 EVENT_TYPE(SIMPLE_CACHE_ENTRY_OPEN_BEGIN)
2280 // This event is created when the Simple Cache finishes the OpenEntry call.
2281 // It contains the following parameter:
2283 // "net_error": <net error code returned from the call>
2285 EVENT_TYPE(SIMPLE_CACHE_ENTRY_OPEN_END)
2287 // This event is created when CreateEntry is called. It has no parameters.
2288 EVENT_TYPE(SIMPLE_CACHE_ENTRY_CREATE_CALL)
2290 // This event is created when the Simple Cache optimistically returns a result
2291 // from a CreateEntry call before it performs the create operation.
2292 // It contains the following parameter:
2294 // "net_error": <net error code returned from the call>
2296 EVENT_TYPE(SIMPLE_CACHE_ENTRY_CREATE_OPTIMISTIC)
2298 // This event is created when the Simple Cache actually begins creating the
2299 // cache entry. It has no parameters.
2300 EVENT_TYPE(SIMPLE_CACHE_ENTRY_CREATE_BEGIN)
2302 // This event is created when the Simple Cache finishes the CreateEntry call.
2303 // It contains the following parameter:
2305 // "net_error": <net error code returned from the call>
2307 EVENT_TYPE(SIMPLE_CACHE_ENTRY_CREATE_END)
2309 // This event is created when ReadEntry is called.
2310 // It contains the following parameters:
2312 // "index": <Index being read/written>,
2313 // "offset": <Offset being read/written>,
2314 // "buf_len": <Length of buffer being read to/written from>,
2315 // "truncate": <If present for a write, the truncate flag is set to true.
2316 // Not present in reads or writes where it is false>,
2318 EVENT_TYPE(SIMPLE_CACHE_ENTRY_READ_CALL)
2320 // This event is created when the Simple Cache actually begins reading data
2321 // from the cache entry.
2322 // It contains the following parameters:
2324 // "index": <Index being read/written>,
2325 // "offset": <Offset being read/written>,
2326 // "buf_len": <Length of buffer being read to/written from>,
2327 // "truncate": <If present for a write, the truncate flag is set to true.
2328 // Not present in reads or writes where it is false>,
2330 EVENT_TYPE(SIMPLE_CACHE_ENTRY_READ_BEGIN)
2332 // This event is created when the Simple Cache finishes a ReadEntry call.
2333 // It contains the following parameters:
2335 // "bytes_copied": <Number of bytes copied. Not present on error>,
2336 // "net_error": <Network error code. Only present on error>,
2338 EVENT_TYPE(SIMPLE_CACHE_ENTRY_READ_END)
2340 // This event is created when the Simple Cache begins to verify the checksum of
2341 // cached data it has just read. It occurs before READ_END, and contains no
2343 EVENT_TYPE(SIMPLE_CACHE_ENTRY_CHECKSUM_BEGIN)
2345 // This event is created when the Simple Cache finishes verifying the checksum
2346 // of cached data. It occurs after CHECKSUM_BEGIN but before READ_END, and
2347 // contains one parameter:
2349 // "net_error": <net error code returned from the internal checksum call>
2351 EVENT_TYPE(SIMPLE_CACHE_ENTRY_CHECKSUM_END)
2353 // This event is created when WriteEntry is called.
2354 // It contains the following parameters:
2356 // "index": <Index being read/written>,
2357 // "offset": <Offset being read/written>,
2358 // "buf_len": <Length of buffer being read to/written from>,
2359 // "truncate": <If present for a write, the truncate flag is set to true.
2360 // Not present in reads or writes where it is false>,
2362 EVENT_TYPE(SIMPLE_CACHE_ENTRY_WRITE_CALL)
2364 // This event is created when the Simple Cache optimistically returns a result
2365 // from a WriteData call before it performs the write operation.
2366 // It contains the following parameters:
2368 // "bytes_copied": <Number of bytes copied. Not present on error>,
2369 // "net_error": <Network error code. Only present on error>,
2371 EVENT_TYPE(SIMPLE_CACHE_ENTRY_WRITE_OPTIMISTIC)
2373 // This event is created when the Simple Cache actually begins writing data to
2375 // It contains the following parameters:
2377 // "index": <Index being read/written>,
2378 // "offset": <Offset being read/written>,
2379 // "buf_len": <Length of buffer being read to/written from>,
2380 // "truncate": <If present for a write, the truncate flag is set to true.
2381 // Not present in reads or writes where it is false>,
2383 EVENT_TYPE(SIMPLE_CACHE_ENTRY_WRITE_BEGIN)
2385 // This event is created when the Simple Cache finishes a WriteEntry call.
2386 // It contains the following parameters:
2388 // "bytes_copied": <Number of bytes copied. Not present on error>,
2389 // "net_error": <Network error code. Only present on error>,
2391 EVENT_TYPE(SIMPLE_CACHE_ENTRY_WRITE_END)
2393 // This event is created when DoomEntry is called. It contains no parameters.
2394 EVENT_TYPE(SIMPLE_CACHE_ENTRY_DOOM_CALL)
2396 // This event is created when the Simple Cache actually starts dooming a cache
2397 // entry. It contains no parameters.
2398 EVENT_TYPE(SIMPLE_CACHE_ENTRY_DOOM_BEGIN)
2400 // This event is created when the Simple Cache finishes dooming an entry.
2401 EVENT_TYPE(SIMPLE_CACHE_ENTRY_DOOM_END)
2403 // This event is created when CloseEntry is called. It contains no parameters.
2404 // A Close call may not result in CLOSE_BEGIN and CLOSE_END if there are still
2405 // more references to the entry remaining.
2406 EVENT_TYPE(SIMPLE_CACHE_ENTRY_CLOSE_CALL)
2408 // This event is created when the Simple Cache actually starts closing a cache
2409 // entry. It contains no parameters.
2410 EVENT_TYPE(SIMPLE_CACHE_ENTRY_CLOSE_BEGIN)
2412 // This event is created when the Simple Cache finishes a CloseEntry call. It
2413 // contains no parameters.
2414 EVENT_TYPE(SIMPLE_CACHE_ENTRY_CLOSE_END)
2416 // This event is created (in a source of the same name) when the internal DNS
2417 // resolver creates a UDP socket to check for global IPv6 connectivity.
2418 EVENT_TYPE(IPV6_REACHABILITY_CHECK)