OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef NET_BASE_LOAD_STATES_H__ | 5 #ifndef NET_BASE_LOAD_STATES_H__ |
6 #define NET_BASE_LOAD_STATES_H__ | 6 #define NET_BASE_LOAD_STATES_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 namespace net { | 9 namespace net { |
10 | 10 |
11 // These states correspond to the lengthy periods of time that a resource load | 11 // These states correspond to the lengthy periods of time that a resource load |
12 // may be blocked and unable to make progress. | 12 // may be blocked and unable to make progress. |
13 enum LoadState { | 13 enum LoadState { |
14 // This is the default state. It corresponds to a resource load that has | 14 // This is the default state. It corresponds to a resource load that has |
15 // either not yet begun or is idle waiting for the consumer to do something | 15 // either not yet begun or is idle waiting for the consumer to do something |
16 // to move things along (e.g., the consumer of an URLRequest may not have | 16 // to move things along (e.g., the consumer of an net::URLRequest may not have |
17 // called Read yet). | 17 // called Read yet). |
18 LOAD_STATE_IDLE, | 18 LOAD_STATE_IDLE, |
19 | 19 |
20 // This state corresponds to a resource load that is blocked waiting for | 20 // This state corresponds to a resource load that is blocked waiting for |
21 // access to a resource in the cache. If multiple requests are made for the | 21 // access to a resource in the cache. If multiple requests are made for the |
22 // same resource, the first request will be responsible for writing (or | 22 // same resource, the first request will be responsible for writing (or |
23 // updating) the cache entry and the second request will be deferred until | 23 // updating) the cache entry and the second request will be deferred until |
24 // the first completes. This may be done to optimize for cache reuse. | 24 // the first completes. This may be done to optimize for cache reuse. |
25 LOAD_STATE_WAITING_FOR_CACHE, | 25 LOAD_STATE_WAITING_FOR_CACHE, |
26 | 26 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // This state corresponds to a resource load that is blocked waiting for the | 58 // This state corresponds to a resource load that is blocked waiting for the |
59 // response to a network request. In the case of a HTTP transaction, this | 59 // response to a network request. In the case of a HTTP transaction, this |
60 // corresponds to the period after the request is sent and before all of the | 60 // corresponds to the period after the request is sent and before all of the |
61 // response headers have been received. | 61 // response headers have been received. |
62 LOAD_STATE_WAITING_FOR_RESPONSE, | 62 LOAD_STATE_WAITING_FOR_RESPONSE, |
63 | 63 |
64 // This state corresponds to a resource load that is blocked waiting for a | 64 // This state corresponds to a resource load that is blocked waiting for a |
65 // read to complete. In the case of a HTTP transaction, this corresponds to | 65 // read to complete. In the case of a HTTP transaction, this corresponds to |
66 // the period after the response headers have been received and before all of | 66 // the period after the response headers have been received and before all of |
67 // the response body has been downloaded. (NOTE: This state only applies for | 67 // the response body has been downloaded. (NOTE: This state only applies for |
68 // an URLRequest while there is an outstanding Read operation.) | 68 // an net::URLRequest while there is an outstanding Read operation.) |
69 LOAD_STATE_READING_RESPONSE, | 69 LOAD_STATE_READING_RESPONSE, |
70 }; | 70 }; |
71 | 71 |
72 } // namespace net | 72 } // namespace net |
73 | 73 |
74 #endif // NET_BASE_LOAD_STATES_H__ | 74 #endif // NET_BASE_LOAD_STATES_H__ |
OLD | NEW |