| 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 #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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 enum State { | 147 enum State { |
| 148 STATE_NOTIFY_BEFORE_CREATE_STREAM, | 148 STATE_NOTIFY_BEFORE_CREATE_STREAM, |
| 149 STATE_CREATE_STREAM, | 149 STATE_CREATE_STREAM, |
| 150 STATE_CREATE_STREAM_COMPLETE, | 150 STATE_CREATE_STREAM_COMPLETE, |
| 151 STATE_INIT_STREAM, | 151 STATE_INIT_STREAM, |
| 152 STATE_INIT_STREAM_COMPLETE, | 152 STATE_INIT_STREAM_COMPLETE, |
| 153 STATE_GENERATE_PROXY_AUTH_TOKEN, | 153 STATE_GENERATE_PROXY_AUTH_TOKEN, |
| 154 STATE_GENERATE_PROXY_AUTH_TOKEN_COMPLETE, | 154 STATE_GENERATE_PROXY_AUTH_TOKEN_COMPLETE, |
| 155 STATE_GENERATE_SERVER_AUTH_TOKEN, | 155 STATE_GENERATE_SERVER_AUTH_TOKEN, |
| 156 STATE_GENERATE_SERVER_AUTH_TOKEN_COMPLETE, | 156 STATE_GENERATE_SERVER_AUTH_TOKEN_COMPLETE, |
| 157 STATE_GET_TOKEN_BINDING_KEY, | 157 STATE_GET_PROVIDED_TOKEN_BINDING_KEY, |
| 158 STATE_GET_TOKEN_BINDING_KEY_COMPLETE, | 158 STATE_GET_PROVIDED_TOKEN_BINDING_KEY_COMPLETE, |
| 159 STATE_GET_REFERRED_TOKEN_BINDING_KEY, |
| 160 STATE_GET_REFERRED_TOKEN_BINDING_KEY_COMPLETE, |
| 159 STATE_INIT_REQUEST_BODY, | 161 STATE_INIT_REQUEST_BODY, |
| 160 STATE_INIT_REQUEST_BODY_COMPLETE, | 162 STATE_INIT_REQUEST_BODY_COMPLETE, |
| 161 STATE_BUILD_REQUEST, | 163 STATE_BUILD_REQUEST, |
| 162 STATE_BUILD_REQUEST_COMPLETE, | 164 STATE_BUILD_REQUEST_COMPLETE, |
| 163 STATE_SEND_REQUEST, | 165 STATE_SEND_REQUEST, |
| 164 STATE_SEND_REQUEST_COMPLETE, | 166 STATE_SEND_REQUEST_COMPLETE, |
| 165 STATE_READ_HEADERS, | 167 STATE_READ_HEADERS, |
| 166 STATE_READ_HEADERS_COMPLETE, | 168 STATE_READ_HEADERS_COMPLETE, |
| 167 STATE_READ_BODY, | 169 STATE_READ_BODY, |
| 168 STATE_READ_BODY_COMPLETE, | 170 STATE_READ_BODY_COMPLETE, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 191 // next state method as the result arg. | 193 // next state method as the result arg. |
| 192 int DoNotifyBeforeCreateStream(); | 194 int DoNotifyBeforeCreateStream(); |
| 193 int DoCreateStream(); | 195 int DoCreateStream(); |
| 194 int DoCreateStreamComplete(int result); | 196 int DoCreateStreamComplete(int result); |
| 195 int DoInitStream(); | 197 int DoInitStream(); |
| 196 int DoInitStreamComplete(int result); | 198 int DoInitStreamComplete(int result); |
| 197 int DoGenerateProxyAuthToken(); | 199 int DoGenerateProxyAuthToken(); |
| 198 int DoGenerateProxyAuthTokenComplete(int result); | 200 int DoGenerateProxyAuthTokenComplete(int result); |
| 199 int DoGenerateServerAuthToken(); | 201 int DoGenerateServerAuthToken(); |
| 200 int DoGenerateServerAuthTokenComplete(int result); | 202 int DoGenerateServerAuthTokenComplete(int result); |
| 201 int DoGetTokenBindingKey(); | 203 int DoGetProvidedTokenBindingKey(); |
| 202 int DoGetTokenBindingKeyComplete(int result); | 204 int DoGetProvidedTokenBindingKeyComplete(int result); |
| 205 int DoGetReferredTokenBindingKey(); |
| 206 int DoGetReferredTokenBindingKeyComplete(int result); |
| 203 int DoInitRequestBody(); | 207 int DoInitRequestBody(); |
| 204 int DoInitRequestBodyComplete(int result); | 208 int DoInitRequestBodyComplete(int result); |
| 205 int DoBuildRequest(); | 209 int DoBuildRequest(); |
| 206 int DoBuildRequestComplete(int result); | 210 int DoBuildRequestComplete(int result); |
| 207 int DoSendRequest(); | 211 int DoSendRequest(); |
| 208 int DoSendRequestComplete(int result); | 212 int DoSendRequestComplete(int result); |
| 209 int DoReadHeaders(); | 213 int DoReadHeaders(); |
| 210 int DoReadHeadersComplete(int result); | 214 int DoReadHeadersComplete(int result); |
| 211 int DoReadBody(); | 215 int DoReadBody(); |
| 212 int DoReadBodyComplete(int result); | 216 int DoReadBodyComplete(int result); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 SSLFailureState server_ssl_failure_state_; | 337 SSLFailureState server_ssl_failure_state_; |
| 334 // fallback_error_code contains the error code that caused the last TLS | 338 // fallback_error_code contains the error code that caused the last TLS |
| 335 // fallback. If the fallback connection results in | 339 // fallback. If the fallback connection results in |
| 336 // ERR_SSL_INAPPROPRIATE_FALLBACK (i.e. the server indicated that the | 340 // ERR_SSL_INAPPROPRIATE_FALLBACK (i.e. the server indicated that the |
| 337 // fallback should not have been needed) then we use this value to return the | 341 // fallback should not have been needed) then we use this value to return the |
| 338 // original error that triggered the fallback. | 342 // original error that triggered the fallback. |
| 339 int fallback_error_code_; | 343 int fallback_error_code_; |
| 340 // The SSLFailureState which caused the last TLS version fallback. | 344 // The SSLFailureState which caused the last TLS version fallback. |
| 341 SSLFailureState fallback_failure_state_; | 345 SSLFailureState fallback_failure_state_; |
| 342 | 346 |
| 343 // Key to use for signing message in Token Binding header. | 347 // Keys to use for signing message in Token Binding header. |
| 344 scoped_ptr<crypto::ECPrivateKey> token_binding_key_; | 348 scoped_ptr<crypto::ECPrivateKey> provided_token_binding_key_; |
| 345 // Object to manage lookup of |token_binding_key_|. | 349 scoped_ptr<crypto::ECPrivateKey> referred_token_binding_key_; |
| 350 // Object to manage lookup of |provided_token_binding_key_| and |
| 351 // |referred_token_binding_key_|. |
| 346 ChannelIDService::Request token_binding_request_; | 352 ChannelIDService::Request token_binding_request_; |
| 347 | 353 |
| 348 HttpRequestHeaders request_headers_; | 354 HttpRequestHeaders request_headers_; |
| 349 | 355 |
| 350 // The size in bytes of the buffer we use to drain the response body that | 356 // The size in bytes of the buffer we use to drain the response body that |
| 351 // we want to throw away. The response body is typically a small error | 357 // we want to throw away. The response body is typically a small error |
| 352 // page just a few hundred bytes long. | 358 // page just a few hundred bytes long. |
| 353 static const int kDrainBodyBufferSize = 1024; | 359 static const int kDrainBodyBufferSize = 1024; |
| 354 | 360 |
| 355 // User buffer and length passed to the Read method. | 361 // User buffer and length passed to the Read method. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 ConnectionAttempts connection_attempts_; | 393 ConnectionAttempts connection_attempts_; |
| 388 IPEndPoint remote_endpoint_; | 394 IPEndPoint remote_endpoint_; |
| 389 // Network error details for this transaction. | 395 // Network error details for this transaction. |
| 390 NetErrorDetails net_error_details_; | 396 NetErrorDetails net_error_details_; |
| 391 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); | 397 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); |
| 392 }; | 398 }; |
| 393 | 399 |
| 394 } // namespace net | 400 } // namespace net |
| 395 | 401 |
| 396 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 402 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
| OLD | NEW |