| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // NOTE: No header guards are used, since this file is intended to be expanded | 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. | 6 // directly into net_log.h. DO NOT include this file anywhere else. |
| 7 | 7 |
| 8 // -------------------------------------------------------------------------- | 8 // -------------------------------------------------------------------------- |
| 9 // General pseudo-events | 9 // General pseudo-events |
| 10 // -------------------------------------------------------------------------- | 10 // -------------------------------------------------------------------------- |
| 11 | 11 |
| 12 // Something got cancelled (we determine what is cancelled based on the | 12 // Something got cancelled (we determine what is cancelled based on the |
| 13 // log context around it.) | 13 // log context around it.) |
| 14 EVENT_TYPE(CANCELLED) | 14 EVENT_TYPE(CANCELLED) |
| 15 | 15 |
| 16 // TODO(eroman): These are placeholders used by the deprecated | 16 // TODO(eroman): remove the remaining consumers of this. |
| 17 // BoundNetLog::AddString() / BoundNetLog::AddStringLiteral(). | |
| 18 EVENT_TYPE(TODO_STRING) | 17 EVENT_TYPE(TODO_STRING) |
| 19 EVENT_TYPE(TODO_STRING_LITERAL) | |
| 20 | 18 |
| 21 // Marks the creation/destruction of a request (URLRequest or SocketStream). | 19 // Marks the creation/destruction of a request (URLRequest or SocketStream). |
| 22 // In the begin phase of this event, the message will contain a string which | 20 // In the begin phase of this event, the message will contain a string which |
| 23 // is the URL. | 21 // is the URL. |
| 24 EVENT_TYPE(REQUEST_ALIVE) | 22 EVENT_TYPE(REQUEST_ALIVE) |
| 25 | 23 |
| 26 // ------------------------------------------------------------------------ | 24 // ------------------------------------------------------------------------ |
| 27 // HostResolverImpl | 25 // HostResolverImpl |
| 28 // ------------------------------------------------------------------------ | 26 // ------------------------------------------------------------------------ |
| 29 | 27 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 41 | 39 |
| 42 // ------------------------------------------------------------------------ | 40 // ------------------------------------------------------------------------ |
| 43 // InitProxyResolver | 41 // InitProxyResolver |
| 44 // ------------------------------------------------------------------------ | 42 // ------------------------------------------------------------------------ |
| 45 | 43 |
| 46 // The start/end of auto-detect + custom PAC URL configuration. | 44 // The start/end of auto-detect + custom PAC URL configuration. |
| 47 EVENT_TYPE(INIT_PROXY_RESOLVER) | 45 EVENT_TYPE(INIT_PROXY_RESOLVER) |
| 48 | 46 |
| 49 // The start/end of download of a PAC script. This could be the well-known | 47 // The start/end of download of a PAC script. This could be the well-known |
| 50 // WPAD URL (if testing auto-detect), or a custom PAC URL. | 48 // WPAD URL (if testing auto-detect), or a custom PAC URL. |
| 49 // |
| 50 // The START event has the parameters: |
| 51 // { |
| 52 // "url": <URL string of script being fetched> |
| 53 // } |
| 54 // |
| 55 // If the fetch failed, then the END phase has these parameters: |
| 56 // { |
| 57 // "error_code": <Net error code integer> |
| 58 // } |
| 51 EVENT_TYPE(INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT) | 59 EVENT_TYPE(INIT_PROXY_RESOLVER_FETCH_PAC_SCRIPT) |
| 52 | 60 |
| 53 // The start/end of the testing of a PAC script (trying to parse the fetched | 61 // The start/end of the testing of a PAC script (trying to parse the fetched |
| 54 // file as javascript). | 62 // file as javascript). |
| 63 // |
| 64 // If the parsing of the script failed, the END phase will have parameters: |
| 65 // { |
| 66 // "error_code": <Net error code integer> |
| 67 // } |
| 55 EVENT_TYPE(INIT_PROXY_RESOLVER_SET_PAC_SCRIPT) | 68 EVENT_TYPE(INIT_PROXY_RESOLVER_SET_PAC_SCRIPT) |
| 56 | 69 |
| 70 // This event means that initialization failed because there was no |
| 71 // configured script fetcher. (This indicates a configuration error). |
| 72 EVENT_TYPE(INIT_PROXY_RESOLVER_HAS_NO_FETCHER) |
| 73 |
| 74 // This event is emitted after deciding to fall-back to the next PAC |
| 75 // script in the list. |
| 76 EVENT_TYPE(INIT_PROXY_RESOLVER_FALLING_BACK_TO_NEXT_PAC_URL) |
| 77 |
| 57 // ------------------------------------------------------------------------ | 78 // ------------------------------------------------------------------------ |
| 58 // ProxyService | 79 // ProxyService |
| 59 // ------------------------------------------------------------------------ | 80 // ------------------------------------------------------------------------ |
| 60 | 81 |
| 61 // The start/end of a proxy resolve request. | 82 // The start/end of a proxy resolve request. |
| 62 EVENT_TYPE(PROXY_SERVICE) | 83 EVENT_TYPE(PROXY_SERVICE) |
| 63 | 84 |
| 64 // The time while a request is waiting on InitProxyResolver to configure | 85 // The time while a request is waiting on InitProxyResolver to configure |
| 65 // against either WPAD or custom PAC URL. The specifics on this time | 86 // against either WPAD or custom PAC URL. The specifics on this time |
| 66 // are found from ProxyService::init_proxy_resolver_log(). | 87 // are found from ProxyService::init_proxy_resolver_log(). |
| 67 EVENT_TYPE(PROXY_SERVICE_WAITING_FOR_INIT_PAC) | 88 EVENT_TYPE(PROXY_SERVICE_WAITING_FOR_INIT_PAC) |
| 68 | 89 |
| 69 // The time taken to fetch the system proxy configuration. | 90 // The time taken to fetch the system proxy configuration. |
| 70 EVENT_TYPE(PROXY_SERVICE_POLL_CONFIG_SERVICE_FOR_CHANGES) | 91 EVENT_TYPE(PROXY_SERVICE_POLL_CONFIG_SERVICE_FOR_CHANGES) |
| 71 | 92 |
| 93 // This event is emitted to show what the PAC script returned. It can contain |
| 94 // extra parameters that are either: |
| 95 // { |
| 96 // "pac_string": <List of valid proxy servers, in PAC format> |
| 97 // } |
| 98 // |
| 99 // Or if the the resolver failed: |
| 100 // { |
| 101 // "net_error": <Net error code that resolver failed with> |
| 102 // } |
| 103 EVENT_TYPE(PROXY_SERVICE_RESOLVED_PROXY_LIST) |
| 104 |
| 72 // ------------------------------------------------------------------------ | 105 // ------------------------------------------------------------------------ |
| 73 // Proxy Resolver | 106 // Proxy Resolver |
| 74 // ------------------------------------------------------------------------ | 107 // ------------------------------------------------------------------------ |
| 75 | 108 |
| 76 // Measures the time taken to execute the "myIpAddress()" javascript binding. | 109 // Measures the time taken to execute the "myIpAddress()" javascript binding. |
| 77 EVENT_TYPE(PROXY_RESOLVER_V8_MY_IP_ADDRESS) | 110 EVENT_TYPE(PROXY_RESOLVER_V8_MY_IP_ADDRESS) |
| 78 | 111 |
| 79 // Measures the time taken to execute the "myIpAddressEx()" javascript binding. | 112 // Measures the time taken to execute the "myIpAddressEx()" javascript binding. |
| 80 EVENT_TYPE(PROXY_RESOLVER_V8_MY_IP_ADDRESS_EX) | 113 EVENT_TYPE(PROXY_RESOLVER_V8_MY_IP_ADDRESS_EX) |
| 81 | 114 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 98 | 131 |
| 99 // Marks the destruction of a TCP socket. | 132 // Marks the destruction of a TCP socket. |
| 100 EVENT_TYPE(TCP_SOCKET_DONE) | 133 EVENT_TYPE(TCP_SOCKET_DONE) |
| 101 | 134 |
| 102 // The start/end of a SOCKS connect(). | 135 // The start/end of a SOCKS connect(). |
| 103 EVENT_TYPE(SOCKS_CONNECT) | 136 EVENT_TYPE(SOCKS_CONNECT) |
| 104 | 137 |
| 105 // The start/end of a SOCKS5 connect(). | 138 // The start/end of a SOCKS5 connect(). |
| 106 EVENT_TYPE(SOCKS5_CONNECT) | 139 EVENT_TYPE(SOCKS5_CONNECT) |
| 107 | 140 |
| 141 // This event is emitted when the SOCKS connect fails because the provided |
| 142 // was longer than 255 characters. |
| 143 EVENT_TYPE(SOCKS_HOSTNAME_TOO_BIG) |
| 144 |
| 145 // These events are emitted when insufficient data was read while |
| 146 // trying to establish a connection to the SOCKS proxy server |
| 147 // (during the greeting phase or handshake phase, respectively). |
| 148 EVENT_TYPE(SOCKS_UNEXPECTEDLY_CLOSED_DURING_GREETING) |
| 149 EVENT_TYPE(SOCKS_UNEXPECTEDLY_CLOSED_DURING_HANDSHAKE) |
| 150 |
| 151 // This event indicates that a bad version number was received in the |
| 152 // proxy server's response. The extra parameters show its value: |
| 153 // { |
| 154 // "version": <Integer version number in the response> |
| 155 // } |
| 156 EVENT_TYPE(SOCKS_UNEXPECTED_VERSION) |
| 157 |
| 158 // This event indicates that the SOCKS proxy server returned an error while |
| 159 // trying to create a connection. The following parameters will be attached |
| 160 // to the event: |
| 161 // { |
| 162 // "error_code": <Integer error code returned by the server> |
| 163 // } |
| 164 EVENT_TYPE(SOCKS_SERVER_ERROR) |
| 165 |
| 166 // This event indicates that the SOCKS proxy server asked for an authentication |
| 167 // method that we don't support. The following parameters are attached to the |
| 168 // event: |
| 169 // { |
| 170 // "method": <Integer method code> |
| 171 // } |
| 172 EVENT_TYPE(SOCKS_UNEXPECTED_AUTH) |
| 173 |
| 174 // This event indicates that the SOCKS proxy server's response indicated an |
| 175 // address type which we are not prepared to handle. |
| 176 // The following parameters are attached to the event: |
| 177 // { |
| 178 // "address_type": <Integer code for the address type> |
| 179 // } |
| 180 EVENT_TYPE(SOCKS_UNKNOWN_ADDRESS_TYPE) |
| 181 |
| 108 // The start/end of a SSL connect(). | 182 // The start/end of a SSL connect(). |
| 109 EVENT_TYPE(SSL_CONNECT) | 183 EVENT_TYPE(SSL_CONNECT) |
| 110 | 184 |
| 111 // The specified number of bytes were sent on the socket. | 185 // The specified number of bytes were sent on the socket. |
| 186 // The following parameters are attached: |
| 187 // { |
| 188 // "num_bytes": <Number of bytes that were just sent> |
| 189 // } |
| 112 EVENT_TYPE(SOCKET_BYTES_SENT) | 190 EVENT_TYPE(SOCKET_BYTES_SENT) |
| 113 | 191 |
| 114 // The specified number of bytes were received on the socket. | 192 // The specified number of bytes were received on the socket. |
| 193 // The following parameters are attached: |
| 194 // { |
| 195 // "num_bytes": <Number of bytes that were just sent> |
| 196 // } |
| 115 EVENT_TYPE(SOCKET_BYTES_RECEIVED) | 197 EVENT_TYPE(SOCKET_BYTES_RECEIVED) |
| 116 | 198 |
| 117 // ------------------------------------------------------------------------ | 199 // ------------------------------------------------------------------------ |
| 118 // ClientSocketPoolBase::ConnectJob | 200 // ClientSocketPoolBase::ConnectJob |
| 119 // ------------------------------------------------------------------------ | 201 // ------------------------------------------------------------------------ |
| 120 | 202 |
| 121 // The start/end of a ConnectJob. | 203 // The start/end of a ConnectJob. |
| 122 EVENT_TYPE(SOCKET_POOL_CONNECT_JOB) | 204 EVENT_TYPE(SOCKET_POOL_CONNECT_JOB) |
| 123 | 205 |
| 124 // Whether the connect job timed out. | 206 // Whether the connect job timed out. |
| 125 EVENT_TYPE(SOCKET_POOL_CONNECT_JOB_TIMED_OUT) | 207 EVENT_TYPE(SOCKET_POOL_CONNECT_JOB_TIMED_OUT) |
| 126 | 208 |
| 127 // ------------------------------------------------------------------------ | 209 // ------------------------------------------------------------------------ |
| 128 // ClientSocketPoolBaseHelper | 210 // ClientSocketPoolBaseHelper |
| 129 // ------------------------------------------------------------------------ | 211 // ------------------------------------------------------------------------ |
| 130 | 212 |
| 131 // The start/end of a client socket pool request for a socket. | 213 // The start/end of a client socket pool request for a socket. |
| 132 EVENT_TYPE(SOCKET_POOL) | 214 EVENT_TYPE(SOCKET_POOL) |
| 133 | 215 |
| 134 // The request stalled because there are too many sockets in the pool. | 216 // The request stalled because there are too many sockets in the pool. |
| 135 EVENT_TYPE(SOCKET_POOL_STALLED_MAX_SOCKETS) | 217 EVENT_TYPE(SOCKET_POOL_STALLED_MAX_SOCKETS) |
| 136 | 218 |
| 137 // The request stalled because there are too many sockets in the group. | 219 // The request stalled because there are too many sockets in the group. |
| 138 EVENT_TYPE(SOCKET_POOL_STALLED_MAX_SOCKETS_PER_GROUP) | 220 EVENT_TYPE(SOCKET_POOL_STALLED_MAX_SOCKETS_PER_GROUP) |
| 139 | 221 |
| 222 // Indicates that we reused an existing socket. Attached to the event are |
| 223 // the parameters: |
| 224 // { |
| 225 // "idle_ms": <The number of milliseconds the socket was sitting idle for> |
| 226 // } |
| 227 EVENT_TYPE(SOCKET_POOL_REUSED_AN_EXISTING_SOCKET) |
| 228 |
| 229 // This event simply describes the host:port that were requested from the |
| 230 // socket pool. Its parameters are: |
| 231 // { |
| 232 // "host_and_port": <String encoding the host and port> |
| 233 // } |
| 234 EVENT_TYPE(TCP_CLIENT_SOCKET_POOL_REQUESTED_SOCKET) |
| 235 |
| 236 |
| 140 // A backup socket is created due to slow connect | 237 // A backup socket is created due to slow connect |
| 141 EVENT_TYPE(SOCKET_BACKUP_CREATED) | 238 EVENT_TYPE(SOCKET_BACKUP_CREATED) |
| 142 | 239 |
| 143 // A backup socket is created due to slow connect | 240 // A backup socket is created due to slow connect |
| 144 EVENT_TYPE(SOCKET_BACKUP_TIMER_EXTENDED) | 241 EVENT_TYPE(SOCKET_BACKUP_TIMER_EXTENDED) |
| 145 | 242 |
| 146 // Identifies the NetLog::Source() for a ConnectJob. The begin event | 243 // Identifies the NetLog::Source() for a ConnectJob. The begin event |
| 147 // is sent to the request that triggered the ConnectJob, the end event | 244 // is sent to the request that triggered the ConnectJob, the end event |
| 148 // is sent to the request that received the connected socket. Because of | 245 // is sent to the request that received the connected socket. Because of |
| 149 // late binding, they may not be the same. Therefore the ID for the | 246 // late binding, they may not be the same. Therefore the ID for the |
| 150 // ConnectJob NetLog is sent in both events. | 247 // ConnectJob NetLog is sent in both events. The event parameters are: |
| 248 // { |
| 249 // "source_id": <ID of the connect job that was bound to this source> |
| 250 // } |
| 151 EVENT_TYPE(SOCKET_POOL_CONNECT_JOB_ID) | 251 EVENT_TYPE(SOCKET_POOL_CONNECT_JOB_ID) |
| 152 | 252 |
| 153 // Identifies the NetLog::Source() for the Socket assigned to the pending | 253 // Identifies the NetLog::Source() for the Socket assigned to the pending |
| 154 // request. | 254 // request. The event parameters are: |
| 255 // { |
| 256 // "source_id": <ID of the socket that was bound to this source> |
| 257 // } |
| 155 EVENT_TYPE(SOCKET_POOL_SOCKET_ID) | 258 EVENT_TYPE(SOCKET_POOL_SOCKET_ID) |
| 156 | 259 |
| 157 // ------------------------------------------------------------------------ | 260 // ------------------------------------------------------------------------ |
| 158 // URLRequest | 261 // URLRequest |
| 159 // ------------------------------------------------------------------------ | 262 // ------------------------------------------------------------------------ |
| 160 | 263 |
| 161 // Measures the time between URLRequest::Start() and | 264 // Measures the time between URLRequest::Start() and |
| 162 // URLRequest::ResponseStarted(). | 265 // URLRequest::ResponseStarted(). |
| 163 // | 266 // |
| 164 // For the BEGIN phase, the |extra_parameters| of the event will be of type | 267 // For the BEGIN phase, the following parameters are attached: |
| 165 // NetLogStringParameter, and will contain the URL. | 268 // { |
| 269 // "url": <String of URL being loaded> |
| 270 // } |
| 166 // | 271 // |
| 167 // For the END phase, the |extra_parameters| of the event will be of type | 272 // For the END phase, if there was an error, the following parameters are |
| 168 // NetLogIntegerParameter, and will contain the net error code. Altenately, | 273 // attached: |
| 169 // the extra_parameters may be NULL indicating no error code. | 274 // { |
| 275 // "net_error": <Net error code of the failure> |
| 276 // } |
| 170 EVENT_TYPE(URL_REQUEST_START) | 277 EVENT_TYPE(URL_REQUEST_START) |
| 171 | 278 |
| 279 // This event is sent once a URLRequest receives a redirect. The parameters |
| 280 // attached to the event are: |
| 281 // { |
| 282 // "location": <The URL that was redirected to> |
| 283 // } |
| 284 EVENT_TYPE(URL_REQUEST_REDIRECTED) |
| 285 |
| 172 // ------------------------------------------------------------------------ | 286 // ------------------------------------------------------------------------ |
| 173 // HttpCache | 287 // HttpCache |
| 174 // ------------------------------------------------------------------------ | 288 // ------------------------------------------------------------------------ |
| 175 | 289 |
| 176 // Measures the time while opening a disk cache entry. | 290 // Measures the time while opening a disk cache entry. |
| 177 EVENT_TYPE(HTTP_CACHE_OPEN_ENTRY) | 291 EVENT_TYPE(HTTP_CACHE_OPEN_ENTRY) |
| 178 | 292 |
| 179 // Measures the time while creating a disk cache entry. | 293 // Measures the time while creating a disk cache entry. |
| 180 EVENT_TYPE(HTTP_CACHE_CREATE_ENTRY) | 294 EVENT_TYPE(HTTP_CACHE_CREATE_ENTRY) |
| 181 | 295 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 // Measures the time to read HTTP response headers from the server. | 367 // Measures the time to read HTTP response headers from the server. |
| 254 EVENT_TYPE(HTTP_STREAM_PARSER_READ_HEADERS) | 368 EVENT_TYPE(HTTP_STREAM_PARSER_READ_HEADERS) |
| 255 | 369 |
| 256 // ------------------------------------------------------------------------ | 370 // ------------------------------------------------------------------------ |
| 257 // SocketStream | 371 // SocketStream |
| 258 // ------------------------------------------------------------------------ | 372 // ------------------------------------------------------------------------ |
| 259 | 373 |
| 260 // Measures the time between SocketStream::Connect() and | 374 // Measures the time between SocketStream::Connect() and |
| 261 // SocketStream::DidEstablishConnection() | 375 // SocketStream::DidEstablishConnection() |
| 262 // | 376 // |
| 263 // For the BEGIN phase, the |extra_parameters| of the event will be of type | 377 // For the BEGIN phase, the following parameters are attached: |
| 264 // NetLogStringParameter, and will contain the URL. | 378 // { |
| 379 // "url": <String of URL being loaded> |
| 380 // } |
| 265 // | 381 // |
| 266 // For the END phase, the |extra_parameters| of the event will be of type | 382 // For the END phase, if there was an error, the following parameters are |
| 267 // NetLogIntegerParameter, and will contain the net error code. Altenately, | 383 // attached: |
| 268 // the extra_parameters may be NULL indicating no error code. | 384 // { |
| 385 // "net_error": <Net error code of the failure> |
| 386 // } |
| 269 EVENT_TYPE(SOCKET_STREAM_CONNECT) | 387 EVENT_TYPE(SOCKET_STREAM_CONNECT) |
| 270 | 388 |
| 271 // A message sent on the SocketStream. | 389 // A message sent on the SocketStream. |
| 272 EVENT_TYPE(SOCKET_STREAM_SENT) | 390 EVENT_TYPE(SOCKET_STREAM_SENT) |
| 273 | 391 |
| 274 // A message received on the SocketStream. | 392 // A message received on the SocketStream. |
| 275 EVENT_TYPE(SOCKET_STREAM_RECEIVED) | 393 EVENT_TYPE(SOCKET_STREAM_RECEIVED) |
| 276 | 394 |
| 277 // ------------------------------------------------------------------------ | 395 // ------------------------------------------------------------------------ |
| 278 // SOCKS5ClientSocket | 396 // SOCKS5ClientSocket |
| 279 // ------------------------------------------------------------------------ | 397 // ------------------------------------------------------------------------ |
| 280 | 398 |
| 281 // The time spent sending the "greeting" to the SOCKS server. | 399 // The time spent sending the "greeting" to the SOCKS server. |
| 282 EVENT_TYPE(SOCKS5_GREET_WRITE) | 400 EVENT_TYPE(SOCKS5_GREET_WRITE) |
| 283 | 401 |
| 284 // The time spent waiting for the "greeting" response from the SOCKS server. | 402 // The time spent waiting for the "greeting" response from the SOCKS server. |
| 285 EVENT_TYPE(SOCKS5_GREET_READ) | 403 EVENT_TYPE(SOCKS5_GREET_READ) |
| 286 | 404 |
| 287 // The time spent sending the CONNECT request to the SOCKS server. | 405 // The time spent sending the CONNECT request to the SOCKS server. |
| 288 EVENT_TYPE(SOCKS5_HANDSHAKE_WRITE) | 406 EVENT_TYPE(SOCKS5_HANDSHAKE_WRITE) |
| 289 | 407 |
| 290 // The time spent waiting for the response to the CONNECT request. | 408 // The time spent waiting for the response to the CONNECT request. |
| 291 EVENT_TYPE(SOCKS5_HANDSHAKE_READ) | 409 EVENT_TYPE(SOCKS5_HANDSHAKE_READ) |
| OLD | NEW |