[email protected] | a796bcec | 2010-03-22 17:17:26 | [diff] [blame] | 1 | // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 4 | |
| 5 | #ifndef NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
| 6 | #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
[email protected] | 32b76ef | 2010-07-26 23:08:24 | [diff] [blame] | 7 | #pragma once |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 8 | |
[email protected] | 96d570e4 | 2008-08-05 22:43:04 | [diff] [blame] | 9 | #include <string> |
| 10 | |
[email protected] | 85c0ed8 | 2009-12-15 23:14:14 | [diff] [blame] | 11 | #include "base/basictypes.h" |
[email protected] | 8822f38 | 2010-07-30 21:49:03 | [diff] [blame] | 12 | #include "base/gtest_prod_util.h" |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 13 | #include "base/ref_counted.h" |
[email protected] | 9a0a55f | 2009-04-13 23:23:03 | [diff] [blame] | 14 | #include "base/scoped_ptr.h" |
[email protected] | 21b316a | 2009-03-23 18:25:06 | [diff] [blame] | 15 | #include "base/time.h" |
[email protected] | 9e743cd | 2010-03-16 07:03:53 | [diff] [blame] | 16 | #include "net/base/net_log.h" |
[email protected] | 8e6441ca | 2010-08-19 05:56:38 | [diff] [blame] | 17 | #include "net/base/request_priority.h" |
[email protected] | aaead50 | 2008-10-15 00:20:11 | [diff] [blame] | 18 | #include "net/base/ssl_config_service.h" |
[email protected] | c3b35c2 | 2008-09-27 03:19:42 | [diff] [blame] | 19 | #include "net/http/http_auth.h" |
[email protected] | b94f92d | 2010-10-27 16:45:20 | [diff] [blame] | 20 | #include "net/http/http_request_headers.h" |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 21 | #include "net/http/http_response_info.h" |
| 22 | #include "net/http/http_transaction.h" |
[email protected] | 8e6441ca | 2010-08-19 05:56:38 | [diff] [blame] | 23 | #include "net/http/stream_factory.h" |
[email protected] | 928fb58 | 2008-08-11 15:40:23 | [diff] [blame] | 24 | #include "net/proxy/proxy_service.h" |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 25 | |
| 26 | namespace net { |
| 27 | |
[email protected] | 8e6441ca | 2010-08-19 05:56:38 | [diff] [blame] | 28 | class HttpAuthController; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 29 | class HttpNetworkSession; |
[email protected] | 8d5a34e | 2009-06-11 21:21:36 | [diff] [blame] | 30 | class HttpStream; |
[email protected] | 4d4a516 | 2010-09-21 22:44:04 | [diff] [blame] | 31 | class HttpStreamRequest; |
[email protected] | 8e6441ca | 2010-08-19 05:56:38 | [diff] [blame] | 32 | class IOBuffer; |
[email protected] | 82918cc | 2010-08-25 17:24:50 | [diff] [blame] | 33 | struct HttpRequestInfo; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 34 | |
[email protected] | 8e6441ca | 2010-08-19 05:56:38 | [diff] [blame] | 35 | class HttpNetworkTransaction : public HttpTransaction, |
[email protected] | 2681688 | 2010-10-14 18:03:09 | [diff] [blame] | 36 | public StreamRequest::Delegate { |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 37 | public: |
[email protected] | 5695b8c | 2009-09-30 21:36:43 | [diff] [blame] | 38 | explicit HttpNetworkTransaction(HttpNetworkSession* session); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 39 | |
[email protected] | af4876d | 2008-10-21 23:10:57 | [diff] [blame] | 40 | virtual ~HttpNetworkTransaction(); |
| 41 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 42 | // HttpTransaction methods: |
[email protected] | 684970b | 2009-08-14 04:54:46 | [diff] [blame] | 43 | virtual int Start(const HttpRequestInfo* request_info, |
| 44 | CompletionCallback* callback, |
[email protected] | 9e743cd | 2010-03-16 07:03:53 | [diff] [blame] | 45 | const BoundNetLog& net_log); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 46 | virtual int RestartIgnoringLastError(CompletionCallback* callback); |
[email protected] | 0b45559b | 2009-06-12 21:45:11 | [diff] [blame] | 47 | virtual int RestartWithCertificate(X509Certificate* client_cert, |
| 48 | CompletionCallback* callback); |
[email protected] | 13c8a09 | 2010-07-29 06:15:44 | [diff] [blame] | 49 | virtual int RestartWithAuth(const string16& username, |
| 50 | const string16& password, |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 51 | CompletionCallback* callback); |
[email protected] | 8e6441ca | 2010-08-19 05:56:38 | [diff] [blame] | 52 | virtual bool IsReadyToRestartForAuth(); |
[email protected] | 0757e770 | 2009-03-27 04:00:22 | [diff] [blame] | 53 | |
[email protected] | 9dea9e1f | 2009-01-29 00:30:47 | [diff] [blame] | 54 | virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); |
[email protected] | 9dd90e5 | 2010-02-23 19:15:01 | [diff] [blame] | 55 | virtual void StopCaching() {} |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 56 | virtual const HttpResponseInfo* GetResponseInfo() const; |
| 57 | virtual LoadState GetLoadState() const; |
| 58 | virtual uint64 GetUploadProgress() const; |
| 59 | |
[email protected] | 2681688 | 2010-10-14 18:03:09 | [diff] [blame] | 60 | // StreamRequest::Delegate methods: |
[email protected] | 4d4a516 | 2010-09-21 22:44:04 | [diff] [blame] | 61 | virtual void OnStreamReady(HttpStream* stream); |
[email protected] | 8e6441ca | 2010-08-19 05:56:38 | [diff] [blame] | 62 | virtual void OnStreamFailed(int status); |
| 63 | virtual void OnCertificateError(int status, const SSLInfo& ssl_info); |
| 64 | virtual void OnNeedsProxyAuth( |
[email protected] | 6dc476da | 2010-09-01 04:43:50 | [diff] [blame] | 65 | const HttpResponseInfo& response_info, |
| 66 | HttpAuthController* auth_controller); |
| 67 | virtual void OnNeedsClientAuth(SSLCertRequestInfo* cert_info); |
[email protected] | 511f6f5 | 2010-12-17 03:58:29 | [diff] [blame] | 68 | virtual void OnHttpsProxyTunnelResponse(const HttpResponseInfo& response_info, |
| 69 | HttpStream* stream); |
[email protected] | 8e6441ca | 2010-08-19 05:56:38 | [diff] [blame] | 70 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 71 | private: |
[email protected] | 8822f38 | 2010-07-30 21:49:03 | [diff] [blame] | 72 | FRIEND_TEST_ALL_PREFIXES(HttpNetworkTransactionTest, ResetStateForRestart); |
[email protected] | 6abf537 | 2010-08-17 15:44:25 | [diff] [blame] | 73 | FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateReceived); |
[email protected] | 450c502 | 2010-08-26 02:38:28 | [diff] [blame] | 74 | FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateSent); |
[email protected] | 31024059 | 2010-08-05 21:04:19 | [diff] [blame] | 75 | FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, WindowUpdateOverflow); |
| 76 | FRIEND_TEST_ALL_PREFIXES(SpdyNetworkTransactionTest, FlowControlStallResume); |
[email protected] | 89ceba9a | 2009-03-21 03:46:06 | [diff] [blame] | 77 | |
[email protected] | d207a5f | 2009-06-04 05:28:40 | [diff] [blame] | 78 | enum State { |
[email protected] | 82918cc | 2010-08-25 17:24:50 | [diff] [blame] | 79 | STATE_CREATE_STREAM, |
| 80 | STATE_CREATE_STREAM_COMPLETE, |
[email protected] | 351ab64 | 2010-08-05 16:55:31 | [diff] [blame] | 81 | STATE_INIT_STREAM, |
| 82 | STATE_INIT_STREAM_COMPLETE, |
[email protected] | 044de064 | 2010-06-17 10:42:15 | [diff] [blame] | 83 | STATE_GENERATE_PROXY_AUTH_TOKEN, |
| 84 | STATE_GENERATE_PROXY_AUTH_TOKEN_COMPLETE, |
| 85 | STATE_GENERATE_SERVER_AUTH_TOKEN, |
| 86 | STATE_GENERATE_SERVER_AUTH_TOKEN_COMPLETE, |
[email protected] | 0877e3d | 2009-10-17 22:29:57 | [diff] [blame] | 87 | STATE_SEND_REQUEST, |
| 88 | STATE_SEND_REQUEST_COMPLETE, |
[email protected] | d207a5f | 2009-06-04 05:28:40 | [diff] [blame] | 89 | STATE_READ_HEADERS, |
| 90 | STATE_READ_HEADERS_COMPLETE, |
| 91 | STATE_READ_BODY, |
| 92 | STATE_READ_BODY_COMPLETE, |
| 93 | STATE_DRAIN_BODY_FOR_AUTH_RESTART, |
| 94 | STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE, |
| 95 | STATE_NONE |
| 96 | }; |
| 97 | |
[email protected] | 8e6441ca | 2010-08-19 05:56:38 | [diff] [blame] | 98 | bool is_https_request() const; |
[email protected] | 564b491 | 2010-03-09 16:30:42 | [diff] [blame] | 99 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 100 | void DoCallback(int result); |
| 101 | void OnIOComplete(int result); |
| 102 | |
| 103 | // Runs the state transition loop. |
| 104 | int DoLoop(int result); |
| 105 | |
| 106 | // Each of these methods corresponds to a State value. Those with an input |
| 107 | // argument receive the result from the previous state. If a method returns |
| 108 | // ERR_IO_PENDING, then the result from OnIOComplete will be passed to the |
| 109 | // next state method as the result arg. |
[email protected] | 82918cc | 2010-08-25 17:24:50 | [diff] [blame] | 110 | int DoCreateStream(); |
| 111 | int DoCreateStreamComplete(int result); |
[email protected] | 351ab64 | 2010-08-05 16:55:31 | [diff] [blame] | 112 | int DoInitStream(); |
| 113 | int DoInitStreamComplete(int result); |
[email protected] | 044de064 | 2010-06-17 10:42:15 | [diff] [blame] | 114 | int DoGenerateProxyAuthToken(); |
| 115 | int DoGenerateProxyAuthTokenComplete(int result); |
| 116 | int DoGenerateServerAuthToken(); |
| 117 | int DoGenerateServerAuthTokenComplete(int result); |
[email protected] | 0877e3d | 2009-10-17 22:29:57 | [diff] [blame] | 118 | int DoSendRequest(); |
| 119 | int DoSendRequestComplete(int result); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 120 | int DoReadHeaders(); |
| 121 | int DoReadHeadersComplete(int result); |
| 122 | int DoReadBody(); |
| 123 | int DoReadBodyComplete(int result); |
[email protected] | 2d2697f9 | 2009-02-18 21:00:32 | [diff] [blame] | 124 | int DoDrainBodyForAuthRestart(); |
| 125 | int DoDrainBodyForAuthRestartComplete(int result); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 126 | |
[email protected] | 9a0a55f | 2009-04-13 23:23:03 | [diff] [blame] | 127 | // Record histogram of time until first byte of header is received. |
[email protected] | 8e3d2d3 | 2010-06-13 18:46:23 | [diff] [blame] | 128 | void LogTransactionConnectedMetrics(); |
[email protected] | 9a0a55f | 2009-04-13 23:23:03 | [diff] [blame] | 129 | |
| 130 | // Record histogram of latency (durations until last byte received). |
[email protected] | 5630017 | 2008-11-06 18:42:55 | [diff] [blame] | 131 | void LogTransactionMetrics() const; |
| 132 | |
[email protected] | 9f9f86c | 2009-03-12 22:32:42 | [diff] [blame] | 133 | // Writes a log message to help debugging in the field when we block a proxy |
| 134 | // response to a CONNECT request. |
[email protected] | af89ba6 | 2009-03-16 20:26:38 | [diff] [blame] | 135 | void LogBlockedTunnelResponse(int response_code) const; |
[email protected] | 9f9f86c | 2009-03-12 22:32:42 | [diff] [blame] | 136 | |
[email protected] | 0b45559b | 2009-06-12 21:45:11 | [diff] [blame] | 137 | // Called to handle a client certificate request. |
[email protected] | 5e36396 | 2009-06-19 19:57:01 | [diff] [blame] | 138 | int HandleCertificateRequest(int error); |
[email protected] | 0b45559b | 2009-06-12 21:45:11 | [diff] [blame] | 139 | |
[email protected] | bd0b677 | 2011-01-11 19:59:30 | [diff] [blame^] | 140 | // Called to possibly recover from an SSL handshake error. Sets next_state_ |
| 141 | // and returns OK if recovering from the error. Otherwise, the same error |
| 142 | // code is returned. |
| 143 | int HandleSSLHandshakeError(int error); |
| 144 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 145 | // Called to possibly recover from the given error. Sets next_state_ and |
| 146 | // returns OK if recovering from the error. Otherwise, the same error code |
| 147 | // is returned. |
| 148 | int HandleIOError(int error); |
| 149 | |
[email protected] | 0877e3d | 2009-10-17 22:29:57 | [diff] [blame] | 150 | // Gets the response headers from the HttpStream. |
| 151 | HttpResponseHeaders* GetResponseHeaders() const; |
| 152 | |
[email protected] | 1c773ea1 | 2009-04-28 19:58:42 | [diff] [blame] | 153 | // Called when we reached EOF or got an error. Returns true if we should |
[email protected] | a19f1c60 | 2009-08-24 21:35:28 | [diff] [blame] | 154 | // resend the request. |error| is OK when we reached EOF. |
| 155 | bool ShouldResendRequest(int error) const; |
[email protected] | 1c773ea1 | 2009-04-28 19:58:42 | [diff] [blame] | 156 | |
| 157 | // Resets the connection and the request headers for resend. Called when |
| 158 | // ShouldResendRequest() is true. |
| 159 | void ResetConnectionAndRequestForResend(); |
[email protected] | 2a5c76b | 2008-09-25 22:15:16 | [diff] [blame] | 160 | |
[email protected] | aecfbf2 | 2008-10-16 02:02:47 | [diff] [blame] | 161 | // Decides the policy when the connection is closed before the end of headers |
[email protected] | 0e75a73 | 2008-10-16 20:36:09 | [diff] [blame] | 162 | // has been read. This only applies to reading responses, and not writing |
| 163 | // requests. |
| 164 | int HandleConnectionClosedBeforeEndOfHeaders(); |
[email protected] | aecfbf2 | 2008-10-16 02:02:47 | [diff] [blame] | 165 | |
[email protected] | f9ee6b5 | 2008-11-08 06:46:23 | [diff] [blame] | 166 | // Sets up the state machine to restart the transaction with auth. |
| 167 | void PrepareForAuthRestart(HttpAuth::Target target); |
| 168 | |
[email protected] | 2d2697f9 | 2009-02-18 21:00:32 | [diff] [blame] | 169 | // Called when we don't need to drain the response body or have drained it. |
| 170 | // Resets |connection_| unless |keep_alive| is true, then calls |
| 171 | // ResetStateForRestart. Sets |next_state_| appropriately. |
| 172 | void DidDrainBodyForAuthRestart(bool keep_alive); |
| 173 | |
[email protected] | f9ee6b5 | 2008-11-08 06:46:23 | [diff] [blame] | 174 | // Resets the members of the transaction so it can be restarted. |
[email protected] | c3b35c2 | 2008-09-27 03:19:42 | [diff] [blame] | 175 | void ResetStateForRestart(); |
| 176 | |
[email protected] | 697ef4c | 2010-10-14 16:38:58 | [diff] [blame] | 177 | // Resets the members of the transaction, except |stream_|, which needs |
| 178 | // to be maintained for multi-round auth. |
| 179 | void ResetStateForAuthRestart(); |
| 180 | |
[email protected] | 1c773ea1 | 2009-04-28 19:58:42 | [diff] [blame] | 181 | // Returns true if we should try to add a Proxy-Authorization header |
| 182 | bool ShouldApplyProxyAuth() const; |
[email protected] | c3b35c2 | 2008-09-27 03:19:42 | [diff] [blame] | 183 | |
[email protected] | 1c773ea1 | 2009-04-28 19:58:42 | [diff] [blame] | 184 | // Returns true if we should try to add an Authorization header. |
| 185 | bool ShouldApplyServerAuth() const; |
| 186 | |
[email protected] | f9ee6b5 | 2008-11-08 06:46:23 | [diff] [blame] | 187 | // Handles HTTP status code 401 or 407. |
[email protected] | 0757e770 | 2009-03-27 04:00:22 | [diff] [blame] | 188 | // HandleAuthChallenge() returns a network error code, or OK on success. |
| 189 | // May update |pending_auth_target_| or |response_.auth_challenge|. |
[email protected] | e772db3f | 2010-07-12 18:11:13 | [diff] [blame] | 190 | int HandleAuthChallenge(); |
[email protected] | f9ee6b5 | 2008-11-08 06:46:23 | [diff] [blame] | 191 | |
[email protected] | 8e6441ca | 2010-08-19 05:56:38 | [diff] [blame] | 192 | // Returns true if we have auth credentials for the given target. |
| 193 | bool HaveAuth(HttpAuth::Target target) const; |
[email protected] | c3b35c2 | 2008-09-27 03:19:42 | [diff] [blame] | 194 | |
[email protected] | 228404f | 2010-06-24 04:31:41 | [diff] [blame] | 195 | // Get the {scheme, host, path, port} for the authentication target |
| 196 | GURL AuthURL(HttpAuth::Target target) const; |
[email protected] | 044de064 | 2010-06-17 10:42:15 | [diff] [blame] | 197 | |
[email protected] | aef0427 | 2010-06-28 18:03:04 | [diff] [blame] | 198 | // Debug helper. |
| 199 | static std::string DescribeState(State state); |
| 200 | |
[email protected] | e772db3f | 2010-07-12 18:11:13 | [diff] [blame] | 201 | scoped_refptr<HttpAuthController> |
| 202 | auth_controllers_[HttpAuth::AUTH_NUM_TARGETS]; |
[email protected] | c3b35c2 | 2008-09-27 03:19:42 | [diff] [blame] | 203 | |
[email protected] | 0757e770 | 2009-03-27 04:00:22 | [diff] [blame] | 204 | // Whether this transaction is waiting for proxy auth, server auth, or is |
| 205 | // not waiting for any auth at all. |pending_auth_target_| is read and |
| 206 | // cleared by RestartWithAuth(). |
| 207 | HttpAuth::Target pending_auth_target_; |
| 208 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 209 | CompletionCallbackImpl<HttpNetworkTransaction> io_callback_; |
| 210 | CompletionCallback* user_callback_; |
| 211 | |
| 212 | scoped_refptr<HttpNetworkSession> session_; |
| 213 | |
[email protected] | 9e743cd | 2010-03-16 07:03:53 | [diff] [blame] | 214 | BoundNetLog net_log_; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 215 | const HttpRequestInfo* request_; |
[email protected] | a7e4131 | 2009-12-16 23:18:14 | [diff] [blame] | 216 | HttpResponseInfo response_; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 217 | |
[email protected] | 928fb58 | 2008-08-11 15:40:23 | [diff] [blame] | 218 | ProxyInfo proxy_info_; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 219 | |
[email protected] | 2681688 | 2010-10-14 18:03:09 | [diff] [blame] | 220 | scoped_ptr<StreamRequest> stream_request_; |
[email protected] | 4d4a516 | 2010-09-21 22:44:04 | [diff] [blame] | 221 | scoped_ptr<HttpStream> stream_; |
[email protected] | 8e6441ca | 2010-08-19 05:56:38 | [diff] [blame] | 222 | |
[email protected] | 0877e3d | 2009-10-17 22:29:57 | [diff] [blame] | 223 | // True if we've validated the headers that the stream parser has returned. |
| 224 | bool headers_valid_; |
| 225 | |
| 226 | // True if we've logged the time of the first response byte. Used to |
| 227 | // prevent logging across authentication activity where we see multiple |
| 228 | // responses. |
[email protected] | 8e3d2d3 | 2010-06-13 18:46:23 | [diff] [blame] | 229 | bool logged_response_time_; |
[email protected] | 0877e3d | 2009-10-17 22:29:57 | [diff] [blame] | 230 | |
[email protected] | aaead50 | 2008-10-15 00:20:11 | [diff] [blame] | 231 | SSLConfig ssl_config_; |
[email protected] | c5949a3 | 2008-10-08 17:28:23 | [diff] [blame] | 232 | |
[email protected] | b94f92d | 2010-10-27 16:45:20 | [diff] [blame] | 233 | HttpRequestHeaders request_headers_; |
[email protected] | 4ddaf250 | 2008-10-23 18:26:19 | [diff] [blame] | 234 | |
[email protected] | 2d2697f9 | 2009-02-18 21:00:32 | [diff] [blame] | 235 | // The size in bytes of the buffer we use to drain the response body that |
| 236 | // we want to throw away. The response body is typically a small error |
| 237 | // page just a few hundred bytes long. |
[email protected] | 81854c4 | 2010-09-22 03:39:36 | [diff] [blame] | 238 | static const int kDrainBodyBufferSize = 1024; |
[email protected] | 2d2697f9 | 2009-02-18 21:00:32 | [diff] [blame] | 239 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 240 | // User buffer and length passed to the Read method. |
[email protected] | 9dea9e1f | 2009-01-29 00:30:47 | [diff] [blame] | 241 | scoped_refptr<IOBuffer> read_buf_; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 242 | int read_buf_len_; |
| 243 | |
[email protected] | 21b316a | 2009-03-23 18:25:06 | [diff] [blame] | 244 | // The time the Start method was called. |
| 245 | base::Time start_time_; |
| 246 | |
[email protected] | d207a5f | 2009-06-04 05:28:40 | [diff] [blame] | 247 | // The next state in the state machine. |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 248 | State next_state_; |
[email protected] | 2ff8b31 | 2010-04-26 22:20:54 | [diff] [blame] | 249 | |
[email protected] | a7ea883 | 2010-07-12 17:54:54 | [diff] [blame] | 250 | // True when the tunnel is in the process of being established - we can't |
| 251 | // read from the socket until the tunnel is done. |
| 252 | bool establishing_tunnel_; |
| 253 | |
[email protected] | 2ff8b31 | 2010-04-26 22:20:54 | [diff] [blame] | 254 | DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 255 | }; |
| 256 | |
[email protected] | c9c6f5c | 2010-07-31 01:30:03 | [diff] [blame] | 257 | int ConvertRequestPriorityToSpdyPriority(RequestPriority priority); |
| 258 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 259 | } // namespace net |
| 260 | |
| 261 | #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |