| 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_PIPELINED_HOST_H_ | 5 #ifndef NET_HTTP_HTTP_PIPELINED_HOST_H_ |
| 6 #define NET_HTTP_HTTP_PIPELINED_HOST_H_ | 6 #define NET_HTTP_HTTP_PIPELINED_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "net/base/host_port_pair.h" | 9 #include "net/base/host_port_pair.h" |
| 10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 virtual ~HttpPipelinedHost() {} | 73 virtual ~HttpPipelinedHost() {} |
| 74 | 74 |
| 75 // Constructs a new pipeline on |connection| and returns a new | 75 // Constructs a new pipeline on |connection| and returns a new |
| 76 // HttpPipelinedStream that uses it. | 76 // HttpPipelinedStream that uses it. |
| 77 virtual HttpPipelinedStream* CreateStreamOnNewPipeline( | 77 virtual HttpPipelinedStream* CreateStreamOnNewPipeline( |
| 78 ClientSocketHandle* connection, | 78 ClientSocketHandle* connection, |
| 79 const SSLConfig& used_ssl_config, | 79 const SSLConfig& used_ssl_config, |
| 80 const ProxyInfo& used_proxy_info, | 80 const ProxyInfo& used_proxy_info, |
| 81 const BoundNetLog& net_log, | 81 const BoundNetLog& net_log, |
| 82 bool was_npn_negotiated, | 82 bool was_npn_negotiated, |
| 83 SSLClientSocket::NextProto protocol_negotiated) = 0; | 83 NextProto protocol_negotiated) = 0; |
| 84 | 84 |
| 85 // Tries to find an existing pipeline with capacity for a new request. If | 85 // Tries to find an existing pipeline with capacity for a new request. If |
| 86 // successful, returns a new stream on that pipeline. Otherwise, returns NULL. | 86 // successful, returns a new stream on that pipeline. Otherwise, returns NULL. |
| 87 virtual HttpPipelinedStream* CreateStreamOnExistingPipeline() = 0; | 87 virtual HttpPipelinedStream* CreateStreamOnExistingPipeline() = 0; |
| 88 | 88 |
| 89 // Returns true if we have a pipelined connection that can accept new | 89 // Returns true if we have a pipelined connection that can accept new |
| 90 // requests. | 90 // requests. |
| 91 virtual bool IsExistingPipelineAvailable() const = 0; | 91 virtual bool IsExistingPipelineAvailable() const = 0; |
| 92 | 92 |
| 93 // Returns a Key that uniquely identifies this host. | 93 // Returns a Key that uniquely identifies this host. |
| 94 virtual const Key& GetKey() const = 0; | 94 virtual const Key& GetKey() const = 0; |
| 95 | 95 |
| 96 // Creates a Value summary of this host's pipelines. Caller assumes | 96 // Creates a Value summary of this host's pipelines. Caller assumes |
| 97 // ownership of the returned Value. | 97 // ownership of the returned Value. |
| 98 virtual base::Value* PipelineInfoToValue() const = 0; | 98 virtual base::Value* PipelineInfoToValue() const = 0; |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 } // namespace net | 101 } // namespace net |
| 102 | 102 |
| 103 #endif // NET_HTTP_HTTP_PIPELINED_HOST_H_ | 103 #endif // NET_HTTP_HTTP_PIPELINED_HOST_H_ |
| OLD | NEW |