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