| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PIPELINED_CONNECTION_IMPL_H_ | 5 #ifndef NET_HTTP_HTTP_PIPELINED_CONNECTION_IMPL_H_ |
| 6 #define NET_HTTP_HTTP_PIPELINED_CONNECTION_IMPL_H_ | 6 #define NET_HTTP_HTTP_PIPELINED_CONNECTION_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // This class manages all of the state for a single pipelined connection. It | 39 // This class manages all of the state for a single pipelined connection. It |
| 40 // tracks the order that HTTP requests are sent and enforces that the | 40 // tracks the order that HTTP requests are sent and enforces that the |
| 41 // subsequent reads occur in the appropriate order. | 41 // subsequent reads occur in the appropriate order. |
| 42 // | 42 // |
| 43 // If an error occurs related to pipelining, ERR_PIPELINE_EVICTION will be | 43 // If an error occurs related to pipelining, ERR_PIPELINE_EVICTION will be |
| 44 // returned to the client. This indicates the client should retry the request | 44 // returned to the client. This indicates the client should retry the request |
| 45 // without pipelining. | 45 // without pipelining. |
| 46 class NET_EXPORT_PRIVATE HttpPipelinedConnectionImpl | 46 class NET_EXPORT_PRIVATE HttpPipelinedConnectionImpl |
| 47 : public HttpPipelinedConnection { | 47 : public HttpPipelinedConnection { |
| 48 public: | 48 public: |
| 49 class Factory : public HttpPipelinedConnection::Factory { |
| 50 public: |
| 51 virtual HttpPipelinedConnection* CreateNewPipeline( |
| 52 ClientSocketHandle* connection, |
| 53 HttpPipelinedConnection::Delegate* delegate, |
| 54 const HostPortPair& origin, |
| 55 const SSLConfig& used_ssl_config, |
| 56 const ProxyInfo& used_proxy_info, |
| 57 const BoundNetLog& net_log, |
| 58 bool was_npn_negotiated, |
| 59 SSLClientSocket::NextProto protocol_negotiated) OVERRIDE { |
| 60 return new HttpPipelinedConnectionImpl(connection, delegate, origin, |
| 61 used_ssl_config, used_proxy_info, |
| 62 net_log, was_npn_negotiated, |
| 63 protocol_negotiated); |
| 64 } |
| 65 }; |
| 66 |
| 49 HttpPipelinedConnectionImpl(ClientSocketHandle* connection, | 67 HttpPipelinedConnectionImpl(ClientSocketHandle* connection, |
| 50 Delegate* delegate, | 68 Delegate* delegate, |
| 51 const HostPortPair& origin, | 69 const HostPortPair& origin, |
| 52 const SSLConfig& used_ssl_config, | 70 const SSLConfig& used_ssl_config, |
| 53 const ProxyInfo& used_proxy_info, | 71 const ProxyInfo& used_proxy_info, |
| 54 const BoundNetLog& net_log, | 72 const BoundNetLog& net_log, |
| 55 bool was_npn_negotiated, | 73 bool was_npn_negotiated, |
| 56 SSLClientSocket::NextProto protocol_negotiated); | 74 SSLClientSocket::NextProto protocol_negotiated); |
| 57 virtual ~HttpPipelinedConnectionImpl(); | 75 virtual ~HttpPipelinedConnectionImpl(); |
| 58 | 76 |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 ReadHeadersState read_next_state_; | 327 ReadHeadersState read_next_state_; |
| 310 int active_read_id_; | 328 int active_read_id_; |
| 311 bool read_still_on_call_stack_; | 329 bool read_still_on_call_stack_; |
| 312 | 330 |
| 313 DISALLOW_COPY_AND_ASSIGN(HttpPipelinedConnectionImpl); | 331 DISALLOW_COPY_AND_ASSIGN(HttpPipelinedConnectionImpl); |
| 314 }; | 332 }; |
| 315 | 333 |
| 316 } // namespace net | 334 } // namespace net |
| 317 | 335 |
| 318 #endif // NET_HTTP_HTTP_PIPELINED_CONNECTION_IMPL_H_ | 336 #endif // NET_HTTP_HTTP_PIPELINED_CONNECTION_IMPL_H_ |
| OLD | NEW |