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_STREAM_FACTORY_IMPL_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ |
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // is true. | 42 // is true. |
43 HttpStreamFactoryImpl(HttpNetworkSession* session, bool for_websockets); | 43 HttpStreamFactoryImpl(HttpNetworkSession* session, bool for_websockets); |
44 ~HttpStreamFactoryImpl() override; | 44 ~HttpStreamFactoryImpl() override; |
45 | 45 |
46 // HttpStreamFactory interface | 46 // HttpStreamFactory interface |
47 HttpStreamRequest* RequestStream(const HttpRequestInfo& info, | 47 HttpStreamRequest* RequestStream(const HttpRequestInfo& info, |
48 RequestPriority priority, | 48 RequestPriority priority, |
49 const SSLConfig& server_ssl_config, | 49 const SSLConfig& server_ssl_config, |
50 const SSLConfig& proxy_ssl_config, | 50 const SSLConfig& proxy_ssl_config, |
51 HttpStreamRequest::Delegate* delegate, | 51 HttpStreamRequest::Delegate* delegate, |
| 52 bool enable_ip_based_pooling, |
52 const NetLogWithSource& net_log) override; | 53 const NetLogWithSource& net_log) override; |
53 | 54 |
54 HttpStreamRequest* RequestWebSocketHandshakeStream( | 55 HttpStreamRequest* RequestWebSocketHandshakeStream( |
55 const HttpRequestInfo& info, | 56 const HttpRequestInfo& info, |
56 RequestPriority priority, | 57 RequestPriority priority, |
57 const SSLConfig& server_ssl_config, | 58 const SSLConfig& server_ssl_config, |
58 const SSLConfig& proxy_ssl_config, | 59 const SSLConfig& proxy_ssl_config, |
59 HttpStreamRequest::Delegate* delegate, | 60 HttpStreamRequest::Delegate* delegate, |
60 WebSocketHandshakeStreamBase::CreateHelper* create_helper, | 61 WebSocketHandshakeStreamBase::CreateHelper* create_helper, |
| 62 bool enable_ip_based_pooling, |
61 const NetLogWithSource& net_log) override; | 63 const NetLogWithSource& net_log) override; |
62 | 64 |
63 HttpStreamRequest* RequestBidirectionalStreamImpl( | 65 HttpStreamRequest* RequestBidirectionalStreamImpl( |
64 const HttpRequestInfo& info, | 66 const HttpRequestInfo& info, |
65 RequestPriority priority, | 67 RequestPriority priority, |
66 const SSLConfig& server_ssl_config, | 68 const SSLConfig& server_ssl_config, |
67 const SSLConfig& proxy_ssl_config, | 69 const SSLConfig& proxy_ssl_config, |
68 HttpStreamRequest::Delegate* delegate, | 70 HttpStreamRequest::Delegate* delegate, |
| 71 bool enable_ip_based_pooling, |
69 const NetLogWithSource& net_log) override; | 72 const NetLogWithSource& net_log) override; |
70 | 73 |
71 void PreconnectStreams(int num_streams, const HttpRequestInfo& info) override; | 74 void PreconnectStreams(int num_streams, const HttpRequestInfo& info) override; |
72 const HostMappingRules* GetHostMappingRules() const override; | 75 const HostMappingRules* GetHostMappingRules() const override; |
73 void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd, | 76 void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd, |
74 const std::string& parent_absolute_name) const override; | 77 const std::string& parent_absolute_name) const override; |
75 | 78 |
76 enum JobType { | 79 enum JobType { |
77 MAIN, | 80 MAIN, |
78 ALTERNATIVE, | 81 ALTERNATIVE, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 }; | 118 }; |
116 | 119 |
117 HttpStreamRequest* RequestStreamInternal( | 120 HttpStreamRequest* RequestStreamInternal( |
118 const HttpRequestInfo& info, | 121 const HttpRequestInfo& info, |
119 RequestPriority priority, | 122 RequestPriority priority, |
120 const SSLConfig& server_ssl_config, | 123 const SSLConfig& server_ssl_config, |
121 const SSLConfig& proxy_ssl_config, | 124 const SSLConfig& proxy_ssl_config, |
122 HttpStreamRequest::Delegate* delegate, | 125 HttpStreamRequest::Delegate* delegate, |
123 WebSocketHandshakeStreamBase::CreateHelper* create_helper, | 126 WebSocketHandshakeStreamBase::CreateHelper* create_helper, |
124 HttpStreamRequest::StreamType stream_type, | 127 HttpStreamRequest::StreamType stream_type, |
| 128 bool enable_ip_based_pooling, |
125 const NetLogWithSource& net_log); | 129 const NetLogWithSource& net_log); |
126 | 130 |
127 // Called when a SpdySession is ready. It will find appropriate Requests and | 131 // Called when a SpdySession is ready. It will find appropriate Requests and |
128 // fulfill them. |direct| indicates whether or not |spdy_session| uses a | 132 // fulfill them. |direct| indicates whether or not |spdy_session| uses a |
129 // proxy. | 133 // proxy. |
130 void OnNewSpdySessionReady(const base::WeakPtr<SpdySession>& spdy_session, | 134 void OnNewSpdySessionReady(const base::WeakPtr<SpdySession>& spdy_session, |
131 bool direct, | 135 bool direct, |
132 const SSLConfig& used_ssl_config, | 136 const SSLConfig& used_ssl_config, |
133 const ProxyInfo& used_proxy_info, | 137 const ProxyInfo& used_proxy_info, |
134 bool was_alpn_negotiated, | 138 bool was_alpn_negotiated, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 SpdySessionRequestMap spdy_session_request_map_; | 191 SpdySessionRequestMap spdy_session_request_map_; |
188 | 192 |
189 const bool for_websockets_; | 193 const bool for_websockets_; |
190 | 194 |
191 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); | 195 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); |
192 }; | 196 }; |
193 | 197 |
194 } // namespace net | 198 } // namespace net |
195 | 199 |
196 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ | 200 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ |
OLD | NEW |