| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This is the list of load states and their values. For the enum values, | 5 // This is the list of load states and their values. For the enum values, |
| 6 // include the file "net/base/load_states.h". | 6 // include the file "net/base/load_states.h". |
| 7 // | 7 // |
| 8 // Here we define the values using a macro LOAD_STATE, so it can be | 8 // Here we define the values using a macro LOAD_STATE, so it can be |
| 9 // expanded differently in some places (for example, to automatically | 9 // expanded differently in some places (for example, to automatically |
| 10 // map a load flag value to its symbolic name). | 10 // map a load flag value to its symbolic name). |
| 11 | 11 |
| 12 // This is the default state. It corresponds to a resource load that has | 12 // This is the default state. It corresponds to a resource load that has |
| 13 // either not yet begun or is idle waiting for the consumer to do something | 13 // either not yet begun or is idle waiting for the consumer to do something |
| 14 // to move things along (e.g., the consumer of an URLRequest may not have | 14 // to move things along (e.g., the consumer of an URLRequest may not have |
| 15 // called Read yet). | 15 // called Read yet). |
| 16 LOAD_STATE(IDLE) | 16 LOAD_STATE(IDLE) |
| 17 | 17 |
| 18 // When a socket pool group is below the maximum number of sockets allowed per |
| 19 // group, but a new socket cannot be created due to the per-pool socket limit, |
| 20 // this state is returned by all requests for the group waiting on an idle |
| 21 // connection, except those that may be serviced by a pending new connection. |
| 22 LOAD_STATE(WAITING_FOR_STALLED_SOCKET_POOL) |
| 23 |
| 24 // When a socket pool group has reached the maximum number of sockets allowed |
| 25 // per group, this state is returned for all requests that don't have a socket, |
| 26 // except those that correspond to a pending new connection. |
| 27 LOAD_STATE(WAITING_FOR_AVAILABLE_SOCKET) |
| 28 |
| 18 // This state indicates that the URLRequest delegate has chosen to block this | 29 // This state indicates that the URLRequest delegate has chosen to block this |
| 19 // request before it was sent over the network. When in this state, the | 30 // request before it was sent over the network. When in this state, the |
| 20 // delegate should set a load state parameter on the URLRequest describing | 31 // delegate should set a load state parameter on the URLRequest describing |
| 21 // the nature of the delay (i.e. "Waiting for <description given by | 32 // the nature of the delay (i.e. "Waiting for <description given by |
| 22 // delegate>"). | 33 // delegate>"). |
| 23 LOAD_STATE(WAITING_FOR_DELEGATE) | 34 LOAD_STATE(WAITING_FOR_DELEGATE) |
| 24 | 35 |
| 25 // This state corresponds to a resource load that is blocked waiting for | 36 // This state corresponds to a resource load that is blocked waiting for |
| 26 // access to a resource in the cache. If multiple requests are made for the | 37 // access to a resource in the cache. If multiple requests are made for the |
| 27 // same resource, the first request will be responsible for writing (or | 38 // same resource, the first request will be responsible for writing (or |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // corresponds to the period after the request is sent and before all of the | 89 // corresponds to the period after the request is sent and before all of the |
| 79 // response headers have been received. | 90 // response headers have been received. |
| 80 LOAD_STATE(WAITING_FOR_RESPONSE) | 91 LOAD_STATE(WAITING_FOR_RESPONSE) |
| 81 | 92 |
| 82 // This state corresponds to a resource load that is blocked waiting for a | 93 // This state corresponds to a resource load that is blocked waiting for a |
| 83 // read to complete. In the case of a HTTP transaction, this corresponds to | 94 // read to complete. In the case of a HTTP transaction, this corresponds to |
| 84 // the period after the response headers have been received and before all of | 95 // the period after the response headers have been received and before all of |
| 85 // the response body has been downloaded. (NOTE: This state only applies for | 96 // the response body has been downloaded. (NOTE: This state only applies for |
| 86 // an URLRequest while there is an outstanding Read operation.) | 97 // an URLRequest while there is an outstanding Read operation.) |
| 87 LOAD_STATE(READING_RESPONSE) | 98 LOAD_STATE(READING_RESPONSE) |
| OLD | NEW |