| 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 <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 const HttpRequestInfo& info, | 35 const HttpRequestInfo& info, |
| 36 const SSLConfig& server_ssl_config, | 36 const SSLConfig& server_ssl_config, |
| 37 const SSLConfig& proxy_ssl_config, | 37 const SSLConfig& proxy_ssl_config, |
| 38 HttpStreamRequest::Delegate* delegate, | 38 HttpStreamRequest::Delegate* delegate, |
| 39 const BoundNetLog& net_log) OVERRIDE; | 39 const BoundNetLog& net_log) OVERRIDE; |
| 40 | 40 |
| 41 virtual void PreconnectStreams(int num_streams, | 41 virtual void PreconnectStreams(int num_streams, |
| 42 const HttpRequestInfo& info, | 42 const HttpRequestInfo& info, |
| 43 const SSLConfig& server_ssl_config, | 43 const SSLConfig& server_ssl_config, |
| 44 const SSLConfig& proxy_ssl_config) OVERRIDE; | 44 const SSLConfig& proxy_ssl_config) OVERRIDE; |
| 45 virtual void AddTLSIntolerantServer(const HostPortPair& server) OVERRIDE; | |
| 46 virtual bool IsTLSIntolerantServer(const HostPortPair& server) const OVERRIDE; | |
| 47 virtual base::Value* PipelineInfoToValue() const OVERRIDE; | 45 virtual base::Value* PipelineInfoToValue() const OVERRIDE; |
| 48 | 46 |
| 49 // HttpPipelinedHostPool::Delegate interface | 47 // HttpPipelinedHostPool::Delegate interface |
| 50 virtual void OnHttpPipelinedHostHasAdditionalCapacity( | 48 virtual void OnHttpPipelinedHostHasAdditionalCapacity( |
| 51 HttpPipelinedHost* host) OVERRIDE; | 49 HttpPipelinedHost* host) OVERRIDE; |
| 52 | 50 |
| 53 private: | 51 private: |
| 54 class Request; | 52 class Request; |
| 55 class Job; | 53 class Job; |
| 56 | 54 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // Called when the Preconnect completes. Used for testing. | 90 // Called when the Preconnect completes. Used for testing. |
| 93 virtual void OnPreconnectsCompleteInternal() {} | 91 virtual void OnPreconnectsCompleteInternal() {} |
| 94 | 92 |
| 95 void AbortPipelinedRequestsWithKey(const Job* job, | 93 void AbortPipelinedRequestsWithKey(const Job* job, |
| 96 const HttpPipelinedHost::Key& key, | 94 const HttpPipelinedHost::Key& key, |
| 97 int status, | 95 int status, |
| 98 const SSLConfig& used_ssl_config); | 96 const SSLConfig& used_ssl_config); |
| 99 | 97 |
| 100 HttpNetworkSession* const session_; | 98 HttpNetworkSession* const session_; |
| 101 | 99 |
| 102 std::set<HostPortPair> tls_intolerant_servers_; | |
| 103 | |
| 104 // All Requests are handed out to clients. By the time HttpStreamFactoryImpl | 100 // All Requests are handed out to clients. By the time HttpStreamFactoryImpl |
| 105 // is destroyed, all Requests should be deleted (which should remove them from | 101 // is destroyed, all Requests should be deleted (which should remove them from |
| 106 // |request_map_|. The Requests will delete the corresponding job. | 102 // |request_map_|. The Requests will delete the corresponding job. |
| 107 std::map<const Job*, Request*> request_map_; | 103 std::map<const Job*, Request*> request_map_; |
| 108 | 104 |
| 109 SpdySessionRequestMap spdy_session_request_map_; | 105 SpdySessionRequestMap spdy_session_request_map_; |
| 110 HttpPipeliningRequestMap http_pipelining_request_map_; | 106 HttpPipeliningRequestMap http_pipelining_request_map_; |
| 111 | 107 |
| 112 HttpPipelinedHostPool http_pipelined_host_pool_; | 108 HttpPipelinedHostPool http_pipelined_host_pool_; |
| 113 | 109 |
| 114 // These jobs correspond to jobs orphaned by Requests and now owned by | 110 // These jobs correspond to jobs orphaned by Requests and now owned by |
| 115 // HttpStreamFactoryImpl. Since they are no longer tied to Requests, they will | 111 // HttpStreamFactoryImpl. Since they are no longer tied to Requests, they will |
| 116 // not be canceled when Requests are canceled. Therefore, in | 112 // not be canceled when Requests are canceled. Therefore, in |
| 117 // ~HttpStreamFactoryImpl, it is possible for some jobs to still exist in this | 113 // ~HttpStreamFactoryImpl, it is possible for some jobs to still exist in this |
| 118 // set. Leftover jobs will be deleted when the factory is destroyed. | 114 // set. Leftover jobs will be deleted when the factory is destroyed. |
| 119 std::set<const Job*> orphaned_job_set_; | 115 std::set<const Job*> orphaned_job_set_; |
| 120 | 116 |
| 121 // These jobs correspond to preconnect requests and have no associated Request | 117 // These jobs correspond to preconnect requests and have no associated Request |
| 122 // object. They're owned by HttpStreamFactoryImpl. Leftover jobs will be | 118 // object. They're owned by HttpStreamFactoryImpl. Leftover jobs will be |
| 123 // deleted when the factory is destroyed. | 119 // deleted when the factory is destroyed. |
| 124 std::set<const Job*> preconnect_job_set_; | 120 std::set<const Job*> preconnect_job_set_; |
| 125 | 121 |
| 126 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); | 122 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); |
| 127 }; | 123 }; |
| 128 | 124 |
| 129 } // namespace net | 125 } // namespace net |
| 130 | 126 |
| 131 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ | 127 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ |
| OLD | NEW |