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_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 5 #ifndef NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Each of these methods corresponds to a State value. Those with an input | 65 // Each of these methods corresponds to a State value. Those with an input |
66 // argument receive the result from the previous state. If a method returns | 66 // argument receive the result from the previous state. If a method returns |
67 // ERR_IO_PENDING, then the result from OnIOComplete will be passed to the | 67 // ERR_IO_PENDING, then the result from OnIOComplete will be passed to the |
68 // next state method as the result arg. | 68 // next state method as the result arg. |
69 int DoResolveProxy(); | 69 int DoResolveProxy(); |
70 int DoResolveProxyComplete(int result); | 70 int DoResolveProxyComplete(int result); |
71 int DoInitConnection(); | 71 int DoInitConnection(); |
72 int DoInitConnectionComplete(int result); | 72 int DoInitConnectionComplete(int result); |
73 int DoResolveHost(); | 73 int DoResolveHost(); |
74 int DoResolveHostComplete(int result); | 74 int DoResolveHostComplete(int result); |
75 int DoConnect(); | 75 int DoTCPConnect(); |
76 int DoConnectComplete(int result); | 76 int DoTCPConnectComplete(int result); |
77 int DoSSLConnectOverTunnel(); | 77 int DoSSLConnect(); |
78 int DoSSLConnectOverTunnelComplete(int result); | 78 int DoSSLConnectComplete(int result); |
79 int DoWriteHeaders(); | 79 int DoWriteHeaders(); |
80 int DoWriteHeadersComplete(int result); | 80 int DoWriteHeadersComplete(int result); |
81 int DoWriteBody(); | 81 int DoWriteBody(); |
82 int DoWriteBodyComplete(int result); | 82 int DoWriteBodyComplete(int result); |
83 int DoReadHeaders(); | 83 int DoReadHeaders(); |
84 int DoReadHeadersComplete(int result); | 84 int DoReadHeadersComplete(int result); |
85 int DoReadBody(); | 85 int DoReadBody(); |
86 int DoReadBodyComplete(int result); | 86 int DoReadBodyComplete(int result); |
87 int DoDrainBodyForAuthRestart(); | 87 int DoDrainBodyForAuthRestart(); |
88 int DoDrainBodyForAuthRestartComplete(int result); | 88 int DoDrainBodyForAuthRestartComplete(int result); |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 // The time the Start method was called. | 289 // The time the Start method was called. |
290 base::Time start_time_; | 290 base::Time start_time_; |
291 | 291 |
292 enum State { | 292 enum State { |
293 STATE_RESOLVE_PROXY, | 293 STATE_RESOLVE_PROXY, |
294 STATE_RESOLVE_PROXY_COMPLETE, | 294 STATE_RESOLVE_PROXY_COMPLETE, |
295 STATE_INIT_CONNECTION, | 295 STATE_INIT_CONNECTION, |
296 STATE_INIT_CONNECTION_COMPLETE, | 296 STATE_INIT_CONNECTION_COMPLETE, |
297 STATE_RESOLVE_HOST, | 297 STATE_RESOLVE_HOST, |
298 STATE_RESOLVE_HOST_COMPLETE, | 298 STATE_RESOLVE_HOST_COMPLETE, |
299 STATE_CONNECT, | 299 STATE_TCP_CONNECT, |
300 STATE_CONNECT_COMPLETE, | 300 STATE_TCP_CONNECT_COMPLETE, |
301 STATE_SSL_CONNECT_OVER_TUNNEL, | 301 STATE_SSL_CONNECT, |
302 STATE_SSL_CONNECT_OVER_TUNNEL_COMPLETE, | 302 STATE_SSL_CONNECT_COMPLETE, |
303 STATE_WRITE_HEADERS, | 303 STATE_WRITE_HEADERS, |
304 STATE_WRITE_HEADERS_COMPLETE, | 304 STATE_WRITE_HEADERS_COMPLETE, |
305 STATE_WRITE_BODY, | 305 STATE_WRITE_BODY, |
306 STATE_WRITE_BODY_COMPLETE, | 306 STATE_WRITE_BODY_COMPLETE, |
307 STATE_READ_HEADERS, | 307 STATE_READ_HEADERS, |
308 STATE_READ_HEADERS_COMPLETE, | 308 STATE_READ_HEADERS_COMPLETE, |
309 STATE_READ_BODY, | 309 STATE_READ_BODY, |
310 STATE_READ_BODY_COMPLETE, | 310 STATE_READ_BODY_COMPLETE, |
311 STATE_DRAIN_BODY_FOR_AUTH_RESTART, | 311 STATE_DRAIN_BODY_FOR_AUTH_RESTART, |
312 STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE, | 312 STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE, |
313 STATE_NONE | 313 STATE_NONE |
314 }; | 314 }; |
315 State next_state_; | 315 State next_state_; |
316 }; | 316 }; |
317 | 317 |
318 } // namespace net | 318 } // namespace net |
319 | 319 |
320 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 320 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
OLD | NEW |