| 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 #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/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 int DoLoop(int result); | 120 int DoLoop(int result); |
| 121 | 121 |
| 122 // Each of these methods corresponds to a State value. Those with an input | 122 // Each of these methods corresponds to a State value. Those with an input |
| 123 // argument receive the result from the previous state. If a method returns | 123 // argument receive the result from the previous state. If a method returns |
| 124 // ERR_IO_PENDING, then the result from OnIOComplete will be passed to the | 124 // ERR_IO_PENDING, then the result from OnIOComplete will be passed to the |
| 125 // next state method as the result arg. | 125 // next state method as the result arg. |
| 126 int DoResolveProxy(); | 126 int DoResolveProxy(); |
| 127 int DoResolveProxyComplete(int result); | 127 int DoResolveProxyComplete(int result); |
| 128 int DoInitConnection(); | 128 int DoInitConnection(); |
| 129 int DoInitConnectionComplete(int result); | 129 int DoInitConnectionComplete(int result); |
| 130 int DoTunnelRestartWithAuth(); | |
| 131 int DoSSLConnect(); | 130 int DoSSLConnect(); |
| 132 int DoSSLConnectComplete(int result); | 131 int DoSSLConnectComplete(int result); |
| 133 int DoGenerateProxyAuthToken(); | 132 int DoGenerateProxyAuthToken(); |
| 134 int DoGenerateProxyAuthTokenComplete(int result); | 133 int DoGenerateProxyAuthTokenComplete(int result); |
| 135 int DoGenerateServerAuthToken(); | 134 int DoGenerateServerAuthToken(); |
| 136 int DoGenerateServerAuthTokenComplete(int result); | 135 int DoGenerateServerAuthTokenComplete(int result); |
| 137 int DoSendRequest(); | 136 int DoSendRequest(); |
| 138 int DoSendRequestComplete(int result); | 137 int DoSendRequestComplete(int result); |
| 139 int DoReadHeaders(); | 138 int DoReadHeaders(); |
| 140 int DoReadHeadersComplete(int result); | 139 int DoReadHeadersComplete(int result); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 // page just a few hundred bytes long. | 297 // page just a few hundred bytes long. |
| 299 enum { kDrainBodyBufferSize = 1024 }; | 298 enum { kDrainBodyBufferSize = 1024 }; |
| 300 | 299 |
| 301 // User buffer and length passed to the Read method. | 300 // User buffer and length passed to the Read method. |
| 302 scoped_refptr<IOBuffer> read_buf_; | 301 scoped_refptr<IOBuffer> read_buf_; |
| 303 int read_buf_len_; | 302 int read_buf_len_; |
| 304 | 303 |
| 305 // The time the Start method was called. | 304 // The time the Start method was called. |
| 306 base::Time start_time_; | 305 base::Time start_time_; |
| 307 | 306 |
| 308 // The time the DoSSLConnect() method was called (if it got called). | |
| 309 base::TimeTicks ssl_connect_start_time_; | |
| 310 | |
| 311 // The next state in the state machine. | 307 // The next state in the state machine. |
| 312 State next_state_; | 308 State next_state_; |
| 313 | 309 |
| 314 // The hostname and port of the endpoint. This is not necessarily the one | 310 // The hostname and port of the endpoint. This is not necessarily the one |
| 315 // specified by the URL, due to Alternate-Protocol or fixed testing ports. | 311 // specified by the URL, due to Alternate-Protocol or fixed testing ports. |
| 316 HostPortPair endpoint_; | 312 HostPortPair endpoint_; |
| 317 | 313 |
| 318 // True when the tunnel is in the process of being established - we can't | 314 // True when the tunnel is in the process of being established - we can't |
| 319 // read from the socket until the tunnel is done. | 315 // read from the socket until the tunnel is done. |
| 320 bool establishing_tunnel_; | 316 bool establishing_tunnel_; |
| 321 | 317 |
| 322 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); | 318 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); |
| 323 }; | 319 }; |
| 324 | 320 |
| 325 } // namespace net | 321 } // namespace net |
| 326 | 322 |
| 327 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 323 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
| OLD | NEW |