| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 PrivacyMode privacy_mode); | 164 PrivacyMode privacy_mode); |
| 165 | 165 |
| 166 // Notifies |this| that a stream to the proxy server contained in |proxy_info| | 166 // Notifies |this| that a stream to the proxy server contained in |proxy_info| |
| 167 // with privacy mode |privacy_mode| is ready. | 167 // with privacy mode |privacy_mode| is ready. |
| 168 void OnStreamReady(const ProxyInfo& proxy_info, PrivacyMode privacy_mode); | 168 void OnStreamReady(const ProxyInfo& proxy_info, PrivacyMode privacy_mode); |
| 169 | 169 |
| 170 // Returns true if |proxy_info| contains a proxy server that supports request | 170 // Returns true if |proxy_info| contains a proxy server that supports request |
| 171 // priorities. | 171 // priorities. |
| 172 bool ProxyServerSupportsPriorities(const ProxyInfo& proxy_info) const; | 172 bool ProxyServerSupportsPriorities(const ProxyInfo& proxy_info) const; |
| 173 | 173 |
| 174 // Add the numbers of JobControllers and Jobs that are not completed to UMA |
| 175 // histograms. |
| 176 void AddJobControllerCountToHistograms() const; |
| 177 |
| 174 HttpNetworkSession* const session_; | 178 HttpNetworkSession* const session_; |
| 175 | 179 |
| 176 // All Requests/Preconnects are assigned with a JobController to manage | 180 // All Requests/Preconnects are assigned with a JobController to manage |
| 177 // serving Job(s). JobController might outlive Request when Request | 181 // serving Job(s). JobController might outlive Request when Request |
| 178 // is served while there's some working Job left. JobController will be | 182 // is served while there's some working Job left. JobController will be |
| 179 // deleted from |job_controller_set_| when it determines the completion of | 183 // deleted from |job_controller_set_| when it determines the completion of |
| 180 // its work. | 184 // its work. |
| 181 JobControllerSet job_controller_set_; | 185 JobControllerSet job_controller_set_; |
| 182 | 186 |
| 183 // Factory used by job controllers for creating jobs. | 187 // Factory used by job controllers for creating jobs. |
| 184 std::unique_ptr<JobFactory> job_factory_; | 188 std::unique_ptr<JobFactory> job_factory_; |
| 185 | 189 |
| 186 // Set of proxy servers that support request priorities to which subsequent | 190 // Set of proxy servers that support request priorities to which subsequent |
| 187 // preconnects should be skipped. | 191 // preconnects should be skipped. |
| 188 std::set<PreconnectingProxyServer> preconnecting_proxy_servers_; | 192 std::set<PreconnectingProxyServer> preconnecting_proxy_servers_; |
| 189 | 193 |
| 190 SpdySessionRequestMap spdy_session_request_map_; | 194 SpdySessionRequestMap spdy_session_request_map_; |
| 191 | 195 |
| 192 const bool for_websockets_; | 196 const bool for_websockets_; |
| 193 | 197 |
| 194 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); | 198 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); |
| 195 }; | 199 }; |
| 196 | 200 |
| 197 } // namespace net | 201 } // namespace net |
| 198 | 202 |
| 199 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ | 203 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ |
| OLD | NEW |