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_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_H_ |
6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 // Virtual interface methods. | 201 // Virtual interface methods. |
202 | 202 |
203 // Request a stream. | 203 // Request a stream. |
204 // Will call delegate->OnStreamReady on successful completion. | 204 // Will call delegate->OnStreamReady on successful completion. |
205 virtual HttpStreamRequest* RequestStream( | 205 virtual HttpStreamRequest* RequestStream( |
206 const HttpRequestInfo& info, | 206 const HttpRequestInfo& info, |
207 RequestPriority priority, | 207 RequestPriority priority, |
208 const SSLConfig& server_ssl_config, | 208 const SSLConfig& server_ssl_config, |
209 const SSLConfig& proxy_ssl_config, | 209 const SSLConfig& proxy_ssl_config, |
210 HttpStreamRequest::Delegate* delegate, | 210 HttpStreamRequest::Delegate* delegate, |
| 211 bool enable_ip_based_pooling, |
211 const NetLogWithSource& net_log) = 0; | 212 const NetLogWithSource& net_log) = 0; |
212 | 213 |
213 // Request a WebSocket handshake stream. | 214 // Request a WebSocket handshake stream. |
214 // Will call delegate->OnWebSocketHandshakeStreamReady on successful | 215 // Will call delegate->OnWebSocketHandshakeStreamReady on successful |
215 // completion. | 216 // completion. |
216 virtual HttpStreamRequest* RequestWebSocketHandshakeStream( | 217 virtual HttpStreamRequest* RequestWebSocketHandshakeStream( |
217 const HttpRequestInfo& info, | 218 const HttpRequestInfo& info, |
218 RequestPriority priority, | 219 RequestPriority priority, |
219 const SSLConfig& server_ssl_config, | 220 const SSLConfig& server_ssl_config, |
220 const SSLConfig& proxy_ssl_config, | 221 const SSLConfig& proxy_ssl_config, |
221 HttpStreamRequest::Delegate* delegate, | 222 HttpStreamRequest::Delegate* delegate, |
222 WebSocketHandshakeStreamBase::CreateHelper* create_helper, | 223 WebSocketHandshakeStreamBase::CreateHelper* create_helper, |
| 224 bool enable_ip_based_pooling, |
223 const NetLogWithSource& net_log) = 0; | 225 const NetLogWithSource& net_log) = 0; |
224 | 226 |
225 // Request a BidirectionalStreamImpl. | 227 // Request a BidirectionalStreamImpl. |
226 // Will call delegate->OnBidirectionalStreamImplReady on successful | 228 // Will call delegate->OnBidirectionalStreamImplReady on successful |
227 // completion. | 229 // completion. |
228 virtual HttpStreamRequest* RequestBidirectionalStreamImpl( | 230 virtual HttpStreamRequest* RequestBidirectionalStreamImpl( |
229 const HttpRequestInfo& info, | 231 const HttpRequestInfo& info, |
230 RequestPriority priority, | 232 RequestPriority priority, |
231 const SSLConfig& server_ssl_config, | 233 const SSLConfig& server_ssl_config, |
232 const SSLConfig& proxy_ssl_config, | 234 const SSLConfig& proxy_ssl_config, |
233 HttpStreamRequest::Delegate* delegate, | 235 HttpStreamRequest::Delegate* delegate, |
| 236 bool enable_ip_based_pooling, |
234 const NetLogWithSource& net_log) = 0; | 237 const NetLogWithSource& net_log) = 0; |
235 | 238 |
236 // Requests that enough connections for |num_streams| be opened. | 239 // Requests that enough connections for |num_streams| be opened. |
237 virtual void PreconnectStreams(int num_streams, | 240 virtual void PreconnectStreams(int num_streams, |
238 const HttpRequestInfo& info) = 0; | 241 const HttpRequestInfo& info) = 0; |
239 | 242 |
240 virtual const HostMappingRules* GetHostMappingRules() const = 0; | 243 virtual const HostMappingRules* GetHostMappingRules() const = 0; |
241 | 244 |
242 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name | 245 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name |
243 // used by the parent MemoryAllocatorDump in the memory dump hierarchy. | 246 // used by the parent MemoryAllocatorDump in the memory dump hierarchy. |
244 virtual void DumpMemoryStats( | 247 virtual void DumpMemoryStats( |
245 base::trace_event::ProcessMemoryDump* pmd, | 248 base::trace_event::ProcessMemoryDump* pmd, |
246 const std::string& parent_absolute_name) const = 0; | 249 const std::string& parent_absolute_name) const = 0; |
247 | 250 |
248 protected: | 251 protected: |
249 HttpStreamFactory(); | 252 HttpStreamFactory(); |
250 | 253 |
251 private: | 254 private: |
252 url::SchemeHostPort RewriteHost(const url::SchemeHostPort& server); | 255 url::SchemeHostPort RewriteHost(const url::SchemeHostPort& server); |
253 | 256 |
254 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 257 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
255 }; | 258 }; |
256 | 259 |
257 } // namespace net | 260 } // namespace net |
258 | 261 |
259 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 262 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
OLD | NEW |